/* とここと録音帳 — UI refinement. One editorial system across all screens. */
:root {
  --ink: #202724;
  --ink-soft: #36413c;
  --bg-app: #f5f4ef;
  --bg-subtle: #f8f8f4;
  --bg-neutral: #eeeee8;
  --ginkgo: #e8b847;
  --ginkgo-deep: #926a13;
  --ginkgo-soft: #f8ebc9;
  --ginkgo-wash: #fbf6e8;
  --text-secondary: #4e5751;
  --text-tertiary: #626a64;
  --border-default: #d5d9d2;
  --border-subtle: #e7e9e3;
  --font-body: "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --fs-body: 16px;
  --fs-sm: 15px;
  --fs-caption: 14px;
  --fs-micro: 12px;
  --lh-body: 1.75;
  --container: 880px;
}
body { letter-spacing: .005em; }
body.page-sources, body.page-report, body.page-admin { --container: 1040px; }
.container { padding-inline: clamp(20px, 4vw, 40px); }
.section { padding-block: clamp(24px, 4vw, 48px) 70px; }
.small, .hint { line-height: 1.75; }
.muted, .hint { color: var(--text-secondary); }
.site-header { border-bottom: 1px solid var(--border-default); background: rgba(255,255,255,.96); }
.site-header .inner { max-width: 1200px; padding: 12px clamp(20px, 3vw, 36px); }
.brand .leaf { width: 28px; height: 28px; }
.brand-text strong { font-size: 17px; letter-spacing: 0; }
.brand-text small { font-size: 10px; color: var(--text-secondary); }
.header-nav { gap: 3px; }
.header-nav .nav-item { min-height: 44px; padding: 8px 10px; font-size: 13px; color: var(--ink-soft); }
.header-nav .nav-item.active { background: var(--ginkgo-wash); box-shadow: inset 0 -2px 0 var(--ginkgo-deep); }
.header-nav .nav-item .ic { width: 17px; height: 17px; }
.header-nav .nav-item.nav-login,
.header-nav .nav-item.nav-login.active { background: #202b25; color: #fff; box-shadow: none; padding-inline: 16px; }
.header-nav .nav-item.nav-login:hover { background: #344238; color: #fff; }
.icon-btn { min-height: 44px; min-width: 44px; }
.page-intro { margin-bottom: 28px; padding: 8px 0 22px; border-bottom: 1px solid var(--border-default); }
.page-intro .kicker { color: var(--ginkgo-deep); font-size: 12px; font-weight: 700; letter-spacing: .13em; line-height: 1.5; }
.page-intro h1 { margin-top: 9px; font-size: clamp(29px, 4vw, 42px); font-weight: 700; letter-spacing: -.045em; line-height: 1.35; }
.page-intro > p:last-child { margin-top: 9px; color: var(--text-secondary); font-size: 15px; }
.card, .q-card, .note-row, .stat { border: 1px solid var(--border-default); border-radius: 5px; box-shadow: 0 2px 12px rgba(32,39,36,.035); }
.card { padding: clamp(20px, 3vw, 30px); }
.card + .card { margin-top: 16px; }
.sec-title { font-size: 21px; letter-spacing: -.025em; line-height: 1.4; margin-bottom: 17px; }
.sec-title::after { background: var(--border-default); }
.sec-title .en { font-size: 11px; letter-spacing: .1em; font-weight: 700; color: var(--ginkgo-deep); }
.btn { min-height: 44px; padding: 10px 18px; border-radius: 4px; font-size: 14px; letter-spacing: 0; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { box-shadow: 0 3px 10px rgba(32,39,36,.12); }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-dark:hover:not(:disabled) { background: #34433b; }
.btn-ginkgo { background: var(--ginkgo); border-color: var(--ginkgo); color: #29240f; }
.btn-ginkgo:hover:not(:disabled) { background: #f2c65d; color: #29240f; }
.btn.sm { min-height: 44px; padding: 9px 14px; font-size: 13px; }
.input, .textarea, .select { min-height: 46px; border-color: #bfc6bd; border-radius: 4px; font-size: 16px; }
.input:focus, .textarea:focus, .select:focus { outline: 3px solid rgba(146,106,19,.24); outline-offset: 1px; border-color: var(--ginkgo-deep); }
.field > .lb { font-size: 14px; color: var(--ink-soft); margin-bottom: 7px; letter-spacing: 0; }
:focus-visible { outline: 3px solid #a97e1b; outline-offset: 3px; }
.check { min-height: 44px; }
.check input { width: 20px; height: 20px; }
.notice { border-radius: 4px; font-size: 14px; }
.site-footer { margin-top: 0; border-color: var(--border-default); background: #edeee8; padding: 24px 0; color: var(--text-secondary); font-size: 12px; }
.site-footer .container { max-width: 1200px; }
.site-footer br { display: none; }
.site-footer br::after { content: " "; }
.login-card { max-width: 580px; margin-inline: auto; padding: clamp(24px, 4vw, 38px); border-top: 4px solid #24362e; }
.login-card .chara-hello { display: none; }
.login-card .sec-title::after { display: none; }
.login-card .btn.block { min-height: 50px; }

/* Recording: keep one clear action, with settings immediately above it. */
.page-rec #rec-card { padding: clamp(20px, 4vw, 38px); }
.page-rec #rec-card > .sec-title { margin-bottom: 18px; }
.scene-pick { gap: 10px; margin-bottom: 14px; }
.scene-opt { min-height: 90px; border: 1px solid var(--border-default); border-radius: 5px; padding: 14px 16px; }
.scene-opt.on { background: #24362e; border-color: #24362e; }
.scene-opt .so-body b { font-size: 15px; letter-spacing: 0; }
.scene-opt .so-body span { font-size: 13px; }
.scene-opt .so-ic { width: 40px; height: 40px; }
.scene-bubble { margin-bottom: 22px; padding: 13px 16px; background: var(--ginkgo-wash); border-color: #ecd799; border-radius: 4px; font-size: 14px; }
.scene-bubble b { font-size: 15px; }
.page-rec #speakers-field { margin-top: 17px; }
.record-options { border: 1px solid var(--border-default); border-radius: 4px; background: white; margin-top: 14px; }
.record-options > summary { cursor: pointer; padding: 10px 14px; min-height: 44px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.record-options[open] { padding: 0 14px 14px; }
.record-options[open] > summary { margin: 0 -14px; border-bottom: 1px solid var(--border-default); }
.rec-panel { background: #f4f5f0; border: 1px solid var(--border-subtle); border-radius: 5px; padding: 24px 16px 22px; margin-top: 20px; }
.rec-btn { width: 138px; height: 138px; border: 0; background: var(--ink); color: white; box-shadow: 0 7px 0 #c4c9bf; }
.page-rec .chara-peek { display: none; }
.rec-btn:hover:not(:disabled) { background: #34473c; }
.rec-btn.on { box-shadow: none; }
.rec-time { font-size: 39px; margin-top: 20px; }
.rec-note { font-size: 14px; max-width: 560px; margin: 10px auto 0; }
.rec-state { font-size: 13px; color: var(--text-secondary); margin-top: 10px; }
.rec-safety { margin: 16px 0 0; border-left: 3px solid var(--ginkgo-deep); padding: 7px 13px; font-size: 13px; color: var(--text-secondary); background: var(--ginkgo-wash); }
.caution { margin-top: 12px; padding: 0; border-color: var(--border-default); background: white; }
.caution-head { display: list-item; list-style: none; cursor: pointer; padding: 14px 16px; font-size: 14px; }
.caution-head::-webkit-details-marker { display: none; }
.caution-head::after { content: "＋"; float: right; display: block; width: auto; height: auto; background: none; transform: none; color: var(--ginkgo-deep); }
.caution[open] .caution-head::after { content: "−"; }
.caution-lead, .caution-list, .caution > .hint { margin-inline: 18px; }
.caution > .hint { margin-bottom: 18px; }
.caution-list { margin-bottom: 18px; }
.page-rec #name-card { padding: 13px 18px; background: white; }
.page-rec #name-card .sec-title { font-size: 15px; margin-bottom: 3px; }
.page-rec #name-card > p { display: none; }
.page-rec #name-card .input { flex-basis: 220px; }
.first-time { border-radius: 4px; padding: 10px 16px; border-width: 1px; }
.first-time .ft-body span { font-size: 12px; }

/* Records: list first, document handoff after the content it uses. */
.page-notes .top-tabs { margin-bottom: 26px; }
.page-notes .tabs.top-tabs button { min-height: 52px; border: 1px solid var(--border-default); background: white; box-shadow: none; font-size: 15px; }
.page-notes .tabs.top-tabs button.on { border-color: var(--ink); background: var(--ink); color: white; box-shadow: none; }
.page-notes #list-title { margin-bottom: 8px; }
.page-notes #list-note { margin-bottom: 14px; font-size: 13px; }
.page-notes .empty { background: white; border: 1px dashed var(--border-default); border-radius: 5px; padding: 36px 20px; color: var(--text-secondary); }
.page-notes .empty .chara-sleep { width: 94px; margin-bottom: 12px; }
.page-notes .empty strong { display: block; font-size: 18px; color: var(--ink); }
.page-notes .empty p { margin: 7px auto 18px; }
.page-notes .bundle-card { margin-top: 34px; padding-right: clamp(20px, 3vw, 30px); background: #fbfaf6; }
.page-notes .bundle-card .chara { display: none; }
.page-notes #bundle-stat { font-size: 14px; color: var(--ink-soft); margin: 13px 0; }
.page-notes #bundle-how { margin-top: 12px; color: var(--text-secondary); font-size: 13px; }
.note-row { padding: 17px 20px; }
.note-row h3, .note-row h3.ttl { font-size: 17px; }
.note-row .meta { font-size: 13px; }
.note-row .acts .btn { min-height: 40px; }
.activity { margin: 0 0 25px; }

/* Source preparation: direct upload, then evidence review, then optional guidance. */
.page-sources .page-intro { margin-bottom: 16px; }
.process-steps { display: flex; gap: 0; margin: 0 0 28px; border-bottom: 1px solid var(--border-default); }
.process-steps li { position: relative; flex: 1; display: flex; align-items: center; gap: 9px; padding: 11px 6px 13px; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.process-steps li.current { color: var(--ink); }
.process-steps li.done { color: var(--ink-soft); }
.process-steps li.current::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; background: var(--ginkgo); }
.process-steps b { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 1px solid var(--border-default); border-radius: 50%; font-size: 12px; }
.process-steps li.current b { background: var(--ink); border-color: var(--ink); color: white; }
.process-steps li.done b { background: #3b704f; border-color: #3b704f; color: white; }
.source-fields { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(280px, 1.6fr); gap: 16px; align-items: end; }
.source-fields .field { min-width: 0; }
.source-fields input[type=file] { padding: 7px; }
.source-primary > .sec-title { margin-bottom: 14px; }
.source-list-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin: 30px 0 10px; }
.source-list-heading h3 { font-size: 17px; }
.source-list-heading h3 span { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.source-list-heading p { color: var(--text-secondary); font-size: 12px; }
.source-list { margin-top: 0; }
.source-item { box-shadow: none; }
.source-prep-title { margin-top: 40px; }
.source-help { margin-top: 34px; border-top: 1px solid var(--border-default); }
.source-help summary { padding: 18px 0; cursor: pointer; font-size: 15px; font-weight: 700; }
.source-help summary::marker { color: var(--ginkgo-deep); }
.source-guide { margin: 0; gap: 0; border-top: 1px solid var(--border-default); }
.source-guide > div { padding: 20px 22px 20px 0; border-bottom: 1px solid var(--border-default); }
.source-guide h3 { font-size: 15px; margin: 4px 0 4px; }
.source-guide p { font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.source-help > .hint { margin: 15px 0 0; }
.source-json { font-size: 14px; }
.prepared-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.prepared-fields .textarea { min-height: 92px; }
.prepared-group { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border-default); }
.prepared-group-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.prepared-group-head h3 { font-size: 17px; }
.prepared-list { display: grid; gap: 8px; margin-top: 14px; }
.prepared-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-subtle); }
.prepared-row label { min-width: 0; }
.prepared-row label span { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-secondary); }
.prepared-row .input { min-width: 0; }
.prepared-row .btn { min-width: 56px; }
.secondary-fields { margin-top: 25px; }
#activate-state { margin-top: 10px; color: var(--text-secondary); }

/* Report and ancillary screens inherit the same hierarchy. */
.page-report .guide-hero, .page-sources .guide-hero { border: 0; background: #24362e; color: white; padding: clamp(24px, 4vw, 42px); box-shadow: none; }
.page-report .guide-hero p { color: #edf0e9; }
.page-report .guide-hero .eyebrow { color: #eac65e; }
.page-report .guide-h1 { font-size: clamp(26px, 3vw, 37px); line-height: 1.4; letter-spacing: -.04em; }
.page-report .source-hero { margin-bottom: 30px; }
.page-report #templates { margin-top: 18px; }
.page-questions .q-hero { background: #24362e; color: white; border: 0; }
.page-questions .q-hero .sec-title::after { background: rgba(255,255,255,.3); }
.page-questions .q-hero .sec-title .en, .page-questions .q-hero .small { color: #edf0e9; }
.q-tab { min-height: 48px; }
.q-card { padding: 20px; }
.guide-hero { border-color: var(--border-default); }

/* Mobile navigation: four task destinations and an expandable utilities menu. */
.mobile-more { position: relative; }
.mobile-more > summary { list-style: none; cursor: pointer; }
.mobile-more > summary::-webkit-details-marker { display: none; }
.mobile-more-panel { position: absolute; bottom: calc(100% + 8px); right: 8px; width: min(280px, calc(100vw - 16px)); padding: 7px; background: white; color: var(--ink); border: 1px solid var(--border-default); border-radius: 5px; box-shadow: 0 12px 32px rgba(0,0,0,.2); }
.more-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; color: var(--ink); font-size: 14px; }
.more-item:hover, .more-item.active { background: var(--ginkgo-wash); text-decoration: none; }
.more-item .ic { width: 19px; height: 19px; }
.bottom-nav { border-top: 1px solid #4c5b51; background: #202b25; }
.bottom-nav .nav-item { min-height: 58px; font-size: 11px; color: #d0d9d1; }
.bottom-nav .nav-item.active { color: #f6ce67; }
.bottom-nav .nav-item .ic { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .header-nav .nav-item { padding: 8px 7px; }
  .brand-text strong { font-size: 15px; }
}
@media (max-width: 780px) {
  .header-nav { display: none; }
  .icon-btn { display: inline-flex; }
  .bottom-nav { display: grid; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .toast { bottom: 84px; }
}
@media (max-width: 600px) {
  .section { padding-block: 22px 46px; }
  .container { padding-inline: 18px; }
  .page-intro { margin-bottom: 20px; }
  .page-intro h1 { font-size: 30px; }
  .page-intro > p:last-child { font-size: 14px; }
  .page-rec .page-intro { margin-bottom: 14px; padding: 0 0 10px; }
  .page-rec .page-intro .kicker, .page-rec .page-intro > p:last-child { display: none; }
  .page-rec .page-intro h1 { margin: 0; font-size: 27px; }
  .card { padding: 19px; }
  .first-time { display: flex; gap: 10px; align-items: center; min-height: 52px; padding: 9px 12px; }
  .first-time .ft-tag { margin: 0; font-size: 10px; padding: 3px 7px; }
  .first-time .ft-body b { font-size: 12px; }
  .first-time .ft-body span { display: none; }
  .first-time .ft-go { margin-left: auto; }
  .page-rec #name-card { padding: 12px 14px; }
  .page-rec #name-card .sec-title { margin: 0 0 6px; }
  .page-rec #name-card .row { flex-wrap: nowrap; }
  .page-rec #name-card .input { min-width: 0; }
  .sec-title { font-size: 19px; }
  .sec-title .en { display: none; }
  .sec-title::after { display: none; }
  .scene-pick { grid-template-columns: 1fr; }
  .page-rec #rec-card { padding: 16px; }
  .page-rec #rec-card > .sec-title { margin-bottom: 10px; }
  .page-rec .scene-pick { gap: 7px; margin-bottom: 10px; }
  .page-rec .scene-opt { min-height: 52px; padding: 7px 10px; gap: 9px; }
  .page-rec .scene-opt .so-ic { width: 30px; height: 30px; }
  .page-rec .scene-opt .so-ic .ic { width: 17px; height: 17px; }
  .page-rec .scene-opt .so-body b { font-size: 14px; }
  .page-rec .scene-opt .so-body span { font-size: 11px; line-height: 1.35; }
  .page-rec .scene-opt.link .so-body span, .page-rec .scene-bubble { display: none; }
  .page-rec .record-options { margin-top: 0; }
  .page-rec .rec-panel { margin-top: 12px; padding-top: 18px; }
  .rec-panel { margin-inline: -5px; }
  .process-steps li { font-size: 11px; gap: 5px; }
  .process-steps b { width: 21px; height: 21px; }
  .source-fields { grid-template-columns: 1fr; }
  .source-list-heading { display: block; }
  .source-list-heading p { margin-top: 3px; }
  .page-notes .tabs.top-tabs button { font-size: 13px; padding: 9px 4px; }
  .page-notes .bundle-card .row { display: grid; grid-template-columns: 1fr; }
  .page-notes .bundle-card .btn { width: 100%; }
  .source-guide { grid-template-columns: 1fr; }
  .source-item { align-items: flex-start; }
  .prepared-fields { grid-template-columns: 1fr; }
  .prepared-row { grid-template-columns: 1fr; }
  .prepared-row .btn { justify-self: end; }
  .prepared-group-head h3 { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
