:root {
  --ink: #1b1b3a;
  --paper: #fffaf0;
  --pink: #ff9ec4;
  --peach: #ffc49b;
  --sun: #ffe45e;
  --mint: #9ff0d8;
  --sky: #8fd3ff;
  --ocean: #1f6f8b;
  --lauro: #2f6b3a;
  --poncha: #ff7a3d;
  --shadow: 5px 5px 0 var(--ink);
  --pixel: "Silkscreen", monospace;
  --big: "VT323", monospace;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --bar: 38px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--sky);
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--ocean); }

/* ───────── tło ───────── */
.bg { position: fixed; inset: 0; z-index: 0; }
.bg video { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s; }
.bg video.fading { opacity: 0; }
.bg-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,158,196,.28) 0%, rgba(255,196,155,.12) 45%, rgba(143,211,255,.25) 100%);
  mix-blend-mode: soft-light;
}
.bg-scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px);
}

/* ───────── Win95: bevele ───────── */
.bevel-out { border: 2px solid; border-color: #fff var(--ink) var(--ink) #fff; box-shadow: inset -2px -2px 0 #b9b0a0, inset 2px 2px 0 #fffdf8; }
.bevel-in  { border: 2px solid; border-color: #8a8270 #fff #fff #8a8270; box-shadow: inset 1px 1px 0 var(--ink); }

/* ───────── pasek zadań ───────── */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar); z-index: 9000;
  display: flex; align-items: center; gap: 6px; padding: 3px 4px;
  background: #e9e1d0;
  border-top: 2px solid #fff; box-shadow: 0 -2px 0 var(--ink);
  font-family: var(--pixel); font-size: 11px;
}
.start-btn, .task {
  height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 10px;
  background: #e9e1d0; font-family: var(--pixel); font-size: 11px;
  border: 2px solid; border-color: #fff var(--ink) var(--ink) #fff;
  box-shadow: inset -2px -2px 0 #b9b0a0;
  white-space: nowrap;
}
.start-btn { font-weight: 700; font-size: 13px; }
.start-btn span { font-size: 16px; }
.start-btn[aria-expanded="true"], .task.active {
  border-color: var(--ink) #fff #fff var(--ink); box-shadow: inset 2px 2px 0 #b9b0a0;
  background: repeating-conic-gradient(#e9e1d0 0 25%, #fffaf0 0 50%) 0 0 / 2px 2px;
}
.tasks { flex: 1; display: flex; gap: 4px; height: 100%; overflow: hidden; }
.task { max-width: 170px; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-transform: lowercase; }
.task b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.tray {
  height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 10px;
  border: 2px solid; border-color: #8a8270 #fff #fff #8a8270;
  white-space: nowrap;
}

/* ───────── menu Start ───────── */
.startmenu {
  position: fixed; left: 4px; bottom: calc(var(--bar) - 2px); z-index: 9001;
  display: flex; min-width: 250px;
  background: #e9e1d0;
  border: 2px solid; border-color: #fff var(--ink) var(--ink) #fff;
  box-shadow: inset -2px -2px 0 #b9b0a0, 4px 4px 0 rgba(27,27,58,.35);
}
.startmenu[hidden] { display: none; }
.startmenu-band {
  width: 34px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
  background: linear-gradient(0deg, var(--poncha), var(--pink) 50%, var(--sky));
}
.startmenu-band span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--pixel); font-weight: 700; font-size: 20px; color: var(--paper); letter-spacing: .05em;
  text-shadow: 2px 2px 0 var(--ink);
}
.startmenu-band b { color: var(--sun); }
.startmenu-items { flex: 1; display: flex; flex-direction: column; padding: 4px 0; }
.sm-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 12px;
  background: none; border: 0; text-align: left;
  font-family: var(--mono); font-size: 13px;
}
.sm-item .gl { font-size: 22px; width: 28px; text-align: center; }
.sm-item:hover, .sm-item:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.sm-sep { height: 0; margin: 4px 6px; border-top: 1px solid #8a8270; border-bottom: 1px solid #fff; }

/* ───────── ikony ───────── */
.icons {
  position: fixed; top: 18px; left: 14px; z-index: 1;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto); gap: 10px 6px;
}
.icon {
  width: 88px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; padding: 6px 2px;
  font-family: var(--pixel); font-size: 10px; color: #fff;
  text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink);
}
.icon .glyph {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 28px;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  text-shadow: none;
}
.icon:hover .glyph, .icon:focus-visible .glyph { background: var(--sun); transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.icon:focus-visible { outline: none; }

/* ───────── okna ───────── */
.desktop { position: fixed; inset: 0 0 var(--bar) 0; z-index: 2; pointer-events: none; }
.win {
  position: absolute; pointer-events: auto;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--bar) - 16px);
  animation: pop .18s steps(3);
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.win.hidden { display: none; }
.win-bar {
  display: flex; align-items: center; gap: 8px;
  height: 26px; padding: 0 6px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  cursor: grab; user-select: none; touch-action: none;
  flex-shrink: 0;
}
.win-bar:active { cursor: grabbing; }
.win.focused .win-bar {
  background:
    repeating-linear-gradient(180deg, var(--ink) 0 1px, transparent 1px 4px) 0 50% / 100% 14px no-repeat,
    linear-gradient(90deg, var(--pink), var(--peach) 50%, var(--sun));
}
.win-title {
  font-family: var(--pixel); font-size: 11px; text-transform: uppercase;
  background: var(--paper); padding: 0 8px; margin: 0 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win-close {
  width: 18px; height: 16px; padding: 0; flex-shrink: 0;
  background: var(--paper); border: 2px solid var(--ink);
  font-size: 10px; line-height: 10px; font-family: var(--pixel);
}
.win-close:hover { background: var(--poncha); }
.win-spacer { width: 16px; flex-shrink: 0; }
.win-body { padding: 16px 18px; overflow: auto; }
.win-body::-webkit-scrollbar { width: 14px; }
.win-body::-webkit-scrollbar-track { background: repeating-conic-gradient(var(--ink) 0 25%, var(--paper) 0 50%) 0 0 / 4px 4px; border-left: 2px solid var(--ink); }
.win-body::-webkit-scrollbar-thumb { background: var(--paper); border: 2px solid var(--ink); }

h2, h3 { font-family: var(--pixel); font-weight: 700; text-transform: uppercase; margin: 0 0 8px; line-height: 1.2; }
h2 { font-size: 16px; }
h3 { font-size: 12px; }
p { margin: 0 0 10px; }
.muted { opacity: .65; }
.small { font-size: 12px; }

.btn {
  display: inline-block; padding: 6px 12px;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--pixel); font-size: 11px; text-transform: uppercase; text-decoration: none; color: var(--ink);
}
.btn:hover { background: var(--sun); }
.btn:active { transform: translate(3px,3px); box-shadow: none; }
.btn.hot { background: var(--pink); }

/* ───────── powitanie ───────── */
.hello { text-align: center; padding: 26px 22px 22px; }
.hello .kicker { font-family: var(--pixel); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; }
.hello .title {
  font-family: var(--pixel); font-weight: 700;
  font-size: clamp(44px, 4.6vw, 62px); line-height: .95; letter-spacing: -.02em; margin: 10px 0 4px;
  background: linear-gradient(180deg, var(--sun) 0%, var(--peach) 40%, var(--pink) 70%, var(--poncha) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  filter: drop-shadow(4px 4px 0 var(--ink));
}
.hello .dates { font-family: var(--big); font-size: 34px; line-height: 1; margin: 8px 0 14px; }
.countdown {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  background: var(--ink); color: var(--mint); padding: 10px; margin: 0 0 16px;
  border: 2px solid var(--ink);
}
.countdown div { display: flex; flex-direction: column; }
.countdown b { font-family: var(--big); font-size: 44px; font-weight: 400; line-height: 1; text-shadow: 0 0 8px rgba(159,240,216,.6); }
.countdown span { font-family: var(--pixel); font-size: 9px; text-transform: uppercase; opacity: .8; }
.hello .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hello .weather { margin-top: 16px; font-size: 12px; }

/* ───────── loty ───────── */
.pass {
  display: grid; grid-template-columns: 1fr auto; margin-bottom: 14px;
  border: 2px solid var(--ink); background: #fff;
}
.pass-main { padding: 10px 14px; }
.pass-side {
  padding: 10px 12px; border-left: 2px dashed var(--ink);
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  background: var(--mint);
}
.pass-tag { font-family: var(--pixel); font-size: 10px; background: var(--ink); color: var(--paper); padding: 1px 6px; }
.pass-route { display: flex; align-items: center; gap: 12px; margin: 6px 0 2px; }
.pass-route b { font-family: var(--big); font-size: 46px; font-weight: 400; line-height: .9; }
.pass-route .plane { flex: 1; border-top: 2px dotted var(--ink); position: relative; height: 0; }
.pass-route .plane::after { content: "✈"; position: absolute; left: 50%; top: -13px; transform: translateX(-50%); background: #fff; padding: 0 4px; font-size: 16px; }
.pass-cities { display: flex; justify-content: space-between; font-size: 11px; opacity: .7; }
.pass-times { display: flex; justify-content: space-between; font-family: var(--big); font-size: 24px; margin-top: 4px; }
.pass-price { font-family: var(--mono); font-weight: 600; font-size: 18px; line-height: 1; }
.barcode { width: 64px; height: 26px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 3px, var(--ink) 3px 4px, transparent 4px 7px); }
.book { margin: 0 0 14px; text-align: center; }
.book .btn { font-size: 12px; padding: 8px 16px; }
ul.notes { margin: 0; padding-left: 18px; font-size: 12.5px; }
ul.notes li { margin-bottom: 4px; }

/* ───────── willa ───────── */
.villa-hero { height: 140px; margin: -16px -18px 14px; border-bottom: 2px solid var(--ink);
  background: linear-gradient(135deg, var(--sky), var(--mint) 60%, var(--sun)); position: relative; overflow: hidden; }
.villa-hero .pool { position: absolute; left: 10%; right: 10%; bottom: 18px; height: 46px; background: repeating-linear-gradient(90deg, var(--ocean) 0 12px, #2a8fb0 12px 24px); border: 2px solid var(--ink); }
.villa-hero .house { position: absolute; left: 22%; bottom: 64px; width: 56%; height: 48px; background: var(--paper); border: 2px solid var(--ink); }
.villa-hero .house::before { content: ""; position: absolute; left: -8px; right: -8px; top: -14px; height: 12px; background: var(--poncha); border: 2px solid var(--ink); }
.villa-hero .sun { position: absolute; right: 28px; top: 16px; width: 34px; height: 34px; background: var(--sun); border: 2px solid var(--ink); border-radius: 50%; }
.villa-hero .palm { position: absolute; left: 12px; bottom: 20px; font-size: 54px; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0 0 12px; }
dl.facts dt { font-family: var(--pixel); font-size: 10px; text-transform: uppercase; padding-top: 3px; }
dl.facts dd { margin: 0; }

/* ───────── kasa ───────── */
table.sheet { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
table.sheet td { border: 1px solid var(--ink); padding: 6px 8px; }
table.sheet td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
table.sheet tr:nth-child(odd) td { background: #fdf3ff; }
table.sheet tr.total td { background: var(--sun); font-weight: 600; border-top: 2px solid var(--ink); }
table.sheet tr.total td:last-child { font-size: 15px; }

/* ───────── plan ───────── */
.days { display: flex; flex-direction: column; gap: 10px; }
.day { display: grid; grid-template-columns: 86px 1fr; border: 2px solid var(--ink); background: #fff; }
.day-head {
  padding: 8px; border-right: 2px solid var(--ink);
  font-family: var(--pixel); font-size: 10px; text-transform: uppercase;
  display: flex; flex-direction: column; gap: 4px;
}
.day-head .n { font-family: var(--big); font-size: 30px; line-height: .9; }
.day:nth-child(4n+1) .day-head { background: var(--pink); }
.day:nth-child(4n+2) .day-head { background: var(--mint); }
.day:nth-child(4n+3) .day-head { background: var(--sun); }
.day:nth-child(4n+4) .day-head { background: var(--sky); }
.day-body { padding: 8px 12px; }
.day-body ul { margin: 0; padding-left: 16px; font-size: 12.5px; }
.day-body .warn { margin-top: 6px; font-size: 11.5px; background: var(--ink); color: var(--sun); padding: 2px 6px; display: inline-block; }

/* ───────── czemu madera ───────── */
.why { list-style: none; margin: 0 0 14px; padding: 0; text-align: left; display: grid; gap: 6px; }
.why li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; font-size: 13px; background: #fff; border: 2px solid var(--ink); padding: 5px 8px; }
.why li span:first-child { font-size: 18px; text-align: center; }
.tag-note { display: inline-block; font-family: var(--pixel); font-size: 9px; text-transform: uppercase; background: var(--sun); border: 2px solid var(--ink); padding: 1px 6px; margin-bottom: 12px; }
.pitch-price { font-family: var(--pixel); font-size: 11px; margin: 0 0 14px; }

/* ───────── noclegi ───────── */
.tier-h { margin: 22px 0 10px; padding: 6px 10px; background: var(--ink); color: var(--sun); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.tier-h span { font-family: var(--mono); font-weight: 400; text-transform: none; font-size: 12px; color: var(--paper); opacity: .8; }
.stays { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.stay { border: 2px solid var(--ink); background: #fff; display: flex; flex-direction: column; box-shadow: 3px 3px 0 var(--ink); }
.stay-img { position: relative; aspect-ratio: 16/10; border-bottom: 2px solid var(--ink); overflow: hidden;
  background: linear-gradient(135deg, var(--sky), var(--mint) 60%, var(--sun)); }
.stay-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.1) contrast(1.02); }
.stay-img .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; }
.stay-pick { position: absolute; top: 8px; left: 8px; font-family: var(--pixel); font-size: 9px; text-transform: uppercase; background: var(--pink); border: 2px solid var(--ink); padding: 1px 6px; }
.stay-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.stay-body h3 { margin: 0; font-size: 13px; }
.stay-area { font-size: 11.5px; opacity: .7; margin-top: -4px; }
.stay-specs { font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags span { font-size: 11px; background: var(--mint); border: 1px solid var(--ink); padding: 0 5px; }
.stay-price { font-weight: 600; font-size: 13px; }
.stay-status { position: absolute; bottom: 8px; left: 8px; font-family: var(--pixel); font-size: 9px; text-transform: uppercase; border: 2px solid var(--ink); padding: 1px 6px; }
.stay-status.ok { background: var(--mint); }
.stay-status.no { background: var(--poncha); color: var(--paper); }
.stay-img.off img { filter: grayscale(.7) contrast(.9); }
table.ppl { width: 100%; border-collapse: collapse; text-align: center; }
table.ppl th { font-family: var(--pixel); font-size: 9px; font-weight: 400; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: 2px 4px; border: 1px solid var(--ink); }
table.ppl td { font-weight: 600; font-size: 13px; padding: 4px; border: 1px solid var(--ink); background: #fffdf0; }
.stay-catch { font-size: 11.5px; background: #fdf3ff; border-left: 3px solid var(--pink); padding: 3px 7px; }
.stay-foot { margin-top: auto; padding-top: 4px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.stay-foot .small { opacity: .6; }

/* ───────── komunikat ───────── */
.msg { display: flex; gap: 14px; align-items: flex-start; }
.msg .ico { font-size: 36px; line-height: 1; }
.msg-actions { display: flex; justify-content: center; margin-top: 14px; }

/* ───────── TV ───────── */
.tv-screen { aspect-ratio: 16/9; background: #000 center / cover no-repeat; border: 2px solid var(--ink); position: relative; margin-bottom: 10px; }
.tv-screen .ch { position: absolute; top: 6px; right: 8px; font-family: var(--big); font-size: 26px; color: var(--mint); text-shadow: 0 0 6px var(--mint); }
.tv-name { font-family: var(--pixel); font-size: 11px; text-transform: uppercase; margin-bottom: 8px; }
.tv-controls { display: flex; gap: 8px; }

/* ───────── mobile ───────── */
@media (max-width: 860px) {
  body { overflow: auto; }
  .bg { position: fixed; }
  .icons { display: none; }
  .desktop { position: relative; inset: auto; padding: 14px 12px calc(var(--bar) + 24px); display: flex; flex-direction: column; gap: 18px; pointer-events: auto; }
  .win { position: relative !important; left: auto !important; top: auto !important; width: auto !important; max-height: none; }
  .win.hidden { display: flex; }
  .win-close { visibility: hidden; }
  .win-bar { cursor: default; }
  .win .win-bar { background:
    repeating-linear-gradient(180deg, var(--ink) 0 1px, transparent 1px 4px) 0 50% / 100% 14px no-repeat,
    linear-gradient(90deg, var(--pink), var(--peach) 50%, var(--sun)); }
  .countdown b { font-size: 36px; }
  .pass-route b { font-size: 38px; }
  .tasks, #tray-countdown { display: none; }
  .tray { margin-left: auto; }
  .stays { grid-template-columns: 1fr; }
  .win.dialog.hidden { display: none; }
  .win.dialog { position: fixed !important; left: 12px !important; right: 12px; top: 30% !important; width: auto !important; z-index: 9500 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .win { animation: none; }
}
