/* ============================================================
   タイソウベース（TAISO BASE）デザインシステム v4
   鶴見虹子体操School（KOKO GYM）の紺×金を「差し色」として使う、明るく読みやすい画面。
   - 文字：日本語はゴシック（Hiragino / Noto Sans JP）、英字・数字は Plus Jakarta Sans。
           明朝は認定証の書面だけ。
   - 面　：背景はサテンの淡い地。セクションは「見出しを内側に持つ1枚のカード（.panel）」。
   - 色　：紺＝文字・主ボタン・選択中メニュー／金＝進捗と小さな印だけ／緑＝できた。
           セクションごとに見出しアイコンの色（tone）を変えて見分けやすくする。
   - ガラス：浮遊メニュー（スマホ下・PC左）とヘッダーだけ。
   ============================================================ */

:root {
  color-scheme: light;
  --navy-950: #061331;
  --navy-900: #0a1d44;
  --navy: #102c5c;
  --navy-700: #24427a;
  --navy-300: #8fa2c4;
  --navy-tint: #edf1f8;
  --gold: #c4a058;
  --gold-light: #e8d29a;
  --gold-ink: #87692c;   /* 白地 5.0:1 */
  --gold-tint: #f8f1df;
  --gold-grad: linear-gradient(90deg, #c9a45e, #dcc185);

  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --ink: #18213a;
  --ink-2: #3a4357;
  --ink-3: #5a6275;   /* 白地 6.1:1 */
  --ink-4: #8e95a5;   /* 装飾・プレースホルダ専用 */
  --line: rgba(16, 44, 92, 0.09);
  --line-2: rgba(16, 44, 92, 0.18);
  --fill: rgba(16, 44, 92, 0.05);
  --fill-2: rgba(16, 44, 92, 0.1);
  --hairline: rgba(16, 44, 92, 0.08);

  --green: #2f8f6f;
  --green-ink: #1f6d54;
  --green-tint: #e8f3ee;
  --sky: #5b8fcf;
  --sky-ink: #2a5a92;
  --sky-tint: #ebf2fb;
  --red: #c4473b;
  --red-ink: #a8362b;
  --red-tint: #fbecea;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow-1: 0 1px 2px rgba(10, 29, 68, 0.04), 0 4px 16px rgba(10, 29, 68, 0.05);
  --shadow-2: 0 4px 12px rgba(10, 29, 68, 0.07), 0 18px 40px rgba(10, 29, 68, 0.1);
  --glass: rgba(255, 255, 255, 0.74);
  --glass-border: rgba(255, 255, 255, 0.85);
  --blur: saturate(170%) blur(22px);

  --gutter: 16px;
  --maxw: 1120px;
  --header-h: 58px;
  --tabbar-space: 0px;
  --rail-space: 0px;
  --sticky-top: calc(var(--header-h) + 10px);

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-num: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (min-width: 721px) {
  :root { --gutter: 28px; }
}
@media (min-width: 901px) {
  :root { --rail-space: 124px; --sticky-top: 16px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
fieldset { border: 0; min-width: 0; }
img, svg, video { max-width: 100%; }

html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: var(--font);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-wrap: break-word;
  line-break: strict;
  word-break: auto-phrase;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tabbar-space);
}
/* 背景：白いサテン（KOKO GYM の地）を薄く敷く */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(244, 243, 239, 0.4), rgba(244, 243, 239, 0.8)),
    url("../img/satin.jpg") center / cover no-repeat;
}

/* 改行：日本語は文節で折り返し（Chrome）、短い見出しは行を均等に、1文字だけの行を作らない */
h1, h2, h3, .page-title, .section-title, .sheet-title, .panel-title { text-wrap: balance; }
.row-title, .hero-title, .c-title, .step-title, .q-body, .n-title, .cert-title, .s-big, .result-body strong, .auth-note, .page-lead { text-wrap: balance; }
p, .row-meta, .step-meta, .note-row span, .c-desc, .n-body, .choice-text, .panel-sub { text-wrap: pretty; }
table.roster, .break, input, textarea { word-break: normal; }

a { color: var(--navy-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid rgba(91, 143, 207, 0.55); outline-offset: 2px; border-radius: 8px; }

.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* 英字の小見出し（大文字・字間広め） */
.en, .en-label {
  font-family: var(--font-num); font-style: normal; font-weight: 700; font-size: 11.5px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink); line-height: 1.3;
}

/* ---------- ロゴ ---------- */
.tb-logo { display: block; flex: none; width: 36px; height: 36px; }
.tb-wordmark { display: flex; flex-direction: column; line-height: 1.15; }
.tb-wordmark b { font-family: var(--font-num); font-weight: 800; font-size: 14px; letter-spacing: 0.18em; color: var(--navy-900); }
.tb-wordmark small { font-size: 10px; font-weight: 500; letter-spacing: 0.12em; color: var(--ink-3); margin-top: 2px; }

/* ---------- ヘッダー（スマホ：明るいすりガラス） ---------- */
.tb-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 243, 239, 0.8);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--hairline);
}
.tb-header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--header-h); display: flex; align-items: center; gap: 12px;
}
.tb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.tb-brand:hover { text-decoration: none; }
.tb-header .tb-avatar-link { margin-left: auto; }
@media (min-width: 901px) {
  .tb-header { display: none; }
}
.tb-avatar {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(10, 29, 68, 0.18);
}

/* ---------- 浮遊メニュー（スマホ下のタブバー／PC左のレール） ---------- */
.tb-tabbar, .tb-rail {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 36px rgba(10, 29, 68, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.tb-tabbar a, .tb-rail a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; line-height: 1.25; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--ink-2); text-decoration: none; border-radius: 22px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.tb-tabbar a .ic, .tb-rail a .ic { width: 24px; height: 24px; color: var(--navy); }
.tb-tabbar a:hover, .tb-rail a:hover { background: rgba(16, 44, 92, 0.06); text-decoration: none; }
.tb-tabbar a.active, .tb-rail a.active {
  background: var(--navy); color: #fff;
  box-shadow: 0 4px 12px rgba(10, 29, 68, 0.22);
}
.tb-tabbar a.active .ic, .tb-rail a.active .ic { color: var(--gold-light); }

.tb-tabbar { display: none; }
.tb-rail { display: none; }
@media (max-width: 900px) {
  :root { --tabbar-space: calc(98px + env(safe-area-inset-bottom)); }
  .tb-tabbar {
    display: flex; position: fixed; z-index: 60;
    left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: min(calc(100% - 24px), 520px); padding: 6px; border-radius: 32px;
  }
  .tb-tabbar a { flex: 1 1 0; min-width: 0; padding: 7px 2px 6px; border-radius: 26px; }
}
@media (max-width: 360px) {
  .tb-tabbar a { font-size: 9.5px; letter-spacing: 0; }
}
@media (min-width: 901px) {
  .tb-rail {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: fixed; z-index: 60; left: 16px; top: 16px; bottom: 16px; width: 92px;
    padding: 14px 8px; border-radius: 30px; overflow-y: auto; scrollbar-width: none;
  }
  .tb-rail::-webkit-scrollbar { display: none; }
  .tb-rail a { padding: 11px 2px 9px; }
  .tb-rail .rail-logo { display: grid; place-items: center; padding: 2px 0 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .tb-rail .rail-logo:hover { background: none; }
  .tb-rail .rail-logo img { width: 52px; height: 52px; }
  .tb-rail .rail-spacer { flex: 1; min-height: 8px; }
  .tb-rail .rail-sep { height: 1px; background: var(--line); margin: 6px 10px; }
  body.has-rail { padding-left: var(--rail-space); }
}

/* ---------- サブナビ（運営・園管理） ---------- */
.subnav {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)) 22px; padding: 2px var(--gutter) 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2); text-decoration: none;
  background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 0 0 1px var(--line);
}
.subnav a .ic { width: 16px; height: 16px; color: var(--navy-700); }
.subnav a:hover { background: #fff; text-decoration: none; }
.subnav a.active { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(10, 29, 68, 0.18); }
.subnav a.active .ic { color: var(--gold-light); }
.subnav a .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; margin-right: -4px;
  display: inline-grid; place-items: center; font-family: var(--font-num); font-size: 11.5px; font-weight: 800;
  background: var(--red-tint); color: var(--red-ink);
}
.subnav a.active .count { background: rgba(255, 255, 255, 0.18); color: #fff; }
/* PC：項目が多いので横スクロールにせず折り返して全部見せる */
@media (min-width: 901px) {
  .subnav { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; -webkit-mask-image: none; mask-image: none; }
}

/* ---------- ページ上部の帯（淡い紺がかった地に写真をやわらかく敷き、下は背景に溶かす） ---------- */
.band {
  /* 横だけ切る（カードの影を帯の下端で切らない） */
  position: relative; overflow: hidden; overflow-x: clip; overflow-y: visible; isolation: isolate; color: var(--ink);
  background: linear-gradient(180deg, rgba(222, 230, 242, 0.92) 0%, rgba(232, 236, 243, 0.7) 55%, rgba(244, 243, 239, 0) 100%);
}
.band::before {
  content: ""; position: absolute; z-index: -2; top: 0; right: 0; bottom: 0; width: min(62%, 620px);
  background: var(--band-photo, none) center 30% / cover no-repeat;
  opacity: 0.26; filter: grayscale(1) contrast(0.9); mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(180deg, #000 55%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(180deg, #000 55%, transparent 100%);
  mask-composite: intersect;
}
.band-inner { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 26px var(--gutter) 20px; }
.band-line { display: none; }
.band .en-label { display: block; margin-bottom: 6px; }
.band .page-title { margin-bottom: 4px; }
.band .page-title .sub, .band .band-sub { color: var(--ink-3); }
.band .band-sub { font-size: 14px; max-width: 46em; }
.band .tags .tag { background: rgba(255, 255, 255, 0.85); }
@media (min-width: 721px) {
  .band-inner { padding: 38px var(--gutter) 24px; }
}
@media (min-width: 901px) {
  .band { margin-left: calc(-1 * var(--rail-space)); padding-left: var(--rail-space); }
}
.band + .tb-main { padding-top: 8px; }

/* ---------- レイアウト ---------- */
.tb-main { max-width: var(--maxw); margin: 0 auto; padding: 22px var(--gutter) 80px; }
@media (min-width: 721px) { .tb-main { padding-top: 34px; } }
.tb-narrow { max-width: 680px; }

.tb-back {
  display: inline-flex; align-items: center; gap: 2px; margin: 0 0 10px -6px; padding: 4px 8px 4px 2px;
  font-size: 15px; font-weight: 600; color: var(--navy-700); text-decoration: none; border-radius: 10px; max-width: 100%;
}
.tb-back .ic { width: 20px; height: 20px; }
.tb-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-back:hover { background: var(--fill); text-decoration: none; }

.eyebrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.04em; margin-bottom: 4px;
}

/* 大見出し */
.page-title {
  display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap;
  font-size: 26px; font-weight: 700; line-height: 1.4; letter-spacing: 0.02em;
  color: var(--navy-900); margin-bottom: 20px;
}
.page-title .sub { order: 3; flex-basis: 100%; font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.02em; line-height: 1.5; }
@media (min-width: 721px) { .page-title { font-size: 30px; } }
.page-lead { color: var(--ink-3); font-size: 15px; margin-bottom: 24px; max-width: 46em; }
.page-head { margin-bottom: 22px; }
.page-head .page-title { margin-bottom: 6px; }
.page-title + .page-lead { margin-top: -12px; }
.page-head .page-title + .page-lead { margin-top: 8px; }

/* 管理画面などの小見出し（カードのすぐ上に寄せる） */
.section-title {
  display: flex; align-items: baseline; gap: 2px 10px; flex-wrap: wrap;
  font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--navy-900);
  margin: 30px 2px 10px;
}
.section-title .small, .section-title small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.section-title .more { margin-left: auto; font-size: 14px; font-weight: 600; }

/* ---------- セクションカード（見出しを内側に持つ） ---------- */
.panel {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-1); border: 1px solid var(--hairline);
  margin-bottom: 16px; overflow: hidden;
}
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; }
.panel-ic {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px;
  background: var(--navy-tint); color: var(--navy);
  font-family: var(--font-num); font-weight: 800; font-size: 15px;
}
.panel-ic .ic { width: 18px; height: 18px; }
.panel.tone-gold .panel-ic { background: var(--gold-tint); color: var(--gold-ink); }
.panel.tone-sky .panel-ic { background: var(--sky-tint); color: var(--sky-ink); }
.panel.tone-green .panel-ic { background: var(--green-tint); color: var(--green-ink); }
.panel.tone-red .panel-ic { background: var(--red-tint); color: var(--red-ink); }
.panel-ic.num { background: var(--navy); color: #fff; }
.panel.tone-done .panel-ic.num { background: var(--green); }
.panel-heading { flex: 1; min-width: 0; }
.panel-title { font-size: 16.5px; font-weight: 700; line-height: 1.45; color: var(--navy-900); }
.panel-title .badge { vertical-align: 2px; margin-left: 4px; }
.panel-sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin-top: 1px; }
.panel-link {
  flex: none; display: inline-flex; align-items: center; gap: 1px; padding: 6px 4px 6px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--navy-700); white-space: nowrap;
}
.panel-link .ic { width: 16px; height: 16px; }
.panel-link:hover { background: var(--fill); text-decoration: none; }
.panel-body { padding: 4px 18px 18px; }
.panel-flush > .list-row:first-child, .panel-flush > details:first-child, .panel-flush > .roster-wrap:first-child { border-top: 1px solid var(--line); }
.panel .list, .panel .roster-wrap { box-shadow: none; border: 0; border-radius: 0; margin: 0; background: transparent; }
.panel-flush > .empty { border-top: 1px solid var(--line); }

/* ---------- カード ---------- */
.sheet {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-1); border: 1px solid var(--hairline);
  padding: 20px; margin-bottom: 14px;
}
.sheet + .sheet { margin-top: 0; }
.sheet-title { font-size: 16.5px; font-weight: 700; line-height: 1.45; margin-bottom: 12px; color: var(--navy-900); }
.sheet.is-ok { background: linear-gradient(180deg, var(--green-tint), #fff 70%); border-color: rgba(47, 143, 111, 0.2); }
.sheet.is-warn { background: linear-gradient(180deg, var(--red-tint), #fff 70%); border-color: rgba(196, 71, 59, 0.18); }
.sheet.is-accent { background: linear-gradient(180deg, var(--navy-tint), #fff 70%); border-color: rgba(16, 44, 92, 0.12); }
.sheet.is-quiet { background: rgba(255, 255, 255, 0.6); box-shadow: none; border: 1px dashed var(--line-2); }
.glass {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-1);
}

/* ---------- ホームの「次にやること」 ---------- */
.hero-panel { padding: 20px; display: grid; gap: 16px; align-items: center; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 6px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--navy); background: var(--navy-tint); margin-bottom: 10px;
}
.hero-chip .dot { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; }
.hero-chip .dot .ic { width: 10px; height: 10px; margin-left: 1px; }
.hero-panel.is-done .hero-chip { background: var(--green-tint); color: var(--green-ink); }
.hero-panel.is-done .hero-chip .dot { background: var(--green); }
.hero-title { font-size: 21px; font-weight: 700; line-height: 1.45; color: var(--navy-900); }
.hero-meta { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.hero-progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.hero-progress .progress { flex: 1; }
.hero-progress .pct { font-family: var(--font-num); font-weight: 700; font-size: 14px; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.hero-panel .btn { width: 100%; }
@media (min-width: 721px) {
  .hero-panel { grid-template-columns: minmax(0, 1fr) auto; gap: 28px; padding: 24px 26px; }
  .hero-panel .btn { width: auto; min-width: 220px; }
  .hero-title { font-size: 23px; }
}

/* ---------- プログレスバー（金は細い線としてだけ使う） ---------- */
.progress { display: block; position: relative; height: 6px; border-radius: 999px; background: var(--fill-2); overflow: hidden; }
.progress > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--gold-grad); transition: width 0.6s var(--ease); }
.progress.is-done > i { background: linear-gradient(90deg, #4fae8b, var(--green)); }
.progress.thin { height: 5px; }
.progress .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--navy); opacity: 0.45; border-radius: 1px; }
.progress.has-mark { overflow: visible; }

/* 進捗リング */
.ring {
  --p: 0; --c: var(--gold);
  position: relative; display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--fill-2) 0);
}
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring > span { position: relative; font-family: var(--font-num); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy-900); }
.ring > span small { font-size: 9px; margin-left: 1px; }
.ring.is-done { --c: var(--green); }
.ring.sm { width: 36px; height: 36px; }
.ring.sm::before { inset: 4px; }
.ring.sm > span { font-size: 10.5px; }
.ring.lg { width: 72px; height: 72px; }
.ring.lg::before { inset: 6px; }
.ring.lg > span { font-size: 18px; }

/* ---------- 数値 ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border-radius: 18px; padding: 14px 14px 12px; box-shadow: var(--shadow-1); border: 1px solid var(--hairline); min-width: 0; }
.band .stat { background: rgba(255, 255, 255, 0.82); }
.stat-ic { display: none; }
.stat-v { font-family: var(--font-num); font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--navy-900); white-space: nowrap; letter-spacing: -0.01em; }
.stat-v small { font-family: var(--font); font-size: 12px; font-weight: 700; margin-left: 3px; color: var(--ink-3); letter-spacing: 0; }
.stat-l { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--ink-3); margin-top: 4px; }
/* 学習の記録カードの中の小さな数値（縦線で区切る） */
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 2px 0 16px; padding: 12px 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mini-stats > div { text-align: center; min-width: 0; }
.mini-stats > div + div { border-left: 1px solid var(--line); }
.mini-stats b { font-family: var(--font-num); font-size: 22px; font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mini-stats b small { font-family: var(--font); font-size: 11px; font-weight: 700; color: var(--ink-3); margin-left: 2px; letter-spacing: 0; }
.mini-stats span { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }

/* ---------- 行（グループリスト） ---------- */
.list {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-1); border: 1px solid var(--hairline); margin-bottom: 14px;
}
.list-row {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 62px; padding: 13px 18px; color: inherit; text-decoration: none;
}
.list-row + .list-row::before { content: ""; position: absolute; top: 0; right: 0; left: 68px; height: 1px; background: var(--line); }
.list-row.no-ic + .list-row::before, .list-row.no-ic::before { left: 18px; }
.list-row.no-ic { min-height: 52px; }
a.list-row { transition: background 0.15s; }
a.list-row:hover { background: rgba(16, 44, 92, 0.03); text-decoration: none; }
a.list-row:active { background: rgba(16, 44, 92, 0.06); }
.row-ic {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-3);
  font-family: var(--font-num); font-size: 14px; font-weight: 800;
}
.row-ic .ic { width: 18px; height: 18px; }
.row-ic.is-done { background: var(--green); color: #fff; }
.row-ic.is-done .ic { stroke-width: 2.6; }
.row-ic.is-next { background: var(--navy); color: #fff; box-shadow: 0 0 0 4px rgba(16, 44, 92, 0.12); }
.row-ic.is-todo { box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--navy-700); }
.row-ic.is-locked { background: var(--fill); color: var(--ink-4); }
.row-ic.is-info { background: var(--navy-tint); color: var(--navy); }
.row-ic.is-soft { background: var(--fill); color: var(--navy-700); }
.row-ic.sq { border-radius: 11px; }
.row-body { flex: 1; min-width: 0; }
.row-title { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.row-meta { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; }
.row-meta .badge { margin-right: 6px; vertical-align: 1px; }
.row-kicker { display: block; font-size: 11.5px; font-weight: 700; color: var(--navy-300); letter-spacing: 0.04em; line-height: 1.4; margin-bottom: 1px; }
.row-end { flex: none; display: flex; align-items: center; gap: 8px; color: var(--ink-4); font-size: 14px; }
.row-end .ic { width: 18px; height: 18px; }
.row-end .pct { font-family: var(--font-num); font-weight: 700; font-size: 14px; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.list-row.is-next { background: linear-gradient(90deg, var(--navy-tint), rgba(237, 241, 248, 0) 85%); }
.list-row.is-locked .row-title, .list-row.is-locked .row-meta, .list-row.is-locked .row-kicker { color: var(--ink-4); }
.list-row .row-value { font-size: 15px; color: var(--ink-3); text-align: right; overflow-wrap: anywhere; }
.list-foot { font-size: 13px; color: var(--ink-3); margin: -6px 6px 16px; }
/* 写真サムネイルつきの行（受講中のコース） */
.thumb { flex: none; width: 76px; height: 54px; border-radius: 12px; background: var(--navy) center 30% / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04); }
.course-row .progress { margin-top: 8px; max-width: 320px; }

/* バッジ・タグ */
.badge {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.5;
  background: var(--fill); color: var(--ink-2);
}
.badge.next { background: var(--navy); color: #fff; }
.badge.done { background: var(--green-tint); color: var(--green-ink); }
.badge.info { background: var(--navy-tint); color: var(--navy); }
.badge.warn { background: var(--red-tint); color: var(--red-ink); }
.badge .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.tag {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.5;
  padding: 2px 9px; border-radius: 999px; background: var(--fill); color: var(--ink-2);
}
.tag.mat { background: var(--green-tint); color: var(--green-ink); }
.tag.shu { background: var(--red-tint); color: var(--red-ink); }
.tag.sky { background: var(--navy-tint); color: var(--navy); }
.tag.gold { background: var(--gold-tint); color: var(--gold-ink); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 表 ---------- */
.roster-wrap {
  overflow-x: auto; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-1); border: 1px solid var(--hairline); margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}
.roster-wrap.mb-2 { margin-bottom: 16px; }
table.roster { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.sheet table.roster { min-width: 0; }
table.roster th {
  text-align: left; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.04em;
  padding: 12px 14px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
table.roster td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.roster tr:last-child td { border-bottom: none; }
table.roster tbody tr { transition: background 0.15s; }
table.roster tbody tr:hover { background: rgba(16, 44, 92, 0.025); }
table.roster td.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.roster .muted { color: var(--ink-3); font-size: 13px; }
table.roster td a { font-weight: 700; }
table.roster input, table.roster select, form.lesson-row input, form.lesson-row select, .flex > input, .flex > select, .flex label input {
  min-height: 38px; padding: 7px 11px; font-size: 14px; border-radius: 10px;
}
table.roster select, form.lesson-row select, .flex > select { padding-right: 32px; background-position: right 9px center; background-size: 16px; }
table.roster input[type="file"] { padding: 5px 6px; font-size: 12px; min-width: 210px; }
table.roster input[type="file"]::file-selector-button { padding: 5px 10px; font-size: 12px; margin-right: 6px; }
.cell-form { display: grid; gap: 6px; min-width: 210px; }
.cell-form-row { display: flex; gap: 6px; align-items: center; }
.cell-form-row input { width: 90px; }
.cell-form-row select { width: auto; min-width: 110px; }
.sheet table.roster td { padding: 10px 4px; }
.sheet table.roster td.muted { width: 34%; }
@media (max-width: 720px) {
  .roster-wrap table.roster th:first-child,
  .roster-wrap table.roster td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
  .roster-wrap table.roster th:first-child { background: var(--surface-2); }
}

/* ---------- 完了の印 ---------- */
.stamp {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); color: transparent; font-size: 0; position: relative; -webkit-user-select: none; user-select: none;
}
.stamp::after {
  content: ""; width: 50%; height: 50%; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stamp.large { width: 52px; height: 52px; box-shadow: 0 0 0 6px rgba(47, 143, 111, 0.14); }
.stamp-pending { display: inline-block; flex: none; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); color: transparent; font-size: 0; }
.is-hidden { visibility: hidden; }

/* ---------- 学習カレンダー（学習時間で金の濃さが変わる） ---------- */
.stampcard { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.stampcard .wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); padding-bottom: 2px; }
.stampcard .wd.sun { color: var(--red-ink); }
.stampcard .wd.sat { color: var(--sky-ink); }
.stampcard .day {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; max-width: 40px; width: 100%; justify-self: center;
  font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}
.stampcard .day .d { line-height: 1; }
.stampcard .day.blank { visibility: hidden; }
.stampcard .day.lv1 { background: var(--gold-tint); color: var(--gold-ink); font-weight: 800; }
.stampcard .day.lv2 { background: #ecd9a6; color: #5e4716; font-weight: 800; }
.stampcard .day.lv3 { background: #cfa95f; color: #fff; font-weight: 800; }
.stampcard .day.today { box-shadow: inset 0 0 0 2px var(--navy); color: var(--navy); font-weight: 800; }
.stamp-legend { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.stamp-legend .scale { display: inline-flex; align-items: center; gap: 4px; }
.stamp-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.stamp-legend .l1 { background: var(--gold-tint); box-shadow: inset 0 0 0 1px rgba(196, 160, 88, 0.4); }
.stamp-legend .l2 { background: #ecd9a6; }
.stamp-legend .l3 { background: #cfa95f; }
.stamp-legend .lt { box-shadow: inset 0 0 0 2px var(--navy); }

/* 名簿内の進捗ドット */
.beads { display: inline-flex; gap: 3px; align-items: center; margin-right: 6px; vertical-align: 1px; }
.beads i { width: 8px; height: 8px; border-radius: 50%; background: var(--fill-2); display: inline-block; }
.beads i.on { background: var(--green); }
.beads i.half { background: linear-gradient(90deg, var(--green) 50%, var(--fill-2) 50%); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--font); font-size: 15px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.2;
  white-space: nowrap; text-decoration: none; text-align: center;
  background: var(--fill); color: var(--navy-900);
  transition: background 0.18s var(--ease), transform 0.12s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { background: var(--fill-2); color: var(--navy-900); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary, .btn-shu, .btn-gold {
  background: var(--navy); color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 6px 16px rgba(10, 29, 68, 0.18);
}
.btn-primary:hover, .btn-shu:hover, .btn-gold:hover { background: var(--navy-900); color: #fff; }
.btn .play-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; margin-left: -8px; }
.btn .play-dot .ic { width: 12px; height: 12px; margin-left: 2px; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; color: var(--navy-700); }
.btn-ghost:hover { background: var(--fill); color: var(--navy-700); }
.btn-danger { background: var(--red-tint); color: var(--red-ink); }
.btn-danger:hover { background: #f7dcd8; color: var(--red-ink); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions.center { justify-content: center; }
@media (max-width: 720px) {
  .actions.stack { flex-direction: column; align-items: stretch; }
  .actions.stack .btn { width: 100%; }
}

/* ---------- フォーム ---------- */
label.field, div.field { display: block; margin-bottom: 16px; font-size: 14px; }
label.field .label, div.field .label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; letter-spacing: 0.02em; }
label.field > .small, div.field > .small { display: block; margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="file"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font-size: 16px; font-family: var(--font); line-height: 1.4;
  border: 1px solid transparent; border-radius: 12px; background: rgba(16, 44, 92, 0.05); color: var(--ink);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
input[type="file"] { padding: 9px 10px; font-size: 14px; cursor: pointer; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; font-size: 13px; border: 0; border-radius: 999px; padding: 7px 14px; margin-right: 10px;
  background: var(--navy); color: #fff; cursor: pointer;
}
select {
  padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6275' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
input:hover, select:hover, textarea:hover { background-color: rgba(16, 44, 92, 0.08); }
input:focus, select:focus, textarea:focus { outline: none; background-color: #fff; border-color: var(--navy-300); box-shadow: 0 0 0 4px rgba(91, 143, 207, 0.18); }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--navy); width: 18px; height: 18px; vertical-align: -3px; }
.check-row { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 16px 8px 0; cursor: pointer; }
.field-error { color: var(--red-ink); font-size: 13px; margin-top: 4px; }
input[type="checkbox"].switch {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; cursor: pointer;
  width: 46px; height: 28px; border-radius: 999px; background: var(--fill-2); transition: background 0.2s var(--ease); vertical-align: middle;
}
input[type="checkbox"].switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s var(--ease);
}
input[type="checkbox"].switch:checked { background: var(--navy); }
input[type="checkbox"].switch:checked::after { transform: translateX(18px); }

/* フラッシュ */
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: 16px; padding: 13px 16px; margin-bottom: 18px; font-size: 14px; font-weight: 600;
  background: var(--green-tint); color: var(--green-ink); box-shadow: inset 0 0 0 1px rgba(47, 143, 111, 0.22);
}
.flash::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; background: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.3 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.3 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.flash > div { flex: 1; min-width: 0; }
.flash-error { background: var(--red-tint); color: var(--red-ink); box-shadow: inset 0 0 0 1px rgba(196, 71, 59, 0.22); }
.flash-error::before {
  background: var(--red);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2zm0-4h-2V7h2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2zm0-4h-2V7h2z'/%3E%3C/svg%3E");
}

/* ---------- 棒グラフ（紺、今日は金） ---------- */
.barchart { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding: 0 2px; border-bottom: 1px solid var(--line-2); }
.barchart .bar { flex: 1; min-height: 2px; position: relative; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #4a6aa6, var(--navy)); }
.barchart .bar.zero { background: var(--fill-2); }
.barchart .bar:last-child:not(.zero) { background: var(--gold); }
.barchart .bar:hover { filter: brightness(1.15); }
.barchart .bar:hover::after {
  content: attr(data-label); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--navy-900); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap;
  padding: 4px 8px; border-radius: 8px; z-index: 5; pointer-events: none;
}
.barchart .bar:first-child:hover::after { left: 0; transform: none; }
.barchart .bar:last-child:hover::after { left: auto; right: 0; transform: none; }
.barchart-caption { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 11px; margin-top: 6px; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-1); border: 1px solid var(--hairline); min-width: 0; }
.kpi .k-label { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.03em; }
.kpi .k-value { font-family: var(--font-num); font-size: 26px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; margin-top: 2px; color: var(--navy-900); letter-spacing: -0.01em; }
.kpi .k-value small { font-family: var(--font); font-size: 12px; font-weight: 700; margin-left: 3px; letter-spacing: 0; color: var(--ink-3); }
@media (max-width: 420px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .k-value { font-size: 23px; }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- 管理画面の行 ---------- */
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.lesson-row:last-child { border-bottom: none; }
.lesson-row .no {
  flex: none; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--navy); background: var(--navy-tint);
}
.lesson-row .t { flex: 1; min-width: 0; }
.lesson-row .t a { color: var(--ink); font-weight: 700; }
.lesson-row .meta { font-size: 12.5px; color: var(--ink-3); }
.lesson-row.locked { opacity: 0.5; }
form.lesson-row { flex-wrap: wrap; }
.chapter-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 30px 2px 10px; }
.chapter-head .dan-label { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; background: var(--navy); color: #fff; }
.chapter-head h2 { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--navy-900); }
.chapter-head + .sheet { margin-top: 0; }

/* ---------- プレイヤー ---------- */
.player-shell { background: var(--navy-950); border-radius: var(--radius); position: relative; overflow: hidden; box-shadow: var(--shadow-2); }
.player-shell video { width: 100%; display: block; max-height: 64vh; background: #000; aspect-ratio: 16 / 9; -webkit-user-select: none; user-select: none; }
.player-shell video::-internal-media-controls-download-button { display: none; }
.player-shell video::-webkit-media-controls-enclosure { overflow: hidden; }
/* 動画だけの全画面は透かしが消えるため隠す（プレイヤー下の全画面ボタンを使う） */
.player-shell video::-webkit-media-controls-fullscreen-button { display: none; }
@media (max-width: 720px) {
  .player-shell { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; }
}
.wm-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; -webkit-user-select: none; user-select: none; overflow: hidden; }
/* 地紋（常時・ごく薄い受講者ID） */
.wm-layer .wm-tile { position: absolute; inset: 0; background-repeat: repeat; background-size: 340px 190px; }
/* 刻印（ときどき数秒だけ、ふわっと出て消える） */
.wm-layer .wm-text {
  position: absolute; white-space: nowrap; font-family: var(--font); font-size: 13px; letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72); text-shadow: 0 0 2px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.45); transform: translate(-50%, -50%) rotate(-4deg);
  opacity: 0; transition: opacity 0.9s ease;
}
.wm-layer .wm-text.is-on { opacity: 1; }
/* プレイヤーごと全画面（透かしが消えないように） */
.player-shell:fullscreen { display: flex; flex-direction: column; border-radius: 0; background: #000; }
.player-shell:fullscreen video { flex: 1; min-height: 0; max-height: none; height: auto; aspect-ratio: auto; }
.player-shell:-webkit-full-screen { display: flex; flex-direction: column; border-radius: 0; background: #000; }
.player-shell:-webkit-full-screen video { flex: 1; min-height: 0; max-height: none; height: auto; aspect-ratio: auto; }
.player-bar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--navy-950); color: #f2f2f2; font-size: 13px;
}
.player-bar button {
  font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  min-height: 34px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.1); color: #f2f2f2;
  transition: background 0.15s;
}
.player-bar button:hover { background: rgba(255, 255, 255, 0.18); }
.player-bar button .ic { width: 16px; height: 16px; }
.pb-skip { display: flex; gap: 6px; }
.pb-rates { justify-self: center; display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.pb-rates button { background: transparent; min-height: 30px; padding: 0 10px; font-variant-numeric: tabular-nums; }
.player-bar .rate.active { background: #fff; color: var(--navy-900); }
.player-bar .time { font-family: var(--font-num); font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.78); white-space: nowrap; }
.player-bar .spacer { display: none; }
.pb-end { display: flex; align-items: center; gap: 8px; justify-self: end; }
.pb-end button { padding: 0 9px; }
@media (max-width: 600px) {
  .player-bar { grid-template-columns: auto auto; grid-template-areas: "skip end" "rates rates"; row-gap: 8px; }
  .pb-skip { grid-area: skip; }
  .pb-end { grid-area: end; }
  .pb-rates { grid-area: rates; justify-self: stretch; }
  .pb-rates button { flex: 1 1 0; padding: 0 4px; }
}
.watch-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
#tb-stamp.is-hidden { display: none; }
.next-link:not(.is-locked) .when-locked { display: none; }
.next-link.is-locked .when-open { display: none; }
.watch-status { display: flex; align-items: center; gap: 14px; margin: 0 0 6px; }
.watch-status .ws-body { flex: 1; min-width: 0; }
.watch-status .ws-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.watch-status .ws-top strong { font-family: var(--font-num); font-size: 22px; font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums; margin-left: 6px; line-height: 1; }
.note-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.note-row .ic { width: 17px; height: 17px; margin-top: 2px; color: var(--ink-4); }
.note-row.warn { color: var(--red-ink); }
.note-row.warn .ic { color: var(--red); }

/* ---------- 認証ページ ---------- */
body.is-guest::before {
  background:
    linear-gradient(180deg, rgba(222, 230, 242, 0.9) 0%, rgba(240, 240, 240, 0.4) 45%, rgba(244, 243, 239, 0.6) 100%),
    url("../img/satin.jpg") center / cover no-repeat;
}
.auth-wrap { max-width: 420px; margin: 3vh auto 0; }
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo img { display: block; width: 88px; height: 88px; margin: 0 auto 12px; }
.auth-logo .auth-name { display: block; font-family: var(--font-num); font-weight: 800; font-size: 22px; letter-spacing: 0.24em; line-height: 1.2; color: var(--navy-900); padding-left: 0.24em; }
.auth-logo .auth-en { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.24em; color: var(--ink-3); margin-top: 6px; padding-left: 0.24em; }
.auth-logo p { font-size: 13.5px; font-weight: 500; color: var(--ink-3); margin-top: 12px; }
.auth-card { border-radius: 24px; padding: 26px 22px; }
.auth-card .sheet-title { font-size: 19px; }
body.is-guest .auth-card.glass { background: rgba(255, 255, 255, 0.9); box-shadow: 0 18px 50px rgba(10, 29, 68, 0.1), inset 0 1px 0 #fff; }
.auth-links { margin-top: 18px; display: grid; gap: 4px; text-align: center; font-size: 14px; }
.auth-links a { padding: 6px; font-weight: 700; }
.auth-note { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 16px; }
.auth-wrap.wide { max-width: 520px; }
.list.flat { box-shadow: none; background: rgba(255, 255, 255, 0.75); }
.auth-card.center { text-align: center; }

/* ---------- 汎用 ---------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }
.mb-2 { margin-bottom: 16px; }
.text-dim { color: var(--ink-3); }
.text-shu { color: var(--red-ink); }
.text-mat { color: var(--green-ink); }
.small { font-size: 13px; }
.serif { font-family: inherit; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.break { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.chev { color: var(--ink-4); flex: none; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.grid-2.align-end, .grid-3.align-end { align-items: end; }
.grid-2:has(> .sheet) { align-items: start; }
.grid-2 > .sheet, .grid-2 > .list, .grid-2 > .panel { margin-bottom: 16px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.cards-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cards-2 > * { margin-bottom: 0; }
details > summary { cursor: pointer; }
details.more > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--navy-700); padding: 6px 2px; }
details.more > summary::-webkit-details-marker { display: none; }
.empty { text-align: center; padding: 30px 20px; color: var(--ink-3); font-size: 14px; }
.empty .ic { width: 32px; height: 32px; color: var(--navy-300); margin-bottom: 8px; }

/* ページ送り（Laravel 既定のマークアップを整える） */
nav[role="navigation"] { margin-top: 16px; font-size: 14px; }
nav[role="navigation"] svg { width: 18px; height: 18px; }
nav[role="navigation"] > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
nav[role="navigation"] > div:last-child { display: none; }
nav[role="navigation"] a, nav[role="navigation"] > div:first-child > span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--fill); color: var(--navy-900); font-weight: 700; text-decoration: none;
}
nav[role="navigation"] > div:first-child > span { opacity: 0.4; }
.pagination { display: flex; gap: 6px; margin-top: 16px; font-size: 14px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 999px; background: var(--fill); text-decoration: none; color: var(--ink); }
.pagination .active span { background: var(--navy); color: #fff; }

/* ---------- 設問 ---------- */
.q-card { padding: 18px 16px 10px; }
.q-no { font-family: var(--font-num); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--navy-300); margin-bottom: 4px; }
.q-body { font-size: 16.5px; font-weight: 700; line-height: 1.65; margin-bottom: 12px; color: var(--navy-900); }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin: 0 0 8px; border-radius: 14px; cursor: pointer;
  background: rgba(16, 44, 92, 0.045); font-size: 15.5px; line-height: 1.55;
  transition: background 0.15s, box-shadow 0.15s;
}
.choice:hover { background: rgba(16, 44, 92, 0.08); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); background: #fff; transition: box-shadow 0.15s; }
.choice input:checked + .choice-mark { box-shadow: inset 0 0 0 7px var(--navy); }
.choice input:focus-visible + .choice-mark { outline: 3px solid rgba(91, 143, 207, 0.55); outline-offset: 2px; }
.choice:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 2px var(--navy); }
.choice-text { flex: 1; min-width: 0; }
.result-score { font-family: var(--font-num); font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--navy-900); letter-spacing: -0.02em; }
.result-score small { font-family: var(--font); font-size: 16px; margin-left: 2px; letter-spacing: 0; }
.result { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.result-body { flex: 1; min-width: 200px; }
.result-body strong { display: block; font-size: 17px; }

/* 試験タイマー */
.exam-timer {
  position: sticky; top: var(--sticky-top); z-index: 40; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px 10px 18px; border-radius: 999px;
  background: rgba(10, 29, 68, 0.9); color: #fff;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 10px 30px rgba(6, 19, 49, 0.2);
}
.exam-timer > span:first-child { font-size: 13px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exam-timer .t { font-family: var(--font-num); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 14px; border-radius: 999px; background: #fff; color: var(--navy-900); }
.exam-timer.warning { background: rgba(168, 54, 43, 0.92); }
.exam-timer.warning .t { color: var(--red-ink); }

/* ---------- 認定への道のり ---------- */
.steps { list-style: none; position: relative; margin: 6px 0 4px; }
.steps li { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 0 0 18px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--fill-2); }
.steps li:last-child::before { display: none; }
.steps li.is-done::before { background: var(--green); opacity: 0.5; }
.step-node {
  flex: none; position: relative; z-index: 1; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2);
  font-family: var(--font-num); font-size: 14px; font-weight: 800; color: var(--ink-3);
}
.step-node .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.steps li.is-done .step-node { background: var(--green); color: #fff; box-shadow: none; }
.steps li.is-current .step-node { background: var(--navy); color: #fff; box-shadow: 0 0 0 5px rgba(16, 44, 92, 0.12); }
.step-body { flex: 1; min-width: 0; padding-top: 4px; }
.step-title { font-size: 15px; font-weight: 700; line-height: 1.45; }
.steps li:not(.is-done):not(.is-current) .step-title { color: var(--ink-3); }
.step-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.step-body .btn { margin-top: 10px; }
.journeys { display: grid; gap: 16px; }
.journeys > .panel { margin-bottom: 0; }
/* 運営向けの「流れの案内」：どの段も同じ濃さで読めるように */
.steps.is-guide li:not(.is-current) .step-title { color: var(--ink); }
.steps.is-guide li:not(.is-current) .step-node { background: var(--navy-tint); color: var(--navy); box-shadow: none; }
@media (min-width: 901px) {
  .journey .panel-body { padding: 30px 22px 22px; }
  .journey .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; margin: 0; }
  .journey .steps li { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 0; }
  .journey .steps li::before { left: calc(50% + 26px); right: calc(-50% + 14px); top: 15px; bottom: auto; width: auto; height: 2px; }
  .journey .steps li:last-child::before { display: none; }
  .journey .step-body { padding-top: 0; }
  .journey .step-title { display: block; }
  .journey .step-title .badge { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); }
  .journey .step-meta { margin-top: 4px; }
}

/* 認定証カード */
.cert-card {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius); margin-bottom: 16px; color: var(--ink); text-decoration: none;
  background: linear-gradient(135deg, #fffdf8 0%, #f7f1e4 100%);
  box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(196, 160, 88, 0.35);
}
a.cert-card:hover { text-decoration: none; box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(196, 160, 88, 0.5); }
.cert-medal {
  flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
  background: #fff; color: var(--gold-ink); box-shadow: inset 0 0 0 1.5px rgba(196, 160, 88, 0.55);
}
.cert-medal .ic { width: 24px; height: 24px; }
.cert-card .row-body { flex: 1; min-width: 0; }
.cert-card .cert-title { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.45; color: var(--navy-900); }

/* 認定証（印刷用の正式書面：ここだけ明朝） */
.certificate {
  background: #fffdf8; padding: 52px 40px 48px; text-align: center; position: relative;
  max-width: 720px; margin: 0 auto; border-radius: 6px;
  box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(196, 160, 88, 0.55);
  font-family: var(--serif); font-feature-settings: normal;
}
.certificate::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(196, 160, 88, 0.6); pointer-events: none;
  box-shadow: inset 0 0 0 4px #fffdf8, inset 0 0 0 5px rgba(196, 160, 88, 0.35);
}
.certificate .cert-logo { display: block; width: 64px; height: 64px; margin: 0 auto 10px; }
.certificate h1 { font-family: var(--serif); font-size: 32px; letter-spacing: 0.5em; margin: 0 0 10px 0.5em; font-weight: 700; color: var(--navy-900); }
.certificate .cert-no { font-family: var(--font); font-size: 12px; color: var(--ink-3); letter-spacing: 0.14em; }
.certificate .holder { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 26px 0 6px; border-bottom: 1px solid var(--gold); display: inline-block; padding: 0 28px 6px; color: var(--navy-900); }
.certificate .body-text { font-size: 15px; line-height: 2.2; margin: 20px 0; }
.certificate .small { font-family: var(--font); line-height: 1.9; }
.certificate .issuer { font-family: var(--serif); font-size: 16px; margin-top: 28px; line-height: 1.7; }
.certificate .cert-seal {
  position: absolute; right: 38px; bottom: 38px; width: 66px; height: 66px; border: 2.5px solid #c0473a; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 28px; color: #c0473a; transform: rotate(-5deg); opacity: 0.85;
}
@media (max-width: 560px) {
  .certificate { padding: 40px 14px 96px; }
  .certificate h1 { font-size: 26px; letter-spacing: 0.3em; margin-left: 0.3em; }
  .certificate .body-text { font-size: min(13px, 3.55vw); line-height: 2.1; white-space: nowrap; }
  .certificate .cert-seal { right: 50%; margin-right: -33px; bottom: 22px; }
}
@media print {
  .tb-header, .tb-tabbar, .tb-rail, .band, .subnav, .no-print { display: none !important; }
  html, body { background: #fff; }
  body::before, body::after { display: none; }
  body, body.has-rail { padding: 0; }
  .tb-main { padding: 0; max-width: none; }
  .certificate { box-shadow: inset 0 0 0 1px rgba(196, 160, 88, 0.55); }
}

/* ---------- 修了ファネル ---------- */
.funnel { display: grid; gap: 12px; }
.funnel .step { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 12px; align-items: center; }
.funnel .lbl { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.funnel .track { height: 24px; border-radius: 8px; background: var(--fill); overflow: hidden; }
.funnel .bar-h { height: 100%; border-radius: 8px; background: linear-gradient(90deg, #4a6aa6, var(--navy)); min-width: 4px; }
.funnel .step:last-child .bar-h { background: var(--gold); }
.funnel .cnt { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 17px; line-height: 1.2; text-align: right; min-width: 4.5em; color: var(--navy-900); }
.funnel .cnt small { display: block; font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--ink-3); }

/* ---------- ルーブリック ---------- */
.rubric-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rubric-row .crit { flex: 1; min-width: 180px; font-size: 14px; font-weight: 700; }
.rubric-row .scale { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--fill); }
.rubric-row label { cursor: pointer; }
.rubric-row input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rubric-row label span {
  display: inline-grid; place-items: center; width: 38px; height: 32px; border-radius: 999px;
  font-family: var(--font-num); font-weight: 800; font-size: 14px; color: var(--ink-2); transition: background 0.15s;
}
.rubric-row label:hover span { background: rgba(255, 255, 255, 0.7); }
.rubric-row input[type="radio"]:checked + span { background: var(--navy); color: #fff; }
.rubric-row input[type="radio"]:focus-visible + span { outline: 3px solid rgba(91, 143, 207, 0.55); }

/* ---------- ホーム ---------- */
.home-grid { display: grid; gap: 0 22px; }
.home-grid > * { min-width: 0; }
@media (min-width: 960px) {
  .home-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
}

/* お知らせ（たたんで表示） */
.news details { padding: 13px 18px; }
.news details + details { border-top: 1px solid var(--line); }
.news summary { list-style: none; display: flex; gap: 12px; align-items: center; }
.news summary::-webkit-details-marker { display: none; }
.news .n-title { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.5; }
.news .n-date { display: block; font-size: 12px; color: var(--ink-3); }
.news .n-chev { margin-left: auto; color: var(--ink-4); transition: transform 0.2s var(--ease); flex: none; }
.news details[open] .n-chev { transform: rotate(90deg); }
.news .n-body { font-size: 14px; color: var(--ink-2); white-space: pre-line; padding: 8px 0 2px; }

/* コースカード（コース一覧：写真つき） */
.course-card {
  display: flex; flex-direction: column; overflow: hidden; padding: 0; color: inherit; text-decoration: none;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
a.course-card:hover { text-decoration: none; box-shadow: var(--shadow-2); transform: translateY(-2px); }
a.course-card:active { transform: scale(0.99); }
.cc-cover { position: relative; display: block; aspect-ratio: 16 / 8; max-height: 230px; width: 100%; background: var(--navy) center 30% / cover no-repeat; }
.cc-cover .tags { position: absolute; z-index: 1; left: 14px; top: 12px; }
.cc-cover .tags .tag { background: rgba(255, 255, 255, 0.94); color: var(--navy-900); }
.cc-cover .tags .badge.done { background: var(--green); color: #fff; }
.cc-cover .ring { position: absolute; z-index: 1; right: 14px; bottom: -26px; box-shadow: 0 6px 16px rgba(6, 19, 49, 0.16); }
.cc-body { display: block; padding: 16px 18px 18px; }
.course-card .en { display: block; margin-bottom: 4px; color: var(--navy-300); }
.course-card .c-title { display: block; font-size: 17px; font-weight: 700; line-height: 1.45; color: var(--navy-900); margin-right: 64px; }
.course-card .c-desc { display: -webkit-box; font-size: 13px; color: var(--ink-3); margin-top: 6px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card .progress { margin-top: 14px; }
.course-card .row-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }

/* コース概要（コース詳細の帯の中） */
.summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; padding: 16px 18px; border-radius: 20px; }
.summary .row-body { flex: 1; min-width: 160px; }
.summary .s-big { font-size: 16.5px; font-weight: 700; color: var(--navy-900); }
.summary .btn { flex: none; }
@media (max-width: 720px) { .summary .btn { width: 100%; } }

/* 設定のアカウント（帯の中） */
.account { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.account .tb-avatar { width: 54px; height: 54px; font-size: 21px; box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(10, 29, 68, 0.15); }
.account strong { display: block; font-size: 19px; font-weight: 700; line-height: 1.4; color: var(--navy-900); }
.account .row-body span { display: block; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }

/* 大きな丸アイコン */
.row-ic.xl { width: 60px; height: 60px; margin: 0 auto 16px; }
.row-ic.xl .ic { width: 28px; height: 28px; }

/* エラーページ */
.error-page { max-width: 460px; margin: 6vh auto 0; text-align: center; }
.error-page h1 { font-size: 22px; font-weight: 700; margin-bottom: 8px; color: var(--navy-900); }
.error-page p { color: var(--ink-3); margin-bottom: 22px; }

/* ガラス非対応ブラウザでは不透明に */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tb-header { background: rgba(244, 243, 239, 0.97); }
  .tb-tabbar, .tb-rail { background: rgba(255, 255, 255, 0.97); }
  .glass { background: #fff; }
  .exam-timer { background: var(--navy-900); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 試験の編集（設問の一覧・追加・貼り付け） ---------- */
.panel[id], .q-list[id] { scroll-margin-top: 84px; }
.q-list { border-top: 1px solid var(--line); }
.q-item { border-bottom: 1px solid var(--line); }
.q-item > summary {
  list-style: none; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; cursor: pointer; transition: background 0.15s;
}
.q-item > summary::-webkit-details-marker { display: none; }
.q-item > summary:hover { background: rgba(16, 44, 92, 0.03); }
.q-item > summary .row-end .ic { transition: transform 0.2s; }
.q-item[open] > summary { background: var(--surface-2); }
.q-item[open] > summary .row-end .ic { transform: rotate(180deg); }
.q-no {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--navy-tint); color: var(--navy); font-size: 13px; font-weight: 800;
}
.q-text { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.q-item .row-meta { overflow-wrap: anywhere; }
.q-edit { padding: 6px 18px 16px; background: var(--surface-2); }
.q-list > .empty { padding: 22px 18px; }
.q-options { display: grid; gap: 8px; }
@media (min-width: 721px) { .q-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; } }
.q-option { display: flex; align-items: center; gap: 8px; min-width: 0; }
.q-option input[type="text"] { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; font-size: 14px; }
.q-correct {
  flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 0 2px;
  font-size: 12px; font-weight: 700; color: var(--ink-4); cursor: pointer; white-space: nowrap;
}
.q-correct:has(input:checked) { color: var(--green-ink); }
.q-correct input[type="radio"] { accent-color: var(--green); }
.q-delete { display: flex; justify-content: flex-end; margin-top: 8px; }
.q-delete .btn-ghost { color: var(--red-ink); }
.q-delete .btn-ghost:hover { background: var(--red-tint); color: var(--red-ink); }
.q-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 8px 18px 14px; }
.q-add > details, .q-add-body { min-width: 0; }
.q-add-body { padding: 6px 0 12px; }
.q-add-body > p { margin-bottom: 10px; }
.paste-example { box-shadow: none; margin-bottom: 12px; }
.paste-example table.roster { font-size: 13px; }
.paste-example table.roster th, .paste-example table.roster td { padding: 8px 12px; white-space: nowrap; }
.q-settings { padding: 10px 18px; }
.q-add details.more > summary .ic { width: 16px; height: 16px; }
.q-settings > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px 6px;
  font-size: 13.5px; font-weight: 700; color: var(--navy-700);
}
.q-settings > summary::-webkit-details-marker { display: none; }
.q-settings > summary .ic { width: 15px; height: 15px; }
.q-settings > form.quiz-settings { margin-top: 8px; }
.prewrap { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- 認定証の管理 ---------- */
a.kpi { display: block; color: inherit; text-decoration: none; transition: box-shadow 0.15s, transform 0.15s; }
a.kpi:hover { text-decoration: none; box-shadow: var(--shadow-2, 0 6px 18px rgba(10, 29, 68, 0.1)); }
.cert-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 0 18px 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  background: var(--fill);
}
.seg a:hover { background: var(--fill-2); text-decoration: none; }
.seg a.active { background: var(--navy); color: #fff; }
.cert-search { display: flex; gap: 6px; align-items: center; flex: 1 1 260px; max-width: 360px; }
.cert-search input[type="search"] { flex: 1; min-width: 0; min-height: 38px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.cert-actions > summary { list-style: none; gap: 4px; }
.cert-actions > summary::-webkit-details-marker { display: none; }
.cert-actions > summary .ic { width: 15px; height: 15px; }
.cert-actions-body { display: grid; gap: 8px; padding-top: 8px; min-width: 250px; }
.cert-revoke { display: flex; gap: 6px; }
.cert-revoke input { flex: 1; min-width: 0; }
@media (max-width: 720px) { .cert-search { max-width: none; } }
.btn-ghost.text-red { color: var(--red-ink); }
.btn-ghost.text-red:hover { background: var(--red-tint); color: var(--red-ink); }
/* 動画アセットの表：題名と使用レッスンが1〜2文字ずつ折り返さないように幅を確保（狭い画面は表ごと横スクロール） */
table.roster td.col-title { min-width: 13em; font-weight: 700; }
table.roster td.col-version { min-width: 10.5em; }
table.roster td.col-version form { margin-top: 2px; }
table.roster td.col-version .btn-sm { padding: 0 8px; margin-left: -8px; }
table.roster td.col-lessons { min-width: 9em; }
table.roster td.nowrap { white-space: nowrap; }
table.roster td.col-course { min-width: 11em; }
/* コース編集：章の名前・順番の変更 */
.chapter-edit { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.chapter-edit > summary .ic { width: 15px; height: 15px; }
.chapter-edit[open] { padding-bottom: 12px; }
/* レッスン行の削除ボタン（アイコンだけ）・コースの削除 */
.btn.icon-only { width: 34px; padding: 0; flex: none; }
.btn.icon-only .ic { width: 17px; height: 17px; }
.course-delete { max-width: 520px; }
.course-delete .field { margin-bottom: 12px; }
.lesson-actions { display: inline-flex; align-items: center; gap: 6px; flex: none; }
