/* テンケン手帳 — 工業的・高視認（安全黄×黒×白）/ Material 3 Expressive ベース */
:root {
  --y: #ffcc00;
  --y-deep: #e0b000;
  --y-soft: #fff4c7;
  --ink: #121212;
  --ink2: #333333;
  --ink3: #555555;
  --bg: #ebebe6;
  --paper: #ffffff;
  --line: #cfcfc8;
  --steel: #1f2226;
  --steel2: #2e3238;
  --ok: #0d6633;
  --ok-soft: #dcf0e2;
  --ng: #b3121d;
  --ng-soft: #fde6e4;
  --sevA: #b3121d;
  --sevB: #9a4200;
  --sevC: #3d4853;
  --f-jp: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-ui: "Barlow", "BIZ UDPGothic", "Hiragino Sans", sans-serif;
  --f-num: "Barlow Condensed", "Barlow", sans-serif;
  --r-xl: 28px;
  --r-l: 20px;
  --r-m: 14px;
  --r-s: 8px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06);
  --sh-2: 0 6px 18px rgba(0, 0, 0, .16), 0 2px 4px rgba(0, 0, 0, .1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --hazard: repeating-linear-gradient(-45deg, var(--ink) 0 11px, var(--y) 11px 22px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #26292d;
  color: var(--ink);
  font: 400 15px/1.6 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-feature-settings: "palt"; font-family: var(--f-ui); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.nb { white-space: nowrap; }
.ic { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; }
svg polyline, svg ellipse { vector-effect: non-scaling-stroke; }
:focus-visible { outline: 3px solid #0057d9; outline-offset: 2px; }

/* ---------- アプリの枠 ---------- */
.app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  margin: 0 auto;
}
@media (min-width: 600px) {
  body { background: #26292d repeating-linear-gradient(-45deg, rgba(255, 204, 0, .07) 0 30px, transparent 30px 60px); }
  .app { max-width: 430px; box-shadow: 0 0 0 1px #000, 0 20px 60px rgba(0, 0, 0, .5); }
}
.views { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.view {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  background: var(--bg);
  will-change: transform;
}
.view.leaving { pointer-events: none; }
.scroller {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 32px;
  outline: none;
}

/* ---------- 下のナビゲーションバー（M3） ---------- */
.navbar {
  flex: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(80px + var(--safe-b));
  padding: 12px 8px var(--safe-b);
  background: var(--steel);
  border-top: 3px solid var(--y);
  z-index: 5;
}
.no-nav .navbar { display: none; }
.nav-item {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #d9d9d6; font: 700 13px/1.2 var(--f-jp);
  border-radius: 16px;
}
.nav-ind {
  position: relative;
  display: grid; place-items: center;
  width: 64px; height: 32px; border-radius: 999px;
  transition: background .3s var(--ease), width .35s var(--spring);
}
.nav-item.on { color: #fff; }
.nav-item.on .nav-ind { background: var(--y); color: var(--ink); }
.nav-item:active .nav-ind { transform: scale(.92); }
.badge {
  position: absolute; top: -4px; right: 8px;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--ng); color: #fff;
  font: 700 13px/20px var(--f-num); text-align: center;
  box-shadow: 0 0 0 2px var(--steel);
}

/* ---------- ボタン ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font: 700 16px/1.2 var(--f-jp);
  transition: transform .25s var(--spring), border-radius .3s var(--spring), background .2s;
  user-select: none;
}
.btn:active { transform: scale(.96); border-radius: 18px; }
.btn[disabled] { background: #c9c9c3 !important; color: #3a3a3a !important; box-shadow: none !important; cursor: not-allowed; }
.btn.wide { width: 100%; }
.btn-y { background: var(--y); color: var(--ink); box-shadow: inset 0 -3px 0 var(--y-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink .ic { color: var(--y); }
.btn-danger { background: var(--ng); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-tonal { background: var(--y-soft); color: var(--ink); min-height: 48px; font-size: 15px; box-shadow: inset 0 0 0 1px #e6cf73; }
.btn-text {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px;
  background: none; color: var(--ink); font: 700 15px/1.2 var(--f-jp);
}
.btn-text:active { background: rgba(0, 0, 0, .06); }
.btn-text.danger { color: var(--ng); }
.btn-text[disabled] { color: #6b6b6b; }
.ib {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: none; color: inherit;
}
.ib:active { background: rgba(127, 127, 127, .2); }
.rip { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .16; transform: scale(0);
  animation: rip .5s var(--ease) forwards;
}
@keyframes rip { to { transform: scale(1); opacity: 0; } }

/* ---------- 共通の部品 ---------- */
.plate {
  display: inline-flex; align-items: center;
  padding: 2px 8px 1px; border-radius: 3px;
  background: var(--ink); color: var(--y);
  font: 700 15px/1.25 var(--f-num); letter-spacing: .04em;
  white-space: nowrap;
}
.plate.sm { font-size: 14px; padding: 1px 6px 0; }
.plate.lg { font-size: 22px; padding: 3px 10px 2px; }
.hazard { height: 12px; background: var(--hazard); flex: none; }
.hazard.thin { height: 8px; }
.sec-t {
  margin: 26px 20px 10px;
  font: 700 15px/1.3 var(--f-jp); color: var(--ink2);
  display: flex; align-items: center; gap: 8px;
}
.sec-t::before { content: ""; width: 4px; height: 16px; background: var(--y); box-shadow: 0 0 0 1px var(--ink); }
.req { margin-left: 6px; padding: 1px 7px; border-radius: 4px; background: var(--ng); color: #fff; font: 700 13px/1.4 var(--f-jp); }
.ngpill { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; background: var(--ng); color: #fff; font: 700 14px/1.4 var(--f-num); font-style: normal; letter-spacing: .03em; white-space: nowrap; }
.okpill { display: inline-flex; align-items: center; gap: 2px; padding: 1px 9px 1px 5px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font: 700 14px/1.4 var(--f-num); white-space: nowrap; }
.okpill .ic { width: 16px; height: 16px; }
.bad { color: var(--ng); }
.bad-v { color: var(--ng); font-family: var(--f-num); font-size: 17px; }
.foot-note { margin: 18px 24px 0; color: var(--ink3); font-size: 14px; text-align: center; }

/* アプリバー */
.appbar {
  flex: none; position: relative; z-index: 3;
  display: flex; align-items: center; gap: 4px;
  min-height: 64px; padding: var(--safe-t) 4px 0;
  background: var(--paper); color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.ab-t { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 6px 4px; }
.ab-t b { font: 700 18px/1.3 var(--f-jp); font-feature-settings: "palt"; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-t small { font: 600 14px/1.3 var(--f-ui); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-ink { background: var(--steel); color: #fff; border-bottom: 0; }
.appbar-ink .ab-t small { color: #d6d6d0; }
.appbar-ng { background: var(--ng); color: #fff; border-bottom: 0; }
.appbar-ng .ab-t small { color: #fff; }

/* 大きい見出し（M3 Large top app bar） */
.lg-head { padding: calc(28px + var(--safe-t)) 20px 14px; }
.lg-head h1 { font: 700 30px/1.2 var(--f-jp); letter-spacing: -.01em; }
.lg-head p { margin-top: 4px; color: var(--ink3); font-size: 15px; }

/* 下の固定バー */
.bottom-bar {
  flex: none; position: relative; z-index: 3;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 16px rgba(0, 0, 0, .05);
}

/* ---------- ルート一覧 ---------- */
.yhead { position: relative; background: var(--y); padding: 0 20px 20px; }
.topbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 -20px; padding: calc(10px + var(--safe-t)) 12px 10px 20px;
  background: var(--y);
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--f-jp); letter-spacing: .02em; }
.brand img { border-radius: 9px; box-shadow: 0 0 0 2px var(--ink); }
.net-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px 0 10px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: 700 14px/1 var(--f-jp);
  transition: transform .2s var(--spring);
}
.net-chip:active { transform: scale(.94); }
.net-chip .ic { width: 20px; height: 20px; }
.net-offline .ic { color: var(--ng); }
.net-unstable .ic { color: var(--sevB); }
.net-online .ic { color: var(--ok); }
.net-chip.on-dark { border-color: #fff; background: transparent; color: #fff; }
.net-chip.on-dark .ic { color: var(--y); }
.plant { margin-top: 8px; font: 700 14px/1.4 var(--f-jp); color: var(--ink2); }
.today { margin-top: 2px; font: 700 26px/1.25 var(--f-jp); }
.today span { font-size: 18px; margin-left: 2px; }
.meter {
  margin-top: 16px; padding: 16px 16px 14px;
  background: var(--ink); color: #fff;
  border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 8px;
  display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; align-items: end;
}
.meter-big { display: flex; align-items: baseline; gap: 2px; }
.meter-big b { font: 700 64px/.85 var(--f-num); color: var(--y); }
.meter-big span { font: 700 28px/1 var(--f-num); color: #fff; }
.meter-big small { margin-left: 8px; font: 700 14px/1.2 var(--f-jp); color: #fff; align-self: center; }
.meter-segs { display: flex; gap: 5px; align-self: center; }
.meter-segs i { flex: 1; height: 14px; border-radius: 3px; background: #4a4e55; }
.meter-segs .seg-done { background: var(--y); }
.meter-segs .seg-doing { background: repeating-linear-gradient(-45deg, var(--y) 0 5px, #4a4e55 5px 10px); }
.meter-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid #3c4046; padding-top: 10px; }
.meter-stats > * { display: flex; flex-direction: column; padding-left: 10px; border-left: 1px solid #3c4046; }
.meter-stats > *:first-child { border-left: 0; padding-left: 0; }
.meter-stats dt { font: 700 13px/1.3 var(--f-jp); color: #d3d3cd; }
.meter-stats dd { margin: 0; font: 700 26px/1.1 var(--f-num); color: #fff; }
.meter-stats dd.is-ng { color: #ff8a80; }
.meter-stats .is-q dd { color: var(--y); }

.timeline { list-style: none; margin: 0; padding: 4px 16px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 77px; top: 10px; bottom: 30px; width: 3px; background: var(--ink); border-radius: 2px; }
.tl { position: relative; display: grid; grid-template-columns: 64px 28px 1fr; align-items: start; padding: 8px 0; }
.tl-time { padding-top: 14px; text-align: right; font: 700 22px/1 var(--f-num); color: var(--ink); letter-spacing: .02em; }
.tl-node {
  justify-self: center; margin-top: 14px; z-index: 1;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 3px var(--ink);
  display: grid; place-items: center;
}
.tl-node .ic { width: 14px; height: 14px; color: var(--y); }
.tl-done .tl-node { background: var(--ink); }
.tl-doing .tl-node { background: var(--y); box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 0 rgba(255, 204, 0, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 10px rgba(255, 204, 0, 0); } 100% { box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 0 rgba(255, 204, 0, 0); } }
.tl-card {
  display: grid; grid-template-columns: 84px 1fr; gap: 12px;
  padding: 10px; border-radius: var(--r-l);
  background: var(--paper); box-shadow: var(--sh-1);
  transition: transform .25s var(--spring);
}
.tl-card:active { transform: scale(.97); }
.tl-doing .tl-card { box-shadow: 0 0 0 3px var(--ink), var(--sh-2); }
.tl-done .tl-card { background: #f7f7f4; }
.tl-img { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; background: #ccc; }
.tl-done .tl-img { filter: grayscale(.7); }
.tl-body { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.tl-name { font: 700 16px/1.35 var(--f-jp); }
.tl-meta { font-size: 14px; color: var(--ink3); line-height: 1.4; }
.tl-st { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font: 700 14px/1.3 var(--f-jp); }
.tl-st .ic { width: 18px; height: 18px; }
.tl-st.st-done { color: var(--ok); }
.tl-st .ngpill { margin-left: 4px; }
.tl-st.st-doing { color: var(--ink); background: var(--y); padding: 2px 8px; border-radius: 6px; }
.tl-st.st-todo { color: var(--ink3); }
.tl-bar { width: 100%; height: 6px; border-radius: 3px; background: #e2e2dc; overflow: hidden; }
.tl-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.tl-now { position: relative; height: 30px; margin-left: 66px; display: flex; align-items: center; }
.tl-now::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--ng); }
.tl-now::after { content: ""; position: absolute; left: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--ng); }
.tl-now span { position: relative; margin-left: 30px; padding: 2px 10px; border-radius: 999px; background: var(--ng); color: #fff; font: 700 14px/1.3 var(--f-jp); }

.efab {
  position: absolute; right: 16px; bottom: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 22px 0 18px;
  border-radius: 20px; background: var(--ink); color: #fff;
  font: 700 17px/1 var(--f-jp);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35), inset 0 0 0 2px var(--y);
  transition: transform .3s var(--spring), border-radius .3s var(--spring);
}
.efab .ic { color: var(--y); width: 26px; height: 26px; }
.efab:active { transform: scale(.94); border-radius: 30px; }
.ptr { position: absolute; left: 50%; top: 0; z-index: 3; margin-left: -22px; transform: translateY(-60px); width: 44px; height: 44px; border-radius: 50%; background: var(--paper); box-shadow: var(--sh-2); display: grid; place-items: center; transition: transform .3s var(--ease); pointer-events: none; }
.ptr.pull { transition: none; }
.ptr.spin .ptr-c { animation: spin .8s linear infinite; }
.ptr-c { display: grid; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-ptr] { position: relative; padding-bottom: 104px; }

/* ---------- ルート詳細 ---------- */
.r-hero { position: relative; height: 210px; background: #333; }
.r-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fab-back {
  position: absolute; left: 12px; top: calc(12px + var(--safe-t));
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--paper); color: var(--ink); box-shadow: var(--sh-2);
}
.fab-back:active { transform: scale(.92); }
.r-plate { padding: 18px 20px 18px; background: var(--ink); color: #fff; }
.r-plate .plate { background: var(--y); color: var(--ink); }
.r-plate h1 { margin-top: 10px; font: 700 24px/1.3 var(--f-jp); }
.r-plate p { margin-top: 4px; color: #d6d6d0; font-size: 15px; }
.r-stats { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.r-stats > span { padding: 4px 12px; border-radius: 999px; background: var(--steel2); font: 700 15px/1.3 var(--f-ui); }
.r-stats > span.bad { background: var(--ng); color: #fff; }
.stops { list-style: none; margin: 0; padding: 0 16px; position: relative; }
.stops::before { content: ""; position: absolute; left: 39px; top: 30px; bottom: 30px; width: 4px; background: var(--ink); }
.stop a {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 12px 8px 12px 6px; margin: 4px 0;
  border-radius: var(--r-l);
  transition: background .2s, transform .25s var(--spring);
}
.stop a:active { transform: scale(.98); background: rgba(0, 0, 0, .05); }
.stop-dot {
  flex: none; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); box-shadow: inset 0 0 0 4px var(--ink);
  font: 700 20px/1 var(--f-num);
}
.stop-done .stop-dot { background: var(--ink); color: var(--y); }
.stop-done .stop-dot .ic { width: 22px; height: 22px; }
.stop-current a { background: var(--paper); box-shadow: 0 0 0 3px var(--y), var(--sh-1); }
.stop-current .stop-dot { background: var(--y); }
.stop-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.stop-tx b { font: 700 16px/1.35 var(--f-jp); }
.stop-tx small { font-size: 14px; color: var(--ink3); }
.stop-st { flex: none; display: inline-flex; align-items: center; gap: 2px; font: 700 15px/1 var(--f-num); color: var(--ink3); }
.stop-st.ok { color: var(--ok); }
.stop-st.ok .ic { width: 18px; height: 18px; }
.stop-st.bad { padding: 4px 9px; border-radius: 999px; background: var(--ng); color: #fff; }
.stop-st.part { padding: 4px 9px; border-radius: 999px; background: var(--y); color: var(--ink); }
.chev { width: 20px; height: 20px; color: #6b6b6b; }
.last-rec { display: flex; align-items: center; gap: 12px; margin: 0 16px; padding: 14px 16px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); }
.last-rec > span { flex: 1; display: flex; flex-direction: column; }
.last-rec b { font: 700 16px/1.4 var(--f-jp); }
.last-rec small { font-size: 14px; color: var(--ink3); }

/* ---------- 点検入力 ---------- */
.eq-chips {
  flex: none; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 8px 12px 12px; background: var(--steel);
}
.eq-chips::-webkit-scrollbar { display: none; }
.eqc {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  min-height: 40px; padding: 0 14px 0 10px; border-radius: 12px;
  background: var(--steel2); color: #fff;
  font: 700 17px/1 var(--f-num); letter-spacing: .03em;
  transition: transform .2s var(--spring), border-radius .3s var(--spring);
}
.eqc:active { transform: scale(.94); }
.eqc-ic { display: inline-grid; width: 18px; }
.eqc-ic .ic { width: 18px; height: 18px; }
.eqc.done .eqc-ic { color: #8fe0a8; }
.eqc.bad .eqc-ic { color: #ff9b93; }
.eqc.part::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--y); margin-left: 2px; }
.eqc.on { background: var(--y); color: var(--ink); border-radius: 999px; }
.eqc.on .eqc-ic { color: var(--ink); }
.eqc.on.part::after { background: var(--ink); }

.eq-head { padding: 16px 16px 4px; }
.nameplate {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center;
  padding: 14px 18px; border-radius: 10px;
  background: linear-gradient(180deg, #d9dadb, #b9bbbd);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 #9a9c9f, var(--sh-1);
  color: var(--ink);
}
.np-code { grid-row: span 2; font: 700 40px/1 var(--f-num); letter-spacing: .02em; padding-right: 14px; border-right: 2px solid #8d9094; }
.np-name { font: 700 16px/1.35 var(--f-jp); }
.np-loc { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: #262626; }
.np-loc .ic { width: 16px; height: 16px; }
.np-screw { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #888 60%); top: 6px; }
.np-screw.s1 { left: 6px; } .np-screw.s2 { right: 6px; }
.eq-prog { margin: 14px 2px 12px; }
.eqp-bar { height: 8px; border-radius: 4px; background: #d4d4ce; overflow: hidden; }
.eqp-bar i { display: block; height: 100%; background: var(--ink); border-radius: 4px; transition: width .4s var(--spring); }
.eq-prog p { margin-top: 6px; font-size: 14px; color: var(--ink2); }
.eq-prog b { font: 700 18px/1 var(--f-num); }
.eq-head .btn-tonal { width: 100%; }
.locked { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: var(--r-m); background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 14px; }

.items { padding: 8px 12px 0; display: flex; flex-direction: column; gap: 12px; }
.item {
  position: relative;
  padding: 16px 16px 16px; border-radius: var(--r-l);
  background: var(--paper); box-shadow: var(--sh-1);
  border-left: 6px solid #d8d8d2;
  transition: border-color .2s, box-shadow .25s;
  scroll-margin: 90px;
}
.item.st-ok { border-left-color: var(--ok); }
.item.st-ng, .item.st-high, .item.st-low { border-left-color: var(--ng); }
.item.st-high, .item.st-low { border-left: 0; padding-left: 22px; }
.item.st-high::before, .item.st-low::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; border-radius: var(--r-l) 0 0 var(--r-l); background: var(--hazard); }
.item.invalid { box-shadow: 0 0 0 2px var(--ng); }
.item.shake { animation: shake .45s; }
.item.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--y), var(--sh-2); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.item-h { display: flex; gap: 12px; align-items: flex-start; }
.item-no { flex: none; font: 700 20px/1.2 var(--f-num); color: #6b6b6b; padding-top: 1px; }
.item-h h3 { font: 700 18px/1.35 var(--f-jp); }
.hint { font-size: 14px; color: var(--ink3); line-height: 1.5; margin-top: 2px; }
.okng { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.okng button {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 60px; border-radius: 16px;
  border: 2px solid #bdbdb6; background: var(--paper); color: var(--ink2);
  font: 700 22px/1 var(--f-num); letter-spacing: .06em;
  transition: transform .25s var(--spring), border-radius .3s var(--spring), background .15s, color .15s;
}
.okng button .ic { width: 26px; height: 26px; }
.okng button:active { transform: scale(.95); }
.okng .ok.on { background: var(--ok); border-color: var(--ok); color: #fff; border-radius: 30px; }
.okng .ng.on { background: var(--ng); border-color: var(--ng); color: #fff; border-radius: 30px; }
.okng button:disabled { cursor: default; }
.ng-slot:empty { display: none; }
.ng-slot { margin-top: 12px; }
.need { padding: 12px; border-radius: var(--r-m); background: var(--ng-soft); }
.need p { display: flex; align-items: center; gap: 6px; color: var(--ng); font: 700 15px/1.4 var(--f-jp); margin-bottom: 10px; }
.need p .ic { width: 20px; height: 20px; }
.need .btn { width: 100%; }
.rep-ok { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: var(--r-m); background: var(--ng-soft); }
.rep-ok img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.rep-ok > span { flex: 1; display: flex; flex-direction: column; }
.rep-ok b { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font: 700 15px/1.4 var(--f-jp); }
.rep-ok b .ic { width: 18px; height: 18px; color: var(--ok); }
.rep-ok small { font-size: 14px; color: var(--ink2); }
.range { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 6px 10px; border-radius: 8px; background: #f1f1ec; font: 600 15px/1.4 var(--f-ui); color: var(--ink2); }
.range span { color: var(--ink3); }
.num-row { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; margin-top: 12px; }
.step {
  height: 64px; border: 0; border-radius: 16px;
  background: #ececE6; color: var(--ink);
  display: grid; place-items: center;
  transition: transform .2s var(--spring), border-radius .3s var(--spring);
}
.step:active { transform: scale(.92); border-radius: 28px; background: #e0e0d8; }
.num-f {
  display: flex; align-items: center; gap: 6px;
  height: 64px; padding: 0 14px; border-radius: 16px;
  background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink);
}
.num-f:focus-within { box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 4px var(--y); }
.num-f input {
  flex: 1; min-width: 0; width: 100%; height: 100%;
  border: 0; outline: 0; background: none; text-align: right;
  font: 700 36px/1 var(--f-num); letter-spacing: .02em; color: var(--ink);
}
.num-f input::placeholder { color: #8a8a8a; }
.unit { font: 700 17px/1 var(--f-num); color: var(--ink2); }
.st-high .num-f, .st-low .num-f { box-shadow: inset 0 0 0 3px var(--ng); }
.st-high .num-f input, .st-low .num-f input { color: var(--ng); }
.num-err { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ng); font: 700 14px/1.4 var(--f-jp); }
.num-err .ic { width: 18px; height: 18px; }
.gauge { position: relative; height: 40px; margin: 14px 6px 0; }
.g-track { position: absolute; left: 0; right: 0; top: 4px; height: 12px; border-radius: 6px; background: #f3d6d4; }
.g-band { position: absolute; top: 0; bottom: 0; background: #9fd6b1; box-shadow: inset 2px 0 0 var(--ok), inset -2px 0 0 var(--ok); }
.g-prev { position: absolute; top: -3px; width: 2px; height: 18px; margin-left: -1px; background: #6b6b6b; }
.g-mark { position: absolute; top: -8px; width: 0; height: 0; margin-left: -9px; border: 9px solid transparent; border-top: 12px solid var(--ink); transition: left .35s var(--spring); }
.g-mark.bad { border-top-color: var(--ng); }
.g-lb { position: absolute; top: 20px; transform: translateX(-50%); font: 700 14px/1.2 var(--f-num); color: var(--ink2); }
.oor { padding: 12px; border-radius: var(--r-m); background: var(--y-soft); box-shadow: inset 0 0 0 2px var(--ink); }
.oor-t { display: flex; align-items: flex-start; gap: 6px; font: 700 15px/1.5 var(--f-jp); color: var(--ink); }
.oor-t .ic { width: 20px; height: 20px; margin-top: 2px; color: var(--ng); }
.oor-s { margin: 4px 0 10px 26px; font-size: 14px; color: var(--ink2); }
.oor-act { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; }
.oor-act .btn { padding: 0 10px; font-size: 15px; min-height: 48px; }
.oor .rep-ok { margin-top: 10px; background: var(--paper); }
.note-f { display: block; margin: 20px 12px 0; }
.note-f > span { display: block; margin: 0 4px 6px; font: 700 15px/1.3 var(--f-jp); color: var(--ink2); }
.note-f small { font-weight: 400; color: var(--ink3); }
textarea {
  display: block; width: 100%; padding: 12px 14px;
  border: 0; border-radius: var(--r-m);
  background: var(--paper); box-shadow: inset 0 0 0 2px #a8a8a1;
  font: 400 16px/1.6 var(--f-jp); resize: vertical; outline: none;
}
textarea:focus { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 4px var(--y); }
textarea::placeholder { color: #6e6e6e; }

/* ---------- NG報告 ---------- */
.ng-sum { padding: 18px 20px 20px; background: var(--ng); color: #fff; }
.ng-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 6px; border-radius: 6px; background: #fff; color: var(--ng); font: 700 14px/1.3 var(--f-jp); }
.ng-badge .ic { width: 18px; height: 18px; }
.ng-sum h1 { margin-top: 10px; font: 700 24px/1.3 var(--f-jp); }
.ng-sum p { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 15px; }
.ng-sum p b { font: 700 26px/1 var(--f-num); }
.fsec { padding: 0 16px; margin-top: 24px; scroll-margin-top: 12px; }
.fsec h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; margin: 0 4px 10px; font: 700 18px/1.4 var(--f-jp); }
.fsec h2 small { flex-basis: 100%; font: 400 14px/1.4 var(--f-jp); color: var(--ink3); }
.f-err { display: flex; align-items: center; gap: 6px; margin: 8px 4px 0; color: var(--ng); font: 700 14px/1.4 var(--f-jp); }
.f-err .ic { width: 18px; height: 18px; }
.ph-empty { display: flex; flex-direction: column; gap: 10px; }
.ph-cam {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 180px; padding: 18px; border-radius: var(--r-xl);
  border: 3px dashed var(--ink); background: var(--y-soft); color: var(--ink);
  transition: transform .25s var(--spring);
}
.ph-cam:active { transform: scale(.97); }
.ph-cam .ic { width: 48px; height: 48px; }
.ph-cam b { font: 700 20px/1.3 var(--f-jp); }
.ph-cam small { font-size: 14px; color: var(--ink2); }
.ph-note { font-size: 14px; color: var(--ink3); padding: 0 4px; }
.ph-stage { position: relative; aspect-ratio: 1; border-radius: var(--r-l); overflow: hidden; background: #222; box-shadow: var(--sh-2); }
.ph-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.ph-tools { display: flex; gap: 8px; margin-top: 10px; }
.ph-tools .tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; min-width: 48px; padding: 0 12px; border-radius: 14px;
  border: 0; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px #b8b8b0;
  font: 700 14px/1 var(--f-jp);
  transition: transform .2s var(--spring), border-radius .3s var(--spring);
}
.ph-tools .tool:active { transform: scale(.94); }
.ph-tools .tool.on { background: var(--ink); color: #fff; border-radius: 999px; box-shadow: none; }
.ph-tools .tool.on .ic { color: #ff6b62; }
.ph-tools .tool[disabled] { color: #6b6b6b; background: #e4e4df; }
.ph-tools .tool:nth-child(3) { margin-left: auto; }
.ph-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.th { width: 64px; height: 64px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px #b8b8b0; display: grid; place-items: center; }
.th img { width: 100%; height: 100%; object-fit: cover; }
.th.on { box-shadow: 0 0 0 3px var(--ink); }
.th.add { border: 2px dashed #8a8a84; box-shadow: none; background: transparent; }
.sevs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sevb {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 10px; border-radius: 18px; text-align: left;
  border: 2px solid #b8b8b0; background: var(--paper); color: var(--ink);
  transition: transform .25s var(--spring), border-radius .3s var(--spring);
}
.sevb:active { transform: scale(.95); }
.sevb b { font: 700 28px/1 var(--f-num); }
.sevb span { font: 700 15px/1.3 var(--f-jp); }
.sevb small { font-size: 14px; line-height: 1.4; color: var(--ink3); }
.sevb.on { color: #fff; border-radius: 26px; }
.sevb.on small { color: #fff; }
.sevb.sev-A.on { background: var(--sevA); border-color: var(--sevA); }
.sevb.sev-B.on { background: var(--sevB); border-color: var(--sevB); }
.sevb.sev-C.on { background: var(--sevC); border-color: var(--sevC); }
.sev { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; color: #fff; font: 700 14px/1.5 var(--f-jp); white-space: nowrap; }
.sev.sev-A { background: var(--sevA); } .sev.sev-B { background: var(--sevB); } .sev.sev-C { background: var(--sevC); }
.chips { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; padding: 0; margin-bottom: 10px; }
.chip {
  position: relative; overflow: hidden; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid #8f8f88; background: var(--paper); color: var(--ink);
  font: 700 14px/1 var(--f-jp);
  transition: border-radius .3s var(--spring), background .15s;
}
.chip .ic { width: 18px; height: 18px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); border-radius: 22px; }
.chip.on .ic { color: var(--y); }
.chip:disabled { color: #555; }
.autosave { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 24px 16px 0; font-size: 14px; color: var(--ink3); }
.autosave .ic { width: 18px; height: 18px; }

/* ---------- 署名 ---------- */
.sg-sum { padding: 18px 16px 16px; background: var(--ink); color: #fff; }
.sg-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sg-nums > div { display: flex; flex-direction: column; padding: 10px 10px; border-radius: 14px; background: var(--steel2); }
.sg-nums b { font: 700 34px/1 var(--f-num); }
.sg-nums b small { font-size: 20px; color: #d6d6d0; }
.sg-nums span { font: 700 13px/1.4 var(--f-jp); color: #e6e6e0; margin-top: 4px; }
.sg-nums span small { display: block; font-weight: 400; }
.sg-nums .ok b { color: #8fe0a8; }
.sg-nums .bad { background: var(--ng); }
.sg-nums .bad b { color: #fff; }
.sg-time { margin-top: 12px; font: 600 15px/1.4 var(--f-ui); color: #e0e0da; }
.warnbox { display: flex; gap: 10px; margin: 16px 16px 0; padding: 14px; border-radius: var(--r-m); background: var(--y-soft); box-shadow: inset 0 0 0 2px var(--ink); }
.warnbox > .ic { color: var(--ng); }
.warnbox b { font: 700 15px/1.4 var(--f-jp); }
.warnbox p { margin-top: 4px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 0 14px; }
.warnbox a { text-decoration: underline; font-weight: 700; display: inline-block; min-height: 32px; padding: 4px 0; }
.sg-ngs { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.sg-ngs li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--paper); box-shadow: var(--sh-1); }
.sg-ng-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-ng-tx b { font: 700 15px/1.4 var(--f-jp); }
.sg-ng-tx small { font-size: 14px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-ngs img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.allok { display: flex; align-items: center; gap: 8px; margin: 16px 16px 0; padding: 14px 16px; border-radius: var(--r-m); background: var(--ok-soft); color: var(--ok); font: 700 15px/1.4 var(--f-jp); }
.who { display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 0 16px; padding: 12px 14px; border: 0; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); text-align: left; }
.who > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.who b { font: 700 17px/1.4 var(--f-jp); }
.who small { font-size: 14px; color: var(--ink3); }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--y); color: var(--ink); font: 700 20px/1 var(--f-jp); box-shadow: inset 0 0 0 2px var(--ink); }
.pad { position: relative; margin: 0 16px; height: 190px; border-radius: var(--r-l); background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); overflow: hidden; }
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.pad-ph { position: absolute; left: 0; right: 0; top: 64px; text-align: center; font: 700 18px/1.3 var(--f-jp); color: #6b6b6b; transition: opacity .2s; }
.pad.has .pad-ph { opacity: 0; }
.pad-line { position: absolute; left: 24px; right: 24px; bottom: 44px; border-top: 2px dashed #9a9a94; }
.pad-line::before { content: "×"; position: absolute; left: -2px; top: -26px; font: 700 20px/1 var(--f-ui); color: #555; }
.pad-clear { position: absolute; right: 6px; bottom: 2px; z-index: 2; }
.sg-legal { margin: 10px 20px 0; font-size: 14px; color: var(--ink3); }

/* ---------- 履歴 ---------- */
.strip { margin: 0 16px; padding: 14px 10px 10px; border-radius: var(--r-xl); background: var(--paper); box-shadow: var(--sh-1); }
.strip-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 8px; border: 0; border-radius: 16px; background: none; transition: background .2s, transform .2s var(--spring); }
.day:active { transform: scale(.94); }
.day.on { background: var(--y); }
.day-w { font: 700 13px/1.2 var(--f-jp); color: var(--ink3); }
.day.on .day-w { color: var(--ink); }
.day-d { font: 700 22px/1.1 var(--f-num); }
.day-c { display: grid; grid-template-columns: 1fr; gap: 3px; margin-top: 4px; }
.day-c i, .strip-legend i { display: block; width: 22px; height: 7px; border-radius: 2px; }
.c-ok { background: var(--ink); }
.c-ng { background: var(--ng); }
.c-q { background: repeating-linear-gradient(-45deg, var(--ink) 0 3px, var(--y) 3px 6px) !important; }
.c-none { background: #e0e0da; }
.strip-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin-top: 10px; font-size: 13px; color: var(--ink2); }
.strip-legend span { display: inline-flex; align-items: center; gap: 6px; }
.strip-legend i { width: 14px; }
.lg-head + .strip { margin-top: 4px; }
.strip + .chips { margin-top: 16px; }
.h-list { list-style: none; margin: 8px 0 0; padding: 0 16px; }
.h-date { position: sticky; top: 0; z-index: 1; margin: 0 -16px; padding: 14px 20px 6px; background: var(--bg); font: 700 15px/1.3 var(--f-jp); color: var(--ink2); }
.h-rec { display: flex; align-items: center; gap: 12px; padding: 12px 12px; margin-bottom: 8px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); transition: transform .25s var(--spring); }
.h-rec:active { transform: scale(.98); }
.h-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.h-tx b { font: 700 15px/1.4 var(--f-jp); }
.h-tx small { font-size: 14px; color: var(--ink3); }
.h-res { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.h-st { font: 700 13px/1.3 var(--f-jp); color: var(--ok); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.h-st.queued { color: #7a4a00; }
.h-st .ic { width: 16px; height: 16px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 24px; text-align: center; list-style: none; }
.empty b { font: 700 18px/1.4 var(--f-jp); }
.empty span { color: var(--ink3); font-size: 15px; }
.empty .btn { margin-top: 8px; }
.empty-ic { width: 56px; height: 56px; color: #6b6b6b; }
.empty.big img { width: 180px; height: 220px; object-fit: cover; border-radius: var(--r-xl); box-shadow: var(--sh-2); margin-bottom: 8px; }

/* 点検票 */
.ticket { margin: 16px; padding: 18px; border-radius: var(--r-xl) var(--r-xl) 8px 8px; background: var(--paper); box-shadow: var(--sh-1); position: relative; }
.ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: var(--hazard); border-radius: 0 0 6px 6px; }
.t-top { display: flex; justify-content: space-between; align-items: center; }
.ticket h1 { margin-top: 12px; font: 700 22px/1.35 var(--f-jp); }
.t-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 14px 0 0; }
.t-meta div { display: flex; flex-direction: column; }
.t-meta dt { font: 700 13px/1.3 var(--f-jp); color: var(--ink3); }
.t-meta dd { margin: 0; font: 700 16px/1.4 var(--f-ui); }
.ng-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.ng-card { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 10px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); }
.ph-wrap { position: relative; width: 112px; height: 112px; border-radius: 14px; overflow: hidden; }
.ph-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-ink { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-n { position: absolute; right: 4px; bottom: 4px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: #fff; font: 700 13px/1.6 var(--f-jp); }
.ng-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ng-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ng-tx b { font: 700 16px/1.4 var(--f-jp); }
.ng-tx p { font-size: 14px; color: var(--ink2); line-height: 1.5; }
.acts { display: flex; flex-wrap: wrap; gap: 4px; }
.acts span { padding: 1px 8px; border-radius: 6px; background: #ececE6; font-size: 13px; color: var(--ink); }
.eq-tbl { margin: 0 16px 10px; padding: 12px 14px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); }
.eq-tbl h3 { display: flex; align-items: center; gap: 8px; font: 700 15px/1.4 var(--f-jp); margin-bottom: 6px; }
.eq-tbl table { width: 100%; border-collapse: collapse; }
.eq-tbl th, .eq-tbl td { padding: 8px 0; border-top: 1px solid #e3e3dd; font-size: 14px; text-align: left; vertical-align: middle; }
.eq-tbl th { font-weight: 400; color: var(--ink2); }
.eq-tbl td { text-align: right; font: 700 16px/1.3 var(--f-num); }
.eq-tbl td.st { width: 30px; color: var(--ok); }
.eq-tbl td.st .ic { width: 18px; height: 18px; }
.eq-tbl tr.bad th, .eq-tbl tr.bad td { color: var(--ng); font-weight: 700; }
.sig-view { margin: 0 16px; padding: 10px 16px 14px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); }
.sig-view svg { display: block; width: 100%; height: 110px; border-bottom: 2px dashed #a3a39c; }
.sig-view p { margin-top: 8px; font: 700 16px/1.4 var(--f-jp); display: flex; justify-content: space-between; }
.sig-view small { font-weight: 400; color: var(--ink3); font-size: 14px; }
.del { margin: 18px auto 0; display: flex; }

/* ---------- 未送信キュー ---------- */
.q-head { padding: calc(20px + var(--safe-t)) 20px 18px; background: var(--steel); color: #fff; }
.q-head-top { display: flex; align-items: center; justify-content: space-between; }
.q-head h1 { font: 700 24px/1.3 var(--f-jp); }
.q-count { display: flex; align-items: baseline; gap: 4px; margin-top: 10px; }
.q-count b { font: 700 72px/.9 var(--f-num); color: var(--y); }
.q-count > span { font: 700 20px/1 var(--f-jp); }
.q-count .q-size { margin-left: auto; font: 700 18px/1 var(--f-num); color: #e6e6e0; }
.q-note { margin-top: 10px; font-size: 14px; color: #e6e6e0; line-height: 1.6; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 14px; padding: 4px; border-radius: 999px; }
.seg-dark { background: #0d0f11; }
.seg button {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; border: 0; border-radius: 999px;
  background: none; color: #e6e6e0; font: 700 14px/1 var(--f-jp);
  transition: background .25s var(--ease);
}
.seg button .ic { width: 18px; height: 18px; }
.seg button.on { background: var(--y); color: var(--ink); }
.seg button[disabled] { color: #a7a7a1; }
.seg button.on[disabled] { color: var(--ink); }
.q-demo { margin-top: 8px; text-align: center; font-size: 13px; color: #d0d0ca; }
.q-list { list-style: none; margin: 16px 0 0; padding: 0 16px; display: flex; flex-direction: column; gap: 12px; counter-reset: q; }
.q-row { position: relative; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); overflow: hidden; }
.q-main { display: flex; gap: 12px; padding: 14px 14px 12px; }
.q-tag { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border-radius: 12px; background: var(--y); width: 70px; }
.q-tag small { font: 700 14px/1 var(--f-num); color: var(--ink); }
.q-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-tx b { font: 700 16px/1.4 var(--f-jp); }
.q-tx small { font-size: 14px; color: var(--ink3); }
.q-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.q-chips > span { padding: 1px 8px; border-radius: 6px; background: #ececE6; font: 700 13px/1.6 var(--f-jp); color: var(--ink); }
.q-chips > span.bad { background: var(--ng); color: #fff; }
.q-prog { height: 6px; background: #e8e8e2; }
.q-prog i { display: block; height: 100%; width: 0; background: var(--ink); }
.q-row:not(.sending) .q-prog { display: none; }
.q-row.sending { box-shadow: 0 0 0 3px var(--y), var(--sh-2); }
.q-row.err { box-shadow: 0 0 0 2px var(--ng); }
.q-err { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px 14px; background: var(--ng-soft); color: var(--ng); font: 700 14px/1.4 var(--f-jp); }
.q-err .ic { width: 18px; height: 18px; }
.q-err .btn-text { margin-left: auto; color: var(--ink); }

/* ---------- 設定 ---------- */
.set-h { margin: 22px 24px 8px; font: 700 14px/1.3 var(--f-jp); color: var(--ink2); }
.set-group { margin: 0 16px; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 16px; border: 0; border-top: 1px solid #e6e6e0; background: none; text-align: left; color: var(--ink); }
.set-group > .set-row:first-child { border-top: 0; }
.set-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #ececE6; }
.set-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-tx b { font: 700 16px/1.4 var(--f-jp); }
.set-tx small { font-size: 14px; color: var(--ink3); line-height: 1.5; }
.set-row.danger b, .set-row.danger .set-ic { color: var(--ng); }
.set-row.danger .set-ic { background: var(--ng-soft); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; margin: 0; border-radius: 999px; background: #e0e0da; box-shadow: inset 0 0 0 2px #77776f; position: relative; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; left: 8px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: #77776f; transition: transform .3s var(--spring), width .3s var(--spring), height .3s, left .3s, top .3s, background .2s; }
.switch:checked { background: var(--ink); box-shadow: none; }
.switch:checked::after { left: 24px; top: 4px; width: 24px; height: 24px; background: var(--y); }

/* アプリについて */
.about .ab-hero { display: flex; flex-direction: column; align-items: center; padding: 24px 16px 8px; text-align: center; }
.ab-hero img { border-radius: 24px; box-shadow: var(--sh-2); }
.ab-hero h1 { margin-top: 14px; font: 700 26px/1.3 var(--f-jp); }
.ab-hero p { color: var(--ink3); font-size: 15px; }
.disclaimer { margin: 18px 16px 0; padding: 14px 16px; border-radius: var(--r-m); background: var(--y-soft); box-shadow: inset 0 0 0 2px var(--ink); font: 700 14px/1.7 var(--f-jp); }
.disclaimer, .ab-lead, .dlg-b, .sh-lead { word-break: normal; }
.ab-lead { margin: 16px 20px 0; font: 400 15px/1.8 var(--f-jp); color: var(--ink2); }
.tech { list-style: none; margin: 0 16px; padding: 0; border-radius: var(--r-l); background: var(--paper); box-shadow: var(--sh-1); }
.tech li { display: flex; flex-direction: column; padding: 12px 16px; border-top: 1px solid #e6e6e0; }
.tech li:first-child { border-top: 0; }
.tech b { font: 700 16px/1.4 var(--f-ui); }
.tech span { font-size: 14px; color: var(--ink3); }
.about .cta { margin: 22px 16px 0; width: calc(100% - 32px); }
.ab-foot { margin: 12px 20px 0; font-size: 14px; color: var(--ink3); text-align: center; }

/* ---------- シート・ダイアログ・スナックバー ---------- */
.overlay { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.overlay.on { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s; }
.overlay.on .scrim { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 86%; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 16px calc(20px + var(--safe-b));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--paper);
  transform: translateY(105%);
  transition: transform .38s var(--spring);
}
.overlay.on .sheet { transform: none; }
.overlay.closing .sheet { transform: translateY(105%); transition-timing-function: var(--ease); }
.grab { width: 48px; height: 28px; margin: 0 auto; position: relative; cursor: grab; touch-action: none; }
.grab::after { content: ""; position: absolute; left: 6px; right: 6px; top: 10px; height: 5px; border-radius: 3px; background: #9a9a94; }
.sh-t { font: 700 20px/1.4 var(--f-jp); margin: 4px 4px 6px; }
.sh-t small { font-size: 14px; color: var(--ink3); font-weight: 400; margin-left: 4px; }
.sh-lead { font-size: 14px; color: var(--ink2); margin: 0 4px 14px; line-height: 1.7; }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-l); border: 2px solid #d6d6d0; background: var(--paper); text-align: left; color: var(--ink); }
.radio-row.on { border-color: var(--ink); background: var(--y-soft); }
.rr-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #ececE6; }
.rr-tx { flex: 1; display: flex; flex-direction: column; }
.rr-tx b { font: 700 16px/1.4 var(--f-jp); }
.rr-tx small { font-size: 14px; color: var(--ink2); line-height: 1.5; }
.rr-dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink); flex: none; }
.radio-row.on .rr-dot { box-shadow: inset 0 0 0 7px var(--ink); }
.dialog {
  position: absolute; left: 24px; right: 24px; top: 50%;
  padding: 24px 22px 14px; border-radius: var(--r-xl); background: var(--paper);
  transform: translateY(-50%) scale(.9); opacity: 0;
  transition: transform .3s var(--spring), opacity .2s;
}
.overlay.on .dialog { transform: translateY(-50%); opacity: 1; }
.overlay.closing .dialog { opacity: 0; }
.dlg-t { font: 700 20px/1.4 var(--f-jp); }
.dlg-b { margin-top: 10px; font-size: 15px; line-height: 1.7; color: var(--ink2); }
.dlg-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.dlg-act .btn { min-height: 48px; padding: 0 18px; font-size: 15px; }
.snack {
  position: absolute; left: 12px; right: 12px; bottom: calc(96px + var(--safe-b)); z-index: 30;
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 10px 8px 10px 16px; border-radius: 14px;
  background: #2b2e33; color: #fff; box-shadow: var(--sh-2);
  font: 700 15px/1.5 var(--f-jp);
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--spring), opacity .2s;
}
.no-nav .snack { bottom: calc(92px + var(--safe-b)); }
.snack.on { transform: none; opacity: 1; pointer-events: auto; }
.snack-t { flex: 1; user-select: none; }
.snack-a { flex: none; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--y); font: 700 15px/1 var(--f-jp); }

/* ---------- スプラッシュ・オンボーディング ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--y); transition: opacity .3s; }
.splash[hidden] { display: none; }
.splash img { border-radius: 28px; box-shadow: 0 0 0 3px var(--ink), 0 14px 30px rgba(0, 0, 0, .25); animation: pop .5s var(--spring); }
.splash-name { margin-top: 12px; font: 700 26px/1.2 var(--f-jp); color: var(--ink); }
.splash-sub { font: 700 14px/1.2 var(--f-jp); color: var(--ink2); }
.splash.bye { opacity: 0; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.onb { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: #0d0f11; color: #fff; overflow: hidden; transition: opacity .28s; }
@media (min-width: 600px) { .onb { left: 50%; right: auto; width: 430px; margin-left: -215px; } }
.onb.bye { opacity: 0; }
.onb-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.onb::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(13, 15, 17, 0) 25%, rgba(13, 15, 17, .82) 52%, #0d0f11 70%); }
.onb-skip { position: absolute; z-index: 3; right: 12px; top: calc(12px + var(--safe-t)); min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(13, 15, 17, .78); color: #fff; font: 700 15px/1 var(--f-jp); }
.onb-track { position: relative; z-index: 2; flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.onb-track::-webkit-scrollbar { display: none; }
.onb-s { flex: none; width: 100%; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 28px 24px; }
.onb-no { font: 700 44px/1 var(--f-num); color: var(--y); }
.onb-no small { font-size: 20px; color: #cfcfc9; }
.onb-s h2 { margin-top: 10px; font: 700 30px/1.35 var(--f-jp); }
.onb-s p { margin-top: 12px; font: 400 16px/1.8 var(--f-jp); color: #e8e8e2; }
.onb-foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px calc(24px + var(--safe-b)); }
.onb-dots { display: flex; gap: 8px; }
.onb-dots i { width: 10px; height: 10px; border-radius: 5px; background: #6b6b66; transition: width .3s var(--spring), background .2s; }
.onb-dots i.on { width: 30px; background: var(--y); }
.onb-next .ic { width: 20px; height: 20px; }

.fatal, .nojs { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; background: var(--y); color: var(--ink); text-align: center; font: 400 15px/1.7 var(--f-jp); }
.fatal[hidden] { display: none; }
.fatal-t { font-weight: 700; font-size: 20px; }
.fatal a { text-decoration: underline; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}
