/* 学び方の各モード（ちょっとだけ／見る講義／聞く講義／○×スピード判定）と、資格ページの入口。
   色は style.css のトークンだけを使う（ダークテーマでも読めるように）。
   押すものは高さ44px以上。主な操作は画面の下半分（親指の届く範囲）に置く。 */

/* ---------- 共通 ---------- */
.btn.big{padding:15px 20px;font-size:16px;border-radius:10px;min-height:52px;}
.btn.big.ghost{border-width:1.5px;}
.lb{font-family:var(--f-mono);font-size:10.5px;letter-spacing:.1em;color:var(--ink-3);}
.chipbtn{font-size:13px;padding:8px 14px;min-height:44px;border-radius:999px;border:1px solid var(--rule);
  background:var(--surface);color:var(--ink-2);}
.chipbtn:hover{border-color:var(--accent);color:var(--accent);}
.chipbtn[aria-pressed="false"]{color:var(--ink-3);}

/* 今週の7つの点 */
.wkdots{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-top:8px;}
.wkd{display:flex;flex-direction:column;align-items:center;gap:3px;}
.wkd i{width:22px;height:22px;border-radius:50%;border:1.5px dashed var(--rule);background:transparent;display:block;}
.wkd b{font-size:11px;font-weight:500;color:var(--ink-2);}
.wkd.on i{background:var(--ok);border-color:var(--ok);
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size:70%;background-position:center;background-repeat:no-repeat;}
.wkd.today i{box-shadow:0 0 0 2px var(--surface),0 0 0 3.5px var(--accent);}
.wkd.today b{color:var(--accent);font-weight:700;}


/* ---------- 資格ページの入口（bank.php） ---------- */
.hub{margin-top:14px;display:flex;flex-direction:column;gap:12px;}
.hubstat{background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:14px 15px;
  display:grid;grid-template-columns:auto 1fr;gap:10px 18px;align-items:start;box-shadow:var(--shadow);}
.hubexam{display:flex;flex-direction:column;gap:2px;padding-right:16px;border-right:1px solid var(--rule-2);min-width:88px;}
.hubexam .n{font-family:var(--f-disp);font-weight:600;font-size:15px;line-height:1.3;white-space:nowrap;}
.hubexam .n b{font-family:var(--f-mono);font-size:28px;font-weight:500;color:var(--accent);margin:0 2px;}
.hubweek{min-width:0;}
.hubweektop{display:flex;align-items:baseline;gap:8px;}
.hubweektop .n{font-size:13px;color:var(--ink-2);}
.hubweektop .n b{font-family:var(--f-mono);font-size:20px;font-weight:500;color:var(--ink);}
.hubweektop .n small{font-size:12px;color:var(--ink-3);}
.wkgoal{width:auto;font-size:14px;padding:6px 10px;border-radius:8px;background:var(--surface-2);min-height:44px;}
.hubweek.off .goalpart{display:none;}
.hubweekmsg{margin:8px 0 0;font-size:12.5px;color:var(--ink-2);}
.hubweek.met .hubweekmsg{color:var(--ok);font-weight:700;}
.hubexam .wk{font-size:11.5px;color:var(--ink-2);}
.hubstat.solo{grid-template-columns:1fr;}
.hubstat.solo .hubexam{border-right:0;padding-right:0;flex-direction:row;align-items:baseline;gap:10px;flex-wrap:wrap;}
.btn.block.hubreco{display:flex;flex-direction:column;align-items:center;gap:0;line-height:1.5;}
.hubreco .lb{color:var(--on-accent);opacity:.85;font-weight:400;}
.btn.ghost.strong{border-width:1.5px;border-color:var(--accent);color:var(--accent);font-weight:700;}
.hubweek.met .hubweektop .n b{color:var(--ok);}
.hubpace{grid-column:1 / -1;margin:0;font-size:12.5px;line-height:1.7;color:var(--ink-2);
  border-top:1px solid var(--rule-2);padding-top:10px;}
.hubpace b{color:var(--ink);white-space:nowrap;}
.hubc.reco{border-color:var(--accent);background:var(--accent-soft);}
.hubstat > .hubweek:only-child{grid-column:1 / -1;}
.hubh{font-size:16px;margin:10px 0 0;}
#shikkari{margin:30px 0 12px;}
.hubgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.hubc{position:relative;display:flex;flex-direction:column;gap:2px;background:var(--surface);
  border:1.5px solid var(--rule);border-radius:12px;padding:14px 14px 13px;min-height:128px;
  text-decoration:none;color:var(--ink);transition:border-color .12s,transform .12s;box-shadow:var(--shadow);}
.hubc:hover,.hubc:focus-visible{border-color:var(--accent);transform:translateY(-1px);}
.hubc:active{transform:translateY(0);}
.hubc .ic{width:26px;height:26px;fill:none;stroke:var(--accent);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;margin-bottom:6px;}
.hubc .sit{font-size:13px;color:var(--ink-2);}
.hubc .mode{font-family:var(--f-disp);font-weight:600;font-size:16px;line-height:1.4;}
.hubc .desc{font-size:12.5px;color:var(--ink-2);margin-top:auto;padding-top:4px;}
.hubc .prog{position:absolute;top:12px;right:12px;font-family:var(--f-mono);font-size:11px;color:var(--ink-3);
  background:var(--surface-2);border-radius:999px;padding:1px 8px;}

/* ---------- ちょっとだけ（quick.php） ---------- */
.qkdots{display:flex;gap:6px;}
.qkdots i{width:10px;height:10px;border-radius:50%;background:var(--rule);display:block;}
.qkdots i.now{background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);}
.qkdots i.ok{background:var(--ok);}
.qkdots i.ng{background:var(--ng);}
.qk{padding-top:18px;padding-bottom:110px;}
.qkretry{margin:0;font-size:13.5px;color:var(--accent);font-weight:700;background:var(--accent-soft);border-radius:8px;padding:8px 12px;}
.qkretry small{font-weight:400;color:var(--ink-2);}
.qkerr{margin:0;font-size:13.5px;color:var(--ng);background:var(--ng-soft);border-radius:8px;padding:8px 12px;}
.qkrec{margin:0;font-size:13px;color:var(--ok);font-weight:700;}
.qkrec:empty{display:none;}
.opt{position:relative;}
.opt.pending{opacity:.6;}
.opt.correct::after,.opt.wrong::after{position:absolute;top:-9px;right:10px;font-size:11px;font-weight:700;padding:0 7px;border-radius:4px;
  color:var(--surface);line-height:1.6;}
.opt.correct::after{content:"正解";background:var(--ok);}
.opt.wrong::after{content:"あなたの答え";background:var(--ng);}
.qkweek .lb{color:var(--ink-2);font-size:12px;letter-spacing:.04em;}
.qkcard{display:flex;flex-direction:column;gap:16px;}
.qkcount{font-family:var(--f-mono);font-size:12px;color:var(--ink-2);margin-left:auto;}
.opts.oxrow{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.opt.ox{grid-template-columns:1fr;justify-items:center;text-align:center;padding:16px 10px;gap:2px;min-height:88px;}
.opt.ox .oxmark{font-size:30px;line-height:1.1;font-weight:700;color:var(--ink-2);}
.opt.ox span:last-child{font-size:13.5px;color:var(--ink-2);}
.opt.ox.correct .oxmark{color:var(--ok);} .opt.ox.wrong .oxmark{color:var(--ng);}
.qkres{display:flex;flex-direction:column;gap:12px;}
.qkpoint{background:var(--accent-soft);border-radius:10px;padding:13px 15px;display:flex;flex-direction:column;gap:4px;}
.qkpoint .lb{color:var(--accent);}
.qkpoint p{margin:0;font-family:var(--f-disp);font-weight:600;font-size:16px;line-height:1.7;}
.qkmore summary{cursor:pointer;font-size:13.5px;color:var(--ink-2);padding:10px 2px;min-height:44px;
  display:flex;align-items:center;gap:6px;list-style:none;}
.qkmore summary::-webkit-details-marker{display:none;}
.qkmore summary::before{content:"＋";font-family:var(--f-mono);color:var(--accent);}
.qkmore[open] summary::before{content:"－";}
.thumbbar{position:fixed;left:0;right:0;bottom:0;z-index:30;padding:10px 16px calc(10px + env(safe-area-inset-bottom));
  background:linear-gradient(to top,var(--ground) 70%,transparent);}
.thumbbar .btn{max-width:748px;margin:0 auto;box-shadow:var(--shadow);}
.qkend{display:flex;flex-direction:column;gap:12px;align-items:stretch;text-align:center;padding-top:18px;}
.qkdone{font-family:var(--f-disp);font-weight:600;font-size:26px;margin:0;}
.qkscore{margin:0;font-size:13.5px;color:var(--ink-2);}
.qknote{margin:0;font-size:13.5px;color:var(--ink-2);line-height:1.8;}
.qkweek{background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:12px 14px;text-align:left;margin-top:4px;}
.qkbtns{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px;}
.qkbtns .btn.ghost{border-width:2px;color:var(--ink);font-weight:700;}

/* ---------- ○×スピード判定（game.php） ---------- */
.gm{padding-top:16px;}
.gmlead{margin:0 0 14px;font-size:14.5px;line-height:1.85;color:var(--ink-2);}
.gmlead b{font-size:17px;color:var(--ink);}
.gmrange{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:13px;color:var(--ink-2);}
.gmrange span{white-space:nowrap;}
.gmrange select{flex:1;font-size:15px;padding:10px;min-height:44px;}
.gmmodes{display:flex;flex-direction:column;gap:10px;}
.gmmode{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;width:100%;
  background:var(--surface);border:1.5px solid var(--rule);border-radius:12px;padding:16px;box-shadow:var(--shadow);}
.gmmode:hover:not(:disabled){border-color:var(--accent);}
.gmmode:disabled{opacity:.6;cursor:progress;}
.gmmt{font-family:var(--f-disp);font-weight:600;font-size:18px;}
.gmmd{font-size:13px;color:var(--ink-2);line-height:1.7;}
.gmbest{font-family:var(--f-mono);font-size:12px;color:var(--accent);margin-top:4px;}
.gmhelp{font-size:12px;color:var(--ink-2);margin:12px 0 0;line-height:1.8;}

/* プレイ中はサイトのヘッダーを隠し、画面を広く使う（誤って「もどる」を押さないように） */
body.gamepage.playing .siteheader,body.gamepage.playing .qhead{display:none;}
body.gamepage.playing .sitefooter{display:none;}
.gmplay{display:flex;flex-direction:column;gap:10px;min-height:calc(100svh - 32px);padding-bottom:calc(8px + env(safe-area-inset-bottom));}
.gmhud{display:flex;align-items:center;gap:10px;min-height:44px;}
.gmquit{width:44px;height:44px;flex-shrink:0;border-radius:50%;border:1px solid var(--rule);background:var(--surface);
  color:var(--ink-2);font-size:16px;display:flex;align-items:center;justify-content:center;}
.gmsec{font-family:var(--f-mono);font-size:20px;font-weight:500;min-width:3.2em;font-variant-numeric:tabular-nums;}
.gmtime{position:relative;flex:1;height:10px;border-radius:5px;background:var(--rule);}
.gmtime i{position:absolute;left:0;top:0;bottom:0;border-radius:5px;background:var(--accent);width:100%;}
.gmtime.low i{background:var(--warn);}
.gmtime .pen{position:absolute;right:0;top:-30px;font-family:var(--f-mono);font-size:12.5px;white-space:nowrap;
  color:var(--ng);background:var(--ng-soft);padding:1px 7px;border-radius:6px;font-weight:700;animation:gmpen 1.3s ease-out forwards;}
@keyframes gmpen{0%{opacity:0;transform:translateY(6px);}15%{opacity:1;transform:none;}80%{opacity:1;}100%{opacity:0;}}
.gmlives{flex:1;display:flex;gap:6px;align-items:center;}
.gmlives i{width:16px;height:16px;border-radius:50%;background:var(--accent);display:block;}
.gmlives i.lost{background:transparent;border:1.5px dashed var(--ink-3);}
.gmlivestxt{font-size:12.5px;color:var(--ink-2);margin-left:4px;}
.gmscore{font-family:var(--f-mono);font-size:24px;font-weight:500;min-width:64px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;}
.gmscore small{font-size:11px;color:var(--ink-2);margin-left:2px;}
.gmsub{display:flex;justify-content:space-between;gap:10px;min-height:20px;font-size:12px;}
.gmrangetag{color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.gmcombo{font-family:var(--f-mono);color:var(--ok);font-weight:600;white-space:nowrap;}
.gmcard{position:relative;flex:1;display:flex;flex-direction:column;justify-content:center;gap:12px;
  background:var(--surface);border:1.5px solid var(--rule);border-radius:14px;padding:22px 18px;min-height:220px;box-shadow:var(--shadow);}
.gmcard.enter{animation:gmin .18s ease-out;}
@keyframes gmin{from{opacity:.2;transform:translateY(6px);}to{opacity:1;transform:none;}}
.gmhead{margin:0;font-size:13px;color:var(--ink-2);line-height:1.6;}
.gmhead:empty{display:none;}
.gmstmt{margin:0;font-family:var(--f-disp);font-weight:600;font-size:clamp(17px,4.6vw,21px);line-height:1.75;}
/* 判定の結果はカードの色ではなく、上の札で示す（誤った記述が「正しいもの」に見えないように） */
.gmverdict{margin:0;min-height:26px;font-size:13.5px;font-weight:700;}
.gmverdict:empty{visibility:hidden;}
.gmverdict.y{color:var(--ok);} .gmverdict.n{color:var(--ng);}
.gmplay.gmexp .gmcard{flex:none;min-height:0;}
.gmplay.gmexp .gmverdict{display:none;}
.gmcfix{background:var(--ok-soft);border-radius:8px;padding:8px 11px;}
.gmcfix .lb{color:var(--ok);}
.gmcfix p{margin:2px 0 0;font-size:14.5px;line-height:1.7;font-weight:500;}
.gmbtns{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.gmb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-height:100px;border-radius:16px;
  background:var(--surface);border:2px solid var(--rule);box-shadow:var(--shadow);touch-action:manipulation;
  -webkit-user-select:none;user-select:none;transition:transform .06s;}
.gmb span{font-size:42px;line-height:1;font-weight:700;}
.gmb small{font-size:13px;color:var(--ink-2);margin-top:4px;}
.gmb.o span{color:var(--ok);} .gmb.x span{color:var(--ng);}
.gmb:active{transform:scale(.97);}
.gmb.o:hover{border-color:var(--ok);} .gmb.x:hover{border-color:var(--ng);}
.gmex{background:var(--surface);border:1px solid var(--rule);border-radius:12px;padding:14px 15px;display:flex;flex-direction:column;gap:9px;}
.gmexv{margin:0;font-family:var(--f-disp);font-weight:600;font-size:16px;}
.gmexv.y{color:var(--ok);} .gmexv.n{color:var(--ng);}
.gmext{margin:0;font-size:14px;line-height:1.8;color:var(--ink-2);}
.gmexf{background:var(--ok-soft);border-radius:8px;padding:9px 11px;}
.gmexf .lb{color:var(--ok);}
.gmexf p{margin:2px 0 0;font-size:14px;line-height:1.8;}
.gmexw{margin:0;font-size:13px;line-height:1.8;color:var(--ink-2);}
.gmnextbar{margin-top:auto;}
.gmcount{position:fixed;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;
  font-family:var(--f-mono);font-size:96px;color:var(--accent);background:var(--ground);background:color-mix(in srgb,var(--ground) 88%,transparent);}
.gmcount.pop{animation:gmpop .5s ease-out;}
@keyframes gmpop{from{transform:scale(1.35);opacity:.3;}to{transform:scale(1);opacity:1;}}
.gmend{display:flex;flex-direction:column;gap:10px;text-align:center;padding-top:10px;}
.gmendlead{margin:0;font-size:14.5px;color:var(--ink-2);}
.gmendscore{margin:0;font-family:var(--f-mono);font-size:56px;font-weight:500;line-height:1.1;}
.gmendscore small{font-size:16px;color:var(--ink-2);margin-left:4px;}
.gmendbest{margin:0;font-size:14px;color:var(--ink-2);}
.gmendbest.new{color:var(--ok);font-weight:700;font-size:15.5px;}
.gmendstats{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--rule);border:1px solid var(--rule);
  border-radius:8px;overflow:hidden;margin:6px 0;}
.gmendstats div{background:var(--surface);padding:10px 6px;display:flex;flex-direction:column;}
.gmendstats .n{font-family:var(--f-mono);font-size:18px;}
.gmendstats .l{font-size:11.5px;color:var(--ink-2);}
.gmreview{text-align:left;margin:6px 0 8px;display:flex;flex-direction:column;gap:10px;}
.gmreview h3{margin:6px 0 0;}
.gmreview ol{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:9px;}
.gmreview li{background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:12px 14px;}
.rvh{display:block;font-size:12px;color:var(--ink-2);margin-bottom:4px;}
.rvs{margin:0;font-size:14.5px;line-height:1.75;font-weight:500;}
.rvtags{margin:6px 0 0;display:flex;gap:8px;font-size:12px;}
.rvtags span{border-radius:4px;padding:1px 8px;font-weight:700;}
.rva.o{background:var(--ok-soft);color:var(--ok);} .rva.x{background:var(--ng-soft);color:var(--ng);}
.rvy{background:var(--surface-2);color:var(--ink-2);font-weight:500 !important;}
.rve{margin:6px 0 0;font-size:13px;color:var(--ink-2);line-height:1.75;}
.rvf{margin:6px 0 0;background:var(--ok-soft);border-radius:6px;padding:7px 10px;}
.rvf .lb{color:var(--ok);}
.rvf p{margin:2px 0 0;font-size:13.5px;line-height:1.75;}
.gmendnote{font-size:13px;margin:14px 0 0;}
body.gamepage .sitefooter{margin-top:24px;}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

/* ---------- 講義の一覧（見る・聞く共通） ---------- */
.lsn,.ls{padding-top:16px;display:flex;flex-direction:column;gap:14px;}
.lsnlead{margin:0;font-size:14px;line-height:1.85;color:var(--ink-2);}
.lsnnext{position:relative;display:flex;flex-direction:column;gap:3px;background:var(--accent);color:var(--on-accent);
  border-radius:14px;padding:16px 60px 16px 18px;text-decoration:none;box-shadow:var(--shadow);}
.lsnnext .lb{color:var(--on-accent);opacity:.85;}
.lsnnext .t{font-family:var(--f-disp);font-weight:600;font-size:18px;line-height:1.45;}
.lsnnext .s{font-size:12.5px;opacity:.9;}
.lsnnext .go{position:absolute;right:16px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;
  background:var(--on-accent);color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:14px;padding-left:2px;}
.lsnlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;}
.lsnrow{display:grid;grid-template-columns:34px 1fr auto;gap:12px;align-items:center;width:100%;text-align:left;
  background:var(--surface);border:1.5px solid var(--rule);border-radius:10px;padding:12px 14px;min-height:60px;
  text-decoration:none;color:var(--ink);}
.lsnrow:hover{border-color:var(--accent);}
.lsnrow .no{font-family:var(--f-mono);font-size:15px;color:var(--accent);width:34px;height:34px;border-radius:50%;
  background:var(--accent-soft);display:flex;align-items:center;justify-content:center;}
.lsnrow.done .no{background:var(--ok-soft);color:var(--ok);}
.lsnrow .body{display:flex;flex-direction:column;min-width:0;}
.lsnrow .t{font-family:var(--f-disp);font-weight:600;font-size:15px;line-height:1.5;}
.lsnrow .s{font-size:12px;color:var(--ink-3);line-height:1.6;}
.lsnrow .meta{display:flex;flex-direction:column;align-items:flex-end;gap:2px;}
.lsnrow .min{font-family:var(--f-mono);font-size:11.5px;color:var(--ink-3);white-space:nowrap;}
.lsnrow .st{font-size:11.5px;font-weight:700;color:var(--ok);white-space:nowrap;}
.lsnrow .st.mid{color:var(--warn);}
.lsnrow.now{border-color:var(--accent);background:var(--accent-soft);}
.lsnrow.now .st{color:var(--accent);}
.lsnalt{margin:0;font-size:13px;color:var(--ink-2);}
.lsncredit{margin:0;font-size:11.5px;color:var(--ink-3);}

/* ---------- 見る講義の再生（watch.php?id=） ---------- */
body.watching{overflow:hidden;}
body.watching .siteheader{display:none;}
.wv{position:fixed;inset:0;z-index:50;background:var(--ground);display:flex;flex-direction:column;
  padding:calc(8px + env(safe-area-inset-top)) 0 calc(8px + env(safe-area-inset-bottom));}
.wvtop{padding:0 14px;max-width:720px;width:100%;margin:0 auto;}
.wvbars{display:flex;gap:3px;}
.wvbars i{flex:1;height:4px;border-radius:2px;background:var(--rule);background:color-mix(in srgb,var(--ink-3) 45%,var(--ground));overflow:hidden;display:block;}
.wvbars i b{display:block;height:100%;width:0;background:var(--accent);}
.wvhead{display:flex;align-items:center;gap:10px;padding:8px 0 2px;}
.wvtitle{flex:1;min-width:0;font-size:12.5px;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wvcount{font-family:var(--f-mono);font-size:11.5px;color:var(--ink-2);white-space:nowrap;}
.wvclose{width:44px;height:44px;display:flex;align-items:center;justify-content:center;color:var(--ink-2);
  text-decoration:none;margin-right:-10px;}
.wvclose svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;}
.wvstage{position:relative;flex:1;min-height:0;max-width:720px;width:100%;margin:0 auto;}
.wvscene{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:10px 20px 18px;overflow-y:auto;}
.wvstage{-webkit-tap-highlight-color:transparent;touch-action:pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
.wv.hinting .wvscene{visibility:hidden;}
.wv.held .wvscene{opacity:.82;}
.wvpaused{position:absolute;left:50%;top:14px;transform:translateX(-50%);background:var(--ink);color:var(--ground);
  border-radius:999px;padding:6px 14px;font-size:12.5px;display:flex;gap:8px;align-items:baseline;pointer-events:none;z-index:3;}
.wvpaused small{opacity:.75;font-size:11px;}
.wvhint{position:absolute;inset:0;z-index:4;background:var(--ground);background:color-mix(in srgb,var(--ground) 92%,transparent);
  display:grid;grid-template-columns:3fr 7fr;grid-template-rows:1fr auto auto;gap:14px;padding:24px 20px;}
.wvhint .hl,.wvhint .hr{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;font-size:14px;line-height:1.5;
  border:1.5px dashed var(--accent);border-radius:12px;color:var(--ink);padding:10px;}
.wvhint b{font-size:22px;color:var(--accent);}
.wvhint .hc{grid-column:1 / -1;text-align:center;font-size:14px;line-height:1.8;color:var(--ink-2);}
.wvhint .hc b{font-size:inherit;color:var(--accent);}
.wvhint .btn{grid-column:1 / -1;min-height:52px;}
.wvctl{display:flex;align-items:center;justify-content:center;gap:14px;padding:6px 14px 0;max-width:720px;width:100%;margin:0 auto;}
.wvbtn{width:52px;height:52px;border-radius:50%;border:1px solid var(--rule);background:var(--surface);
  color:var(--ink-2);display:flex;align-items:center;justify-content:center;}
.wvbtn svg{width:22px;height:22px;fill:currentColor;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round;}
.wvbtn.main{width:60px;height:60px;background:var(--accent);color:var(--on-accent);border:none;}
.wvbtn.main .ic-pause{display:none;} .wvbtn.main.playing .ic-pause{display:block;} .wvbtn.main.playing .ic-play{display:none;}
.wvbtn.spd{font-family:var(--f-mono);font-size:13px;width:auto;border-radius:999px;padding:0 14px;height:44px;}
.wvtoast{position:absolute;left:50%;bottom:calc(88px + env(safe-area-inset-bottom));transform:translateX(-50%);
  background:var(--ink);color:var(--ground);border-radius:12px;padding:10px 12px 10px 16px;font-size:13px;z-index:6;
  display:flex;gap:10px;align-items:center;width:max-content;max-width:calc(100% - 32px);transition:opacity .4s;}
.wvtoast button{color:var(--ground);border:1px solid var(--ink-3);border:1px solid color-mix(in srgb,var(--ground) 50%,transparent);border-radius:8px;
  padding:6px 12px;font-size:13px;min-height:44px;white-space:nowrap;}
.wvtoast.out{opacity:0;}
.wvend{position:absolute;inset:0;z-index:7;background:var(--ground);display:flex;flex-direction:column;justify-content:center;
  gap:10px;padding:24px 20px calc(24px + env(safe-area-inset-bottom));max-width:560px;margin:0 auto;text-align:center;}
.wvendlead{margin:0;font-family:var(--f-disp);font-weight:600;font-size:26px;}
.wvendtitle{margin:0;font-size:14px;color:var(--ink-2);}
.wvendnote{margin:4px 0 8px;font-size:13.5px;color:var(--ink-2);line-height:1.8;}
.wvendbtns{display:flex;flex-direction:column;gap:10px;}
.wvendlinks{display:flex;justify-content:center;gap:18px;margin-top:4px;}
.linkbtn2{font-size:14px;color:var(--accent);text-decoration:underline;padding:10px 6px;min-height:44px;}
.wvendshaky{margin:0;text-align:left;background:var(--warn-soft);border-radius:10px;padding:10px 14px;font-size:13px;font-weight:700;color:var(--warn);}
.wvendshaky ul{margin:6px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;}
.wvendshaky li{display:flex;flex-direction:column;font-weight:400;color:var(--ink);}
.wvendshaky .q{font-size:13.5px;} .wvendshaky .a{font-size:12.5px;color:var(--ink-2);}
.wvend.guard a,.wvend.guard button{pointer-events:none;}

/* 場面 */
.sc{width:100%;display:flex;flex-direction:column;gap:14px;margin:auto 0;}
.sc strong{color:var(--accent);font-weight:800;}
.sc .hd{margin:0;font-family:var(--f-disp);font-weight:600;font-size:clamp(18px,5vw,22px);line-height:1.5;}
.sc .note{margin:0;font-size:clamp(14px,3.9vw,16px);line-height:1.8;color:var(--ink-2);}
.t-title .sc{text-align:center;align-items:center;gap:10px;}
.t-title .kick{margin:0;font-family:var(--f-mono);font-size:13px;letter-spacing:.2em;color:var(--accent);}
.t-title .ttl{margin:0;font-family:var(--f-disp);font-weight:600;font-size:clamp(28px,8vw,40px);line-height:1.35;text-wrap:balance;}
.t-title .sub{margin:0;font-size:clamp(14px,4vw,17px);color:var(--ink-2);line-height:1.7;}
.t-point .big{margin:0;font-family:var(--f-disp);font-weight:600;font-size:clamp(23px,6.6vw,32px);line-height:1.6;text-wrap:pretty;}
.sc .items,.sc .recap{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px;}
.sc .items li{position:relative;padding:12px 14px 12px 34px;background:var(--surface);border:1px solid var(--rule);border-radius:10px;
  font-size:clamp(16px,4.5vw,19px);line-height:1.6;font-weight:500;}
.sc .items li::before{content:"";position:absolute;left:14px;top:1.15em;width:8px;height:8px;border-radius:50%;background:var(--accent);}
.sc .recap li{position:relative;padding:12px 14px 12px 42px;background:var(--ok-soft);border-radius:10px;
  font-size:clamp(16px,4.5vw,19px);line-height:1.6;font-weight:500;}
.sc .recap li::before{content:"✓";position:absolute;left:15px;top:.62em;color:var(--ok);font-weight:700;font-size:18px;}
.tbl{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));border:1px solid var(--rule);border-radius:10px;overflow:hidden;background:var(--rule);gap:1px;}
.tbl .th{background:var(--surface-2);font-family:var(--f-mono);font-size:12px;color:var(--ink-3);padding:8px 10px;letter-spacing:.04em;}
.tbl .td{background:var(--surface);padding:10px;font-size:clamp(14px,3.9vw,16.5px);line-height:1.55;font-weight:500;}
.tbl .td.first{font-weight:700;}
.scale{display:flex;flex-direction:column;gap:14px;}
.mk{display:flex;flex-direction:column;gap:5px;}
.mkt{display:flex;justify-content:space-between;align-items:baseline;gap:10px;}
.mkt .lbl{font-size:clamp(15px,4.2vw,17.5px);font-weight:500;}
.mkt .val{font-family:var(--f-disp);font-weight:600;font-size:clamp(17px,4.8vw,21px);color:var(--accent);white-space:nowrap;}
.mkb{position:relative;height:14px;border-radius:7px;background:var(--rule-2);overflow:hidden;}
.mkb i{position:absolute;left:0;top:0;bottom:0;width:var(--pct);border-radius:7px;background:var(--accent);}
.mkb .half{position:absolute;left:50%;top:-2px;bottom:-2px;width:2px;background:var(--ink-3);opacity:.45;}
.flow{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:22px;counter-reset:f;}
.flow li{position:relative;counter-increment:f;padding:11px 14px 11px 48px;background:var(--surface);border:1px solid var(--rule);
  border-radius:10px;font-size:clamp(15px,4.3vw,18px);line-height:1.55;font-weight:500;}
.flow li::before{content:counter(f);position:absolute;left:12px;top:50%;transform:translateY(-50%);width:26px;height:26px;border-radius:50%;
  background:var(--accent);color:var(--on-accent);font-family:var(--f-mono);font-size:13px;display:flex;align-items:center;justify-content:center;}
.flow li:not(:last-child)::after{content:"";position:absolute;left:24px;bottom:-17px;width:2px;height:12px;background:var(--accent);opacity:.5;}
.cmp{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.cmp .side{background:var(--surface);border:1.5px solid var(--rule);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:6px;}
.cmp .s0{border-color:var(--accent);}
.cmp .lbl{font-family:var(--f-disp);font-weight:600;font-size:clamp(14px,4vw,16px);color:var(--accent);}
.cmp .s1 .lbl{color:var(--ink-2);}
.cmp .txt{margin:0;font-size:clamp(14.5px,4.1vw,17px);line-height:1.65;font-weight:500;}
.t-quiz .sc{gap:16px;}
.t-quiz .qkick{margin:0;font-family:var(--f-mono);font-size:13px;letter-spacing:.14em;color:var(--warn);}
.t-quiz .q{margin:0;font-family:var(--f-disp);font-weight:600;font-size:clamp(20px,5.8vw,26px);line-height:1.6;}
.think{display:flex;flex-direction:column;align-items:stretch;gap:8px;color:var(--ink-2);font-size:13.5px;text-align:center;}
.wvreveal{min-height:52px;}
.wvreveal:disabled{opacity:.45;cursor:default;}
.think.nudge .thk{animation:nudge .5s;color:var(--warn);font-weight:700;}
@keyframes nudge{0%,100%{transform:none;}25%{transform:translateX(-4px);}75%{transform:translateX(4px);}}
.self{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px;}
.selflb{font-size:12.5px;color:var(--ink-2);flex-basis:100%;}
.selfb{flex:1;min-height:44px;border-radius:10px;border:1.5px solid var(--rule);background:var(--surface);font-size:14px;}
.selfb.on.ok{border-color:var(--ok);color:var(--ok);font-weight:700;}
.selfb.on.shaky{border-color:var(--warn);color:var(--warn);font-weight:700;}
.ans{display:flex;flex-direction:column;gap:8px;background:var(--ok-soft);border-radius:12px;padding:14px 15px;}
.ans .a{margin:0;font-family:var(--f-disp);font-weight:600;font-size:clamp(19px,5.4vw,24px);line-height:1.5;}
.ans .albl{display:inline-block;font-family:var(--f-mono);font-size:11px;letter-spacing:.1em;color:var(--ok);
  border:1px solid var(--ok);border-radius:4px;padding:0 6px;margin-right:8px;vertical-align:.25em;}
.ans .awhy{margin:0;font-size:clamp(14.5px,4vw,16.5px);line-height:1.75;color:var(--ink-2);}

/* 場面が変わるときの動き（動きを減らす設定では出さない） */
.wvscene.anim .sc{animation:scin .28s ease-out;}
@keyframes scin{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}
.wvscene.anim .items li,.wvscene.anim .recap li,.wvscene.anim .flow li,.wvscene.anim .mk,.wvscene.anim .tbl .td{
  animation:scin .32s ease-out both;animation-delay:calc(var(--k, 0) * .22s + .1s);}
.wvscene.anim .mkb i{animation:grow .7s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--k, 0) * .22s + .25s);}
@keyframes grow{from{width:0;}to{width:var(--pct);}}
.wvscene.anim .ans{animation:scin .3s ease-out;}

/* ---------- 聞く講義（listen.php） ---------- */
.lsp{background:var(--surface);border:1px solid var(--rule);border-radius:16px;padding:18px 16px 16px;box-shadow:var(--shadow);
  display:flex;flex-direction:column;gap:10px;}
.lspno{margin:0;font-family:var(--f-mono);font-size:12px;letter-spacing:.14em;color:var(--accent);}
.lsptitle{margin:0;font-size:21px;line-height:1.45;}
.lspch{margin:0;font-size:13px;color:var(--ink-2);min-height:1.8em;}
.lspseek{margin-top:4px;}
.lspseek input[type=range]{--p:0%;width:100%;height:44px;background:transparent;-webkit-appearance:none;appearance:none;margin:0;padding:0;border:none;}
.lspseek input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:3px;
  background:linear-gradient(to right,var(--accent) var(--p),var(--rule-2) var(--p));}
.lspseek input[type=range]::-moz-range-track{height:6px;border-radius:3px;background:var(--rule-2);}
.lspseek input[type=range]::-moz-range-progress{height:6px;border-radius:3px;background:var(--accent);}
.lspseek input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;background:var(--accent);
  margin-top:-7px;border:3px solid var(--surface);box-shadow:0 0 0 1px var(--accent);}
.lspseek input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--accent);border:3px solid var(--surface);}
.lsptime{display:flex;justify-content:space-between;font-family:var(--f-mono);font-size:12px;color:var(--ink-3);}
.lspctl{display:flex;align-items:center;justify-content:center;gap:26px;margin:4px 0;}
.lspb{width:60px;height:60px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--ink-2);
  border:1px solid var(--rule);background:var(--surface);}
.lspb span{font-size:22px;line-height:1;}
.lspb small{font-size:10px;font-family:var(--f-mono);margin-top:1px;}
.lspb.main{width:76px;height:76px;background:var(--accent);color:var(--on-accent);border:none;box-shadow:var(--shadow);}
.lspb.main span{font-size:26px;padding-left:3px;}
.ls.playing .lspb.main span{padding-left:0;}
.lspsub{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;}
.lspresume,.lspnext{display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:center;background:var(--accent-soft);
  border-radius:10px;padding:10px 12px;font-size:13px;}
.lspresume span,.lspnext span{flex-basis:100%;text-align:center;}
.lspresume .btn,.lspnext .btn{min-height:44px;}
.lspmini{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;align-items:center;gap:12px;
  padding:8px 16px calc(8px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--rule);box-shadow:0 -4px 16px rgba(0,0,0,.08);}
.lspb.sm{width:48px;height:48px;}
.lspb.sm span{font-size:18px;} .lspb.sm small{font-size:9.5px;}
.lspb.sm.main{width:54px;height:54px;}
.lspmch{flex:1;min-width:0;font-size:12.5px;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.lspjump{position:sticky;bottom:80px;display:block;margin:8px auto 0;background:var(--accent);color:var(--on-accent);border:none;}
.ls{padding-bottom:84px;}
.lspend{display:flex;flex-direction:column;gap:8px;text-align:center;border-top:1px solid var(--rule-2);padding-top:12px;}
.lspendlead{margin:0;font-family:var(--f-disp);font-weight:600;font-size:17px;}
.lschap h3,.lsepi h3,.lsscript h3{margin:6px 0 8px;font-size:15px;}
.lschap ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;}
.chrow{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:10px 14px;min-height:46px;border-radius:10px;
  background:var(--surface);border:1px solid var(--rule);font-size:14px;}
.chrow span:first-child{flex:1;}
.chrow .tm{font-family:var(--f-mono);font-size:12px;color:var(--ink-3);}
.chrow.now{border-color:var(--accent);background:var(--accent-soft);font-weight:700;}
.lsscript{background:var(--surface);border:1px solid var(--rule);border-radius:12px;padding:12px 14px;}
.lsscripthead{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.follow{font-size:12.5px;color:var(--ink-2);display:flex;align-items:center;gap:6px;}
.follow input{width:18px;height:18px;accent-color:var(--accent);}
#lspLines .lsch{margin:14px 0 4px;font-family:var(--f-mono);font-size:11px;letter-spacing:.1em;color:var(--accent);}
#lspLines .ln{margin:0;padding:6px 8px;border-radius:6px;font-size:15px;line-height:1.8;color:var(--ink-2);cursor:pointer;}
#lspLines .ln.now{background:var(--accent-soft);color:var(--ink);font-weight:500;}

@media (min-width:640px){
  .hubgrid{grid-template-columns:repeat(4,1fr);}
  .hubgrid.n2{grid-template-columns:1fr 1fr;}
  .hubgrid.n1{grid-template-columns:1fr 1fr;}
  .gmmodes{flex-direction:row;}
  .gmmode{flex:1;}
}
@media (max-width:360px){
  .hubstat{grid-template-columns:1fr;}
  .hubexam{border-right:none;padding-right:0;}
  .qkbtns{grid-template-columns:1fr;}
}
@media (prefers-reduced-motion: reduce){
  .wvscene .sc,.wvscene .items li,.wvscene .mk,.wvscene .mkb i,.gmcard,.gmcount{animation:none !important;}
}
.qkpoint strong{color:var(--accent);font-weight:800;}
