.full-width{width:100%}
.entry .secondary{margin-top:9px}
.secondary small,.text-button small{font-size:11px;font-weight:400;color:#819087;margin-left:5px}
.text-button{display:block;width:100%;padding:9px 6px 2px;border:0;background:transparent;color:#64766e;font-size:13px}
.text-button:hover{color:var(--green)}
.dialogue{display:grid;gap:10px;margin:20px auto;max-width:620px}
.dialogue-title{font-size:12px;font-weight:700;color:#6b8278;margin:0 0 1px}
.speech-line{display:grid;grid-template-columns:36px 1fr;gap:11px;align-items:center;padding:13px 16px;background:#f2f7f4;border:1px solid #e0eae3;border-radius:11px}
.speech-line:nth-child(2){background:#f6f4ee;border-color:#ede6d8}
.speech-line b{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#dcece4;color:#236b59;font-size:12px}
.speech-line:nth-child(2) b{background:#efe5d4;color:#946439}
.speech-line span{font:17px/1.6 Georgia,"Times New Roman",serif;color:#263d3b}
.listen-status{display:flex;flex-direction:column;align-items:center;gap:5px;margin:16px 0;color:#527269;font-size:13px}
.listen-status .text-button{width:auto;padding:5px 10px}
.speech-play{height:38px;padding:0 17px;margin-top:5px}
.replay{display:block;margin:0 auto 14px;height:36px}
.leave-action{border:1px solid #d7e0db;border-radius:8px;background:#fff;color:#63736d;padding:8px 13px;font-size:13px}
.leave-action:hover{border-color:#b75f4b;background:#fff7f4;color:#a44432}
.leave-action:disabled{opacity:.55;cursor:wait}
@media(max-width:560px){.speech-line{padding:11px 12px}.speech-line span{font-size:15px}}
.segment-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 0 12px;color:#315b50;font-size:13px}
.segment-head span{color:#71847b;font-size:12px;text-align:right}
#playSegment{display:block;margin:4px auto 18px}
.segment-controls{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin:4px auto 18px}
.segment-controls .speech-play,.segment-controls .primary{width:auto;min-width:150px;margin:0;padding:0 18px}
.segment-question{padding:17px 0;border-top:1px solid #e4eae6}
.segment-question h3{font-size:15px;line-height:1.5;margin:0 0 12px;font-weight:600}
.segment-question-prompt{display:flex;align-items:flex-start;gap:10px;margin:0 0 12px}
.segment-question-prompt>span{flex:none;min-width:54px;padding:5px 7px;border-radius:5px;background:#edf4ef;color:#34735e;text-align:center;font-size:12px;font-weight:700}
.segment-question-prompt h3{margin:1px 0 0;color:#263c36;font-size:17px;line-height:1.6;font-weight:650}
.segment-question .option:disabled{opacity:1;cursor:default;color:#354640;background:#fbfcfb}
.segment-question .option:disabled .letter{opacity:1}
.segment-option-label{margin:0 0 8px 64px;color:#75847c;font-size:12px}
.segment-action{display:flex;align-items:center;justify-content:flex-end;gap:14px;color:#6c7972;font-size:12px}
.segment-action .secondary{margin:9px 0 0;padding:0 14px}
.review-answer{text-align:left;padding:12px 0;border-bottom:1px solid #e5ebe7;font-size:13px;line-height:1.6}
.review-answer b{display:block;color:#286c57}
.transcript{text-align:left;margin:20px 0;line-height:1.75;font-size:13px;color:#485b52}
.transcript summary{cursor:pointer;font-weight:600}
.transcript p{white-space:pre-wrap}
@media(max-width:560px){.segment-head{align-items:flex-start;flex-direction:column}.segment-head span{text-align:left}.segment-action{justify-content:space-between}}

.mode-select{border:0;padding:0;margin:18px 0 4px;display:grid;gap:8px}
.mode-select legend{font-size:12px;font-weight:700;color:#64766e;margin-bottom:8px}
.mode-select label{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid #dce5df;border-radius:9px;cursor:pointer;background:#fff}
.mode-select label:has(input:checked){border-color:#177563;background:#f0f7f3;box-shadow:0 0 0 1px #177563}
.mode-select input{width:16px;height:16px;accent-color:#177563}
.mode-select span{display:grid;gap:2px}
.mode-select b{font-size:13px;color:#192d38}
.mode-select small{font-size:11px;color:#74817d}
.answer-review-row,.answer-review{max-width:620px;margin:12px auto;padding:15px 17px;border:1px solid #dce5df;border-left:4px solid #9aa8a0;border-radius:10px;background:#fbfcfb;text-align:left}
.answer-review-row.is-correct,.answer-review.is-correct{border-left-color:#188467;background:#f2faf6}
.answer-review-row.is-wrong,.answer-review.is-wrong{border-left-color:#cf5a53;background:#fff7f5}
.answer-review-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;color:#183b34;font-size:14px}
.answer-review-title>b{font-weight:700}
.answer-mark{width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:#e3eee8;color:#168064;font-size:17px;font-weight:800}
.is-wrong .answer-mark{background:#f8e2df;color:#c74d48}
.answer-review-choice{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:start;gap:10px;padding:9px 0;border-top:1px solid #e4ebe6;font-size:13px}
.answer-review-choice>span{color:#74817d}
.answer-review-choice>strong{color:#233d36;font-weight:600;overflow-wrap:anywhere}
.answer-review-choice.correct-choice>strong{color:#16775f}
.answer-review-row>p{margin:8px 0 0;color:#64766e;font-size:12px;line-height:1.6}
@media(max-width:560px){.mode-select label{padding:10px}.answer-review-row,.answer-review{padding:13px}.answer-review-choice{grid-template-columns:74px minmax(0,1fr);gap:7px}}

.answer-review-choice.correct-choice{background:#f2faf6;border-radius:6px}

@media(max-width:820px){
  .room{display:flex;flex-direction:column;gap:9px}
  .room>section{display:contents}
  .room-head{order:0;width:100%;margin:0;padding:3px 1px}
  .room-head .eyebrow{font-size:9px}
  .room-head h1{font-size:15px;margin:1px 0}
  .leave-action{font-size:11px;padding:7px 9px}
  .score{order:1;width:100%;padding:8px 11px;border-radius:10px}
  .score-head{margin:0 0 4px;display:flex;align-items:center;gap:8px}
  .score-head .eyebrow{font-size:9px;letter-spacing:0}
  .score h2{font-size:12px;margin:0}
  .live{position:static;margin-left:auto;font-size:8px}
  #scores{display:flex;gap:6px;overflow:hidden}
  .score-row{min-width:0;flex:1;display:grid;grid-template-columns:16px minmax(0,1fr) auto;gap:4px;padding:4px 6px;border:1px solid #e5ece7;border-radius:7px;background:#fbfdfb}
  .score-row .rank{font-size:9px;width:14px}
  .score-row .person-name{font-size:10px}
  .score-row .points{font-size:10px}
  .legend{display:none}
  #lobby,#question,#reveal,#finished{order:2;width:100%;min-height:0;padding:12px 13px;border-radius:11px}
  #question .round{grid-template-columns:1fr 78px 23px;gap:7px;margin-bottom:8px}
  #question .badge{font-size:9px;padding:4px 7px}
  #question .question-title{margin:2px 0 5px}
  #question .question-title h2{font-size:23px;margin:2px}
  #question .question-title>span{font-size:11px}
  #question .prompt{font-size:12px;line-height:1.4;margin:5px auto 8px}
  #question .options{gap:5px}
  #question .option{min-height:34px;padding:6px 8px;gap:6px;border-radius:7px;font-size:11px}
  #question .letter{width:19px;height:19px;font-size:9px}
  #question .answer-status{font-size:10px;margin:6px 0 0;min-height:13px}
  #question>.primary{height:36px;margin-top:6px;font-size:12px}
  #segmentTitle{font-size:11px}
  #segmentProgress{font-size:9px}
  #segmentQuestions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .segment-question{padding:7px!important;border-radius:8px!important}
  .segment-question-prompt{margin-bottom:4px!important}
  .segment-question-prompt>span{font-size:10px!important}
  .segment-question-prompt h3{font-size:10px!important;line-height:1.25!important;margin:2px 0!important}
  .segment-option-label{font-size:8px!important;margin:2px 0!important}
  .segment-question .options{grid-template-columns:1fr!important;gap:3px!important}
  .segment-question .option{min-height:25px!important;padding:3px 5px!important;font-size:9px!important}
  .segment-question .letter{width:16px!important;height:16px!important;font-size:8px!important}
  .segment-action{margin-top:4px!important;gap:3px!important;font-size:8px!important}
  .segment-action button{height:25px!important;padding:0 6px!important;font-size:9px!important}
  .panel{min-height:0}
}
@media(max-width:390px){
  .room{gap:6px}
  .score{padding:6px 8px}
  #scores{gap:3px}
  .score-row{padding:3px 4px;grid-template-columns:12px minmax(0,1fr) auto}
  .score-row .person-name,.score-row .points{font-size:9px}
  #lobby,#question,#reveal,#finished{padding:10px}
  #segmentQuestions{gap:4px}
  .segment-question .option{font-size:8px!important}
}
@media(max-width:820px){
  body.in-room footer{display:none}
  body.in-room main{padding-top:4px;padding-bottom:12px}
  body.in-room .room{gap:6px}
  body.in-room .room-head{margin:0;padding:0 1px}
}

/* Home lobby: warm paper, forest green, and compact touch controls. */
.ui-icon{display:block;flex:none;width:20px;height:20px}
body:not(.in-room){background:#f6f5ef;color:#183e37}
body:not(.in-room) .topbar{height:72px;padding:0 max(24px,calc((100vw - 1120px)/2));background:transparent;border-bottom:1px solid #e1e5db}
body:not(.in-room) .brand{gap:10px;font-size:20px;color:#183e37;letter-spacing:.03em}
body:not(.in-room) .brand-mark{width:40px;height:40px;border-radius:13px;background:#204c40;box-shadow:0 3px 0 #d7ded0;color:#fffaf0;font-size:22px}
body:not(.in-room) .brand small{margin-top:2px;color:#65776a;font-size:9px;font-weight:500;letter-spacing:.16em}
body:not(.in-room) #leaderboardToggle{display:flex;align-items:center;gap:9px;min-height:44px;padding:9px 15px;border:1px solid #d9e0d4;border-radius:24px;background:#fbfcf8;color:#365347;font-size:13px;font-weight:600;transition:background .15s,border-color .15s}
body:not(.in-room) #leaderboardToggle:hover{background:#edf2e7;border-color:#a6b8a1}
body:not(.in-room) #leaderboardToggle .ui-icon{width:17px;height:17px;color:#977132}
body:not(.in-room) main{max-width:1120px;padding:40px 24px 24px}
#home{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,448px);align-items:center;gap:68px}
#home .hero{min-width:0;padding:12px 0 20px}
#home .hero-kicker{display:flex;align-items:center;gap:8px;color:#596d59;font-size:11px;font-weight:600;letter-spacing:.1em}
#home .kicker-dot{width:6px;height:6px;border-radius:50%;background:#a27636;box-shadow:0 0 0 4px #eee8d8}
#home .hero h1{font-size:clamp(38px,4.7vw,56px);font-weight:750;line-height:1.26;letter-spacing:-.035em;margin:20px 0 0;color:#183e37}
#home .hero h1 span{color:#57806c}
#home .hero h1 br{display:initial}
#home .word-art{position:relative;height:234px;margin:30px 4px 0;max-width:405px}
#home .word-orbit{position:absolute;top:0;left:20px;width:255px;height:215px;border:1px solid #d8dfcf;border-radius:50%;transform:rotate(-28deg)}
#home .word-card-shadow{position:absolute;top:36px;left:25px;width:calc(100% - 48px);height:163px;background:#e8d6a8;border:1px solid #ddcfa9;border-radius:15px;transform:rotate(7deg)}
#home .word-card{position:absolute;top:23px;left:10px;width:calc(100% - 35px);padding:19px 23px 17px;background:#fffef9;border:1px solid #dde1d4;border-radius:15px;transform:rotate(-4deg);box-shadow:0 12px 26px #2943340a}
#home .word-card-top{display:flex;align-items:center;justify-content:space-between;color:#77816b;font-size:8px;font-weight:700;letter-spacing:.15em}
#home .word-star{font-size:27px;line-height:1;color:#bb8d42}
#home .word-card>strong{display:block;font:italic 600 41px/1.25 Georgia,serif;color:#264c3d;margin:7px 0 1px}
#home .word-card>strong>span{color:#c29a4c}
#home .word-phonetic{font:12px/1.5 Arial,sans-serif;color:#718272}
#home .word-card-bottom{margin-top:15px;padding-top:12px;border-top:1px solid #e8eadf;display:flex;justify-content:space-between;gap:8px;color:#587260;font-size:11px}
#home .word-card-bottom>span:last-child{color:#87917e;font-size:10px}
#home .word-art-tag{position:absolute;right:0;bottom:13px;display:flex;align-items:center;gap:8px;padding:11px 14px;border:1px solid #dbe3d5;border-radius:30px;background:#f0f5e9;color:#4a6b52;font-size:11px;transform:rotate(3deg)}
#home .word-art-tag .ui-icon{width:16px;height:16px}
#home .word-art-spark{position:absolute;left:-7px;bottom:10px;color:#bc9254;font-size:35px;font-weight:300;transform:rotate(15deg)}
#home .entry{min-width:0;max-width:none;width:100%;padding:24px;background:#fffefa;border:1px solid #e2e5d9;border-radius:23px;box-shadow:0 16px 45px #344e3610,0 2px 6px #344e3604}
#home .entry-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:19px}
#home .entry-heading h2{margin:0;color:#24483c;font-size:20px;font-weight:700;letter-spacing:-.02em}
#home .entry-heading>span{color:#8a947f;font-size:9px;font-weight:600;letter-spacing:.12em}
#home .entry-heading>span>span{font-size:16px;margin-left:5px;color:#aa8042}
#home .field-label,#home .mode-select legend,#home .join-heading label{display:block;margin:0 0 7px;color:#3c5344;font-size:12px;font-weight:650;line-height:1.35}
#home .nickname-field{position:relative}
#home .nickname-field>.ui-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:#7a8a72;pointer-events:none}
#home .entry input:not([type="radio"]){height:46px;min-width:0;border:1px solid #dce2d4;border-radius:10px;background:#f7f8f2;color:#274336;font-size:16px;font-weight:400;transition:border-color .15s,background .15s}
#home .entry input:not([type="radio"]):focus{border-color:#64876d;background:#fffefb;outline:2px solid #c5d6b3;outline-offset:2px}
#home .entry input::placeholder{color:#8b9784}
#home #nickname{padding:0 12px 0 42px;width:100%}
#home .mode-select{min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;border:0;margin:17px 0 0}
#home .mode-select legend{padding:0;margin-bottom:9px}
#home .mode-select .mode-card{position:relative;min-width:0;min-height:99px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;margin:0;padding:12px 4px 10px;border:1px solid #e1e6d9;border-radius:12px;background:#fcfcf7;cursor:pointer;text-align:center;transition:background .15s,border-color .15s,box-shadow .15s}
#home .mode-select input[type="radio"]{position:absolute;top:9px;right:9px;width:16px;height:16px;margin:0;padding:0;opacity:0;cursor:pointer}
#home .mode-select .mode-card:has(input:checked){background:#edf3e5;border-color:#5a7b55;box-shadow:inset 0 0 0 1px #5a7b55}
#home .mode-select .mode-card:focus-within{outline:2px solid #b18031;outline-offset:3px}
#home .mode-select .mode-card:hover{border-color:#91a483;background:#f2f6ea}
#home .mode-select .mode-check{position:absolute;top:5px;right:5px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#3d6845;color:white;font-size:10px;font-weight:800;opacity:0}
#home .mode-select input:checked+.mode-check{opacity:1}
#home .mode-select .mode-icon{display:grid;place-items:center;width:32px;height:30px;border-radius:9px}
#home .mode-icon-mixed{color:#49704b;background:#e3edda}
#home .mode-icon-words{color:#a57d37;background:#f5eddb}
#home .mode-icon-listening{color:#567c8c;background:#e8eff1}
#home .mode-select .mode-icon .ui-icon{width:20px;height:20px}
#home .mode-select .mode-copy{display:grid;gap:4px;min-width:0}
#home .mode-select b{color:#365340;font-size:13px;line-height:1.2;font-weight:650;white-space:nowrap}
#home .mode-select small{color:#73816c;font-size:11px;line-height:1.2;white-space:nowrap}
#home #create{display:flex;align-items:center;justify-content:center;gap:15px;width:100%;height:48px;margin-top:18px;border:1px solid #234d3b;border-radius:11px;background:#234d3b;color:#fffef4;font-size:15px;font-weight:650;box-shadow:0 3px 0 #173a2d;transition:background .15s,box-shadow .15s}
#home #create .ui-icon{width:18px;height:18px}
#home #create:hover{background:#163c2c;box-shadow:0 3px 0 #0f2b20}
#home #create:active{box-shadow:0 1px 0 #173a2d}
#home .practice-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:13px}
#home .practice-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;height:auto;margin:0;padding:9px 5px;border:1px solid #e1e5d8;border-radius:10px;background:#f7f8f1;color:#486044;font-size:13px;font-weight:600}
#home .practice-actions button .ui-icon{width:17px;height:17px;color:#6c805d}
#home .practice-actions button:hover{background:#edf2e4;border-color:#a8b69a}
#home .entry-note{margin:8px 0 0;text-align:center;font-size:11px;line-height:1.35;color:#7b8670}
#home .join-area{margin-top:17px;padding-top:15px;border-top:1px dashed #dfe4d5}
#home .join-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px}
#home .join-heading label{margin:0}
#home .join-heading>span{color:#89917c;font-size:10px}
#home .join{display:flex;gap:8px}
#home #code{flex:1;width:0;padding:0 12px;letter-spacing:.12em}
#home #join{display:flex;align-items:center;justify-content:center;gap:10px;min-height:46px;margin:0;padding:0 17px;border:1px solid #c6d3b9;border-radius:10px;background:#edf2e5;color:#3e5c3e;font-size:14px;font-weight:650}
#home #join .ui-icon{width:16px;height:16px}
#home #join:hover{background:#e1ead4;border-color:#8ba67d}
#home .ranked-note{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:11px;font-size:10px}
#home .ranked-note .ui-icon{width:12px;height:12px;color:#9c854f}
#home button:focus-visible{outline:3px solid #ba913b;outline-offset:3px}
#homeError:empty{display:none}
#homeError{min-height:0;margin:10px 0 0;padding:8px 10px;border-radius:8px;background:#fff0e9;color:#a04530;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
body:not(.in-room) footer{max-width:1120px;display:flex;justify-content:space-between;gap:12px;margin:auto;padding:8px 24px 20px;color:#818a75;font-size:10px;line-height:1.4}
body:not(.in-room) footer b{color:#687b60;font-size:10px}
@media(max-width:980px) and (min-width:821px){
  #home{gap:28px;grid-template-columns:minmax(0,1fr) 390px}
  #home .hero h1{font-size:40px}
  #home .word-card{padding:15px}
  #home .word-card>strong{font-size:34px}
  #home .word-card-bottom>span:last-child{display:none}
}
@media(max-width:820px){
  body:not(.in-room) .topbar{height:52px;padding:0 14px}
  body:not(.in-room) .brand{gap:8px;font-size:16px}
  body:not(.in-room) .brand-mark{width:32px;height:32px;border-radius:10px;font-size:18px;box-shadow:0 2px 0 #d7ded0}
  body:not(.in-room) .brand small{font-size:8px;margin-top:1px}
  body:not(.in-room) #leaderboardToggle{min-height:44px;padding:7px 10px;gap:6px;font-size:12px;border:0;background:transparent}
  body:not(.in-room) #leaderboardToggle .ui-icon{width:16px;height:16px}
  body:not(.in-room) main{padding:10px 12px 8px}
  #home{width:100%;max-width:480px;margin:auto;grid-template-columns:minmax(0,1fr);gap:12px}
  #home .hero{padding:0 4px}
  #home .hero-kicker{font-size:10px;line-height:1.3;gap:7px;letter-spacing:.05em}
  #home .kicker-dot{width:5px;height:5px;box-shadow:0 0 0 3px #eee8d8}
  #home .hero h1{font-size:28px;line-height:1.18;margin:7px 0 0;letter-spacing:-.03em}
  #home .word-art{display:none}
  #home .entry{padding:16px;border-radius:18px;box-shadow:0 8px 24px #344e3609}
  #home .entry-heading{margin-bottom:12px}
  #home .entry-heading h2{font-size:16px}
  #home .entry-heading>span{font-size:8px}
  #home .field-label,#home .mode-select legend,#home .join-heading label{font-size:12px;line-height:1.25}
  #home .field-label{margin-bottom:5px}
  #home .entry input:not([type="radio"]){height:44px;font-size:16px}
  #home .mode-select{margin-top:12px;gap:7px}
  #home .mode-select legend{margin-bottom:7px}
  #home .mode-select .mode-card{min-height:82px;padding:8px 2px;gap:5px;border-radius:10px}
  #home .mode-select .mode-icon{width:27px;height:25px;border-radius:7px}
  #home .mode-select .mode-icon .ui-icon{width:18px;height:18px}
  #home .mode-select .mode-copy{gap:3px}
  #home .mode-select b{font-size:12px}
  #home .mode-select small{font-size:10px}
  #home #create{height:44px;margin-top:12px;border-radius:10px}
  #home .practice-actions{margin-top:10px;gap:8px}
  #home .practice-actions button{min-height:44px;font-size:13px;gap:6px;border-radius:9px;padding:8px 3px}
  #home .entry-note{margin-top:6px;font-size:10px}
  #home .join-area{margin-top:10px;padding-top:10px}
  #home .join-heading{margin-bottom:6px}
  #home #join{min-height:44px;padding:0 14px}
  #home .ranked-note{margin-top:7px;font-size:10px}
  body:not(.in-room) footer{max-width:504px;justify-content:center;flex-direction:row;padding:0 12px 8px;font-size:9px}
  body:not(.in-room) footer b{display:none}
}
@media(max-width:820px) and (max-height:740px){
  body:not(.in-room) .topbar{height:48px}
  body:not(.in-room) main{padding-top:8px;padding-bottom:6px}
  #home{gap:9px}
  #home .hero h1{font-size:24px;line-height:1.18;margin-top:5px}
  #home .entry{padding:12px}
  #home .entry-heading{display:none}
  #home .mode-select{margin-top:10px}
  #home .mode-select .mode-card{min-height:76px;padding:7px 2px;gap:4px}
  #home #create{margin-top:10px}
  #home .practice-actions{margin-top:8px}
  #home .join-area{margin-top:8px;padding-top:8px}
}
@media(max-width:820px) and (max-height:640px){
  #home .hero{padding:0}
  #home .hero h1{font-size:clamp(20px,6vw,24px);line-height:1.2}
  #home .hero h1 br{display:none}
}
@media(prefers-reduced-motion:reduce){#home *,body:not(.in-room) #leaderboardToggle{transition:none}}
