/* Follow-up review: stable geometry shared by real touch devices and the reviewer. */
:root{--review-head:78px;--review-control:44px;--review-top:max(17px,env(safe-area-inset-top));--review-side:max(16px,env(safe-area-inset-left),env(safe-area-inset-right))}
html body :is(#vocabulary-dialog .study-header,#v2-console-picker>header){height:var(--review-head);min-height:var(--review-head);box-sizing:border-box}
html body #v2-console-picker>header{position:relative;display:flex;align-items:center;justify-content:center;padding:0 76px;flex:none}
html body #v2-console-heading{position:static;inset:auto;margin:0;text-align:center;font-size:30px;line-height:1.1;transform:none}
html body #v2-console-picker .v2-console-content{height:auto;min-height:0;flex:1;display:flex;padding:18px 20px 20px;gap:16px;justify-content:space-between}
html body #v2-console-picker .console-options{width:min(640px,100%);margin:0 auto;gap:12px}
html body #v2-console-picker [data-system]{min-height:116px;padding:12px 18px}
html body #v2-console-picker .v2-console-companion{flex:none;grid-template-columns:112px minmax(0,230px);min-height:170px;height:170px;margin:0;align-items:center}
html body #v2-console-picker .v2-console-companion button{grid-column:1;grid-row:1;justify-self:center;align-self:end}
html body #v2-console-picker .v2-console-companion p{grid-column:2;grid-row:1;align-self:center}
html body dialog[data-closing=true]{pointer-events:none}
html body #settings-dialog .dialog-heading{height:var(--review-head)}
html body #settings-dialog .dialog-heading h2{inset:0 90px;display:flex;align-items:center;justify-content:center;line-height:1.1}
html body .v2-home-dock [data-sprite=nav-langue]{border:0!important;border-image:none!important;background:var(--v2-normal) center/var(--v2-size) var(--v2-size) no-repeat!important}
html body .v2-home-dock [data-sprite=nav-langue]:hover{border:0!important;border-image:none!important;background:var(--v2-hover) center/var(--v2-size) var(--v2-size) no-repeat!important}
html body .v2-home-dock [data-sprite=nav-langue]:active{background:var(--v2-pressed) center/var(--v2-size) var(--v2-size) no-repeat!important}
html body #language-options .language-option{border-image-source:url('/assets/interface-v2/review-retours/flag-small-normal.png')}
html body #language-options .language-option:hover{border-image-source:url('/assets/interface-v2/review-retours/flag-small-hover.png')}
html body .v2-home-dock [data-sprite=nav-langue]>img{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:calc(var(--v2-size)*.57);height:calc(var(--v2-size)*.57);object-fit:cover}
html body .v2-home-dock [data-sprite=nav-langue]:active>img{translate:0 2px}
html[data-input-mode=touch] body #discovery-detail .dex-edge{display:none!important}
html body #vocabulary-dialog .discovery-entry:not(.is-locked) .dex-tile-number:after{display:none}
html body #vocabulary-dialog .discovery-entry:not(.is-locked) .dex-tile:after{content:'';position:absolute;right:8px;top:8px;width:6px;height:6px;background:#56b983;box-shadow:0 2px #347651}
html body #discovery-detail .dex-hero-audio{top:8px;right:8px;left:auto;width:32px;min-width:32px;height:32px;min-height:32px;padding:6px;border:0;border-image:none;background:transparent;color:#397858;box-shadow:none}
html body #discovery-detail .dex-hero-audio svg{width:20px;height:20px}
html body .favorite-empty{color:#b8a9c9}
html body #vocabulary-dialog :is(.context-favorite,.favorite-button,[data-favorite]):not([aria-pressed=true]){color:#b8a9c9}
html body #vocabulary-dialog :is(.library-tabs button,.collection-filters button,.fc-home-actions button,.fc-stats>div){font-family:PixelUI,sans-serif;font-weight:500;text-shadow:none;-webkit-text-stroke:0}
html body #vocabulary-dialog :is(.library-tabs button,.collection-filters button){color:#684781;border-image-source:url('/assets/interface-v2/pastel-ui/lavender-normal.png')}
html body #vocabulary-dialog :is(.library-tabs button,.collection-filters button)[aria-pressed=true],html body #vocabulary-dialog :is(.library-tabs button,.collection-filters button)[aria-selected=true]{color:#2b785e;border-image-source:url('/assets/interface-v2/pastel-ui/mint-normal.png')}
html body #vocabulary-dialog .fc-home-actions button{color:#63427b}
html body #vocabulary-dialog .fc-home-actions button:last-child{color:#2b785e}
html body #vocabulary-dialog .fc-stats>div{color:#685083}
html body #vocabulary-dialog .fc-stats>div[data-state=new]{color:#367869}
html body #vocabulary-dialog .fc-stats>div[data-state=again]{color:#915968}
html body #vocabulary-dialog .fc-stats>div[data-state=acquired]{color:#347263}
html body #vocabulary-dialog .fc-stats :is(dt,dd),html body #fc-card-count-label{color:inherit;font-family:PixelUI,sans-serif;font-weight:500;text-shadow:none;-webkit-text-stroke:0}
html body #fc-card-count-label{color:#684781;font-size:28px}
html body #vocabulary-dialog .exercise-category{height:104px;min-height:104px;max-height:104px;box-sizing:border-box;align-items:center}
html body #vocabulary-dialog .exercise-category .category-icon{align-self:center;place-self:center}
html body #vocabulary-dialog .exercise-category strong{font:500 23px/1.15 PixelUI,sans-serif;letter-spacing:0;white-space:nowrap;text-shadow:none;-webkit-text-stroke:0}
html body #vocabulary-dialog [data-exercise=translation]{color:#2e7662}
html body #vocabulary-dialog [data-exercise=kanji]{color:#925079}
html body #vocabulary-dialog [data-exercise=kana]{color:#426c99}
html body #vocabulary-dialog .exercise-category :is(strong,small){color:inherit}
html body #vocabulary-dialog .collection-note{max-width:680px;margin-left:auto;margin-right:auto;text-align:center;line-height:1.3}
/* The keyboard and action rows stay reserved even while the keyboard is folded. */
html body #vocabulary-dialog:has(#fc-editor:not([hidden])){padding-bottom:0}
html body #vocabulary-dialog #flashcards-view:has(#fc-editor:not([hidden])){height:100%;min-height:0;overflow:hidden;padding:10px 12px}
html body #fc-editor{--editor-keys:0px;display:grid;grid-template-rows:minmax(0,1fr) 50px var(--editor-keys);gap:8px;height:100%;min-height:0;max-width:900px;margin:auto;overflow:hidden}
html body #fc-editor[hidden]{display:none}
html[data-input-mode=touch] body #fc-editor,html body #fc-editor[data-keyboard-reserved=true]{--editor-keys:306px}
html body .fc-editor-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:0 8px 12px}
html body #fc-editor .fc-editor-faces{grid-template-columns:1fr;gap:12px}
html body #fc-editor :is(fieldset,input,textarea){min-width:0}
html body #fc-editor .fc-editor-actions{position:static;display:flex;align-items:stretch;justify-content:center;gap:8px;padding:0;margin:0;background:#f2e7fa}
html body #vocabulary-dialog #fc-editor :is(#fc-editor-save,#fc-editor-cancel){flex:1;max-width:280px;width:auto;min-width:0;min-height:48px;height:48px;padding:6px 10px;font:500 22px/1.1 PixelUI,sans-serif;text-shadow:none;-webkit-text-stroke:0;border:0;border-image:url('/assets/interface-v2/pastel-ui/mint-normal.png') var(--native-frame-slice,4) fill / var(--native-frame-corner,8px) / 0 repeat;border-image-width:var(--native-frame-corner,8px);background:none;box-shadow:none;color:#2e785d;white-space:normal;image-rendering:pixelated;image-rendering:crisp-edges;}
html body #vocabulary-dialog #fc-editor #fc-editor-cancel{color:#684781;border-image-source:url('/assets/interface-v2/pastel-ui/lavender-normal.png')}
html body #fc-editor .fc-keyboard-slot{height:var(--editor-keys);min-height:0;overflow:hidden;display:flex;align-items:end;justify-content:center}
html body #fc-editor .pixel-keyboard{--key-size:36px}
html body #fc-editor input:focus,html body #fc-editor textarea:focus{scroll-margin:16px}
html body .wallet{top:var(--review-top)}
html body #home-view .home-status{top:calc(var(--review-top) + 58px)}
html body #panel.collection-panel{z-index:40}
html body #home-screen #restart-creation{position:absolute;z-index:20;left:50%;top:calc(40px + 12vh);transform:translateX(-50%);font:18px/1 PixelUI;padding:8px 14px;color:#684781;border:0;border-image:url('/assets/interface-v2/pastel-ui/lavender-normal.png') var(--native-frame-slice,4) fill / var(--native-frame-corner,8px) / 0 repeat;border-image-width:var(--native-frame-corner,8px);background:none;image-rendering:pixelated;image-rendering:crisp-edges;}
/* Daily challenge: explicit tracks prevent every keyboard/result reflow. */
html body #review-dialog{padding:12px 12px max(8px,env(safe-area-inset-bottom));grid-template-columns:minmax(0,1fr);grid-template-rows:44px 42px minmax(64px,1fr) 50px 66px 44px 306px;gap:6px}
html body #review-dialog .dialog-top{grid-row:1}
html body #review-progress{grid-row:2}
html body #review-dialog #review-prompt{grid-row:3;font-size:clamp(70px,13vh,124px)}
html body #review-answer-form{grid-row:4;width:100%;align-self:center}
html body #review-answer-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0}
html body #review-dialog #review-feedback{grid-row:5;align-self:center;max-height:100%;overflow:auto;padding:8px 14px;border-radius:5px;font:700 23px/1.15 PixelUI;color:#fff;-webkit-text-stroke:3px #397552;paint-order:stroke fill;background:#9ed4ad}
html body #review-dialog #review-feedback:empty{visibility:hidden}
html body #review-dialog #review-feedback.bad{background:#e4a0aa;-webkit-text-stroke-color:#97444e}
html body #review-dialog #review-next{grid-row:7;grid-column:1;align-self:end;justify-self:center;min-width:140px;min-height:42px;height:42px;margin:0;padding:4px 22px;z-index:2}
html body #review-dialog .daily-keyboard-slot{grid-row:7;grid-column:1;min-height:0;height:306px;width:100%;align-self:end;justify-content:center}
html body #review-dialog .pixel-keyboard{--key-size:36px}
html body #review-dialog .pixel-keyboard :is(button,strong){font-family:PixelUI,sans-serif}
html body #review-dialog .pixel-keyboard[data-mode=hiragana] .pixel-keyboard-row button,html body #review-dialog .pixel-keyboard[data-mode=katakana] .pixel-keyboard-row button{font-family:'Noto Sans JP','Yu Gothic',Meiryo,sans-serif;font-weight:500;font-size:21px;-webkit-text-stroke:0;text-shadow:none}
html body #review-dialog .review-companion{top:50px;z-index:10}
html body #review-dialog[data-state=complete] #review-feedback{background:none;color:#684781;-webkit-text-stroke:0}
html body #review-dialog[data-state=complete] #review-next{grid-row:7;align-self:end}
html body #review-dialog[data-state=reward] .daily-reveal{grid-row:3/8;grid-column:1;margin:0;align-self:center;justify-self:center;max-width:100%}
html body #review-dialog[data-state=reward] #review-context{grid-row:2/4;align-self:start;font-size:23px;margin-top:38px;z-index:1}
html body #review-dialog .daily-mystery-card{width:224px;height:320px;border:0;border-image:none;border-radius:0;box-shadow:none;background:transparent url('/assets/kanjimon-ruban-couleurs-2026-10-17/or-dos-complet.png') center / 100% 100% no-repeat;image-rendering:pixelated}
html body #review-dialog .daily-mystery-card{--daily-card-face:url('/assets/kanjimon-rectos-communs-2026-10-17/recto-clair-complet.png');--daily-card-ink:#352844}
html[data-ui-theme=dark] body #review-dialog .daily-mystery-card{--daily-card-face:url('/assets/kanjimon-rectos-communs-2026-10-17/recto-sombre-complet.png');--daily-card-ink:#FFFDF5}
html body #review-dialog .daily-mystery-card.is-revealed{background:transparent var(--daily-card-face) center / 100% 100% no-repeat;color:var(--daily-card-ink)}
html body #review-dialog .daily-mystery-card canvas{width:208px;height:208px;image-rendering:pixelated}
@media(min-width:700px) and (min-height:650px){
 :root{--review-head:108px;--review-top:max(32px,env(safe-area-inset-top));--review-side:24px}
 html body #v2-console-heading{font-size:36px}
 html body #v2-console-picker [data-system]{min-height:142px}
 html body #vocabulary-dialog .exercise-category{height:130px;min-height:130px;max-height:130px}
 html body #vocabulary-dialog .exercise-category strong{font-size:30px}
}
@media(min-width:1200px) and (min-height:700px){
 :root{--review-head:128px;--review-control:80px;--review-top:max(24px,env(safe-area-inset-top));--review-side:28px}
 html body #home-view .home-status{top:calc(var(--review-top) + 74px)}
 html body #home-screen #restart-creation{top:244px}
}
@media(orientation:landscape) and (min-height:601px){
 html body #v2-console-picker .v2-console-content{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr);align-items:center;gap:40px;padding:36px 48px}
 html body #v2-console-picker .v2-console-companion{display:flex;flex-direction:column-reverse;gap:24px;min-height:0;height:auto;width:100%}
 html body #v2-console-picker .v2-console-companion button{width:176px;height:264px;align-self:center}
 html body #v2-console-picker .v2-console-companion p{max-width:300px;width:100%;text-align:center}
 html body #v2-console-picker .v2-console-companion p::before{left:calc(50% - 6px);top:auto;bottom:-10px;border-width:0 4px 4px 0}
 html body #vocabulary-dialog :is(#exercise-catalog,#fc-dashboard){padding-right:310px}
 html body #vocabulary-dialog :is(#exercise-catalog,#fc-dashboard)>.v2-study-companion{left:auto;right:36px;bottom:176px;transform:none;width:240px;height:auto;min-height:0;display:flex;flex-direction:column-reverse;gap:16px}
 html body #vocabulary-dialog :is(#exercise-catalog,#fc-dashboard)>.v2-study-companion button{width:144px;height:216px;flex:none}
}
@media(orientation:portrait) and (max-width:699px){html body #panel.collection-panel{top:calc(var(--review-top) + 54px);height:min(300px,calc(100dvh - 320px))}}
@media(orientation:landscape) and (max-height:600px){
 :root{--review-head:64px;--review-control:44px;--review-top:max(10px,env(safe-area-inset-top));--review-side:max(16px,env(safe-area-inset-left),env(safe-area-inset-right))}
 html body #v2-console-heading{font-size:28px}
 html body #v2-console-picker .v2-console-content{padding:12px 32px;gap:6px}
 html body #v2-console-picker [data-system]{min-height:72px;height:72px;padding:6px 22px}
 html body #v2-console-picker .v2-console-companion{display:none}
 html body #vocabulary-dialog .exercise-category{height:68px;min-height:68px;max-height:68px;padding-top:4px;padding-bottom:4px}
 html body #vocabulary-dialog .exercise-category strong{font-size:22px}
 html body #fc-editor{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-rows:minmax(0,1fr) 42px;gap:6px 12px;max-width:none}
 html body .fc-editor-scroll{grid-column:1;grid-row:1}
 html body #fc-editor .fc-editor-actions{grid-column:1;grid-row:2}
 html body #fc-editor .fc-keyboard-slot{grid-column:2;grid-row:1/3;height:100%;align-items:center}
 html body #fc-editor .pixel-keyboard{--key-size:25px;padding:4px}
 html body #vocabulary-dialog #fc-editor :is(#fc-editor-save,#fc-editor-cancel){height:42px;min-height:42px;font-size:18px;padding:4px 8px}
 html body .wallet{top:var(--review-top)}
 html body #home-view .home-status{top:calc(var(--review-top) + 44px)}
 html body #home-screen #restart-creation{top:76px;font-size:15px}
 html body #review-dialog{width:100vw;padding:8px 12px;grid-template-columns:minmax(160px,1fr) minmax(300px,1.5fr);grid-template-rows:38px 34px minmax(0,1fr) 48px 42px;gap:4px 12px}
 html body #review-dialog :is(.dialog-top,#review-progress,#review-prompt,#review-feedback,#review-next){grid-column:1}
 html body #review-dialog #review-prompt{grid-row:3;font-size:100px}
 html body #review-dialog #review-feedback{grid-row:4;font-size:20px;padding:4px 8px}
 html body #review-dialog #review-next{grid-row:5;margin:0}
 html body #review-dialog #review-answer-form{grid-column:2;grid-row:1/3;align-self:center}
 html body #review-dialog .daily-keyboard-slot{grid-column:2;grid-row:3/6;height:100%;align-items:end}
 html body #review-dialog .pixel-keyboard{--key-size:25px}
 html body #review-dialog .pixel-keyboard[data-mode=hiragana] .pixel-keyboard-row button{font-size:18px}
 html body #review-dialog .review-companion{left:24%;top:52px;width:38%}
 html body #review-dialog[data-state=reward] .daily-reveal{grid-column:2;grid-row:1/6}
 html body #review-dialog[data-state=reward] #review-context{grid-column:1;grid-row:3;align-self:center;margin:0}
 html body #review-dialog .daily-mystery-card{width:180px;height:256px}
 html body #review-dialog[data-state=complete] #review-next{grid-column:2;grid-row:5}
}
@media(orientation:portrait) and (max-height:740px){
 html body #review-dialog{grid-template-rows:36px 32px minmax(48px,1fr) 42px 58px 40px 266px;gap:4px;padding-top:6px}
 html body #review-dialog .daily-keyboard-slot{height:266px}
 html body #review-dialog .pixel-keyboard{--key-size:29px}
 html body #review-dialog .dialog-top h2{font-size:25px}
 html body #v2-console-picker [data-system]{min-height:96px}
 html body #v2-console-picker .v2-console-companion{height:140px;min-height:140px}
 html body #v2-console-picker .v2-console-companion button{width:96px;height:140px}
}
html body[data-console-layout=desktop] #swap-screens{color:#267453;border:0;border-image:url('/assets/interface-v2/pastel-ui/mint-normal.png') var(--native-frame-slice,4) fill / var(--native-frame-corner,8px) / 0 repeat!important;border-image-width:var(--native-frame-corner,8px)!important;background:none;image-rendering:pixelated;image-rendering:crisp-edges;}
html body #home-screen #restart-creation{position:absolute!important;inset:auto!important;left:50%!important;top:calc(28px + 24vh)!important;transform:translateX(-50%)!important;width:auto!important;height:32px!important;min-height:32px;padding:5px 12px;font-size:15px;white-space:nowrap}
html body #home-screen #restart-creation .restart-label{display:inline!important}html body #home-screen #restart-creation svg{display:none}
html body #fc-editor .fc-editor-scroll{scroll-padding:18px}
html body #vocabulary-dialog .fc-home-action span{font-family:PixelUI,sans-serif;font-weight:500;color:inherit;-webkit-text-stroke:0;text-shadow:none}
html body #vocabulary-dialog .fc-home-action:nth-child(1){color:#6b4d89}html body #vocabulary-dialog .fc-home-action:nth-child(2){color:#438169}html body #vocabulary-dialog .fc-home-action:nth-child(3){color:#496f98}
html body #vocabulary-dialog .fc-stats dd{font-size:30px}html body #vocabulary-dialog #fc-card-count-label{font-weight:500;-webkit-text-stroke:0}
@media(orientation:landscape) and (max-height:600px){html body #home-screen #restart-creation{top:116px!important;height:26px!important;min-height:26px;font-size:13px}}
html body #review-dialog #review-feedback .daily-correction{font-family:'Noto Sans JP','Yu Gothic',Meiryo,Arial,sans-serif;font-size:17px;font-weight:600;-webkit-text-stroke:0;text-shadow:0 1px 1px #527a61}
html body #review-dialog #review-feedback.bad .daily-correction{text-shadow:0 1px 1px #87454e}
html body #review-dialog .review-companion:has(#review-message:empty),html body #review-dialog .review-companion:has(#review-message[hidden]){display:none}
html body #vocabulary-dialog .fc-count #fc-card-count-label{font-weight:500;color:#684781;-webkit-text-stroke:0;text-shadow:none}
html body #vocabulary-dialog .fc-home-actions #fc-create{color:#956454}
html body #vocabulary-dialog .fc-home-actions #fc-configure{color:#367961}
