/* v07: thirty-second word editing and the staged spoken submission. */
.word-header-tools{display:flex;align-items:center;gap:12px}
#game[data-screen=playing] .word-task{display:none}
.draft-area:has(.draft-placeholder){min-height:65px}.sentence-preview.is-empty{display:none}
.word-empty{font-size:13px;line-height:1.6;margin:9px 0;color:#52694e}
.round-timer{flex:none;display:grid;gap:3px;min-width:64px;text-align:right;font-variant-numeric:tabular-nums}
.round-timer strong{font-size:24px;line-height:1;color:var(--ink)}
.round-timer progress{width:64px;height:4px;appearance:none;border:0;background:#d9dfc8}
.round-timer progress::-webkit-progress-bar{background:#d9dfc8;border-radius:0}.round-timer progress::-webkit-progress-value{background:#216b4b}.round-timer progress::-moz-progress-bar{background:#216b4b}
.round-timer.is-urgent strong{color:#b63822}.round-timer.is-urgent progress::-webkit-progress-value{background:#b63822}
.word-filters{display:flex;gap:4px;flex:none}.word-filters button{height:27px;min-width:38px;padding:4px 9px;border-radius:4px;background:#edf0df;font-size:11px;line-height:1}
.word-filters button[aria-pressed=true]{background:var(--ink);color:var(--paper)}
.word-search{font:500 12px/1.3 var(--body);background:#fffdf5;border:1px solid #91a28d;border-radius:4px;padding:5px 9px;width:150px;min-width:0;height:28px;color:var(--ink);caret-color:#b63822}
.word-search::placeholder{color:#52694e;opacity:1}
.bank-caption{align-items:center;gap:8px}.word-count{margin-left:auto;white-space:nowrap}
.word-tile{position:relative}.word-tile.is-used{opacity:1;border-color:#398363;box-shadow:none}.word-tile.is-used .used-count{position:absolute;right:-3px;top:-4px;min-width:13px;height:13px;border-radius:3px;background:#216b4b;color:#fffdf5;padding:0 2px;font-size:9px;line-height:13px;pointer-events:none}
#game[data-screen=briefing] .prompt-line,#game[data-screen=briefing] .situation{display:none}
.mission-logo{position:absolute;top:1%;left:3%;width:56%;height:35%;object-fit:contain;filter:drop-shadow(0 4px 4px #132f2938)}
#game[data-screen=briefing] .stage-copy{top:7%;left:62%;right:4%;bottom:auto}
#game[data-screen=briefing] .speech{font-size:clamp(22px,2.5cqw,30px);padding:20px 23px 44px;line-height:1.55;white-space:normal;text-wrap:pretty}
#game[data-screen=briefing] .actions{left:5%;right:auto;bottom:5%;width:30%;z-index:5}
#game[data-screen=briefing] .actions button{width:100%;font-size:22px}
#game:is([data-screen=assembly],[data-screen=shout],[data-screen=boss-think]) .narrative{position:absolute;inset:0;display:block;pointer-events:none}
#game:is([data-screen=assembly],[data-screen=shout],[data-screen=boss-think]) .actions{left:auto;right:3%;top:auto;bottom:3%;z-index:6;justify-content:flex-end}
#game:is([data-screen=assembly],[data-screen=shout],[data-screen=boss-think]) .actions button{min-width:110px;min-height:40px;font-size:12px;padding:8px 13px;background:#fff8e6e8}
.assembly-heading{position:absolute;top:3%;left:4%;right:4%;text-align:center;font:900 clamp(22px,3.3cqw,36px)/1.3 var(--display);color:#fff8e6;}
#game[data-screen=assembly] .assembly-speech{position:absolute;top:5%;left:5%;right:5%;height:58%;padding:22px 28px 45px;transform:translate(var(--impact-x,0px),var(--impact-y,0px))!important;--bubble-fill:#fffdf5}
.assembly-lines{position:relative;z-index:1;display:flex;flex-direction:column;gap:14px;height:100%;overflow:auto;padding:2px}
.assembly-line{display:flex;gap:12px;align-items:flex-start}.line-number{flex:none;font:700 13px/28px var(--body);color:#48654e}
.assembly-words{display:flex;flex-wrap:wrap;gap:5px;min-width:0;align-content:flex-start}
.flying-word{display:inline-block;position:relative;background:#f7e5ad;border:1px solid #9b895a;border-radius:3px;padding:5px 8px;font:700 clamp(13px,1.8cqw,20px)/1.2 var(--body);color:var(--ink);will-change:transform,opacity}
.unspoken{font-size:15px;color:#63745f}.impact-letter{position:absolute;bottom:14%;left:5%;font-family:var(--display)}
.shout-rays{display:none}
.shout-cry{position:absolute;left:5%;top:4%;font:900 clamp(48px,8cqw,88px)/1.1 var(--body);letter-spacing:-.03em;color:var(--paper);opacity:var(--shout-title-opacity,1);z-index:3}
#game[data-screen=shout] .shout-speech{position:absolute;left:44%;right:3%;top:16%;max-height:64%;padding:24px 27px 46px;display:flex;flex-direction:column;min-width:0;transform:translate(var(--impact-x,0px),var(--impact-y,0px))!important;--bubble-fill:#fffdf5;z-index:2}
.shout-speech .bubble-text{display:block;flex:1 1 auto;min-width:0;min-height:0;pointer-events:auto;opacity:var(--speech-opacity,1);overflow:auto;overflow-wrap:anywhere;white-space:normal;overscroll-behavior:contain;scrollbar-gutter:stable;font:700 clamp(17px,2.4cqw,27px)/1.7 var(--body);text-wrap:pretty}.shout-speech p{margin:0 0 9px}.shout-speech p:last-child{margin-bottom:0}
.shout-impact{position:absolute;top:7%;right:5%;font:900 clamp(24px,4cqw,44px)/1.2 var(--body);color:var(--paper);opacity:var(--impact-opacity,1);z-index:3}
.thinking-word{position:relative;z-index:1;font:900 clamp(30px,4cqw,48px)/1.5 var(--body);color:var(--ink);white-space:nowrap}
.thinking-note{display:none;position:absolute;top:5%;left:5%;right:5%;text-align:center;font-size:14px;font-weight:700;color:#fff8e6;}
#game[data-screen=result] .narrative{position:absolute;inset:0;display:block}
.result-sheet{position:absolute;left:36%;right:4%;top:4%;max-height:92%;padding:24px 28px;display:flex;flex-direction:column;gap:14px;min-height:0;background:var(--paper);border:2px solid var(--ink);border-radius:14px;pointer-events:auto;color:var(--ink)}
.result-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none}
#game[data-screen=result] .result-heading h1{font-size:clamp(40px,5.5cqw,62px);line-height:1.2;font-weight:900;color:var(--ink)}
#game[data-screen=result][data-verdict=failed] .result-heading h1{color:#b63822}
.result-score{font:900 clamp(25px,3.3cqw,38px)/1.2 var(--display);font-variant-numeric:tabular-nums;white-space:nowrap}.result-score span{font:700 11px/1.4 var(--body)}
.result-reason{margin:0;font-size:14px;line-height:1.7;font-weight:700;flex:none;text-wrap:pretty}
.result-measures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;flex:none;padding-bottom:12px;border-bottom:1px solid #bdc7aa}
.result-measure>div{display:flex;align-items:baseline;justify-content:space-between;gap:6px;font-size:10px}.result-measure strong{font-size:11px}.result-measure span{white-space:nowrap;font-variant-numeric:tabular-nums}
.result-measure meter{width:100%;height:7px;display:block;margin-top:6px}.result-measure meter::-webkit-meter-bar{background:#dce1cc;border:0;border-radius:0}.result-measure meter::-webkit-meter-optimum-value{background:#307458}.result-measure meter::-moz-meter-bar{background:#307458}
.result-document{min-height:0;overflow:auto;flex:0 1 auto;padding:3px 4px 3px 0;scrollbar-width:thin}
.result-document h2{font:700 12px/1.5 var(--body);margin:0 0 12px;color:#48654e}
.result-document p{display:flex;align-items:flex-start;gap:12px;margin:0 0 13px;font-size:16px;font-weight:700;line-height:1.8;overflow-wrap:anywhere}.result-document p b{font-size:10px;line-height:2.8;color:#48654e;font-variant-numeric:tabular-nums}.result-document p span{min-width:0}
.result-ending{flex:none;margin:0;font-size:12px;line-height:1.7;color:var(--muted)}
#game[data-screen=result] .actions{left:36%;right:4%;bottom:18px;gap:12px}
#game[data-screen=result] .actions button{min-width:0;flex:1;font-size:16px;min-height:48px;padding:10px 15px}
#game[data-screen=review] .review-items{left:36%;right:4%;top:17%;bottom:92px;display:flex;flex-direction:column;gap:12px;overflow:auto;padding:18px;background:#fff8e6f5;border-radius:12px}
#game[data-screen=review] .review-item{position:relative;padding:12px 14px;flex:none;min-height:0;background:#e9edd8}
#game[data-screen=review] .review-item p{font-size:14px;line-height:1.8}
#game[data-screen=review] .actions{left:36%;right:4%;bottom:18px}
@media(max-width:600px){
 .word-studio-head h2{font-size:17px;white-space:normal;text-wrap:balance}.word-header-tools{gap:7px}.round-timer{min-width:44px}.round-timer strong{font-size:21px}.round-timer progress{width:44px}
 .bank-caption{flex-wrap:wrap;gap:5px 7px;padding-top:5px}.word-filters{gap:3px}.word-filters button{font-size:10px;min-width:32px;padding:4px 6px;height:25px}.word-search{width:100%;flex:1;min-width:90px;max-width:130px;height:25px;font-size:11px}.word-count{font-size:9px}
 .mission-logo{top:1%;left:3%;width:94%;height:18%}
 #game[data-screen=briefing] .stage-copy{top:19%;left:8%;right:5%}
 #game[data-screen=briefing] .speech{font-size:20px;padding:15px 19px 41px;line-height:1.5;text-align:center}
 #game[data-screen=briefing] .actions{left:5%;right:5%;bottom:3%;width:auto}#game[data-screen=briefing] .actions button{font-size:20px;min-height:48px}
 .assembly-heading{font-size:22px;top:3%}
 #game[data-screen=assembly] .assembly-speech{left:3%;right:3%;top:5%;height:60%;padding:17px 15px 40px}
 .assembly-lines{gap:10px}.assembly-line{gap:7px}.line-number{font-size:10px;line-height:25px}.assembly-words{gap:4px}.flying-word{font-size:13px;padding:4px 6px}
 .shout-cry{font-size:46px;left:5%;top:4%}
 #game[data-screen=shout] .shout-speech{left:5%;right:5%;top:15%;max-height:28%;padding:18px 19px 42px}
 .shout-speech .bubble-text{font-size:16px;line-height:1.65}.shout-speech p{margin-bottom:7px}.shout-impact{top:9%;right:5%;font-size:25px}
 .thinking-word{font-size:28px}.thinking-note{display:none;font-size:12px}
 .result-sheet{left:4%;right:4%;top:4%;max-height:92%;padding:20px 18px;gap:14px;background:var(--paper)}
 #game[data-screen=result] .result-heading h1{font-size:43px}.result-heading{gap:10px}.result-score{font-size:29px}.result-score span{font-size:9px}.result-reason{font-size:16px;line-height:1.7}
 .result-measures{gap:8px;padding-bottom:11px}.result-measure>div{display:block;font-size:10px}.result-measure strong{font-size:11px;display:block;white-space:nowrap}.result-measure span{font-size:10px}
 .result-document p{font-size:16px;line-height:1.8;margin-bottom:13px;gap:8px}.result-document h2{font-size:11px}.result-ending{font-size:12px}
 #game[data-screen=result] .actions{left:4%;right:4%;bottom:16px;gap:9px}#game[data-screen=result] .actions button{font-size:13px;min-height:46px;padding:9px 10px}
 #game[data-screen=review] .review-items{left:4%;right:4%;top:15%;bottom:90px;padding:13px;gap:9px}#game[data-screen=review] .review-item p{font-size:13px}
 #game[data-screen=review] .actions{left:4%;right:4%;bottom:16px}#game[data-screen=review] .actions button{min-width:0;min-height:44px;font-size:13px}
}
@media(max-height:650px){
 .result-sheet{padding:15px 18px;gap:10px}.result-reason{font-size:12px}.result-ending{display:none}.result-document p{font-size:13px;margin-bottom:8px}.result-measures{padding-bottom:8px}
}
@media(min-width:601px) and (max-height:500px){
 .word-header-tools{gap:6px}.round-timer{min-width:39px}.round-timer strong{font-size:17px}.round-timer progress{width:39px;height:3px}
 .bank-caption{display:flex;flex-wrap:wrap;grid-row:2;height:auto;align-content:flex-start}.word-filters{gap:2px}.word-filters button{font-size:9px;min-width:26px;padding:3px 4px;height:22px}.word-search{display:none}.word-count{display:none}
 .word-studio-body{grid-template-rows:28px 25px minmax(0,1fr) 27px}
 .mission-logo{height:30%;width:54%;top:1%}#game[data-screen=briefing] .stage-copy{top:3%;left:61%;right:3%}#game[data-screen=briefing] .speech{font-size:17px;padding:12px 15px 37px}#game[data-screen=briefing] .actions{bottom:4%;width:25%}#game[data-screen=briefing] .actions button{font-size:16px;min-height:40px}
 .assembly-heading{font-size:21px;top:2%}#game[data-screen=assembly] .assembly-speech{top:15%;left:3%;right:3%;height:60%;padding:13px 17px 36px}.assembly-lines{gap:7px}.flying-word{font-size:11px;padding:3px 5px}.line-number{font-size:9px}
 .shout-cry{font-size:39px}.shout-speech .bubble-text{font-size:14px;line-height:1.5}#game[data-screen=shout] .shout-speech{left:38%;top:12%;max-height:71%;padding:15px 18px 39px}.shout-impact{font-size:26px;top:5%;right:4%}.thinking-word{font-size:38px}
 .result-sheet{left:31%;right:3%;top:3%;max-height:94%;padding:12px 16px;gap:6px}#game[data-screen=result] .result-heading h1{font-size:32px}.result-score{font-size:24px}.result-reason{font-size:11px;line-height:1.5}.result-measures{gap:10px;padding-bottom:6px}.result-measure strong{font-size:10px}.result-document h2{display:none}.result-document p{font-size:11px;line-height:1.6;margin-bottom:7px}
 #game[data-screen=result] .actions{left:31%;right:3%;bottom:9px}#game[data-screen=result] .actions button{font-size:12px;min-height:38px}
 #game[data-screen=review] .review-items{left:31%;right:3%;top:18%;bottom:61px;padding:10px}#game[data-screen=review] .actions{left:31%;right:3%;bottom:9px}#game[data-screen=review] .actions button{font-size:12px;min-height:38px}
}
.reduced .shout-rays{display:none}.reduced .mission-logo{animation:none}.reduced .shout-speech,.reduced .assembly-speech{transform:none!important}
@media(prefers-reduced-motion:reduce){.shout-rays{display:none}}

/* One type family, three weights, one meaning for each colour. */
.mission-logo,.title-logo{filter:none}
.wordmark{font-weight:900}
.speech[data-speaker=thought]{font-weight:900;--bubble-fill:var(--paper);color:var(--ink)}
#game[data-screen=intro][data-intro="4"] .stage-copy{left:7%;right:7%;top:auto;bottom:9%}
#game[data-screen=intro][data-intro="4"] .speech{font-size:clamp(30px,5cqw,56px);line-height:1.5;font-weight:900}
.thinking-speech{position:absolute;top:8%;left:5%;width:max-content;max-width:40%;padding:16px 22px 42px}
.result-actions{display:flex;gap:12px;flex:none;margin-top:4px}
.result-actions button{flex:1;min-width:0;min-height:48px;padding:12px 14px;border-radius:8px;font-size:15px;font-weight:700;line-height:1.5}
.result-actions .secondary{font-size:14px}
.result-measure>div,.result-measure strong,.result-measure span,.result-document h2,.result-document p b{font-size:12px}
.result-document p{font-weight:500}.result-document p b{flex:none;white-space:nowrap;min-width:2ch}.result-reason{font-weight:700}.result-score{font-weight:900}
.word-task,.edit-hint,.word-count,.word-filters button,.word-search,.line-number,.scene-head,footer{font-size:12px}
.word-empty,.draft-placeholder,.word-footer-hint{font-size:14px;color:var(--muted)}
.word-tile,.sentence-word{font-weight:700}.sentence-preview{font-weight:500}
.round-timer strong,.assembly-heading{font-weight:900}
@media(max-width:600px){
 .word-studio-head h2{font-size:18px}.word-tile,.sentence-word{font-size:14px;min-height:34px}
 .word-filters button{font-size:12px;min-width:35px;height:29px;padding:5px}
 .word-search{height:29px;font-size:12px}.word-count,.edit-hint,.word-edit-buttons button{font-size:12px}
 .word-edit-buttons button{min-height:32px}.bank-caption{gap:7px}.word-count{margin-left:auto}
 .sentence-preview{font-size:16px;line-height:1.5}.word-header-tools{gap:6px}
 .thinking-speech{top:7%;left:4%;max-width:51%;padding:14px 18px 40px}
 .result-actions{flex-direction:column;gap:8px}.result-actions button{font-size:15px;min-height:44px;padding:10px 12px}
 .result-measures{gap:8px}.result-score span{font-size:12px}.result-document h2{font-size:12px}
 .result-document p b{line-height:2.4}.result-reason{font-size:16px;line-height:1.6}
}
@media(min-width:601px) and (max-height:500px){
 .result-actions button{min-height:40px;font-size:13px;padding:8px 10px}.result-actions{gap:8px}
 .word-tile,.sentence-word{font-size:14px}.result-reason,.result-document p{font-size:14px}
 .result-sheet{gap:8px}.result-measures{padding-bottom:5px}.result-actions{margin-top:0}
}
#game[data-assets-ready=false] #stage:before{content:'オフィスを準備しています…';position:absolute;inset:0;display:grid;place-items:center;background:var(--ink);color:var(--paper);z-index:9;font-size:18px;font-weight:700}
:root{--orange:#b63822}
.actions button.primary,.primary,.result-actions .primary{color:var(--paper)}
::selection{color:var(--paper)}
.shout-speech .bubble-text{scrollbar-color:#48654e #e9e4cf;scrollbar-width:thin}
.word-tile:hover:not(:disabled){background:#e1eadd;border-color:var(--ink)}
.sentence-word.is-active{background:#dce8d8;border-color:var(--ink)}
.sentence-steps span{font-size:12px}.word-tile.is-used .used-count{font-size:11px;min-width:16px;height:16px;line-height:16px}

.shout-speech .bubble-text:focus-visible{outline:3px solid #00795d;outline-offset:3px}

@media(min-width:601px) and (max-height:500px){
 #game[data-screen=playing] .actions button,.result-actions button{min-height:44px;font-size:14px}
 .result-reason,.result-document p{font-size:16px}
}
#game[data-screen=review] .review-item p{font-size:16px}

/* v11: the same type family, staged as a shout and a physical verdict stamp. */
.shout-rays{display:block;position:absolute;inset:0;pointer-events:none;background:repeating-conic-gradient(from 8deg at 26% 60%,transparent 0deg 11deg,#fff8e612 11deg 12deg,transparent 12deg 24deg);opacity:.7}
.shout-cry{left:4%;top:4%;padding:8px 30px 13px 20px;color:var(--paper);background:var(--orange);clip-path:polygon(3% 0,100% 5%,94% 100%,0 95%);font:900 clamp(44px,7.4cqw,82px)/1.15 var(--body);letter-spacing:-.04em;white-space:nowrap;transform:translate(var(--impact-x,0px),var(--impact-y,0px));z-index:4}
#game[data-screen=shout] .shout-speech{left:42%;right:2%;top:12%;max-height:72%;padding:clamp(28px,5.2cqh,42px) clamp(28px,4.6cqw,48px) clamp(29px,5.8cqh,46px);transform-origin:24% 65%;isolation:isolate}
.shout-burst{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;overflow:visible;filter:drop-shadow(5px 6px 0 var(--orange))}
.shout-burst path{fill:var(--paper);stroke:var(--ink);stroke-width:3;stroke-linejoin:miter;vector-effect:non-scaling-stroke}
.shout-speech .bubble-text{font-weight:900;font-size:clamp(19px,2.5cqw,28px);line-height:1.65;letter-spacing:.01em;text-wrap:pretty;padding:3px 3px 3px 0}
.shout-speech p{margin-bottom:12px}
.shout-impact{inset:0;pointer-events:none;background:radial-gradient(ellipse at 42% 52%,#fff8e6b3 0%,#fff8e640 37%,transparent 75%);z-index:1;opacity:var(--impact-opacity,0)}
.result-heading{position:relative;align-items:center;gap:16px;padding:0 0 10px;border-bottom:3px solid var(--ink)}
#game[data-screen=result] .result-heading h1{position:relative;isolation:isolate;display:inline-block;flex:none;padding:10px 18px 13px;margin:0;font:900 clamp(40px,5.8cqw,66px)/1.08 var(--body);letter-spacing:-.05em;color:var(--paper);white-space:nowrap;transform-origin:48% 55%;animation:verdict-stamp 240ms cubic-bezier(.23,1,.32,1) both}
.result-heading h1:before{content:'';position:absolute;inset:0;z-index:-1;background:var(--ink);clip-path:polygon(0 7%,96% 0,100% 88%,5% 100%)}
#game[data-screen=result][data-verdict=failed] .result-heading h1{color:var(--paper)}
#game[data-screen=result][data-verdict=failed] .result-heading h1:before{background:var(--orange)}
.result-score{flex:none;text-align:right;line-height:1;letter-spacing:-.03em}
.result-score span{display:block;margin-top:8px;letter-spacing:0}
@keyframes verdict-stamp{0%{transform:scale(1.28) rotate(-7deg);opacity:0}42%{transform:scale(.96) rotate(1.5deg);opacity:1}72%{transform:scale(1.02) rotate(-.5deg)}100%{transform:scale(1) rotate(0);opacity:1}}
.reduced .result-heading h1{animation:none!important}
@media(max-width:600px){
 .shout-rays{background:repeating-conic-gradient(from 8deg at 50% 67%,transparent 0deg 11deg,#fff8e612 11deg 12deg,transparent 12deg 24deg)}
 .shout-cry{left:4%;top:3%;font-size:41px;padding:7px 26px 11px 16px}
 #game[data-screen=shout] .shout-speech{left:2%;right:2%;top:11%;max-height:35%;padding:25px 28px 27px;transform-origin:50% 85%}
 .shout-speech .bubble-text{font-size:18px;line-height:1.6;padding-right:3px}
 .shout-speech p{margin-bottom:9px}
 .shout-burst{filter:drop-shadow(3px 4px 0 var(--orange))}
 .result-heading{gap:10px;padding-bottom:10px}
 #game[data-screen=result] .result-heading h1{font-size:43px;padding:9px 13px 12px}
 .result-score{font-size:30px}.result-score span{margin-top:6px}
}
@media(min-width:601px) and (max-height:500px){
 #game[data-screen=shout] .shout-speech{left:39%;top:10%;max-height:76%;padding:24px 31px 28px}
 .shout-speech .bubble-text{font-size:17px;line-height:1.5}
 .shout-cry{font-size:38px;top:3%;padding:6px 22px 10px 15px}
 #game[data-screen=result] .result-heading h1{font-size:34px;padding:7px 12px 10px}
 .result-heading{padding-bottom:7px}.result-score{font-size:25px}.result-score span{margin-top:4px}
}
@media(prefers-reduced-motion:reduce){.result-heading h1{animation:none!important}}
@media(max-width:359px){
 .result-heading{flex-wrap:wrap;gap:8px}
 #game[data-screen=result] .result-heading h1{font-size:36px;padding:9px 12px 12px}
 .result-score{font-size:26px;margin-left:auto}
}
