/* Rylee's farewell card */
:root {
  --ink: #2b2140;
  --ink-soft: #5b4f78;
  --bg1: #fff1c9;
  --bg2: #ffd6e8;
  --bg3: #cfe8ff;
  --pink: #ff4d8d;
  --purple: #7b4dff;
  --teal: #19c3a6;
  --yellow: #ffd23f;
  --card: #fffdf7;
  --radius: 18px;
  --shadow: 0 10px 25px rgba(43, 33, 64, .18);
  --ui: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ui);
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg1), var(--bg2) 50%, var(--bg3));
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 1rem 1rem 3rem; }

a { color: inherit; }

/* Floating emoji backdrop */
.confetti-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.confetti-bg span {
  position: absolute;
  left: calc(var(--i) * 13% + 2%);
  bottom: -60px;
  font-size: calc(1.6rem + (var(--i) * 4px));
  opacity: .5;
  animation: floatUp calc(14s + var(--i) * 2s) linear infinite;
  animation-delay: calc(var(--i) * -3s);
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-115vh) rotate(360deg); }
}

.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

nav.topnav, main, .footer { position: relative; z-index: 1; }

.topnav {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; width: 100%; margin: 0 auto; padding: .9rem 1rem;
}
.topnav .brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.topnav .links { display: flex; gap: .4rem; }
.topnav .links a {
  text-decoration: none; padding: .4rem .9rem; border-radius: 999px; font-weight: 600;
  background: rgba(255,255,255,.55); transition: transform .15s, background .15s;
}
.topnav .links a:hover { transform: translateY(-2px) rotate(-2deg); background: #fff; }
.topnav .links a.active { background: var(--ink); color: #fff; }

.footer { text-align: center; padding: 1.2rem 1rem 2rem; color: var(--ink-soft); font-size: .9rem; }

.eyebrow {
  display: inline-block; margin: 0 0 .6rem; padding: .25rem .8rem; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 1rem var(--ui); text-decoration: none; cursor: pointer;
  padding: .7rem 1.3rem; border-radius: 999px; border: 3px solid var(--ink);
  background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--yellow); }
.btn-ghost { background: #fff; }
.btn-big { font-size: 1.2rem; padding: .9rem 1.7rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 1.5rem; }

/* Landing */
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero-title {
  font-family: "Lobster", var(--ui); font-weight: 400;
  font-size: clamp(3.4rem, 15vw, 9rem); line-height: .95; margin: .3rem 0 1rem;
  text-shadow: 4px 4px 0 rgba(255,255,255,.8);
  animation: bob 4s ease-in-out infinite;
}
.rainbow {
  background: linear-gradient(90deg, #ff4d8d, #ff9f1c, #ffd23f, #19c3a6, #4cc9f0, #7b4dff, #ff4d8d);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; animation: slide 6s linear infinite;
  display: inline-block; padding: 0 .1em .1em;
}
@keyframes slide { to { background-position: 300% 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
.hero-sub { max-width: 34rem; margin: 0 auto; font-size: 1.25rem; color: var(--ink-soft); }
.party-button { margin-top: 2rem; background: none; border: 0; font: 600 1rem var(--ui); color: var(--ink-soft); cursor: pointer; text-decoration: underline; }

/* Board */
.board-wrap { padding-top: 1rem; }
.board-header { text-align: center; padding: 1rem 0 2rem; }
.board-title {
  font-family: "Lobster", var(--ui); font-weight: 400; cursor: pointer;
  font-size: clamp(2.6rem, 11vw, 7rem); line-height: 1.05; margin: .2rem 0 .5rem; user-select: none;
  text-shadow: 3px 3px 0 #fff;
}
.board-title .letter {
  display: inline-block;
  background: linear-gradient(180deg, var(--pink), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  animation: wave 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 90ms);
}
.board-title:hover .letter { animation-duration: .8s; }
@keyframes wave { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-.12em) rotate(-4deg); } }
.board-sub { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }

.board {
  background: var(--card);
  border: 6px solid #fff; outline: 4px dashed rgba(43,33,64,.25); outline-offset: -14px;
  border-radius: 28px; padding: 2.2rem 1.4rem 1.4rem; box-shadow: var(--shadow);
  background-image: radial-gradient(rgba(43,33,64,.08) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  column-width: 250px; column-gap: 1.6rem;
}
@media (max-width: 600px) { .board { padding: 1.4rem .8rem .6rem; column-width: 100%; } }

/* Sticky notes */
.note {
  position: relative; display: inline-block; width: 100%;
  break-inside: avoid; margin: 0 0 1.6rem; padding: 1.5rem 1.2rem 1.1rem;
  border-radius: 4px 4px 14px 4px; box-shadow: 3px 6px 12px rgba(43,33,64,.22);
  transform: rotate(var(--rot, 0deg));
  transition: transform .2s ease, box-shadow .2s ease;
  animation: popIn .5s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: var(--delay, 0ms);
  overflow-wrap: anywhere;
}
.note:hover { transform: rotate(0deg) scale(1.05) translateY(-4px); box-shadow: 6px 14px 22px rgba(43,33,64,.28); z-index: 3; }
.note:target { outline: 4px solid var(--pink); outline-offset: 4px; }
@keyframes popIn { from { opacity: 0; transform: scale(.4) rotate(calc(var(--rot, 0deg) * 4)) translateY(30px); } to { opacity: 1; } }

.note-yellow { background: #fff3a3; }
.note-pink   { background: #ffc2dc; }
.note-mint   { background: #bff3de; }
.note-sky    { background: #bfe3ff; }
.note-peach  { background: #ffd2b0; }
.note-lilac  { background: #dccbff; }

.tape {
  position: absolute; top: -12px; left: 50%; width: 84px; height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255,255,255,.65); border: 1px solid rgba(43,33,64,.1);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.note:nth-child(even) .tape { transform: translateX(-50%) rotate(4deg); }

.note-gif {
  display: block; width: 100%; max-height: 260px; object-fit: cover;
  border-radius: 8px; border: 4px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18);
  margin-bottom: .8rem; background: #fff;
}
.note-message { margin: 0 0 .7rem; font-size: 1.5rem; line-height: 1.3; white-space: pre-wrap; color: var(--ink); }
.note-name { margin: 0; font-size: 1.35rem; text-align: right; color: #43306b; }

/* Per-font size tweaks so wide/tiny fonts stay readable */
[data-font="press-start-2p"].note-message, .note-message[data-font="press-start-2p"] { font-size: .85rem; line-height: 1.7; }
.note-name[data-font="press-start-2p"] { font-size: .8rem; }
.note-message[data-font="fredericka-the-great"], .note-message[data-font="amatic-sc"], .note-message[data-font="bangers"], .note-message[data-font="creepster"] { font-size: 1.8rem; }
.note-message[data-font="great-vibes"], .note-message[data-font="dancing-script"] { font-size: 1.75rem; }
.note-message[data-font="rock-salt"], .note-message[data-font="special-elite"] { font-size: 1.1rem; }

.empty { text-align: center; background: var(--card); border-radius: 28px; padding: 3rem 1rem; box-shadow: var(--shadow); }
.empty-emoji { font-size: 4rem; animation: bob 3s ease-in-out infinite; }

/* Sign page */
.sign { max-width: 880px; margin: 0 auto; }
.page-head { text-align: center; padding: 1rem 0; }
.page-head h1 { font-family: "Lobster", var(--ui); font-weight: 400; font-size: clamp(2.4rem, 8vw, 4.2rem); margin: .2rem 0; }
.lede { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }

.sign-form {
  background: var(--card); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink);
  padding: 1.5rem; display: grid; gap: 1.6rem;
}
.step { display: grid; gap: .5rem; }
.step-label { font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.step-label small { font-weight: 500; color: var(--ink-soft); font-size: .85rem; }
.num {
  display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .4rem; border-radius: 999px;
  background: var(--pink); color: #fff; font-size: 1rem;
}

.sign-form input[type="text"], .sign-form input[type="url"], .sign-form textarea {
  width: 100%; font: 500 1.1rem var(--ui); padding: .8rem 1rem; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; background: #fff; outline: none;
  transition: box-shadow .15s, transform .15s;
}
.sign-form input:focus, .sign-form textarea:focus { box-shadow: 0 0 0 5px rgba(123,77,255,.35); transform: translateY(-1px); }
.sign-form textarea { resize: vertical; }
.counter, .hint { color: var(--ink-soft); }
.counter { text-align: right; }

.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; max-height: 360px; overflow-y: auto; padding: .4rem; border-radius: 14px; background: rgba(43,33,64,.05); }
.font-option { position: relative; cursor: pointer; }
.font-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.font-chip {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 3.6rem; padding: .5rem; font-size: 1.5rem; line-height: 1.1;
  background: #fff; border: 3px solid transparent; border-radius: 12px; box-shadow: 0 2px 0 rgba(43,33,64,.2);
  transition: transform .12s, border-color .12s, background .12s;
}
.font-chip[data-font="press-start-2p"] { font-size: .7rem; }
.font-chip[data-font="fredericka-the-great"], .font-chip[data-font="creepster"] { font-size: 1.3rem; }
.font-chip[data-font="great-vibes"], .font-chip[data-font="amatic-sc"] { font-size: 1.8rem; }
.font-option:hover .font-chip { transform: translateY(-2px) rotate(-1deg); border-color: var(--purple); }
.font-option:has(input:checked) .font-chip { background: var(--yellow); border-color: var(--ink); transform: scale(1.04); box-shadow: 0 4px 0 var(--ink); }
.font-option:has(input:focus-visible) .font-chip { outline: 3px solid var(--purple); outline-offset: 2px; }

.gif-status { margin: 0; min-height: 1.3em; font-size: .95rem; color: var(--ink-soft); }
.gif-status.good { color: #0b8a55; font-weight: 600; }
.gif-status.bad { color: #c2185b; font-weight: 600; }
.gif-preview { text-align: center; }
.gif-preview img { max-width: 100%; max-height: 260px; border: 4px solid #fff; border-radius: 12px; box-shadow: var(--shadow); }

.preview-step .preview-note { max-width: 420px; justify-self: center; width: 100%; }
.preview-note { animation: none; }

.submit-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: center; }
.btn-sign { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.errors { background: #ffe3ea; border: 3px solid #c2185b; border-radius: 14px; padding: .8rem 1.2rem; color: #7a0c3a; }
.errors ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.flash { background: #fff3a3; border: 3px solid var(--ink); border-radius: 14px; padding: .8rem 1rem; text-align: center; font-weight: 600; }

/* Thanks */
.thanks { text-align: center; max-width: 560px; margin: 0 auto; padding: 1.5rem 0; }
.thanks-emoji { font-size: 5rem; animation: bob 2s ease-in-out infinite; }
.thanks-title { font-family: "Lobster", var(--ui); font-weight: 400; font-size: clamp(2.4rem, 9vw, 4rem); margin: .2rem 0; line-height: 1.1; }
.thanks-sub { font-size: 1.2rem; color: var(--ink-soft); }
.thanks-note { max-width: 380px; margin: 2rem auto 0; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Download / export */
.btn-download { background: linear-gradient(135deg, #19c3a6, #4cc9f0); color: #05324a; }
.export-note { margin: 1rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.linkish { background: none; border: 0; padding: 0; font: 600 inherit var(--ui); color: var(--purple); text-decoration: underline; cursor: pointer; }

.export-overlay {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 1rem;
  background: rgba(43, 33, 64, .75); backdrop-filter: blur(4px);
}
.export-overlay[hidden] { display: none; }
.export-modal {
  background: var(--card); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink);
  padding: 1.6rem; width: min(560px, 100%); max-height: 94vh; overflow: auto; text-align: center;
}
.export-modal h2 { margin: .3rem 0; font-family: "Lobster", var(--ui); font-weight: 400; font-size: 2rem; }
.export-modal p { margin: .3rem 0; color: var(--ink-soft); }
.export-spinner { font-size: 3.4rem; animation: spin 1.4s ease-in-out infinite; }
@keyframes spin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }
.export-bar { height: 16px; margin-top: 1rem; border: 3px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.export-bar-fill { height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--pink), var(--pink) 10px, var(--yellow) 10px, var(--yellow) 20px); transition: width .2s; }
.export-result img { max-width: 100%; max-height: 50vh; border: 4px solid #fff; border-radius: 12px; box-shadow: var(--shadow); margin-top: .6rem; }
.export-hint { font-size: .85rem; }

/* While capturing: freeze all motion and give the capture area its own backdrop */
body.capturing .note, body.capturing .note:hover { animation: none !important; transform: rotate(var(--rot, 0deg)) !important; opacity: 1; }
body.capturing .board-title .letter { animation: none !important; transform: none !important; }
body.capturing .confetti-bg { display: none; }
body.capturing #card-capture {
  padding: 1.5rem; margin: 0 auto;
  background: linear-gradient(135deg, var(--bg1), var(--bg2) 50%, var(--bg3));
}
body.capturing [data-no-capture] { display: none !important; }

/* ---------- Trivia game ---------- */
.game { max-width: 760px; margin: 0 auto; display: grid; gap: 1.2rem; }
.game.join { max-width: 560px; }
.join-form { gap: 1.2rem; }
.hint.center, .muted.center { text-align: center; }
.muted { color: var(--ink-soft); margin: .3rem 0; }
.flash.ok { background: #bff3de; }

.screen { display: grid; gap: 1.2rem; }
.panel {
  background: var(--card); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 var(--ink);
  padding: 1.3rem; position: relative;
}
.panel-title { margin: 0 0 .6rem; font-size: 1.4rem; }
.panel-title.small { font-size: 1.05rem; margin-top: 1.2rem; }

.player-chip {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap;
  background: rgba(255,255,255,.8); border: 3px solid var(--ink); border-radius: 999px; padding: .4rem 1rem; font-weight: 600;
}
.score-pill { background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: .1rem .8rem; font-weight: 700; }

.lobby, .finale { text-align: center; }
.big-emoji { font-size: 4.5rem; animation: bob 2.5s ease-in-out infinite; }
.finale .trophy { animation: spin 3s ease-in-out infinite; }
.lobby h2, .finale h2 { font-family: "Lobster", var(--ui); font-weight: 400; font-size: 2.2rem; margin: .2rem 0; }
.winner-names { font-family: "Lobster", var(--ui); font-size: clamp(2rem, 8vw, 3.4rem); margin: .2rem 0; }
.winner-names { background: linear-gradient(90deg, var(--pink), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.your-finish { font-weight: 700; font-size: 1.2rem; }

.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding: 0; margin: .8rem 0; }
.chip { background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: .25rem .9rem; font-weight: 600; animation: popIn .4s cubic-bezier(.2,1.5,.4,1) both; }
.chip.me { background: var(--yellow); }
.chip.answered { background: #bff3de; }

.q-meta { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.q-count { font-weight: 700; color: var(--ink-soft); }
.q-category { background: var(--ink); color: #fff; border-radius: 999px; padding: .1rem .8rem; font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.q-image { border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; background: #fff; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.q-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-image-fallback { font-size: 5rem; }
.q-text { font-size: clamp(1.3rem, 4.5vw, 1.8rem); line-height: 1.25; margin: 1rem 0; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }
.choice-form { display: contents; }
.choice {
  display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; position: relative;
  font: 600 1.05rem var(--ui); color: var(--ink); padding: .8rem 1rem; min-height: 4rem;
  border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); background: #fff; cursor: pointer;
  transition: transform .12s, box-shadow .12s, opacity .2s;
}
button.choice:hover { transform: translateY(-3px) rotate(-.5deg); box-shadow: 0 8px 0 var(--ink); }
button.choice:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.choices-locked .choice { cursor: default; }
.choice-a { background: #ffc2dc; } .choice-b { background: #bfe3ff; } .choice-c { background: #fff3a3; } .choice-d { background: #bff3de; }
.letter-badge { display: grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; }
.choice-text { flex: 1; overflow-wrap: anywhere; }
.mark { font-size: 1.4rem; }
.choice.mine { outline: 5px solid var(--purple); outline-offset: 2px; }
.choice.correct { background: #7ee8a8; animation: pulse 1.2s ease-in-out 2; }
.choice.wrong { background: #ff9aa8; }
.choice.dim:not(.mine):not(.correct) { opacity: .45; }

.status-line { text-align: center; font-weight: 600; margin: 1rem 0 0; color: var(--ink-soft); }
.status-line.locked { color: #0b8a55; }
.result { text-align: center; font-weight: 700; font-size: 1.3rem; margin: 1rem 0 .3rem; }
.result-right { color: #0b8a55; } .result-wrong { color: #c2185b; } .result-none { color: var(--ink-soft); }
.fact { background: #fff3a3; border: 3px dashed var(--ink); border-radius: 14px; padding: .6rem .9rem; margin: .8rem 0 0; }

.leaderboard { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lb-row { display: flex; align-items: center; gap: .8rem; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: .5rem .9rem; font-weight: 600; animation: popIn .4s both; }
.lb-row.rank-1 { background: #ffe680; }
.lb-row.me { outline: 4px solid var(--purple); outline-offset: 1px; }
.lb-rank { width: 2.4rem; text-align: center; font-size: 1.3rem; }
.lb-name { flex: 1; overflow-wrap: anywhere; }
.lb-score { font-size: 1.3rem; font-weight: 700; }
.lb-gap { text-align: center; color: var(--ink-soft); }

/* DM panel */
.dm { max-width: 1200px; margin: 0 auto; }
.dm-grid { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .dm-grid { grid-template-columns: 1fr; } }
.dm-status { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.status-badge { border: 3px solid var(--ink); border-radius: 999px; padding: .2rem 1rem; font-weight: 700; background: #fff; letter-spacing: .06em; }
.status-lobby { background: #bfe3ff; } .status-question { background: #fff3a3; } .status-reveal { background: #bff3de; } .status-finished { background: #ffc2dc; }
.dm-stats { display: flex; gap: 1rem; margin: 1rem 0; }
.stat { flex: 1; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: .6rem; }
.stat-num { font-size: 2.4rem; font-weight: 700; line-height: 1; }
.stat-num small { font-size: 1.2rem; color: var(--ink-soft); }
.stat-label { color: var(--ink-soft); font-weight: 600; }
.dm-answer-hint { background: #fff3a3; border: 3px dashed var(--ink); border-radius: 12px; padding: .5rem .8rem; margin: .8rem 0; }
.dm-buttons { display: grid; gap: .9rem; margin-top: 1rem; }
.dm-buttons form { display: contents; }
.dm-buttons .btn { width: 100%; }
.dm-buttons .btn[disabled] { opacity: .4; cursor: not-allowed; box-shadow: 0 5px 0 var(--ink); transform: none; }
.mirror-label { margin: 0 0 .5rem; font-weight: 700; color: var(--ink-soft); }
.mirror-frame {
  pointer-events: none; user-select: none; border: 6px solid var(--ink); border-radius: 30px; padding: 1rem; background: linear-gradient(135deg, var(--bg1), var(--bg2) 50%, var(--bg3));
  max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow);
}
.mirror-frame .screen { max-width: 640px; margin: 0 auto; }
.mirror-frame .choice.correct { animation: none; }

@media (max-width: 520px) {
  .topnav { flex-wrap: wrap; gap: .4rem; padding: .6rem .8rem; }
  .topnav .brand { font-size: 1.05rem; }
  .topnav .links { gap: .25rem; }
  .topnav .links a { padding: .3rem .65rem; font-size: .9rem; }
}
