:root {
  color-scheme: light;
  --paper: #f6f5f2;
  --card: #fff;
  --ink: #202321;
  --muted: #858983;
  --line: #e8e8e3;
  --green: #b9ed59;
  --green-dark: #213617;
  --orange: #ff7b52;
  --blue: #dce8ff;
  font-family: "DM Sans", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100svh; max-width: 1120px; margin: 0 auto; padding: 0 38px 32px; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(34,37,32,.08); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 800 21px/1 "Manrope", sans-serif; letter-spacing: -.07em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--green); color: #263716; font: 800 24px/1 "Manrope", sans-serif; letter-spacing: -.1em; padding: 0 4px 5px 0; transform: rotate(-7deg); }
.screen { animation: appear .32s ease both; }
.hidden { display: none !important; }
button:disabled { opacity: .5; cursor: not-allowed; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.connection-label { color: #747e68; font-size: 11px; }
.notice { max-width: 700px; margin: 18px auto 0; padding: 13px 16px; border: 1px solid #e9d5b1; border-radius: 12px; background: #fff9ea; color: #775b2f; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.compact-form { display: grid; gap: 18px; }
.form-divider { text-align: center; color: #8a9086; font-size: 12px; }
.room-code-input { letter-spacing: .25em; text-transform: uppercase; font-size: 19px; }
.privacy-note { margin: 18px 4px 0; color: #858b81; font-size: 11px; line-height: 1.6; }
.room-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.room-header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.room-code { display: block; margin-top: 4px; font-size: 25px; letter-spacing: .16em; color: #5f7e36; }
.room-summary { margin: 15px 0; color: #81877d; font-size: 12px; }
.participants { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.participant { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 15px; border: 1px solid #e3e7da; border-radius: 14px; background: #fff; }
.team-card { min-width: 0; padding: 15px; border: 1px solid #e3e7da; border-radius: 14px; background: #fff; }
.team-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #e8e8e3; }
.team-heading > strong { overflow-wrap: anywhere; color: #4c5e3b; font-size: 14px; }
.team-heading > span { flex-shrink: 0; font-size: 24px; font-weight: 800; }
.team-members { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.team-members li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: #4f584a; font-size: 12px; }
.team-members li > span { min-width: 0; overflow-wrap: anywhere; }
.team-members small { flex-shrink: 0; color: #7a856e; font-size: 10px; }
.team-members .player-active > span { font-weight: 800; color: #436128; }
.team-members .team-waiting { color: #92998c; font-style: italic; }
.participant-active .team-heading { border-color: #c7d9a9; }
.participant-active { border-color: #9eb96c; background: #f6faed; }
.participant > span { color: #647052; font-size: 12px; font-weight: 700; }
.participant > strong { font-size: 27px; }
.participant > small { color: #91998a; font-size: 10px; }
.room-connection { margin: 12px 2px 18px; min-height: 16px; color: #879279; font-size: 11px; line-height: 1.5; }
.room-panel { margin-top: 20px; text-align: center; }
.room-panel h2 { margin: 12px 0; font-size: 27px; letter-spacing: -.04em; }
.room-panel p { color: #828a7a; font-size: 13px; line-height: 1.6; }
.room-panel .eyebrow { justify-content: center; }
.danger-text { color: #b16953; }
.page-footer { max-width: 650px; margin: 24px auto 0; line-height: 1.7; }
#play-panel .timer-wrap { margin-top: 12px; }
.word-card.card-viewer, .word-card.card-viewer:active { cursor: default; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.setup-screen { max-width: 700px; margin: 0 auto; padding: 52px 0 20px; }
.intro { padding: 0 8px 29px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #77806f; font-size: 10px; letter-spacing: .15em; font-weight: 800; }
.eyebrow-line { width: 19px; height: 2px; background: var(--orange); }
h1, h2, p { margin-top: 0; }
.intro h1 { margin: 20px 0 12px; font: 800 clamp(48px, 8vw, 72px)/.98 "Manrope", sans-serif; letter-spacing: -.075em; }
.intro h1 span, .result-screen h1 span { color: #859b58; }
.intro-copy { max-width: 470px; color: #747a72; font-size: 15px; line-height: 1.65; margin-bottom: 0; }
.setup-card { background: var(--card); border: 1px solid rgba(35,39,31,.07); border-radius: 24px; padding: 28px 30px 24px; box-shadow: 0 18px 50px rgba(44,49,33,.055); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.step-label { color: #9a9f96; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.section-heading h2 { font: 700 22px/1.2 "Manrope", sans-serif; letter-spacing: -.04em; margin: 5px 0 0; }
.setup-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 13px; background: #f1f6e7; color: #739342; font-size: 23px; }
.players-row { display: grid; grid-template-columns: 1fr 38px 1fr; align-items: end; gap: 11px; margin-bottom: 23px; }
.field-label { color: #777c74; font-size: 11px; font-weight: 700; display: flex; flex-direction: column; gap: 8px; }
.name-input { width: 100%; height: 43px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; outline: none; color: var(--ink); background: #fcfcfa; font-size: 13px; font-weight: 600; }
.name-input:focus, select:focus { border-color: #9eb96c; box-shadow: 0 0 0 3px rgba(185,237,89,.18); }
.versus { align-self: center; padding-top: 18px; color: #b1b4ac; text-align: center; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.setting-group { min-width: 0; border: 0; padding: 0; margin: 0 0 21px; }
.setting-group legend, .legend { color: #343832; font-size: 12px; font-weight: 700; margin-bottom: 11px; padding: 0; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px; background: #f4f5f1; border-radius: 11px; }
.segmented button { min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: #737970; font-size: 12px; font-weight: 700; cursor: pointer; }
.segmented button.selected { background: #fff; color: #2a3322; box-shadow: 0 2px 7px rgba(39,46,30,.1); }
.difficulty-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.difficulty-option { min-height: 80px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 9px 11px; text-align: left; cursor: pointer; }
.difficulty-option.selected { border-color: #a6cf61; background: #f8fbed; box-shadow: inset 0 0 0 1px #a6cf61; }
.difficulty-option > span:nth-child(2) { font-size: 11px; font-weight: 700; }
.difficulty-option small { color: #939890; font-size: 10px; }
.difficulty-dots { color: #9db576; font-size: 9px; letter-spacing: 2px; }
.setting-hint { min-height: 15px; margin: 7px 0 0; color: #92978f; font-size: 10px; }
.legend-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.legend-row legend { margin: 0; }
.inline-actions { color: #c6c9c1; display: inline-flex; align-items: center; gap: 6px; }
.text-button { color: #81965e; border: 0; padding: 4px; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.text-button:hover { color: #4b6628; }
.category-list { display: flex; flex-wrap: wrap; gap: 7px; }
.category-chip { position: relative; }
.category-chip input { position: absolute; opacity: 0; pointer-events: none; }
.category-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid #e8eae4; border-radius: 999px; color: #7a8077; background: #fff; font-size: 10px; font-weight: 600; cursor: pointer; transition: .16s ease; }
.category-chip span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #d5d9cf; }
.category-chip input:checked + span { border-color: #d8e9bb; background: #f8fbed; color: #475b2e; }
.category-chip input:checked + span::before { background: #9dcc50; }
.category-chip input:focus-visible + span { outline: 3px solid rgba(133,172,78,.3); }
.settings-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; height: 43px; appearance: none; border: 1px solid var(--line); border-radius: 10px; padding: 0 34px 0 12px; outline: none; color: #40453e; background: #fcfcfa; font-size: 12px; font-weight: 600; }
.select-wrap > span { position: absolute; right: 13px; top: 11px; color: #7e847b; pointer-events: none; }
.switch-label { display: flex; align-items: center; justify-content: space-between; min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: #545a51; background: #fcfcfa; font-size: 12px; font-weight: 600; cursor: pointer; }
.switch-label input { position: absolute; opacity: 0; }
.switch { width: 32px; height: 19px; padding: 3px; border-radius: 99px; background: #cfd2ca; transition: .2s; }
.switch::after { content: ""; width: 13px; height: 13px; display: block; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0002; transition: .2s; }
.switch-label input:checked + .switch { background: #91bd49; }
.switch-label input:checked + .switch::after { transform: translateX(13px); }
.switch-label input:focus-visible + .switch { outline: 3px solid rgba(133,172,78,.3); }
.button { min-height: 51px; border: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .14s ease, filter .14s ease, box-shadow .14s ease; touch-action: manipulation; }
.button:hover { filter: brightness(.98); box-shadow: 0 5px 16px rgba(31,40,20,.12); }
.button:active { transform: scale(.985); }
.button:focus-visible, .icon-button:focus-visible { outline: 3px solid #9acb55; outline-offset: 3px; }
.button-wide { width: 100%; }
.button-primary { padding: 0 19px; color: #1e2c14; background: var(--green); }
.button-primary span:last-child { font-size: 18px; }
.setup-card > .button-primary { margin-top: 1px; }
.rule-note { display: flex; align-items: flex-start; gap: 8px; color: #8a9086; font-size: 10px; line-height: 1.5; margin: 12px 0 0; }
.rule-note span { color: #96b963; }
.setup-footer { padding-top: 18px; text-align: center; color: #a0a49b; font-size: 10px; }
.setup-footer span { padding: 0 7px; color: #c6c9c0; }
.setup-footer a { color: #83966a; text-decoration-color: #c5d2b0; }

/* The two-player handoff and card round fit a phone held vertically. */
.handoff-screen, .pause-screen, .result-screen { position: relative; min-height: calc(100svh - 108px); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.handoff-content, .pause-content { position: relative; z-index: 1; width: min(100%, 420px); text-align: center; padding: 48px 16px 30px; }
.handoff-content .eyebrow, .pause-content .eyebrow { justify-content: center; }
.handoff-content h1 { margin: 24px 0 8px; font: 800 clamp(42px, 11vw, 62px)/.98 "Manrope", sans-serif; letter-spacing: -.07em; }
.pass-icon { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; gap: 2px; margin: 27px auto 0; border-radius: 23px; color: #536f2e; background: #e8f2d8; transform: rotate(-8deg); font-size: 25px; font-weight: 800; }
.pass-icon span:last-child { margin-top: 13px; }
.handoff-player { color: #819d50; font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.handoff-hints { color: #6d8841; font-size: 11px; font-weight: 700; margin: -5px 0 11px; }
.handoff-copy, .pause-content > p { color: #858a81; font-size: 13px; line-height: 1.6; }
.handoff-stats { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 28px 0; }
.handoff-stats > div, .final-score > div { display: flex; flex-direction: column; gap: 4px; }
.handoff-stats strong { font: 800 27px "Manrope", sans-serif; }
.handoff-stats span, .final-score span { color: #8a9086; font-size: 10px; }
.handoff-stats i { width: 1px; height: 31px; background: var(--line); }
.quiet-button { display: block; margin: 13px auto 0; padding: 8px; color: #969b91; }
.handoff-orbit { position: absolute; width: 350px; height: 350px; border: 1px solid #e9eadd; border-radius: 50%; }
.orbit-one { transform: translate(-47%, -27%); }
.orbit-two { width: 470px; height: 470px; transform: translate(55%, 43%); }
.play-screen { max-width: 620px; margin: 0 auto; padding: 19px 0 24px; }
.play-header { display: flex; align-items: center; justify-content: space-between; }
.icon-button { width: 37px; height: 37px; border: 1px solid #e9e9e3; border-radius: 11px; display: grid; place-items: center; background: #fff; color: #61675e; font-size: 16px; cursor: pointer; }
.pause-button { font-weight: 800; }
.round-label { color: #8e948b; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.round-label span { color: var(--ink); }
.scoreboard { display: grid; grid-template-columns: 1fr 60px 1fr; align-items: center; margin: 19px 0 22px; }
.score-player { display: flex; flex-direction: column; gap: 2px; padding: 0 13px; color: #a2a69e; }
.score-player:last-child { text-align: right; align-items: flex-end; }
.score-player.active-player .score-name { color: #738d46; }
.score-name { font-size: 10px; font-weight: 700; }
.score-player strong { font: 800 27px/1 "Manrope", sans-serif; letter-spacing: -.05em; color: var(--ink); }
.score-target { display: flex; flex-direction: column; align-items: center; gap: 3px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.score-target span { color: #a2a69e; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.score-target strong { color: #72786d; font-size: 14px; }
.timer-wrap { padding: 12px 14px 14px; border: 1px solid #ebebe5; border-radius: 13px; background: rgba(255,255,255,.64); transition: .2s; }
.timer-meta { display: flex; justify-content: space-between; color: #81877d; font-size: 10px; font-weight: 600; margin-bottom: 10px; }
.timer-meta span:last-child { color: #33382f; font: 800 12px "Manrope", sans-serif; font-variant-numeric: tabular-nums; }
.timer-track { height: 5px; overflow: hidden; border-radius: 99px; background: #e9ece3; }
.timer-progress { width: 100%; height: 100%; border-radius: inherit; background: #a9d75e; transition: width .22s linear, background .2s; }
.timer-wrap.timer-warning .timer-progress { background: #f3ad50; }
.timer-wrap.timer-danger .timer-progress { background: #ef7755; }
.word-card-wrap { margin: 15px 0 12px; }
.word-card { min-height: clamp(215px, 34svh, 280px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-radius: 20px; padding: 18px 20px 15px; background: var(--blue); position: relative; touch-action: pan-y; user-select: none; cursor: grab; }
.word-card:active { cursor: grabbing; }
.word-card.swipe-settle { transition: transform .18s ease, opacity .18s ease; }
.word-card[data-swipe-direction="left"] { box-shadow: inset 0 0 0 2px #e6a594; }
.word-card[data-swipe-direction="right"] { box-shadow: inset 0 0 0 2px #9dc768; }
.word-card[data-swipe-direction]::after { position: absolute; top: 50px; z-index: 2; padding: 7px 10px; border-radius: 8px; background: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; pointer-events: none; }
.word-card[data-swipe-direction="left"]::after { content: "ПРОПУСТИТЬ"; right: 15px; color: #b9654d; }
.word-card[data-swipe-direction="right"]::after { content: "УГАДАЛИ"; left: 15px; color: #607f33; }
.word-card::before { content: ""; position: absolute; width: 190px; height: 190px; right: -51px; top: -73px; border: 1px solid rgba(72,104,152,.12); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.08), 0 0 0 48px rgba(255,255,255,.06); }
.word-card-top, .word-card-bottom { position: relative; display: flex; justify-content: space-between; align-items: center; color: #7789a5; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.word-category { color: #526e9b; }
.word-index { color: #7789a5; }
.word-content { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 130px; text-align: center; }
.word-sparkle { align-self: flex-start; margin-top: 14px; color: #8aa9da; font-size: 18px; }
.word-line { min-width: 0; max-width: 100%; }
.word-content h1 { margin: 0; font: 800 clamp(36px, 9vw, 61px)/1.05 "Manrope", sans-serif; letter-spacing: -.07em; overflow-wrap: anywhere; }
.hint-button { flex: 0 0 auto; min-width: 39px; height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid #9db9e3; border-radius: 12px; background: #fff; color: #3d6396; font-size: 12px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.hint-button span:first-child { font-size: 18px; }
.hint-button:disabled { opacity: .48; cursor: default; }
.hint-button:focus-visible { outline: 3px solid #9acb55; outline-offset: 3px; }
.hint-text { position: relative; max-width: 520px; margin: -4px auto 15px; color: #334a69; text-align: center; font-size: 12px; font-weight: 650; line-height: 1.5; }
.word-card-bottom { gap: 8px; color: #6f84a4; font-size: 10px; font-weight: 600; letter-spacing: 0; }
.overtime-note { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 4px 1px; color: #bd6849; font-size: 11px; font-weight: 700; }
.overtime-note span:first-child { font-size: 15px; }
.turn-counts { display: flex; justify-content: center; gap: 23px; padding: 7px 0 14px; color: #858b81; font-size: 10px; }
.turn-counts > span { display: inline-flex; align-items: center; gap: 6px; }
.turn-counts strong { color: #52594e; }
.count-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; }
.correct-dot { background: #9ecb59; }
.skip-dot { background: #ef9c7e; }
.answer-actions { display: grid; grid-template-columns: .85fr 1.15fr; gap: 10px; }
.button-secondary { color: #656b62; background: #fff; border: 1px solid #e7e8e2; }
.button-success { background: var(--green); color: #273a17; }
.action-icon { font-size: 17px; }
.penalty-note { min-height: 13px; margin: 9px 0 0; text-align: center; color: #a1a59d; font-size: 9px; }
.pause-mark { width: 60px; height: 60px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 20px; background: #edf3e4; color: #6d8841; font-size: 24px; font-weight: 800; }
.pause-content h1, .result-screen h1 { margin: 18px 0 12px; font: 800 58px/.98 "Manrope", sans-serif; letter-spacing: -.075em; }
.pause-content > p { max-width: 290px; margin: 0 auto 25px; }
.result-screen { flex-direction: column; text-align: center; }
.result-screen .eyebrow { justify-content: center; }
.result-confetti { width: 64px; height: 64px; margin-bottom: 23px; display: grid; place-items: center; border-radius: 22px; color: #6c8a3e; background: #e8f2d8; font-size: 34px; transform: rotate(-9deg); }
.winner-caption { margin: 24px 0 2px; color: #92978e; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.winner-name { font: 800 28px "Manrope", sans-serif; letter-spacing: -.045em; }
.final-score { display: flex; align-items: center; justify-content: center; gap: 23px; width: min(100%, 285px); margin: 23px 0 30px; padding: 17px; border: 1px solid #e8e9e2; border-radius: 15px; background: #fff; }
.final-score > div { min-width: 55px; }
.final-score strong { font: 800 29px "Manrope", sans-serif; }
.final-score > i { color: #b1b5ad; font-size: 13px; font-style: normal; }
.result-screen .button { width: min(100%, 320px); }
@media (min-width: 760px) {
  .setup-screen { padding-top: 42px; }
  .intro { text-align: center; }
  .intro .eyebrow { justify-content: center; }
  .intro-copy { margin-left: auto; margin-right: auto; }
  .play-screen { padding-top: 30px; }
  .word-card { min-height: 320px; }
  .word-content { min-height: 175px; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 17px max(18px, env(safe-area-inset-bottom)); }
  .topbar { height: 62px; }
  .setup-screen { padding-top: 32px; }
  .intro { padding: 0 4px 21px; }
  .intro h1 { margin-top: 17px; font-size: clamp(48px, 14vw, 62px); }
  .intro-copy { max-width: 350px; font-size: 13px; }
  .setup-card { padding: 21px 17px 18px; border-radius: 19px; }
  .section-heading { margin-bottom: 20px; }
  .settings-pair { gap: 10px; }
  .difficulty-options { gap: 5px; }
  .difficulty-option { padding: 8px 7px; min-height: 75px; }
  .difficulty-option > span:nth-child(2) { font-size: 10px; }
  .difficulty-option small { font-size: 9px; }
  .category-list { gap: 6px; }
  .category-chip span { min-height: 29px; padding: 0 9px; font-size: 9px; }
  .setup-footer { padding-top: 15px; }
  .play-screen { padding-top: 14px; }
  .scoreboard { margin: 14px 0 15px; }
  .word-card { min-height: clamp(205px, 32svh, 260px); padding: 16px 15px 13px; border-radius: 17px; }
  .word-content { min-height: 120px; }
  .word-content h1 { font-size: clamp(29px, 8vw, 48px); }
  .hint-button { min-width: 35px; height: 35px; border-radius: 10px; }
  .answer-actions { gap: 8px; }
  .button { min-height: 52px; }
  .handoff-screen, .pause-screen, .result-screen { min-height: calc(100svh - 86px); }
  .handoff-content, .pause-content { padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 365px) {
  .app-shell { padding-left: 12px; padding-right: 12px; }
  .setup-card { padding-left: 13px; padding-right: 13px; }
  .difficulty-option { padding-left: 5px; padding-right: 5px; }
  .difficulty-option > span:nth-child(2) { font-size: 9px; }
  .settings-pair { grid-template-columns: 1fr; gap: 0; }
  .category-chip span { padding: 0 7px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Mobile-first interaction sizes and readable secondary text. */
:root { --muted: #626a60; }
body { overflow-wrap: break-word; }
.app-shell { padding-top: env(safe-area-inset-top); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
button, summary, a, input, select { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #547d2c; outline-offset: 3px; }
h1[tabindex]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar { gap: 16px; }
.brand { font-size: 25px; letter-spacing: -.04em; }
.connection-label { font-size: 12px; text-align: right; color: #59634f; }
.setup-screen { max-width: 620px; padding-top: 24px; }
.intro h1 { font-size: clamp(40px, 10vw, 64px); line-height: 1.05; letter-spacing: -.055em; }
.intro-copy { font-size: 16px; color: #5e665b; }
.eyebrow, .step-label { font-size: 12px; color: #626b58; letter-spacing: .08em; }
.mode-list { display: grid; gap: 14px; }
.mode-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; align-items: center; gap: 14px; width: 100%; min-height: 116px; padding: 20px; background: white; border: 1px solid #d5dbcc; border-radius: 20px; text-align: left; cursor: pointer; box-shadow: 0 8px 24px #25301706; }
.mode-card:first-child { background: #f1f8e5; border-color: #a9c77b; }
.mode-card:hover { border-color: #66893c; }
.mode-card strong { display: block; font-size: 18px; line-height: 1.35; }
.mode-card small { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; color: #58624e; }
.mode-icon { display: grid; place-items: center; height: 48px; background: #e5efda; border-radius: 13px; color: #436128; font-size: 28px; }
.menu-note { margin: 20px 0; font-size: 13px; line-height: 1.6; color: #626a5c; text-align: center; }
.retry-button { display: flex; width: min(100%, 620px); margin: 12px auto; }
.text-button { min-height: 44px; min-width: 44px; padding: 10px 8px; font-size: 14px; color: #48652c; }
.back-button { margin-bottom: 12px; }
.danger-text { color: #95422b; }
.field-label, .setting-group legend, .legend { font-size: 14px; color: #4b5544; }
.name-input, .select-wrap select { min-height: 48px; font-size: 16px; }
.segmented button { min-height: 44px; font-size: 16px; }
.difficulty-option { min-height: 88px; padding: 10px; }
.difficulty-option > span:nth-child(2) { font-size: 14px; }
.difficulty-option small, .difficulty-dots { font-size: 12px; color: #59684d; }
.setting-hint, .rule-note, .privacy-note, .penalty-note { font-size: 13px; line-height: 1.6; color: #626a5c; }
.category-details { margin: 0 0 24px; border-block: 1px solid var(--line); }
.category-details summary { min-height: 52px; padding: 15px 0; font-size: 15px; font-weight: 700; cursor: pointer; }
.category-details summary span { color: #626a5c; font-size: 13px; font-weight: 400; margin-left: 10px; }
.legend-row { justify-content: flex-end; }
.category-chip { min-width: 0; max-width: 100%; }
.category-chip span { min-height: 44px; max-width: 100%; padding: 10px 13px; font-size: 14px; line-height: 1.35; color: #596151; }
.category-chip span::before { flex-shrink: 0; }
.switch-label { min-height: 48px; padding: 10px 12px; gap: 12px; font-size: 14px; }
.switch { flex-shrink: 0; }
.button { min-height: 52px; font-size: 16px; }
.form-divider { color: #636a5d; font-size: 14px; }
.room-code.local-title { font-size: 19px; letter-spacing: -.02em; }
.room-header-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 0 6px; }
.room-summary { margin: 10px 0; color: #59624f; font-size: 13px; line-height: 1.5; }
.participant { padding: 10px 14px; gap: 3px; }
.participant > span { font-size: 13px; color: #4c5e3b; }
.participant > small { font-size: 12px; color: #626d57; }
.team-card { padding: 13px; }
.team-heading > strong { font-size: 15px; }
.team-members li { font-size: 13px; }
.team-members small { font-size: 11px; }
.room-connection { font-size: 13px; color: #5f6954; }
.room-panel p { color: #5d6655; font-size: 15px; }
.room-panel h2 { line-height: 1.2; }
.icon-button, .hint-button { min-width: 44px; min-height: 44px; }
.round-label { font-size: 12px; color: #5b6551; }
.timer-meta { font-size: 13px; color: #57634c; }
.timer-meta span:last-child { font-size: 18px; }
.word-card-top { gap: 10px; font-size: 11px; line-height: 1.4; letter-spacing: .04em; }
.word-category { color: #3e5c87; }
.word-index { color: #4a6285; flex-shrink: 0; }
.word-card-bottom { font-size: 12px; color: #415f89; }
.word-card-wrap { overflow: hidden; border-radius: 20px; }
.hint-text { font-size: 15px; }
.turn-counts { font-size: 13px; color: #5f6757; }
.answer-actions { padding: 8px 0; background: var(--paper); grid-template-columns: 1fr 1fr; }
.answer-actions .button { min-height: 56px; }
.page-footer { font-size: 12px; color: #636b5b; }
.page-footer a { display: inline-block; padding-block: 7px; color: #48652c; }
.in-game .page-footer { display: none; }
.mode-icon { display: flex; justify-content: center; gap: 3px; font-size: 0; }
.mode-icon::before, #open-rooms .mode-icon::after { content: ""; width: 13px; height: 23px; border: 2px solid #436128; border-radius: 3px; background: linear-gradient(#436128, #436128) center bottom 2px / 3px 2px no-repeat; }
@media (max-width: 560px) {
  .topbar { height: 60px; }
  .intro { padding-inline: 0; }
  .setup-card { padding: 20px 16px; }
  .play-screen { padding-top: 10px; }
  .room-header { gap: 8px; }
  .room-header-actions { max-width: 55%; }
  .room-header-actions .text-button { font-size: 13px; }
  .room-code { font-size: 21px; }
  .participants { gap: 7px; }
  .team-card { padding: 10px; }
  .team-heading { align-items: flex-start; }
  .team-heading > strong { font-size: 13px; }
  .team-members li { align-items: flex-start; flex-direction: column; gap: 1px; }
  .word-card { min-height: 220px; }
  .word-content { min-height: 110px; }
  .word-content h1 { font-size: clamp(30px, 8vw, 46px); letter-spacing: -.04em; }
  .word-sparkle { display: none; }
  .mode-card { padding: 16px; gap: 12px; grid-template-columns: 40px minmax(0, 1fr) 16px; }
  .mode-card strong { font-size: 17px; }
}
@media (max-width: 360px) {
  .app-shell { padding-inline: 12px; }
  .difficulty-option { padding-inline: 7px; }
  .difficulty-option > span:nth-child(2) { font-size: 13px; }
  .word-card-top { flex-wrap: wrap; }
}
@media (max-width: 560px) and (max-height: 740px) {
  .is-playing .topbar { display: none; }
  .is-playing .play-screen { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .is-playing .room-header { min-height: 44px; margin-bottom: 6px; }
  .is-playing .room-code, .is-playing #copy-room, .is-playing .room-summary { display: none; }
  .is-playing .participant { display: grid; grid-template-columns: 1fr auto; gap: 2px 4px; padding: 8px 10px; }
  .is-playing .participant > strong { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .is-playing .participant > small { grid-column: 1; }
  .is-playing #play-panel { position: relative; margin-top: 10px; }
  .is-playing .play-header { position: absolute; z-index: 1; top: 5px; right: 6px; }
  .is-playing .round-label { display: none; }
  .is-playing .timer-meta { padding-right: 46px; align-items: center; min-height: 24px; }
  .is-playing #play-panel .timer-wrap { margin-top: 0; padding: 10px 12px; }
  .is-playing .word-card-wrap { margin: 10px 0 6px; }
  .is-playing .word-card { min-height: 210px; }
  .is-playing .word-content { min-height: 84px; }
  .is-playing .turn-counts { padding: 6px 0; }
  .is-playing .answer-actions { position: fixed; bottom: 0; left: 0; right: 0; z-index: 3; padding: 10px max(12px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
}
