:root{font-family:"Noto Sans JP","Yu Gothic","Meiryo",sans-serif;color:#15283b;background:#f3f6fa;font-weight:700;line-height:1.75}*{box-sizing:border-box}body{margin:0}main{max-width:1000px;margin:auto;padding:36px 20px}h1{font-size:clamp(26px,5vw,44px);line-height:1.45;font-weight:900}h2{font-size:26px}.eyebrow,.tag{font-size:12px;letter-spacing:.08em;color:#275474}.notice{background:#fff1cf;padding:18px;border-radius:12px}nav,.controls,.transport{display:flex;flex-wrap:wrap;gap:10px;align-items:center}nav a{color:#174c72;padding:8px}section{margin-top:36px}button,select{font:inherit;padding:10px 14px;border:1px solid #a8bacd;background:white;border-radius:9px;color:#15283b;cursor:pointer}button[aria-pressed=true],button.selected{color:white;background:#174c72}button:disabled{opacity:.45;cursor:default}.stage{background:#102d49;color:white;text-align:center;border-radius:18px;min-height:330px;padding:32px 28px;display:flex;flex-direction:column;justify-content:center;margin:20px 0}.stage h3{font-size:clamp(25px,4vw,40px);font-weight:900;line-height:1.5;margin:10px 0}.stage p{font-size:clamp(19px,3vw,28px);font-weight:800;margin:10px 0}.stage .tag{font-size:13px;color:#bed5e7}.transport{position:sticky;bottom:0;background:#f3f6faf5;padding:15px 0;border-top:1px solid #c4d1dd;z-index:2}.card{background:white;padding:24px;border-radius:14px;margin:16px 0;border:2px solid transparent}.card.current{border-color:#2780b3}.card .en,.card .ja{font-size:clamp(20px,3vw,25px);font-weight:900;line-height:1.65}.card .en{cursor:pointer}.card .en:focus-visible{outline:3px solid #2780b3;outline-offset:5px}.card h3{font-size:24px;font-weight:900}.card .label{font-size:13px;color:#496276}.card button{margin:4px}.answer[hidden]{display:none}footer{padding-top:36px;color:#53677a;font-size:13px}@media(max-width:450px){main{padding:20px 14px}.stage{padding:24px 18px;min-height:310px}.card{padding:18px}.transport{gap:6px}.transport button{padding:8px 10px}}
/* One stable frame: only its text changes. Page scrolling belongs to the learner. */
.stage{height:390px;min-height:390px;margin:18px 0;overflow:auto;overscroll-behavior:contain}
.stage h3{font-size:clamp(22px,3.1vw,32px);line-height:1.6;overflow-wrap:anywhere}
.stage p{font-size:clamp(18px,2.2vw,23px);line-height:1.6;overflow-wrap:anywhere}
.stage .tag{font-size:13px;flex-shrink:0}
.transport{position:static;border-top:0;background:transparent;padding:0;margin:12px 0}
.learning{margin-top:22px}.modes{margin-top:16px}.instructions{font-size:14px}.rating{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.rating p{margin:8px 0;width:100%}
.wait-options{margin-top:20px}.wait-options p{font-size:14px}.back-top{position:fixed;right:18px;bottom:18px;z-index:5;background:#174c72;color:white;box-shadow:0 3px 12px #102d4930}
footer{padding-bottom:70px}[hidden]{display:none!important}
@media(max-width:450px){.stage{height:430px;min-height:430px;padding:18px 14px}.stage h3{font-size:21px}.stage p{font-size:18px}button,select{max-width:100%}.back-top{right:12px;bottom:12px;font-size:14px}nav{margin-top:24px}}
/* Hiro lesson wordmark and bilingual ink colors. Image background awaits authorized local bytes. */
.stage{background:#fff;color:#111827;border:1px solid #dbe4ed;height:450px;min-height:450px;box-shadow:0 12px 34px #174c720c;padding:22px 28px}
.stage .text-ja{color:#111827}.stage .text-en{color:#1756a9}.stage .tag{color:#536477;letter-spacing:.03em;margin:6px 0}
.brand{display:flex;align-items:center;justify-content:center;gap:10px;flex-shrink:0;color:#174c72;font-size:17px;font-weight:900;letter-spacing:.06em;margin-bottom:12px;line-height:1.6}
.brand-mark{display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;border:1.5px solid #1756a9;border-radius:50%;font-size:19px;font-family:Georgia,serif;font-style:italic;letter-spacing:0}
.stage .keyword{font-size:20px;margin:7px 0;line-height:1.5}.keyword-label{font-size:12px;color:#5d6976;font-weight:700}
.card h3,.card .en{color:#1756a9}.card .ja,.card .meaning{color:#111827}
@media(max-width:450px){.stage{height:520px;min-height:520px;padding:18px 14px}.brand{font-size:13px;gap:7px;letter-spacing:.015em;margin-bottom:10px}.brand-mark{width:24px;height:24px;font-size:16px}.stage .keyword{font-size:17px}.stage h3{font-size:21px}}
/* Keep the wordmark immediately inside the upper frame edge. */
.stage{position:relative;padding-top:52px}
.stage .brand{position:absolute;top:3px;left:14px;right:14px;height:34px;margin:0;z-index:1}
@media(max-width:450px){.stage{padding-top:46px}.stage .brand{top:3px;left:8px;right:8px;height:28px}}
/* Use the exact user-provided PNG. Fit all four decorated edges to the frame. */
.stage{background-color:#fffaf0;background-image:url('assets/cafe-learning-frame.png?v=20261010n');background-repeat:no-repeat;background-position:center;background-size:100% 100%;height:540px;min-height:540px;padding:64px 11% 76px;border-radius:12px;border:0}
.stage .brand{top:3px;left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:94%;padding:0 9px;background:rgba(255,251,240,.94);border-radius:0 0 9px 9px;white-space:nowrap}
@media(max-width:450px){.stage{height:620px;min-height:620px;padding:48px 11% 70px}.stage .brand{left:50%;right:auto;max-width:96%;padding:0 4px}}
/* Interactive screen: ratings stay inside the frame, independent of tap playback. */
.stage{padding-bottom:106px;touch-action:manipulation;cursor:pointer}
#stageContent{display:flex;flex-direction:column;justify-content:center;flex:1;min-height:0;max-width:100%;width:100%}
.frame-ratings{position:absolute;bottom:17px;left:12%;right:12%;z-index:2;cursor:default;text-align:center}
.stage .frame-ratings p{font-size:11px;line-height:1.4;margin:0 0 5px;color:#435568;background:rgba(255,251,240,.9);display:inline-block;border-radius:6px;padding:2px 8px}
.frame-ratings button{min-width:110px;min-height:44px;margin:0 4px;background:#fffaf2eF;box-shadow:0 2px 8px #6c47221a}.frame-ratings button[aria-pressed=true]{background:#1756a9;color:#fff}
.fullscreen-shell:fullscreen,.fullscreen-shell.is-page-fullscreen{position:fixed;inset:0;z-index:9999;width:100%;height:100vh;height:100dvh;padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0);background:#f3f6fa;display:flex;flex-direction:column;overflow:hidden}
.fullscreen-shell:fullscreen .stage,.fullscreen-shell.is-page-fullscreen .stage{flex:1;height:auto;min-height:0;margin:0;border-radius:0;width:100%;padding-top:44px;padding-bottom:74px;overflow:hidden}
.fullscreen-shell:fullscreen .transport,.fullscreen-shell.is-page-fullscreen .transport{flex-shrink:0;margin:0;padding:8px;gap:6px;justify-content:center;line-height:1.3}
.fullscreen-shell:fullscreen .transport button,.fullscreen-shell.is-page-fullscreen .transport button,.fullscreen-shell:fullscreen .transport select,.fullscreen-shell.is-page-fullscreen .transport select{padding:7px 10px;font-size:14px;min-height:38px}
.fullscreen-shell:fullscreen #status,.fullscreen-shell.is-page-fullscreen #status{flex-shrink:0;font-size:11px;line-height:1.3;margin:0;padding:0 8px 4px;text-align:center}
@media(max-width:450px){.stage{padding-bottom:110px}.frame-ratings{left:10%;right:10%;bottom:18px}.frame-ratings button{min-width:104px;padding:9px 11px}}
@media(orientation:landscape) and (max-height:500px){
 .fullscreen-shell:fullscreen .stage,.fullscreen-shell.is-page-fullscreen .stage{padding-top:35px;padding-bottom:58px}
 .fullscreen-shell:fullscreen #stageContent h3,.fullscreen-shell.is-page-fullscreen #stageContent h3{font-size:18px;line-height:1.35;margin:4px 0}
 .fullscreen-shell:fullscreen #stageContent p,.fullscreen-shell.is-page-fullscreen #stageContent p{font-size:14px;line-height:1.35;margin:3px 0}
 .fullscreen-shell:fullscreen #stageContent .tag,.fullscreen-shell.is-page-fullscreen #stageContent .tag{font-size:10px}
 .fullscreen-shell:fullscreen #stageContent .keyword,.fullscreen-shell.is-page-fullscreen #stageContent .keyword{font-size:14px}
 .fullscreen-shell:fullscreen .brand,.fullscreen-shell.is-page-fullscreen .brand{font-size:13px;height:26px;gap:6px}
 .fullscreen-shell:fullscreen .brand-mark,.fullscreen-shell.is-page-fullscreen .brand-mark{width:22px;height:22px;font-size:15px}
 .fullscreen-shell:fullscreen .frame-ratings,.fullscreen-shell.is-page-fullscreen .frame-ratings{bottom:8px}
 .fullscreen-shell:fullscreen #currentItem,.fullscreen-shell.is-page-fullscreen #currentItem{display:none}
 .fullscreen-shell:fullscreen .frame-ratings button,.fullscreen-shell.is-page-fullscreen .frame-ratings button{min-height:38px;padding:6px 10px;font-size:14px}
}

.voice-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0}.voice-controls label{font-weight:700}.voice-controls select{min-height:40px;max-width:180px}.voice-controls p{font-size:12px;margin:0}.fullscreen-shell:fullscreen .voice-controls,.is-page-fullscreen .voice-controls{margin:0;padding:3px 8px;gap:6px;font-size:12px;flex-shrink:0}.fullscreen-shell:fullscreen .voice-controls select,.is-page-fullscreen .voice-controls select{min-height:30px;font-size:12px}.fullscreen-shell:fullscreen #voiceStatus,.is-page-fullscreen #voiceStatus{display:none}

/* Keep upper mode controls adjacent to the lesson screen. */
.learning>.modes{margin-top:8px;margin-bottom:0;gap:6px}
.fullscreen-shell:not(:fullscreen):not(.is-page-fullscreen)>.stage{margin-top:4px}

/* Transport comes immediately after the frame; voice settings follow. */
.fullscreen-shell:not(:fullscreen):not(.is-page-fullscreen)>.stage{margin-bottom:4px}
.fullscreen-shell:not(:fullscreen):not(.is-page-fullscreen)>.transport{margin:4px 0}
#voiceStatus:empty{display:none}.frame-nav{display:none}
@media(orientation:landscape) and (max-height:500px){
 .fullscreen-shell:fullscreen .frame-nav,.fullscreen-shell.is-page-fullscreen .frame-nav{display:inline-block;min-width:56px;min-height:38px;padding:6px 8px;font-size:14px}
 .fullscreen-shell:fullscreen .frame-ratings,.fullscreen-shell.is-page-fullscreen .frame-ratings{left:6%;right:6%}
}

.pagination{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;margin:12px 0}.pagination span{font-size:14px}.card-search{display:block;margin-top:16px}.card-search input{display:block;font:inherit;font-weight:700;min-height:44px;padding:8px 12px;width:100%;max-width:440px;border:1px solid #a8bacd;border-radius:8px}.trial-banner{background:linear-gradient(120deg,#fff4d7,#f5eadb);border:1px solid #dbcdb7;border-radius:16px;padding:24px}.trial-banner h2{font-size:25px;margin-top:0}.trial-banner a{display:inline-block;background:#1756a9;color:white;padding:12px 18px;border-radius:9px;text-decoration:none}#shareSection{background:white;border-radius:16px;padding:22px}#manualCopy input{display:block;width:100%;font:inherit;font-size:14px;padding:10px;overflow-wrap:anywhere}.trial-banner,#shareSection{scroll-margin-top:15px}
@media(max-width:600px){.pagination{gap:6px}.pagination button{font-size:14px;padding:8px 10px;min-height:44px}.pagination span{font-size:12px}}

/* Navigation is visible inside the frame in portrait, landscape and fullscreen. */
.frame-nav{display:inline-block}.frame-ratings{left:9%;right:9%}
.frame-ratings>div{display:flex;justify-content:center;align-items:center;gap:5px}
.frame-ratings button{min-width:0;min-height:44px;margin:0;padding:9px 12px;white-space:nowrap}
.frame-ratings .frame-nav{padding:9px 10px}
.stage .frame-ratings #audioNotice{display:block;font-size:12px;line-height:1.4;margin:5px 0;color:#8a210e;background:#fff8eb}
#frameResume{margin-top:4px;color:#fff;background:#1756a9}
.stage:has(#audioNotice:not([hidden])){padding-bottom:180px}
@media(max-width:450px){.frame-ratings{left:9%;right:9%}.frame-ratings button{font-size:14px;padding:8px 10px}.frame-ratings .frame-nav{padding:8px}}
@media(orientation:landscape) and (max-height:500px){.frame-ratings{left:6%;right:6%}.frame-ratings button{font-size:14px;padding:6px 9px}.stage:has(#audioNotice:not([hidden])){padding-bottom:138px}}

.breadcrumbs{font-size:14px;gap:5px;margin:0 0 14px;line-height:1.5}.breadcrumbs a,.return-navigation a{display:inline-flex;align-items:center;min-height:44px;padding:8px 10px;color:#1756a9}.breadcrumbs [aria-current]{flex-basis:100%;font-size:13px;color:#536477}.return-navigation{margin-top:24px;gap:10px}.return-navigation a{background:white;border:1px solid #c4d1dd;border-radius:9px}

/* Four large wait controls stay on one row. */
#waits{display:flex;flex-wrap:nowrap;gap:8px;width:100%;max-width:420px}#waits button{flex:1 1 0;min-width:0;min-height:44px;white-space:nowrap;padding:10px 12px}#waits button[data-wait="none"]{flex:1.6 1 0}.wait-options .wait-setting{font-size:13px;color:#435568;margin:6px 0 0}
@media(max-width:450px){#waits{gap:6px}#waits button{font-size:16px;padding:9px 8px}}

/* Frame tap and in-frame arrows own playback. Only compact settings remain below. */
.compact-transport{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;line-height:1.4}
.compact-transport label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;font-size:16px}
.compact-transport>label{min-height:44px}
.compact-transport button,.compact-transport select{font-size:16px;min-height:44px;padding:8px 10px;white-space:nowrap}
.compact-transport #speed{width:76px;max-width:76px}.compact-transport input[type=checkbox]{width:18px;height:18px;margin:0}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.user-notice{font-size:13px;color:#8a210e;background:#fff8eb;padding:8px;border-radius:8px;margin:6px 0}
.fullscreen-shell:fullscreen .compact-transport,.is-page-fullscreen .compact-transport{flex-wrap:nowrap;gap:8px;padding:4px 8px;justify-content:center}
@media(max-width:450px){.compact-transport{gap:8px}.compact-transport button,.compact-transport select{font-size:16px;padding:8px}.compact-transport label{font-size:16px}}

/* Playback icon and reverse timing are inside the stable learning frame. */
.frame-play{position:absolute;top:45px;right:11%;z-index:3;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border-radius:50%;font-size:23px;background:#fffaf2ef;color:#1756a9;box-shadow:0 2px 8px #6c47221a}
.frame-play[aria-pressed=true]{background:#fffaf2ef;color:#1756a9}
.frame-ratings>.frame-waits{display:block;margin-top:6px;width:100%}.frame-waits #waits{max-width:none;gap:6px}
.frame-waits #waits button{min-height:44px;padding:8px;font-size:16px;margin:0}
.reverse-step-control{display:block;width:100%;min-height:40px;margin:6px 0 0;padding:6px 10px;font-size:14px;font-weight:900}.reverse-step-control[aria-pressed=true]{color:#fff;background:#174c72}
.stage .frame-waits .wait-setting{display:block;font-size:12px;line-height:1.35;margin:4px 0 0;padding:0;background:transparent;color:#435568}
.stage[data-mode=reverse]{padding-bottom:190px}.stage[data-mode=reverse]:has(#audioNotice:not([hidden])){padding-bottom:260px}
#stageContent{overflow:auto;overscroll-behavior:contain}
@media(orientation:landscape) and (max-height:600px){
 .fullscreen-shell:fullscreen .stage,.fullscreen-shell.is-page-fullscreen .stage{padding-top:36px;padding-bottom:98px;padding-left:7%;padding-right:7%}
 .fullscreen-shell:fullscreen .stage[data-mode=normal],.fullscreen-shell.is-page-fullscreen .stage[data-mode=normal]{padding-bottom:66px}
 .fullscreen-shell:fullscreen .frame-play,.fullscreen-shell.is-page-fullscreen .frame-play{top:30px;right:5%;width:44px;height:44px;font-size:22px}
 .fullscreen-shell:fullscreen .frame-ratings,.fullscreen-shell.is-page-fullscreen .frame-ratings{display:grid;grid-template-columns:1fr 1.15fr;gap:4px 12px;align-items:end;left:5%;right:5%;bottom:8px}
 .fullscreen-shell:fullscreen .frame-ratings .frame-rating-actions,.fullscreen-shell.is-page-fullscreen .frame-ratings .frame-rating-actions{grid-column:1;grid-row:1;display:flex;gap:4px;justify-content:center}
 .fullscreen-shell:fullscreen .frame-ratings .frame-waits,.fullscreen-shell.is-page-fullscreen .frame-ratings .frame-waits{grid-column:2;grid-row:1;margin:0}
 .fullscreen-shell:fullscreen .stage[data-mode=normal] .frame-ratings,.fullscreen-shell.is-page-fullscreen .stage[data-mode=normal] .frame-ratings{display:flex;justify-content:center}
 .fullscreen-shell:fullscreen .frame-ratings #currentItem,.fullscreen-shell.is-page-fullscreen .frame-ratings #currentItem{display:none}
 .fullscreen-shell:fullscreen .frame-ratings button,.fullscreen-shell.is-page-fullscreen .frame-ratings button{font-size:14px;min-height:44px;min-width:0;padding:7px 6px}
 .fullscreen-shell:fullscreen .frame-waits .wait-setting,.fullscreen-shell.is-page-fullscreen .frame-waits .wait-setting{font-size:11px}
 .fullscreen-shell:fullscreen .voice-controls,.fullscreen-shell.is-page-fullscreen .voice-controls{flex-wrap:nowrap;justify-content:center;padding:2px 6px;gap:6px}
 .fullscreen-shell:fullscreen .voice-controls label,.fullscreen-shell.is-page-fullscreen .voice-controls label{white-space:nowrap}
 .fullscreen-shell:fullscreen .voice-controls select,.fullscreen-shell.is-page-fullscreen .voice-controls select{max-width:145px}
 .fullscreen-shell:fullscreen #audioNotice,.fullscreen-shell.is-page-fullscreen #audioNotice{grid-column:1/-1;grid-row:2;margin:0}
 .fullscreen-shell:fullscreen #frameResume,.fullscreen-shell.is-page-fullscreen #frameResume{grid-column:1/-1;grid-row:3;justify-self:center;margin:0}
 .fullscreen-shell:fullscreen .stage:has(#audioNotice:not([hidden])),.fullscreen-shell.is-page-fullscreen .stage:has(#audioNotice:not([hidden])){padding-bottom:176px}
}

.stage .frame-waits .wait-label{display:block;font-size:12px;line-height:1.35;margin:0 0 4px;padding:0;background:transparent;color:#435568}
@media(orientation:portrait){
 .fullscreen-shell:fullscreen .stage[data-mode=reverse],.fullscreen-shell.is-page-fullscreen .stage[data-mode=reverse]{padding-bottom:208px;padding-top:82px}
 .fullscreen-shell:fullscreen .stage[data-mode=normal],.fullscreen-shell.is-page-fullscreen .stage[data-mode=normal]{padding-top:82px;padding-bottom:110px}
 .fullscreen-shell:fullscreen .stage[data-mode=reverse]:has(#audioNotice:not([hidden])),.fullscreen-shell.is-page-fullscreen .stage[data-mode=reverse]:has(#audioNotice:not([hidden])){padding-bottom:278px}
 .fullscreen-shell:fullscreen .stage,.fullscreen-shell.is-page-fullscreen .stage{padding-left:8%;padding-right:8%}
}
@media(orientation:landscape) and (max-height:600px){.stage .frame-waits .wait-label{font-size:11px}}
/* Keep the café mug visible beside the bottom controls. */
@media(max-width:450px){.frame-ratings{left:9%;right:18%}}
@media(orientation:landscape) and (max-height:600px){.fullscreen-shell:fullscreen .frame-ratings,.fullscreen-shell.is-page-fullscreen .frame-ratings{right:19%}}

/* Fixed Japanese upper slot and English/hint lower slot across reverse phases. */
.stage .text-en,.card h3,.card .en,.frame-play{color:#123f8c}
#stageContent.reverse-layout{display:grid;grid-template-rows:40px minmax(0,1fr);gap:6px;justify-content:initial;overflow:hidden}
.reverse-layout>.tag,.reverse-layout>.keyword{margin:0!important;display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden}
.reverse-slots{display:grid;grid-template-rows:minmax(0,auto) minmax(0,auto);align-content:center;gap:8px;min-width:0;min-height:0;width:100%}
.reverse-ja-slot,.reverse-answer-slot{min-width:0;min-height:0;width:100%;max-width:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;display:flex;align-items:center;justify-content:center}
.stage .reverse-ja,.stage .reverse-response{display:block;width:100%;max-width:100%;min-width:0;margin:0!important;text-align:center;line-height:1.5;white-space:normal;word-break:normal;overflow-wrap:anywhere}
.stage .reverse-response{font-size:clamp(18px,2.2vw,23px);font-weight:900}
@media(max-width:450px){#stageContent.reverse-layout{grid-template-rows:40px minmax(0,1fr);gap:4px}.reverse-slots{gap:6px}.stage .reverse-ja{font-size:20px}.stage .reverse-response{font-size:18px}}
@media(orientation:landscape) and (max-height:600px){
 .fullscreen-shell:fullscreen #stageContent.reverse-layout,.fullscreen-shell.is-page-fullscreen #stageContent.reverse-layout{grid-template-rows:18px minmax(0,1fr);gap:2px}
 .fullscreen-shell:fullscreen .reverse-slots,.fullscreen-shell.is-page-fullscreen .reverse-slots{gap:4px}
 .fullscreen-shell:fullscreen .stage .reverse-ja,.fullscreen-shell.is-page-fullscreen .stage .reverse-ja{font-size:16px;line-height:1.35}
 .fullscreen-shell:fullscreen .stage .reverse-response,.fullscreen-shell.is-page-fullscreen .stage .reverse-response{font-size:16px;line-height:1.35}
}

.range-controls{margin-bottom:10px}.range-controls>label{display:block}.custom-range{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;margin-top:8px}.custom-range label{display:inline-flex;align-items:center;gap:4px;font-size:14px}.custom-range input{font:inherit;width:66px;min-height:44px;padding:6px;border:1px solid #a8bacd;border-radius:8px}.custom-range button{min-height:44px;padding:8px 12px}.range-controls #rangeNotice{font-size:12px;margin:5px 0;color:#435568}.reverse-layout>.tag{font-size:12px!important;line-height:1.4!important}

#cards{margin-top:16px}#cards>.controls{margin-top:0}

.card-practice{height:700px;display:grid;grid-template-rows:70px minmax(0,1fr)60px;gap:8px;overflow:hidden;overflow-anchor:none;background:white;border:1px solid #d5dfe9;border-radius:14px;margin-top:12px}
.card-practice>#summary{font-size:13px;line-height:1.6;margin:0;padding:12px 18px;overflow:auto;overscroll-behavior:contain}
.card-body{min-height:0;overflow:auto;overscroll-behavior:contain;overflow-anchor:none}.card-practice .card{margin:0;border-radius:0;padding:20px;border-width:2px}.card-practice .pagination{margin:0;padding:6px 10px;border-top:1px solid #d5dfe9;background:white;flex-wrap:nowrap;gap:10px}.card-practice .pagination button{min-height:44px;font-size:14px;padding:8px 12px}.card-practice .pagination span{font-size:14px;white-space:nowrap;min-width:65px;text-align:center}#cardEmpty{padding:20px}
@media(max-width:450px){.card-practice{height:680px}.card-practice .card{padding:18px}.card-practice .pagination{gap:6px;padding:6px}.card-practice .pagination button{padding:8px 10px}}

.card-practice{grid-template-rows:112px minmax(0,1fr)60px}.card-header{padding:10px 12px;min-height:0;overflow:auto;overscroll-behavior:contain}.card-header .controls{gap:6px}.card-header>#summary{font-size:13px;line-height:1.45;margin:6px 0 0}.card-header button{min-height:44px;padding:8px 10px}
@media(max-width:450px){.card-practice{grid-template-rows:170px minmax(0,1fr)60px}.card-header button{font-size:14px;padding:8px 10px}}

/* One step larger English; Japanese and the reserved reverse slots stay stable. */
.stage h3.text-en{font-size:clamp(25px,3.47vw,36px)}
.stage .reverse-response,.stage p.text-en:not(.keyword){font-size:clamp(20.25px,2.475vw,25.875px)}
.stage .keyword .text-en{font-size:1.125em}
.frame-exit{position:absolute;top:45px;left:11%;z-index:3;min-height:44px;padding:6px 10px;font-size:13px;background:#fffaf2ef;color:#123f8c;box-shadow:0 2px 8px #6c47221a}
@media(max-width:450px){.stage h3.text-en{font-size:23.625px}.stage .reverse-response,.stage p.text-en:not(.keyword){font-size:20.25px}#stageContent.reverse-layout{grid-template-rows:40px minmax(0,1fr)}}
@media(orientation:landscape) and (max-height:600px){
 .fullscreen-shell:fullscreen,.fullscreen-shell.is-page-fullscreen{align-items:stretch;justify-content:stretch;background:#fffaf0}
 .fullscreen-shell:fullscreen>.transport,.fullscreen-shell.is-page-fullscreen>.transport,
 .fullscreen-shell:fullscreen>.voice-controls,.fullscreen-shell.is-page-fullscreen>.voice-controls,
 .fullscreen-shell:fullscreen>#userNotice,.fullscreen-shell.is-page-fullscreen>#userNotice{display:none!important}
 .fullscreen-shell:fullscreen>.stage,.fullscreen-shell.is-page-fullscreen>.stage{
  flex:1;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;margin:0;border-radius:0;
  padding-top:36px;padding-bottom:98px;background-size:100% 100%;
 }
 .fullscreen-shell:fullscreen .frame-exit,.fullscreen-shell.is-page-fullscreen .frame-exit{top:30px;left:5%;min-height:44px}
 .fullscreen-shell:fullscreen #stageContent h3.text-en,.fullscreen-shell.is-page-fullscreen #stageContent h3.text-en{font-size:24px;line-height:1.35}
 .fullscreen-shell:fullscreen #stageContent .reverse-response,.fullscreen-shell.is-page-fullscreen #stageContent .reverse-response,
 .fullscreen-shell:fullscreen #stageContent p.text-en:not(.keyword),.fullscreen-shell.is-page-fullscreen #stageContent p.text-en:not(.keyword){font-size:21px;line-height:1.35}
 .fullscreen-shell:fullscreen #stageContent h3.text-ja,.fullscreen-shell.is-page-fullscreen #stageContent h3.text-ja,
 .fullscreen-shell:fullscreen #stageContent p.text-ja,.fullscreen-shell.is-page-fullscreen #stageContent p.text-ja{font-size:20px;line-height:1.35}
}

/* A dedicated action dock never gets displaced when the answer expands. */
.card-practice{grid-template-rows:112px minmax(0,1fr)124px 60px}
.card-actions{grid-row:3;min-height:0;overflow:hidden;padding:8px 12px;border-top:1px solid #d5dfe9;background:white;display:flex;flex-direction:column;justify-content:center;gap:6px}
.card-actions>div{display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;gap:6px}
.card-actions button{font-size:14px;min-height:44px;padding:8px 10px;white-space:nowrap}
.card-practice>.pagination{grid-row:4}
@media(max-width:450px){.card-practice{grid-template-rows:170px minmax(0,1fr)124px 60px}.card-actions{padding:8px 10px}.card-actions button{font-size:14px;padding:8px 9px}}

/* Intrinsic widths must fit the page, including the narrow 320px layout. */
html{scrollbar-gutter:stable}main,section,.fullscreen-shell,.card-body,#cardList,.card,.card-actions,.card-header{min-width:0;max-width:100%}
.card h3,.card p,.card summary,.notice,.breadcrumbs{overflow-wrap:anywhere}
label{max-width:100%}#chapter,#studySet{max-width:100%;width:100%}.custom-range{flex-wrap:wrap}
@media(max-width:350px){.card-actions{padding:8px 4px}.card-actions>div{gap:3px}.card-actions button{font-size:12px;padding:8px 5px}.card-practice .pagination{gap:3px}.card-practice .pagination button{font-size:12px;padding:8px 6px}}
@media(orientation:landscape) and (max-height:600px){.fullscreen-shell:fullscreen>.stage,.fullscreen-shell.is-page-fullscreen>.stage{padding-top:36px;padding-bottom:98px}.fullscreen-shell:fullscreen>.stage[data-mode=normal],.fullscreen-shell.is-page-fullscreen>.stage[data-mode=normal]{padding-top:36px;padding-bottom:66px}}
