/* ============================================================
   akzhan28 — Act 1: official dossier. Act 2: 1999 homepage.
   ============================================================ */
:root {
  --ink: #061421;
  --ink-2: #0b2033;
  --ink-3: #123047;
  --gold: #c9a227;
  --gold-l: #ebcf74;
  --gold-d: #8c6d12;
  --paper: #f1e9d6;
  --paper-dim: rgba(241, 233, 214, 0.62);
  --sky: #2a7fb8;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  /* 1999 */
  --navy: #000080;
  --win: #c0c0c0;
  --win-dark: #808080;
  --win-darker: #404040;
  --win-light: #dfdfdf;
  --lime: #00ff00;
  --yellow: #ffff00;
  --cream: #ffffcc;
  --comic: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold-l); outline-offset: 2px; }
body.phase-act2 :focus-visible { outline: 2px dotted #000; outline-offset: 1px; }

/* ---------- language switch ---------- */
.lang {
  position: fixed; top: max(10px, env(safe-area-inset-top, 0px)); right: 12px; z-index: 50;
  display: flex; gap: 4px;
}
.lang button {
  background: transparent; color: var(--paper-dim); border: 1px solid rgba(201, 162, 39, 0.45);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; padding: 6px 10px;
}
.lang button.on { color: var(--ink); background: var(--gold); border-color: var(--gold); }
body.phase-act2 .lang button {
  font-family: Arial, sans-serif; font-weight: bold; color: #000; background: var(--win);
  border: 2px solid; border-color: #fff var(--win-darker) var(--win-darker) #fff; letter-spacing: 0;
}
body.phase-act2 .lang button.on { background: var(--navy); color: #fff; border-color: var(--win-darker) #fff #fff var(--win-darker); }

/* ---------- shared gold button ---------- */
.btn-gold {
  display: inline-block; background: linear-gradient(180deg, var(--gold-l), var(--gold) 55%, var(--gold-d));
  color: #1a1304; border: 0; padding: 14px 28px; font-family: var(--mono); font-size: 14px;
  letter-spacing: 0.06em; text-transform: none; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 10px 30px rgba(201,162,39,.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 14px 36px rgba(201,162,39,.35); }
.btn-gold--big { font-size: 16px; padding: 16px 34px; }

/* ---------- ornament (қошқар мүйіз) ---------- */
.ornament {
  height: 36px; width: 100%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='72' height='36' viewBox='0 0 72 36'><g fill='none' stroke='%23c9a227' stroke-width='1.6' stroke-linecap='round'><path d='M36 34V15'/><path d='M36 15c0-9-11-11-15-4-3 6 3 12 9 8'/><path d='M36 15c0-9 11-11 15-4 3 6-3 12-9 8'/><path d='M4 34h64' stroke-width='.8' opacity='.5'/></g></svg>");
  background-repeat: repeat-x; background-position: center;
  opacity: .9;
}

/* ============================================================
   GATE
   ============================================================ */
.gate {
  min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(42,127,184,.18), transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(201,162,39,.10), transparent 70%),
    var(--ink);
}
.gate__frame {
  width: min(560px, 100%); text-align: center; padding: 36px 28px 28px;
  border: 1px solid rgba(201,162,39,.35); position: relative;
  animation: gateIn 1.1s ease both;
}
.gate__frame::before, .gate__frame::after {
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201,162,39,.18); pointer-events: none;
}
.gate__kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; color: var(--gold); margin: 18px 0 14px; }
.gate__text { font-size: clamp(20px, 3.4vw, 26px); line-height: 1.35; margin: 0 auto 26px; max-width: 26ch; font-weight: 500; }
.gate__note { font-family: var(--mono); font-size: 12px; color: var(--paper-dim); margin: 18px 0 0; }
@keyframes gateIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============================================================
   ACT 1 — dossier
   ============================================================ */
.act1 {
  min-height: 100vh; min-height: 100svh; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 78% 60%, rgba(201,162,39,.16), transparent 65%),
    radial-gradient(ellipse 80% 60% at 20% 110%, rgba(42,127,184,.14), transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  animation: fadeIn .9s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.act1 .ornament { position: absolute; left: 0; right: 0; }
.act1 .ornament--top { top: 10px; }
.act1 .ornament--bottom { bottom: 10px; transform: scaleY(-1); }

.act1__grid {
  position: relative; z-index: 1; max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: end;
  padding: 72px 24px 64px; min-height: 100vh; min-height: 100svh;
}
.act1__doc { padding-bottom: 24px; max-width: 620px; }
.doc__kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .24em; color: var(--gold); margin: 0 0 14px; }
.doc__title {
  font-weight: 500; font-size: clamp(44px, 7vw, 84px); line-height: .95; margin: 0 0 28px; letter-spacing: -.01em;
}
.doc__title::after { content: ""; display: block; width: 72px; height: 2px; background: var(--gold); margin-top: 22px; }
.doc__lines {
  list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: clamp(13px, 1.5vw, 15.5px);
  line-height: 1.75; color: var(--paper); min-height: 4em;
}
.doc__lines li { opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; }
.doc__lines li.on { opacity: 1; transform: none; }
.doc__lines li::before { content: "▸ "; color: var(--gold); }
.doc__lines li .k { color: var(--paper-dim); }
.doc__lines li.cursor::after { content: "▌"; color: var(--gold); animation: blink 1s steps(1) infinite; }
.doc__lines li.last { color: var(--gold-l); margin-top: .5em; }
.doc__stamps { margin: 22px 0 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.stamp {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: #d9534f;
  border: 2px solid #d9534f; padding: 6px 10px; transform: rotate(-4deg); opacity: 0;
  mix-blend-mode: screen; text-transform: uppercase;
}
.stamp.on { animation: stampIn .35s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-4deg) scale(1.8); } to { opacity: .9; transform: rotate(-4deg) scale(1); } }
.doc__cta { margin-top: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.doc__cta.on { animation: fadeIn .6s ease both; }
.doc__sub { font-family: var(--mono); font-size: 11.5px; color: var(--paper-dim); margin: 0; }
.doc__sig { font-family: var(--mono); font-size: 11px; color: rgba(241,233,214,.4); margin: 26px 0 0; letter-spacing: .08em; }
.act1__skip { position: absolute; left: 24px; bottom: 56px; font-family: var(--mono); font-size: 11px; color: rgba(241,233,214,.45); z-index: 2; }

.act1__photo { margin: 0; position: relative; align-self: end; justify-self: center; }
.act1__photo img {
  height: min(86vh, 860px); width: auto; position: relative; z-index: 1;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.6));
  animation: photoIn 1.6s cubic-bezier(.2,.8,.2,1) both .3s;
}
@keyframes photoIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.act1__photo::before {
  content: ""; position: absolute; inset: 8% -30% -10% -30%;
  background: radial-gradient(ellipse 55% 60% at 50% 55%, rgba(235,207,116,.38), rgba(201,162,39,.12) 45%, transparent 70%);
  filter: blur(10px); z-index: 0;
}
.seal {
  position: absolute; z-index: 2; left: -10px; bottom: 18%; width: 118px; height: 118px; border-radius: 50%;
  border: 2px solid var(--gold); color: var(--gold-l); display: grid; place-content: center; text-align: center;
  background: rgba(6,20,33,.75); backdrop-filter: blur(4px); font-family: var(--mono); transform: rotate(-12deg);
  box-shadow: 0 0 0 6px rgba(6,20,33,.75), 0 0 0 7px rgba(201,162,39,.5);
  animation: sealIn .5s cubic-bezier(.2,1.6,.4,1) both 2.2s;
}
.seal span { font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 600; }
.seal small { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; display: block; margin-top: 4px; }
@keyframes sealIn { from { opacity: 0; transform: rotate(-12deg) scale(2); } to { opacity: 1; transform: rotate(-12deg) scale(1); } }

.act1.glitch { animation: glitch .55s steps(2) both; }
@keyframes glitch {
  0% { filter: none; transform: none; }
  20% { filter: hue-rotate(90deg) saturate(3) contrast(2); transform: translate(-8px, 2px) skewX(3deg); }
  40% { filter: invert(1); transform: translate(10px, -4px); clip-path: inset(10% 0 30% 0); }
  60% { filter: hue-rotate(-120deg) contrast(3); transform: translate(-14px, 6px) skewX(-6deg); clip-path: inset(40% 0 5% 0); }
  80% { filter: grayscale(1) brightness(2); transform: translate(6px, 0); clip-path: none; }
  100% { filter: none; transform: none; }
}

@media (max-width: 820px) {
  .act1__grid { grid-template-columns: 1fr; padding: 64px 18px 56px; align-items: start; }
  .act1__doc { max-width: 100%; position: relative; z-index: 2; padding-bottom: 42vh; }
  .act1__photo { position: absolute; right: -14%; bottom: 0; height: 62vh; z-index: 0; pointer-events: none; }
  .act1__photo img { height: 100%; opacity: .92;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 100%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 100%); }
  .act1__photo::before { inset: 20% -20% -10% -20%; }
  .seal { width: 92px; height: 92px; left: auto; right: 58%; bottom: 10%; }
  .seal span { font-size: 34px; }
  .doc__title { font-size: clamp(40px, 13vw, 64px); }
  .act1__skip { bottom: 40px; }
}

/* ============================================================
   BSOD
   ============================================================ */
.bsod {
  position: fixed; inset: 0; z-index: 80; background: #0000aa; color: #ffffff; cursor: pointer;
  font-family: "Lucida Console", "Perfect DOS VGA 437", "Courier New", monospace; font-size: clamp(13px, 2.1vw, 19px);
  display: grid; place-items: center; padding: 20px;
}
.bsod__inner { max-width: 78ch; width: 100%; line-height: 1.45; }
.bsod__inner p { margin: 0 0 1.2em; white-space: pre-wrap; }
.bsod__title { text-align: center; }
.bsod__title span { background: #aaaaaa; color: #0000aa; padding: 0 .5ch; }
.bsod__press { text-align: center; }
.bsod__press::after { content: ""; }

/* ============================================================
   WIN98 widgets
   ============================================================ */
.win {
  background: var(--win); color: #000; font-family: Arial, "Liberation Sans", sans-serif; font-size: 13px;
  border: 2px solid; border-color: #fff var(--win-darker) var(--win-darker) #fff;
  box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark), 3px 3px 0 rgba(0,0,0,.35);
  padding: 3px;
}
.win__title {
  background: linear-gradient(90deg, var(--navy), #1084d0); color: #fff; font-weight: bold; font-size: 13px;
  padding: 3px 4px 3px 6px; display: flex; align-items: center; gap: 8px;
}
.win__title .ttl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win__btns { display: flex; gap: 2px; }
.win__btns b {
  width: 16px; height: 14px; background: var(--win); color: #000; font-size: 10px; line-height: 12px; text-align: center;
  border: 1px solid; border-color: #fff var(--win-darker) var(--win-darker) #fff; font-family: "Marlett", Arial, sans-serif;
}
.win__body { padding: 12px; }
.btn98 {
  background: var(--win); color: #000; font-family: Arial, sans-serif; font-size: 13px; padding: 5px 14px; min-width: 76px;
  border: 2px solid; border-color: #fff var(--win-darker) var(--win-darker) #fff;
  box-shadow: inset 1px 1px var(--win-light), inset -1px -1px var(--win-dark);
}
.btn98:active { border-color: var(--win-darker) #fff #fff var(--win-darker); box-shadow: none; }
.btn98:disabled { color: var(--win-dark); text-shadow: 1px 1px #fff; cursor: default; }
.in98 {
  background: #fff; border: 2px solid; border-color: var(--win-dark) #fff #fff var(--win-dark); font: 14px Arial, sans-serif;
  padding: 6px 8px; width: 100%; color: #000;
}
.in98:focus { outline: 1px dotted #000; outline-offset: -4px; }
.progress { height: 20px; border: 2px solid; border-color: var(--win-dark) #fff #fff var(--win-dark); background: #fff; padding: 2px; }
.progress__bar { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--navy) 0 10px, transparent 10px 13px); transition: width .25s steps(4); }
.loader { position: fixed; inset: 0; z-index: 80; background: #008080; display: grid; place-items: center; padding: 20px; }
.loader .win { width: min(420px, 100%); }
.loader .win__body p { margin: 0 0 10px; font-size: 12px; }

/* ============================================================
   ACT 2 — 1999 homepage
   ============================================================ */
body.phase-act2 {
  background-color: #000033;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><rect width='160' height='160' fill='%23000033'/><g fill='%23ffffff'><circle cx='12' cy='22' r='1.2'/><circle cx='58' cy='9' r='.8'/><circle cx='101' cy='31' r='1.4'/><circle cx='140' cy='14' r='.9'/><circle cx='33' cy='70' r='.9'/><circle cx='84' cy='64' r='1.1'/><circle cx='125' cy='88' r='.7'/><circle cx='150' cy='60' r='1.3'/><circle cx='18' cy='118' r='1'/><circle cx='66' cy='131' r='1.3'/><circle cx='109' cy='150' r='.8'/><circle cx='144' cy='122' r='1'/><circle cx='47' cy='40' r='.6'/><circle cx='92' cy='105' r='.6'/></g><g fill='%23ffff00'><circle cx='75' cy='88' r='1'/><circle cx='130' cy='140' r='.9'/></g><g fill='%2300ffff'><circle cx='26' cy='148' r='.9'/><circle cx='118' cy='8' r='.8'/></g></svg>");
  color: #000; font-family: var(--comic);
  padding-bottom: 86px;
}
.act2 { animation: fadeIn .4s ease both; }
.marquee {
  background: #000; color: var(--lime); font-family: var(--comic); font-weight: bold; font-size: 15px;
  white-space: nowrap; overflow: hidden; border-bottom: 3px ridge var(--yellow); padding: 6px 0;
}
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 38s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.page { max-width: 880px; margin: 0 auto; padding: 14px 10px 30px; }

.hero {
  background: var(--cream); border: 4px ridge #ff00ff; padding: 16px 14px 10px; text-align: center; position: relative;
}
.glitter {
  font-family: var(--comic); font-size: clamp(22px, 5.5vw, 42px); line-height: 1.1; margin: 0 0 8px;
  background: linear-gradient(90deg, #ff0000, #ff9900, #ffff00, #33cc33, #0099ff, #cc00cc, #ff0000);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: glitter 4s linear infinite; text-shadow: none; filter: drop-shadow(2px 2px 0 #00000055);
}
@keyframes glitter { to { background-position: 300% 0; } }
.hero__sub { margin: 0 0 14px; font-size: 14px; color: #800080; }
.blink { animation: blink 1s steps(1) infinite; color: #ff0000; font-weight: bold; }
@keyframes blink { 50% { opacity: 0; } }
.hero__photo { position: relative; width: min(300px, 70vw); margin: 6px auto 10px; }
.spin-photo { width: 100%; animation: wobble 6s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
@keyframes wobble { 0%,100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.03); } }
.sparkles, .sparkles::before, .sparkles::after {
  content: ""; position: absolute; pointer-events: none; inset: 0;
  background-image:
    radial-gradient(circle, #fff 0 2px, transparent 3px),
    radial-gradient(circle, #ffff00 0 1.6px, transparent 2.6px),
    radial-gradient(circle, #ff66ff 0 1.5px, transparent 2.5px);
  background-size: 90px 90px, 70px 70px, 110px 110px;
  background-position: 10px 20px, 40px 60px, 0 0; animation: twinkle 1.6s steps(2) infinite;
}
.sparkles::before { animation-delay: .5s; background-position: 50px 10px, 0 30px, 60px 70px; }
.sparkles::after { animation-delay: 1s; background-position: 25px 75px, 60px 0, 30px 40px; }
@keyframes twinkle { 50% { opacity: 0; } }
.hero__age { font-size: 20px; color: var(--navy); font-weight: bold; margin: 4px 0 10px; }
.age {
  display: inline-block; font-family: Impact, "Arial Black", sans-serif; font-size: 64px; line-height: 1; margin: 0 8px;
  color: #ff0000; -webkit-text-stroke: 2px #ffff00; text-shadow: 4px 4px 0 #000080; vertical-align: middle;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.12) rotate(-4deg); } }
.hero__tools { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; align-items: center; margin: 8px 0 6px; }
.counter { font-size: 13px; font-family: Verdana, sans-serif; color: #000; }
.lcd {
  display: inline-block; background: #000; color: var(--lime); font-family: "Courier New", monospace; font-weight: bold;
  padding: 2px 6px; letter-spacing: 2px; border: 2px inset #808080; font-size: 15px;
}
hr.rainbow { border: 0; height: 6px; margin: 12px 0 2px;
  background: linear-gradient(90deg, #f00, #f90, #ff0, #0c0, #09f, #60c, #f0c); }

.nav98 { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; background: #000; padding: 8px; margin: 6px 0 10px; border: 2px outset #808080; font-size: 14px; }
.nav98 a { color: var(--yellow); text-decoration: underline; }
.nav98 a:visited { color: #ff99ff; }
.nav98 a:hover { color: #fff; background: #ff00ff; text-decoration: none; }

.block { margin: 14px 0; }
.sec {
  background: #fff; border: 3px outset #c0c0c0; padding: 0 0 12px;
}
.sec > h2 {
  margin: 0 0 12px; padding: 8px 12px; font-family: "Arial Black", Impact, sans-serif; font-size: 20px; letter-spacing: .02em;
  background: linear-gradient(90deg, #800000, #ff0000); color: #ffff00; text-shadow: 2px 2px 0 #000;
}
.sec__inner { padding: 0 12px; }
.sec table { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 14px; }
.sec td, .sec th { border: 1px solid #808080; padding: 6px 8px; vertical-align: top; text-align: left; }
.sec th { background: #000080; color: #fff; width: 32%; font-weight: bold; }
.sec tr:nth-child(odd) td { background: var(--cream); }
.sec tr:nth-child(even) td { background: #e6ffe6; }
.sec a { color: #0000ff; }

.skill { display: grid; grid-template-columns: 44% 1fr; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0; }
.skill .bar { height: 18px; background: #fff; border: 2px inset #808080; position: relative; overflow: hidden; }
.skill .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(90deg, #0000ff 0 8px, #00ccff 8px 10px); transition: width 1.2s ease; }
.skill .bar.over i { background: repeating-linear-gradient(90deg, #ff0000 0 8px, #ffff00 8px 10px); }
.skill small { display: block; color: #800080; font-size: 11px; }

.diploma {
  margin: 0 12px; border: 10px double #b8860b; background: #fdf6dc; padding: 22px 18px; text-align: center; position: relative;
  font-family: "Times New Roman", serif; color: #3b2a0a;
}
.diploma h3 { font-family: "Monotype Corsiva", "Brush Script MT", var(--serif); font-style: italic; font-size: 36px; margin: 0 0 10px; color: #8b0000; }
.diploma p { font-size: 16px; line-height: 1.5; margin: 0; }
.diploma .dstamp {
  position: absolute; right: 12px; bottom: 10px; transform: rotate(-14deg); border: 3px solid #c00; color: #c00;
  font: bold 13px Arial, sans-serif; padding: 4px 8px; letter-spacing: .1em; opacity: .85; border-radius: 4px;
}

.report { margin: 0 12px; border: 2px solid #006400; background: #f3fff3; padding: 12px; font-family: "Times New Roman", serif; }
.report h3 { margin: 0 0 4px; font-size: 20px; text-align: center; text-decoration: underline; }
.report .rsub { text-align: center; margin: 0 0 10px; font-size: 14px; font-style: italic; }
.report table { font-family: "Times New Roman", serif; }
.report td:last-child { color: #c00; font-weight: bold; font-family: "Comic Sans MS", "Comic Neue", cursive; }
.report .sign { text-align: right; margin: 10px 0 0; font-style: italic; }

/* poll */
.poll__opt { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-size: 15px; cursor: pointer; }
.poll__opt input { width: 16px; height: 16px; margin: 0; }
.poll__res { margin: 6px 0; }
.poll__row { display: grid; grid-template-columns: 1fr 64px; gap: 8px; align-items: center; margin: 6px 0; font-size: 14px; }
.poll__row .pbar { height: 14px; background: #fff; border: 2px inset #808080; }
.poll__row .pbar i { display: block; height: 100%; width: 0; background: #008000; transition: width .8s ease; }
.poll__row.mine .pbar i { background: #ff00ff; }
.poll__row b { text-align: right; }
.poll__total { font-size: 12px; color: #555; margin: 8px 0 0; }

/* quiz */
.quiz__q { font-size: 16px; font-weight: bold; margin: 0 0 10px; }
.quiz__a { display: grid; gap: 6px; }
.quiz__a .btn98 { text-align: left; padding: 8px 12px; }
.quiz__a .btn98.ok { background: #c6f5c6; }
.quiz__a .btn98.bad { background: #f5c6c6; }
.quiz__meta { font-size: 12px; color: #555; margin: 0 0 8px; }
.quiz__res { font-size: 15px; line-height: 1.45; }
.quiz__res .big { font: bold 28px "Arial Black", Impact, sans-serif; color: #ff0000; text-shadow: 2px 2px #000080; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ICQ */
.icq .win__title .ttl { display: flex; align-items: center; gap: 6px; }
.icq__flower { width: 16px; height: 16px; flex: none; }
.icq__status { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 0 0 8px; }
.icq__status i { width: 10px; height: 10px; border-radius: 50%; background: #39c13d; box-shadow: 0 0 0 1px #0a6; display: inline-block; }
.icq__log {
  background: #fff; border: 2px solid; border-color: var(--win-dark) #fff #fff var(--win-dark); height: 300px; overflow-y: auto;
  padding: 8px; font: 13px/1.45 Verdana, Arial, sans-serif; word-break: break-word;
}
.icq__log .m { margin: 0 0 7px; }
.icq__log .m b { color: #c00; }
.icq__log .m.me b { color: #00c; }
.icq__log .m .t { color: #777; font-size: 11px; }
.icq__log .m.new { animation: msgIn .4s ease both; }
@keyframes msgIn { from { background: #ffffa0; } to { background: transparent; } }
.icq__form { display: grid; grid-template-columns: 140px 1fr; gap: 6px; margin-top: 8px; }
.icq__form textarea { grid-column: 1 / -1; resize: vertical; min-height: 64px; }
.icq__bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.icq__hint { font-size: 11px; color: #555; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 480px) { .icq__form { grid-template-columns: 1fr; } }

/* notepad letter */
.notepad .win__body { background: #fff; margin: 0; padding: 0; }
.notepad__menu { background: var(--win); font-size: 12px; padding: 2px 6px; display: flex; gap: 12px; }
.notepad__menu span:first-letter { text-decoration: underline; }
.notepad__text { font: 15px/1.6 "Courier New", monospace; padding: 14px; color: #000; min-height: 160px; }

/* footer */
.footer { text-align: center; color: #fff; font-size: 13px; padding: 10px 0 20px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.badge {
  width: 88px; height: 31px; display: grid; place-items: center; font: bold 9px/1.1 Arial, sans-serif; text-align: center;
  border: 1px solid #000; padding: 2px; letter-spacing: .02em;
}
.badge--ns { background: linear-gradient(180deg, #2c5ca8, #0b2b63); color: #fff; }
.badge--res { background: #000; color: var(--lime); font-family: "Courier New", monospace; }
.badge--np { background: #fff; color: #000; border-color: #808080; }
.badge--ie { background: linear-gradient(180deg, #ffffff, #c6d8f0); color: #0a3d91; }
.construction {
  background: repeating-linear-gradient(135deg, #ffcc00 0 14px, #000 14px 28px); color: #000; font-weight: bold;
  margin: 12px 0; padding: 4px;
}
.construction span { background: #ffcc00; display: inline-block; padding: 4px 10px; font-size: 13px; }
.footer a { color: #ffff00; }
.footer .attr { font-size: 11px; color: #aab; margin-top: 10px; }
.footer .attr a { color: #aab; }

/* player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #232323; color: #00ff00;
  border-top: 2px solid #555; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px;
  font: 12px "Courier New", monospace;
}
.player__led { flex: 1; min-width: 0; background: #000; border: 2px inset #555; padding: 4px 6px; overflow: hidden; white-space: nowrap; }
.player__led span { display: inline-block; animation: marquee 16s linear infinite; padding-left: 100%; }
.player button { background: var(--win); border: 2px outset #fff; width: 44px; height: 32px; font-size: 14px; color: #000; }
.player input[type=range] { width: 90px; accent-color: #00ff00; }
.player .eq { display: flex; gap: 2px; align-items: flex-end; height: 22px; }
.player .eq i { width: 4px; background: #00ff00; animation: eq .6s ease-in-out infinite alternate; }
.player .eq i:nth-child(2) { animation-delay: .15s; } .player .eq i:nth-child(3) { animation-delay: .3s; } .player .eq i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
.player.paused .eq i { animation-play-state: paused; height: 15%; }
@media (max-width: 480px) { .player input[type=range] { width: 60px; } .player .eq { display: none; } }

/* toast + dialog */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); z-index: 70; opacity: 0;
  transition: .25s; pointer-events: none; max-width: min(92vw, 420px);
}
.toast.on { opacity: 1; transform: translateX(-50%); }
.toast .win__body { padding: 10px 14px; font-size: 13px; }
.dialog-bg { position: fixed; inset: 0; z-index: 75; background: rgba(0,0,0,.35); display: grid; place-items: center; padding: 16px; }
.dialog { width: min(380px, 100%); }
.dialog .win__body { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; font-size: 13px; }
.dialog .ico { font-size: 32px; line-height: 1; }
.dialog .row-btns { grid-column: 1 / -1; justify-content: center; margin-top: 6px; }

/* ---------- motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  .spin-photo, .age, .marquee span, .player__led span, .glitter, .sparkles, .sparkles::before, .sparkles::after, .blink { animation: none !important; }
  .act1.glitch { animation: none; }
}
