/* Sign Diver POC: presentation layer only. Production controls and scripts retained. */
:root{--card-bg:#fff;--card-border:#d8e8eb;--card-hover-border:#7bc5ce;--card-shadow:#174b5c0a;--text-primary:#073b52;--text-secondary:#325a6b;--text-muted:#577783;--text-on-ocean:#325a6b;--text-on-ocean-bright:#00879a;--ogp-blue:#009aac;--ogp-mint:#b9e7d7;--ogp-lavender:#48a6b0;--btn-game:#00879a;--btn-practice:#00879a;--btn-game-shadow:#00879a15;--btn-practice-shadow:#00879a15}
html{scrollbar-width:none}body:not(.site-top){font-family:"Yu Gothic",Meiryo,sans-serif;background:#fdfcf8;color:#073b52;padding:0 24px 32px;justify-content:flex-start;gap:20px;overflow-x:clip}body:not(.site-top)::before,body:not(.site-top)::after{display:none}.page-wrapper{background:transparent}.site-top .stars-layer,.site-top .surface-glow,.site-top .surface-waves,.caustics-layer,.bubbles-layer{display:none}
.poc-brand{width:100%;max-width:1120px;min-height:100px;margin:0 auto;display:flex;align-items:center;gap:9px;color:#073b52;font-size:29px;font-weight:800;letter-spacing:-1px;position:relative;z-index:1}.poc-brand svg{width:40px;height:29px;fill:none;stroke:#00a5cd;stroke-width:4;stroke-linecap:round}.poc-brand:after{content:"";margin-left:auto;width:90px;height:25px;background:linear-gradient(110deg,#e4f6ef,#d9f5fa);border-radius:70% 30% 65% 35%}
button,input,select{font-family:inherit}button,a,input,select{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #00879a;outline-offset:4px}button{box-shadow:none!important}.container,.game-container{box-shadow:none;backdrop-filter:none;border:1px solid #d8e8eb;border-radius:18px;background:#fff}.site-footer{line-height:2;max-width:1100px;margin:26px auto 0;color:#577783}.site-footer a{color:#325a6b!important}.site-footer .footer-sep{color:#99b6bc}.site-footer a:hover{color:#00879a!important}
.reading .container{max-width:900px;padding:34px 48px 44px;border:0;border-radius:0;background:transparent}.reading h1{text-align:left;font-size:36px;line-height:1.5;letter-spacing:-.02em;margin-bottom:24px;color:#073b52}.reading h2{font-size:23px;line-height:1.6;margin-top:36px;border-color:#bfe5e9;color:#073b52;background:none}.reading h3{color:#0a7588}.reading p,.reading li{font-size:16px;line-height:2;color:#325a6b}.reading a{color:#007f95;overflow-wrap:anywhere}.reading .subtitle{color:#527884;text-align:left}.reading .world-box,.reading .rule-box,.reading .highlight-box,.reading .bcast-box{background:#eff8f5;border:0;border-left:3px solid #86cdbb;box-shadow:none;border-radius:0;padding:22px 24px}.reading .world-box:before{display:none}.reading .stage-list li{background:none;border-bottom:1px solid #dbe9ea;border-radius:0}.reading .back-link{background:white;border:1px solid #b9dbe2;color:#073b52;border-radius:28px;box-shadow:none}.reading.legal .poc-brand:after{opacity:.35}.reading.legal h1{font-size:32px}.reading .date{color:#577783}
.utility .page-wrapper{padding:0;width:100%;min-height:0;overflow:visible}.utility .container{max-width:1080px;width:100%;padding:28px;background:transparent;border:0}.settings-title{font-size:32px;color:#073b52}.settings-title-sub{display:none}.settings-header{border-bottom:1px solid #d7e8e9;padding-bottom:24px}.settings-toc{background:#f1f7f5;border:1px solid #dfebea;border-radius:13px;box-shadow:none}.toc-item{border-radius:8px;color:#325a6b}.toc-item.active{background:#ddf2ef;color:#006e80}.settings-section{background:#fff!important;border:1px solid #d7e8e9!important;border-radius:14px;box-shadow:none!important}.section-title{color:#073b52}.section-title-num{background:#e2f3f1!important;color:#007b8d!important}.seg-btn{border:1px solid #c6dfe4;background:#fff;color:#325a6b;border-radius:9px}.seg-btn.active,.seg-btn[aria-checked=true]{background:#00879a!important;border-color:#00879a!important;color:#fff!important}.action-btn,.support-link{border-color:#c5e1e5;border-radius:10px}.back-link,.back-btn{border-color:#c5e1e5;color:#325a6b;background:#fff}.toast{background:#073b52;color:white}
.history-page .page-header,.history-page .summary,.history-page .filters,.history-page .history-list{max-width:1000px;width:100%}.history-page .page-title{color:#073b52;font-size:30px}.summary-card{background:#fff;border-color:#d8e8eb;border-radius:14px;box-shadow:none;backdrop-filter:none}.summary-value{color:#007f95;background:none;-webkit-text-fill-color:#007f95}.summary-label{color:#527884}.filter-btn{border:1px solid #c6dfe4;background:white;color:#325a6b}.filter-btn.active{background:#00879a;color:white;border-color:#00879a}.filter-btn:not(.active):hover{background:#eff8f7;border-color:#7bc5ce;color:#073b52}.history-card{background:#fff;border:1px solid #d8e8eb;border-radius:13px;box-shadow:none}.empty-state{color:#325a6b;background:#f0f8f5;border:1px solid #d7e8e9;border-radius:16px;padding:44px 24px}.clear-btn{color:#9d4336;border:1px solid #e6c7c0;background:#fff}
.practice-page .container{max-width:1180px;padding:22px}.practice-page .page-header{text-align:left;margin-bottom:22px}.practice-page .page-title{font-size:29px}.practice-page .page-subtitle{font-size:14px;margin-top:6px}.mode-selector{justify-content:flex-start;gap:10px;margin-bottom:18px}.mode-btn{background:white;border:1px solid #bcdde2;color:#325a6b;border-radius:10px;padding:11px 22px;font-size:15px}.mode-btn.active{background:#00879a;color:white;border-color:#00879a}.sample-area{background:#eef8f4;border:1px solid #d5e9e3;border-radius:14px}.camera-area{border-color:#cde2e5;border-radius:14px}.character-selector,.selector-section,.recognition-result{border-color:#d5e7e9;background:#f4faf9;border-radius:12px}.row-buttons button,.char-buttons button,.nav-btn,.control-btn,.reading-hint-btn,.reading-next-wrapper button,.vrm-control-button{border-radius:9px;border-color:#c4dfe4;background:#fff;color:#325a6b;box-shadow:none}.row-buttons button.active,.char-buttons button.active,.nav-btn.primary,.control-btn.primary{background:#00879a!important;color:white!important;border-color:#00879a}.recognized-char,.current-char-display,.reading-question-counter{color:#007f95}.vrm-control-hint{background:#ffffffd9;color:#31586a}.cam-modal-box,.pause-box,.tutorial-box,.result-content{background:#fff!important;color:#073b52!important;border:1px solid #c8e2e5!important;border-radius:18px!important;box-shadow:0 16px 60px #103d5622!important}.cam-modal-title,.tutorial-title,.pause-title,.result-title{color:#073b52!important}.cam-modal-body,.tutorial-tips,.pause-desc{color:#325a6b!important}.cam-modal-btn.primary,.tutorial-ok-btn,.pause-resume-btn,.result-btn.primary,#cameraYesBtn{background:#00879a!important;color:white!important}.cam-modal-btn.secondary,.pause-abort-btn,.result-btn.secondary{background:#eff8f7!important;color:#325a6b!important}.cam-modal-box button{border-radius:10px!important}.camera-area video,.camera-wrapper{background:#173d4c}
.typing-page .game-container{max-width:1120px}.game-header{background:#e4f4f1;color:#073b52;border-bottom:1px solid #b8dedf}.pause-btn{color:#073b52;background:#fff;border:1px solid #b9dbe2}.word-display{background:#eef8f7}.word-display #seaCanvas{opacity:.15}.current-word,.hiragana-display{color:#073b52!important;text-shadow:none!important}.hiragana-display .current{color:#fff!important;background:#00879a;text-shadow:none!important}.hiragana-display .completed{color:#ffffff80!important}.depth-gauge,.depth-meter{color:#073b52!important;text-shadow:none!important}.depth-gauge-sub{color:#446e7c}.total-timer-bar-wrap,.word-timer-bar-wrap{background:#d7e8e8}.total-timer-bar,.word-timer-bar{background:#0099a9}.recognition-area{background:#f4faf8;border-color:#d4e8e7}.recognition-result{background:#fff}.status-box{color:#325a6b;background:#edf7f4}.loading-screen{background:#fdfcf8!important;color:#073b52!important}.loading-title,.loading-percent,.loading-progress{color:#073b52!important}.tips-card{background:#edf8f4!important;border-color:#cfe5df!important;color:#325a6b!important}.tips-text,.tips-counter{color:#325a6b!important}.loading-bar{background:#009aac!important}.result-screen,.pause-overlay,.tutorial-overlay{background:#123d4d66!important}.stat-item{background:#eff8f5;border-color:#d7e8e9}.stat-label{color:#527884}.stat-value{color:#007f95}.stage-result{background:#eff8f5;color:#073b52}.cam-adjust-banner{background:#e8f6f3;color:#073b52}.camera-area .cam-adjust-overlay{background:#163f4ae0;color:#fff}
.wizard-box{background:#fff;border:1px solid #cde4e6;border-radius:18px;color:#073b52;max-height:92svh;overflow:auto}.wizard-step-title{color:#073b52}.wizard-step-desc{color:#325a6b}.wizard-btn-primary,.wizard-choice-btn.selected{background:#00879a;color:white;border-color:#00879a}.wizard-demo-badge{display:none}.wizard-overlay{background:#123d4d66}.wizard-demo{border-radius:12px}.wizard-progress-dot.active{background:#00879a}
@media(max-width:768px){body:not(.site-top){padding:0 16px 28px;gap:16px}.poc-brand{min-height:76px;font-size:24px}.poc-brand svg{width:32px}.poc-brand:after{width:55px;height:18px}.reading .container{padding:18px 5px 28px;width:100%}.reading h1{font-size:28px;line-height:1.55}.reading.legal h1{font-size:25px}.reading h2{font-size:21px;margin-top:28px}.reading p,.reading li{font-size:15px;line-height:1.95}.reading .world-box,.reading .rule-box,.reading .highlight-box,.reading .bcast-box{padding:18px 16px}.utility .container{padding:12px 0}.settings-header{padding-bottom:20px}.settings-title{font-size:28px}.settings-toc{flex-wrap:wrap;overflow:visible}.toc-item{font-size:13px;padding:9px 11px}.settings-section{padding:21px 17px}.settings-row{gap:12px}.settings-row-label{font-size:15px}.settings-row-hint{font-size:13px}.seg-buttons{flex-wrap:wrap}.seg-btn{padding:12px 10px;font-size:14px}.history-page .page-header{flex-wrap:wrap;gap:12px}.history-page .page-title{font-size:25px}.history-page .summary{gap:8px}.summary-card{padding:15px 8px}.summary-value{font-size:25px}.summary-label{font-size:11px}.filters{flex-wrap:wrap;gap:8px}.filter-btn{padding:9px 14px}.clear-btn{margin-left:0}.practice-page .container{padding:14px;border-radius:15px}.practice-page .page-title{font-size:24px}.mode-selector{gap:6px;flex-wrap:wrap}.mode-btn{padding:10px 12px;font-size:13px}.practice-main{flex-wrap:wrap}.sample-area{width:100%;max-width:none}.camera-area{min-width:0;max-width:100%}.row-buttons,.char-buttons,.navigation{flex-wrap:wrap}.vrm-control-hint{font-size:10px;max-width:100%;white-space:normal}.typing-page .game-header{padding:13px 12px 0}.game-header-top{gap:8px;flex-wrap:wrap}.timer,.score{font-size:20px}.stats{font-size:12px}.game-main{min-width:0}.current-word{font-size:clamp(24px,7vw,38px)}.hiragana-display{font-size:clamp(19px,6vw,30px)}.tutorial-box,.pause-box,.cam-modal-box,.result-content{max-width:calc(100vw - 32px);padding:22px 18px!important}.site-footer{margin-top:20px;font-size:12px}.site-footer a{display:inline-block;margin:4px 5px}.reading table{width:100%;table-layout:fixed}.reading td,.reading th{overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.typing-page .word-display{background:#07516c}.typing-page .word-display #seaCanvas{opacity:1;filter:brightness(.58) saturate(.92)}
.typing-page .current-word,.typing-page .hiragana-display{color:#fff!important;text-shadow:0 2px 9px #06364e88!important}
.typing-page .depth-gauge-value{color:#ffffffb8}.typing-page .depth-gauge-sub{color:#ffffffa6}
.typing-page .tutorial-box{box-sizing:border-box;width:min(520px,calc(100vw - 32px));max-width:none;padding:25px 28px 23px!important;text-align:left}
.typing-page .tutorial-icon{text-align:center;font-size:34px;line-height:1;margin-bottom:7px}
.typing-page .tutorial-title{text-align:center;font-size:18px;letter-spacing:.08em;margin-bottom:16px}
.typing-page .tutorial-tips{margin:0 0 19px;padding:0}
.typing-page .tutorial-tips li{align-items:flex-start;gap:11px;margin:0;padding:8px 0;font-size:14px;line-height:1.55;color:#244b5f}
.typing-page .tutorial-tips li+li{border-top:1px solid #e5f0f0}
.typing-page .tutorial-tips li .ti{width:23px;flex:0 0 23px;margin-top:0;text-align:center;font-size:17px}
.typing-page .tutorial-tips strong{color:#006f88}
.typing-page .tutorial-ok-btn{display:block;margin:0 auto;padding:12px 34px;font-size:15px;letter-spacing:.04em}
.typing-page .tutorial-skip{text-align:center;margin-top:9px;font-size:11px}
.typing-page #canvas{max-width:100%;background:#173d4c;border-color:#cde2e5}.tutorial-box p,.tutorial-skip{color:#325a6b!important}.typing-page .camera-area{min-width:0}.combo-marker{color:#795600}
@media(max-width:520px){.typing-page .tutorial-box{padding:20px 19px 18px!important}.typing-page .tutorial-title{margin-bottom:10px}.typing-page .tutorial-tips{margin-bottom:12px}.typing-page .tutorial-tips li{font-size:13px;padding:6px 0;line-height:1.45}}
.service-name-jp{white-space:nowrap}
/* POC-local artwork: no production asset or content changes. */
.poc-ui-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.14em; flex: none; }
.stage-art { display: block; width: min(100%, 150px); height: auto; aspect-ratio: 16 / 9; object-fit: contain; margin: 0 auto 5px; }
.stage-result-art { display: block; width: 114px; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.history-stage-art { display: block; width: 48px; height: 32px; object-fit: contain; }
.title-art { display: block; width: 112px; max-width: 100%; height: 100px; object-fit: contain; margin: 0 auto; }
.history-title-art { width: 26px; height: 23px; object-fit: contain; vertical-align: middle; margin-right: 3px; }
/* Approved POC text simplification: enlarge only the modified UI. */
.practice-page .camera-status{font-size:13px;padding:5px 9px}
.practice-page .random-description p,.practice-page .reading-description p{font-size:16px;line-height:1.65}
.typing-page .stats{font-size:14px;white-space:nowrap}
.typing-page .depth-meter{display:block;position:absolute;right:12px;bottom:9px;top:auto;z-index:3;font-size:14px;font-weight:700;color:#fff!important;text-shadow:0 1px 5px #06364e88}
.typing-page #depthGauge{display:none}
.typing-page .tutorial-tips li{font-size:16px;line-height:1.55;margin-bottom:10px}
.typing-page .tutorial-ok-btn{font-size:16px}
.typing-page .tutorial-skip{font-size:13px}
.typing-page .cam-adjust-banner-text{font-size:16px}
.typing-page .cam-adjust-tips{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;font-size:14px}
.typing-page .stat-label{font-size:14px}
.utility .settings-row-hint{font-size:15px}
.utility .seg-btn,.utility .action-btn{font-size:16px}
.utility .toc-item{font-size:13px}
.utility .section-title{font-size:18px}
.history-page .summary-label{font-size:14px}
.reading:not(.legal) .practice-rule-note{font-size:13px;line-height:1.7;color:#527884}

/* Desktop typing loading state: bring its content forward and remove the full-viewport blank card. */
@media (min-width:900px){
  .typing-page #loadingScreen{
    min-height:clamp(480px,calc(100svh - 288px),660px);
    padding:38px 48px;
  }
  .typing-page #loadingScreen .loading-title{
    font-size:23px;
    font-weight:700;
    letter-spacing:.09em;
    margin-bottom:25px;
  }
  .typing-page #loadingScreen .tips-card{
    max-width:720px;
    min-height:180px;
    padding:30px 36px;
    gap:18px;
    margin-bottom:25px;
  }
  .typing-page #loadingScreen .tips-emoji{font-size:58px}
  .typing-page #loadingScreen .tips-text{font-size:22px;line-height:1.65}
  .typing-page #loadingScreen .tips-counter{font-size:16px;margin-bottom:16px}
  .typing-page #loadingScreen .loading-progress{font-size:18px}
  .typing-page #loadingScreen .loading-bar-wrap{
    width:min(420px,100%);
    height:7px;
    margin-top:16px;
  }
  .typing-page #loadingScreen .loading-percent{font-size:16px;margin-top:10px}
}

/* Approved PC modal option B. Smaller PC viewports retain the same layout. */
@media (min-width:900px){
  .typing-page #camAdjustDialog .tutorial-box,
  .typing-page #tutorialOverlay .tutorial-box{
    max-width:none;
    max-height:calc(100svh - 48px);
    overflow-y:auto;
  }
  .typing-page #camAdjustDialog .tutorial-box{
    width:min(960px,calc(100vw - 64px));
    padding:41px 55px 40px!important;
  }
  .typing-page #tutorialOverlay .tutorial-box{
    width:min(1020px,calc(100vw - 64px));
    padding:49px 58px 48px!important;
  }
  .typing-page #camAdjustDialog .tutorial-icon{font-size:66px;margin-bottom:10px}
  .typing-page #tutorialOverlay .tutorial-icon{font-size:70px;margin-bottom:10px}
  .typing-page #camAdjustDialog .tutorial-title,
  .typing-page #tutorialOverlay .tutorial-title{font-size:32px;margin-bottom:23px}
  .typing-page #camAdjustDialog .tutorial-box p{font-size:22px!important;margin-bottom:30px!important}
  .typing-page #camAdjustDialog .tutorial-skip{font-size:18px!important;margin-top:13px}
  .typing-page #tutorialOverlay .tutorial-tips{margin-bottom:28px}
  .typing-page #tutorialOverlay .tutorial-tips li{
    gap:16px;
    padding:12px 0;
    margin-bottom:12px;
    font-size:24px;
  }
  .typing-page #tutorialOverlay .tutorial-tips li .ti{
    width:34px;
    flex-basis:34px;
    font-size:25px;
  }
  .typing-page #camAdjustDialog .tutorial-ok-btn,
  .typing-page #tutorialOverlay .tutorial-ok-btn{
    min-height:77px;
    font-size:23px;
    padding:18px 48px;
  }
  .typing-page #camAdjustDialog .tutorial-ok-btn{min-width:288px}
  .typing-page #tutorialOverlay .tutorial-ok-btn{min-width:320px;min-height:82px;font-size:24px}
  .typing-page #tutorialOverlay .tutorial-skip{font-size:19px;margin-top:13px}

  .practice-page #cameraSelectModal .cam-modal-box,
  .typing-page #cameraSelectModal .cam-modal-box{
    box-sizing:border-box;
    width:min(900px,calc(100vw - 64px));
    max-width:none;
    max-height:calc(100svh - 48px);
    overflow-y:auto;
    padding:57px 54px;
  }
  .practice-page #cameraSelectModal .cam-modal-icon,
  .typing-page #cameraSelectModal .cam-modal-icon{font-size:72px;margin-bottom:18px}
  .practice-page #cameraSelectModal .cam-modal-title,
  .typing-page #cameraSelectModal .cam-modal-title{font-size:33px;margin-bottom:18px}
  .practice-page #cameraSelectModal .cam-modal-body,
  .typing-page #cameraSelectModal .cam-modal-body{font-size:24px;margin-bottom:30px}
  .practice-page #cameraSelectModal .cam-select-list,
  .typing-page #cameraSelectModal .cam-select-list{gap:12px;margin-bottom:30px}
  .practice-page #cameraSelectModal .cam-select-item,
  .typing-page #cameraSelectModal .cam-select-item{
    min-height:84px;
    padding:18px 24px;
    font-size:24px;
  }
  .practice-page #cameraSelectModal .cam-modal-btn.secondary,
  .typing-page #cameraSelectModal .cam-modal-btn.secondary{
    min-height:78px;
    padding:16px 42px;
    font-size:24px;
  }

  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"])){
    box-sizing:border-box;
    width:min(920px,calc(100vw - 64px));
    max-width:none;
    max-height:calc(100svh - 48px);
    padding:50px 59px 47px;
  }
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"])) .wizard-progress{
    gap:8px;
    margin-bottom:27px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"]) .wizard-step-title{
    font-size:33px;
    margin-bottom:12px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"]) .wizard-step-desc{
    font-size:20px;
    margin-bottom:30px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="4"],[data-step="5"]) .wizard-choices{
    gap:15px;
    margin-bottom:30px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="4"],[data-step="5"]) .wizard-choice-btn{
    min-height:83px;
    padding:20px;
    font-size:23px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"]) .wizard-nav{
    gap:15px;
    margin-top:9px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"]) .wizard-btn{
    min-height:80px;
    font-size:21px;
    padding:18px 32px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"]) .wizard-btn-secondary{min-width:116px}
  .site-top #setupWizard .wizard-step.active[data-step="6"] .wizard-summary{
    padding:21px 27px;
    margin-bottom:27px;
    font-size:20px;
  }
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"])) .wizard-skip-row{
    margin-top:21px;
    padding-top:18px;
  }
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"])) .wizard-skip{font-size:18px}
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="4"],[data-step="5"],[data-step="6"])) .wizard-skip-check{font-size:17px}
}

@media (max-width:520px){
  .practice-page .vrm-blackout-overlay{padding:16px}
  .practice-page .blackout-content{box-sizing:border-box;width:100%;max-width:340px}
  .practice-page .blackout-icon{font-size:40px;margin-bottom:6px}
  .practice-page .blackout-title{font-size:22px;line-height:1.2;margin-bottom:8px}
  .practice-page .blackout-message{font-size:16px;line-height:1.35;margin-bottom:0}
}

/* PC foreground states left outside the first seven-modal sizing pass. */
@media (min-width:900px){
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"])){
    box-sizing:border-box;
    width:min(920px,calc(100vw - 64px));
    max-width:none;
    max-height:calc(100svh - 48px);
    padding:46px 59px 43px;
  }
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"])) .wizard-progress{
    gap:8px;
    margin-bottom:24px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"]) .wizard-step-title{
    font-size:33px;
    margin-bottom:12px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"]) .wizard-step-desc{
    font-size:20px;
    margin-bottom:20px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"]) .wizard-demo{
    box-sizing:border-box;
    width:min(100%,620px);
    height:auto;
    aspect-ratio:16/9;
    max-height:none;
    margin:0 auto 24px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"]) .wizard-nav{
    gap:15px;
    margin-top:9px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"]) .wizard-btn{
    min-height:76px;
    padding:18px 32px;
    font-size:21px;
  }
  .site-top #setupWizard .wizard-step.active:is([data-step="2"],[data-step="3"]) .wizard-btn-secondary{min-width:116px}
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"])) .wizard-skip-row{
    margin-top:21px;
    padding-top:18px;
  }
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"])) .wizard-skip{font-size:18px}
  .site-top #setupWizard .wizard-box:has(.wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"])) .wizard-skip-check{font-size:17px}

  .practice-page #cameraModal > div{
    box-sizing:border-box;
    width:min(820px,calc(100vw - 64px))!important;
    max-width:none!important;
    max-height:calc(100svh - 48px);
    overflow-y:auto;
    padding:47px 54px!important;
  }
  .practice-page #cameraModal > div > div:first-child{font-size:70px!important;margin-bottom:18px!important}
  .practice-page #cameraModal h2{font-size:33px!important;margin-bottom:18px!important}
  .practice-page #cameraModal p{font-size:23px!important;margin-bottom:30px!important}
  .practice-page #cameraModal > div > div:last-child{gap:18px!important;margin-bottom:0!important}
  .practice-page #cameraModal > div > div:last-child button{
    min-width:205px;
    min-height:75px;
    padding:16px 30px!important;
    font-size:22px!important;
  }

  .practice-page #cameraErrorModal .cam-modal-box,
  .typing-page #cameraErrorModal .cam-modal-box{
    box-sizing:border-box;
    width:min(820px,calc(100vw - 64px));
    max-width:none;
    max-height:calc(100svh - 48px);
    overflow-y:auto;
    padding:48px 54px;
  }
  .practice-page #cameraErrorModal .cam-modal-icon,
  .typing-page #cameraErrorModal .cam-modal-icon{font-size:70px;margin-bottom:18px}
  .practice-page #cameraErrorModal .cam-modal-title,
  .typing-page #cameraErrorModal .cam-modal-title{font-size:32px;margin-bottom:18px}
  .practice-page #cameraErrorModal .cam-modal-body,
  .typing-page #cameraErrorModal .cam-modal-body{
    max-width:680px;
    margin:0 auto 28px;
    font-size:22px;
    line-height:1.7;
  }
  .practice-page #cameraErrorModal .cam-modal-btn,
  .typing-page #cameraErrorModal .cam-modal-btn{
    min-width:205px;
    min-height:74px;
    padding:16px 28px;
    font-size:22px;
    margin:6px;
  }

  .typing-page #pauseOverlay .pause-box{
    box-sizing:border-box;
    width:min(800px,calc(100vw - 64px));
    max-width:none;
    max-height:calc(100svh - 48px);
    overflow-y:auto;
    padding:48px 54px 44px;
  }
  .typing-page #pauseOverlay .pause-icon{font-size:68px;margin-bottom:16px}
  .typing-page #pauseOverlay .pause-title{font-size:32px;margin-bottom:20px}
  .typing-page #pauseOverlay .pause-desc{font-size:22px;margin-bottom:30px}
  .typing-page #pauseOverlay .pause-resume-btn,
  .typing-page #pauseOverlay .pause-abort-btn{
    max-width:560px;
    min-height:70px;
    margin-left:auto;
    margin-right:auto;
    font-size:22px;
  }
  .typing-page #pauseOverlay .pause-abort-btn{min-height:60px;font-size:19px}

  .typing-page #resultScreen{box-sizing:border-box;padding:24px}
  .typing-page #resultScreen .result-content{
    box-sizing:border-box;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    column-gap:20px;
    row-gap:18px;
    width:min(1000px,calc(100vw - 64px));
    max-width:none;
    max-height:calc(100svh - 48px);
    padding:34px 42px;
  }
  .typing-page #resultScreen .result-title{
    grid-column:1/-1;
    margin:0;
    font-size:34px;
  }
  .typing-page #resultScreen .result-stats{
    grid-column:1/-1;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin:0;
  }
  .typing-page #resultScreen .stat-item{padding:17px 12px}
  .typing-page #resultScreen .title-display,
  .typing-page #resultScreen .stage-result{
    box-sizing:border-box;
    min-width:0;
    min-height:168px;
    margin:0;
  }
  .typing-page #resultScreen .title-emoji{font-size:42px;margin-bottom:7px}
  .typing-page #resultScreen .title-text{font-size:26px}
  .typing-page #resultScreen .stage-result{gap:8px 12px;padding:20px}
  .typing-page #resultScreen .stage-result-icon{font-size:48px}
  .typing-page #resultScreen .stage-result-name{font-size:22px}
  .typing-page #resultScreen .high-score-notice,
  .typing-page #resultScreen .result-actions,
  .typing-page #resultScreen .share-btns{grid-column:1/-1;margin:0}
  .typing-page #resultScreen .result-btn{min-width:200px;min-height:64px;font-size:20px}
}

@media (min-width:900px) and (max-height:820px){
  .site-top #setupWizard .wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"]) .wizard-demo{width:min(100%,512px)}
}
@media (min-width:900px) and (max-height:740px){
  .site-top #setupWizard .wizard-step.active:is([data-step="1"],[data-step="2"],[data-step="3"]) .wizard-demo{width:min(100%,420px)}
}

/* Give the model the available width whenever the practice camera panel is hidden. */
@media (min-width:769px){
  .practice-page .practice-main:has(> .camera-area.hidden) > .sample-area,
  .practice-page .practice-main:has(> .camera-area.reading-hidden) > .sample-area{
    box-sizing:border-box;
    flex:1 1 100%;
    width:100%;
    max-width:none;
  }
}

/* ── Interaction polish (2026-09) ──
   旧デザインの「浮き上がるhover」をやめ、色の変化と押した瞬間のわずかな沈み込みで反応を返す。
   :where() で詳細度0にしてあるので、各ページで個別に指定した transition はそちらが優先される。 */
:where(button, .back-link, .back-btn, .support-link, .settings-preview-link){
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
:where(button, .back-link, .back-btn, .support-link):not(:disabled):active{
  transform: scale(.98);
}

/* 読み物ページ: 戻るリンク・本文リンクの hover（ページ内の旧 hover は theme に打ち消されて効いていなかった） */
.reading .back-link:hover{background:#eff8f7;border-color:#00879a;color:#00879a}
.reading a:not(.back-link):hover{color:#00879a;text-decoration-thickness:2px}
