/* Hallmark · macrostructure: Feature-led dashboard (one lead + asymmetric pair + ruled list) · tone: soft / calm · anchor hue: sky + orange
 * genre: editorial-soft · theme: custom (vibe: "朝の空・紙・オレンジのしるし" · paper #fff on #cfeafa · accent #E8701E · Noto Sans JP + Inter)
 * pre-emit critique: P4 H5 E4 S5 R5 V4 */
:root {
  /* 11-14 画風B（保足さん 15:06）：背景 #F3F8FB・白いカード角丸20・影うすく・橙 #FF8A3D */
  --c-sky: #E6F2FA;
  --c-sky-2: #F3F8FB;
  --c-paper: #ffffff;
  --c-tint: #F3F8FB;
  --c-ink: #17313B;
  --c-ink-2: #5B6B72;
  --c-ink-3: #66767D;
  --c-blue: #1F6FA8;
  --c-accent: #FF8A3D;
  --c-accent-dk: #E2641A;
  --c-accent-soft: #FFF1E6;
  --c-on-accent: #ffffff;
  --c-rule: rgba(13, 58, 68, .12);
  --c-cell: #E9F1F6;
  --c-err: #b4321f;
  --shadow: 0 6px 18px rgba(23, 49, 59, .06);
  --font-ja: "Noto Sans JP", system-ui, sans-serif;
  --font-en: "Inter", "Noto Sans JP", system-ui, sans-serif;
  --r: 20px;
  --r-s: 14px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  min-height: 100vh;
  margin: 0; color: var(--c-ink); font-family: var(--font-ja); font-size: 17px; line-height: 1.75;
  background: #F3F8FB;
  -webkit-font-smoothing: antialiased; font-feature-settings: "palt" 1;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.en, .num { font-family: var(--font-en); font-feature-settings: "tnum" 1; letter-spacing: -.01em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 32px; } }

/* 上の帯 */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: 18px 0 8px; }
.brand { font-weight: 900; font-size: 15px; letter-spacing: .08em; text-decoration: none; white-space: nowrap; }
.top nav { display: flex; gap: var(--sp-5); }
.top nav a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--c-ink-2); white-space: nowrap; padding: 6px 0; }
.top nav a:hover { color: var(--c-ink); }
.back { display: inline-block; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--c-ink-2); padding: 6px 0; white-space: nowrap; }
.back::before { content: ""; display: inline-block; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-1px) rotate(45deg); margin-right: 8px; }
.back:hover { color: var(--c-ink); }

/* 見出し */
.page-h { padding: var(--sp-6) 0 var(--sp-5); }
.page-h h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); line-height: 1.3; font-weight: 900; letter-spacing: .02em; overflow-wrap: anywhere; }
.page-h p { margin: var(--sp-3) 0 0; color: var(--c-ink-2); max-width: 34em; }

/* 面 */
.panel { background: var(--c-paper); border-radius: var(--r); box-shadow: var(--shadow); }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 16px; background: var(--c-accent); color: var(--c-on-accent); font: inherit; font-weight: 700; font-size: 17px; box-shadow: 0 8px 18px rgba(255, 138, 61, .35);
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s var(--ease-out), transform .15s var(--ease-out);
}
.btn:hover { background: var(--c-accent-dk); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .55; cursor: default; }
.btn.line { background: var(--c-paper); color: var(--c-accent-dk); box-shadow: inset 0 0 0 2px var(--c-accent); }
.btn.line:hover { background: var(--c-accent-soft); color: var(--c-accent-dk); }
.btn .go { width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible { border-radius: 16px; }

/* 入力 */
label.f { display: block; font-size: 15px; font-weight: 700; margin: var(--sp-4) 0 6px; }
input.in {
  width: 100%; min-height: 52px; padding: 0 16px; font: inherit; font-size: 17px; color: var(--c-ink);
  border: 1.5px solid var(--c-rule); border-radius: var(--r-s); background: var(--c-paper);
}
input.in:focus { border-color: var(--c-ink); outline: none; box-shadow: 0 0 0 3px var(--c-sky); }
.err { color: var(--c-err); font-size: 15px; min-height: 1.5em; margin: var(--sp-2) 0 0; }
.ok { color: var(--c-ink); font-size: 15px; font-weight: 700; margin: var(--sp-2) 0 0; }

/* ログイン */
.login { max-width: 460px; margin: var(--sp-5) auto var(--sp-8); padding: var(--sp-6) var(--sp-5); }
.login h2 { margin: 0; font-size: 22px; font-weight: 900; }
.login p.lead { margin: var(--sp-2) 0 0; color: var(--c-ink-2); font-size: 16px; }
.login .btn { width: 100%; margin-top: var(--sp-5); }
.login .forgot { display: block; margin-top: var(--sp-4); text-align: center; font-size: 15px; color: var(--c-ink-2); }

.wrap { min-height: 100vh; display: flex; flex-direction: column; }
.wrap > main { flex: 1 0 auto; }
.foot { margin-top: auto; padding: var(--sp-7) 0 var(--sp-7); color: var(--c-ink-3); font-size: 14px; display: flex; justify-content: space-between; gap: var(--sp-4); align-items: center; }
.foot button { background: none; border: 0; font: inherit; color: var(--c-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }

/* 11-14 アイコン（丸）と、呼び名を聞く小さな窓 */
.av { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent-dk); display: inline-grid; place-items: center; font-weight: 900; font-size: 16px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--c-rule); text-decoration: none; line-height: 1; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-l { width: 72px; height: 72px; font-size: 28px; }
.pick { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--c-ink); font-weight: 700; font-size: 16px; cursor: pointer; background: var(--c-paper); }
.pick:focus-within { outline: 3px solid var(--c-ink); outline-offset: 3px; }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
label.f small, span.f small { font-weight: 500; color: var(--c-ink-3); font-size: 13px; margin-left: 6px; }
span.f { display: block; font-size: 15px; font-weight: 700; margin: var(--sp-4) 0 6px; }
.nk-back { position: fixed; inset: 0; z-index: 80; background: rgba(13,58,68,.35); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.nk-sheet { width: 100%; max-width: 420px; padding: var(--sp-5); }
.nk-sheet h2 { margin: 0; font-size: 22px; font-weight: 900; }
.nk-sheet .btn { width: 100%; margin-top: var(--sp-3); }
.nk-icon { display: flex; align-items: center; gap: var(--sp-4); }
.nk-mi { margin: 4px 0 0; font-size: 14px; color: var(--c-ink-3); }
body.nk-open { overflow: hidden; }

/* 11-14 PC・タブレット（820px 以上）：左のメニューを出したまま、右の中身だけ変える。819 以下（スマホ）は今の1カラムのまま */
.side { display: none; }
@media (min-width: 820px) {
  body.authed .side, body.has-side .side { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 232px; padding: 22px 14px; background: rgba(255,255,255,.72); backdrop-filter: blur(6px); border-right: 1px solid var(--c-rule); z-index: 20; overflow-y: auto; }
  body.authed .wrap, body.has-side .wrap { margin-left: 232px; }
  body.authed .top, body.has-side .top { visibility: hidden; height: 24px; padding: 0; }
  .side .brand { display: block; padding: 4px 12px 18px; }
  .side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .side a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 16px; color: var(--c-ink-2); }
  .side a:hover { background: var(--c-tint); color: var(--c-ink); }
  .side a { position: relative; }
  .side a[aria-current="page"] { background: var(--c-accent-soft); color: var(--c-ink); }
  .side ul a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--c-accent); }
  .side .sep { height: 1px; background: var(--c-rule); margin: 10px 12px; }
  .side .side-end { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--c-rule); display: grid; gap: 2px; }
  .side .side-me { font-size: 15px; padding: 8px 12px; }
  .side .side-out { justify-self: start; background: none; border: 0; font: inherit; font-size: 14px; color: var(--c-ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 12px; }
}
@media (min-width: 820px) and (max-width: 1099px) { body.authed .wrap, body.has-side .wrap { padding: 0 24px; } }

/* 右の中身（学習記録・10の場面・音読ライブと英語で話しかけるの入口） */
.pane { display: none; }
body.show-pane .pane { display: block; padding-bottom: 24px; }
body.show-pane .wrap > :not(.top):not(.pane) { display: none !important; }
.pane iframe { display: block; width: 100%; height: calc(100vh - 48px); min-height: 560px; border: 0; border-radius: var(--r); background: var(--c-paper); box-shadow: var(--shadow); }

/* 学習用の窓（音読ライブ・英語で話しかける）：画面いっぱいに最前面へ重ねる */
.appwin { position: fixed; inset: 0; z-index: 100; background: var(--c-paper); display: flex; flex-direction: column; }
.appwin[hidden] { display: none !important; }
.appwin .bar { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 6px 10px; background: var(--c-ink); color: #fff; }
.appwin .bar b { font-size: 15px; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appwin .bar button { min-height: 36px; font: inherit; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
@media (max-width: 759px) { .appwin .bar button { min-height: 44px; min-width: 64px; } }
.appwin .close { background: #fff; color: var(--c-ink); border: 0; }
.appwin .pop { display: none; background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
@media (min-width: 820px) { .appwin .pop { display: inline-block; } }
.appwin iframe { flex: 1 1 auto; width: 100%; border: 0; display: block; }
.appwin .box { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
/* 11-15 会話は重ねる窓：後ろのページ（左メニューも）を暗くして残し、手前の中央に出す */
.appwin.modal { background: rgba(12, 22, 28, .62); align-items: center; justify-content: center; padding: 12px; }
.appwin.modal .box { flex: 0 0 auto; width: min(720px, 100%); height: 100%; background: var(--c-paper); border-radius: 16px; overflow: hidden; box-shadow: 0 18px 60px rgba(0,0,0,.35); }
@media (min-width: 760px) { .appwin.modal { padding: 0; } .appwin.modal .box { width: 90vw; height: 90vh; max-width: none; } }   /* 11-15 保足さん：画面の約9割 */
.appwin.modal .pop { display: none !important; }
body.win-open { overflow: hidden; }

[hidden] { display: none !important; }
.loading { min-height: 50vh; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 11-14 r2 白い面で包む中身のページ（マイページ・入会特典） */
.sheet { background: var(--c-paper); border-radius: var(--r); box-shadow: var(--shadow); padding: var(--sp-5) var(--sp-5) var(--sp-6); }
@media (min-width: 760px) { .sheet { padding: var(--sp-6) var(--sp-7) var(--sp-7); } }

/* 11-15 Astra ループ③：案2 デイリー・スタジオ（色は画風B のまま）— メニューにアイコン */
.ic { display: inline-block; flex: 0 0 auto; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.side ul a { display: flex !important; align-items: center; gap: 12px; }
.side ul a .ic { width: 24px; height: 24px; opacity: .85; }
.side ul a[aria-current] .ic { opacity: 1; color: var(--c-accent-dk); }
