/* はかるくん — 黒×計器黄×白。Material 3 Expressive（ダーク）＋本物の計器の文字盤 */
:root {
  --bg: #0e0e0c;
  --surface: #1b1a16;
  --surface2: #25231d;
  --surface3: #302d25;
  --on: #f4f1e6;
  --on2: #cdc8b6;
  --outline: #4a463b;
  --primary: #f5c400;
  --on-primary: #1a1600;
  --primary-ct: #3d3300;
  --on-primary-ct: #ffe48a;
  --face: #f3efe2;
  --face-ink: #1a1813;
  --danger: #ff7a66;
  --danger-ct: #5a1d14;
  --ok: #9bd88f;
  --f-jp: "M PLUS 1 Code", "Hiragino Sans", "Yu Gothic", monospace;
  --f-num: "Saira Condensed", "M PLUS 1 Code", sans-serif;
  --r-card: 28px;
  --r-fab: 20px;
  --spring: cubic-bezier(.2, 1.4, .4, 1);
  --emph: cubic-bezier(.2, 0, 0, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 80px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--on);
  font-family: var(--f-jp); font-size: 15px; line-height: 1.65;
  line-break: strict; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.nw { white-space: nowrap; }
.kp { word-break: keep-all; overflow-wrap: normal; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.noscript { padding: 40px 24px; }

.device { position: relative; height: 100dvh; max-width: 430px; margin: 0 auto; overflow: hidden; background: var(--bg); }
@media (min-width: 600px) {
  body {
    background:
      repeating-linear-gradient(-45deg, #f5c400 0 14px, #121210 14px 28px) top / 100% 10px no-repeat,
      repeating-linear-gradient(-45deg, #f5c400 0 14px, #121210 14px 28px) bottom / 100% 10px no-repeat,
      #121210;
  }
  .device { box-shadow: 0 0 0 1px #2a2822, 0 30px 80px rgba(0, 0, 0, .6); }
}
.stack { position: absolute; inset: 0; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.scr.is-in { animation: scrIn .36s var(--emph) both; }
.scr.is-in-up { animation: scrUp .4s var(--emph) both; z-index: 2; }
.scr.is-out { animation: scrOut .2s ease-in both; pointer-events: none; }
@keyframes scrIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes scrUp { from { opacity: 0; transform: translateY(40px); } }
@keyframes scrOut { to { opacity: 0; } }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 0 calc(var(--nav-h) + 96px + var(--safe-b)); }
.scr--sub .scroll { padding-bottom: calc(32px + var(--safe-b)); }

/* ---------- トップアプリバー ---------- */
.topbar {
  flex: none; position: relative; z-index: 5;
  display: flex; align-items: center; gap: 4px; min-height: calc(64px + var(--safe-t)); padding: var(--safe-t) 6px 0 16px;
  background: var(--bg); transition: background-color .2s;
}
.topbar.is-scrolled { background: var(--surface2); }
.topbar--sub { padding-left: 4px; }
.topbar__title { flex: 1; margin: 0; font-size: 21px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__brand { display: flex; align-items: center; gap: 10px; }
.topbar__brand img { width: 30px; height: 30px; border-radius: 8px; }
.ibtn {
  width: 48px; height: 48px; flex: none; border: 0; border-radius: 24px; background: none; color: var(--on);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; position: relative; overflow: hidden;
  transition: border-radius .3s var(--spring), background-color .15s;
}
.ibtn:active { background: rgba(244, 241, 230, .12); border-radius: 14px; }
.ibtn svg { width: 24px; height: 24px; }

/* ---------- ナビゲーションバー（M3） ---------- */
.navbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-b)); padding: 12px 4px var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--on2); font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.nav-ind { position: relative; width: 64px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.nav-ind::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--primary-ct); transform: scaleX(.3); opacity: 0; transition: transform .45s var(--spring), opacity .2s; }
.nav-ind svg { position: relative; }
.nav-item.is-on { color: var(--on); font-weight: 700; }
.nav-item.is-on .nav-ind { color: var(--on-primary-ct); }
.nav-item.is-on .nav-ind::before { transform: none; opacity: 1; }
.nav-item:active .nav-ind::before { opacity: .6; transform: none; }

/* ---------- FAB ---------- */
.fab {
  position: absolute; right: 16px; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); z-index: 21;
  display: inline-flex; align-items: center; gap: 10px; height: 64px; padding: 0 22px 0 18px; border: 0;
  border-radius: var(--r-fab); background: var(--primary); color: var(--on-primary);
  font-size: 17px; font-weight: 700; box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
  transition: border-radius .4s var(--spring), transform .2s var(--spring), background-color .2s;
}
.fab:active { border-radius: 32px; transform: scale(.96); }
.fab__ic { color: #c8102e; }
.fab.is-rec { background: var(--danger-ct); color: #ffd9d2; border-radius: 32px; }
.fab.is-rec .fab__ic { color: var(--danger); animation: blink 1s steps(2) infinite; }
.fab__label { font-variant-numeric: tabular-nums; white-space: nowrap; max-width: 140px; overflow: hidden; transition: max-width .35s var(--spring), opacity .2s; }
.fab.is-small { padding: 0 20px; gap: 0; }
.fab.is-small .fab__label { max-width: 0; opacity: 0; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- 共通の部品 ---------- */
.card { margin: 0 12px 12px; padding: 16px; border-radius: var(--r-card); background: var(--surface); }
.card--tonal { background: var(--primary-ct); color: var(--on-primary-ct); }
.card__title { margin: 0 0 8px; font-size: 17px; font-weight: 700; word-break: keep-all; }
.p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--on2); word-break: normal; }
.card--tonal .p { color: #f6e7b0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 24px;
  background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: border-radius .3s var(--spring), transform .15s;
}
.btn:active { border-radius: 12px; transform: scale(.97); }
.btn svg { width: 20px; height: 20px; }
.btn--tonal { background: var(--surface3); color: var(--on); }
.btn--outline { background: none; color: var(--on); box-shadow: inset 0 0 0 1px var(--outline); }
.btn--danger { background: var(--danger-ct); color: #ffd9d2; }
.btn--block { width: 100%; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--outline); background: none; color: var(--on); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--primary-ct); border-color: transparent; color: var(--on-primary-ct); }
.status { display: flex; align-items: center; gap: 10px; margin: 0 12px 10px; }
.live { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 16px; background: var(--surface2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--on2); }
.live.is-live i { background: #ff4d3a; box-shadow: 0 0 0 4px rgba(255, 77, 58, .25); animation: blink 1.2s steps(2) infinite; }
.live.is-sample i { background: var(--primary); }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--outline); border-radius: 20px; overflow: hidden; margin-left: auto; }
.seg button { min-height: 40px; min-width: 64px; padding: 0 12px; border: 0; background: none; font-size: 14px; font-weight: 700; color: var(--on); }
.seg button + button { border-left: 1px solid var(--outline); }
.seg button[aria-pressed="true"] { background: var(--primary-ct); color: var(--on-primary-ct); }

/* ---------- アナログメーター ---------- */
.meter { margin: 0 12px; padding: 12px 12px 14px; border-radius: 32px; background: linear-gradient(#26241e, #171612); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 2px #0a0a08; }
.meter__face { position: relative; border-radius: 20px; overflow: hidden; background: var(--face); box-shadow: inset 0 0 0 4px var(--primary), inset 0 0 0 6px #1a1813, inset 0 10px 24px rgba(0, 0, 0, .18); }
.meter__face svg { display: block; width: 100%; height: auto; }
.meter__plate { position: absolute; left: 16px; bottom: 12px; padding: 1px 8px; border-radius: 4px; background: #1a1813; color: var(--face); font-family: var(--f-num); font-size: 12px; letter-spacing: .14em; }
.meter__mode { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 4px; }
.meter__mode span { padding: 0 6px; border-radius: 4px; background: #1a1813; color: var(--face); font-family: var(--f-num); font-size: 12px; letter-spacing: .08em; }
.meter__mode span.on { background: var(--primary); color: #1a1813; }
.readout { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 6px 14px 8px; border-radius: 16px; background: #0b0b09; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6); }
.readout__val { font-family: var(--f-num); font-size: 68px; line-height: 1; font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.readout__val.is-hot { color: var(--danger); }
.readout__unit { text-align: right; padding-bottom: 8px; }
.readout__unit b { display: block; font-family: var(--f-num); font-size: 22px; font-weight: 600; letter-spacing: .04em; color: var(--on); }
.readout__unit span { font-size: 12px; color: var(--on2); white-space: nowrap; }
.what { margin: 10px 2px 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--on); }
.what svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 12px 12px; }
.stats3 div { padding: 10px 12px; border-radius: 20px; background: var(--surface); }
.stats3 dt { font-size: 12px; color: var(--on2); font-weight: 500; white-space: nowrap; }
.stats3 dd { margin: 0; font-family: var(--f-num); font-size: 26px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats3 dd small { font-size: 14px; color: var(--on2); margin-left: 2px; }
.stats-head { display: flex; align-items: center; gap: 8px; margin: 14px 12px 0; }
.stats-head .p { font-size: 13px; }
.reset-link { margin-left: auto; border: 0; background: none; color: var(--primary); font-weight: 700; min-height: 40px; padding: 0 8px; font-size: 14px; }

/* 身近な音のものさし */
.ruler { list-style: none; margin: 0; padding: 0; position: relative; }
.ruler li { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 10px; min-height: 34px; border-top: 1px solid var(--surface3); font-size: 14px; color: var(--on2); transition: color .2s, background-color .2s; }
.ruler li b { font-family: var(--f-num); font-size: 18px; font-weight: 600; color: var(--on); text-align: right; }
.ruler li.is-now { color: var(--on-primary); background: var(--primary); border-radius: 10px; border-color: transparent; }
.ruler li.is-now b { color: var(--on-primary); }
.ruler li.is-now + li { border-color: transparent; }

/* 見本のカード */
.samples { display: flex; gap: 10px; overflow-x: auto; padding: 2px 12px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.samples::-webkit-scrollbar { display: none; }
.smp { flex: none; width: 128px; padding: 0 0 8px; border: 0; border-radius: 20px; overflow: hidden; background: var(--surface); text-align: left; scroll-snap-align: start; transition: transform .15s, box-shadow .2s; }
.smp img { width: 100%; height: 84px; object-fit: cover; }
.smp span { display: block; padding: 8px 10px 0; font-size: 13px; font-weight: 700; color: var(--on); white-space: nowrap; }
.smp small { display: block; padding: 0 10px; font-size: 12px; color: var(--on2); }
.smp[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--primary); }
.smp:active { transform: scale(.96); }
.sec-title { margin: 18px 16px 8px; font-size: 15px; font-weight: 700; color: var(--on); display: flex; align-items: center; gap: 8px; }

/* ---------- 揺れ（記録紙） ---------- */
.drum { margin: 0 12px; padding: 10px; border-radius: 32px; background: linear-gradient(#26241e, #171612); box-shadow: 0 0 0 2px #0a0a08; }
.paper { position: relative; border-radius: 18px; overflow: hidden; background: var(--face); }
.paper canvas { display: block; width: 100%; height: 220px; touch-action: manipulation; }
.paper__lbl { position: absolute; top: 8px; left: 10px; display: flex; gap: 6px; }
.paper__lbl span { padding: 0 7px; border-radius: 4px; background: #1a1813; color: var(--face); font-family: var(--f-num); font-size: 12px; letter-spacing: .1em; }
.paper__tap { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; background: #1a1813; color: var(--face); font-size: 12px; font-weight: 700; pointer-events: none; }
.paper__tap svg { width: 16px; height: 16px; color: var(--primary); }
.axes { margin-top: 10px; border-radius: 16px; background: #0b0b09; overflow: hidden; }
.axes canvas { display: block; width: 100%; height: 96px; }
.axes__legend { display: flex; gap: 14px; padding: 6px 12px 8px; font-family: var(--f-num); font-size: 13px; letter-spacing: .06em; color: var(--on2); }
.axes__legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.level { margin: 10px 12px 0; padding: 12px 14px; border-radius: 20px; background: var(--surface); }
.level__bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-top: 8px; }
.level__bar i { height: 10px; border-radius: 3px; background: var(--surface3); transition: background-color .2s; }
.level__bar i.on { background: var(--primary); }
.level__bar i.on.hot { background: var(--danger); }
.level__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.level__name { font-size: 17px; font-weight: 700; }
.level__sub { font-size: 13px; color: var(--on2); white-space: nowrap; }

/* ---------- 権限の説明 ---------- */
.perm { display: flex; gap: 12px; align-items: flex-start; }
.perm .btnrow { margin-top: 10px; }
.perm .card__title { margin-bottom: 2px; }
.perm > svg { flex: none; width: 28px; height: 28px; color: var(--primary); margin-top: 2px; }
.perm.is-err > svg { color: var(--danger); }

/* ---------- 記録 ---------- */
.filters { display: flex; gap: 8px; padding: 0 16px 10px; }
.day { margin: 14px 16px 6px; font-size: 13px; font-weight: 700; color: var(--on2); }
.rec { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; width: calc(100% - 24px); margin: 0 12px 8px; padding: 12px 14px 12px 12px; border: 0; border-radius: 24px; background: var(--surface); text-align: left; text-decoration: none; color: var(--on); transition: border-radius .3s var(--spring), background-color .15s; }
.rec:active { border-radius: 14px; background: var(--surface2); }
.rec__ic { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--primary-ct); color: var(--on-primary-ct); }
.rec__ic.is-vibe { background: #233128; color: var(--ok); }
.rec__ic svg { width: 24px; height: 24px; }
.rec__main { min-width: 0; }
.rec__name { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec__sub { display: block; font-size: 12px; color: var(--on2); white-space: nowrap; }
.rec__spark { display: block; width: 100%; height: 22px; margin-top: 4px; }
.rec__val { text-align: right; }
.rec__val b { display: block; font-family: var(--f-num); font-size: 28px; font-weight: 600; line-height: 1; white-space: nowrap; }
.rec__val small { font-size: 12px; color: var(--on2); white-space: nowrap; }
.empty { text-align: center; padding: 20px 24px; }
.empty img { width: 200px; height: 200px; margin: 0 auto 10px; border-radius: 28px; object-fit: cover; }
.empty h2 { margin: 0 0 6px; font-size: 18px; word-break: keep-all; }

/* 詳細 */
.d-head { padding: 4px 16px 12px; }
.d-kind { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 10px; background: var(--primary-ct); color: var(--on-primary-ct); font-size: 13px; font-weight: 700; }
.d-kind.is-vibe { background: #233128; color: var(--ok); }
.d-kind svg { width: 16px; height: 16px; }
.d-title { margin: 8px 0 2px; font-size: 24px; font-weight: 700; line-height: 1.35; word-break: keep-all; }
.d-meta { margin: 0; font-size: 13px; color: var(--on2); }
.chart { margin: 0 12px; padding: 12px 8px 6px; border-radius: 24px; background: var(--face); }
.chart svg { display: block; width: 100%; height: auto; }
.chart__cap { display: flex; justify-content: space-between; padding: 2px 8px 0; font-family: var(--f-num); font-size: 13px; color: #3a372d; letter-spacing: .04em; }
.memo-field { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface2); color: var(--on); font-size: 16px; outline: none; }
.memo-field:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.field-label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--on2); }

/* ---------- 使い方 ---------- */
.hero { position: relative; height: 230px; margin: 0 12px 12px; border-radius: var(--r-card); overflow: hidden; background-size: cover; background-position: 50% 62%; background-color: #1a1813; }
.hero__cap { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 12px 14px; border-radius: 18px; background: #12110e; }
.hero__cap h2 { margin: 0; font-size: 20px; line-height: 1.4; word-break: keep-all; }
.hero__cap p { margin: 2px 0 0; font-size: 13px; color: var(--on2); word-break: keep-all; }
.how { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.how li { position: relative; padding: 0 0 12px 40px; }
.how li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 9px; background: var(--primary); color: var(--on-primary); font-family: var(--f-num); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.how b { display: block; font-size: 15px; }
.warn { border: 2px solid var(--primary); background: #17150f; }
.warn .card__title { color: var(--primary); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 7px 4px; border-top: 1px solid var(--surface3); text-align: left; vertical-align: top; }
.tbl th { font-family: var(--f-num); font-size: 17px; font-weight: 600; width: 56px; white-space: nowrap; }
.tbl td { color: var(--on2); }

/* ---------- 設定 ---------- */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 6px 0; }
.set-row + .set-row { border-top: 1px solid var(--surface3); }
.set-row b { display: block; font-size: 15px; }
.set-row span.s { display: block; font-size: 13px; color: var(--on2); }
.sw { position: relative; width: 52px; height: 32px; flex: none; }
.sw input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); margin: 0; opacity: 0; z-index: 1; cursor: pointer; }
.sw span { position: absolute; inset: 0; border-radius: 16px; background: var(--surface3); box-shadow: inset 0 0 0 2px #77705e; transition: background-color .2s; }
.sw span::after { content: ""; position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; border-radius: 50%; background: #a39d89; transition: transform .35s var(--spring), width .2s, height .2s, top .2s, left .2s, background-color .2s; }
.sw input:checked + span { background: var(--primary); box-shadow: none; }
.sw input:checked + span::after { top: 4px; left: 4px; width: 24px; height: 24px; background: var(--on-primary); transform: translateX(20px); }
.slider { width: 100%; accent-color: var(--primary); height: 32px; }
.cal { display: flex; align-items: baseline; justify-content: space-between; }
.cal b { font-family: var(--f-num); font-size: 26px; font-weight: 600; }
.about-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.about-head img { width: 64px; height: 64px; border-radius: 16px; }
.about-head h2 { margin: 0; font-size: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.tags span { padding: 4px 10px; border-radius: 8px; background: var(--surface3); font-size: 13px; white-space: nowrap; }

/* ---------- ボトムシート・スナックバー ---------- */
.sheet-layer { position: absolute; inset: 0; z-index: 40; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.bsheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 48px); overflow-y: auto; padding: 10px 20px calc(24px + var(--safe-b)); border-radius: 28px 28px 0 0; background: var(--surface2); animation: sheetUp .42s var(--emph) both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.bsheet__handle { display: block; width: 32px; height: 4px; margin: 6px auto 14px; border-radius: 2px; background: #8c8676; }
.bsheet__title { margin: 0 0 10px; font-size: 21px; font-weight: 700; word-break: keep-all; }
.snackbar {
  position: absolute; z-index: 50; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px + var(--safe-b));
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 8px 6px 16px; border-radius: 8px;
  background: #ebe6d6; color: #1b1a16; font-size: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .2s, transform .35s var(--spring);
}
.snackbar.is-on { opacity: 1; transform: none; pointer-events: auto; }
.snackbar span { flex: 1; word-break: keep-all; }
.snackbar button { flex: none; min-height: 40px; padding: 0 12px; border: 0; border-radius: 20px; background: none; color: #6b4f00; font-weight: 700; }

/* ---------- 起動 ---------- */
.splash { position: absolute; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); transition: opacity .35s; }
.splash img { width: 108px; height: 108px; border-radius: 26px; animation: pop .6s var(--spring) both; }
.splash p { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .1em; }
.splash.is-out { opacity: 0; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.onb { position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--bg); }
.onb__img { flex: 1; min-height: 0; background-size: cover; background-position: 50% 70%; }
.onb__body { padding: 20px 22px calc(20px + var(--safe-b)); background: var(--bg); }
.onb__body h2 { margin: 0 0 8px; font-size: 25px; line-height: 1.4; word-break: keep-all; }
.onb__body p { margin: 0 0 18px; color: var(--on2); line-height: 1.8; word-break: normal; }
.onb__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--surface3); transition: width .3s var(--spring); }
.dots i.on { width: 24px; background: var(--primary); }
.boot-fail { padding: 120px 28px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* SVG の文字は fill で塗るが、検査は color を読むので同じ濃い色にそろえる */
.meter__face svg, .chart svg { color: #1a1813; }
