/* 1単元パッケージの見た目。色・フォントは学習画面(public/app/index.html)のデザイントークンに合わせる */
:root{--photo-ratio:7/5;--photo-ratio-pair:2/3;color-scheme:light;--paper:#F8FBFF;--grid:#DCE7F5;--ink:#1B2559;--muted:#5B6690;--card:#FFFFFF;--line:#C9D6EA;--hl:#FFE14D;--act:#E0612A;--ok:#1F9D63;--ng:#D64545;--line-green:#06C755}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0}
body{color:var(--ink);font-family:'Zen Maru Gothic','Hiragino Maru Gothic ProN','Hiragino Sans','Noto Sans JP',sans-serif;font-weight:500;line-height:1.6;background-color:var(--paper);
  background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);background-size:24px 24px;-webkit-text-size-adjust:100%}
#unit{max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh}
a{color:var(--ink)}
button{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}
:focus-visible{outline:3px solid var(--act);outline-offset:2px}
.lbl{font-size:.8rem;color:var(--muted);font-weight:700;margin:0 0 4px}

/* ボタン(タップ領域は44px以上) */
.primary,.linecta,.ghost,.choice,.toggle,.qcard,.mask,.back{min-height:44px;cursor:pointer}
.primary{background:var(--act);color:#fff;border:none;border-radius:999px;padding:12px 22px;font-weight:900;font-size:1.05rem;box-shadow:0 4px 0 rgba(0,0,0,.18)}
.primary:disabled{opacity:.4;box-shadow:none;cursor:default}
.primary.big,.linecta.big{width:100%}
.linecta{background:var(--line-green);color:#fff;border:none;border-radius:999px;padding:12px 14px;font-weight:900;font-size:.9rem;box-shadow:0 4px 0 rgba(0,0,0,.18)}
.ghost{background:none;border:2px dashed var(--muted);border-radius:12px;padding:8px 14px;color:var(--muted);font-weight:700}
.choices,.btnrow,.selfeval{display:flex;flex-wrap:wrap;gap:8px}
.selfeval{flex-direction:column}
.choice{flex:1 1 auto;min-width:88px;padding:10px 16px;border-radius:14px;border:2px solid var(--ink);background:var(--card);font-weight:900;font-size:1rem}
.choice.on{background:var(--hl);color:#1B2559}
.choice.ok{background:var(--ok);border-color:var(--ok);color:#fff}
.choice.ng{background:var(--ng);border-color:var(--ng);color:#fff}
.choice:disabled{cursor:default}
.toggle{flex:1 1 auto;padding:8px 12px;border-radius:12px;border:2px solid var(--ink);background:var(--card);font-weight:900}
.toggle[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.toggle.swatch{border-color:var(--sw)}
.toggle.swatch[aria-pressed="true"]{background:var(--sw);color:#1B2559}

/* そら先生の吹き出し */
.bubble{display:flex;gap:10px;align-items:flex-start;background:var(--card);border:2px solid var(--line);border-radius:16px;padding:10px 12px}
.neko{flex:none;object-fit:contain}
.btext{min-width:0}
.who{font-size:.72rem;color:var(--muted);font-weight:700}
.bubble p{margin:0;font-weight:700;font-size:.98rem;line-height:1.55}

/* A 単元トップ */
.top{padding:12px 16px 28px;display:flex;flex-direction:column;gap:14px}
.tophd{display:flex;justify-content:space-between;align-items:center}
.brand{display:flex;align-items:center;gap:6px;font-weight:900;text-decoration:none}
.subject{font-size:.8rem;color:var(--muted);font-weight:700}
.top h1{margin:4px 0 0;font-size:1.5rem;line-height:1.35}
.qcards{display:flex;flex-direction:column;gap:8px}
.qcard{text-align:left;display:flex;flex-direction:column;gap:2px;background:var(--card);border:2px solid var(--ink);border-radius:16px;padding:12px 14px}
.qcard.done{border-color:var(--ok)}
.qcard.locked{border-style:dashed;border-color:var(--line);color:var(--muted);cursor:default}
.qn{font-size:.78rem;color:var(--act);font-weight:900}
.qcard b{font-size:1.02rem}
.qmeta{display:flex;justify-content:space-between;align-items:center;font-size:.8rem;color:var(--muted)}
.chip{border-radius:999px;padding:1px 10px;font-weight:700;border:1.5px solid var(--line)}
.chip.doing{border-color:var(--act);color:var(--act)}
.chip.done{border-color:var(--ok);color:var(--ok)}
.memolinks{display:flex;flex-direction:column;gap:6px}
.parent{text-align:center;font-size:.85rem;margin:4px 0 0}

/* B 共通フレーム:ヘッダー / ステージ(固定) / 吹き出し / 操作エリア */
.frame{display:flex;flex-direction:column;height:100vh;height:100dvh}
.fhd{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--paper);border-bottom:2px solid var(--line);flex:none}
.back{border:2px solid var(--line);background:var(--card);border-radius:12px;font-weight:900;min-width:52px;padding:2px 6px;display:flex;flex-direction:column;align-items:center;line-height:1.1;font-size:1.05rem}
.back{font-size:.85rem;justify-content:center}
.prevbtn{flex:none;min-height:44px;background:none;border:none;color:var(--muted);font-weight:900;padding:0 10px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.prevbtn[hidden]{display:none}
.mainbtn .primary.big{flex:1;width:auto}
.hinttoggle{align-self:flex-start}
.ftitle{flex:1;min-width:0;font-weight:900;font-size:.9rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ftitle span{display:block;font-size:.72rem;color:var(--act)}
.dots{display:flex;flex-wrap:wrap;gap:4px;max-width:96px;justify-content:flex-end}
.dots i{width:7px;height:7px;border-radius:50%;background:var(--line)}
.dots i.on{background:var(--ok)}.dots i.now{background:var(--act)}
.stage{flex:none;height:min(46vh,calc(min(100vw,480px)*.72));height:min(46dvh,calc(min(100vw,480px)*.72));padding:8px 10px 0;display:flex;align-items:center;justify-content:center}
.itemsvg,.itemcanvas{display:block;width:100%;height:100%;max-height:100%;object-fit:contain}
.itemcanvas{border-radius:16px}
.ph{margin:auto;color:var(--muted);font-weight:900}
.talk{flex:none;padding:8px 10px 0}
.ops{flex:1 1 auto;min-height:0;overflow-y:auto;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:10px}
.itemctrl{display:flex;flex-direction:column;gap:8px}
.mainbtn{margin-top:auto;display:flex;gap:8px}
.mainbtn.col{flex-direction:column}
.slider{display:flex;flex-direction:column;gap:2px;font-weight:700;font-size:.85rem}
.slider input{width:100%;height:44px;accent-color:var(--act)}
.itemnote{margin:0;font-size:.88rem;font-weight:700;min-height:1.4em;background:var(--card);border-left:4px solid var(--act);border-radius:6px;padding:6px 10px}
.btnrow.grid2{display:grid;grid-template-columns:1fr 1fr}
.btnrow.grid2 .toggle{font-size:.86rem;padding:8px 4px}
/* 光の矢印:線が伸びるように出る / 吸収された光の× / 下敷きのスライド */
.ray{stroke-linecap:butt!important;stroke-dasharray:var(--len);stroke-dashoffset:var(--len);animation:rayin .45s ease-out forwards}
@keyframes rayin{to{stroke-dashoffset:0}}
.gone{opacity:0;animation:fadein .2s ease-out forwards}
@keyframes fadein{to{opacity:1}}
.sheet.slide{animation:slidein .45s ease-out both}
@keyframes slidein{from{transform:translateX(360px)}to{transform:none}}
.itemlbl{margin:0;font-size:.8rem;color:var(--muted);font-weight:700}
.svglbl{font-family:'Zen Maru Gothic',sans-serif;font-weight:900;font-size:12px}
.halo{paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
.understand{background:var(--card);border:2px solid var(--ink);border-radius:14px;padding:10px 14px}
.understand p{margin:0 0 8px;font-weight:700}.understand p:last-child{margin:0}
.home{background:var(--card);border:2px dashed var(--act);border-radius:14px;padding:10px 14px}
.home p{margin:2px 0 0}

/* C・D・E */
.page{display:flex;flex-direction:column;gap:12px;padding:0 0 calc(20px + env(safe-area-inset-bottom,0px));min-height:100vh;min-height:100dvh}
.page>*:not(.fhd){margin-left:14px;margin-right:14px}
.hints{display:flex;flex-direction:column;gap:6px}
.hint{display:flex;gap:10px;align-items:center;background:var(--card);border:2px solid var(--line);border-radius:12px;padding:8px 12px;font-weight:700}
.hint b{flex:none;width:26px;height:26px;border-radius:50%;background:var(--ink);color:var(--paper);display:flex;align-items:center;justify-content:center;font-size:.8rem}
.parentbox{background:var(--card);border:2px solid var(--line);border-radius:12px;padding:8px 12px}
.parentbox summary{font-weight:900;cursor:pointer;min-height:32px}
.memotools{display:flex;justify-content:flex-end}
.memo{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px;counter-reset:m}
.memo li{counter-increment:m;background:var(--card);border:2px solid var(--line);border-radius:12px;padding:10px 12px 10px 40px;position:relative;font-weight:700;line-height:2}
.memo li::before{content:counter(m);position:absolute;left:10px;top:11px;width:22px;height:22px;border-radius:50%;background:var(--ink);color:var(--paper);font-size:.75rem;display:flex;align-items:center;justify-content:center;line-height:1}
.mask{display:inline-flex;align-items:center;vertical-align:middle;min-height:32px;margin:2px 1px;padding:0 6px;border:none;border-radius:6px;background:#E5484D;font-weight:900}
.mask span{visibility:hidden}
.mask[aria-pressed="true"]{background:var(--hl);color:#1B2559}
.mask[aria-pressed="true"] span{visibility:visible}
.done .clear{text-align:center;padding-top:22px}
.done .clear h2{margin:0;font-size:2rem;color:var(--act)}
.done .clear .qn{margin:6px 0 0}
.found{background:var(--card);border:2px solid var(--ink);border-radius:14px;padding:10px 14px}
.found b{display:block;font-size:.8rem;color:var(--muted)}
.found p{margin:2px 0 0;font-weight:900;background-image:linear-gradient(transparent 60%,var(--hl) 60%);display:inline}
.demobadge{position:fixed;right:8px;bottom:8px;background:#1B2559;color:#fff;font-size:.75rem;font-weight:700;padding:4px 10px;border-radius:999px;opacity:.85;z-index:50}
.err{padding:24px;font-weight:700}
@media (prefers-reduced-motion: reduce){*{scroll-behavior:auto!important}.ray,.gone,.sheet.slide{animation:none!important;stroke-dashoffset:0;opacity:1}}

/* 埋め込み(?embed=prism):ステージだけを、枠いっぱいに */
body.embed{background:transparent;background-image:none}
body.embed #unit{max-width:none;min-height:0}
.embedstage{height:100vh!important;padding:0!important}

/* おまけ(見えない光)/ 説明してみよう:もう一度ためすリンク */
.bonus{background:var(--card);border:2px dashed var(--line);border-radius:14px;padding:10px 14px;display:flex;flex-direction:column;gap:6px}
.bonuslabel{align-self:flex-start;background:var(--hl);color:#1B2559;font-weight:900;font-size:.75rem;border-radius:999px;padding:1px 12px}
.bonus p{margin:0;font-weight:700;font-size:.92rem}
.specsvg{max-height:110px;color:var(--ink)}
.review{display:flex;flex-direction:column;gap:6px;background:var(--card);border:2px solid var(--act);border-radius:14px;padding:10px 12px}
.reviewlink{align-self:stretch;text-align:left}

/* まとめ(understand):ステージを小さくして、文章とおまけを見やすくする */
.frame.compact .stage{height:min(26dvh,calc(min(100vw,480px)*.44))}
.frame.compact .talk .bubble p{font-size:.92rem}

/* ふりがな(ルビ) */
ruby rt{font-size:.5em;font-weight:700;line-height:1;letter-spacing:0}
.bubble p,.understand p,.adv p,.bonus p,.choice,.bandbtn,.memo li,.itemnote,.ftitle,.qcard b{line-height:1.9}
.choice{line-height:1.5}
/* 7色の帯(確認問題) */
.band{display:flex;gap:4px}
.bandbtn{flex:1 1 0;min-width:0;min-height:56px;padding:2px 0 4px;border:3px solid var(--ink);border-radius:10px;background:var(--bc);font-weight:900;font-size:.9rem;color:#1B2559;cursor:pointer;display:flex;align-items:flex-end;justify-content:center;line-height:1.3}
.bandbtn span{background:rgba(255,255,255,.72);border-radius:6px;padding:0 3px}
.bandbtn:disabled{cursor:default}
.bandbtn.ok{outline:4px solid var(--ok)}
.bandbtn.ng{opacity:.35}
#ckreview{margin-top:8px}
/* 応用(折りたたみ)・バッジ */
.advbadge{display:inline-block;background:var(--ink);color:var(--paper);font-size:.7rem;font-weight:900;border-radius:999px;padding:0 8px;margin-right:6px;vertical-align:middle;line-height:1.7}
.memo li .advbadge{margin:0 0 0 6px}
.adv{background:var(--card);border:2px solid var(--line);border-radius:14px;padding:8px 14px}
.adv summary{font-weight:900;cursor:pointer;min-height:36px;display:flex;align-items:center;flex-wrap:wrap;gap:2px}
.adv p{margin:6px 0;font-weight:700;font-size:.92rem}
.speclist{margin:0;padding-left:1.1em;font-weight:700;font-size:.88rem;display:flex;flex-direction:column;gap:2px}

/* 下部の主ボタンは、画面が低くても見えるように、操作エリアの下に張りつける */
.ops .mainbtn{position:sticky;bottom:0;background:linear-gradient(to top,var(--paper) 78%,transparent);padding-top:8px;margin-bottom:calc(-12px - env(safe-area-inset-bottom,0px));padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:3}

/* せまい画面(262px前後)・低い画面への対応 */
@media (max-height:700px){.frame.compact .stage{display:none}}
@media (max-width:340px){
  .band{flex-wrap:wrap}.bandbtn{flex:1 1 22%;min-height:50px}
  .bubble{padding:8px 8px;gap:6px}.bubble p{font-size:.88rem}
  .itemnote{font-size:.8rem}.choice,.toggle{font-size:.88rem;padding:8px 8px}
  .ops{padding-left:8px;padding-right:8px}.talk{padding-left:6px;padding-right:6px}.stage{padding-left:6px;padding-right:6px}
  .ftitle{font-size:.8rem}.dots{max-width:70px}
  .primary,.linecta{padding:10px 12px;font-size:.95rem}
}
@media (max-height:640px){
  .stage{height:min(32dvh,calc(min(100vw,480px)*.72))}
  .talk{max-height:36dvh;overflow-y:auto}
  .ops .mainbtn{padding-top:4px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));margin-bottom:calc(-12px - env(safe-area-inset-bottom,0px))}
  .primary{padding:9px 16px}
}

/* 光と色(提案007):見た組み合わせの表 / 比較カード / 画面ルーペ / 吸いこまれる光 / 写真2枚 / ふりかえり / 記録欄 */
.seen{display:flex;flex-wrap:wrap;gap:6px}
.seenchip{font-size:.78rem;font-weight:900;border:2px dashed var(--line);border-radius:999px;padding:1px 10px;color:var(--muted);background:var(--card);line-height:1.6}
.seenchip.on{border:2px solid var(--ok);color:var(--ok)}
.toggle small{display:block;font-size:.72rem;font-weight:700;line-height:1.2}
.toggle.swatch small{color:#1B2559}
@keyframes sinkfade{to{opacity:0}}
.cmp{display:flex;gap:8px;width:100%;height:100%}
.cmp figure{flex:1 1 0;min-width:0;margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.cmp canvas{width:100%;height:auto;max-height:78%;border-radius:12px}
.cmp figcaption{font-size:.78rem;font-weight:700;text-align:center;line-height:1.5}
.cmp figcaption b{display:block;font-size:.9rem}.cmp em{font-style:normal;font-weight:900;color:var(--act)}
.lens{touch-action:none;cursor:grab}
.photo.multi{gap:6px;background:none;border:none}
.photo figure{flex:1 1 0;min-width:0;margin:0;position:relative;display:flex;flex-direction:column;border-radius:14px;overflow:hidden;background:var(--card);border:2px solid var(--line)}
.photo figure img{flex:1 1 auto;min-height:0}
.photo figcaption{position:absolute;left:4px;bottom:4px;background:rgba(27,37,89,.82);color:#fff;font-size:.72rem;font-weight:900;border-radius:6px;padding:0 6px}
.photo .ph{text-align:center;padding:8px;font-size:.9rem}
.photo .ph[hidden]{display:none}
.ph small{display:block;font-weight:700;font-size:.72rem;margin-top:4px;line-height:1.4}
.choices.multi .choice[aria-pressed="true"]{background:var(--hl);color:#1B2559;border-color:var(--ink)}
.understand .lead{font-weight:900;font-size:1.05rem;background-image:linear-gradient(transparent 62%,var(--hl) 62%);display:inline}
.reasons{margin:10px 0 0;padding-left:1.4em;display:flex;flex-direction:column;gap:6px;font-weight:700}
.recaps{display:flex;flex-direction:column;gap:6px}
.recaps .lbl{margin:0;font-size:.8rem;color:var(--muted);font-weight:900}
.overlay{position:fixed;inset:0;background:rgba(10,16,40,.6);z-index:60;display:flex;align-items:center;justify-content:center;padding:12px}
.ovbox{background:var(--paper);border:3px solid var(--ink);border-radius:18px;padding:14px;width:min(100%,460px);max-height:100%;overflow-y:auto;display:flex;flex-direction:column;gap:8px}
.ovbox p{margin:0;font-weight:700;line-height:1.8}
.ovstage{height:min(36dvh,calc(min(100vw,420px)*.72))}
.record{background:var(--card);border:2px solid var(--line);border-radius:14px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}
.rrow{display:flex;flex-direction:column;gap:4px;font-weight:700;font-size:.9rem}
.rrow>div{display:flex;flex-wrap:wrap;gap:6px}
.rrow .toggle{padding:4px 10px;min-height:40px}
@media (max-width:340px){.seenchip{font-size:.7rem}.cmp figcaption{font-size:.7rem}.ovbox{padding:10px}}
.understand .note{font-size:.78rem;color:var(--muted);font-weight:700}

/* 吸収図(いま見ているところ)・仕分け・ボトムシート(提案008) */
.itemcanvas.tappable{cursor:pointer}
.abs{background:var(--card);border:2px solid var(--line);border-radius:14px;padding:8px 10px;display:flex;flex-direction:column;gap:6px}
.abshd{margin:0;font-size:.82rem;font-weight:700;color:var(--muted)}.abshd b{color:var(--ink)}
.abscols{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.abscol{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}
.abscol .lt{font-weight:900;font-size:.8rem;border-bottom:4px solid var(--lc);padding:0 4px}
.abscol .dn{font-weight:900;font-size:1.1rem;line-height:1}
.res{font-weight:900;font-size:.78rem;text-align:center;line-height:1.35;border-radius:8px;padding:2px 6px;max-width:100%}
.res.tag{background:var(--ic);color:#1B2559;border:2px solid #1B2559}
.res.up{color:var(--ink);border:2px solid var(--lc)}
.res.q{color:var(--muted);border:2px dashed var(--line);padding:2px 14px}
.abssum{margin:0;font-weight:900;font-size:.86rem;min-height:1.4em;line-height:1.6}
.sortbins{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bin{border:2px solid var(--ink);border-radius:12px;padding:6px;display:flex;flex-direction:column;gap:6px;background:var(--card)}
.bin>b{font-size:.78rem;line-height:1.4}
.binitems,.pool{display:flex;flex-wrap:wrap;gap:6px}
.pool{margin-top:2px}
.choice.mini{padding:4px 10px;min-height:40px;font-size:.88rem}
.putbtn{min-height:40px;font-size:.82rem;padding:2px 6px}
.sheetov{position:fixed;inset:0;background:rgba(10,16,40,.55);z-index:70;display:flex;align-items:flex-end;justify-content:center}
.sheet{position:relative;background:var(--paper);border:3px solid var(--ink);border-bottom:none;border-radius:22px 22px 0 0;width:min(100%,520px);padding:12px 16px calc(16px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:8px;animation:sheetup .22s ease-out;outline:none;max-height:92dvh;overflow-y:auto}
@keyframes sheetup{from{transform:translateY(60px);opacity:0}to{transform:none;opacity:1}}
.grab{align-self:center;width:44px;height:5px;border-radius:3px;background:var(--line)}
.sheetx{position:absolute;right:8px;top:8px;width:44px;height:44px;border:none;background:none;font-size:1.6rem;font-weight:900;color:var(--muted);cursor:pointer}
.sheet h2{margin:0;font-size:1.05rem;line-height:1.5;padding-right:40px}.sheet .qn{margin:6px 0 0}
.sheet .prog{margin:0;font-weight:900;color:var(--act)}.sheet .prog small{color:var(--muted);font-weight:700}
.sheet .confirm{margin:8px 0;font-weight:900;font-size:1.05rem;line-height:1.7;text-align:center}
.redo{display:block;font-size:.65rem;font-weight:700;color:var(--muted)}
@media (prefers-reduced-motion: reduce){.sheet{animation:none}}
@media (max-width:340px){.sortbins{grid-template-columns:1fr}.res{font-size:.7rem;padding:2px 3px}.abscol .lt{font-size:.72rem}}
.btnrow.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.btnrow.grid3 .toggle{font-size:.88rem;padding:6px 2px;min-height:52px}

/* 単元トップ:← 単元一覧 / 単元名の併記 */
.backunits{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border:2px solid var(--line);border-radius:12px;background:var(--card);font-weight:900;font-size:.86rem;text-decoration:none;color:var(--ink);white-space:nowrap}
.tophd .brand span{display:none}
.unitname{color:var(--act)}.unitname i{font-style:normal;margin:0 .3em;color:var(--muted)}

/* ふしぎ2改修(提案011):ぼかし写真・色の輪・ベン図・暗記シートの穴うめ・まとめの文 */
.photo img.blur{filter:blur(12px);transform:scale(1.08)}
.photo{overflow:hidden}
.pulse{animation:wpulse 1s ease-in-out 3}
@keyframes wpulse{50%{opacity:.55}}
.vmask{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.vmask canvas{width:min(100%,300px);height:auto;aspect-ratio:360/260;background:#F4F6FB;border:2px solid var(--line)}
.mlead{display:block;margin-bottom:4px}
.mvis{margin-top:4px}
.hook{background:var(--hl);color:#1B2559;border-radius:12px;padding:8px 12px;font-weight:900;line-height:1.7}
.sh3{display:flex;flex-direction:column;gap:6px}
.sh3 svg{max-height:200px}
.mask{background:#8A93B5!important}
.mask[aria-pressed="true"]{background:var(--hl)!important}
.wvis{height:150px!important;padding:0!important;margin-top:6px}
.devbadge{background:#FFE14D;color:#1B2559;font-weight:900;font-size:.78rem;border-radius:8px;padding:4px 10px;margin:6px 0}
.choice .cico{display:inline-flex;vertical-align:middle;margin-right:8px;flex:none}
.choice .cico svg{display:block;border-radius:4px}
@media (prefers-reduced-motion: reduce){.itemsvg *{transition:none!important}}

/* LINEボタンの下(提案016):届くものの約束・アカウント名とID・QRの案内 */
.lineinfo{background:var(--card);border:2px solid var(--line);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column;gap:2px}
.lineinfo p{margin:0;font-size:.82rem;font-weight:700;line-height:1.7}
.lineinfo .lineid{font-weight:900}
.lineinfo .lineqr{color:var(--muted);font-weight:700}
.shnote{margin:-2px 2px 4px;font-size:.78rem;font-weight:700;color:var(--muted);line-height:1.6}
.done .shnote{text-align:center}
.doneat{font-size:.74rem;color:var(--ok);font-weight:900;margin-left:auto;margin-right:8px}
.cardact{display:block;margin-top:4px;font-weight:900;color:var(--act);font-size:.86rem;text-align:right}
.dotn{flex:0 0 100%;text-align:right;font-size:.7rem;font-weight:900;color:var(--muted);line-height:1}
.cardprog{display:block;margin-top:2px;font-size:.78rem;font-weight:700;color:var(--act)}
.plegend{position:absolute;left:6px;bottom:6px;display:flex;flex-wrap:wrap;gap:4px;z-index:2}
.plegend span{display:inline-flex;align-items:center;gap:4px;background:rgba(15,22,48,.82);color:#fff;font-size:.74rem;font-weight:900;border-radius:999px;padding:1px 9px 1px 4px}
.plegend i{display:inline-block;width:12px;height:12px;border-radius:50%;border:1.5px solid #fff}
.expvis{height:150px!important;padding:0!important}
.memo li.memonote{counter-increment:none;background:var(--hl);color:#1B2559;border-color:var(--ink);padding-left:12px}
.memo li.memonote::before{display:none}
/* ひかりパクパク(グミとネコ)の紙タブ:O1 light-path */
.svglbl.gsmall{font-size:11px}
.svglbl.pak{font-size:15px;font-weight:900;paint-order:stroke;stroke:#fff;stroke-width:4px}
.btnrow.ptabs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.ptab{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 2px 4px;min-height:64px;font-size:.86rem}
.ptab i{display:block;width:26px;height:18px;border-radius:4px;background:var(--pc);border:2px solid var(--ink)}
.ptab .advbadge{margin:0;font-style:normal;font-size:.62rem;padding:0 6px;line-height:1.5}
.ptab .ck{position:absolute;top:-7px;right:-5px;min-width:20px;height:20px;border-radius:50%;background:var(--ok);color:#fff;font-size:.72rem;line-height:20px;text-align:center}
.ptab .ck:empty{display:none}
.ptab[aria-pressed="true"]{background:#FFF6D6;color:var(--ink);border-color:var(--act)}
@media (max-width:360px){.ptab{font-size:.74rem}.ptab i{width:22px}}
.ptab.blink{animation:tabblink 1s ease-in-out infinite;border-color:var(--act)}
@keyframes tabblink{50%{box-shadow:0 0 0 5px rgba(224,97,42,.35);background:#FFF0E6}}
/* O2 インクを重ねる */
.btnrow.inkbtns{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.btnrow.inkbtns .toggle{min-height:48px;font-size:.9rem;padding:6px 2px}
.btnrow.inkbtns .toggle:disabled{opacity:1;cursor:default}
.inkrow{display:flex;align-items:flex-start;gap:8px;margin:8px 0 2px}
.inkrow .inkreset{flex:none;min-height:40px;padding:4px 12px}
.goals{list-style:none;margin:0;padding:0;flex:1;display:flex;flex-wrap:wrap;gap:4px}
.goals li{font-size:.8rem;font-weight:900;border:2px dashed var(--line);border-radius:999px;padding:1px 10px;color:var(--muted);background:var(--card);line-height:1.6}
.goals li.on{border:2px solid var(--ok);color:var(--ok)}
.goals li b{margin-right:2px}
/* V2 光とインクの比較 */
.gcmp{display:grid;grid-template-columns:1fr 54px 1fr;gap:6px;align-items:start;width:100%;height:100%}
.gcmp figure{margin:0;display:flex;flex-direction:column;align-items:stretch;gap:4px;min-width:0}
.gcsvg{width:100%;height:auto;display:block}
.gcmp figcaption{font-size:.78rem;text-align:center;font-weight:700}.gcmp figcaption b{margin-right:4px;font-size:.9rem}
.gcbtn{min-height:44px;font-size:.8rem;padding:4px}
.gcgauge{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:.66rem;font-weight:900;color:var(--muted);height:100%;padding-bottom:20px}
.gbar{position:relative;flex:1;width:16px;border-radius:8px;border:2px solid var(--ink);background:linear-gradient(#fff,#1A1A1A);min-height:80px}
.gbar i{position:absolute;font-style:normal;font-size:.62rem;font-weight:900;line-height:1;padding:2px 4px;border-radius:6px;background:var(--hl);color:var(--ink);transform:translateY(-50%);transition:top .45s ease;white-space:nowrap}
.gbar .gml{right:18px}.gbar .gmi{left:18px;background:#E9DDFB}
.stage:has(.gcmp){flex-direction:column}
.gcnote{margin:4px 0 0;font-size:.8rem;font-weight:700;text-align:center}
@media (prefers-reduced-motion: reduce){.gbar i{transition:none}.ptab.blink{animation:none}}
/* 仕分け(instant) */
.dropbin{cursor:pointer;transition:background .2s}
.dropbin.ready{background:#FFF6D6;border-color:var(--act)}
.sortcard{touch-action:none;user-select:none;-webkit-user-select:none}
.sortcard.dragging{opacity:.35}
.dragghost{position:fixed;z-index:50;pointer-events:none;transform:translate(-50%,-60%) rotate(-4deg);box-shadow:0 6px 18px rgba(27,37,89,.25)}
.sortcard.pop{animation:cardpop .4s ease-out}
@keyframes cardpop{0%{transform:scale(.6)}70%{transform:scale(1.12)}100%{transform:scale(1)}}
.sortcard.shake{animation:cardshake .4s ease-in-out}
@keyframes cardshake{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
@media (prefers-reduced-motion: reduce){.sortcard.pop,.sortcard.shake{animation:none}}
/* 説明してみよう:言えた言葉にチェック */
.pwcheck{padding:8px 14px}.pwcheck[open]{padding-bottom:12px}.pwcheck .pwbtn{width:100%;margin-top:6px}.pwcheck .lbl{margin:4px 0 0}
.pwbtn{display:flex;align-items:center;gap:8px;text-align:left;min-height:44px;padding:6px 10px;border-radius:12px;border:2px solid var(--line);background:var(--card);font-weight:700;cursor:pointer}
.pwbtn i{flex:none;width:22px;height:22px;border-radius:6px;border:2px solid var(--ink);display:grid;place-items:center;font-style:normal}
.pwbtn[aria-pressed="true"]{border-color:var(--ok);background:#E8F8EE}
.pwbtn[aria-pressed="true"] i{background:var(--ok);border-color:var(--ok)}
.pwbtn[aria-pressed="true"] i::after{content:'✓';color:#fff;font-size:.8rem;font-weight:900}
/* まとめカード(eatTable) */
.eatcard{background:var(--card);border:2px solid var(--line);border-radius:14px;padding:8px 8px 10px}
.eatcard h3{margin:0 0 4px;font-size:1rem;text-align:center}
.ettools{display:flex;justify-content:flex-end;margin-bottom:4px}.ettools .ghost{min-height:36px;padding:2px 12px;font-size:.82rem}
.eattable{width:100%;border-collapse:collapse;font-size:.8rem}
.eattable th,.eattable td{padding:3px 2px;border-bottom:1px dashed var(--line);text-align:center;vertical-align:middle}
.eattable thead th{font-size:.7rem;color:var(--muted);font-weight:900}
.eattable tbody th{text-align:left;white-space:nowrap;font-weight:900}
.etchip{display:inline-block;width:14px;height:14px;border-radius:4px;border:2px solid var(--ink);background:var(--c);vertical-align:-2px;margin-right:4px}
.etsvg{display:inline-block;vertical-align:middle}
.etnone{color:var(--muted);font-size:.72rem;font-weight:700}
.eattable td small{display:block;font-size:.62rem;color:var(--muted);line-height:1}
.etmask{min-height:30px;margin:0;padding:0 4px;font-size:.76rem}
.etmask[aria-pressed="true"]{background:transparent!important}
.etlook{display:inline-block;padding:1px 8px;border-radius:999px;border:2px solid var(--ink);background:var(--c);color:#1B2559;line-height:1.5}
.etlook.dk{color:#fff}
@media (max-width:380px){.eattable{font-size:.72rem}.etlook{padding:1px 4px}}
/* 写真スロット:比率は :root の2つの定数で決める。1枚=--photo-ratio(7:5、素材 1400×1000px)/2枚並び=--photo-ratio-pair(2:3、素材 1000×1500px) */
.photo{width:100%;height:100%;display:flex;align-items:center;justify-content:center;gap:6px;container-type:size;background:none;border:none;border-radius:0}
.photo figure{flex:none!important;aspect-ratio:var(--photo-ratio);width:min(100cqw,100cqh * var(--photo-ratio));height:auto;position:relative;overflow:hidden}
.photo.multi figure{aspect-ratio:var(--photo-ratio-pair);width:min((100cqw - 6px) / 2,100cqh * var(--photo-ratio-pair))}   /* 2枚並びは縦長(2:3)。素材は 1000×1500px */
.photo figure img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;min-height:0}
.photo figure img.crop{inset:auto;object-fit:cover}
.photo figure img.contain{object-fit:contain;background:var(--card)}
.photo figure .ph{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.photo figure .ph[hidden]{display:none}
/* 用語バー(光・吸収・反射):ヘッダーの下に固定。タップしない表示だけ */
.termbar{flex:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:4px 8px;background:var(--paper);border-bottom:1px dashed var(--line)}
.term{border:2px solid var(--line);border-radius:10px;background:var(--card);padding:1px 6px;line-height:1.25;transition:background .25s,border-color .25s,box-shadow .25s}
.term b{display:block;font-size:.92rem;font-weight:900;line-height:1.35}
.term .ta{display:block;font-size:.7rem;font-weight:900;line-height:1.3}
.term small{display:block;font-size:.56rem;font-weight:700;color:var(--muted);line-height:1.3}
.term.on{border-color:var(--act);background:#FFF0D6;box-shadow:0 0 0 3px rgba(224,97,42,.25)}
.term.on b{color:var(--act)}
.term.flash{animation:termflash .7s ease-out}
@keyframes termflash{0%{background:var(--hl);border-color:var(--act)}100%{background:var(--card)}}
@media (prefers-reduced-motion: reduce){.term.flash{animation:none}.term{transition:none}}
.eattable thead th small{display:block;font-size:.58rem;font-weight:700}
.term{min-width:0;overflow-wrap:anywhere}
@media (max-width:400px){.termbar{gap:3px;padding:3px 4px}.term{padding:1px 4px}.term b{font-size:.84rem}.term .ta{font-size:.64rem}.term small{font-size:.52rem}}
