:root{
  --ink:#173b36;
  --muted:#5f746f;
  --green:#146b55;
  --green-dark:#0f5746;
  --green-soft:#eaf5ef;
  --green-pale:#f4faf7;
  --line:#d9e5df;
  --paper:#f6f8f5;
  --white:#fff;
  --blue-soft:#eef6fa;
  --blue-line:#c8dce8;
  --orange-soft:#fff2e8;
  --orange:#9a4e2d;
  --shadow:0 10px 28px rgba(30,65,57,.06);
  --site-width:92%;
  --site-max:1280px;
  --reading-max:900px;
  font-family:"Noto Sans JP","Yu Gothic",Meiryo,sans-serif;
  color:var(--ink);
  font-size:17px;
  line-height:1.8;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:#fff;padding-bottom:0;color:var(--ink)}
button,input,select{font:inherit}
a{color:var(--green);text-decoration:none}
button,.button,select{min-height:48px;border:1px solid var(--line);border-radius:13px;padding:10px 16px;background:#fff;color:var(--ink)}
button,.button{cursor:pointer;font-weight:750}
button:hover,.button:hover{filter:brightness(.98)}
button:disabled{opacity:.48;cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #d88932;outline-offset:3px}

/* Site shell: Challenge JLPT / ことばクロス系のシンプルな共通骨格 */
.site-header{background:#fff;border-bottom:1px solid var(--line)}
.site-header-inner{width:var(--site-width);max-width:var(--site-max);margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:28px;padding:19px 0 17px}
.brand{display:flex;align-items:center;gap:11px;color:var(--ink);line-height:1.15;min-width:max-content}
.brand-logo{width:58px;height:58px;object-fit:contain;flex:0 0 auto}
.brand-copy{display:flex;flex-direction:column;gap:3px}
.brand-name{font-size:22px;font-weight:900;letter-spacing:.035em}
.brand small{font-size:9px;font-weight:750;letter-spacing:.15em;color:var(--muted)}
.desktop-nav{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-left:auto}
.desktop-nav a{position:relative;display:flex;align-items:center;min-height:42px;padding:7px 12px;color:var(--muted);font-size:13px;font-weight:750}
.desktop-nav a:hover,.desktop-nav a[aria-current="page"]{color:var(--green-dark)}
.desktop-nav a[aria-current="page"]::after{content:"";position:absolute;left:12px;right:12px;bottom:2px;height:2px;border-radius:2px;background:var(--green)}
.mobile-header-action{display:none;align-items:center;gap:7px}
.small{font-size:12px;min-height:40px;padding:7px 11px}
.header-icon-button{width:40px;min-width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;display:grid;place-items:center;font-size:17px;background:#fff;color:var(--green-dark)}
.header-icon-button:hover{background:var(--green-pale);border-color:#b9d8cb}
.ruby-toggle{margin-left:5px;border-radius:999px}
.ruby-toggle[aria-pressed="true"]{border-color:#b9d8cb;background:var(--green-soft);color:var(--green-dark)}

main{width:var(--site-width);max-width:var(--site-max);margin:0 auto;padding:24px 0 48px}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(27px,4vw,40px);line-height:1.48;letter-spacing:.015em;margin-bottom:15px}
h2{font-size:21px;line-height:1.55;margin-bottom:10px}
h3{font-size:18px;line-height:1.65;margin-bottom:7px}
p{margin-bottom:15px}
section{margin-bottom:28px}
.eyebrow,.card-kicker{font-size:12px;letter-spacing:.1em;font-weight:800;color:var(--green);margin-bottom:9px}
.card-kicker{letter-spacing:.04em}
.card{background:var(--white);border:1px solid var(--line);border-radius:20px;padding:24px;box-shadow:var(--shadow)}
.primary{background:var(--green);color:#fff;border-color:var(--green)}
.primary:hover{background:var(--green-dark)}
.button{display:flex;align-items:center;justify-content:center;gap:14px}
.wide{width:100%}
.back-link{display:inline-flex;align-items:center;min-height:40px;font-size:14px;font-weight:700;color:var(--muted);margin-bottom:14px}
.subtle,.sample-note,.support-note{color:var(--muted);font-size:13px}
.sample-note{margin-top:22px}

/* Home */
.home-hero{position:relative;isolation:isolate;display:flex;align-items:center;min-height:290px;overflow:hidden;border-radius:0;margin:0 0 24px;padding:36px 34px;background:#f6faf7 url('../img/hero-caregiver.webp') center right/cover no-repeat}
.home-hero::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.94) 40%,rgba(255,255,255,.60) 62%,rgba(255,255,255,.08) 100%)}
.home-hero-copy{position:relative;z-index:1;width:min(84%,1040px)}
.home-hero h1{font-size:clamp(34px,3.35vw,50px);line-height:1.45;max-width:720px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255,255,255,.65)}
.home-hero p{color:#425e58;font-size:clamp(14px,1.25vw,17px);font-weight:600;white-space:nowrap;margin:0;text-shadow:0 1px 4px rgba(255,255,255,.95)}
.learning-entrances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:0;align-items:stretch}
.start-card{display:flex;flex-direction:column;min-height:100%;border:1px solid #c6ddd3;border-radius:22px;padding:24px;background:linear-gradient(180deg,#eff8f3 0%,#fbfdfc 100%);color:var(--ink);box-shadow:var(--shadow)}
.start-card-primary{background:linear-gradient(180deg,#edf7f2 0%,#fbfdfc 100%);border-color:#c6ddd3}
.start-card-secondary{background:linear-gradient(180deg,#edf7f2 0%,#fbfdfc 100%);border-color:#c6ddd3;box-shadow:var(--shadow)}
.start-card-secondary:hover,.start-card-primary:hover{border-color:#bcd9cd}
.start-card-head{display:flex;gap:13px;align-items:center;margin-bottom:12px}
.start-card-head h2{font-size:24px;margin:0;line-height:1.35}
.start-icon{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;background:var(--green);color:#fff;font-size:18px;font-weight:850;flex:0 0 auto;overflow:hidden;padding:5px}
.secondary-icon{background:#edf2ef;color:var(--green-dark)}
.start-icon-illustration{background:linear-gradient(180deg,#f4fbf7 0%,#e9f5ef 100%);border:1px solid #cfe1d8;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}
.start-icon.secondary-icon.start-icon-illustration{background:linear-gradient(180deg,#ffffff 0%,#eef6f1 100%)}
.start-icon-img{width:100%;height:100%;display:block;object-fit:contain}
.start-card>p{color:var(--muted);margin-bottom:16px}
.start-card-description{min-height:0;line-height:1.8;margin-bottom:12px}
.study-main-card>p{max-width:680px}
.part-guide{margin:2px 0 18px;padding:15px;background:rgba(255,255,255,.78);border:1px solid #d7e8e0;border-radius:16px}
.study-main-card .part-guide{margin-top:auto;margin-bottom:0;padding:0;background:transparent;border:0;border-radius:0}
.part-guide-label{font-size:12px;font-weight:800;color:var(--muted);margin:0 0 9px}
.part-guide-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.part-guide-button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:50px;padding:7px 10px;background:#fff;border-color:#cfe1d8;color:var(--green-dark)}
.part-guide-button strong{font-size:18px;line-height:1}
.part-guide-button span{font-size:12px}
.part-guide-button:hover{border-color:#8ebdac;background:#f8fcfa}
.mode-switch{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;margin-top:auto;margin-bottom:8px;background:#edf3f0;border:1px solid #d8e2dc;border-radius:999px}
.mode-switch-button{min-height:34px;padding:4px 8px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-size:12px;font-weight:800;white-space:nowrap}
.mode-switch-button:hover{background:rgba(255,255,255,.65);filter:none}
.mode-switch-button.is-active{background:#fff;color:var(--green-dark);box-shadow:0 1px 0 rgba(255,255,255,.95),0 2px 7px rgba(21,57,49,.08)}
.start-button{justify-content:space-between;padding:11px 16px;min-height:50px;margin-top:auto}
.secondary-button{background:#fff;color:var(--green-dark);border-color:#a9ccbd}
.secondary-button:hover{background:var(--green-pale)}
.challenge-card .start-button{margin-top:0}
.text-link{margin-top:auto;font-size:14px;font-weight:800;color:var(--green);display:flex;justify-content:space-between;gap:10px;align-items:center}
.home-progress{margin-top:30px}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:24px 0 13px}
.compact-heading{margin-top:0}
.section-heading h2{margin:0}
.section-heading a{font-size:13px;font-weight:700;white-space:nowrap}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.stat{background:#fff;border:1px solid var(--line);border-radius:16px;text-align:center;padding:16px 8px;display:flex;flex-direction:column;gap:2px}
.stat strong{font-size:25px;font-weight:850;line-height:1.35}
.stat span,.stat small{font-size:12px;color:var(--muted)}
.review-link{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:13px;padding:15px 16px;background:#fff;border:1px solid var(--line);border-radius:16px;color:var(--ink)}
.review-link:hover{border-color:#c9dcd4}
.review-link strong{display:block;font-size:15px}
.review-link small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.review-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--orange-soft);color:var(--orange);font-size:20px}
.support-summary{text-align:center;color:var(--muted);font-size:13px;margin-top:24px}

/* Translation language settings */
.settings-modal{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-start;justify-content:center;padding:92px 18px 18px}
.settings-modal-backdrop{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;border:0;border-radius:0;background:rgba(18,47,42,.48);backdrop-filter:blur(2px)}
.settings-modal-dialog{position:relative;width:min(100%,440px);background:#fff;border:1px solid var(--line);border-radius:22px;padding:26px;box-shadow:0 24px 70px rgba(16,51,44,.23)}
.settings-modal-dialog h2{font-size:24px;margin:0 42px 8px 0}
.settings-modal-description{color:var(--muted);font-size:14px;margin-bottom:17px}
.settings-modal-close{position:absolute;right:14px;top:14px;width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;background:#f2f5f3;color:var(--muted);font-size:23px;line-height:1}
.settings-language-label{display:block;font-size:12px;font-weight:800;color:var(--muted);margin-bottom:5px}
#global-language{width:100%;margin-bottom:12px;background:#fff}

/* Part modal */
body.modal-open{overflow:hidden}
.part-modal{position:fixed;inset:0;z-index:60;display:flex;justify-content:center;align-items:flex-start;padding:84px 18px 18px}
.part-modal-backdrop{position:absolute;inset:0;background:rgba(18,47,42,.48);backdrop-filter:blur(2px)}
.part-modal-dialog{position:relative;width:min(100%,760px);max-height:calc(100dvh - 102px);overflow:auto;background:#fff;border-radius:24px;padding:28px;box-shadow:0 24px 70px rgba(16,51,44,.23)}
.part-modal-close{position:absolute;top:14px;right:14px;width:42px;height:42px;min-height:42px;padding:0;border-radius:50%;font-size:25px;line-height:1;background:#f2f5f3;color:var(--muted)}
.part-modal-dialog h2{font-size:25px;margin-right:44px;margin-bottom:8px}
.part-modal-description{color:var(--muted);margin-bottom:18px}
.part-modal-subjects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.modal-subject-card{display:flex;flex-direction:column;min-width:0}
.modal-subject-card:hover{transform:none}
.modal-subject-card .modal-subject-start{margin-top:auto;min-height:46px;padding:9px 13px;font-size:13px}
.modal-subject-start[aria-disabled="true"]{opacity:.55;pointer-events:none}
/* Subjects */
.page-title{padding:22px 0 8px}
.simple-title>p:last-child{color:var(--muted)}
.subject-section{margin-top:28px}
.subject-heading{align-items:end;border-bottom:1px solid var(--line);padding-bottom:10px}
.subject-heading .card-kicker{margin-bottom:2px}
.subject-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.subject-card{padding:19px;color:var(--ink);box-shadow:none;transition:border-color .15s ease,transform .15s ease}
.subject-card:hover{border-color:#b7d4c9;transform:translateY(-1px)}
.subject-card-top{display:flex;justify-content:space-between;gap:10px;align-items:start}
.subject-card h3{font-size:17px;margin:0;max-width:75%}
.subject-count{font-size:12px;color:var(--muted);white-space:nowrap}
.subject-meta{font-size:12px;color:var(--muted);margin:8px 0 9px}
.subject-card progress{width:100%;display:block;margin-bottom:10px}
.subject-action{font-size:13px;font-weight:800;color:var(--green)}
.subject-card[aria-disabled="true"]{opacity:.6;pointer-events:none}

/* Progress */
.progress-focus{box-shadow:none;background:var(--green-pale)}
.weak-link{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-top:1px solid var(--line);color:var(--ink)}
.weak-link:first-child{border-top:0}
.weak-link strong{color:var(--green);font-size:14px}
.empty-note{color:var(--muted);margin:0}
.progress-section{margin-top:28px}
.part-stats{margin-bottom:0}
.subject-progress-list{background:#fff;border:1px solid var(--line);border-radius:18px;padding:0 18px}
.progress-row{padding:16px 0;border-bottom:1px solid var(--line)}
.progress-row:last-child{border-bottom:0}
.progress-row-head,.progress-row-sub{display:flex;align-items:center;justify-content:space-between;gap:12px}
.progress-row-head h3{font-size:16px;margin:0}
.progress-row-head span,.progress-row-sub{font-size:12px;color:var(--muted)}
.progress-row progress{width:100%;display:block;margin:9px 0 7px}
.progress-row-sub a{font-weight:800}

/* Progress bar */
progress{appearance:none;height:7px;border:0;border-radius:20px;background:var(--line);accent-color:var(--green)}
progress::-webkit-progress-bar{background:var(--line);border-radius:20px}
progress::-webkit-progress-value{background:var(--green);border-radius:20px}
progress::-moz-progress-bar{background:var(--green);border-radius:20px}

/* Practice */
body[data-page="practice"] main{width:var(--site-width);max-width:var(--site-max)}
.practice-top{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin:15px 0 8px}
.practice-top .back-link{margin:0}
#question-count{font-weight:800;color:var(--muted)}
#quiz-progress{width:100%;height:8px;display:block}
.set-note{margin:9px 0 12px}
.practice-layout{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);gap:18px;align-items:start;margin-top:14px}
.practice-layout>section,.practice-learning-column>section{margin-bottom:0}
.question-panel{margin:0;padding:23px 22px;box-shadow:none;min-width:0}
.question-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}
.question-panel .eyebrow{margin-bottom:10px}
.question-panel h1{font-size:21px;line-height:1.85;margin-bottom:15px;letter-spacing:0}
.question-support{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:6px 0 10px}
.question-support .support-button{background:var(--green-pale);border-color:#d4e6de;color:var(--green-dark)}
.support-button{display:inline-flex;align-items:center;justify-content:center;width:96px;min-width:96px;height:38px;min-height:38px;padding:6px 8px;font-size:13px;line-height:1;background:#fff;white-space:nowrap}
.support-button.is-translating:disabled,.support-button.is-audio-loading:disabled{opacity:1}
.translation-wave,.audio-wave{display:inline-flex;align-items:center;justify-content:center;gap:2px;height:18px}
.translation-wave i,.audio-wave i{display:block;width:3px;height:7px;border-radius:999px;background:currentColor;transform-origin:center;animation:support-wave .82s ease-in-out infinite}
.translation-wave i:nth-child(2),.audio-wave i:nth-child(2){animation-delay:.10s}
.translation-wave i:nth-child(3),.audio-wave i:nth-child(3){animation-delay:.20s}
.translation-wave i:nth-child(4),.audio-wave i:nth-child(4){animation-delay:.30s}
.translation-wave i:nth-child(5),.audio-wave i:nth-child(5){animation-delay:.40s}
@keyframes support-wave{0%,100%{transform:scaleY(.45);opacity:.55}50%{transform:scaleY(1.8);opacity:1}}
@media (prefers-reduced-motion:reduce){.translation-wave i,.audio-wave i{animation:none;height:10px;opacity:.8}}
.answer-instruction{font-size:14px;font-weight:800;margin:12px 0 8px}
.choice-wrap{margin:8px 0;position:relative}
.choice{display:flex;align-items:flex-start;gap:11px;border:1px solid var(--line);padding:12px;border-radius:14px;cursor:pointer;line-height:1.75;background:#fff;min-height:58px;transition:border-color .12s ease,background .12s ease,transform .12s ease}
.choice:hover{border-color:#bcd5ca;background:#fbfdfc}
.choice.selected{border:2px solid var(--green);padding:11px;background:#f2f9f5}
.choice.is-correct{border:2px solid #2b8060;background:#e9f7ef;padding:11px}
.choice.is-wrong{border:2px solid #c97955;background:#fff2ec;padding:11px;cursor:default}
.choice input{position:absolute;opacity:0;pointer-events:none}
.choice-number{width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;font-size:13px;font-weight:850;color:var(--muted);line-height:1;flex:0 0 auto;margin-top:1px;background:#fff}
.choice.selected .choice-number,.choice.is-correct .choice-number{background:var(--green);border-color:var(--green);color:#fff}
.choice.is-wrong .choice-number{background:#a95b38;border-color:#a95b38;color:#fff}
.choice-text{flex:1;min-width:0;overflow-wrap:anywhere}
.choice-wrap>.translation{margin:6px 4px 0}
.translation{color:#344f62;border-left:3px solid var(--blue-line);padding:9px 11px;background:var(--blue-soft);font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:0 9px 9px 0}
.audio-player-wrap{margin:10px 0}
.audio-player-wrap audio{max-width:100%}
audio{width:100%}
.practice-learning-column{min-width:0}
.learning-placeholder{min-height:190px;display:flex;flex-direction:column;justify-content:center;box-shadow:none;background:linear-gradient(180deg,#f8fbf9,#fff);border-style:dashed}
.learning-placeholder h2{font-size:21px;margin-bottom:8px}
.learning-placeholder p:last-child{color:var(--muted);margin:0}
#result{display:grid;gap:11px}
#result>.card{margin:0}
.correct-answer-card{padding:18px 20px;background:var(--green-pale);border-color:#c8dfd5;box-shadow:none}
.correct-answer-card .card-kicker{margin-bottom:3px}
.correct-answer-card h2{font-size:18px;margin:0;line-height:1.75}
.explanation{box-shadow:none;margin-bottom:0;padding:19px 20px}
.explanation h2{font-size:18px}
.explanation p{line-height:1.9;white-space:pre-wrap}
.main-explanation{border-left:4px solid var(--green)}
.optional-explanation,.other-choices{padding:0;overflow:hidden}
details summary{cursor:pointer;list-style:none;font-weight:800;padding:15px 18px;display:flex;align-items:center;justify-content:space-between;gap:10px}
details summary::-webkit-details-marker{display:none}
details summary::after{content:"＋";font-size:20px;color:var(--green);font-weight:500}
details[open] summary::after{content:"−"}
.details-body{padding:0 18px 18px;border-top:1px solid var(--line)}
.details-body>p:first-child{margin-top:15px}
.tools{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:10px 0 0}
.compact-tools .support-button{width:96px;min-width:96px;height:38px;min-height:38px}
.reason,.word{border-top:1px solid var(--line);padding-top:14px;margin-top:14px}
.reason:first-child{border-top:0}
.keywords-card{background:#fbfcfb}
.word-list{display:grid;grid-template-columns:1fr;gap:0}
.word h3{margin-bottom:5px}
.word>p:not(.translation){color:var(--muted)}
.next-button{min-height:54px;margin:12px 0 0;font-size:16px}
.answer-mark{position:fixed;inset:0;z-index:120;display:grid;place-items:center;pointer-events:none;background:rgba(255,255,255,.02)}
.answer-mark span{width:150px;height:150px;display:grid;place-items:center;border-radius:50%;font-size:128px;line-height:1;font-weight:700;font-family:Arial,sans-serif;opacity:0;transform:scale(.55)}
.answer-mark.is-correct span{color:#159264;text-shadow:0 5px 28px rgba(21,146,100,.20)}
.answer-mark.is-wrong span{color:#d35e52;text-shadow:0 5px 28px rgba(211,94,82,.18)}
.answer-mark.play span{animation:answer-mark-pop .72s cubic-bezier(.2,.8,.2,1) both}
@keyframes answer-mark-pop{0%{opacity:0;transform:scale(.45)}24%{opacity:1;transform:scale(1.12)}54%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.92)}}
.finished-card{text-align:center;margin:20px auto 0;padding:30px 24px;max-width:760px}
.result-score{font-size:30px;color:var(--green);font-weight:850;margin-bottom:8px}
.result-message{color:var(--muted)}
.finish-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.secondary-button{background:#fff}

/* Global */
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
/* Footer */
.site-footer{border-top:1px solid var(--line);background:#f8faf8;margin-top:18px}
.site-footer-inner{width:var(--site-width);max-width:var(--site-max);margin:0 auto;padding:34px 0 28px}
.footer-top{display:flex;align-items:flex-start;justify-content:space-between;gap:32px;padding-bottom:24px}
.footer-brand{display:flex;flex-direction:column;gap:5px;color:var(--ink)}
.footer-brand strong{font-size:18px;letter-spacing:.035em}
.footer-brand span{font-size:9px;font-weight:750;letter-spacing:.14em;color:var(--muted)}
.footer-nav{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px 20px}
.footer-nav a{color:var(--muted);font-size:12px;font-weight:700}
.footer-nav a:hover{color:var(--green)}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:24px;padding-top:18px;border-top:1px solid var(--line);color:var(--muted);font-size:10px}
.footer-bottom p{margin:0}
.bottom-nav{display:none;position:fixed;bottom:0;left:0;right:0;justify-content:center;gap:clamp(18px,9vw,115px);background:rgba(255,255,255,.97);border-top:1px solid var(--line);padding:8px 12px max(8px,env(safe-area-inset-bottom));z-index:10;backdrop-filter:blur(8px)}
.bottom-nav a{display:flex;flex-direction:column;text-align:center;min-width:78px;font-size:11px;color:var(--muted);line-height:1.45;padding:2px 5px}
.bottom-nav a span{font-size:21px;line-height:1.25}
.bottom-nav a[aria-current]{color:var(--green);font-weight:850}
rt{font-size:.56em}
ruby{ruby-align:center}
.ruby-off rt,.ruby-off rp{display:none}
#toast{position:fixed;bottom:92px;left:50%;transform:translateX(-50%);max-width:min(92%,600px);width:max-content;background:#183c36;color:#fff;padding:11px 18px;border-radius:11px;z-index:30;opacity:0;pointer-events:none;font-size:13px;box-shadow:0 8px 20px rgba(0,0,0,.14)}
#toast.show{opacity:1}
.notice{background:var(--orange-soft);padding:14px;border-radius:12px}
.skip{position:absolute;left:-9999px}
.skip:focus{left:10px;top:10px;background:white;z-index:99;padding:8px 12px;border-radius:8px}
[hidden]{display:none!important}


@media(max-width:900px){
 .practice-layout{grid-template-columns:1fr}
 .practice-learning-column{min-width:0}
}

@media(max-width:700px){
 body{padding-bottom:82px}
 .site-header-inner{width:calc(100% - 32px);padding:15px 0 13px;gap:12px}
 .brand{gap:8px}
 .brand-logo{width:42px;height:42px}
 .brand-name{font-size:15px;letter-spacing:0;white-space:nowrap}
 .brand small{display:none}
 .desktop-nav{display:none}
 .mobile-header-action{display:flex;margin-left:auto}
 .ruby-toggle-mobile{margin:0;font-size:11px;padding:6px 10px}
 main{width:calc(100% - 32px);padding:18px 0 32px}
 body[data-page="practice"] main{width:calc(100% - 32px)}
 .home-hero{min-height:270px;margin:0 -16px 18px;padding:30px 20px;background-position:66% center}
 .home-hero::after{background:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.93) 58%,rgba(255,255,255,.64) 100%)}
 .home-hero-copy{width:100%}
 .home-hero h1{font-size:30px;line-height:1.5;max-width:330px;margin-bottom:14px}
 .home-hero p{max-width:330px;font-size:13px;line-height:1.85;white-space:normal}
 .learning-entrances{grid-template-columns:1fr;gap:12px}
 .start-card{padding:20px}
 .start-card-description{min-height:0;margin-bottom:12px}
 .start-card-head h2{font-size:22px}
 .start-card-secondary{min-height:190px}
 .section-heading{align-items:end}
 .stats{gap:7px}
 .stat{padding:13px 4px}
 .stat strong{font-size:21px}
 .stat span,.stat small{font-size:10px}
 .subject-grid{grid-template-columns:1fr}
 .subject-card h3{max-width:72%}
 .part-modal{padding:12px 10px 10px}
 .part-modal-dialog{max-height:calc(100dvh - 22px);padding:22px 16px 18px;border-radius:20px}
 .part-modal-subjects{grid-template-columns:1fr}
 .modal-subject-card{padding:16px}
 .practice-layout{grid-template-columns:1fr;gap:12px}
 .question-panel{padding:19px 15px;border-radius:18px}
 .question-panel h1{font-size:20px;line-height:1.9}
 .question-support{display:flex;flex-wrap:wrap}
 .question-support .support-button{width:96px;min-width:96px}
 .choice{padding:13px 10px;gap:9px}
 .choice.selected,.choice.is-correct,.choice.is-wrong{padding:12px 9px}
 .choice-number{width:29px;height:29px}
 .learning-placeholder{min-height:140px}
 .card{padding:20px}
 .explanation{padding:18px}
 .optional-explanation,.other-choices{padding:0}
 .details-body{padding:0 17px 17px}
 details summary{padding:16px 17px}
 .finish-actions{grid-template-columns:1fr}
 .settings-modal{padding:70px 12px 12px}
 .settings-modal-dialog{padding:22px 18px;border-radius:20px}
 .site-footer{margin-top:8px}
 .site-footer-inner{width:calc(100% - 32px);padding:28px 0 22px}
 .footer-top{display:block;padding-bottom:20px}
 .footer-nav{justify-content:flex-start;margin-top:18px;gap:8px 18px}
 .footer-bottom{display:block;padding-top:16px}
 .footer-bottom p+p{margin-top:7px}
 .bottom-nav{display:flex}
}

@media(max-width:360px){
 :root{font-size:16px}
 .site-header-inner,main,.site-footer-inner{width:calc(100% - 24px)}
 .brand-name{font-size:14px;letter-spacing:0}
 .brand small{display:none}
 .ruby-toggle-mobile{font-size:10px;padding:5px 8px}
 body[data-page="practice"] main{width:calc(100% - 24px)}
 .home-hero h1{font-size:27px}
 .start-card{padding:18px}
 .stats{grid-template-columns:1fr 1fr 1fr}
 .stat strong{font-size:19px}
 .bottom-nav{gap:6vw}
 .bottom-nav a{min-width:72px}
}

@media(min-width:1100px){
 .subject-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(prefers-reduced-motion:reduce){
 *{scroll-behavior:auto!important;transition:none!important}
 .answer-mark.play span{animation:none;opacity:1;transform:none}
}

/* v1.2.14: 「他の選択肢が違う理由」は読みやすさを優先して常に左寄せ */
.other-choices .details-body,
.other-choices .reason,
.other-choices .reason h3,
.other-choices .reason p{
  text-align:left;
  text-align-last:left;
}

/* v1.2.15: 「他の選択肢が違う理由」の見出し文字を通常の連続表示にする。
   ruby要素がflex itemとして均等配置されるのを防ぎ、＋/−だけを右端へ送る。 */
.other-choices > summary{
  justify-content:flex-start;
  gap:0;
  text-align:left;
  text-align-last:left;
}
.other-choices > summary::after{
  margin-left:auto;
  padding-left:12px;
  flex:0 0 auto;
}

/* v1.2.17: 科目全問学習 + 問題選択復習 */
.part-modal-study-note{margin:-6px 0 18px;padding:10px 12px;border-radius:11px;background:var(--green-pale);color:var(--muted);font-size:12px;line-height:1.7}
.subject-card-actions{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:8px;margin-top:2px}
.subject-card-actions .button{min-height:44px;padding:8px 10px;font-size:12px;text-align:center;line-height:1.45}
.subject-card-actions.compact{grid-template-columns:1fr}
.subject-card-actions a[aria-disabled="true"]{opacity:.55;pointer-events:none}
.subject-review-link{color:var(--green-dark);border-color:#c7ddd4}
.review-page-title{max-width:900px;margin-left:auto;margin-right:auto}
.review-selector{max-width:900px;margin:0 auto}
.review-filter-bar{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}
.review-filter-bar button{min-height:40px;padding:7px 13px;font-size:12px;border-radius:999px}
.review-filter-bar button[aria-pressed="true"]{background:var(--green);border-color:var(--green);color:#fff}
.review-select-tools{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.review-select-tools button{min-height:40px;padding:7px 12px;font-size:12px}
.review-question-list{display:grid;gap:8px;margin-top:14px}
.review-question-row{display:flex;align-items:flex-start;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:13px;cursor:pointer;background:#fff}
.review-question-row:hover{border-color:#b7d4c9;background:#fbfdfc}
.review-question-row input{width:19px;height:19px;margin:4px 0 0;accent-color:var(--green);flex:0 0 auto}
.review-question-copy{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;min-width:0;width:100%}
.review-question-text{font-size:14px;line-height:1.75;font-weight:650;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.review-status{flex:0 0 auto;white-space:nowrap;border-radius:999px;padding:2px 8px;font-size:10px;font-weight:800;background:#f1f4f2;color:var(--muted)}
.review-status.is-wrong{background:var(--orange-soft);color:var(--orange)}
.review-status.is-correct{background:var(--green-soft);color:var(--green-dark)}
.review-start-bar{position:sticky;bottom:10px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:18px;padding:12px 14px;border:1px solid #c7ddd4;border-radius:15px;background:rgba(255,255,255,.96);box-shadow:0 8px 24px rgba(30,65,57,.10);backdrop-filter:blur(8px)}
.review-start-bar strong{font-size:13px;white-space:nowrap}
.review-start-bar button{min-width:220px}

@media(max-width:700px){
 .subject-card-actions{grid-template-columns:1fr}
 .review-selector{padding:16px}
 .review-question-row{padding:11px 10px}
 .review-question-copy{display:block}
 .review-status{display:inline-block;margin-top:5px}
 .review-start-bar{bottom:82px;display:grid;grid-template-columns:1fr}
 .review-start-bar button{min-width:0;width:100%}
}
