:root {
  color-scheme: light;
  --ink: #201c2d;
  --muted: #635e6d;
  --paper: #f7f5ef;
  --white: #fffefa;
  --yellow: #ffdb52;
  --purple: #582bbb;
  --pale: #eee5ff;
  --green: #175b3a;
  --line: #dcd6e3;
  --display: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-family: var(--display);
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.65; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
a { color: var(--purple); text-underline-offset: .22em; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 3px solid #6d3cde; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.24; font-weight: 900; }
.skip { position: fixed; top: -5rem; left: 1rem; z-index: 5; padding: .5rem 1rem; background: white; }
.skip:focus { top: .5rem; }
.header { border-bottom: 1px solid var(--line); background: var(--white); }
.playtest-banner { margin: 0; padding: .35rem 1rem; background: var(--pale); color: var(--purple); text-align: center; font-weight: 850; }
.header-inner { margin: auto; padding: .7rem 1.5rem; max-width: 69rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand, .rules-button { background: transparent; color: var(--ink); border: 0; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0; font-weight: 900; }
.brand { font-size: 1.3rem; letter-spacing: -.06em; }
.brand-mark { display: grid; width: 2.35rem; aspect-ratio: 1; place-items: center; border: 2px solid var(--ink); border-radius: .44rem; background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); letter-spacing: 0; rotate: -5deg; }
.rules-button { gap: .4rem; font-size: .9rem; padding: .25rem .25rem .25rem .4rem; }
.rules-button span { display: grid; border: 1.5px solid currentColor; border-radius: 50%; width: 1.2rem; height: 1.2rem; line-height: 1; place-items: center; }
.header-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .65rem; }
.sound-button { min-height: 2.75rem; padding: 0 .25rem; border: 0; background: transparent; color: var(--ink); font-size: .85rem; font-weight: 850; white-space: nowrap; }
.sound-button span { color: var(--muted); font-variant-numeric: tabular-nums; }
.sound-button[aria-pressed="true"] span { color: var(--purple); }
.wrap { max-width: 69rem; margin: auto; padding: 2rem 1.5rem 3.25rem; }
.hero { min-height: 22rem; display: grid; grid-template-columns: 1.23fr 1fr; align-items: center; overflow: hidden; position: relative; isolation: isolate; background: var(--yellow); border: 2px solid var(--ink); border-radius: 1rem; box-shadow: 5px 5px 0 var(--ink); }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle, #3425492f 1.25px, transparent 1.5px) 100% 100% / 9px 9px; mask-image: linear-gradient(120deg, transparent 37%, #000 85%); }
.hero-copy { padding: 2.2rem clamp(1.3rem, 5vw, 3.5rem); }
.eyebrow { font-size: .9rem; font-weight: 900; letter-spacing: .08em; }
.hero .eyebrow { margin-bottom: .7rem; display: inline-block; }
.hero h1 { font-size: clamp(2.35rem, 5.4vw, 4.7rem); letter-spacing: -.095em; font-weight: 900; }
.hero h1 em { display: block; font-style: normal; color: var(--purple); }
.hero p { margin-top: 1.15rem; font-weight: 750; }
.hero-art { min-height: 21rem; align-self: stretch; position: relative; }
.burst { position: absolute; width: 84%; height: 88%; inset: 6% 9%; background: #fff4aa; clip-path: polygon(0 46%, 23% 41%, 12% 12%, 35% 35%, 51% 0, 60% 31%, 88% 5%, 77% 40%, 100% 49%, 80% 63%, 95% 88%, 66% 78%, 50% 100%, 40% 77%, 12% 93%, 26% 65%); }
.art-tile { position: absolute; width: clamp(4.2rem, 12vw, 8rem); aspect-ratio: 1; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: .65rem; box-shadow: 6px 7px 0 var(--ink); font-size: clamp(2.35rem, 5.5vw, 4.6rem); font-weight: 900; line-height: 1; }
.art-tile:nth-of-type(2) { left: 6%; top: 38%; rotate: -14deg; background: var(--white); }
.art-tile:nth-of-type(3) { left: 33%; top: 26%; rotate: 7deg; color: white; background: var(--purple); }
.art-tile:nth-of-type(4) { left: 59%; top: 36%; rotate: 15deg; background: #f2a7c9; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; margin-top: 1.65rem; }
.panel { min-width: 0; background: var(--white); border: 1.5px solid var(--ink); border-radius: .85rem; padding: 1.45rem; }
.mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; }
.mode-card h2 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
.mode-card p { color: var(--muted); flex: 1; }
.mode-icon { width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: .5rem; background: var(--pale); }
.mode-icon::before { content: ""; width: .9rem; height: 1.45rem; border: 2px solid var(--purple); border-radius: .23rem; background: linear-gradient(var(--purple), var(--purple)) center calc(100% - .13rem) / .25rem 2px no-repeat; }
.mode-icon.tablet-icon { background: #fff0b2; }
.tablet-icon::before { width: 1.56rem; height: 1.08rem; border-color: var(--ink); background: none; }
.button { min-height: 2.85rem; padding: .56rem 1.04rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1.5px solid var(--ink); border-radius: .5rem; background: var(--white); color: var(--ink); font-weight: 850; text-align: center; text-decoration: none; line-height: 1.3; }
.button:hover:not(:disabled) { background: var(--pale); }
.button.primary { background: var(--purple); border-color: var(--purple); color: white; }
.button.primary:hover:not(:disabled) { background: #452096; border-color: #452096; }
.button.yellow { background: var(--yellow); }
.button.yellow:hover:not(:disabled) { background: #ffd032; }
.button.small { font-size: .9rem; }
.button.subtle { border-color: var(--line); }
.text-link { min-height: 2.75rem; display: inline-flex; align-items: center; font-weight: 750; font-size: .9rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem .8rem; }
.join-panel { margin-top: 1.15rem; display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 2.3fr); align-items: center; gap: 1.25rem; background: var(--pale); border-color: #c5b3ef; }
.form-row { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; }
.field { min-width: 0; flex: 1 1 8rem; display: grid; gap: .24rem; }
.field label, .field > span { font-weight: 850; font-size: .9rem; }
.suggest-field { position: relative; }
.suggestions { position: absolute; inset: calc(100% + .25rem) 0 auto; z-index: 2; max-height: 13rem; overflow: auto; overscroll-behavior: contain; margin: 0; padding: .25rem; list-style: none; border: 1.5px solid var(--ink); border-radius: .48rem; background: var(--white); box-shadow: 2px 3px 0 var(--ink); }
.suggestions [role="option"] { display: flex; align-items: center; min-height: 2.75rem; padding: .45rem .6rem; border-radius: .3rem; cursor: pointer; overflow-wrap: anywhere; }
.suggestions [role="option"]:hover, .suggestions [aria-selected="true"] { background: var(--pale); color: var(--purple); }
.hint-adjust .field { flex: 0 1 10rem; }
input:not([type=checkbox]), select { width: 100%; min-height: 2.85rem; min-width: 0; padding: .45rem .65rem; border: 1.5px solid #91889d; border-radius: .48rem; background: var(--white); color: var(--ink); font-size: 1rem; }
select { appearance: none; padding-inline-end: 2rem; background: linear-gradient(45deg, transparent 50%, var(--purple) 50%) calc(100% - 1rem) 52% / .35rem .35rem no-repeat, linear-gradient(135deg, var(--purple) 50%, transparent 50%) calc(100% - .65rem) 52% / .35rem .35rem no-repeat, var(--white); }
.field.code input { text-transform: uppercase; font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; }
.stack { display: grid; gap: 1rem; }
.narrow { max-width: 43rem; margin: auto; }
.heading-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem; }
.heading-row h1 { font-size: clamp(1.65rem, 4.5vw, 2.6rem); letter-spacing: -.055em; }
.stack h2 { font-size: 1.3rem; }
.muted { color: var(--muted); }
.checkbox { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; font-weight: 700; }
.checkbox input { width: 1.15rem; height: 1.15rem; accent-color: var(--purple); }
.lobby, .game-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(15rem, 1fr); align-items: start; gap: 1rem; }
.game-layout.tablet-layout { grid-template-columns: minmax(0, 1fr); max-width: 50rem; margin-inline: auto; }
.tablet-layout .clues { width: min(100%, 39rem); margin-inline: auto; }
.invite-code { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: clamp(1.65rem, 5.3vw, 2.7rem); line-height: 1.2; letter-spacing: .12em; font-weight: 900; overflow-wrap: anywhere; }
.invite { background: var(--pale); }
.invite-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.invite-qr { display: block; line-height: 0; background: #fff; border: 1px solid var(--line); border-radius: .45rem; overflow: hidden; }
.invite-qr canvas { display: block; width: clamp(8.25rem, 26vw, 10rem); max-width: 100%; height: auto; image-rendering: pixelated; }
.score-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .28rem; }
.score-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 2.45rem; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
.score-list li:last-child { border-bottom: 0; }
.score-list li.you { background: var(--pale); border-radius: .4rem; border-bottom-color: transparent; }
.score-list strong { overflow-wrap: anywhere; }
.score-list .points { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-detail { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .3rem .65rem; }
.remove { color: #6b3443; }
.rank { display: inline-block; min-width: 2.1rem; color: var(--purple); font-weight: 900; }
.quiz { border-width: 2px; box-shadow: 4px 4px 0 var(--ink); }
.quiz h1 { font-size: clamp(1.45rem, 4vw, 2.2rem); }
.pill { display: inline-flex; align-items: center; border-radius: 99rem; background: var(--pale); color: #432489; font-weight: 850; padding: .21rem .7rem; font-size: .9rem; }
.clues { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.3rem, 1.2vw, .75rem); list-style: none; padding: 0; margin: 0; }
.clue { display: grid; align-content: center; justify-items: center; gap: .15rem; aspect-ratio: 1 / 1.15; min-width: 0; padding: .25rem .1rem; color: #665d73; border: 1.5px dashed #ada3bc; border-radius: .47rem; background: #f2eef6; }
.clue.open { background: var(--yellow); color: var(--ink); border: 1.5px solid var(--ink); }
.clue.latest { box-shadow: 2px 3px 0 var(--ink); }
.clue b { font-size: clamp(1.25rem, 5.3vw, 3.15rem); line-height: 1.14; font-weight: 900; }
.clue small { font-size: .83rem; font-weight: 800; }
.timer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: .7rem; row-gap: .22rem; }
.timer span { font-weight: 750; font-size: .9rem; }
.timer strong { font-variant-numeric: tabular-nums; }
.meter { grid-column: 1 / -1; width: 100%; height: .52rem; border: 0; border-radius: 9rem; background: var(--pale); accent-color: var(--purple); overflow: hidden; }
.meter::-webkit-progress-bar { background: var(--pale); }
.meter::-webkit-progress-value { background: var(--purple); }
.meter::-moz-progress-bar { background: var(--purple); }
.pause-banner, .feedback, .reveal-answer { padding: .8rem 1rem; border-radius: .6rem; background: var(--pale); font-weight: 750; }
.pause-banner { background: #fff0b2; }
.feedback.good { background: #ddf3e7; color: var(--green); }
.reveal-answer { padding: 1rem; border-left: .4rem solid var(--purple); }
.reveal-answer h2 { font-size: clamp(1.4rem, 4.1vw, 2.3rem); margin-top: .3rem; overflow-wrap: anywhere; }
.wrong-answer { display: flex; align-items: center; gap: clamp(.65rem, 2vw, 1rem); padding: .8rem 1rem; border: 1.5px solid #a9384c; border-radius: .6rem; background: #fff0f2; color: #831c33; }
.wrong-mark { flex-shrink: 0; font-size: clamp(2.7rem, 8vw, 4rem); line-height: .9; font-weight: 900; }
.wrong-detail { display: flex; flex-wrap: wrap; gap: .2rem .65rem; align-items: baseline; font-weight: 850; }
.wrong-detail span { font-variant-numeric: tabular-nums; }
.wrong-title { font-size: clamp(1.3rem, 4.8vw, 2.2rem); line-height: 1.25; font-weight: 900; overflow-wrap: anywhere; }
.answer-list { list-style: none; margin: 0; padding: 0; }
.answer-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
.answer-list p, .answer-list strong { overflow-wrap: anywhere; }
.answer-result { flex-shrink: 0; font-weight: 800; color: var(--muted); }
.answer-result.correct { color: var(--green); }
.buzzer-area { display: grid; place-items: center; gap: .9rem; padding: .45rem 0 .75rem; }
.button.buzzer { width: min(100%, 16rem); min-height: clamp(5rem, 12vw, 7.2rem); border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); box-shadow: 0 .38rem 0 var(--ink); font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 900; }
.button.buzzer:hover:not(:disabled) { background: #ffd032; }
.button.buzzer:active:not(:disabled) { transform: translateY(.25rem); box-shadow: 0 .13rem 0 var(--ink); }
.buzz-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .6rem; }
.buzz-list .button { min-height: 3.1rem; justify-content: space-between; overflow-wrap: anywhere; }
.buzz-list small { font-size: .8rem; white-space: nowrap; }
.host-controls { border-top: 1px solid var(--line); padding-top: .85rem; }
.empty { padding: 1.25rem .9rem; border: 1px dashed #b6aabc; border-radius: .55rem; text-align: center; color: var(--muted); }
.notice { position: fixed; z-index: 4; left: 50%; bottom: 1.1rem; translate: -50% 0; width: max-content; max-width: calc(100% - 1.5rem); padding: .7rem 1rem; border-radius: .55rem; background: var(--ink); color: white; box-shadow: 0 4px 18px #201c2d42; font-weight: 700; }
dialog { width: min(34rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 1.5rem; background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: .85rem; }
dialog::backdrop { background: #201c2da8; }
dialog ol { padding-left: 1.3rem; }
dialog li + li { margin-top: .6rem; }
@media (max-width: 46rem) {
  .wrap { padding: 1.15rem 1rem 2.5rem; }
  .header-inner { padding-inline: 1rem; }
  .hero { min-height: 16rem; }
  .hero-copy { padding: 1.45rem 1.05rem; }
  .hero h1 { font-size: clamp(1.68rem, 6vw, 3.1rem); }
  .hero p { font-size: .9rem; margin-top: .65rem; }
  .hero-art { min-height: 12rem; }
  .art-tile { width: clamp(2.6rem, 10vw, 4.8rem); font-size: clamp(1.5rem, 5.2vw, 2.7rem); border-width: 2px; box-shadow: 3px 4px 0 var(--ink); }
  .join-panel, .lobby, .game-layout { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 1rem; }
}
@media (max-width: 33rem) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-copy { padding: 1.1rem 1rem 1.2rem; }
  .hero h1 { font-size: clamp(1.85rem, 9vw, 3rem); }
  .hero p { max-width: 16rem; }
  .hero-art { position: absolute; right: -.8rem; bottom: .35rem; width: 9.7rem; min-height: 5rem; z-index: -1; opacity: .48; }
  .art-tile { width: 2.65rem; }
  .modes { grid-template-columns: 1fr; gap: .8rem; margin-top: 1.1rem; }
  .mode-card { display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); align-items: center; gap: .35rem .75rem; }
  .mode-card .mode-icon { grid-row: 1 / 3; }
  .mode-card .actions { grid-column: 1 / -1; margin-top: .3rem; }
  .mode-card p { font-size: .92rem; }
  .clue small { font-size: .73rem; }
  .clue { aspect-ratio: 1 / 1.27; }
}
