/* 数学ドック（試作）
   見守る人（.p）：紙の診断書のような、落ち着いた見た目
   本人（.k）　　：すっきりした学習アプリ。子どもっぽくしない。端末の明るい／暗い設定に合わせる
   本人の画面はスマホ縦1画面・スクロールなしを基本に */

:root {
  --brand: #3b4ccf;
  /* 見守る人 */
  --p-bg: #f3efe6; --p-paper: #fffdf8; --p-ink: #22303f; --p-sub: #6b7682; --p-line: #e2dccf;
  --p-accent: #1e5a6b; --p-accent-ink: #fff; --p-soft: #e3eef0; --p-red: #b23b2b; --p-red-soft: #f8e6e1; --p-ok: #2d7a4a; --p-ok-soft: #e2f1e7; --p-gold: #b0892f;
  /* 本人（絵の色とそろえる：art/01_style_guide.md） */
  --navy: #17203A; --cream: #F6F2E8; --orange: #C8641F; --blue: #2F6FB5; --gold: #E3A83B; --paper-line: #E2DBCB; --sub: #6B7185;
}
@media (prefers-color-scheme: dark) {
  :root {
    --p-bg: #171a1f; --p-paper: #20242b; --p-ink: #e9ecef; --p-sub: #a0a9b3; --p-line: #353b44;
    --p-accent: #5fb3c6; --p-accent-ink: #0d1a1f; --p-soft: #1c3037; --p-red: #f08a78; --p-red-soft: #3a211d; --p-ok: #6fcf94; --p-ok-soft: #1a3324; --p-gold: #d9b45a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--p-bg); color: var(--p-ink); font: 16px/1.6 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; -webkit-text-size-adjust: 100%; }
body:has(#app.k2) { background: var(--cream); }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }
input, select { font: inherit; font-size: 17px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--p-line); background: var(--p-paper); color: var(--p-ink); width: 100%; margin-top: 4px; }
.center { text-align: center; }
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 2px; line-height: 1.15; font-size: .88em; }
.fr > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 3px; }
.fr > span:last-child { padding: 0 3px; }
/* 式の見た目（js/dock/mathtext.js）：式のまとまりは折り返さない、文字は斜体、√ の中身に横線 */
.mx { white-space: nowrap; }
i.v { font-family: "Times New Roman", "Noto Serif", serif; font-style: italic; font-size: 1.1em; line-height: 1; padding: 0 .05em 0 .02em; }
.rt { white-space: nowrap; }
.rad { border-top: 1.3px solid currentColor; padding: 0 .12em 0 .08em; margin-left: -.06em; }
/* 日本語の文の折り返し：1文字だけ次の行に残るのを減らす（使えるブラウザだけ） */
.qtext, .pflines, .pfo, .pfc, .choice, .tx, .ptext { line-break: strict; word-break: auto-phrase; text-wrap: pretty; }
.logo { flex: none; display: block; }
@keyframes pop { 0% { transform: scale(.97); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ============ はじめて ============ */
.welcome { justify-content: center; }
.wl-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.wl-logo b { display: block; font-size: 24px; letter-spacing: .04em; }
.wl-logo span { color: var(--p-sub); font-size: 14px; }
.wl-logo em { display: block; font-style: normal; font-weight: 700; font-size: 15px; line-height: 1.5; color: var(--p-ink); margin: 2px 0; }
.kidbtn { background: var(--brand) !important; color: #fff !important; }

/* ============ 見守る人 ============ */
.p { background: var(--p-bg); }
.pbar { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--p-paper); border-bottom: 1px solid var(--p-line); position: sticky; top: 0; z-index: 2; }
.pt { font-weight: 700; font-size: 16px; font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; letter-spacing: .04em; }
.pback { border: none; background: none; font-size: 26px; line-height: 1; padding: 0 6px 2px 0; color: var(--p-accent); }
.pbody { flex: 1; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.plead { margin: 0; color: var(--p-sub); font-size: 14px; }
.pnote { color: var(--p-sub); font-size: 12.5px; margin: 0; }
.perr { color: var(--p-red); font-size: 13.5px; margin: 0; }
.plabel { font-size: 13px; color: var(--p-sub); }
.pbtn { border: none; background: var(--p-accent); color: var(--p-accent-ink); border-radius: 12px; padding: 14px; font-weight: 700; font-size: 16px; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.pbtn[disabled] { opacity: .35; box-shadow: none; }
.psub { border: 1px solid var(--p-line); background: var(--p-paper); border-radius: 10px; padding: 11px; font-size: 14.5px; }
.psub.danger { color: var(--p-red); }
.child { border: 1px solid var(--p-line); background: var(--p-paper); border-radius: 14px; padding: 13px 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 4px rgba(60, 50, 30, .05); }
.ch-t { display: flex; align-items: center; gap: 8px; }
.ch-t b { font-size: 18px; }
.child > span { font-size: 13.5px; color: var(--p-sub); }
.child .wait { color: var(--p-gold); }
.child .tasks { color: var(--p-accent); font-weight: 600; }
.new { font-size: 11.5px; background: var(--p-red); color: #fff; border-radius: 999px; padding: 0 8px; font-weight: 700; }
.kid { background: var(--p-paper); border: 1px solid var(--p-line); border-radius: 14px; padding: 12px 14px; }
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 14px; }
.stat dt { color: var(--p-sub); }
.stat dd { margin: 0; font-weight: 600; }
.notice { border: 1.5px solid var(--p-red); background: var(--p-red-soft); color: var(--p-red); border-radius: 14px; padding: 12px 14px; text-align: left; display: flex; flex-direction: column; animation: pop .4s ease-out; }
.notice.quiet { border-color: var(--p-line); background: var(--p-paper); color: var(--p-ink); animation: none; }
.notice b { font-size: 15.5px; }
.notice span { font-size: 13px; }
.plist { display: flex; flex-direction: column; background: var(--p-paper); border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; }
.plist button { border: none; border-bottom: 1px solid var(--p-line); background: none; text-align: left; padding: 12px 14px; display: flex; align-items: center; gap: 8px; }
.plist button:last-child { border-bottom: none; }
.plist button::after { content: "›"; color: var(--p-sub); font-size: 20px; }
.plist b { font-weight: 600; font-size: 15px; white-space: nowrap; }
.plist span { margin-left: auto; color: var(--p-sub); font-size: 12.5px; text-align: right; }
.pgrp { font-size: 12.5px; color: var(--p-sub); font-weight: 700; margin-top: 2px; }
.pchecks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pchk { display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--p-line); background: var(--p-paper); border-radius: 10px; padding: 9px 10px; font-size: 13.5px; line-height: 1.35; }
.pchk i { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--p-line); flex: none; }
.pchk.on { border-color: var(--p-accent); background: var(--p-soft); font-weight: 700; }
.pchk.on i { background: var(--p-accent); border-color: var(--p-accent); box-shadow: inset 0 0 0 3px var(--p-paper); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; border: 1px solid var(--p-line); background: var(--p-paper); border-radius: 10px; padding: 9px 6px; font-size: 14px; }
.seg button.on { border: 2px solid var(--p-accent); background: var(--p-soft); font-weight: 700; padding: 8px 5px; }
.seg.kinds button { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.seg.kinds b { font-size: 15px; }
.seg.kinds span { font-size: 10.5px; color: var(--p-sub); line-height: 1.3; }
.bigcode { font-size: 32px; font-weight: 800; letter-spacing: .12em; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--p-accent); margin: 8px 0; }
.tasks { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.tasks li { display: flex; flex-direction: column; padding: 7px 0; border-bottom: 1px dotted var(--p-line); }
.tasks li small { display: block; color: var(--p-sub); font-size: 12.5px; }
.tasks li em { font-style: normal; font-size: 12px; color: var(--p-sub); }
.tasks.done li { opacity: .75; }
.doc h5 { margin: 12px 0 2px; font-size: 12.5px; color: var(--p-sub); }
/* 診断書 */
.doc { background: var(--p-paper); border: 1px solid var(--p-line); border-radius: 6px; padding: 16px; box-shadow: 0 2px 10px rgba(60, 50, 30, .06); }
.doc h4 { margin: 0 0 6px; font-size: 14px; color: var(--p-accent); letter-spacing: .05em; }
.doc p { margin: 0 0 8px; }
.dochead { border-bottom: 2px solid var(--p-ink); padding-bottom: 8px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.docttl { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.docmeta { font-size: 13px; color: var(--p-sub); }
.docrow { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; font-size: 14px; padding: 5px 0; border-bottom: 1px dotted var(--p-line); }
.docrow .dk { color: var(--p-sub); font-size: 12.5px; padding-top: 2px; }
.docrow small { display: block; color: var(--p-sub); font-size: 12px; }
.uchip { display: inline-block; font-size: 12.5px; background: var(--p-soft); color: var(--p-accent); border-radius: 6px; padding: 1px 7px; margin: 1px 4px 1px 0; }
.finding { margin: 12px 0; padding: 12px; background: var(--p-soft); border-left: 4px solid var(--p-accent); border-radius: 4px; }
.finding p { margin: 0; font-size: 15px; }
.cause { border-top: 1px solid var(--p-line); padding: 12px 0 4px; }
.ch { display: flex; align-items: center; gap: 8px; }
.ch h3 { margin: 0; font-size: 16.5px; flex: 1; line-height: 1.4; }
.rank { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--p-accent); color: var(--p-accent); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.certain { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; margin: 6px 0; }
.certain .pnote { font-weight: 400; width: 100%; }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 16px; height: 8px; border-radius: 2px; background: var(--p-line); }
.meter i.on { background: var(--p-red); }
.evt { width: 100%; border-collapse: collapse; font-size: 14px; margin: 4px 0; }
.evt th { font-size: 11.5px; color: var(--p-sub); font-weight: 600; text-align: left; border-bottom: 1px solid var(--p-line); padding: 3px 4px; }
.evt td { padding: 6px 4px; border-bottom: 1px dotted var(--p-line); vertical-align: middle; }
.evt td.x { color: var(--p-red); font-weight: 700; }
.evt td.o { color: var(--p-ok); font-weight: 700; }
.evt.karte td small { display: block; color: var(--p-sub); font-size: 11.5px; }
.dl { margin: 8px 0 0; font-size: 14px; }
.dl dt { font-size: 12px; color: var(--p-sub); font-weight: 700; margin-top: 6px; }
.dl dd { margin: 2px 0 0; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.arrow { color: var(--p-sub); margin: 0 4px; }
.roots, .plan, .ask { border-top: 1px solid var(--p-line); padding-top: 12px; margin-top: 8px; font-size: 14px; }
.roots ul, .ask ul { margin: 0; padding-left: 18px; }
.roots li, .ask li { margin: 3px 0; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--p-line); }
.tl li { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 13.5px; position: relative; }
.tl li i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--p-line); background: var(--p-paper); flex: none; z-index: 1; }
.tl li.on i { background: var(--p-ok); border-color: var(--p-ok); }
.tl li.re i { border-color: var(--p-gold); background: var(--p-gold); border-radius: 3px; }
.tl li em { margin-left: auto; font-style: normal; color: var(--p-sub); font-size: 12px; white-space: nowrap; }
.fine { font-size: 11.5px; color: var(--p-sub); margin: 12px 0 0 !important; border-top: 1px solid var(--p-line); padding-top: 8px; }
.badge { font-size: 12px; border-radius: 999px; padding: 1px 9px; background: var(--p-red-soft); color: var(--p-red); white-space: nowrap; }
.badge.ok { background: var(--p-ok-soft); color: var(--p-ok); }
.hist { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.hist li { padding: 6px 0; border-bottom: 1px dotted var(--p-line); display: flex; flex-direction: column; }
.plink { border: none; background: none; padding: 0; color: var(--p-accent); text-decoration: underline; text-align: left; font-weight: 600; font-size: inherit; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 13px; color: var(--p-sub); }
.about p, .about ol, .about ul { font-size: 14.5px; margin: 0 0 10px; }
.about .catch { font-size: 18px; font-weight: 800; line-height: 1.55; letter-spacing: .02em; margin: 0 0 4px; }
.steps3 { list-style: none; padding: 0; margin: 4px 0 12px; counter-reset: s; display: flex; flex-direction: column; gap: 8px; }
.steps3 li { counter-increment: s; display: grid; grid-template-columns: 28px minmax(0, 1fr); font-size: 14.5px; }
.steps3 li::before { content: counter(s); grid-row: 1 / 3; width: 22px; height: 22px; border-radius: 50%; background: var(--p-accent); color: var(--p-accent-ink); font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-top: 2px; }
.steps3 span { color: var(--p-sub); font-size: 12.5px; }

/* ============ 本人（第4版：ノートの中の調査） ============ */
.k2 { background-color: var(--cream); background-image: linear-gradient(rgba(47,111,181,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(47,111,181,.07) 1px, transparent 1px); background-size: 18px 18px; color: var(--navy); font-family: "Zen Kaku Gothic New", system-ui, -apple-system, "Hiragino Sans", sans-serif; }
.k2.fit { height: 100dvh; min-height: 0; }
.k2 .kmain { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 0 0 12px; min-height: 0; }
.k2.fit .kmain { overflow: auto; }
.k2.scrollmain .kmain { overflow: auto; }
.k2 h1.h1 { font-family: "Zen Kaku Gothic New", system-ui, sans-serif; font-size: 23px; font-weight: 900; margin: 0; line-height: 1.35; }
.k2 .h2 { font-family: "Zen Kaku Gothic New", system-ui, sans-serif; font-size: 20px; font-weight: 900; margin: 0; }
.k2 .sub { font-size: 12.5px; color: var(--sub); margin: 0; }
.k2 .tx { font-size: 14.5px; line-height: 1.7; margin: 0; }
.k2 .tx.small { font-size: 13.5px; }
.mini { margin: 2px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.6; }
.pad16 { padding: 12px 16px 0; }
.col8 { display: flex; flex-direction: column; gap: 8px; }
.col4 { display: flex; flex-direction: column; gap: 2px; }
.row8 { display: flex; align-items: center; gap: 8px; }
.row8.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.btn { border: none; border-radius: 14px; padding: 14px; font: inherit; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn[disabled] { opacity: .4; }
.btn.orange { background: var(--orange); color: #fff; box-shadow: 0 3px 0 #9c4b14; }
.btn.navy { background: var(--navy); color: var(--cream); margin: 0 16px; }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.ghost-w { background: transparent; color: var(--cream); border: 1.5px solid var(--cream); }
.btn.danger { color: #B23B2B; border-color: #B23B2B; }
.btn.grow { flex: 1; margin: 0; }
.btn-t { width: 30px; }
.link { border: none; background: none; color: var(--blue); text-decoration: underline; padding: 0; font: inherit; font-size: inherit; }
.tiny { border: none; background: none; color: var(--sub); font-size: 11.5px; text-decoration: underline; align-self: center; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: auto 16px 0; }
.foot { display: flex; align-items: flex-end; gap: 10px; margin: auto 16px 0; }
.face { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(23,32,58,.2); flex: none; background: #fff; }
/* 上の帯・下のナビ */
.ktop { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 16px 4px; }
.kicon { width: 30px; height: 30px; border-radius: 8px; }
.kicon.big { width: 56px; height: 56px; border-radius: 14px; }
.kttl { font-family: "Zen Kaku Gothic New", system-ui, sans-serif; font-weight: 900; font-size: 16px; margin-right: auto; }
.pill { display: flex; align-items: center; gap: 3px; background: #fff; border-radius: 999px; padding: 3px 10px 3px 5px; font-weight: 700; font-size: 13px; box-shadow: 0 1px 0 var(--paper-line); color: var(--navy); text-decoration: none; }
.pill-t { width: 28px; height: 21px; object-fit: contain; }
.pill-f { width: 16px; height: 20px; object-fit: contain; }
.kmore { color: var(--sub); display: flex; padding: 4px; }
.knav { display: flex; background: #fff; border-top: 1px solid var(--paper-line); padding-bottom: env(safe-area-inset-bottom); }
.knav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; font-size: 10.5px; font-weight: 700; color: #8A8FA0; text-decoration: none; }
.knav a.on { color: var(--navy); }
/* ホーム */
.hero { position: relative; height: 34dvh; min-height: 210px; max-height: 300px; margin: 0 16px; }
.hero-p { position: absolute; left: -8px; bottom: -6px; height: 105%; filter: drop-shadow(0 6px 10px rgba(23,32,58,.15)); animation: bob 4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.note { position: absolute; right: 0; top: 8%; width: 52%; background: #FFF6C9; padding: 11px 13px; font-family: "Zen Kaku Gothic New", system-ui, sans-serif; font-weight: 700; font-size: 14.5px; line-height: 1.55; transform: rotate(2deg); box-shadow: 0 6px 14px rgba(23,32,58,.12); animation: stick .5s ease-out; }
@keyframes stick { from { transform: rotate(8deg) translateY(-10px); opacity: 0; } }
.hints { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 8px; }
.hintbox { width: 60px; height: 60px; border-radius: 16px; background: rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center; position: relative; }
.hintbox img { width: 50px; }
.hintbox span { position: absolute; font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 900; font-size: 22px; }
.sil { filter: brightness(0) opacity(.22); }
.dim { filter: grayscale(.9) opacity(.55); }
.today { margin: 0 16px; background: var(--navy); color: var(--cream); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 24px rgba(23,32,58,.25); }
.today.done { background: #2B3553; }
.today-h { display: flex; align-items: baseline; gap: 8px; }
.today-h b { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 21px; font-weight: 900; }
.today-h span { font-size: 13px; opacity: .8; }
.today-t { font-size: 13px; line-height: 1.6; opacity: .92; }
.today-t b { color: var(--gold); }
.task { margin: 0 16px; background: #fff; border: none; border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; text-align: left; font: inherit; color: var(--navy); box-shadow: 0 1px 0 var(--paper-line); flex-wrap: wrap; }
.task.hot { border: 2px solid var(--orange); }
.task .tag { font-size: 11px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 6px; padding: 2px 7px; }
.task b { font-size: 14px; }
.task .from { font-size: 12px; color: var(--sub); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task { flex-wrap: nowrap !important; white-space: nowrap; }
.pill.add { color: var(--blue); padding: 3px 9px; }
.wk { display: flex; margin: 2px 16px 0; }
.wk-d { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wk-d i { width: 30px; height: 30px; border-radius: 9px; background: #fff; border: 1.5px solid #DDD5C4; display: flex; align-items: center; justify-content: center; font-style: normal; color: #fff; font-weight: 900; font-size: 13px; }
.wk-d.on i { background: var(--orange); border-color: var(--orange); animation: pop .3s ease-out; }
.wk-d span { font-size: 10.5px; color: var(--sub); }
.wk-note { margin: 0; text-align: center; font-size: 12px; color: var(--sub); }
.install { margin: 0 16px; font-size: 12.5px; color: var(--blue); text-decoration: none; background: #fff; border-radius: 12px; padding: 8px 12px; text-align: center; }
/* 相棒を選ぶ */
.starters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 16px; flex: 1; align-content: center; }
.starter { border: 2px solid transparent; background: #fff; border-radius: 18px; padding: 8px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; color: var(--navy); box-shadow: 0 2px 0 var(--paper-line); }
.starter img { width: 100%; height: 190px; object-fit: contain; }
.starter b { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 17px; }
.starter span { font-size: 11.5px; color: var(--sub); text-align: center; }
.starter:active { border-color: var(--orange); }
/* 問題 */
.qhead { display: flex; align-items: center; gap: 10px; padding: calc(14px + env(safe-area-inset-top)) 16px 4px; }
.qt { font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 900; font-size: 15px; white-space: nowrap; }
/* 問題の画面の「×（やめて戻る）」と「前へ」。答えは1問ずつ保存されているので、やめても消えない */
.qx { flex: none; width: 34px; height: 34px; margin-left: -6px; border: none; border-radius: 50%; background: transparent; color: var(--sub); display: flex; align-items: center; justify-content: center; }
.qx:active { background: #EEE7D8; }
.qback { flex: none; border: 1px solid #DDD5C4; background: #fff; color: var(--navy); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; }
/* 見直し（提出の前） */
/* 練習の難しさ */
.lvchips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--sub); }
.lvc { border: 1px solid #DDD5C4; background: #fff; color: var(--navy); border-radius: 999px; padding: 4px 11px; font-size: 13px; }
.lvc.on { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.review { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--navy); }
.review li { background: #fff; border-radius: 10px; padding: 6px 10px; }
.review .rq { display: block; color: var(--sub); font-size: 12.5px; }
.foot.col8 { flex-direction: column; align-items: stretch; margin-bottom: 12px; }
.qn { font-size: 13px; color: var(--sub); }
.segs { display: flex; gap: 4px; flex: 1; }
.segs i { flex: 1; height: 6px; border-radius: 3px; background: #DDD5C4; }
.segs i.d { background: var(--orange); }
.segs i.c { background: var(--orange); opacity: .4; }
.qcard { margin: 4px 16px 0; flex: 1; min-height: 0; background: #fff; border-radius: 18px; box-shadow: 0 2px 0 var(--paper-line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; overflow: auto; }
.qcard.small { flex: none; padding: 10px; }
.qsub { font-size: 12px; color: var(--sub); }
.qtext { font-size: 25px; font-weight: 700; line-height: 1.6; }
.qcard.small .qtext { font-size: 18px; }
.k2 .ansbox { margin: 0 16px; border-radius: 14px; min-height: 54px; font-size: 26px; display: flex; align-items: center; justify-content: center; font-weight: 700; background: #fff; border: 2px solid var(--orange); color: var(--navy); }
.k2 .ansbox.empty { color: var(--sub); font-size: 15px; font-weight: 400; border-style: dashed; border-color: #D6CDB9; }
.k2 .hint { font-size: 11px; color: var(--sub); text-align: center; margin: 0; }
.k2 .pad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 16px; }
.k2 .pad button { height: 50px; border-radius: 12px; border: 1px solid #DDD5C4; background: #fff; color: var(--navy); font: inherit; font-size: 22px; font-weight: 700; }
.k2 .pad button:active { background: #F0EADC; }
.k2 .pad button.ok { background: var(--orange); color: #fff; border: none; font-size: 15px; }
.k2 .pad button.dunno { font-size: 13px; color: var(--sub); }
.k2 .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 16px; }
.k2 .choice { border: 1px solid #DDD5C4; background: #fff; color: var(--navy); border-radius: 14px; min-height: 62px; font: inherit; font-size: 19px; font-weight: 700; padding: 6px; }
.k2 .choice.dunno { grid-column: 1 / -1; min-height: 42px; font-size: 14px; color: var(--sub); }
.k2.q .kmain { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
/* 出現（山1） */
.appear { position: relative; height: 36dvh; min-height: 220px; display: flex; align-items: center; justify-content: center; margin-top: calc(10px + env(safe-area-inset-top)); }
.appear .ring { position: absolute; width: 230px; height: 230px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 14px rgba(200,100,31,.12), 0 0 0 30px rgba(200,100,31,.06); animation: ring 1.2s ease-out; }
@keyframes ring { from { transform: scale(.4); opacity: 0; } }
.appear img { position: relative; width: 230px; }
.rise { animation: rise .9s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rise { 0% { transform: translateY(40px) scale(.6); filter: brightness(0) blur(6px); opacity: 0; } 55% { filter: brightness(0) blur(0); opacity: .8; } 100% { transform: none; filter: none; opacity: 1; } }
.fam { font-size: 11.5px; font-weight: 700; color: var(--navy); border-radius: 6px; padding: 2px 8px; }
.stages { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sub); background: #fff; border-radius: 12px; padding: 9px 12px; flex-wrap: wrap; }
.stages .on { color: var(--orange); font-weight: 700; }
.stages i { font-style: normal; }
.stages em { font-style: normal; margin-left: auto; }
/* ふりかえり */
.fb { margin: 6px 16px 0; display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 10px 14px; animation: pop .3s ease-out; }
.fb .face { width: 50px; height: 50px; }
.fb div { display: flex; flex-direction: column; }
.fb b { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 18px; font-weight: 900; }
.fb span { font-size: 13px; }
.fb.ok { background: #E3F1E6; color: #1F6B3C; }
.fb.ng { background: #FBE7E1; color: #9A3A26; }
.fb.meh { background: #F1ECDF; color: var(--navy); }
.ans { margin: 0 16px; font-size: 14px; color: var(--sub); }
.ans b { color: #1F6B3C; font-size: 19px; margin-left: 6px; }
.steps { margin: 0 16px; background: #fff; border-radius: 14px; padding: 10px 12px 10px 30px; font-size: 14.5px; box-shadow: 0 1px 0 var(--paper-line); }
.steps li { margin: 4px 0; }
.steps.big { font-size: 15px; line-height: 1.9; margin: 0; }
/* 調査結果（山2） */
.mons { display: flex; flex-direction: column; gap: 8px; margin: 0 16px; }
.mrow { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 9px 12px; box-shadow: 0 1px 0 var(--paper-line); animation: pop .35s ease-out backwards; }
.mrow:nth-child(2) { animation-delay: .1s; } .mrow:nth-child(3) { animation-delay: .2s; }
.mimg { width: 56px; height: 56px; border-radius: 14px; background: var(--cream); display: flex; align-items: center; justify-content: center; flex: none; }
.mimg img { width: 50px; }
.mbody { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mbody div:first-child { display: flex; align-items: baseline; gap: 6px; }
.mbody b { font-size: 15px; }
.mbody span { font-size: 11px; color: var(--sub); }
.gauge { display: flex; gap: 4px; }
.gauge i { width: 36px; height: 8px; border-radius: 4px; background: var(--paper-line); }
.gauge i.on { background: var(--orange); animation: fill .6s ease-out; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } }
.mnote { font-size: 11.5px !important; }
.reward { margin: 0 16px; background: var(--navy); color: var(--cream); border-radius: 18px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; animation: pop .4s ease-out; }
.reward img { width: 60px; }
.reward div { display: flex; flex-direction: column; }
.reward b { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 18px; }
.reward span { font-size: 12px; opacity: .85; }
.reward.badge { background: #fff; color: var(--navy); box-shadow: 0 1px 0 var(--paper-line); }
.reward.badge img { width: 44px; }
.reward.badge span { color: var(--sub); opacity: 1; }
/* 捕獲（山3） */
.k2.dark { background: var(--navy); color: var(--cream); }
.cap { position: relative; flex: 1; display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; overflow: hidden; }
.rays { position: absolute; left: 50%; top: 32%; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; background: repeating-conic-gradient(rgba(227,168,59,.16) 0deg 9deg, transparent 9deg 22deg); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cap-h { position: relative; text-align: center; padding-top: calc(18px + env(safe-area-inset-top)); }
.cap-h span { font-size: 12px; letter-spacing: .3em; color: var(--gold); font-weight: 700; }
.cap-h h1 { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 30px; font-weight: 900; margin: 2px 0 0; }
.cap-m { position: relative; display: flex; justify-content: center; }
.cap-m img { width: 230px; }
.pop { animation: popin .7s cubic-bezier(.2,1.4,.4,1); }
@keyframes popin { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }
.cap-card { position: relative; margin: 0 24px; background: var(--cream); color: var(--navy); border-radius: 18px; border: 3px solid var(--gold); padding: 12px 16px; display: flex; flex-direction: column; gap: 3px; }
.cap-card div { display: flex; align-items: baseline; gap: 8px; }
.cap-card div span { font-size: 12px; color: var(--sub); }
.cap-card div b { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 20px; }
.cap-days { font-size: 13.5px; margin-top: 2px; }
.cap-p { position: relative; margin: 0 24px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.cap-p img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cream); }
.cap-t { margin-left: auto; display: flex; align-items: center; gap: 3px; font-weight: 700; }
.cap-t img { width: 34px; height: auto; border: none; border-radius: 0; }
.cap .two { position: relative; }
/* チェックの発見 */
.finds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 16px; }
.find { background: #fff; border-radius: 16px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 1px 0 var(--paper-line); }
.find img { width: 100%; max-width: 80px; height: 80px; object-fit: contain; }
.find b { font-size: 12.5px; text-align: center; }
.find span { font-size: 10.5px; color: var(--sub); }
.rules { margin: 4px 0 0; background: #fff; border-radius: 14px; padding: 10px 14px 10px 30px; font-size: 14.5px; line-height: 1.8; }
/* 図鑑 */
.zhead { display: flex; align-items: baseline; justify-content: space-between; }
.bar { margin: 0 16px; height: 8px; border-radius: 4px; background: var(--paper-line); display: flex; }
.bar i { border-radius: 4px; background: var(--gold); }
.chips { display: flex; gap: 6px; padding: 0 16px; overflow-x: auto; flex: none; scrollbar-width: none; }
.chip { flex: none; font: inherit; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 6px 11px; background: #fff; color: var(--navy); border: none; box-shadow: 0 1px 0 var(--paper-line); }
.chip.on { background: var(--navy); color: var(--cream); }
.zgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 16px 8px; }
.zc { background: #fff; border: none; border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; font: inherit; color: var(--navy); box-shadow: 0 1px 0 var(--paper-line); position: relative; }
.zc img { width: 100%; max-width: 76px; height: 76px; object-fit: contain; }
.zc .zn { font-size: 10px; color: var(--sub); }
.zc b { font-size: 11.5px; text-align: center; line-height: 1.3; }
.zc em { position: absolute; top: 5px; right: 5px; font-style: normal; font-size: 9.5px; font-weight: 700; color: #fff; background: var(--orange); border-radius: 6px; padding: 0 5px; }
.zc.none, .zc.hint { background: rgba(255,255,255,.5); box-shadow: none; border: 1.5px dashed #D6CDB9; }
.zc.caught { border: 2px solid var(--gold); }
.sheet { position: fixed; inset: 0; background: rgba(23,32,58,.45); display: flex; align-items: flex-end; z-index: 5; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; } }
.sh-in { width: 100%; max-width: 520px; margin: 0 auto; background: var(--cream); border-radius: 22px 22px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; max-height: 85dvh; overflow: auto; animation: up .3s ease-out; }
@keyframes up { from { transform: translateY(40px); } }
.sh-in.center { align-items: center; text-align: center; }
.sh-in .btn.navy { margin: 6px 0 0; align-self: stretch; }
.sh-m { display: flex; justify-content: center; }
.sh-m img { width: 170px; }
/* ガチャ */
.tabs { display: flex; gap: 6px; padding: calc(4px) 16px 0; }
.tabs button { flex: 1; font: inherit; font-weight: 700; font-size: 13.5px; border: none; border-radius: 999px; padding: 8px; background: #fff; color: var(--navy); }
.tabs button.on { background: var(--navy); color: var(--cream); }
.gbox { position: relative; height: 27dvh; min-height: 170px; display: flex; align-items: center; justify-content: center; flex: none; }
.gring { position: absolute; width: 180px; height: 180px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 16px rgba(227,168,59,.15); }
.gcap { position: relative; width: 150px; animation: bob 3s ease-in-out infinite; }
.lineup { display: flex; justify-content: space-between; padding: 0 16px; gap: 4px; flex: none; overflow-x: auto; }
.mate { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 700; color: #8C90A0; flex: none; }
.mate img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; filter: brightness(0) opacity(.25); border: 2px solid #DDD5C4; }
.mate.own { color: var(--navy); }
.mate.own img { filter: none; border-color: var(--gold); }
.ginfo { margin: 0 16px; background: #fff; border-radius: 16px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; flex: none; }
.ginfo > div:first-child { display: flex; justify-content: space-between; }
.odds { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12px; columns: 2; }
.odds li { display: flex; justify-content: space-between; padding: 1px 6px 1px 0; }
.k2 .btn.orange { margin: 0 16px; flex: none; }
.got { width: 200px; animation: popin .7s cubic-bezier(.2,1.4,.4,1); }
.pals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 16px; }
.pal { background: #fff; border-radius: 16px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 1px 0 var(--paper-line); border: 2px solid transparent; }
.pal.on { border-color: var(--orange); }
.pal img { width: 100%; height: 150px; object-fit: contain; }
.pal b { font-family: "Zen Kaku Gothic New", sans-serif; }
/* 練習・設定 */
.plist2 { display: flex; flex-direction: column; gap: 6px; padding: 0 16px 10px; }
.sec { font-size: 12px; font-weight: 700; color: var(--sub); margin-top: 4px; }
.pu { background: #fff; border-radius: 12px; padding: 11px 14px; display: flex; justify-content: space-between; text-decoration: none; color: var(--navy); font-size: 15px; box-shadow: 0 1px 0 var(--paper-line); }
.card { background: #fff; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 0 var(--paper-line); border: none; font: inherit; color: var(--navy); text-align: left; }
.linkcard { text-decoration: none; font-weight: 700; font-size: 14.5px; }
.code { font-size: 30px; font-weight: 800; letter-spacing: .14em; text-align: center; font-family: ui-monospace, Menlo, monospace; color: var(--orange); }
.kv { width: 100%; height: 30dvh; object-fit: cover; }
@media (max-width: 380px) {
  .kttl { font-size: 0; width: 0; }
  .pill { font-size: 12px; padding: 2px 8px 2px 4px; }
}
@media (max-height: 700px) {
  .hero { height: 24dvh; min-height: 150px; }
  .note { font-size: 13px; padding: 8px 10px; width: 56%; }
  .today { padding: 11px 14px; gap: 6px; }
  .today-h b { font-size: 18px; }
  .k2 .btn { padding: 11px; font-size: 15px; }
  .task { padding: 7px 12px; }
  .wk-d i { width: 26px; height: 26px; }
  .k2 .kmain { gap: 7px; }
}
@media (max-height: 640px) {
  .k2 .pad button { height: 42px; font-size: 19px; }
  .qtext { font-size: 21px; }
  .k2 .ansbox { min-height: 44px; }
  .hero { height: 28dvh; min-height: 170px; }
  .wk-d i { width: 26px; height: 26px; }
  .appear { height: 30dvh; min-height: 170px; }
  .appear img, .cap-m img { width: 170px; }
  .appear .ring { width: 170px; height: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

/* 見守る人：第4版の追加 */
.mons-p { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mons-p li { display: flex; align-items: center; gap: 10px; }
.mons-p img { width: 48px; height: 48px; object-fit: contain; background: var(--p-bg); border-radius: 10px; }
.mons-p div { display: flex; flex-direction: column; font-size: 13.5px; }
.mons-p span { font-size: 12px; color: var(--p-sub); }
.locked { position: relative; border: 1px dashed var(--p-line); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.blurred { filter: blur(5px); user-select: none; }
.blurred p { margin: 4px 0; font-weight: 700; }
.lock-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: 13.5px; background: rgba(255,253,248,.6); padding: 8px; }
.pay { margin-top: 12px; background: #17203A; color: #F6F2E8; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pay .pbtn { background: #C8641F; color: #fff; }
.pay .psub { background: transparent; color: #F6F2E8; border-color: #F6F2E8; }
.pay .pnote { color: #F6F2E8; opacity: .85; text-align: center; }
.wstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wstat { background: var(--p-paper); border: 1px solid var(--p-line); border-radius: 12px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; }
.wstat b { font-size: 24px; }
.wstat span { font-size: 11px; color: var(--p-sub); }
.row-b { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.pbar { height: 10px; border-radius: 5px; background: var(--p-line); display: flex; margin-bottom: 6px; }
.pbar i { border-radius: 5px; background: var(--p-accent); }
.pbar.gold i { background: var(--p-gold); }
.row-i { display: flex; align-items: center; gap: 12px; }
.row-i img { width: 52px; height: 52px; object-fit: contain; }
.row-i div { display: flex; flex-direction: column; font-size: 13.5px; }
.say { background: #FFF6C9; color: #22303f; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.6; }
.pcheck { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--p-ink) !important; }
.pcheck input { width: auto; margin: 0; }
/* iPhone の Safari は日付の欄に独自の最小幅があり、枠からはみ出す（2026-09-29 本人の感想）。見た目もほかの欄にそろえる（左寄せ・同じ高さ） */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 49px; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
@media print {
  .pbar, .noprint, .pbar button, .pback, .pay { display: none !important; }
  body, .p { background: #fff !important; }
  .doc { box-shadow: none; border: none; }
}

/* ガチャの4コマ・バッジ（本番の絵） */
.gseq { position: relative; width: 220px; height: 220px; }
.gseq img { position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: auto; width: 200px; }
.gseq .f { opacity: 0; }
.gseq .f2 { animation: frame .55s 0s both; }
.gseq .f3 { animation: frame .55s .55s both; }
.gseq .f4 { animation: stay .2s 1.1s both; }
.gseq .gotimg { width: 170px; height: 200px; object-fit: contain; animation: gotup .8s 1.25s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes frame { 0% { opacity: 0; transform: translateY(20px) scale(.8); } 20%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes stay { from { opacity: 0; } to { opacity: .35; } }
@keyframes gotup { from { opacity: 0; transform: translateY(40px) scale(.3); } to { opacity: 1; transform: none; } }
.gtext { animation: fadein .4s 1.7s both; }
.shard { width: 20px; }
.bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 16px 10px; }
.bd { background: rgba(255,255,255,.55); border: 1.5px dashed #D6CDB9; border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.bd img { width: 100%; max-width: 68px; height: 68px; object-fit: contain; filter: grayscale(1) opacity(.35); }
.bd b { font-size: 11.5px; }
.bd span { font-size: 10px; color: var(--sub); line-height: 1.3; }
.bd.on { background: #fff; border: none; box-shadow: 0 1px 0 var(--paper-line); }
.bd.on img { filter: none; }

/* 横に広いモンスターの絵は、図鑑や一覧で少し大きく */
.zc img.wide, .find img.wide, .mimg img.wide, .sh-m img.wide { transform: scale(1.15); }

details.more summary { cursor: pointer; color: var(--p-accent); font-weight: 700; font-size: 14px; }
details.more { display: flex; flex-direction: column; gap: 8px; }
details.more[open] > *:not(summary) { margin-top: 8px; }

.ansbox { gap: 8px; }
.apre, .apost { font-size: 22px; font-weight: 700; color: var(--sub, #6B7185); }
.ansbox.empty .apre, .ansbox.empty .apost { font-size: 20px; }

/* ============ 第5版：相棒の育成・はじめの調査・テスト対策・封印・学年の練習 ============ */
.tband { margin: 4px 16px 0; background: #FDE7D6; border: 1.5px solid var(--orange); border-radius: 12px; padding: 7px 12px; display: flex; flex-direction: column; }
.tband b { font-size: 14px; color: #9c4b14; }
.tband span { font-size: 11.5px; color: var(--sub); }
.pmeta { position: absolute; left: 0; bottom: 0; right: 40%; background: rgba(255,255,255,.88); border-radius: 12px; padding: 5px 9px 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; box-shadow: 0 2px 6px rgba(23,32,58,.12); }
.pmeta b { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 14px; }
.lv { font-size: 11.5px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 6px; padding: 0 6px; }
.pstars { color: var(--gold); font-size: 12px; letter-spacing: -1px; }
.ttl { font-size: 11px; color: var(--orange); font-weight: 700; }
.xpb { flex-basis: 100%; height: 5px; border-radius: 3px; background: #E5DDCB; overflow: hidden; }
.xpb i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--gold)); border-radius: 3px; transition: width .6s; }
.hero.color { border-radius: 22px; box-shadow: inset 0 0 0 3px rgba(47,111,181,.25); }
.hero.gold { border-radius: 22px; box-shadow: inset 0 0 0 3px var(--gold); }
.today.first { background: linear-gradient(135deg, var(--navy), #2F4F8A); }
.rounds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rounds span { background: rgba(255,255,255,.1); border-radius: 10px; padding: 5px 6px; display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: 16px; }
.rounds span small { font-size: 10.5px; font-weight: 700; opacity: .85; white-space: nowrap; }
.rounds span.c { background: var(--orange); }
.rounds span.d { background: rgba(227,168,59,.35); }
.combo { font-size: 12px; font-weight: 900; color: #fff; background: var(--orange); border-radius: 999px; padding: 2px 9px; animation: pop .3s ease-out; white-space: nowrap; }
.qsub small { display: block; color: var(--navy); font-size: 12.5px; margin-top: 4px; background: #FFF6C9; border-radius: 8px; padding: 4px 8px; }
.reward.grow { background: #fff; color: var(--navy); box-shadow: 0 1px 0 var(--paper-line); align-items: flex-start; }
.reward.grow img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.reward.grow span { color: var(--sub); opacity: 1; }
.grow1 { flex: 1; min-width: 0; }
.zsum { margin: 0 16px; font-size: 12.5px; }
.zsum span { display: block; font-size: 11px; color: var(--sub); }
.zsum .blue { color: var(--blue); }
.zc.sealed { border: 2px solid var(--blue) !important; background: #EAF1FA !important; }
.zc.sealed em { background: var(--blue) !important; color: #fff !important; }
.recs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0 16px; }
.rec { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; align-items: center; background: #fff; border-radius: 14px; padding: 9px 12px; text-decoration: none; color: var(--navy); box-shadow: 0 1px 0 var(--paper-line); }
.rec .rtag { grid-row: 1 / 3; font-size: 11px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 6px; padding: 2px 7px; }
.rec.ahead { border: 2px solid var(--orange); }
.rec.ahead .rtag { background: var(--orange); }
.rec b { font-size: 15px; }
.rec span:last-child { font-size: 11.5px; color: var(--sub); }
.ustars { color: var(--gold); font-size: 13px; letter-spacing: -1px; margin-left: auto; white-space: nowrap; }
.pu-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atag, .gtag { font-style: normal; font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 5px; margin-right: 5px; }
.atag { background: var(--orange); color: #fff; }
.gtag { background: #EDE6D6; color: var(--sub); }
.score { font-size: 22px; color: var(--orange); }
.pu { gap: 8px; align-items: center; }
/* 見守る人：5つの質問・有料の印・弱点テスト */
.pq { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: start; }
.pq label, .pq > div { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--p-sub); min-width: 0; }
.pqn { width: 22px; height: 22px; border-radius: 50%; background: var(--p-accent); color: var(--p-accent-ink); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.plabel2 { font-size: 13px; color: var(--p-sub); }
.paid { display: inline-block; font-size: 10.5px; font-weight: 700; color: #7A5A12; background: #F7E7B8; border-radius: 5px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.bigscore { font-size: 22px; }
.pol { margin: 0 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.paper .pitems { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 12px; }
.paper .pitems li { font-size: 15px; }
.paper .ptag { font-size: 10px; color: var(--p-sub); border: 1px solid var(--p-line); border-radius: 4px; padding: 0 4px; }
.paper .ptext { margin: 2px 0; line-height: 1.7; }
.paper .popts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
/* 紙の弱点テストの答えを、見守る人が入れる */
.pinlist { margin: 8px 0 12px; padding-left: 24px; display: flex; flex-direction: column; gap: 12px; }
.pinlist .ptext { font-size: 14px; }
.pinf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.pinin { width: 11em; margin: 0; }
.pmark { display: flex; gap: 8px; margin-top: 6px; }
.pmk { font: inherit; font-size: 18px; min-width: 52px; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--p-line); background: var(--p-paper); color: var(--p-ink); }
.pmk.on[data-v="o"] { background: #2E7D5B; border-color: #2E7D5B; color: #fff; }
.pmk.on[data-v="x"] { background: #B5483A; border-color: #B5483A; color: #fff; }
.pinf[hidden] { display: none; }
.pinsel { font: inherit; font-size: 15px; padding: 8px; border-radius: 10px; border: 1px solid var(--p-line); background: var(--p-paper); color: var(--p-ink); max-width: 100%; }
.pinb { display: flex; align-items: center; gap: 4px; width: 100%; }
.pinb .pinsel { flex: 1; min-width: 0; }
.pin-res { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0; list-style: none; counter-reset: q; }
.pin-res li { counter-increment: q; width: 44px; text-align: center; border-radius: 8px; padding: 4px 0; font-weight: 700; background: var(--p-ok-soft); color: var(--p-ok); }
.pin-res li::before { content: counter(q) " "; font-size: 11px; font-weight: 400; color: var(--p-sub); }
.pin-res li.x { background: var(--p-red-soft); color: var(--p-red); }
.paper .pans { font-size: 14px; color: var(--p-sub); }
.paper .blank { display: inline-block; width: 110px; border-bottom: 1px solid currentColor; height: 1.1em; }
@media print {
  .paper { box-shadow: none !important; border: none !important; }
  .paper .ptag { display: none; }
  .paper .pitems li { break-inside: avoid; }
  .p { background: #fff !important; }
}
.hero.compact { height: 27dvh; min-height: 170px; }
.hero.compact .note { font-size: 13.5px; padding: 9px 11px; }
.wk-note .tiny { display: inline; padding: 0; font-size: 11px; }
@media (max-height: 700px) {
  .appear { height: 29dvh; min-height: 170px; }
  .appear img { width: 180px; }
  .appear .ring { width: 180px; height: 180px; }
  .k2 h1.h1 { font-size: 21px; }
}
.pq.wide { grid-template-columns: minmax(0, 1fr); }
.pqn.in { display: inline-flex; vertical-align: middle; margin: 0 8px 0 0; }
@media print {
  .paper .pitems { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
  .paper .pitems li { font-size: 13.5px; }
}
.k2 .btn.grow { flex: 1; margin: 0; }
/* 次の予定 */
.kplan { margin: 0 16px; background: #FFF6C9; border-radius: 14px; padding: 9px 14px; display: flex; align-items: baseline; gap: 10px; box-shadow: 0 1px 0 var(--paper-line); }
.kplan b { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 18px; color: var(--orange); white-space: nowrap; }
.kplan span { font-size: 13.5px; }
.kplan em { font-style: normal; font-weight: 700; color: var(--orange); }
.gplan { display: block; font-size: 12.5px; color: var(--p-sub); margin-top: 2px; }
.gplanbox .row-b { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mons-p div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.mons-p img { flex: none; }
@media (max-height: 700px) {
  .appear { height: 25dvh; min-height: 150px; margin-top: 4px; }
  .appear img { width: 160px; }
  .appear .ring { width: 160px; height: 160px; }
  .appear + .pad16 .tx { line-height: 1.55; font-size: 14px; }
  .appear + .pad16 .mini { font-size: 12.5px; line-height: 1.45; }
}
/* 図鑑の扉絵・親の画面の見出し（第2弾の絵） */
.zcover { margin: 0 16px; aspect-ratio: 3 / 2; max-height: 34dvh; border-radius: 18px; background-size: cover; background-position: center bottom; position: relative; flex: none; box-shadow: 0 2px 0 var(--paper-line); }
.zcover div { position: absolute; left: 0; right: 0; top: 0; padding: 12px 16px; display: flex; flex-direction: column; background: linear-gradient(rgba(246,242,232,.92), rgba(246,242,232,0)); border-radius: 18px 18px 0 0; }
.zcover b { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 22px; font-weight: 900; }
.zcover span { font-size: 12.5px; color: var(--sub); }
.phead { aspect-ratio: 3 / 2; max-height: 220px; width: 100%; border-radius: 16px; background-size: cover; background-position: right center; position: relative; overflow: hidden; }
.phead div { position: absolute; left: 0; top: 0; bottom: 0; width: 52%; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 4px; background: linear-gradient(90deg, rgba(247,246,242,.95) 60%, rgba(247,246,242,0)); }
.phead b { font-size: 20px; }
.phead span { font-size: 12.5px; color: var(--p-sub); }
/* ============ 第3弾の絵：アイコン・封印の演出・称号のプレート・わく・説明・空っぽの画面・レベルアップ・ワザ ============ */
.ic { width: 20px; height: 20px; object-fit: contain; vertical-align: -4px; }
.cic { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; margin-right: 2px; }
.gic { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; margin-right: 6px; }
.tband { position: relative; padding-left: 50px; }
.tbic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; object-fit: contain; }
.kplan .ic { align-self: center; }
.plate { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 34px; padding: 0 22px; background-size: 100% 100%; background-repeat: no-repeat; font-size: 12.5px; font-weight: 900; color: #3A2A10; white-space: nowrap; }
.plate.silver { color: #2B3553; } .plate.rainbow { color: #2B3553; }
.plate.sm { min-width: 90px; height: 24px; padding: 0 14px; font-size: 10.5px; }
.tbtn { border: 2px solid transparent; background: none; padding: 2px; border-radius: 12px; }
.tbtn.on { border-color: var(--orange); }
.empty { margin: 0 16px; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 8px 14px; box-shadow: 0 1px 0 var(--paper-line); }
.empty img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.empty span { font-size: 13px; line-height: 1.55; color: var(--sub); }
.sealfx { position: relative; height: 34dvh; min-height: 200px; margin-top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: center; }
.sealfx .s { position: absolute; width: min(300px, 80vw); opacity: 0; }
.sealfx .s1 { animation: sfx 3.4s linear forwards 0s; }
.sealfx .s2 { animation: sfx 3.4s linear forwards .8s; }
.sealfx .s3 { animation: sfx 3.4s linear forwards 1.6s; }
.sealfx .s4 { animation: sfxlast 1s ease-out forwards 2.4s; }
.sealfx .smon { position: relative; width: 150px; animation: smon 2.6s ease-in forwards; }
@keyframes sfx { 0% { opacity: 0; } 8% { opacity: 1; } 22% { opacity: 1; } 30% { opacity: 0; } 100% { opacity: 0; } }
@keyframes sfxlast { from { opacity: 0; transform: scale(1.3); } to { opacity: 1; transform: none; } }
@keyframes smon { 0% { transform: none; opacity: 1; } 55% { transform: scale(.85); opacity: 1; filter: none; } 90% { transform: scale(.35); opacity: .2; filter: brightness(1.6); } 100% { transform: scale(.2); opacity: 0; } }
.lvup .joy { height: min(40dvh, 300px); object-fit: contain; animation: popin .7s cubic-bezier(.2,1.4,.4,1); }
.lvup .lvic { width: 44px; height: 44px; object-fit: contain; }
.skillbtn { margin-left: auto; border: none; border-radius: 999px; background: var(--gold); color: var(--navy); font: inherit; font-size: 12px; font-weight: 900; padding: 4px 10px; white-space: nowrap; animation: pop .4s ease-out; }
.skillcut { margin: 4px 16px 0; border-radius: 14px; overflow: hidden; position: relative; background: var(--navy); animation: slidein .5s ease-out; flex: none; }
.skillcut img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.skillcut div { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: linear-gradient(transparent, rgba(23,32,58,.9)); color: #fff; display: flex; flex-direction: column; }
.skillcut b { font-size: 12px; color: var(--gold); }
.skillcut span { font-size: 14px; font-weight: 700; }
@keyframes slidein { from { transform: translateX(-100%); } }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.how div { background: #fff; border-radius: 14px; padding: 6px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 1px 0 var(--paper-line); }
.how img { width: 100%; max-width: 110px; aspect-ratio: 1; object-fit: contain; }
.how b { font-size: 13px; }
.how span { font-size: 10.5px; color: var(--sub); line-height: 1.4; }
.pal { position: relative; }
.pframe { position: absolute; inset: 4px; width: calc(100% - 8px) !important; height: calc(100% - 8px) !important; object-fit: fill !important; pointer-events: none; z-index: 1; }
@media (max-height: 700px) { .how span { display: none; } .sealfx { height: 27dvh; min-height: 160px; } .sealfx .smon { width: 120px; } }
.skillcut b { align-self: flex-start; background: rgba(23,32,58,.85); color: var(--gold); border-radius: 6px; padding: 1px 8px; margin-bottom: 2px; }
/* 開発環境だけのテスト用 */
.devbox { border: 2px dashed #B7791F; }
.devbox h4 { color: #8A5A12; }
.devsw { border: 2px dashed #B7791F !important; }
.devbox .two-p { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.devbox .two-p .pbtn { width: 100%; margin: 0; }

/* ============ 書と星（6.5・docs/star_look.md。見本より少し強く光らせる） ============ */
.sky { --ink: #14233a; --gold: #e2bf6a; --kinari: #f3ead2; color: #f3ead2; position: relative; isolation: isolate;
  background:
    radial-gradient(ellipse 70% 42% at 22% 28%, rgba(72,98,180,.36), transparent 70%),
    radial-gradient(ellipse 60% 38% at 82% 62%, rgba(120,80,165,.26), transparent 70%),
    radial-gradient(ellipse 50% 30% at 45% 55%, rgba(226,191,106,.07), transparent 70%),
    radial-gradient(ellipse 95% 60% at 50% 112%, rgba(40,82,145,.5), transparent 70%),
    linear-gradient(180deg, #091224 0%, #111f38 55%, #172a47 100%) !important; }
.sky::before, .sky::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.sky::before { background-image: radial-gradient(1.5px 1.5px at 86.6% 85.7%, rgba(255,255,255,0.76), transparent), radial-gradient(1.5px 1.5px at 50.8% 58.7%, rgba(255,255,255,0.37), transparent), radial-gradient(1.5px 1.5px at 63.0% 79.3%, rgba(255,255,255,0.31), transparent), radial-gradient(1.5px 1.5px at 14.2% 53.9%, rgba(255,255,255,0.83), transparent), radial-gradient(1px 1px at 59.5% 39.6%, rgba(255,255,255,0.54), transparent), radial-gradient(1px 1px at 62.3% 83.2%, rgba(255,255,255,0.29), transparent), radial-gradient(1px 1px at 19.0% 24.2%, rgba(255,255,255,0.27), transparent), radial-gradient(1.5px 1.5px at 32.6% 59.1%, rgba(255,255,255,0.38), transparent), radial-gradient(1px 1px at 64.0% 50.0%, rgba(255,255,255,0.68), transparent), radial-gradient(1.5px 1.5px at 65.5% 40.7%, rgba(255,255,255,0.61), transparent), radial-gradient(1px 1px at 70.8% 31.5%, rgba(255,255,255,0.40), transparent), radial-gradient(1.5px 1.5px at 3.0% 56.3%, rgba(255,255,255,0.32), transparent), radial-gradient(1px 1px at 84.7% 38.7%, rgba(255,255,255,0.87), transparent), radial-gradient(1px 1px at 21.4% 92.7%, rgba(255,255,255,0.28), transparent), radial-gradient(1.5px 1.5px at 98.0% 39.7%, rgba(255,255,255,0.30), transparent), radial-gradient(1px 1px at 77.9% 27.0%, rgba(255,255,255,0.31), transparent), radial-gradient(1.5px 1.5px at 1.5% 41.0%, rgba(255,255,255,0.85), transparent), radial-gradient(1px 1px at 24.6% 10.1%, rgba(255,255,255,0.29), transparent), radial-gradient(1.5px 1.5px at 17.8% 55.9%, rgba(255,255,255,0.54), transparent), radial-gradient(1px 1px at 98.5% 77.0%, rgba(255,255,255,0.52), transparent), radial-gradient(1.5px 1.5px at 11.7% 42.1%, rgba(255,255,255,0.39), transparent), radial-gradient(1.5px 1.5px at 86.4% 97.5%, rgba(255,255,255,0.64), transparent), radial-gradient(1px 1px at 21.1% 39.4%, rgba(255,255,255,0.81), transparent), radial-gradient(1px 1px at 4.2% 14.6%, rgba(255,255,255,0.54), transparent), radial-gradient(1px 1px at 77.3% 32.9%, rgba(255,255,255,0.44), transparent), radial-gradient(1px 1px at 7.4% 20.9%, rgba(255,255,255,0.66), transparent), radial-gradient(1px 1px at 60.1% 37.2%, rgba(255,255,255,0.54), transparent), radial-gradient(1.5px 1.5px at 83.2% 13.6%, rgba(255,255,255,0.50), transparent), radial-gradient(1px 1px at 31.1% 22.8%, rgba(255,255,255,0.65), transparent), radial-gradient(1px 1px at 15.8% 62.9%, rgba(255,255,255,0.61), transparent), radial-gradient(1.5px 1.5px at 88.2% 60.4%, rgba(255,255,255,0.52), transparent), radial-gradient(1px 1px at 10.9% 51.2%, rgba(255,255,255,0.42), transparent), radial-gradient(1.5px 1.5px at 25.7% 82.4%, rgba(255,255,255,0.64), transparent), radial-gradient(1.5px 1.5px at 52.0% 92.9%, rgba(255,255,255,0.89), transparent), radial-gradient(1px 1px at 22.8% 55.9%, rgba(255,255,255,0.80), transparent), radial-gradient(1px 1px at 28.0% 91.7%, rgba(255,255,255,0.38), transparent), radial-gradient(1px 1px at 6.9% 41.1%, rgba(255,255,255,0.41), transparent), radial-gradient(1px 1px at 17.6% 36.9%, rgba(255,255,255,0.62), transparent), radial-gradient(1px 1px at 9.2% 13.8%, rgba(255,255,255,0.54), transparent), radial-gradient(1.5px 1.5px at 65.7% 69.1%, rgba(255,255,255,0.63), transparent), radial-gradient(1px 1px at 59.0% 92.4%, rgba(255,255,255,0.56), transparent), radial-gradient(1.5px 1.5px at 70.1% 96.3%, rgba(255,255,255,0.26), transparent), radial-gradient(1px 1px at 48.2% 73.0%, rgba(255,255,255,0.46), transparent), radial-gradient(1px 1px at 7.5% 54.6%, rgba(255,255,255,0.73), transparent), radial-gradient(1px 1px at 79.3% 91.5%, rgba(255,255,255,0.48), transparent), radial-gradient(1.5px 1.5px at 90.1% 87.1%, rgba(255,255,255,0.52), transparent), radial-gradient(1px 1px at 86.3% 57.3%, rgba(255,255,255,0.66), transparent), radial-gradient(1.5px 1.5px at 37.9% 1.2%, rgba(255,255,255,0.30), transparent), radial-gradient(1px 1px at 63.9% 99.3%, rgba(255,255,255,0.82), transparent), radial-gradient(1.5px 1.5px at 38.8% 73.5%, rgba(255,255,255,0.63), transparent), radial-gradient(1.5px 1.5px at 46.3% 54.1%, rgba(255,255,255,0.59), transparent), radial-gradient(1px 1px at 31.0% 8.8%, rgba(255,255,255,0.26), transparent), radial-gradient(1px 1px at 49.7% 61.5%, rgba(255,255,255,0.85), transparent), radial-gradient(1.5px 1.5px at 89.6% 36.8%, rgba(255,255,255,0.34), transparent), radial-gradient(1px 1px at 51.8% 75.4%, rgba(255,255,255,0.47), transparent), radial-gradient(1.5px 1.5px at 49.8% 24.1%, rgba(255,255,255,0.51), transparent), radial-gradient(1.5px 1.5px at 19.9% 43.1%, rgba(255,255,255,0.77), transparent), radial-gradient(1px 1px at 88.0% 38.4%, rgba(255,255,255,0.63), transparent), radial-gradient(1.5px 1.5px at 21.0% 13.5%, rgba(255,255,255,0.48), transparent), radial-gradient(1px 1px at 71.1% 95.0%, rgba(255,255,255,0.43), transparent); }
.sky::after { background-image: radial-gradient(1.5px 1.5px at 11.3% 47.1%, rgba(255,255,255,0.97), transparent), radial-gradient(2px 2px at 38.3% 52.0%, rgba(255,255,255,0.85), transparent), radial-gradient(2px 2px at 32.0% 82.9%, rgba(255,255,255,0.68), transparent), radial-gradient(1.5px 1.5px at 67.8% 28.1%, rgba(255,255,255,0.71), transparent), radial-gradient(1.5px 1.5px at 64.1% 40.5%, rgba(255,255,255,0.64), transparent), radial-gradient(2px 2px at 23.7% 14.1%, rgba(255,255,255,0.57), transparent), radial-gradient(1.5px 1.5px at 44.6% 63.0%, rgba(255,255,255,0.84), transparent), radial-gradient(2px 2px at 95.8% 68.4%, rgba(255,255,255,0.64), transparent), radial-gradient(2px 2px at 25.6% 71.4%, rgba(255,255,255,0.89), transparent), radial-gradient(1.5px 1.5px at 17.9% 27.2%, rgba(255,255,255,0.71), transparent), radial-gradient(1.5px 1.5px at 39.4% 79.2%, rgba(255,255,255,0.96), transparent), radial-gradient(1.5px 1.5px at 41.0% 89.3%, rgba(255,255,255,0.72), transparent), radial-gradient(2px 2px at 45.4% 62.6%, rgba(255,255,255,0.96), transparent), radial-gradient(2px 2px at 55.0% 65.3%, rgba(255,255,255,0.78), transparent); animation: far 7s ease-in-out infinite; }
@keyframes far { 0%,100% { opacity: .35 } 50% { opacity: .95 } }
.tile { background: radial-gradient(ellipse at 30% 20%, rgba(72,98,180,.35), transparent 70%), linear-gradient(160deg, #0b1629, #1a2c48); color: #f3ead2; }
.mincho { font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", serif !important; font-weight: 700; }
/* 星：光輪・十字の光条・45°の光条・芯を重ねる。--z で大きさ、--d で動きをずらす */
.st { position: absolute; width: 0; height: 0; transform: scale(var(--z, 1)); pointer-events: none; }
.st > i { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); border-radius: 50%; }
.st .halo, .st .ry, .st .ry2 { mix-blend-mode: screen; }
.st .ry, .st .ry2 { border-radius: 0; -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.55) 28%, transparent 68%); mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.55) 28%, transparent 68%); }
.st.fixed .halo { width: 88px; height: 88px; background: radial-gradient(circle, rgba(255,244,204,.7) 0%, rgba(226,191,106,.36) 22%, rgba(226,191,106,.11) 48%, transparent 70%); animation: breathe 4.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.st.fixed .ry { width: 76px; height: 76px; background: linear-gradient(90deg, transparent, rgba(255,250,230,.98), transparent) center / 100% 2px no-repeat, linear-gradient(0deg, transparent, rgba(255,250,230,.98), transparent) center / 2px 100% no-repeat; animation: shimmer 5.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.st.fixed .ry2 { width: 36px; height: 36px; transform: translate(-50%, -50%) rotate(45deg); background: linear-gradient(90deg, transparent, rgba(255,236,190,.85), transparent) center / 100% 1.4px no-repeat, linear-gradient(0deg, transparent, rgba(255,236,190,.85), transparent) center / 1.4px 100% no-repeat; }
.st.fixed .core { width: 10px; height: 10px; background: radial-gradient(circle, #fff 0 40%, #fff1c2 70%, #f0cf7a 100%); box-shadow: 0 0 3px 1px #fff, 0 0 10px 4px rgba(255,236,170,.95), 0 0 24px 9px rgba(226,191,106,.62), 0 0 48px 18px rgba(226,191,106,.28); }
.st.lit .halo { width: 52px; height: 52px; background: radial-gradient(circle, rgba(255,255,255,.48) 0%, rgba(243,234,210,.2) 38%, transparent 70%); }
.st.lit .ry { width: 40px; height: 40px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent) center / 100% 1.4px no-repeat, linear-gradient(0deg, transparent, rgba(255,255,255,.9), transparent) center / 1.4px 100% no-repeat; animation: shimmer 6.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
.st.lit .core { width: 6.5px; height: 6.5px; background: #fff; box-shadow: 0 0 2px 1px #fff, 0 0 9px 3px rgba(243,234,210,.92), 0 0 20px 7px rgba(200,215,255,.4); }
.st.twinkle .halo { width: 26px; height: 26px; background: radial-gradient(circle, rgba(190,205,240,.55), transparent 70%); animation: tw 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
.st.twinkle .ry { width: 17px; height: 17px; border-radius: 50%; border: 1px dashed rgba(170,185,215,.8); -webkit-mask-image: none; mask-image: none; mix-blend-mode: normal; }
.st.twinkle .core { width: 4px; height: 4px; background: #e3e9f7; box-shadow: 0 0 6px 2px rgba(180,200,240,.75); animation: tw 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
.st.can .ry { width: 19px; height: 19px; border-radius: 50%; border: 1.4px solid rgba(226,191,106,.95); -webkit-mask-image: none; mask-image: none; mix-blend-mode: normal; animation: pulse 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.st.can .core { width: 4px; height: 4px; background: #f6e7bd; box-shadow: 0 0 6px 2px rgba(226,191,106,.6); }
.st.none .core { width: 3.6px; height: 3.6px; background: #6f7c96; box-shadow: 0 0 4px 1px rgba(111,124,150,.45); }
.st .shade { width: 30px; height: 30px; background: radial-gradient(circle, rgba(10,14,26,.75), rgba(10,14,26,0) 70%); }
@keyframes breathe { 0%,100% { opacity: .8; transform: translate(-50%,-50%) scale(.94) } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.08) } }
@keyframes shimmer { 0%,100% { opacity: .72; transform: translate(-50%,-50%) rotate(0deg) scale(.95) } 50% { opacity: 1; transform: translate(-50%,-50%) rotate(7deg) scale(1.07) } }
@keyframes tw { 0%,100% { opacity: .3; transform: translate(-50%,-50%) scale(.8) } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.12) } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 5px 0 rgba(226,191,106,.55) } 50% { box-shadow: 0 0 15px 4px rgba(226,191,106,.98) } }
@media (prefers-reduced-motion: reduce) { .st *, .sky::after, .fixfx * { animation: none !important; } }
/* ---- 書と星：部品 ---- */
.mst { position: relative; display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: middle; }
.sub2 { font-size: 11.5px; color: #c9d2e3; }
.k2:not(.sky) .sub2, .starpg .sub2 { color: var(--sub); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 11px; color: #c9d2e3; padding: 2px 16px; }
.legend span { display: flex; align-items: center; gap: 2px; }
/* ホーム */
.home2 .kmain { gap: 8px; }
.hdate { display: flex; align-items: baseline; gap: 10px; padding: 0 16px; }
.hdate b { font-size: 15px; }
.cheer { font-size: 12px; color: var(--orange); font-weight: 700; }
.obs { margin: 0 16px; border-radius: 20px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 24px rgba(23,32,58,.25); overflow: hidden; }
.obs-h { display: flex; align-items: baseline; gap: 8px; }
.obs-h b { font-size: 20px; font-weight: 900; color: #f3ead2; }
.obs-h span { font-size: 12.5px; color: #c9d2e3; }
.obs-t { margin: 0; font-size: 13px; line-height: 1.6; color: #e6ddc6; }
.obs-t b { color: var(--gold); }
.obs .rounds span { background: rgba(255,255,255,.08); }
.obs .rounds span.c { background: rgba(226,191,106,.35); color: #fff; }
.choose { background: rgba(255,255,255,.06); border: 1px solid rgba(226,191,106,.35); border-radius: 14px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.ch-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ch-h b { font-size: 13.5px; color: var(--gold); }
.ch-h span { font-size: 11px; color: #c9d2e3; }
.chs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.chs-b { border: 1px solid rgba(243,234,210,.25); background: rgba(9,18,36,.55); border-radius: 12px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: #f3ead2; font: inherit; min-width: 0; }
.chs-b b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chs-b small { font-size: 10.5px; color: #c9d2e3; }
.chs-b.on { border: 2px solid var(--gold); background: rgba(226,191,106,.15); }
.chs-b .mst { width: 22px; height: 22px; }
.oplan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.oplan li { display: flex; align-items: center; gap: 8px; }
.oplan li > i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(243,234,210,.4); font-style: normal; font-size: 11px; display: flex; align-items: center; justify-content: center; color: #f3ead2; flex: none; }
.oplan li.d > i { background: var(--gold); color: var(--navy); border: none; }
.oplan li div { display: flex; flex-direction: column; min-width: 0; }
.oplan li b { font-size: 13px; color: #f3ead2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oplan li span { font-size: 10.5px; color: #aeb8cc; }
.obs .btn.gold { background: linear-gradient(180deg, #f0d48a, #e2bf6a); color: #14233a; box-shadow: 0 0 18px rgba(226,191,106,.45); }
.wkbox { margin: 0 16px; display: flex; flex-direction: column; gap: 4px; }
.wkbox > .row8 b { font-size: 13.5px; }
.wkbox .wk { margin: 0; }
.prow { margin: 0 16px; display: flex; align-items: center; gap: 10px; }
.prow .face { width: 46px; height: 46px; }
.prow b { font-size: 14px; }
.prow span { font-size: 13px; line-height: 1.5; }
.nplan { margin: 0 16px; font-size: 12.5px; color: var(--sub); }
.away { gap: 8px; }
.away .face { width: 64px; height: 64px; align-self: center; }
.away b { font-size: 16px; text-align: center; }
.away ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.8; }
@media (max-height: 640px) {
  .oplan li span { display: none; }
  .wkbox .wk-d span { display: none; }
  .wkbox .wk-d i { width: 24px; height: 24px; font-size: 11px; }
  .prow .face { width: 38px; height: 38px; }
  .obs { padding: 10px 12px; gap: 6px; }
  .obs-h b { font-size: 18px; }
}
/* 星空・書 */
.sky .ktop, .sky .kttl { color: #f3ead2; }
.sky .knav { background: rgba(9,18,36,.92); border-top-color: rgba(243,234,210,.15); }
.sky .knav a { color: #8f9bb3; }
.sky .knav a.on { color: var(--gold); }
.sky .kmain { color: #f3ead2; }
.skyhead { display: flex; align-items: baseline; gap: 10px; }
.skyhead h1 { color: #f3ead2; }
.skyhead span { font-size: 12px; color: #c9d2e3; }
.btiles { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.btile { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 8px 12px; text-decoration: none; border: 1px solid rgba(243,234,210,.12); }
.btile b { font-size: 17px; color: #f3ead2; }
.btile span { font-size: 12px; color: #c9d2e3; }
.btile.far { justify-content: center; color: #8f9bb3; border-style: dashed; background: transparent; }
.bmini { width: 92px; height: 64px; flex: none; position: relative; }
.bmini .bmap { position: absolute; inset: 0; }
.bmini .st { --z: .45 !important; }
.bmini .chl { display: none; }
.skylinks { display: flex; gap: 8px; padding: 0 16px 8px; }
.skylinks a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(243,234,210,.08); color: #f3ead2; text-decoration: none; font-size: 13px; font-weight: 700; }
.shead { display: flex; align-items: center; gap: 4px; padding: calc(10px + env(safe-area-inset-top)) 16px 4px; }
.shead a { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; margin-left: -10px; color: inherit; }
.shead b { font-size: 19px; }
.shead span { font-size: 11.5px; opacity: .8; }
.sky .shead { color: #f3ead2; }
.bmap { position: relative; flex: 1; min-height: 0; margin: 0 12px; }
.bmap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bmap line { vector-effect: non-scaling-stroke; }
.bmap .glow line { stroke: rgba(143,155,179,.18); stroke-width: 4; filter: blur(2px); }
.bmap .glow line.on { stroke: rgba(226,191,106,.45); stroke-width: 6; }
.bmap .thin line { stroke: rgba(143,155,179,.55); stroke-width: 1; }
.bmap .thin line.on { stroke: #f3d98f; stroke-width: 1.6; }
.sa { position: absolute; width: 0; height: 0; text-decoration: none; }
.sa::before { content: ''; position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; }
.sa .st { left: 0 !important; top: 0 !important; }
.sa .sl { position: absolute; left: 0; top: 9px; transform: translateX(-50%); font-size: 9.5px; font-weight: 700; color: #aeb8cc; white-space: nowrap; text-shadow: 0 1px 2px #091224; pointer-events: none; }
.sa .sl.lit, .sa .sl.fixed { color: #f3ead2; }
.sa .sl.can { color: var(--gold); }
.sa.focus .sl { color: #fff; text-decoration: underline; }
.sa .smon { position: absolute; left: 4px; top: -26px; width: 24px; height: 24px; object-fit: contain; opacity: .8; filter: grayscale(.4) brightness(.85); pointer-events: none; }
/* 書を選ぶ（下の根もとから上へ伸びる道） */
.wpath { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 6px 16px 10px 16px; }
.wpath::before { content: ''; position: absolute; left: 33px; top: 20px; bottom: 30px; width: 2px; background: linear-gradient(to top, rgba(226,191,106,.85), rgba(226,191,106,.25) 70%, rgba(143,155,179,.2)); box-shadow: 0 0 8px rgba(226,191,106,.45); }
.wnode { position: relative; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.wdot { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.wcard { flex: 1; display: flex; flex-direction: column; gap: 2px; border-radius: 14px; padding: 9px 12px; border: 1px solid rgba(243,234,210,.14); background: rgba(9,18,36,.55); }
.wcard b { font-size: 17px; color: #f3ead2; }
.wcard span { font-size: 11.5px; color: #c9d2e3; }
.wbar { display: block; height: 4px; border-radius: 2px; background: rgba(143,155,179,.25); margin-top: 4px; overflow: hidden; }
.wbar i { display: block; height: 100%; background: linear-gradient(90deg, #c9a24e, #f3d98f); box-shadow: 0 0 6px rgba(243,217,143,.7); }
.wnode.hot .wcard { border-color: rgba(226,191,106,.8); box-shadow: 0 0 0 1px rgba(226,191,106,.35), 0 0 18px rgba(226,191,106,.25); }
.wrec { position: absolute; right: 12px; top: -9px; font-style: normal; font-size: 11px; font-weight: 700; color: #14233a; background: var(--gold); border-radius: 999px; padding: 1px 9px; }
.wnode.root .wcard { border-style: solid; }
.wnode.far { opacity: .55; }
.wnode.far .wcard { border-style: dashed; background: transparent; }
/* 星の木（書の中）：ノード＝輪＋名前の札。幹・霧 */
.bmap .trunk { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: linear-gradient(to top, rgba(226,191,106,.35), rgba(226,191,106,.08)); pointer-events: none; }
.bmap .band.mist { background: linear-gradient(to bottom, rgba(120,132,160,.28), rgba(60,72,100,.22)); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 1; }
.chl.fog { color: #7d879c; z-index: 2; }
.tn { z-index: 2; }
.tn .tn-s { position: absolute; left: 0; top: 0; }
.tn .tn-s .st { left: 0 !important; top: 0 !important; }
.tn.none .tn-s::after, .tn.fog .tn-s::after { content: ''; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(201,210,227,.55); background: rgba(9,18,36,.6); }
.tn.fog .tn-s::after { border-style: dashed; border-color: rgba(201,210,227,.3); }
.tn-l { position: absolute; left: 0; top: 13px; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 700; line-height: 1.5; padding: 0 7px; border-radius: 999px; background: rgba(9,18,36,.88); border: 1px solid rgba(201,210,227,.28); color: #aeb8cc; pointer-events: none; }
/* 札は1行に：長い名前は字を小さく、1段に3つ並んでも隣とぶつからない幅（木の幅の 31%）まで。入らなければ「…」 */
.tn-l { max-width: 31cqw; overflow: hidden; text-overflow: ellipsis; }
.tn-l.lg { font-size: 10px; padding: 0 5px; letter-spacing: -.02em; }
.tn-l.xl { font-size: 9px; padding: 0 4px; letter-spacing: -.04em; }
.tn.lit .tn-l, .tn.fixed .tn-l { color: #f3d98f; border-color: rgba(226,191,106,.55); }
.tn.twinkle .tn-l { color: #dfe6f3; }
.tn.can .tn-l, .tn.next .tn-l { color: #14233a; background: var(--gold); border-color: var(--gold); }
.tn.fog .tn-l { color: #6d7790; border-style: dashed; background: rgba(9,18,36,.6); }
.tn.focus .tn-l { text-decoration: underline; }
/* 入口の観測・まだ開かない書 */
.entrycard { display: flex; flex-direction: column; gap: 6px; margin: 4px 16px 6px; padding: 12px; border-radius: 14px; border: 1px solid rgba(226,191,106,.6); background: rgba(9,18,36,.7); }
.entrycard b { color: #f3d98f; font-size: 15px; }
.entrycard span { font-size: 12px; color: #c9d2e3; }
.wnode.locked .wcard { border-style: dashed; background: rgba(60,72,100,.25); }
.wnode.locked b { color: #aeb8cc; }
.wlock { position: absolute; right: 12px; top: -9px; font-style: normal; font-size: 11px; font-weight: 700; color: #dfe6f3; background: #4a5673; border-radius: 999px; padding: 1px 9px; }
.lockpg .tile { background: rgba(9,18,36,.6); border: 1px solid rgba(201,210,227,.18); color: #f3ead2; padding: 12px 14px; border-radius: 14px; gap: 8px; }
.mistbox { height: 110px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 30% 40%, rgba(160,170,195,.35), transparent 60%), radial-gradient(ellipse at 70% 60%, rgba(130,142,170,.3), transparent 60%), rgba(20,30,52,.6); }
.mistbox p { margin: 0; color: #dfe6f3; }
.lockrow { display: grid; grid-template-columns: 1fr 90px 58px; align-items: center; gap: 8px; text-decoration: none; color: #dfe6f3; font-size: 13px; }
.lockrow small { font-size: 11px; color: #aeb8cc; text-align: right; }
/* 星の木（書の中） */
.bmap.tree { margin: 4px 12px; container-type: inline-size; }
.bmap .band { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(243,234,210,.1); background: rgba(255,255,255,.015); pointer-events: none; }
.bmap .band.alt { background: rgba(255,255,255,.035); }
.stag { position: absolute; left: 0; top: -30px; transform: translateX(-50%); font-style: normal; font-size: 9.5px; font-weight: 700; white-space: nowrap; border-radius: 999px; padding: 0 6px; pointer-events: none; }
.stag.next { color: #14233a; background: var(--gold); box-shadow: 0 0 10px rgba(226,191,106,.8); }
.stag.now { color: #f3ead2; border: 1px solid rgba(243,234,210,.5); background: rgba(9,18,36,.8); }
.sa.next .sl { color: #f3d98f; }
.roots { margin: 2px 16px 0; font-size: 11.5px; color: #c9d2e3; text-align: center; }
.nextbar { display: flex; align-items: center; gap: 10px; margin: 6px 16px 10px; position: sticky; bottom: 6px; z-index: 5; }
.nextbar span { font-size: 12px; color: #c9d2e3; flex: none; }
.nextbar .btn { flex: 1; }
.chl { position: absolute; font-size: 10.5px; font-weight: 700; color: #c9b27a; display: flex; flex-direction: column; line-height: 1.25; pointer-events: none; }
.chl small { font-size: 9.5px; color: #8f9bb3; font-weight: 400; }
.chl.done { color: var(--gold); text-shadow: 0 0 8px rgba(226,191,106,.7); }
.outside, .nextline { margin: 0 16px; font-size: 12px; color: #c9d2e3; line-height: 1.6; }
.nextline { padding-bottom: 6px; }
/* 星のページ */
.starpg { background: #f6f3ec; }
.shead.light { color: var(--navy); }
.stile { display: flex; gap: 14px; align-items: center; border-radius: 14px; padding: 10px 14px; }
.stile b { font-size: 14px; color: #f3ead2; }
.stile span { font-size: 11.5px; color: #c9d2e3; line-height: 1.5; }
.sbig { position: relative; width: 80px; height: 64px; flex: none; }
.shbox { display: flex; gap: 12px; align-items: center; padding: 8px 12px; background: #fff4dc; border: 1px solid #a85a12; border-radius: 12px; }
.shbox img { width: 52px; height: 52px; object-fit: contain; }
.shbox b { font-size: 12.5px; color: #a85a12; }
.shbox span { font-size: 12px; }
.lockbox { background: #14233a; color: #f3ead2; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.lockbox p { margin: 0; font-size: 13px; line-height: 1.6; }
.lockbox .btn { margin: 0; font-size: 14px; }
.chips2 { display: flex; flex-direction: column; gap: 4px; }
.chips2 > span { font-size: 12px; font-weight: 700; color: var(--sub); }
.chips2 > div { display: flex; flex-wrap: wrap; gap: 6px; }
.chip2 { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--navy); background: #fffdf8; border: 1px solid #d9d3c4; border-radius: 999px; padding: 2px 10px 2px 4px; text-decoration: none; }
.chip2 small { font-weight: 400; color: var(--sub); margin-left: 3px; }
.chip2 .mst { background: #14233a; border-radius: 50%; }
.slog { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--sub); }
.slog div { display: flex; justify-content: space-between; gap: 8px; }
/* 定着の瞬間（大きく動く演出はここだけ） */
.fixfx { position: relative; height: 32dvh; min-height: 170px; margin-top: calc(18px + env(safe-area-inset-top)); }
.fixfx .st { left: 50% !important; top: 50% !important; animation: fixin 1.6s cubic-bezier(.2,1.2,.3,1) both; }
.fixfx .ring { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 2px solid rgba(243,217,143,.9); animation: ringout 2.4s ease-out both; }
.fixfx .r2 { animation-delay: .5s; }
@keyframes fixin { 0% { transform: scale(.2); opacity: 0; filter: brightness(3); } 60% { transform: scale(calc(var(--z) * 1.15)); opacity: 1; } 100% { transform: scale(var(--z)); filter: none; } }
@keyframes ringout { from { transform: scale(.3); opacity: 1; } to { transform: scale(7); opacity: 0; } }
.fixtx { color: #f3ead2; animation: fadeup 1s ease-out .9s both; }
.fixc { font-size: 30px; margin: 0; color: #f3d98f; letter-spacing: .1em; text-shadow: 0 0 18px rgba(226,191,106,.6); }
.sys { font-size: 19px; line-height: 1.7; margin: 6px 0 0; }
.nx { margin: 4px 0 0; font-size: 13px; color: #f3d98f; }
.pad-b { margin-bottom: calc(16px + env(safe-area-inset-bottom)); }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } }
/* 影が戻る */
.retfx { position: relative; height: 28dvh; min-height: 160px; }
.retfx .st { left: 50% !important; top: 50% !important; }
.retfx .rshadow { position: absolute; left: 50%; top: 50%; width: 110px; transform: translate(-50%, -50%); opacity: .55; filter: grayscale(.6) brightness(.8); animation: fadeup 1.2s ease-out both; }
.rtitle { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.6; text-align: center; color: #f3ead2; }
.rbox { border: 1px solid #2c4064; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; color: #f3ead2; }
.rbox b { font-size: 13.5px; }
.rbox span { font-size: 12.5px; color: #c9d2e3; line-height: 1.6; }
.face.sm { width: 36px; height: 36px; }
/* 答えのあとの星のログ */
.slogbox { margin: 6px 16px 0; background: #14233a; color: #f3ead2; border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.slogbox .sub2 { color: #aeb8cc; }
.slogbox p { margin: 0; font-size: 13px; color: #f3d98f; }
.lg { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 700; }
.ssums { margin: 0 16px; border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.ssum { display: flex; align-items: flex-start; gap: 10px; }
.ssum > span { font-size: 11.5px; color: #aeb8cc; width: 84px; flex: none; padding-top: 2px; }
.ssum > div { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ssum a { display: inline-flex; align-items: center; gap: 2px; color: #f3ead2; text-decoration: none; font-size: 13px; font-weight: 700; }
.tease { margin: 0 16px; padding: 8px 12px; border-radius: 12px; background: #fff4dc; border: 1px solid #e2bf6a; font-size: 13px; line-height: 1.6; color: #6b4a0e; }
/* 今学期 */
.termpg .kmain { gap: 8px; }
.tdate { margin: 0 16px; border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
.tdate b { font-size: 17px; color: #f3ead2; }
.tstars { margin: 0 16px; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tstars .row8 { justify-content: space-between; }
.tstars b { color: #f3ead2; font-size: 14px; }
.tstars .cnt { font-size: 13px; color: #c9d2e3; }
.tstars .cnt b { color: var(--gold); font-size: 18px; }
.tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; }
.tgrid a { display: flex; align-items: center; gap: 4px; color: #f3ead2; text-decoration: none; font-size: 12px; min-width: 0; }
.tgrid a > span:not(.mst) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trial { margin: 0 16px; border: 1.5px solid var(--orange); background: #fff; border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--navy); }
.trial b { font-size: 14.5px; }
.trial span { font-size: 11.5px; color: var(--sub); }
.tsteps { list-style: none; margin: 0 16px 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tsteps li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tsteps li i { width: 34px; height: 22px; border-radius: 6px; border: 1px solid #d9d3c4; font-style: normal; font-size: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.tsteps li.done i { background: #1f5b4f; color: #fff; border: none; }
.tsteps li.now i { background: var(--orange); color: #fff; border: none; }
.sa .sl { white-space: normal; width: 66px; text-align: center; line-height: 1.12; top: 8px; }
.bmini .bmap { min-height: 0 !important; margin: 0; }
.sky.bookpg .kmain { overflow: auto; }
/* ホームの「挑む星を選ぶ」は1行に（小さい画面でも収まるように） */
.choose { padding: 6px 8px; gap: 5px; }
.ch-h b { font-size: 13px; }
.chs { display: flex; gap: 6px; overflow: hidden; }
.chs-b { flex: 1 1 0; flex-direction: row; justify-content: center; gap: 3px; padding: 5px 6px; }
.chs-b b { font-size: 12px; }
.chs-b small { font-size: 10px; white-space: nowrap; }
.chs-b .mst { width: 18px; height: 18px; }
.oplan { gap: 3px; }
.oplan li b { font-size: 12.5px; }
.wkbox > .row8 { flex-wrap: wrap; gap: 0 8px; }
@media (max-height: 640px) {
  .chs-b small { display: none; }
  .ch-h span { display: none; }
  .wkbox > .row8 .sub { display: none; }
  .prow span { font-size: 12px; }
  .hdate { display: none; }
}
/* ホームを1画面に：予定の説明文は出さない・相棒のひとことと次の予定は1行 */
.oplan li span { display: none; }
.oplan li b { line-height: 1.35; }
.prow span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nplan { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdate { margin-bottom: -4px; }
/* 見守る人の登録：3つの段階（2026-09-29 画面が長いため）と、苦手な単元を書ごとにたたむ */
.pstep { display: flex; flex-direction: column; gap: 12px; }
.pstep[hidden] { display: none; }
.psteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.psteps li { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; color: var(--p-sub); padding: 6px 2px; border-bottom: 3px solid var(--p-line); white-space: nowrap; }
.psteps li i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--p-line); font-style: normal; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.psteps li.now { color: var(--p-ink); font-weight: 700; border-color: var(--p-accent); }
.psteps li.now i, .psteps li.done i { background: var(--p-accent); color: var(--p-accent-ink); border-color: var(--p-accent); }
.psteps li.done { border-color: var(--p-accent); }
.pnav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.pfold { margin-top: 6px; border: 1px solid var(--p-line); border-radius: 10px; background: var(--p-paper); }
.pfold summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 14px; font-weight: 700; color: var(--p-ink); }
.pfold summary::-webkit-details-marker { display: none; }
.pfold summary::after { content: '＋'; margin-left: auto; color: var(--p-sub); font-weight: 400; }
.pfold[open] > summary::after { content: '－'; }
.pfold summary small { font-size: 11.5px; font-weight: 400; color: var(--p-sub); }
.pfold .pchecks { padding: 0 8px 8px; }
.pfold.prev { border-style: dashed; }
.pfold .pinner { padding: 0 8px 8px; display: flex; flex-direction: column; }
.pfold.sub { margin-top: 6px; border-radius: 8px; }
.pfold.sub summary { padding: 8px 10px; font-size: 13.5px; }
.pfold.sub .pchk { text-align: left; font-size: 13px; padding: 8px 9px; }

/* はじめの観測の締め（きみの星図・明日から）2026-09-30 夜 */
.fsky { margin: 0 16px; border-radius: 14px; padding: 12px 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.fsky div { display: flex; flex-direction: column; gap: 2px; }
.fsky b { font-size: 26px; line-height: 1.1; }
.fsky span { font-size: 11px; color: #c9d2e3; }
.fend { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.fend li { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 1px 0 var(--paper-line); }
.fend img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.fend div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fend b { font-size: 14px; }
.fend span { font-size: 11.5px; color: var(--sub); line-height: 1.45; }
.flegend { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 10.5px; color: #c9d2e3; }
.precheck ul { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.precheck li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: #f6f2e8; }
.precheck li span { flex: none; font-size: 12px; color: var(--sub); }
.precheck li.hit span { color: #b0461a; font-weight: 700; }
.utrow { margin: 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.utrow > span { width: 100%; font-size: 12px; color: var(--sub); }
.utrow .chip2 { font: inherit; font-size: 12px; cursor: pointer; }
.rec.drill { margin: 0 16px 8px; display: flex; }
.drillgo { margin: 0 16px; }
.nodrop { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fff7e8; border: 1px solid #ecd49a; display: flex; flex-direction: column; gap: 4px; }
.nodrop > b { font-size: 13px; color: #7a4f0c; }
.nodrop > span { font-size: 11.5px; color: var(--sub); }
.nodrop p { margin: 0; font-size: 13px; }
.nodrop .x { color: #b0461a; } .nodrop .o { color: #1e7b45; }
@media (max-width: 430px) { .phead div { width: 62%; } .phead span { font-size: 11.5px; } }

/* ---------- 高校の学年のテーマ（D1・2026-10-04）----------
   kid.js の view() が、学年が高校のとき #app に hs を付ける。中学の見た目は変えない。
   方針：オレンジとクリーム色を、落ち着いた青緑と青みのある灰色に。方眼の背景を、ごく薄い点に。太字をおさえる。
   絵（相棒・星）は本人が高校用に作る。それまでは今の絵のまま（背景が変わるぶん、少し浮いて見える） */
.k2.hs { --cream: #EEF1F5; --navy: #1A2333; --orange: #2C6E7A; --blue: #3A5A8C; --gold: #C9A24A; --paper-line: #D6DCE4; --sub: #65707F;
  background-image: radial-gradient(rgba(58,90,140,.12) 1px, transparent 1.4px); background-size: 20px 20px; }
body:has(#app.k2.hs) { background: #EEF1F5; }
.k2.hs h1.h1, .k2.hs .h2 { font-weight: 700; }
.k2.hs .btn.orange { box-shadow: 0 3px 0 #1C4D56; }
.k2.hs .tband { background: #E1EFF1; }
.k2.hs .tband b { color: #1C4D56; }
.k2.hs .note, .k2.hs .say, .k2.hs .qsub small, .k2.hs .kplan { background: #E6ECF4; }
.k2.hs .wk-d i, .k2.hs .qback, .k2.hs .lvc, .k2.hs .pad button, .k2.hs .choice, .k2.hs .mate img { border-color: #D3DAE3; }
.k2.hs .pad button { border-radius: 10px; }
.k2.hs .choice { border-radius: 12px; }
.k2.hs .segs i { background: #D3DAE3; }
.k2.hs .xpb { background: #DDE3EA; }
.k2.hs .qx:active { background: #E4E9F0; }
.k2.hs .pad button:active { background: #E4E9F0; }
.k2.hs .fb.meh { background: #E8EDF3; }
.k2.hs .gtag { background: #E4E9F0; }
.k2.hs .ansbox.empty, .k2.hs .zc.none, .k2.hs .zc.hint, .k2.hs .bd { border-color: #C5CDD8; }
/* 教科の切りかえ（英語が使える子だけ。2026-10-05） */
.ktop .subj { border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; padding: 6px 10px; line-height: 1.2; }
.pbody .seg.subj { margin-bottom: 4px; }
/* 教科の切りかえ（数学・英語以外が入ったとき。全教科が並ぶセグメント。2026-10-07） */
.ksubjs { display: flex; gap: 6px; padding: 4px 16px 2px; }
.ksub { flex: 1; min-width: 0; border: 1px solid var(--paper-line); background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 4px; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.ksub.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.sky .ksub { background: rgba(255,255,255,.12); border-color: rgba(243,234,210,.3); color: #f3ead2; }
.sky .ksub.on { background: #f3ead2; border-color: #f3ead2; color: #1a2140; }
/* 英単語（2026-10-05） */
.vcard { text-align: center; padding: 24px 16px; }
.vcard .vw { font-size: 40px; font-weight: 800; letter-spacing: .02em; }
.vcard .vpos { font-size: 13px; opacity: .6; margin-bottom: 10px; }
.vcard .vja { font-size: 22px; font-weight: 700; margin: 8px 0; }
.vcard .vex { font-size: 16px; line-height: 1.6; }
.vcard .vex span { font-size: 13px; opacity: .65; }
.qmode { font-size: 12px; opacity: .6; margin-bottom: 6px; }
.vhint { display: block; margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: #fff7e0; color: #7a5200; text-decoration: none; font-size: 14px; }
.vwlist { padding-left: 18px; line-height: 1.7; }
.vwlist span { font-size: 13px; opacity: .65; }

/* 今日の調子（顔3つ）・今日の単元の練習の入口（docs/student_tasks_2026-10-06.md） */
.moodq { display: flex; gap: 4px; flex: 0 0 auto; }
.prow .col4 { min-width: 0; flex: 1; }
.mq-b { width: 46px; border: 1px solid var(--paper-line); background: #fff; border-radius: 12px; padding: 2px 2px 1px; display: flex; flex-direction: column; align-items: center; gap: 0; font: inherit; color: var(--navy); }
.mq-b svg { width: 24px; height: 24px; }
.mq-b small { font-size: 10px; line-height: 1.2; color: var(--sub); }
.mq-b:active { border-color: var(--gold); background: #fff8e8; }
.qn.solo { margin-left: auto; }
.tlink { margin: 0 16px; background: #fff; border-radius: 14px; padding: 9px 14px; display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--navy); box-shadow: 0 1px 0 var(--paper-line); white-space: nowrap; overflow: hidden; }
.tlink b { font-size: 13.5px; }
.tlink span { font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; }
.prow b .lv { display: inline-block; margin-left: 4px; }

/* 週次：今週の目標・今週のふりかえり */
.wgoal { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.wgoal b { font-size: 12.5px; }
.wgoal span { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.wgoal em { font-style: normal; font-weight: 700; color: var(--orange); }
.wgoal.ok em { color: #3b8c5a; }
.wgoal .tiny { margin-left: auto; }
.rvp { margin-left: auto; flex: 0 0 auto; border: 1.5px solid var(--orange); color: var(--orange); background: #fff; border-radius: 999px; padding: 0 9px; line-height: 1.5; font: inherit; font-size: 12px; font-weight: 700; }
.rvp.done { border-color: transparent; background: none; color: var(--sub); padding-right: 0; }

/* 今日の挑む星（毎日の選択をやめて、1行＋差しかえ） */
.choose.one { display: flex; flex-direction: row; align-items: center; gap: 8px; border: 1px solid rgba(243,234,210,.25); background: rgba(9,18,36,.55); border-radius: 12px; padding: 6px 10px; font-size: 13px; white-space: nowrap; overflow: hidden; }
.choose.one .ch1 { font-size: 11.5px; color: var(--gold); font-weight: 700; }
.choose.one b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.choose.one small { font-size: 10.5px; color: #c9d2e3; }
.choose.one .swap { margin-left: auto; border: 1px solid rgba(243,234,210,.35); background: none; color: #f3ead2; border-radius: 999px; padding: 1px 10px; font: inherit; font-size: 12px; }
.choose.one .mst { width: 20px; height: 20px; flex: 0 0 auto; }

/* 記録画面（#/k/log）と、ホームの「記録 ›」 */
.rlink { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--blue); text-decoration: none; white-space: nowrap; }
.lgcard { background: #fff; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 0 var(--paper-line); }
.lgcard > b { font-size: 14px; }
.lgh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lgh b { font-size: 14px; }
.lgbig { font-size: 22px; font-weight: 700; color: var(--navy); }
.lgnav { display: flex; gap: 6px; }
.lgnav button { border: 1px solid var(--paper-line); background: #fff; border-radius: 8px; padding: 2px 10px; font: inherit; font-size: 13px; color: var(--navy); }
.lgnav button:disabled { opacity: .35; }
.lgcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.lgcal .lgwd { font-size: 11px; color: var(--sub); }
.lgc { aspect-ratio: 1 / 1; border-radius: 10px; background: #faf7ef; border: 1px solid var(--paper-line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--navy); }
.lgc.out { opacity: .35; }
.lgc.lgtoday { border: 2px solid var(--gold); }
.lgc .lgdots { display: flex; gap: 3px; height: 6px; }
.lgdot { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.lgdot.e, .lgcard .e { background: var(--orange); color: var(--orange); }
.lgdot.e { color: inherit; }
.lgrow { display: flex; flex-direction: column; gap: 3px; }
.lgrow > b { font-size: 12.5px; }
.lgb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sub); }
.lgb span { width: 2.4em; }
.lgb i { display: block; height: 8px; border-radius: 4px; background: var(--navy); min-width: 3px; }
.lgb.prev i { background: #b9bfd0; }
.lgb em { font-style: normal; font-weight: 700; color: var(--navy); }
.lgsum { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 13px; }
.lgsum em { font-style: normal; font-weight: 700; }
.lgscore { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lgscore li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.lgscore li span:first-child { color: var(--sub); width: 3em; }
.lgscore li b { margin-left: auto; }

/* しるし（アイコン用ガチャ・自分のしるし） */
.mkv { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.mkhome { display: inline-flex; align-items: center; align-self: center; text-decoration: none; }
.mkbig { display: inline-flex; width: 48px; justify-content: center; }
.mkreveal { display: flex; justify-content: center; padding: 18px 0 6px; }
.mkcur { display: flex; align-items: center; gap: 12px; }
.mkgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mkc { border: 1px solid var(--paper-line); background: #fff; border-radius: 14px; padding: 8px 2px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px; font: inherit; font-size: 11px; color: var(--sub); }
.mkc.on { border: 2px solid var(--gold); }
.mkc.lock { background: #f1ede2; }
.mkc .q { font-size: 20px; color: #b9bfd0; }
.mkcol { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--paper-line); padding: 0; }
.mkcol.on { box-shadow: 0 0 0 3px var(--gold); }

/* 親の週課題：今週はもう出している、の案内 */
.pnote.weekhold { background: #fff6e5; border-radius: 10px; padding: 8px 10px; color: #7a4a05; }

/* 親の画面：課題の種類のボタンは2列（5列だと言葉の途中で折り返す） */
.seg.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg.kinds button:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* 理科・社会（2026-10-07）：教科の色の点（理科＝緑・社会＝紫）と、図のある問題の見え方 */
.lgdot.s, .lgcard .s { background: #2e8b57; color: #2e8b57; }
.lgdot.c, .lgcard .c { background: #8a5fb0; color: #8a5fb0; }
.lgdot.s, .lgdot.c { color: inherit; }
.qcard:has(svg.fig) { justify-content: flex-start; }
.qcard:has(svg.fig) .qtext { font-size: 16px; line-height: 1.5; }
.qcard svg.fig { flex: none; max-height: 34vh; }
.choice.dunno.small { font-size: 13px; font-weight: 600; padding: 8px 10px; min-height: 0; opacity: .85; }
