/* ===========================================================================
   BonzaQ — Windows XP "Luna" desktop (vlastní look-alike, žádné MS assety).
   Autentická retro estetika: Tahoma, Luna modrá, beveled okna, zelený Start.
   =========================================================================== */

:root {
  --luna-blue:        #0058e6;
  --luna-blue-light:  #3f8cf3;
  --title-grad: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0876f3 40%, #0264f4 88%, #0257e0 100%);
  --title-grad-inactive: linear-gradient(180deg, #7aa3e6 0%, #6e9be3 100%);
  --win-face:   #ece9d8;
  --win-border: #0831d9;
  --taskbar:    linear-gradient(180deg, #3f8cf3 0%, #2a6bdf 6%, #245edb 42%, #1f57d6 90%, #1941a5 100%);
  --start-grad: linear-gradient(180deg, #59a751 0%, #3c8d36 50%, #357e30 100%);
  --tray-bg:    linear-gradient(180deg, #1c92e8 0%, #1290e9 6%, #1b9de9 50%, #1290e9 94%);
  --field:      #ffffff;
  --line:       #7f9db9;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  font-size: 11px;
  overflow: hidden;
  user-select: none;
}

/* ---- Plocha + "Bliss-like" tapeta (vlastní CSS, ne originál) ------------- */
#desktop {
  position: absolute; inset: 0 0 30px 0;   /* nad taskbarem */
  background: linear-gradient(180deg, #1c5fb0 0%, #3f86d4 32%, #79bbef 56%, #b6dcf5 72%, #cdeaf8 80%);
  overflow: hidden;
}
#desktop::after {                          /* zelený kopec */
  content: ""; position: absolute; left: -8%; right: -8%; bottom: 0; height: 44%;
  background: linear-gradient(180deg, #8cc63f 0%, #5fa42f 45%, #3d7c20 100%);
  border-radius: 50% 50% 0 0 / 90% 90% 0 0;
  box-shadow: inset 0 6px 24px rgba(255,255,255,.25);
}

/* ---- Desktop ikony ------------------------------------------------------- */
#icons { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 14px; z-index: 1; }
.icon { width: 76px; padding: 3px; text-align: center; cursor: pointer; }
.icon__img {
  width: 46px; height: 46px; margin: 0 auto; display: block;
  object-fit: cover; object-position: center 22%;
  image-rendering: auto;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.45));
}
.icon__label {
  display: inline-block; margin-top: 3px; padding: 0 3px; color: #fff; line-height: 1.25;
  text-shadow: 0 1px 2px #000, 1px 0 2px #000, -1px 0 2px #000;
}
.icon.is-selected .icon__label { background: #0b61c9; outline: 1px dotted #c9d6ef; text-shadow: none; }

/* ---- Okno (generické) ---------------------------------------------------- */
.win {
  position: absolute; min-width: 320px;
  max-height: calc(100% - 16px);   /* nikdy vyšší než plocha → tělo scrolluje */
  background: var(--win-face);
  border: 1px solid var(--win-border);
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 3px 12px rgba(0,0,0,.45), inset 0 0 0 1px #5b8fe8;
  display: flex; flex-direction: column;
  z-index: 10;
}
.win.is-active { z-index: 50; }
.win.is-min { display: none; }

.win__bar {
  height: 28px; padding: 0 4px 0 6px;
  display: flex; align-items: center; gap: 5px;
  background: var(--title-grad);
  border-radius: 7px 7px 0 0;
  color: #fff; font-weight: bold; cursor: move; touch-action: none;
  text-shadow: 1px 1px 1px rgba(0,0,0,.5);
}
.win:not(.is-active) .win__bar { background: var(--title-grad-inactive); }
.win__bar img { width: 16px; height: 16px; object-fit: cover; object-position: center 20%; }
.win__title { flex: 1; min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.win__btns { display: flex; gap: 2px; flex-shrink: 0; }
.win__btn {
  width: 21px; height: 21px; border: 1px solid #fff; border-radius: 3px;
  background: linear-gradient(180deg, #6aa0ec, #1c5fd4); color: #fff;
  font: bold 11px Tahoma; cursor: pointer; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.win__btn--close { background: linear-gradient(180deg, #f1968a, #d24a36); }
.win__btn:hover { filter: brightness(1.12); }

.win__body { padding: 10px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.win__statusbar { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 12px; padding-top: 4px; border-top: 1px solid #cfcdc0;
  font-size: 10.5px; color: #6a6657; white-space: nowrap; }
.win__statusbar span:first-child { font-weight: bold; color: #1c3f7e; letter-spacing: .03em; }
.win__statusbar-mid { overflow: hidden; text-overflow: ellipsis; }

/* ---- BonzaQ okno --------------------------------------------------------- */
#win-bonzaq { width: 720px; }
.bz__head { display: flex; align-items: center; gap: 16px; padding: 8px 8px 12px; border-bottom: 1px solid #c9c6b6; }
/* Logo výrazně větší + „úřední" rámeček a tmavé pozadí, ať holubice nesplyne s béžovým oknem */
.bz__logo {
  width: 92px; height: 92px; object-fit: contain; flex: 0 0 auto;
  background: radial-gradient(120% 120% at 50% 35%, #16233a 0%, #0d1117 70%);
  border: 1px solid #20457e; border-radius: 6px; padding: 4px;
  box-shadow: 0 0 0 1px #cdd2c4, inset 0 0 10px rgba(60,110,200,.35);
}
.bz__titles { line-height: 1.2; }
.bz__sys { font-size: 12px; letter-spacing: .05em; color: #333; text-transform: uppercase; }
.bz__brand { font-size: 32px; font-weight: 800; color: var(--luna-blue); line-height: 1; margin: 1px 0 2px; }
.bz__brand b { color: #d24a36; }                    /* plamínková Q */
.bz__motto { font-size: 13px; font-weight: 700; font-style: italic; color: #b3300f; letter-spacing: .02em; margin: 1px 0; }
.bz__unit { font-size: 11px; color: #2a4d86; font-weight: bold; letter-spacing: .02em; }
.bz__unit-abbr { color: #777; font-weight: normal; }
.bz__ver { font-size: 11px; color: #777; margin-top: 1px; }

.bz__search { display: flex; gap: 6px; margin: 10px 0; }
.bz__search input { flex: 1; border: 2px inset #cfcdc0; padding: 4px 6px; font: 12px Tahoma; }

.bz__grid { display: grid; grid-template-columns: 200px 1fr; gap: 10px; }
.bz__list { border: 2px inset #cfcdc0; background: #fff; max-height: 280px; overflow: auto; }
.bz__list button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 5px 8px; font: 12px Tahoma; cursor: pointer; border-bottom: 1px solid #eee;
}
.bz__list button:hover { background: #e8eefb; }
.bz__list button.is-active { background: var(--luna-blue); color: #fff; }

.bz__card { border: 1px solid #c9c6b6; background: #fbfbf7; padding: 10px; display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: start; }
.bz__foto { width: 160px; height: 192px; border: 1px solid #999; background: #fff; display: grid; place-items: center; color: #999; text-align: center; overflow: hidden; }
.bz__foto img { width: 100%; height: 100%; object-fit: cover; }
.bz__foto.is-empty::after { content: "(karikatura se připravuje)"; color: #999; padding: 8px; }
.bz__foto-ph { color: #999; }
.bz__pole { margin: 0; font-size: 11px; display: grid; grid-template-columns: 92px 1fr; gap: 2px 8px; align-content: start; }
.bz__pole dt { color: #666; }
.bz__pole dd { margin: 0; font-weight: bold; word-break: break-word; }
.bz__bio { grid-column: 1 / -1; border-top: 1px dashed #ccc; padding-top: 8px; font-size: 12px; color: #333; line-height: 1.5; }
.bz__bio p { margin: 0 0 8px; }
.bz__bio em { color: #999; }
.bz__prestupky { margin-top: 10px; background: #fff4f0; border: 1px solid #e3b0a0; border-radius: 3px; padding: 8px 10px; }
.bz__prestupky strong { color: #b3300f; }
.bz__prestupky ul { margin: 5px 0 0; padding-left: 18px; }
.bz__prestupky li { margin: 2px 0; }
.bz__csfd { margin-top: 8px; font-size: 12px; }
.bz__csfd a { color: #0a3aa8; }
/* Doložka pod kartou — satirický rámec (právní + tón ÚRB) */
.bz__disclaimer {
  grid-column: 1 / -1; margin-top: 10px; padding: 7px 10px;
  border-top: 1px dashed #ccc; font-size: 10.5px; color: #777; line-height: 1.45;
  background: #fbfaf4;
}
.bz__disclaimer strong { color: #b3300f; }
.bz__disclaimer a { color: #0a3aa8; white-space: nowrap; }
.bz__share { grid-column: 1 / -1; margin-top: 10px; }
.bz__sharebtn { width: 100%; padding: 10px; border: 1px solid #0a2f7a; border-radius: 4px; cursor: pointer;
  background: linear-gradient(180deg, #2a5bbf, #16489f); color: #fff; font: bold 12.5px Tahoma; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.bz__sharebtn:hover { filter: brightness(1.12); }
.bz__sharebtn.is-done { background: linear-gradient(180deg, #2f9c68, #1a764d); }

/* ---- Explorer okno (404) ------------------------------------------------- */
.win--explorer { width: 460px; }
.ex__toolbar { display: flex; gap: 6px; padding: 4px 6px; border-bottom: 1px solid #c9c6b6; color: #333; }
.ex__addr { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid #c9c6b6; }
.ex__addr input { flex: 1; border: 2px inset #cfcdc0; padding: 3px 6px; font: 12px Tahoma; background: #fff; }
.ex__404 { padding: 26px 16px; text-align: center; }
.ex__404 .code { font-size: 60px; font-weight: 800; color: var(--luna-blue); line-height: 1; }
.ex__404 .msg { margin-top: 10px; font-size: 13px; color: #333; }
.ex__404 .sub { margin-top: 6px; font-size: 12px; color: #777; }

/* ---- Taskbar ------------------------------------------------------------- */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  background: var(--taskbar);
  display: flex; align-items: stretch; z-index: 1000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
#start {
  display: flex; align-items: center; gap: 5px; padding: 0 16px 0 9px;
  border: 0; cursor: pointer; color: #fff; font: italic bold 14px Tahoma;
  background: var(--start-grad);
  border-radius: 0 9px 9px 0;
  text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  box-shadow: inset -2px 0 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.4);
}
#start::before { content: ""; width: 18px; height: 18px; border-radius: 4px;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, #d8453a 11% 60%, #a52f25 61%); }
#start:hover { filter: brightness(1.08); }

#taskbar-windows { flex: 1; display: flex; align-items: center; gap: 4px; padding: 3px 4px; overflow: hidden; }
.tbwin {
  height: 100%; min-width: 120px; max-width: 160px; padding: 0 8px;
  display: flex; align-items: center; gap: 6px;
  border: 1px solid #2451b5; border-radius: 3px;
  background: linear-gradient(180deg, #4e8bee, #2a6bdf); color: #fff;
  font: 11px Tahoma; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tbwin.is-active { background: linear-gradient(180deg, #1c52c4, #2a6bdf); box-shadow: inset 1px 1px 3px rgba(0,0,0,.4); }
.tbwin img { width: 14px; height: 14px; object-fit: cover; object-position: center 20%; }

#tray {
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: var(--tray-bg); color: #fff;
  box-shadow: inset 2px 0 4px rgba(0,0,0,.25);
  border-left: 1px solid #156fc0;
}
#tray button { background: none; border: 0; color: #fff; cursor: pointer; font: 12px Tahoma; }
#clock { font: 11px Tahoma; min-width: 48px; text-align: center; }

/* ---- Start menu ---------------------------------------------------------- */
#startmenu {
  position: absolute; left: 0; bottom: 30px; width: 240px; z-index: 1001;
  background: #fff; border: 1px solid var(--win-border); border-bottom: 0;
  border-radius: 8px 8px 0 0; overflow: hidden; display: none;
  box-shadow: 2px -2px 12px rgba(0,0,0,.4);
}
#startmenu.is-open { display: block; }
#startmenu .sm__head { padding: 8px 12px; color: #fff; font-weight: bold;
  background: linear-gradient(180deg, #1c5fd4, #0a3aa8); }
#startmenu .sm__item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: #fff;
  padding: 7px 12px; font: 12px Tahoma; cursor: pointer; }
#startmenu .sm__item img { width: 18px; height: 18px; object-fit: cover; object-position: center 20%; flex: 0 0 auto; }
#startmenu .sm__item:hover { background: var(--luna-blue); color: #fff; }

/* ---- Boot overlay — síť dohledu ÚRB ------------------------------------- */
#boot {
  position: absolute; inset: 0; z-index: 5000;
  background: radial-gradient(120% 90% at 50% 38%, #11233f 0%, #0a1320 42%, #06080c 100%);
  color: #d9e6f5; text-align: center; cursor: pointer;
  display: grid; place-items: center;
  transition: opacity .7s ease; font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  overflow: hidden;
}
#boot.is-hidden { opacity: 0; pointer-events: none; }

/* Pomalu klesající „skenovací" linka přes plochu (dohledový/CRT dojem) */
.boot__scan {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(180deg, transparent 0%, transparent 46%,
      rgba(90,150,235,.22) 50%, transparent 54%, transparent 100%);
  background-size: 100% 220px;
  animation: bootScan 4.2s linear infinite;
}
@keyframes bootScan { from { background-position: 0 -220px; } to { background-position: 0 100%; } }

.boot__core { position: relative; z-index: 1; display: grid; justify-items: center; gap: 14px; padding: 20px; }

/* Pulzující znak holubice + dva rozbíhavé „radarové" kruhy */
.boot__seal { position: relative; width: 168px; height: 168px; display: grid; place-items: center; }
.boot__logo {
  width: 150px; height: 150px; object-fit: contain; position: relative; z-index: 2;
  filter: drop-shadow(0 0 10px rgba(90,150,235,.55));
  animation: bootPulse 2.6s ease-in-out infinite;
}
@keyframes bootPulse {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 8px rgba(90,150,235,.45)); }
  50%      { transform: scale(1.05); filter: drop-shadow(0 0 18px rgba(120,180,255,.85)); }
}
.boot__ring {
  position: absolute; inset: 8px; border: 2px solid rgba(120,180,255,.55);
  border-radius: 50%; opacity: 0; transform: scale(.5);
  animation: bootRing 2.6s ease-out infinite;
}
.boot__ring--2 { animation-delay: 1.3s; }
@keyframes bootRing {
  0%   { opacity: .7; transform: scale(.55); }
  80%  { opacity: 0;  transform: scale(1.35); }
  100% { opacity: 0;  transform: scale(1.35); }
}

.boot__unit { font-size: 13px; font-weight: bold; letter-spacing: .26em; color: #8fb6ee; text-transform: uppercase; }
.boot__motto {
  font-size: 27px; font-weight: 800; letter-spacing: .04em; color: #fff;
  text-shadow: 0 0 16px rgba(120,180,255,.45); margin-top: -2px;
}

#boot .logo { font-size: 15px; font-weight: 700; color: #9fb6d4; letter-spacing: .06em; }
#boot .logo span { color: #cfe0f6; }
#boot .logo b { color: #d24a36; }
.boot__brand { margin-top: 4px; }

/* Segmentový XP-styl loader (vlastní styl, ne MS asset) */
#boot .bar {
  width: 260px; height: 18px; margin-top: 6px;
  border: 1px solid #2c4d7e; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #0c1626 0 10px, #0a1320 10px 14px);
  box-shadow: inset 0 0 8px rgba(0,0,0,.7), 0 0 0 1px #06080c;
  overflow: hidden; padding: 2px;
}
#boot .bar i {
  display: block; height: 100%; width: 14%; border-radius: 2px;
  background: repeating-linear-gradient(90deg, #2e6bdb 0 9px, #1c4fb0 9px 12px);
  box-shadow: 0 0 10px rgba(80,150,255,.8);
  animation: bootFill 5.4s cubic-bezier(.55,.05,.25,1) forwards;
}
@keyframes bootFill {
  0%   { width: 6%;  }
  18%  { width: 23%; }
  34%  { width: 31%; }   /* zaseknutí */
  55%  { width: 58%; }
  72%  { width: 67%; }   /* druhé zaseknutí */
  90%  { width: 92%; }
  100% { width: 100%; }
}

#boot .hint { font-size: 12px; color: #7f9bbe; letter-spacing: .03em; min-height: 15px; margin-top: 2px; }

.boot__foot {
  position: absolute; left: 0; right: 0; bottom: 14px; z-index: 1;
  font-size: 10px; letter-spacing: .04em; color: #4f688c;
  padding: 0 16px; line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .boot__scan, .boot__logo, .boot__ring { animation: none; }
  #boot .bar i { animation: none; width: 100%; }
}

/* ---- Media Player (vlastní retro přehrávač, ne MS WMP) ------------------ */
.win--player { width: 380px; }
.win--player .win__body { background: linear-gradient(180deg, #2a5bbf, #16489f); padding: 12px; }
.mp__screen { background: #08245c; border: 2px solid #0a2f7a; border-radius: 4px; padding: 12px; margin-bottom: 12px; box-shadow: inset 0 0 12px rgba(0,0,0,.5); }
.mp__title { font: bold 13px Tahoma; color: #cfe6ff; margin-bottom: 10px; min-height: 16px; text-align: center; }
.mp__viz { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.mp__viz span { flex: 1; height: 18%; border-radius: 1px; background: linear-gradient(#62d3ff, #1c5fd4); }
.mp.is-playing .mp__viz span { animation: mpviz .9s ease-in-out infinite; }
.mp__viz span:nth-child(2n) { animation-delay: .15s; }
.mp__viz span:nth-child(3n) { animation-delay: .30s; }
.mp__viz span:nth-child(4n) { animation-delay: .45s; }
@keyframes mpviz { 0%, 100% { height: 15%; } 50% { height: 95%; } }
.mp__bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #cfe6ff; font: 11px Tahoma; }
.mp__seek { flex: 1; height: 6px; background: #08245c; border-radius: 3px; cursor: pointer; position: relative; }
.mp__seek i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #62d3ff; border-radius: 3px; }
.mp__btns { display: flex; align-items: center; gap: 8px; }
.mp__btn { min-width: 34px; height: 28px; padding: 0 8px; border: 1px solid #0a2f7a; border-radius: 4px;
  cursor: pointer; background: linear-gradient(#6aa0ec, #1c5fd4); color: #fff; font: 13px Tahoma; }
.mp__btn:hover { filter: brightness(1.1); }
.mp__vol { margin-left: auto; width: 80px; }
.mp__note { font: 11px Tahoma; color: #cfe6ff; margin-top: 10px; opacity: .85; text-align: center; }

/* ---- Jednoduché aplikace (Koš, Tajné: OLDA) ---------------------------- */
.app-empty { text-align: center; padding: 30px 16px; color: #333; }
.app-empty__img { width: 56px; height: 56px; opacity: .85; }
.app-empty h2 { margin: 12px 0 6px; font-size: 16px; }
.app-empty p { margin: 4px 0; font-size: 12px; }
.app-muted { color: #888; font-style: italic; }
.app-secret { padding: 24px 20px; color: #2a2a2a; }
.app-secret__stamp {
  display: inline-block; border: 3px solid #b3300f; color: #b3300f;
  font: bold 13px Tahoma; letter-spacing: 2px; padding: 4px 12px; border-radius: 4px;
  transform: rotate(-6deg); margin-bottom: 16px; opacity: .85;
}
.app-secret h2 { margin: 6px 0 10px; font-size: 16px; }
.app-secret p { margin: 8px 0; font-size: 12.5px; line-height: 1.55; max-width: 460px; }

/* ---- O systému (About — fanouškovský disclaimer) ----------------------- */
#win-about { width: 520px; }
.about { font-size: 12px; color: #2a2a2a; line-height: 1.55; }
.about p { margin: 0 0 9px; }
.about__sys {
  color: #2a4d86; background: #eef3fb; border: 1px solid #cdd9ef; border-radius: 4px;
  padding: 7px 9px; line-height: 1.4;
}
.about strong { color: #1c3f7e; }
.about em { color: #444; font-style: italic; }
.about hr { border: 0; border-top: 1px solid #c9c6b6; margin: 12px 0; }
.about ul { margin: 4px 0 10px; padding-left: 20px; }
.about li { margin: 4px 0; }
.about li strong { color: #b3300f; }       /* varovný tón v disclaimeru */
.about__steam {
  display: inline-block; padding: 8px 16px; border-radius: 4px;
  background: linear-gradient(180deg, #2a5bbf, #16489f);
  color: #fff !important; font-weight: bold; text-decoration: none; letter-spacing: .02em;
  border: 1px solid #0a2f7a; box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.about__steam:hover { filter: brightness(1.14); }
.about__foot { font-size: 11px; color: #888; line-height: 1.45; }

/* ---- Podat udání (foto → fake karikaturizace, vše lokálně) ------------- */
.win--udani { width: 480px; }
.udani { font-size: 14px; color: #2a2a2a; }
.udani__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  border-bottom: 2px solid #1c5fd4; padding-bottom: 5px; margin-bottom: 8px; }
.udani__head strong { color: #1c3f7e; letter-spacing: .03em; font-size: 14px; }
.udani__head span { font-size: 11px; color: #888; white-space: nowrap; }
.udani__intro { margin: 0 0 10px; line-height: 1.45; }
.udani__stage { position: relative; width: 100%; max-width: 220px; aspect-ratio: 1 / 1; margin: 0 auto 10px;
  border: 2px inset #cfcdc0; background: #f3f1e8; overflow: hidden; }
.udani__drop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer;
  background: repeating-linear-gradient(45deg, #f3f1e8 0 12px, #eceadf 12px 24px);
  display: grid; place-content: center; gap: 4px; text-align: center; color: #555; font: inherit; }
.udani__drop:hover { background: repeating-linear-gradient(45deg, #eef2fb 0 12px, #e3ebfa 12px 24px); }
.udani__cam { font-size: 42px; }
.udani__drop b { font-size: 16px; color: #1c3f7e; }
.udani__drop small { color: #888; font-size: 12px; }
.udani__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.udani__canvas[hidden], .udani__scan[hidden] { display: none; }   /* hidden atribut musí přebít display:block */
.udani__canvas.is-done { animation: udaniReveal .5s ease; }
@keyframes udaniReveal { from { opacity: .35; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.udani__scan { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0 46%, rgba(90,150,235,.55) 50%, transparent 54% 100%);
  background-size: 100% 56px; animation: udaniScan 1.1s linear infinite;
  box-shadow: inset 0 0 30px rgba(20,60,140,.45); }
@keyframes udaniScan { from { background-position: 0 -56px; } to { background-position: 0 340px; } }
.udani__status { min-height: 48px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5;
  background: #08245c; color: #cfe6ff; border-radius: 3px; }
.udani__status strong { color: #ffd23f; }
.udani__status b { color: #fff; }
.udani__foot { margin-top: 10px; font-size: 11.5px; color: #888; text-align: center; }
.udani__foot em { color: #b3300f; font-style: italic; }
.udani__duvod-l { display: block; font-size: 12.5px; color: #555; margin: 0 0 3px; font-weight: bold; }
.udani__duvod { width: 100%; box-sizing: border-box; resize: vertical; font: 13px Tahoma; padding: 7px 9px;
  border: 2px inset #cfcdc0; background: #fffdf6; margin-bottom: 10px; line-height: 1.4; }
.udani__duvod:focus { outline: 2px solid #1c5fd4; outline-offset: -1px; }
.udani__duvod-echo { margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(255,255,255,.25); font-size: 12.5px; }
.udani__duvod-echo em { color: #ffd23f; font-style: italic; }
.udani__reset { margin-top: 12px; text-align: center; }
.udani__resetbtn { padding: 9px 16px; border: 1px solid #888; border-radius: 4px; cursor: pointer;
  background: linear-gradient(180deg, #fafafa, #e4e4e4); font: bold 12.5px Tahoma; color: #333; }
.udani__resetbtn:hover { background: linear-gradient(180deg, #eef2fb, #dde7f8); border-color: #2a5bbf; }
.udani__choice { display: grid; gap: 8px; }
.udani__choice[hidden], .udani__photo[hidden], .udani__reset[hidden], .udani__twist[hidden] { display: none !important; }
.udani__mode { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%;
  padding: 12px 14px; border: 1px solid #b5b08a; border-radius: 5px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, #fffef4, #f1eed8); font: inherit; }
.udani__mode span { font-size: 15px; font-weight: bold; color: #1c3f7e; }
.udani__mode small { color: #888; font-size: 12px; }
.udani__mode:hover { background: linear-gradient(180deg, #eef3fb, #dfe8fa); border-color: #2a5bbf; }
.udani__twist { margin-top: 12px; border-top: 2px dashed #b3300f; padding-top: 12px; }
.udani__regist { background: #08245c; color: #ffd23f; padding: 9px 11px; border-radius: 3px; margin: 8px 0; font-size: 12.5px; }
.udani__regist b { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .udani__scan { animation: none; }
  .udani__canvas.is-done { animation: none; }
}

/* ---- ŠmírScan (hloubková kontrola návštěvníka, vše lokálně) ------------ */
.win--smirscan { width: 400px; }
.smir { font-size: 14px; color: #2a2a2a; }
.smir__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  border-bottom: 2px solid #1c5fd4; padding-bottom: 5px; margin-bottom: 8px; }
.smir__head strong { color: #1c3f7e; letter-spacing: .03em; font-size: 14px; }
.smir__head span { font-size: 11px; color: #888; white-space: nowrap; }
.smir__intro { margin: 0 0 12px; line-height: 1.5; }
.smir__stage { position: relative; margin-bottom: 12px; }
.smir__go { width: 100%; padding: 14px; border: 1px solid #0a2f7a; border-radius: 5px; cursor: pointer;
  background: linear-gradient(180deg, #2a5bbf, #16489f); color: #fff; font: bold 15px Tahoma; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.smir__go:hover:not(:disabled) { filter: brightness(1.12); }
.smir__go:disabled { cursor: default; opacity: .92; }
.smir__scanline { position: absolute; inset: 0; pointer-events: none; border-radius: 5px; overflow: hidden; }
.smir__scanline::before { content: ""; position: absolute; left: 0; right: 0; height: 45%;
  background: linear-gradient(180deg, transparent, rgba(98,211,255,.4), transparent);
  animation: smirScan 1.1s linear infinite; }
@keyframes smirScan { from { top: -45%; } to { top: 100%; } }
.smir__out { border-top: 1px dashed #ccc; padding-top: 10px; }
.smir__verdict { background: #08245c; color: #ffd23f; font-weight: bold; padding: 9px 11px; border-radius: 3px;
  margin-bottom: 10px; font-size: 13px; }
.smir__pole { margin: 0 0 10px; display: grid; grid-template-columns: 135px 1fr; gap: 3px 8px; font-size: 12.5px; }
.smir__pole dt { color: #666; }
.smir__pole dd { margin: 0; font-weight: bold; word-break: break-word; }
.smir__prest { background: #fff4f0; border: 1px solid #e3b0a0; border-radius: 3px; padding: 8px 10px; }
.smir__prest strong { color: #b3300f; }
.smir__prest ul { margin: 6px 0 0; padding-left: 18px; }
.smir__prest li { margin: 5px 0; line-height: 1.45; }
.smir__note { margin-top: 10px; font-size: 11.5px; color: #888; line-height: 1.5; }
.smir__note b { color: #b3300f; }
@media (prefers-reduced-motion: reduce) { .smir__scanline::before { animation: none; } }

/* ---- Dohledové toasty (systémové notifikace ÚRB) ---------------------- */
.sys-toast { position: fixed; right: 10px; bottom: 38px; z-index: 1100; width: 270px;
  background: linear-gradient(180deg, #fffef0, #f3f0d8); border: 1px solid #b5b08a; border-radius: 6px;
  box-shadow: 0 3px 14px rgba(0,0,0,.4); padding: 9px 11px 10px; font-size: 12px; color: #333;
  animation: toastIn .35s ease; }
.sys-toast.is-out { animation: toastOut .4s ease forwards; }
@keyframes toastIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateX(24px); opacity: 0; } }
.sys-toast__head { display: flex; align-items: center; gap: 6px; font-weight: bold; color: #1c3f7e; margin-bottom: 3px; font-size: 11.5px; }
.sys-toast__head img { width: 16px; height: 16px; }
.sys-toast__x { margin-left: auto; cursor: pointer; color: #999; font-weight: bold; padding: 0 2px; }
.sys-toast__x:hover { color: #c0241a; }
.sys-toast p { margin: 0; line-height: 1.4; }
@media (max-width: 760px) { .sys-toast { right: 2vw; left: 2vw; width: auto; bottom: 36px; } }
@media (prefers-reduced-motion: reduce) { .sys-toast, .sys-toast.is-out { animation: none; } }

/* ---- BSOD easter egg (modrá smrt ÚRB) --------------------------------- */
.bsod { position: fixed; inset: 0; z-index: 99999; background: #0a2bb0; color: #fff;
  font: 15px/1.6 'Lucida Console', 'Courier New', monospace; display: flex; align-items: center; justify-content: center; padding: 6vw; cursor: progress; }
.bsod__inner { max-width: 680px; }
.bsod__face { font: bold 64px Tahoma, sans-serif; margin-bottom: 18px; }
.bsod__lead { font-size: 19px; margin: 0 0 22px; }
.bsod p { margin: 0 0 14px; }
.bsod b { color: #ffe14d; }
.bsod__tech { font-size: 13px; opacity: .92; }
.bsod__bar { margin-top: 24px; }
.bsod__hint { font-size: 12px; opacity: .7; margin-top: 30px; }
@media (max-width: 760px) { .bsod__face { font-size: 48px; } .bsod__lead { font-size: 16px; } .bsod { font-size: 13px; } }

/* ---- no-JS fallback ---------------------------------------------------- */
.noscript-warn { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  background: rgba(8,20,50,.92); padding: 6vw; }
.noscript-card { max-width: 460px; background: linear-gradient(180deg,#fffef4,#eef0dc); border: 1px solid #b5b08a;
  border-radius: 8px; box-shadow: 0 6px 30px rgba(0,0,0,.5); padding: 22px 24px; color: #2a2a2a; font-size: 14px; line-height: 1.55; }
.noscript-card strong { display: block; color: #1c3f7e; font-size: 18px; letter-spacing: .04em; margin-bottom: 10px; }
.noscript-card p { margin: 0 0 10px; }
.noscript-foot { color: #b3300f; font-size: 12.5px; }

/* ---- přístupnost: viditelný fokus pro klávesovou navigaci ------------- */
:focus-visible { outline: 2px solid #ffd23f; outline-offset: 1px; }
.icon:focus-visible { outline-offset: 2px; border-radius: 4px; }
.win__btn:focus-visible { outline-offset: -1px; }

@media (max-width: 760px) {
  /* Okna na mobilu: celá šířka, centrovaná, override inline pozice z desktopu */
  .win { left: 2vw !important; top: 6px !important; width: 96vw !important; max-height: calc(100% - 14px); }
  #win-bonzaq, .win--player, .win--explorer, #win-about { width: 96vw !important; }
  .win__body { overflow: auto; }

  .bz__head { gap: 10px; padding: 6px 6px 10px; }
  .bz__logo { width: 68px; height: 68px; }
  .bz__brand { font-size: 24px; }
  .bz__motto { font-size: 12px; }
  /* boot mobil */
  .boot__seal { width: 132px; height: 132px; }
  .boot__logo { width: 116px; height: 116px; }
  .boot__motto { font-size: 22px; }
  #boot .bar { width: 78vw; max-width: 280px; }
  .boot__foot { font-size: 9px; }
  .bz__grid { grid-template-columns: 1fr; }
  .bz__list { max-height: 150px; }
  .bz__card { grid-template-columns: 1fr; justify-items: center; }
  .bz__foto { width: 160px; height: 192px; }
  .bz__pole { width: 100%; grid-template-columns: 96px 1fr; }

  /* Ikony jako mřížka přes celou plochu — klikatelné po zavření/minimalizaci okna */
  #icons {
    left: 0; right: 0; top: 6px;
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 6px 2px; padding: 0 6px;
  }
  .icon { width: auto; }
  .icon__img { width: 40px; height: 40px; }
  .topbar__tag { display: none; }

  /* Title bar na mobilu kompaktnější, ať se vejdou tlačítka */
  .win__bar { height: 30px; }
  .win__btn { width: 24px; height: 24px; }
}
