/* Japanese opt-in layout: shared studio desk, original content/engine nodes. */
.jp-game{--ink:#17223b;--ink-soft:#5e6579;--muted:#5e6579;--warm:#17223b;--text:#eeebf2;--panel:#f8f5ed;--bad:#b03c36;--good:#28774a}
.jp-game>header.bar{margin:0;padding:0 3vw}.jp-game>header.bar a{background:transparent;box-shadow:none;border:0}
.jp-game .jp-desk{height:100%;min-height:0;overflow:auto;color:var(--ink);background:var(--paper);border:1.5px solid var(--ink);border-radius:18px}
.jp-game .jp-desk>main,.jp-game .jp-desk>.shell{width:100%;max-width:none;margin:0;padding:0;min-height:0;height:100%;background:transparent}
.jp-game .jp-desk :is(.panel,.card,#card,.exp-card,.box){background:transparent!important;color:var(--ink);border:0!important;border-radius:0;box-shadow:none!important;padding:0;margin:0;max-width:none}
.jp-game .jp-desk #app,.jp-game .jp-desk #exp-app{height:100%;min-height:0}
.jp-game .jp-old-chrome,.jp-game .jp-native-instruction,.jp-game .jp-hidden-study{display:none!important}
.jp-game .jp-desk button:where(:not(.dm-card,.dm-pile,.dm-draw,.dm-cell)){font-family:var(--sans);background:#fff;color:var(--ink);border:1.5px solid var(--ink);border-radius:14px;box-shadow:none;cursor:pointer;line-height:1.4}
/* 11-08: kana draw-match cards and piles keep the colours Mint set (hiragana apricot, katakana blue, navy pile with gold). */
.jp-game .jp-desk :is(.opt,.kana-opt,.tile,.ans,.lr-options button){font-size:32px;min-height:64px;padding:10px 14px;white-space:normal;max-width:100%}
.jp-game .jp-desk :is(.jp,.kana,.sentence,.q-sentence,.p-sentence,.price,.word,.prompt-q,.exp-big){font-size:32px;color:var(--ink);line-height:1.65}
.jp-game .jp-desk rt{font-size:.5em;color:var(--ink-soft)}
.jp-game .jp-desk :is(.cat-en,.p-mean,small,.meaning,.en,.note,.lead){color:var(--ink-soft)}
.jp-game .jp-desk .jp-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;align-content:center}
.jp-game .jp-desk :is(.right,.ok,.correct){background:#e3f3e8!important;border-color:#28774a!important}
.jp-game .jp-desk :is(.wrong,.no){background:#fbe7e4!important;border-color:#b03c36!important}
.jp-game .jp-desk :is(.modes,.mode-grid,.cat-grid,.p-grid){display:grid;gap:12px;grid-template-columns:repeat(4,minmax(0,1fr));margin:8px 0}
.jp-game .jp-desk .p-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.jp-game .jp-desk :is(.mode-card,.cat-chip,.p-chip,.mode,.main-btn,.pill){min-height:44px;padding:8px 12px;min-width:0}
.jp-game .jp-desk :is(.mode-ic,.mode-icon,.cat-ic){display:none}
.jp-game .jp-desk :is(.cat-jp,.mode-jp,.p-big){display:block;font-size:24px;font-weight:700;color:var(--ink)}
.jp-game .jp-desk :is(.cat-en,.mode-name){display:block;font-size:15px;line-height:1.4}
.jp-game .jp-desk .p-mean{font-size:15px}
.jp-game .jp-desk .step-title{font-size:17px;margin:8px 0 4px}
.jp-game .jp-desk .start-btn{font-size:20px;min-height:44px;padding:10px 18px}
.jp-game .jp-desk :is(.mascot,.scope-note){display:none}
.jp-game .jp-desk .progress{display:none}
.jp-game .jp-desk .q-stage{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px 24px;align-content:center}
.jp-game .jp-desk .q-stage>.p-opts{grid-column:2;grid-row:1/5}
.jp-game .jp-desk .q-stage>.p-feedback{grid-column:1/-1;max-height:180px;overflow:auto}
.jp-game .jp-desk :is(.big-scene,.answer-box,.scene){font-size:32px;max-width:100%}
.jp-game .jp-desk .q-stage>.qa-label{font-size:16px}
.jp-game .jp-desk .emoji{font-size:64px}
.jp-game .jp-desk .stage{height:auto;min-height:0;background:transparent}
.jp-game .jp-desk .stage>.opts{margin-top:12px}
.jp-game .jp-desk :is(.card.q,.card.play,.panel.play){height:100%;display:flex;flex-direction:column;justify-content:center;gap:12px}
.jp-game .jp-desk .card.q{display:grid;grid-template-columns:1fr 1.4fr;gap:12px 24px;align-content:center;align-items:center}
.jp-game .card.q .price,.jp-game .card.q>.pic,.jp-game .card.q>.word{grid-column:1;font-size:56px;text-align:center}
.jp-game .card.q>.opts{grid-column:2;grid-row:1/4}
.jp-game .card.q :is(.msg,.parts,.slots,.tiles){grid-column:1/-1;font-size:22px}
.jp-game .jp-desk .price b{white-space:nowrap}
.jp-game .jp-desk .lang-toggle,.jp-game .jp-help-content>.site-footer{display:none}
.jp-game .jp-desk .si-wrap .body{max-width:none}
.jp-game .jp-desk .si-wrap :is(.opts,.grid){gap:12px}
.jp-game .jp-desk .si-wrap .nav-row{margin-top:12px}
.jp-game .jp-desk .si-wrap :is(.btn,.option){min-height:64px;font-size:22px;padding:10px 18px}
.jp-game .jp-desk .si-wrap h2{font-size:24px}
.jp-game[data-jp-kind=listen] .lr-paper{font-size:24px;line-height:1.8;background:#fff;color:var(--ink);padding:16px;border:1px solid var(--ink);border-radius:14px}
.jp-game[data-jp-kind=listen] .lr-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.jp-game[data-jp-kind=listen] .lr-actions button{min-height:40px;font-size:16px;padding:8px 12px}
.jp-game[data-jp-kind=listen] .lr-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.jp-game[data-jp-kind=listen] .lr-list button{font-size:24px;min-height:64px;padding:14px}
.jp-game[data-jp-kind=listen] .lr-options button{font-size:32px}
.jp-game .learning-controls select{font:14px var(--sans);height:30px;border:1px solid var(--ink);background:var(--paper);color:var(--ink);border-radius:12px;padding:2px 8px}
.jp-game[data-jp-kind=body] .bd-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px}
.jp-game[data-jp-kind=body] .top-bar{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:12px}
.jp-game[data-jp-kind=body] .stage-box{background:transparent;min-height:0}
.jp-game[data-jp-kind=body] .stage{height:auto!important;width:256px;max-width:100%;margin:auto}
.jp-game[data-jp-kind=body] .stage canvas{max-width:100%;image-rendering:pixelated}
.jp-game[data-jp-kind=shiritori] .screen:not(.on){display:none}
.jp-game[data-jp-kind=shiritori] .hero{display:none}
.jp-game[data-jp-kind=shiritori] .rules{margin:0 0 12px;padding-left:24px;font-size:16px}
.jp-game[data-jp-kind=shiritori] .demo{font-size:32px;margin:0 0 12px}
.jp-game[data-jp-kind=shiritori] #grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.jp-game[data-jp-kind=shiritori] #grid button{font-size:24px}
.jp-game[data-jp-kind=shiritori] #grid img{max-height:100px;width:auto;image-rendering:pixelated}
.jp-game[data-jp-kind=shiritori] .score{font-size:16px}
.jp-game[data-jp-kind=hira] .hira-chart{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px}
.jp-game[data-jp-kind=hira] .hira-chart button{font-size:24px;min-height:40px;padding:2px}
.jp-game[data-jp-kind=hira] .hira-look{display:grid!important;grid-template-columns:120px 120px minmax(0,1fr);gap:12px;align-items:center}
.jp-game[data-jp-kind=hira] .hira-letter{font-size:72px}
.jp-game[data-jp-kind=hira] .hira-strokes{height:120px;width:120px}
.jp-game[data-jp-kind=hira] .hira-words{grid-column:1/-1;display:flex;gap:16px}
.jp-game[data-jp-kind=hira] .hira-words img{height:64px;width:auto;image-rendering:pixelated}
.jp-game[data-jp-kind=hira] .hira-word{font-size:20px;min-width:0}
.jp-game[data-jp-kind=kata] .dm-board{max-width:100%}
.jp-game[data-jp-kind=kata] .look-grid{gap:8px}
.jp-game .jp-reading-head{display:none}
.jp-game.jp-reading .jp-reading-head{display:block}
.jp-game.jp-reading .g{height:auto;min-height:calc(100dvh - var(--game-header-h));max-width:1000px;padding-top:32px}
.jp-game.jp-reading .ghead{display:none}.jp-game.jp-reading .gdo{font-size:18px}
.jp-game.jp-reading .jp-desk{height:auto;overflow:visible;padding:0;border:0;background:transparent}
.jp-game.jp-reading .jp-desk>main{height:auto}
.jp-game.jp-reading #tabs{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.jp-game.jp-reading #card{background:var(--paper)!important;border:1px solid var(--ink)!important;border-radius:18px;padding:24px}
.jp-game.jp-reading #tabs button{min-height:44px;font-size:16px;padding:8px 14px}
.jp-game .gfoot button{background:transparent;border:0;border-bottom:1px solid var(--gold-line);color:var(--gold)}
@media(max-width:600px){
 .jp-game .jp-desk{overflow:visible}
 .jp-game .jp-desk :is(.jp,.kana,.p-sentence,.q-sentence,.sentence,.prompt-q,.exp-big){font-size:22px}
 .jp-game .jp-desk :is(.opt,.kana-opt,.tile,.lr-options button){font-size:22px;min-height:56px;padding:8px}
 .jp-game .jp-desk :is(.modes,.mode-grid,.cat-grid,.p-grid){grid-template-columns:1fr 1fr;gap:8px}
 .jp-game .jp-desk .q-stage,.jp-game .jp-desk .card.q{display:flex;flex-direction:column;gap:12px}
 .jp-game .jp-desk .q-stage>.p-opts,.jp-game .jp-desk .card.q>.opts{width:100%}
 .jp-game .jp-desk :is(.p-feedback,.q-stage>.p-feedback){max-height:none;overflow:visible}
 .jp-game[data-jp-kind=body] .bd-grid{grid-template-columns:1fr}
 .jp-game[data-jp-kind=body] .stage{width:192px}
 .jp-game[data-jp-kind=shiritori] #grid{grid-template-columns:1fr 1fr}
 .jp-game[data-jp-kind=listen] .lr-list{grid-template-columns:1fr 1fr}
 .jp-game[data-jp-kind=hira] .hira-chart{grid-template-columns:repeat(5,minmax(0,1fr))}
 .jp-game[data-jp-kind=hira] .hira-look{grid-template-columns:1fr 1fr}
 .jp-game[data-jp-kind=hira] .hira-words{flex-wrap:wrap}
 .jp-game.jp-reading .g{width:100%;padding:24px 16px}
}
/* Retire the legacy card scaffolding, without removing any learning nodes. */
.jp-game .jp-desk :is(.card,.panel,#card,.lesson-body,.q-stage,.answer-box,.pic){min-height:0!important}
.jp-game .jp-desk .lesson-body{display:contents!important}
.jp-game .jp-desk .lesson-instruction{display:none!important}
.jp-game .jp-desk .opts>.opt::before{display:none!important}
.jp-game .jp-desk .card.q .opts{grid-column:2;grid-row:1/4}
.jp-game .jp-desk .answer-box{box-shadow:none;background:transparent;border:0;margin:0;padding:0}
.jp-game .jp-desk .answer-box .answer-jp{font-size:32px}
.jp-game .jp-desk .big-scene{min-height:0;max-height:160px}
.jp-game .jp-desk .q-stage{height:100%;min-height:0;align-items:center;padding:0}
.jp-game .jp-desk .answer-box img,.jp-game .jp-desk .scene img{max-height:130px;width:auto}
.jp-game>header.bar{border-radius:0;overflow:visible;border:0;border-bottom:1px solid var(--gold-line);background:var(--night);height:64px;max-width:none;width:100%;box-shadow:none}
.jp-game>header.bar .brand{width:auto;max-width:none;font-size:17px;white-space:nowrap;flex-shrink:0}
.jp-game>header.bar .brand>span[lang]{width:auto;max-width:none}
.jp-game .jp-help-content .done-btn{position:static;margin:16px 0}
.jp-game .jp-help-content #pageVersion{font-size:12px}
.jp-game .jp-desk .si-wrap #card{height:100%;display:grid;grid-template-columns:1fr;align-content:center}
.jp-game .jp-desk .si-wrap .body:has(.opts){display:grid;grid-template-columns:1fr 1.4fr;gap:8px 24px;align-items:center;text-align:center}
.jp-game .jp-desk .si-wrap .body:has(.opts)>.opts{grid-column:2;grid-row:1/6}
.jp-game .jp-desk .si-wrap .body:has(.opts)>:not(.opts){grid-column:1;margin:0}
.jp-game .jp-desk .si-wrap .opts button{font-size:32px;min-height:64px;padding:8px 12px}
.jp-game .jp-desk .si-wrap .nav-row{height:auto;margin:8px 0 0;grid-column:1/-1}
@media(max-width:600px){
 .jp-game>header.bar{height:56px;padding:0 16px}.jp-game>header.bar .brand{font-size:15px}
 .jp-game .jp-desk .si-wrap .body:has(.opts){display:flex;flex-direction:column;gap:12px}
 .jp-game .jp-desk .si-wrap .opts button{font-size:22px}
 .jp-game .jp-desk .card.q .opts{width:100%}
}
/* Compact the body explorer controls so the character stays on the paper. */
@media(min-width:1024px){
 .jp-game[data-jp-kind=body] .top-bar{display:grid;grid-template-columns:1.2fr 1fr 1fr;align-items:center;margin:0;gap:10px}
 .jp-game[data-jp-kind=body] .top-bar .modes{display:flex;margin:0;width:auto;gap:6px}
 .jp-game[data-jp-kind=body] .top-bar .modes button{min-height:44px;padding:6px;font-size:15px}
 .jp-game[data-jp-kind=body] .top-bar .opts-row{gap:4px;justify-content:center}
 .jp-game[data-jp-kind=body] .top-bar .opt-label{font-size:12px}
 .jp-game[data-jp-kind=body] .bd-grid{margin-top:8px}
 .jp-game[data-jp-kind=body] .stage{width:180px!important}
 .jp-game[data-jp-kind=body] .stage-card{gap:2px}
 .jp-game[data-jp-kind=body] .views button{font-size:14px;min-height:32px;padding:4px 6px}
 .jp-game[data-jp-kind=body] .placeholder{font-size:15px;padding:8px;min-height:0}
 .jp-game[data-jp-kind=body] .chips{gap:4px;margin-top:6px}
 .jp-game[data-jp-kind=body] .chips button{font-size:17px;min-height:34px;padding:3px 8px}
}
.jp-game[data-jp-kind=hira] #app>.sets:not(.guest-sets){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.jp-game[data-jp-kind=hira] #app>.sets button.set{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:22px;min-height:70px;padding:8px;width:auto;margin:0}
.jp-game[data-jp-kind=hira] #app>.sets .kn{font-size:17px;line-height:1.5}
.jp-game[data-jp-kind=hira] .guest-sets h2{font-size:18px;margin:10px 0 4px}
.jp-game[data-jp-kind=hira] .guest-sets p{font-size:14px;margin:0 0 8px}
@media(max-width:600px){.jp-game[data-jp-kind=hira] #app>.sets:not(.guest-sets){grid-template-columns:1fr 1fr}}
/* Keep the answer picture, its caption and the question in separate grid rows. */
.jp-game .jp-desk .q-stage{grid-auto-rows:min-content;align-content:center;row-gap:6px}
.jp-game .jp-desk .q-stage>.big-scene{grid-column:1;grid-row:1;max-height:none;margin:0;padding:8px;background:transparent;border:0;box-shadow:none}
.jp-game .jp-desk .q-stage>.qa-label{grid-column:1;grid-row:2;margin:0;color:var(--ink-soft)}
.jp-game .jp-desk .q-stage>.p-sentence{grid-column:1;grid-row:3;margin:0;line-height:1.6}
.jp-game .jp-desk .q-stage>.q-mean{grid-column:1;grid-row:4;margin:0}
.jp-game .jp-desk .big-scene-emoji{font-size:64px;line-height:1.1}
.jp-game .jp-desk .big-scene .qa-jp{font-size:32px;line-height:1.6;margin:0}
.jp-game .jp-desk .big-scene .qa-mean{font-size:17px;margin:0}
@media(max-width:600px){.jp-game .jp-desk .big-scene .qa-jp{font-size:22px}.jp-game .jp-desk .big-scene-emoji{font-size:52px}}
/* Let the original canvas engine choose its integer scale; never CSS-rescale hit targets. */
.jp-game[data-jp-kind=body] .stage{width:auto!important;max-width:none;height:auto!important}
.jp-game[data-jp-kind=body] .stage canvas{max-width:none}
.jp-game[data-jp-kind=body] .stage-box{width:256px;max-width:100%;margin:auto}
@media(min-width:1024px) and (min-height:800px){.jp-game[data-jp-kind=body] .stage-box{width:258px}}
.jp-game .jp-desk .p-sentence{max-width:100%;min-width:0;overflow-wrap:anywhere}
.jp-game .jp-desk .p-sentence .p-text{white-space:pre-wrap;overflow-wrap:anywhere}
.jp-game .jp-desk :is(.q-stage,.opt-grid,.p-opts,.p-feedback,.card,.panel){min-width:0}
.jp-game .jp-desk .si-wrap #card{align-content:safe center}
@media(max-width:600px){
 .jp-game .jp-desk,.jp-game .jp-desk>main,.jp-game .jp-desk>.shell,.jp-game .jp-desk .si-wrap #card{height:auto!important;min-height:0}
}
/* Kana lookups: chart and detail share the desktop paper, instead of stacking off-screen. */
@media(min-width:1024px){
 .jp-game[data-jp-kind=hira] #app:has(.hira-chart){display:grid;grid-template-columns:1.05fr 1fr;gap:20px;align-items:center}
 .jp-game[data-jp-kind=hira] #app:has(.hira-chart)>.main-btn{display:none}
 .jp-game[data-jp-kind=hira] .hira-chart{margin:0;gap:4px}
 .jp-game[data-jp-kind=hira] .hira-look{grid-template-columns:84px 100px 1fr;gap:8px}
 .jp-game[data-jp-kind=hira] .hira-letter{font-size:64px;padding:0;min-height:64px}
 .jp-game[data-jp-kind=hira] .hira-strokes{height:96px;width:96px;margin:0}
 .jp-game[data-jp-kind=hira] .hira-mnemonic{grid-column:1/-1;font-size:19px;margin:0;line-height:1.4}
 .jp-game[data-jp-kind=hira] .hira-words{gap:6px;justify-content:space-evenly}
 .jp-game[data-jp-kind=hira] .hira-word{padding:6px;gap:4px;flex:1}
 .jp-game[data-jp-kind=hira] .hira-word b{font-size:26px}
 .jp-game[data-jp-kind=hira] .hira-word span{font-size:14px}
 .jp-game[data-jp-kind=hira] .hira-credit{grid-column:1/-1;margin:0;font-size:10px}
 .jp-game[data-jp-kind=hira] #app>.card:has(.word):has(.opts){display:grid;grid-template-columns:1fr 1.4fr;grid-template-rows:auto auto auto;gap:10px;align-items:center;align-content:center;height:100%}
 .jp-game[data-jp-kind=hira] #app>.card:has(.word)>.pic{grid-column:1;grid-row:1;font-size:64px}
 .jp-game[data-jp-kind=hira] #app>.card:has(.word)>.pic img{height:110px;width:auto}
 .jp-game[data-jp-kind=hira] #app>.card:has(.word)>.word{grid-column:1;grid-row:2;margin:0;font-size:40px}
 .jp-game[data-jp-kind=hira] #app>.card:has(.word)>.opts{grid-column:2;grid-row:1/3}
 .jp-game[data-jp-kind=hira] #app>.card:has(.word)>.msg{grid-column:1/-1;margin:0}
 .jp-game[data-jp-kind=kata] .chart{grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}
 .jp-game[data-jp-kind=kata] .chart button{min-height:52px;padding:2px}
 .jp-game[data-jp-kind=kata] .chart button b{font-size:32px}
 .jp-game[data-jp-kind=kata] .chart button span{font-size:14px}
 .jp-game[data-jp-kind=kata] .tabs{margin:0 0 6px}
 .jp-game[data-jp-kind=kata] .tabs button{min-height:36px;padding:4px 14px}
 .jp-game[data-jp-kind=kata] .tip{font-size:15px;margin:0 0 6px}
 .jp-game .game-stage:not(:has(.learn-switch)) .jp-desk{padding-top:24px}
}
@media(max-width:600px){
 .jp-game .jp-desk .q-stage>*{max-width:100%;min-width:0}
 .jp-game .jp-desk .p-sentence{font-size:22px;gap:2px}
 .jp-game .jp-desk .p-sentence .p-fixed{white-space:normal;overflow-wrap:anywhere}
 .jp-game .jp-desk .big-scene-text{font-size:22px;overflow-wrap:anywhere}
}
/* The fluency engine remains intact inside the shared desk. */
.jp-game.kf-active .jp-desk>.shell{width:100%;padding:0}
.jp-game.kf-active .kf{height:100%;min-height:0;margin:0;padding:0;border:0;display:flex;flex-direction:column}
.jp-game.kf-active .kf .kf-bar,.jp-game.kf-active .kf .kf-footer{display:none}
.jp-game.kf-active .kf .kf-board{min-height:0;flex:1}
@media(min-width:1024px){
 .jp-game[data-jp-kind=kata] .chart button{line-height:1!important;padding:1px;min-height:52px}
 .jp-game[data-jp-kind=kata] .chart button b{line-height:1.1}
 .jp-game[data-jp-kind=kata] .chart button span{line-height:1.1}
 .jp-game[data-jp-kind=kata] .game-stage:not(:has(.learn-switch)) .jp-desk{padding-top:16px;padding-bottom:12px}
}
.jp-game.kf-active .kf .kf-bar{display:flex}
.jp-game.kf-active .kf .kf-instruction{margin:4px 0}
.jp-game.kf-active .kf .kf-actions{min-height:130px}
.jp-game.kf-active .kf .kf-word{min-height:90px;margin:4px auto;font-size:clamp(56px,6vw,90px)}
@media(min-width:1024px){
}
.jp-game>header.bar nav a.on{box-shadow:inset 0 -2px 0 var(--gold);border-radius:0}
.jp-game .jp-desk .big-scene-emoji{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.jp-game .jp-desk :is(.card.play,.panel.play){justify-content:safe center}
.jp-game[data-jp-kind=vocab] .match-cols{width:100%;max-width:none;gap:18px}
.jp-game[data-jp-kind=vocab] .match-col{gap:6px}
.jp-game[data-jp-kind=vocab] .match-item{display:flex;align-items:center;justify-content:center;gap:10px;min-height:64px;font-size:32px;padding:4px}
.jp-game[data-jp-kind=vocab] .match-item .pic{min-height:0;padding:0;max-width:50%;font-size:20px}
.jp-game[data-jp-kind=vocab] .match-item .lex-img{height:48px;width:auto;max-width:100%}
.jp-game[data-jp-kind=vocab] .match-item .pic .emoji{font-size:40px}
@media(max-width:600px){.jp-game[data-jp-kind=vocab] .match-item{font-size:22px}}
@media(min-width:1024px){
 .jp-game[data-jp-kind=vocab] .q-stage>.opt-grid{grid-column:2;grid-row:1/5}
 .jp-game[data-jp-kind=vocab] .q-stage>.pic,.jp-game[data-jp-kind=vocab] .q-stage>.q-word{grid-column:1;grid-row:1/3}
 .jp-game[data-jp-kind=vocab] .q-stage>.kana-line{grid-column:1;grid-row:3}
 .jp-game[data-jp-kind=vocab] .q-stage>.q-ask{grid-column:1;font-size:17px}
 .jp-game[data-jp-kind=vocab] .q-stage>.pic.big img{height:180px;width:auto;max-width:100%}
 .jp-game[data-jp-kind=vocab] .opt.picopt .lex-img{height:100px;width:auto;max-width:100%}
 .jp-game[data-jp-kind=hira] #app:not(:has(.hira-chart,.kf))>.hira-look-entry,.jp-game[data-jp-kind=hira] #app>.kf-entry{display:inline-flex;min-height:40px;font-size:17px;padding:8px 14px;margin:0 8px 8px 0}
 .jp-game[data-jp-kind=hira] #app>.sets button.set{min-height:62px;padding:4px}
 .jp-game[data-jp-kind=shiritori] #sGame{height:100%;display:flex;flex-direction:column;gap:6px}
 .jp-game[data-jp-kind=shiritori] #sGame:not(.on){display:none}
 .jp-game[data-jp-kind=shiritori] .ask{display:grid;grid-template-columns:1fr 2fr;grid-auto-rows:min-content;gap:8px 18px;align-content:center;padding:8px;margin:0;border:0;background:transparent}
 .jp-game[data-jp-kind=shiritori] #prev{grid-column:1;grid-row:1/4;flex-direction:column;margin:0}
 .jp-game[data-jp-kind=shiritori] .timer{grid-column:2;grid-row:1;margin:0}
 .jp-game[data-jp-kind=shiritori] #grid{grid-column:2;grid-row:2;gap:8px}
 .jp-game[data-jp-kind=shiritori] #msg{grid-column:1/-1;font-size:17px;margin:0;min-height:0}
 .jp-game[data-jp-kind=shiritori] .chainbar{margin:0}
 .jp-game[data-jp-kind=shiritori] #grid button{min-height:90px;padding:4px;font-size:22px}
 .jp-game[data-jp-kind=shiritori] #grid img{height:56px;max-height:56px}
 .jp-game[data-jp-kind=shiritori] .bottom{margin:0}
 .jp-game[data-jp-kind=shiritori] .bottom button{min-height:36px;padding:4px 12px;font-size:16px}
}
.jp-game[data-jp-kind=shiritori] #grid button.card{border:1.5px solid var(--ink)!important;border-radius:14px;background:#fff}
@media(min-width:1024px){.jp-game[data-jp-kind=shiritori] #grid .pic{height:56px;width:56px}.jp-game[data-jp-kind=shiritori] #grid .w{font-size:26px}}
@media(min-width:1024px){.jp-game[data-jp-kind=shiritori] #grid .w{font-size:32px;word-break:normal;overflow-wrap:anywhere}.jp-game[data-jp-kind=hira] .hira-word b{font-size:32px}.jp-game[data-jp-kind=hira] .hira-chart button{font-size:32px}}
@media(max-width:600px){
 .jp-game.kf-active .jp-desk{padding:12px}
 .jp-game.kf-active .kf .kf-actions,.jp-game.kf-active .kf .kf-capture{min-height:130px}
 .jp-game.kf-active .kf .kf-instruction{min-height:32px;font-size:18px}
 .jp-game.kf-active .kf .kf-word{font-size:64px;min-height:80px}
}
@media(max-width:600px){
 .jp-game.kf-active .kf.kf-question .kf-bar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:4px}
 .jp-game.kf-active .kf .kf-stage-label{min-width:0;text-align:center;overflow-wrap:normal;font-size:17px}
 .jp-game.kf-active .kf .kf-dots{grid-column:1/-1;grid-row:2}
}
.jp-game[data-jp-kind=hira] .hira-chart button{min-height:44px}
@media(min-width:1024px){.jp-game[data-jp-kind=hira] .hira-chart button{min-height:64px}}
@media(max-width:600px){.jp-game.kf-active .kf .kf-word{font-size:clamp(48px,calc((100vw - 100px)/var(--kf-glyphs)),64px)}}
/* The current fluency instruction already appears in the shared instruction strip. */
.jp-game.kf-active .kf .kf-instruction{display:none}
@media(max-width:600px){
 .jp-game.kf-active .kf .kf-result-overview{margin:4px 0;gap:14px}
 .jp-game.kf-active .kf .kf-score-ring{width:64px;height:64px;border-width:3px;font-size:28px}
 .jp-game.kf-active .kf .kf-result-cards{gap:8px}
 .jp-game.kf-active .kf .kf-result-card{padding:8px 12px}
 .jp-game.kf-active .kf .kf-result-card h3{margin-bottom:4px}
 .jp-game.kf-active .kf .kf-result-buttons{margin:8px 0 0}
}
@media(max-width:600px){
 .jp-game.kf-active .kf .kf-slow-word{display:inline}
 .jp-game.kf-active .kf .kf-slow-time{display:inline;margin-left:8px;white-space:nowrap;font-size:14px}
}
@media(max-width:600px){
 .jp-game.kf-active .kf .kf-result-card{padding:6px 12px}
 .jp-game.kf-active .kf .kf-counts{margin-top:2px}
 .jp-game.kf-active .kf .kf-pass-rule{margin-bottom:6px}
}
/* Claude #511 review fixes: page CSS must not leak into the shared game bar/menu. */
.jp-game .ghead,.jp-game .ghead *,.jp-game .gdo,.jp-game .gfoot,.jp-game .gfoot *,.jp-game .learning-controls,.jp-game .learning-controls *,.jp-game header.bar,.jp-game header.bar *{font-family:var(--sans)!important}
.jp-game .ghead .prog{height:auto;margin:0 0 0 auto;border-radius:0;background:transparent;overflow:visible}
.jp-game .ghead .prog>span{color:var(--soft,#b9b4c7)}
.jp-game header.bar .menu-btn .lines{display:grid;grid-template-columns:none;gap:4px;width:16px;height:auto}
.jp-game .jp-desk .jp-options.jp-options-long{grid-template-columns:1fr}
.jp-game .jp-desk .mode .ic{display:none}
.jp-game .jp-desk .modes .mode{text-align:left}
.jp-game .jp-desk .modes .mode b{display:block;font-size:20px}
.jp-game .jp-desk .modes .mode small{display:block;font-size:15px;color:var(--ink-soft);line-height:1.4}
.jp-game .jp-desk .modes button:is(.on,.active,[aria-pressed=true]){background:var(--ink)!important;color:#fff!important}
@media (max-width:600px){
 .jp-game .jp-desk :is(.modes,.mode-grid){grid-template-columns:1fr!important}
 .jp-game .jp-desk .jp-options.jp-options-long button{font-size:22px}
 .jp-game .card.q .price{font-size:40px;white-space:nowrap}
 .jp-game .card.q:has(.price){grid-template-columns:1fr}
 .jp-game .card.q:has(.price)>.opts{grid-column:1;grid-row:auto}
}
/* Mint 11-07: kana to read/recognise use a textbook-style face (Klee One SemiBold, kana-only subset, OFL; assets/fonts/klee-one-LICENSE.txt).
   Latin/kanji fall back to the site sans because the subset has kana only. */
@font-face{font-family:"ML Kana";src:url("fonts/klee-one-kana-600.woff2") format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+3000-30FF,U+FF01,U+FF1F,U+FF5E}
/* 11-08: the surprise message moves up to the instruction line; only the two-kana comparison stays on the table. */
.jp-game .dm-fb .mischief-note{font-size:0}
.jp-game .dm-fb .mischief-note>[data-face]{display:none}
.jp-game .dm-fb .mischief-compare{font-size:22px}
@media(min-width:1024px){.jp-game .dm-fb .mischief-compare{font-size:32px}}
