:root {
  color-scheme: light;
  --bg: #f7f6fb;
  --paper: #fff;
  --ink: #1d1831;
  --muted: #645e76;
  --line: #e8e3f2;
  --purple: #6f46ee;
  --purple-dark: #5830d4;
  --lavender: #eee8ff;
  --mint: #b6ffd9;
  --radius: 23px;
  font-family: "Inter", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #916fff; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.048em; line-height: 1.08; overflow-wrap: anywhere; }
p { line-height: 1.55; }
a { color: inherit; }
.icon { flex: 0 0 auto; width: 19px; height: 19px; vertical-align: middle; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 1184px; min-height: 74px; margin: auto; padding: 10px 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; border: 0; color: var(--ink); padding: 0; background: transparent; font-size: 23px; font-weight: 850; letter-spacing: -.06em; }
.brand img { width: 36px; height: 36px; }
.brand-dot { color: var(--purple); }
.header-actions { display: flex; align-items: center; justify-content: end; gap: 8px; min-width: 0; }
.btn, .icon-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; font-weight: 730; text-decoration: none; }
.btn { gap: 9px; min-height: 43px; border-radius: 11px; padding: 9px 15px; font-size: 14px; line-height: 1.25; }
.btn:hover:not(:disabled), .icon-btn:hover:not(:disabled) { filter: brightness(.96); }
.primary { background: var(--purple); color: #fff; }
.primary:hover:not(:disabled) { background: var(--purple-dark); }
.outline { background: #fff; border-color: #ded7ee; color: #332655; }
.plain { background: transparent; color: var(--purple-dark); }
.white { color: #402891; background: #fff; }
.glass { color: #fff; border-color: #ffffff60; background: #ffffff16; }
.icon-btn { width: 43px; height: 43px; border-color: var(--line); border-radius: 11px; padding: 0; background: #fff; color: #4f446c; }
.muted { color: var(--muted); }
.kicker { color: #64518d; font-size: 11px; font-weight: 850; letter-spacing: .14em; line-height: 1.3; }
.live-dot { display: inline-block; background: #18a875; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.dashboard, .editor, .game-page { max-width: 1184px; margin: 0 auto; padding: 30px 28px 24px; }
.hero { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; overflow: hidden; min-height: 354px; isolation: isolate; border-radius: 27px; background: radial-gradient(ellipse at 83% 8%, #8b62ff 0%, transparent 57%), linear-gradient(125deg, #321c82 0%, #4a29a9 61%, #683be7 100%); color: #fff; }
.hero-copy { z-index: 1; padding: 43px 48px; }
.eyebrow { display: inline-flex; align-items: center; gap: 3px; padding: 8px 11px; border: 1px solid #ffffff38; border-radius: 999px; background: #ffffff13; color: #f5f0ff; font-size: 10px; font-weight: 800; letter-spacing: .115em; }
.eyebrow .live-dot { background: var(--mint); }
.hero h1 { margin: 17px 0 13px; font-size: clamp(42px, 6vw, 76px); line-height: .97; letter-spacing: -.072em; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero p { max-width: 360px; color: #ede7ff; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.hero-actions .btn { padding: 11px 16px; min-height: 46px; }
.hero-art { position: relative; height: 100%; min-height: 305px; }
.art-orbit { position: absolute; border-radius: 50%; border: 1px solid #ffffff25; aspect-ratio: 1; width: min(31vw, 340px); left: 43%; top: 49%; transform: translate(-50%, -50%); }
.art-orbit.two { width: min(37vw, 410px); }
.art-tile { position: absolute; display: grid; place-items: center; width: clamp(74px, 10vw, 128px); aspect-ratio: 1; border-radius: 25%; font-size: clamp(37px, 5vw, 62px); box-shadow: 0 17px 28px #22125c65, inset 0 -7px 0 #16093530; }
.tile-one { top: 19%; left: 17%; transform: rotate(-16deg); color: #6f1d50; background: #ff8dbe; z-index: 1; }
.tile-two { top: 16%; left: 51%; transform: rotate(13deg); color: #342680; background: #c8b6ff; }
.tile-three { top: 52%; left: 23%; transform: rotate(-8deg); color: #116b50; background: #b0f5d8; }
.tile-four { top: 53%; left: 56%; transform: rotate(17deg); color: #824b07; background: #ffd579; z-index: 1; }
.star { position: absolute; color: #e9dbff; font-size: 33px; }
.star-one { top: 15%; left: 81%; }
.star-two { top: 65%; left: 7%; font-size: 22px; }
.star-three { bottom: 9%; left: 82%; font-size: 20px; }
.library { margin-top: 37px; }
.section-head, .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head { margin-bottom: 17px; }
.section-head h2 { font-size: clamp(27px, 4vw, 37px); margin-top: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }
.quiz-card, .new-card, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px #25144408; }
.quiz-card { display: flex; flex-direction: column; overflow: hidden; }
.quiz-card-art { position: relative; display: flex; align-items: flex-start; min-height: 94px; overflow: hidden; padding: 13px; }
.demo-art { background: linear-gradient(105deg, #dfd4ff, #f2eaff); color: #6244b2; }
.saved-art { background: linear-gradient(105deg, #c7f7df, #ebfff3); color: #24745a; }
.card-label { z-index: 1; border-radius: 8px; padding: 6px 8px; background: #ffffffb8; font-size: 9px; letter-spacing: .1em; font-weight: 850; }
.card-decoration { display: flex; align-items: center; gap: 8px; position: absolute; right: 13px; bottom: 3px; font-size: 46px; line-height: 1; transform: rotate(-13deg); opacity: .72; }
.card-decoration b:nth-child(2) { opacity: .63; }
.card-decoration b:nth-child(3) { opacity: .36; }
.card-decoration .icon { width: 81px; height: 81px; opacity: .48; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 15px; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.meta .icon { width: 13px; height: 13px; }
.card-body h3 { flex: 1; margin: 8px 0 15px; font-size: 22px; }
.card-actions { display: flex; align-items: center; gap: 7px; }
.card-actions .primary { padding-inline: 11px; white-space: nowrap; }
.card-actions .icon-btn { width: 38px; flex: 0 0 auto; }
.new-card { display: grid; min-height: 218px; place-content: center; justify-items: center; gap: 8px; text-align: center; color: var(--ink); border-style: dashed; background: #faf9ff; }
.new-card:hover { background: #f1ecff; }
.new-card span { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: var(--purple-dark); background: var(--lavender); }
.new-card strong { margin-top: 4px; }
.new-card small { color: var(--muted); }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 20px 0 1px; margin-top: 35px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer span:first-child { font-weight: 850; color: #4e3b75; }

.editor-top { margin-bottom: 21px; }
.editor-top .plain { padding-left: 0; margin-bottom: 8px; }
.editor h1, .lobby-title h1 { margin: 6px 0 17px; font-size: clamp(35px, 5vw, 54px); }
label, .title-label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 760; }
.field { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 11px 12px; color: var(--ink); background: #fbfaff; border: 1px solid #ddd6ec; border-radius: 11px; }
.field::placeholder, .answer-input::placeholder { color: #736c86; opacity: 1; }
.title-input { max-width: 625px; background: #fff; font-size: 17px; }
.editor-layout { display: grid; grid-template-columns: minmax(190px, .32fr) minmax(0, 1fr); gap: 17px; align-items: start; }
.editor-sidebar { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 13px; min-width: 0; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; margin: 3px 4px 12px; }
.sidebar-head span { color: var(--purple-dark); background: var(--lavender); padding: 3px 9px; border-radius: 14px; font-size: 12px; font-weight: 800; }
.question-list { display: grid; gap: 5px; margin-bottom: 11px; max-height: 460px; overflow-y: auto; }
.question-nav { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; text-align: left; min-height: 42px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px; }
.question-nav.selected { background: var(--lavender); color: #43269a; border-color: #d9ccff; }
.question-nav span { min-width: 23px; font-size: 11px; font-weight: 850; }
.question-nav strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.editor-sidebar > .btn { width: 100%; }
.editor-panel { padding: clamp(16px, 3vw, 29px); }
.editor-panel .panel-head { margin-bottom: 23px; }
.panel h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 4px; }
.inline-tools { display: flex; gap: 4px; }
.inline-tools .icon-btn { width: 33px; height: 35px; }
.editor textarea { min-height: 85px; resize: vertical; }
.editor-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 15px; }
.editor-settings .field { margin-top: 6px; }
.answer-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; margin: 17px 0 9px; }
.answer-heading small { color: var(--muted); }
.editor-answers, .answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.editor-answer, .answer-tile { --tile: #ffe5ef; --tile-edge: #f4b7d0; --symbol: #a72b61; background: var(--tile); border: 1px solid var(--tile-edge); color: #211733; }
.answer-1 { --tile: #ebe4ff; --tile-edge: #cfbfff; --symbol: #6035c8; }
.answer-2 { --tile: #dff9ec; --tile-edge: #b7e9d1; --symbol: #117854; }
.answer-3 { --tile: #ffefcf; --tile-edge: #f3d49a; --symbol: #945509; }
.editor-answer { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px; border-radius: 12px; }
.answer-symbol { display: grid; flex: 0 0 auto; place-items: center; width: 34px; aspect-ratio: 1; border-radius: 9px; background: #ffffff90; color: var(--symbol); font-size: 18px; line-height: 1; }
.answer-input { flex: 1; width: 0; min-width: 0; padding: 8px 4px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); }
.mark-answer, .editor-answer .icon-btn { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #ffffffac; border-radius: 8px; padding: 0; background: #ffffff84; color: #604e6b; }
.mark-answer.marked { color: #fff; background: #14835b; border-color: #14835b; }
.editor-answer .icon-btn { width: 27px; }
.editor-answer .icon-btn .icon { width: 14px; height: 14px; }
.editor-panel .btn.plain { margin: 7px 0 0; padding-left: 0; }
.form-error { margin-top: 10px; color: #a42651; font-size: 14px; font-weight: 700; }

.join-page { display: grid; place-items: start center; padding: clamp(27px, 8vh, 76px) 17px 28px; }
.join-box, .message-box { width: min(100%, 440px); padding: clamp(21px, 5vw, 37px); }
.join-mark, .wait-icon, .rank-icon { display: grid; place-items: center; width: 53px; height: 53px; margin-bottom: 15px; border-radius: 16px; color: var(--purple-dark); background: var(--lavender); }
.join-mark .icon, .wait-icon .icon, .rank-icon .icon { width: 25px; height: 25px; }
.join-box h1, .wait-card h1, .rank-panel h1, .message-box h1 { margin: 6px 0 8px; font-size: clamp(32px, 7vw, 47px); }
.join-box p, .wait-card p, .message-box p { color: var(--muted); }
.join-box p.form-error { color: #a42651; }
.join-box form { margin-top: 23px; }
.join-box label { margin-top: 13px; }
.join-submit { margin-top: 16px; width: 100%; min-height: 49px; }
.pin-preview { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #e5ddfa; border-radius: 11px; color: #4b2d9b; background: #f5f0ff; }
.pin-preview span, .invite-pin span { font-size: 10px; letter-spacing: .12em; font-weight: 850; }
.pin-preview strong, .invite-pin strong, .qr-dialog strong { font-variant-numeric: tabular-nums; letter-spacing: .065em; }
.text-button { border: 0; padding: 7px 0; margin-left: auto; color: var(--purple-dark); background: transparent; text-decoration: underline; }
.message-box .btn { margin-top: 14px; }

.host-badge, .player-badge, .pill, .count-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 7px 10px; color: #4b2b9d; background: var(--lavender); font-size: 12px; font-weight: 800; }
.host-badge { font-size: 10px; letter-spacing: .09em; }
.player-badge { max-width: 100%; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-title { margin: 6px 0 22px; }
.lobby-title h1 { margin-bottom: 8px; }
.lobby-title p { color: var(--muted); }
.lobby-grid { display: grid; grid-template-columns: minmax(265px, .76fr) minmax(0, 1fr); gap: 17px; }
.invite-panel, .players-panel { display: flex; flex-direction: column; gap: 16px; padding: clamp(18px, 3vw, 27px); }
.qr-button { align-self: center; display: block; width: min(100%, 232px); border: 1px solid var(--line); padding: 5px; background: #fff; border-radius: 13px; }
.qr-button svg, .qr-large svg { display: block; width: 100%; }
.invite-pin { display: grid; gap: 3px; text-align: center; color: #4d30a0; }
.invite-pin strong { font-size: 33px; font-weight: 880; }
.invite-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; }
.players-panel { min-height: 330px; }
.count-pill { gap: 6px; padding: 8px 10px; }
.count-pill .icon { width: 15px; height: 15px; }
.empty-players { flex: 1; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 19px 0; text-align: center; color: var(--muted); }
.empty-players > span { display: grid; place-items: center; width: 48px; height: 48px; background: #f2eefb; color: var(--purple-dark); border-radius: 15px; margin-bottom: 6px; }
.empty-players h3 { color: var(--ink); font-size: 20px; }
.player-chips { flex: 1; align-content: start; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.player-chips li { display: flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; min-height: 43px; padding: 5px 9px 5px 6px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaff; font-size: 14px; }
.player-chips strong { overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; background: #eedfff; color: #633bb9; font-weight: 850; }
.tint-1 { background: #dbfae9; color: #226b52; }
.tint-2 { background: #ffe0ee; color: #922c5c; }
.tint-3 { background: #fff0cd; color: #864e13; }
.lobby-footer { display: flex; justify-content: end; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.qr-dialog { width: min(92vw, 550px); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: 0 25px 80px #190a4460; }
.qr-dialog::backdrop { background: #2217409c; }
.qr-dialog form { display: flex; justify-content: end; margin-bottom: 9px; }
.qr-dialog strong { font-size: 31px; color: var(--purple-dark); }
.qr-large { margin: 0 auto; width: min(100%, 55vh, 440px); }

.wait-card { text-align: center; max-width: 570px; padding: clamp(20px, 6vw, 56px); margin: 20px auto; }
.wait-icon { margin: 0 auto 17px; background: #d9fae9; color: #198660; }
.waiting-title { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; margin-top: 20px; padding: 7px 11px; border-radius: 999px; background: #f0ebfc; color: #4c3585; font-weight: 750; overflow-wrap: anywhere; }
.question-panel { padding: clamp(15px, 4vw, 36px); }
.question-status { display: flex; justify-content: space-between; align-items: center; gap: 9px; min-height: 37px; }
.clock { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; min-width: 64px; padding: 6px 10px; color: #5633b3; background: #f0eaff; font-variant-numeric: tabular-nums; }
.clock-low { color: #a12652; background: #ffe5ee; }
.time-track { height: 6px; overflow: hidden; background: #eee9f7; border-radius: 20px; margin: 10px 0 15px; }
#time-bar { width: 100%; height: 100%; background: var(--purple); transform-origin: left; }
.question-panel h1 { margin: 18px 0; font-size: clamp(25px, 5vw, 53px); line-height: 1.13; }
.answer-tile { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 87px; padding: 13px; border-radius: 15px; font-size: clamp(16px, 3vw, 26px); font-weight: 800; text-align: left; overflow-wrap: anywhere; }
.answer-tile .answer-symbol { width: 43px; font-size: 22px; }
button.answer-tile { box-shadow: inset 0 -4px 0 #21173320; }
button.answer-tile:hover:not(:disabled) { filter: saturate(1.4); }
button.answer-tile:active { transform: translateY(1px); }
.answer-tile.chosen { outline: 3px solid var(--purple); outline-offset: -3px; }
.answer-tile.is-correct { border-color: #2b9e76; background: #dbf9e8; }
.answer-tile.is-dim { filter: grayscale(.6); }
.tile-indicator { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.tile-indicator small { padding: 2px 6px; border-radius: 9px; background: #ffffffa9; }
.tile-indicator .icon { color: #137f54; }
.question-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; font-size: 14px; }
.response-count { color: var(--muted); }
.response-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-bottom: 11px; padding: 9px 11px; border-radius: 9px; font-size: 14px; }
.feedback-good { background: #e2f9eb; color: #176946; }
.feedback-plain { background: #f2edf9; color: #4f3973; }
.player-page { max-width: 685px; }
.player-page .answer-tile { font-size: clamp(15px, 3.5vw, 20px); }
.player-page .question-panel h1 { font-size: clamp(23px, 5vw, 35px); }
.rank-panel { text-align: center; max-width: 720px; margin: 0 auto; padding: clamp(18px, 4vw, 32px); }
.rank-icon { margin: 0 auto 14px; background: #fff0d0; color: #96600a; }
.rank-panel > .btn { margin-top: 17px; }
.ranking-list { display: grid; gap: 6px; padding: 0; margin: 15px 0 0; list-style: none; text-align: left; }
.ranking-list:empty { display: none; }
.ranking-list li { display: grid; grid-template-columns: 27px 1fr auto; gap: 9px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; }
.ranking-list li strong { overflow-wrap: anywhere; }
.rank-no { padding: 3px; border-radius: 6px; color: #5e36bd; background: var(--lavender); text-align: center; font-weight: 830; }
.my-rank { display: grid; gap: 3px; width: fit-content; margin: 15px auto 10px; padding: 12px 19px; border-radius: 12px; color: #522dba; background: var(--lavender); }
.my-rank strong { font-size: 20px; }
.podium { display: flex; align-items: end; justify-content: center; gap: 5px; margin: 19px 0 12px; }
.podium-place { width: 30%; min-width: 0; }
.place-1 { order: 2; }
.place-2 { order: 1; }
.place-3 { order: 3; }
.podium-person { display: grid; gap: 2px; margin-bottom: 5px; overflow-wrap: anywhere; }
.podium-person small { color: var(--muted); }
.podium-step { display: grid; place-items: center; border-radius: 10px 10px 0 0; background: #e5dbff; color: #5835a5; min-height: 60px; font-weight: 880; font-size: 23px; }
.place-1 .podium-step { background: #ffdf90; color: #70430a; min-height: 93px; }
.place-2 .podium-step { min-height: 76px; }
.place-3 .podium-step { background: #f8dfed; color: #77335a; }
.loading, .connection { margin-bottom: 12px; padding: 11px 14px; border-radius: 11px; background: #f1ecff; color: #5231a8; font-weight: 730; }
.notice { position: fixed; z-index: 20; right: 16px; bottom: 16px; max-width: min(calc(100vw - 32px), 430px); padding: 12px 15px; color: #fff; border-radius: 11px; background: #33235f; box-shadow: 0 8px 25px #1c103b30; font-size: 14px; }
.notice.error { background: #871b49; }
@media (max-width: 780px) {
  .hero-copy { padding: 32px 29px; }
  .hero { min-height: 310px; }
  .editor-answers { grid-template-columns: 1fr; }
}
@media (max-width: 570px) {
  .header-inner { padding: 10px 14px; min-height: 62px; }
  .brand { font-size: 19px; gap: 6px; }
  .brand img { width: 30px; height: 30px; }
  .header-actions .btn { padding-inline: 9px; min-height: 38px; font-size: 12px; }
  .header-actions .btn .icon { width: 15px; height: 15px; }
  .dashboard, .editor, .game-page { padding: 17px 13px; }
  .hero { display: block; min-height: 0; }
  .hero-copy { padding: 28px 21px 92px; }
  .hero h1 { font-size: clamp(40px, 11vw, 59px); }
  .hero p { max-width: 290px; }
  .hero-art { position: absolute; width: 224px; height: 153px; min-height: 0; right: -54px; bottom: -45px; z-index: -1; opacity: .8; }
  .art-tile { width: 53px; font-size: 26px; }
  .art-orbit, .art-orbit.two { width: 180px; }
  .library { margin-top: 23px; }
  .section-head { gap: 5px; }
  .section-head .btn { font-size: 12px; padding-inline: 8px; }
  .cards { grid-template-columns: 1fr; gap: 11px; }
  .new-card { min-height: 123px; }
  .editor-layout, .lobby-grid { grid-template-columns: 1fr; gap: 11px; }
  .question-list { max-height: 135px; }
  .editor-top { margin-bottom: 11px; }
  .lobby-title { margin-bottom: 14px; }
  .players-panel { min-height: 260px; }
  .answer-grid { gap: 7px; }
  .answer-tile { flex-wrap: wrap; align-content: center; align-items: center; gap: 5px; min-height: 76px; padding: 8px; }
  .answer-tile .answer-symbol { width: 27px; font-size: 15px; }
  .question-footer .btn { padding-inline: 9px; }
}
@media (max-width: 355px) {
  .question-panel .answer-grid { grid-template-columns: 1fr; }
  .question-panel .answer-tile { min-height: 55px; }
}
/* Version 2: avatars, bilingual controls and movement between scores. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.language-picker { margin: 0; }
.language-picker select { min-width: 58px; height: 39px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 800; padding: 5px; }
.edition-nav { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: -10px 1px 17px; font-size: 13px; color: var(--purple-dark); }
.edition-nav a { text-decoration: none; font-weight: 750; }
.edition-nav .text-button { font-size: 12px; }
.library-scope { color: var(--muted); font-size: 12px; margin-top: 8px; }
.library-actions { display: flex; gap: 8px; align-items: center; }
.quiz-language { margin-left: auto; color: var(--purple-dark); font-size: 10px; font-weight: 800; }
.content-language { margin: 18px 0 0; font-size: 12px; }
.content-language select { margin-top: 6px; }
.avatar-field { border: 0; padding: 0; margin: 19px 0 0; }
.avatar-field legend { padding: 0; font-size: 14px; font-weight: 760; margin-bottom: 8px; }
.avatar-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.avatar-option { display: grid; place-items: center; min-width: 0; min-height: 43px; aspect-ratio: 1; background: #f7f4ff; border: 2px solid transparent; border-radius: 12px; font-size: 27px; transition: transform 140ms ease, border-color 140ms ease; }
.avatar-option:hover { transform: translateY(-2px); }
.avatar-option.selected { border-color: var(--purple); background: var(--lavender); }
.avatar-face { display: inline-grid; place-items: center; flex-shrink: 0; font-size: 25px; width: 36px; height: 36px; line-height: 1; }
.waiting-avatar .avatar-face { font-size: 68px; width: 100px; height: 100px; background: var(--lavender); border-radius: 50%; margin-bottom: 19px; animation: avatar-arrive 450ms ease-out; }
.player-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px 2px 2px; }
.player-badge .avatar-face { width: 28px; height: 28px; font-size: 20px; }
.player-chips li { animation: player-arrive 280ms ease-out; }
.ranking-list .rank-row { position: relative; display: grid; grid-template-columns: 27px 38px minmax(0,1fr) auto auto; gap: 8px; min-height: 59px; }
.rank-animate .rank-row { animation: rank-slide 800ms cubic-bezier(.22,.68,.17,1) both; }
.rank-score { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-score small { font-size: 11px; color: var(--muted); }
.rank-gain { color: #17734c; font-size: 12px; font-weight: 800; }
.round-result { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 5px 12px; margin: 13px 0; padding: 10px 12px; border-radius: 10px; color: #275841; background: #e9f6ed; font-size: 14px; }
.round-result span { font-size: 12px; }
.round-result strong { overflow-wrap: anywhere; }
.rank-panel > .feedback { margin-top: 13px; justify-content: center; }
.wait-next { margin-top: 18px; font-size: 13px; }
.podium-person { justify-items: center; }
.podium-person .avatar-face { font-size: 42px; width: 60px; height: 60px; margin-bottom: 5px; }
.podium-step { display: flex; gap: 10px; align-items: center; justify-content: center; transform-origin: bottom; animation: podium-rise 650ms ease-out both; }
.place-1 .podium-step { animation-delay: 350ms; }
.place-2 .podium-step { animation-delay: 180ms; }
.place-3 .podium-step { animation-delay: 0ms; }
.finished-panel { position: relative; overflow: hidden; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; left: calc(5% + var(--i) * 5.2%); top: -20px; width: 7px; height: 13px; border-radius: 2px; background: #ffad00; opacity: 0; animation: confetti-fall 1800ms calc(var(--i) * 40ms) ease-in both; }
.confetti i:nth-child(3n) { background: #0f664c; }
.confetti i:nth-child(3n + 1) { background: #cf3231; }
.mcp-dialog { text-align: left; padding: 24px; }
.mcp-dialog h2 { font-size: 30px; margin: 12px 0; }
.mcp-dialog p { color: var(--muted); margin: 12px 0; font-size: 15px; }
.mcp-dialog blockquote { margin: 12px 0 0; border-left: 3px solid var(--purple); background: var(--bg); padding: 15px; border-radius: 0 10px 10px 0; font-size: 15px; line-height: 1.55; }
@keyframes avatar-arrive { from { opacity: 0; transform: scale(.7) rotate(-10deg); } to { opacity: 1; transform: scale(1); } }
@keyframes player-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rank-slide { from { transform: translateY(var(--from-y)); } to { transform: translateY(0); } }
@keyframes podium-rise { from { transform: scaleY(.05); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes confetti-fall { 0% { opacity: 0; transform: translateY(0) rotate(0deg); } 10% { opacity: .95; } 90% { opacity: .85; } 100% { opacity: 0; transform: translateY(620px) rotate(360deg); } }

@font-face { font-family: 'Lufthansa Web Text'; src: url('/brand/text.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lufthansa Web Text'; src: url('/brand/text-bold.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: 'Lufthansa Web Head'; src: url('/brand/head.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
:root[data-theme="christmas"] { --bg: #f5f5f5; --paper: #fff; --ink: #05164d; --muted: #606577; --line: #e1e4eb; --purple: #05164d; --purple-dark: #03123f; --lavender: #e9eef7; --mint: #fff; font-family: 'Lufthansa Web Text', sans-serif; }
[data-theme="christmas"] h1, [data-theme="christmas"] h2, [data-theme="christmas"] h3 { font-family: 'Lufthansa Web Head', sans-serif; font-weight: 300; letter-spacing: -.025em; }
[data-theme="christmas"] .hero { background: #05164d; border-radius: 17px; min-height: 365px; }
[data-theme="christmas"] .hero-copy { padding-top: 39px; padding-bottom: 39px; }
[data-theme="christmas"] .hero h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.06; letter-spacing: -.03em; }
[data-theme="christmas"] .hero em { color: #fff; }
[data-theme="christmas"] .hero p { color: #e2e7f3; }
[data-theme="christmas"] .eyebrow { background: #ffffff0c; color: #fff; font-size: 11px; text-transform: none; letter-spacing: .035em; }
[data-theme="christmas"] .eyebrow .live-dot { background: #ffad00; }
[data-theme="christmas"] .white { color: #05164d; }
[data-theme="christmas"] .kicker { color: #5e6576; letter-spacing: .08em; text-transform: none; }
.festive-brand { align-items: center; gap: 20px; }
.festive-brand img { width: 155px; height: auto; }
.festive-brand > span { color: #05164d; border-left: 1px solid #d9dde6; padding: 7px 0 7px 17px; font-size: 13px; font-weight: 400; letter-spacing: .01em; }
.festive-art { align-self: stretch; position: relative; min-height: 325px; overflow: hidden; }
.bauble { position: absolute; display: grid; place-items: center; border-radius: 50%; width: 112px; height: 112px; top: 88px; background: #fff; z-index: 1; }
.bauble::before { content: ''; position: absolute; bottom: 100%; left: 50%; width: 1px; height: 130px; background: #ffffff80; }
.bauble img { width: 65px; height: 65px; }
.bauble-one { left: 8%; top: 58px; width: 135px; height: 135px; background: #ffad00; }
.bauble-one img { width: 82px; height: 82px; }
.bauble-two { left: 48%; top: 127px; width: 102px; height: 102px; }
.bauble-three { left: 76%; top: 33px; width: 73px; height: 73px; background: #fff; }
.bauble-three img { width: 49px; height: 49px; }
.festive-star { position: absolute; color: #ffad00; left: 13%; top: 240px; font-size: 38px; }
.flight-icon { position: absolute; right: 16%; bottom: 16px; width: 75px; height: 75px; padding: 13px; border-radius: 50%; background: #fff; transform: rotate(35deg); opacity: .6; }
.snow-dots { position: absolute; inset: 0; background-image: radial-gradient(circle, #ffffff80 1px, transparent 2px); background-size: 51px 47px; opacity: .5; }
[data-theme="christmas"] .demo-art { background: #e4ece6; }
[data-theme="christmas"] .saved-art { background: #e5ebf6; }
[data-theme="christmas"] .card-decoration { transform: rotate(12deg); opacity: .45; }
[data-theme="christmas"] .card-decoration img { height: 82px; width: 82px; }
[data-theme="christmas"] .card-label { color: #05164d; }
[data-theme="christmas"] .new-card { background: #fcfcfd; }
[data-theme="christmas"] .panel { box-shadow: 0 5px 22px #05164d05; border-radius: 16px; }
[data-theme="christmas"] .join-mark, [data-theme="christmas"] .rank-icon { background: #edf2ed; color: #0f664c; }
[data-theme="christmas"] .join-box { border-top: 4px solid #0f664c; }
[data-theme="christmas"] .field { background: #fbfcfe; }
[data-theme="christmas"] .invite-pin { color: #05164d; }
[data-theme="christmas"] .host-badge, [data-theme="christmas"] .count-pill, [data-theme="christmas"] .pill, [data-theme="christmas"] .my-rank { background: #edf2f8; color: #05164d; }
[data-theme="christmas"] .answer-0 { --tile: #fff0ef; --tile-edge: #eac7c6; --symbol: #b92727; }
[data-theme="christmas"] .answer-1 { --tile: #e9f2fa; --tile-edge: #bdd8ec; --symbol: #145a90; }
[data-theme="christmas"] .answer-2 { --tile: #eaf4ee; --tile-edge: #c4dccd; --symbol: #0f664c; }
[data-theme="christmas"] .answer-3 { --tile: #f9f1df; --tile-edge: #eddbb5; --symbol: #72511c; }
[data-theme="christmas"] .rank-no { background: #e8edf7; color: #05164d; }
[data-theme="christmas"] .podium-step { background: #e3e8ef; color: #05164d; }
[data-theme="christmas"] .place-1 .podium-step { background: #0f664c; color: #fff; }
[data-theme="christmas"] .place-3 .podium-step { background: #f1e4e1; color: #05164d; }
@media (max-width: 850px) {
  .library-actions .btn { font-size: 12px; padding-inline: 9px; }
  .library-actions .icon-btn { display: none; }
  .festive-brand > span { display: none; }
  .bauble-one { left: 4%; width: 110px; height: 110px; }
  .bauble-two { left: 44%; width: 87px; height: 87px; }
  .bauble-three { left: 76%; width: 60px; height: 60px; }
}
@media (max-width: 570px) {
  .edition-nav { margin-top: -4px; font-size: 11px; }
  .library .section-head { align-items: start; flex-wrap: wrap; gap: 12px; }
  .library-actions { width: 100%; justify-content: end; }
  .library-actions .icon-btn { display: inline-flex; }
  .festive-brand img { width: 123px; }
  [data-theme="christmas"] .hero-copy { padding: 24px 21px 34px; }
  [data-theme="christmas"] .hero h1 { font-size: 43px; }
  .festive-art { position: relative; min-height: 140px; height: 140px; width: 100%; }
  .bauble-one { top: 12px; left: 16%; height: 88px; width: 88px; }
  .bauble-one img { height: 58px; width: 58px; }
  .bauble-two { top: 34px; left: 53%; width: 74px; height: 74px; }
  .bauble-two img { width: 52px; height: 52px; }
  .bauble-three { display: none; }
  .flight-icon { right: 1%; bottom: 8px; width: 43px; height: 43px; padding: 5px; }
  .festive-star { left: 3%; top: 55px; font-size: 25px; }
  .header-actions { gap: 6px; }
  .language-picker select { min-width: 48px; height: 36px; }
  .player-badge { max-width: 120px; font-size: 11px; }
  .ranking-list .rank-row { grid-template-columns: 23px 30px minmax(0,1fr) auto auto; gap: 5px; padding: 7px 5px; font-size: 13px; }
  .rank-row .avatar-face { width: 29px; font-size: 23px; }
  .rank-gain { font-size: 10px; }
  .rank-score { flex-direction: column; gap: 0; align-items: end; }
  .podium-person .avatar-face { font-size: 35px; width: 47px; height: 47px; }
  .podium-person { font-size: 13px; }
  .join-page { padding-top: 20px; }
  .join-box { padding-top: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .confetti { display: none; }
}
[data-theme="christmas"] .bauble-one { background: #fff; }
[data-theme="christmas"] .outline { color: #05164d; border-color: #dce1eb; }
[data-theme="christmas"] .notice { background: #05164d; }
[data-theme="christmas"] .notice.error { background: #a32323; }

.account-home { padding: 32px; width: min(680px,100%); margin: auto; }
.account-home h1 { margin: 14px 0; font-size: clamp(32px,5vw,54px); }
.account-home p { margin: 15px 0; line-height: 1.6; }
.account-home hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.account-actions { display:flex; flex-wrap:wrap; gap:12px; }
.image-editor { margin:20px 0; display:grid; gap:12px; }
.image-editor input { display:block; max-width:100%; margin-top:8px; }
.image-editor small { color:var(--muted); }
.quiz-image { display:block; width:100%; max-height:320px; object-fit:contain; border-radius:12px; margin:16px auto; }
.image-editor .quiz-image { max-height:180px; }
.mcp-dialog { max-height:90vh; overflow:auto; }
.mcp-dialog h3 { margin:22px 0 12px; }
.mcp-dialog li { margin:10px 0; overflow-wrap:anywhere; }
.mcp-dialog textarea { min-height:90px; word-break:break-all; }
.mcp-dialog .btn { margin-block:10px; }
@media(max-width:570px) { .quiz-image { max-height:220px; } .account-home { padding:22px; } .header-actions .btn { padding:8px; font-size:11px; } }
