/* タナオロシPro — 物流倉庫・実用一点張り（濃紺×オレンジ / Material 3 Expressive） */
:root {
  --navy-950: #07111f;
  --navy-900: #0b1830;
  --navy-800: #12264a;
  --navy-700: #1c3765;
  --navy-600: #2a4a80;
  --navy-100: #dfe6f2;
  --steel-50: #f4f6f9;
  --steel-100: #e9edf3;
  --steel-200: #d3dbe6;
  --steel-300: #b8c3d3;
  --ink: #0e1a2e;
  --ink-2: #46546b;
  --on-navy: #ffffff;
  --on-navy-2: #c3cee1;
  --orange: #ff7a1a;
  --orange-ink: #b0450a;
  --orange-100: #ffe6d4;
  --orange-50: #fff4ec;
  --short: #c42b1c;
  --short-bg: #fde8e6;
  --short-on-navy: #ffa196;
  --over: #1f56c8;
  --over-bg: #e5edff;
  --over-on-navy: #a9c4ff;
  --match: #17744a;
  --match-bg: #e1f3e8;

  --f-ja: 'IBM Plex Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --f-num: 'Archivo', 'IBM Plex Sans JP', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --r-label: 4px;
  --r-card: 20px;
  --r-sheet: 28px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(11, 24, 48, .08), 0 1px 1px rgba(11, 24, 48, .04);
  --sh-2: 0 6px 18px rgba(11, 24, 48, .16), 0 2px 4px rgba(11, 24, 48, .08);
  --spring: cubic-bezier(.2, .9, .25, 1.12);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: 260ms;
  --nav-h: calc(80px + env(safe-area-inset-bottom));
  --top: env(safe-area-inset-top);
  --bot: env(safe-area-inset-bottom);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-ja);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--navy-950);
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .tb-t, .btn, .card-t, .sec-t { font-feature-settings: "palt"; word-break: keep-all; overflow-wrap: anywhere; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.ic { width: 24px; height: 24px; flex: none; }
.ic-s { width: 18px; height: 18px; }
.nu { white-space: nowrap; font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); font-weight: 400; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- アプリの枠 ---------- */
.app {
  position: fixed; inset: 0;
  height: 100dvh; overflow: hidden;
  background: var(--steel-100);
}
.stage { position: absolute; inset: 0; overflow: hidden; }
.app:has(.navbar:not(.is-hidden)) .stage { bottom: var(--nav-h); }
.view {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--steel-100);
}
.scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.bottom-space { height: 112px; }
.fab-space { height: 96px; }

@media (min-width: 600px) {
  body {
    background:
      linear-gradient(90deg, rgba(255, 122, 26, .07) 1px, transparent 1px) 0 0 / 64px 64px,
      linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 64px 64px,
      var(--navy-950);
  }
  .app { left: 50%; right: auto; width: 430px; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 80px rgba(0, 0, 0, .5); }
}

/* ---------- トップアプリバー ---------- */
.tb {
  flex: none;
  background: var(--navy-800);
  color: var(--on-navy);
  padding-top: var(--top);
  position: relative; z-index: 3;
  transition: box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
}
.scrolled .tb { box-shadow: 0 2px 10px rgba(0, 0, 0, .25); background: var(--navy-900); }
.tb-row { height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 16px; }
.tb-row:has(.ib:first-child) { padding-left: 4px; }
.tb-logo { width: 32px; height: 32px; border-radius: 9px; margin-right: 6px; }
.tb-tt { flex: 1; min-width: 0; }
.tb-t { font-size: 20px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-s { font-size: 13px; color: var(--on-navy-2); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-user {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 10px; margin: 4px 0;
  border-radius: var(--r-pill); background: var(--navy-700); font-size: 14px; font-weight: 700;
}
.tb-user .ic { width: 20px; height: 20px; color: var(--orange); }
.ib {
  width: 48px; height: 48px; flex: none;
  display: inline-grid; place-items: center; border-radius: 50%;
  transition: background-color .15s, transform .15s var(--spring);
}
.ib:active { background: rgba(255, 255, 255, .14); transform: scale(.92); }
.ib-sm { width: 44px; height: 44px; color: var(--ink-2); }
.ib-sm:active { background: var(--steel-100); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 700; line-height: 1.3; text-align: center;
  transition: transform .18s var(--spring), background-color .15s, box-shadow .15s;
  user-select: none;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: 1; background: var(--steel-200); color: var(--ink-2); cursor: default; }
.btn-fill { background: var(--orange); color: var(--navy-950); box-shadow: 0 2px 0 #c9560a; }
.btn-fill:active { box-shadow: none; }
.btn-outline { border: 1.5px solid var(--navy-700); color: var(--navy-800); background: #fff; }
.btn-tonal { background: var(--navy-100); color: var(--navy-800); }
.btn-wide { width: 100%; }
.btn-tall { min-height: 56px; font-size: 17px; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-text { min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); font-size: 15px; font-weight: 700; color: var(--navy-700); }
.btn-text:active { background: var(--navy-100); }
.btn-text.is-strong { color: var(--orange-ink); }
.btn-text.is-danger { color: var(--short); }

/* ---------- ナビゲーションバー（M3） ---------- */
.navbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
  height: var(--nav-h); padding: 12px 8px var(--bot);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--steel-200);
  transition: transform var(--t) var(--ease);
}
.navbar.is-hidden { transform: translateY(110%); visibility: hidden; }
.nav-it { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 56px; color: var(--ink-2); }
.nav-pill {
  position: relative; width: 64px; height: 32px; border-radius: 16px;
  display: grid; place-items: center;
  transition: background-color .2s, width .3s var(--spring);
}
.nav-it.on .nav-pill { background: var(--orange-100); color: var(--navy-900); }
.nav-it:active .nav-pill { transform: scale(.94); }
.nav-lb { font-size: 13px; font-weight: 500; line-height: 1.2; }
.nav-it.on .nav-lb { color: var(--navy-900); font-weight: 700; }
.nav-badge {
  position: absolute; top: -3px; left: 38px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--short); color: #fff;
  font: 700 12px/18px var(--f-num); text-align: center;
}

/* ---------- FAB ---------- */
.fab {
  position: absolute; right: 16px; bottom: 16px; z-index: 5;
  display: inline-flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 22px 0 18px; border-radius: 18px;
  background: var(--orange); color: var(--navy-950);
  font-size: 17px; font-weight: 700;
  box-shadow: 0 8px 22px rgba(255, 122, 26, .38), 0 2px 6px rgba(11, 24, 48, .25);
  transition: transform .2s var(--spring), border-radius .3s var(--spring);
}
.fab:active { transform: scale(.95); border-radius: 26px; }
.fab .ic { width: 26px; height: 26px; }

/* ---------- 棚一覧：ヒーロー ---------- */
.hero {
  background: var(--navy-800); color: var(--on-navy);
  padding: 4px 20px 22px; border-radius: 0 0 32px 32px;
}
.hero-eye { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--on-navy-2); }
.hero-eye .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.hero-prog { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 6px; }
.hero-big { display: flex; align-items: baseline; font-family: var(--f-num); font-stretch: 72%; line-height: .9; }
.hero-big b { font-size: 92px; font-weight: 800; color: var(--orange); letter-spacing: -.02em; }
.hero-big span { font-size: 34px; font-weight: 700; margin-left: 4px; }
.hero-big small { font-family: var(--f-ja); font-size: 18px; font-weight: 700; margin-left: 4px; }
.hero-pct { font-family: var(--f-num); font-stretch: 80%; font-size: 44px; font-weight: 700; line-height: 1; padding-bottom: 6px; }
.hero-pct small { font-size: 22px; margin-left: 2px; }
.wavy { display: block; width: 100%; height: 14px; margin: 14px 0 18px; overflow: visible; }
.wv-fill { fill: none; stroke: var(--orange); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wv-track { fill: none; stroke: var(--navy-600); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wv-stop { fill: var(--orange); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.hero-stats div { padding: 0 12px; border-left: 1px solid var(--navy-600); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { font-size: 13px; color: var(--on-navy-2); }
.hero-stats dd { margin: 0; font-family: var(--f-num); font-stretch: 85%; font-size: 26px; font-weight: 700; line-height: 1.2; }
.hero-stats dd small { font-family: var(--f-ja); font-size: 14px; margin-left: 2px; color: var(--on-navy-2); font-weight: 500; }
.hero-stats dd.is-warn { color: var(--short-on-navy); }
.hero-lock { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--navy-700); font-size: 14px; font-weight: 700; }

/* ---------- カード ---------- */
.card { background: #fff; border-radius: var(--r-card); margin: 16px; padding: 16px; box-shadow: var(--sh-1); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.card-t { font-size: 17px; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend i { width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--navy-700); }
.legend .lg-done { background: var(--orange); border-color: var(--orange); }
.legend .lg-doing { background: repeating-linear-gradient(-45deg, var(--orange) 0 3px, #fff 3px 6px); border-color: var(--orange); }
.legend .lg-dot { border: 0; border-radius: 50%; background: var(--short); width: 9px; height: 9px; }

/* ---------- フロアマップ ---------- */
.fm { background: var(--steel-50); border-radius: 14px; padding: 12px 10px; }
.fm-row { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: stretch; }
.fm-a {
  display: grid; place-items: center; min-height: 48px; border-radius: 8px;
  background: var(--navy-800); color: var(--orange); font: 800 18px/1 var(--f-num);
}
.fm-rack { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.fm-lane { height: 18px; margin-left: 38px; background: linear-gradient(90deg, var(--steel-300) 50%, transparent 0) 0 50% / 14px 2px repeat-x; }
.tile {
  position: relative; min-height: 48px; border-radius: 6px;
  display: grid; place-items: center;
  border: 2px solid var(--navy-700); background: #fff; color: var(--navy-800);
  transition: transform .18s var(--spring);
}
.tile:active { transform: scale(.9); }
.tile-n { font: 700 15px/1 var(--f-num); font-stretch: 85%; padding: 3px 4px; border-radius: 4px; }
.t-done { background: var(--orange); border-color: var(--orange); color: var(--navy-950); }
.t-doing { border-color: var(--orange); background: repeating-linear-gradient(-45deg, #ffb37d 0 4px, #fff 4px 9px); }
.t-doing .tile-n { background: #fff; }
.tile-dot { position: absolute; top: -5px; right: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--short); border: 2px solid #fff; }
.tile.is-next { box-shadow: 0 0 0 3px var(--steel-50), 0 0 0 5px var(--navy-800); }
.tile-pin { position: absolute; top: -18px; left: 50%; width: 20px; height: 20px; margin-left: -10px; color: var(--navy-800); animation: pinBob 1.8s var(--ease) infinite; }
@keyframes pinBob { 50% { transform: translateY(-3px); } }
.fm-note { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.fm-note b { font-family: var(--f-mono); color: var(--ink); font-size: 16px; }
.fm-note .ic { color: var(--navy-800); }

/* ---------- 通路 ---------- */
.aisle { background: #fff; margin: 16px; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh-1); }
.aisle-ph { height: 104px; overflow: hidden; background: var(--navy-700); }
.aisle-ph img { width: 100%; height: 100%; object-fit: cover; }
.aisle-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--steel-100); }
.aisle-id {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: var(--orange); color: var(--navy-950); font: 800 24px/1 var(--f-num);
}
.aisle-id.sm { width: 28px; height: 28px; border-radius: 7px; font-size: 16px; }
.aisle-t { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.aisle-t span { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.aisle-c { font-size: 22px; font-weight: 700; }
.aisle-c small { font-family: var(--f-ja); font-size: 14px; color: var(--ink-2); font-weight: 500; }

.rrow { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 10px 16px; border-top: 1px solid var(--steel-100); transition: background-color .15s; }
.rlist li:first-child .rrow { border-top: 0; }
.rrow:active { background: var(--steel-50); }
.loc-lbl {
  flex: none; width: 74px; padding: 4px 0 4px 10px; position: relative;
  background: #fff; border: 1.5px solid var(--navy-800); border-radius: var(--r-label);
  display: flex; flex-direction: column; line-height: 1.15;
}
.loc-lbl::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--orange); }
.loc-lbl b { font: 600 18px/1.2 var(--f-mono); letter-spacing: -.02em; }
.loc-lbl small { font-size: 13px; color: var(--ink-2); }
.rrow-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rrow-t { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pips { display: flex; gap: 4px; }
.pips i { width: 14px; height: 6px; border-radius: 3px; background: var(--steel-200); }
.pips i.on { background: var(--orange); }
.pips i.zero { background: var(--short); }
.rrow-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.st { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.st-done { background: var(--navy-800); color: #fff; }
.st-doing { background: var(--orange-100); color: var(--orange-ink); font-family: var(--f-num); font-size: 15px; }
.st-todo { background: var(--steel-100); color: var(--ink-2); }
.chip-diff { font-size: 13px; font-weight: 700; color: var(--short); white-space: nowrap; }

/* ---------- 棚詳細 ---------- */
.plate-wrap { background: var(--navy-800); padding: 6px 16px 22px; border-radius: 0 0 32px 32px; color: #fff; }
.plate {
  display: flex; align-items: center; gap: 12px; background: #fff; color: var(--ink);
  border-radius: 6px; padding: 12px 14px 12px 22px; position: relative; overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
.plate::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--orange); }
.plate-l { flex: 1; min-width: 0; }
.plate-loc { font: 600 54px/1 var(--f-mono); letter-spacing: -.04em; }
.plate-sub { font-size: 14px; color: var(--ink-2); margin-top: 6px; white-space: nowrap; }
.plate-sub span { margin: 0 4px; }
.plate-bc { width: 112px; flex: none; text-align: center; }
.plate-bc .ean { width: 100%; height: 46px; color: #000; display: block; }
.plate-bc p { font: 500 13px/1.4 var(--f-mono); color: var(--ink); letter-spacing: -.02em; }
.rack-sum { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.ring { position: relative; width: 72px; height: 72px; flex: none; display: flex; align-items: baseline; justify-content: center; padding-top: 22px; font-family: var(--f-num); }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--orange) calc(var(--p) * 360deg), var(--navy-600) 0); -webkit-mask: radial-gradient(circle, transparent 27px, #000 28px); mask: radial-gradient(circle, transparent 27px, #000 28px); }
.ring b { font-size: 26px; font-weight: 800; line-height: 1; }
.ring span { font-size: 15px; font-weight: 600; color: var(--on-navy-2); }

.rack-sum-t { font-size: 15px; color: var(--on-navy-2); line-height: 1.6; }
.rack-sum-t b { color: #fff; font-size: 17px; }
.rack-diff { display: flex; align-items: center; gap: 4px; color: var(--short-on-navy); font-weight: 700; margin-top: 2px; }
.sec-t { font-size: 16px; font-weight: 700; margin: 22px 20px 10px; }
.ilist { background: #fff; margin: 0 16px; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh-1); }
.irow { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--steel-100); min-height: 76px; }
.ilist li:first-child .irow { border-top: 0; }
.irow:active { background: var(--steel-50); }
.irow.is-extra { background: var(--orange-50); }
.irow-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.irow-t { font-size: 15px; font-weight: 700; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.irow-c { font: 500 13px/1.4 var(--f-mono); color: var(--ink-2); }
.irow-q { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.irow-q b { font-size: 24px; font-weight: 700; line-height: 1.1; }
.irow-q b small { font-family: var(--f-ja); font-size: 13px; margin-left: 2px; font-weight: 500; }
.irow-b { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.dchip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font: 700 14px/1 var(--f-num); white-space: nowrap; }
.dchip.is-short { background: var(--short-bg); color: #a3231a; }
.dchip.is-over { background: var(--over-bg); color: #1a49ad; font-family: var(--f-ja); font-size: 13px; }
.dchip.is-ok { background: var(--match-bg); color: var(--match); font-family: var(--f-ja); font-size: 13px; }
.dchip.is-over:not(:empty) { font-family: var(--f-num); }
.note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--navy-100); font-size: 14px; color: var(--navy-800); }
.note.is-warn { background: var(--orange-100); color: #7a2f05; }
.note .ic { margin-top: 2px; }

.actbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--bot));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--steel-200);
}
.actbar .btn { flex: 1; padding: 0 12px; white-space: nowrap; }
.actbar-lock { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; font-weight: 700; color: var(--ink-2); }

/* ---------- 品目 ---------- */
.label-card { background: #fff; margin: 16px; padding: 18px 18px 16px; border-radius: 8px; box-shadow: var(--sh-2); border-top: 8px solid var(--navy-800); }
.label-maker { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.label-name { font-size: 22px; font-weight: 700; line-height: 1.4; margin-top: 2px; }
.label-bc { margin: 14px auto 6px; max-width: 300px; }
.label-bc .ean { width: 100%; height: 86px; color: #000; display: block; }
.label-code { text-align: center; font: 600 18px/1.4 var(--f-mono); letter-spacing: .14em; }
.label-spec { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--steel-300); }
.label-spec div { padding: 0 8px; border-left: 1px solid var(--steel-200); }
.label-spec div:first-child { border-left: 0; padding-left: 0; }
.label-spec dt { font-size: 13px; color: var(--ink-2); }
.label-spec dd { margin: 0; font-size: 18px; font-weight: 700; }
.label-spec dd small { font-family: var(--f-ja); font-size: 13px; color: var(--ink-2); font-weight: 500; margin-left: 2px; }
.label-spec a { font-family: var(--f-mono); color: var(--over); text-decoration: underline; text-underline-offset: 3px; display: inline-block; min-height: 32px; }
.cmp { display: grid; grid-template-columns: 1fr 26px 1fr 1.25fr; align-items: center; gap: 4px; margin: 0 16px; padding: 14px; background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-1); }
.cmp-c { text-align: center; }
.cmp-k { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.cmp-v { font: 700 30px/1.15 var(--f-num); font-stretch: 85%; }
.cmp-hide { font-family: var(--f-ja); font-size: 16px; color: var(--ink-2); }
.cmp-op { color: var(--steel-300); display: grid; place-items: center; }
.cmp-d { border-radius: 14px; padding: 8px 4px; background: var(--steel-50); }
.cmp-d.is-short { background: var(--short-bg); color: #a3231a; }
.cmp-d.is-over { background: var(--over-bg); color: #1a49ad; }
.cmp-d.is-ok { background: var(--match-bg); color: var(--match); }
.cmp-d .cmp-k { color: inherit; }
.cmp-y { font: 600 13px/1.3 var(--f-num); white-space: nowrap; }
.hist { margin: 0 16px; background: #fff; border-radius: var(--r-card); padding: 6px 16px; box-shadow: var(--sh-1); }
.hist li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--steel-100); font-size: 15px; }
.hist li:first-child { border-top: 0; }
.hist-t { font: 600 15px/1.4 var(--f-num); color: var(--ink-2); }
.hist-w { font-size: 13px; color: var(--ink-2); }
.empty-s { font-size: 15px; color: var(--ink-2); margin: 0 20px; }

/* ---------- 差異リスト ---------- */
.dsum { background: var(--navy-800); color: #fff; padding: 6px 16px 20px; border-radius: 0 0 32px 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dsum-c { background: var(--navy-700); border-radius: 18px; padding: 12px 14px; }
.dsum-k { font-size: 14px; color: var(--on-navy-2); font-weight: 700; }
.dsum-k .nu { font-family: var(--f-ja); font-weight: 500; margin-left: 4px; }
.dsum-v { font: 800 28px/1.2 var(--f-num); font-stretch: 80%; white-space: nowrap; }
.dsum-c.is-short .dsum-v { color: var(--short-on-navy); }
.dsum-c.is-over .dsum-v { color: var(--over-on-navy); }
.dsum-net { grid-column: 1 / -1; font-size: 14px; color: var(--on-navy-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
.dsum-net b { font: 700 18px/1.3 var(--f-num); color: #fff; margin-right: 6px; white-space: nowrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 14px;
  border-radius: 12px; border: 1.5px solid var(--steel-300); background: #fff; font-size: 14px; font-weight: 700; color: var(--ink-2);
  transition: background-color .15s, transform .15s var(--spring);
}
.fchip:active { transform: scale(.95); }
.fchip.on { background: var(--orange-100); border-color: var(--orange-100); color: var(--navy-900); padding-left: 10px; }
.sortbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; font-size: 14px; color: var(--ink-2); }
.seg { display: inline-flex; border: 1.5px solid var(--steel-300); border-radius: var(--r-pill); overflow: hidden; background: #fff; }
.seg button { min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 700; color: var(--ink-2); border-left: 1.5px solid var(--steel-300); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--navy-800); color: #fff; }
.seg-wide { display: flex; margin: 14px 0 0; }
.seg-wide button { flex: 1; min-height: 44px; }
.dlist { margin: 4px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.drow { display: block; background: #fff; border-radius: 16px; padding: 12px 14px 12px; box-shadow: var(--sh-1); transition: transform .15s var(--spring); }
.drow:active { transform: scale(.985); }
.drow-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.loc-mini { flex: none; display: inline-block; padding: 1px 7px; border-radius: 4px; background: var(--navy-800); color: #fff; font: 600 13px/1.5 var(--f-mono); }
.drow-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 6px; }
.drow-q { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.drow-q .arr { color: var(--ink-2); }
.drow-tag { display: block; color: #7a2f05; font-weight: 700; font-size: 13px; }
.drow-v { text-align: right; flex: none; line-height: 1.1; }
.drow-v b { display: block; font: 800 26px/1 var(--f-num); font-stretch: 85%; }
.drow-v small { font: 600 13px/1.4 var(--f-num); }
.drow-v.is-short { color: var(--short); }
.drow-v.is-over { color: var(--over); }
.dbar { position: relative; display: block; height: 8px; margin-top: 10px; border-radius: 4px; background: var(--steel-100); }
.dbar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink-2); border-radius: 1px; }
.dbar-l, .dbar-r { position: absolute; top: 0; bottom: 0; width: calc(var(--w) / 2); }
.dbar-l { right: 50%; background: var(--short); border-radius: 4px 0 0 4px; }
.dbar-r { left: 50%; background: var(--over); border-radius: 0 4px 4px 0; }
.empty { text-align: center; padding: 28px 24px; }
.empty img { width: 200px; height: 200px; object-fit: cover; border-radius: 32px; margin: 0 auto 18px; box-shadow: var(--sh-2); }
.empty-t { font-size: 18px; font-weight: 700; }
.empty .empty-s { margin: 6px 0 18px; }

/* ---------- レポート ---------- */
.gauge-card { position: relative; background: #fff; margin: 16px; padding: 18px 16px 18px; border-radius: var(--r-card); text-align: center; box-shadow: var(--sh-1); }
.gauge { width: 236px; height: 132px; display: block; margin: 0 auto; }
.g-track, .g-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.g-track { stroke: var(--steel-100); }
.g-fill { stroke: var(--orange); }
.g-tick { stroke: none; }
.gauge-v { margin-top: -62px; }
.gauge-n { font: 800 54px/1 var(--f-num); font-stretch: 78%; color: var(--navy-900); }
.gauge-n small { font-size: 24px; margin-left: 2px; }
.gauge-k { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 2px; }
.gauge-s { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.gauge-s .nu { font-family: var(--f-ja); color: var(--ink); font-weight: 700; margin: 0 2px; }
.final-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--navy-800); color: #fff; font-size: 13px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px; }
.kpi { background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--sh-1); }
.kpi-k { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.kpi-v { font: 800 26px/1.25 var(--f-num); font-stretch: 82%; white-space: nowrap; }
.kpi-v small { font-size: 16px; color: var(--ink-2); }
.kpi-v.is-short { color: var(--short); }
.kpi-v.is-over { color: var(--over); }
.kbar { display: block; height: 6px; border-radius: 3px; background: var(--steel-100); margin-top: 8px; overflow: hidden; }
.kbar i { display: block; height: 100%; background: var(--orange); border-radius: 3px; }
.atable { width: 100%; border-collapse: collapse; font-size: 14px; }
.atable th, .atable td { padding: 10px 0; border-top: 1px solid var(--steel-100); text-align: left; vertical-align: middle; }
.atable thead th { border-top: 0; font-size: 13px; color: var(--ink-2); padding-top: 0; }
.atable tbody th { font-weight: 700; white-space: nowrap; }
.at-h { display: flex; align-items: center; gap: 8px; }
.at-n { font-size: 14px; }
.atable td { padding-left: 8px; width: 34%; }
.atable td.r, .atable th.r { text-align: right; }
.abar { display: block; height: 8px; border-radius: 4px; background: var(--steel-100); overflow: hidden; }
.abar i { display: block; height: 100%; background: var(--navy-700); }
.at-p { display: block; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.atable b { font: 700 15px/1.3 var(--f-num); white-space: nowrap; }
.atable b.is-short { color: var(--short); }
.atable b.is-over { color: var(--over); }
.hbars { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 18px; }
.hb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.hb i { width: 100%; max-width: 26px; background: var(--navy-700); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.hb-v { font: 700 13px/1 var(--f-num); color: var(--ink); margin-bottom: 4px; }
.hb-k { font: 600 13px/1 var(--f-num); color: var(--ink-2); margin-top: 6px; }
.hb-note { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.rep-acts { display: flex; flex-direction: column; gap: 10px; margin: 18px 16px 0; }
.fine { font-size: 13px; color: var(--ink-2); margin: 12px 20px 0; line-height: 1.7; }

/* ---------- 設定 ---------- */
.sgrp { margin: 20px 16px 0; }
.sgrp-t { font-size: 14px; font-weight: 700; color: var(--orange-ink); margin: 0 4px 8px; }
.slist { background: #fff; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh-1); }
.slist li + li { border-top: 1px solid var(--steel-100); }
.srow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 12px 16px; text-align: left; cursor: pointer; }
div.srow { cursor: default; }
.srow:active { background: var(--steel-50); }
.srow > .ic { color: var(--navy-700); }
.srow-m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.srow-t { font-size: 16px; font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
.srow-s { font-size: 13px; color: var(--ink-2); line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.srow.is-danger .srow-t, .srow.is-danger > .ic { color: var(--short); }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0;
  width: 52px; height: 32px; border-radius: 16px; background: var(--steel-200); border: 2px solid var(--ink-2); cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.switch::after { content: ""; position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); transition: all .25s var(--spring); }
.switch:checked { background: var(--orange); border-color: var(--orange); }
.switch:checked::after { left: 22px; top: 2px; width: 24px; height: 24px; background: var(--navy-900); }
.field { background: #fff; border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--sh-1); }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input { display: block; width: 100%; height: 52px; margin-top: 4px; padding: 0 14px; border: 1.5px solid var(--steel-300); border-radius: 12px; font: 500 17px var(--f-ja); color: var(--ink); background: var(--steel-50); }
.field input:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px var(--orange-100); }
.field-h { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* ---------- アプリについて ---------- */
.about-h { text-align: center; padding: 28px 16px 8px; }
.about-h img { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 12px; box-shadow: var(--sh-2); }
.about-n { font-size: 24px; font-weight: 700; }
.about-n span { font-family: var(--f-num); color: var(--orange-ink); margin-left: 2px; }
.about-v { font-size: 14px; color: var(--ink-2); }
.about-p { margin: 12px 20px 0; font-size: 15px; line-height: 1.8; }
.about-note { margin: 16px; padding: 14px 16px; border-radius: 14px; background: #fff; border-left: 6px solid var(--orange); font-size: 14px; line-height: 1.75; }
.tech { margin: 0 16px; background: #fff; border-radius: var(--r-card); overflow: hidden; }
.tech li { padding: 12px 16px; border-top: 1px solid var(--steel-100); display: flex; flex-direction: column; }
.tech li:first-child { border-top: 0; }
.tech b { font-family: var(--f-mono); font-size: 15px; }
.tech span { font-size: 14px; color: var(--ink-2); }
.v-about .btn-wide { margin: 20px 16px 0; width: calc(100% - 32px); }

/* ---------- スキャン ---------- */
.v-scan { background: var(--navy-950); }
.vf { position: relative; flex: none; height: 52dvh; min-height: 330px; overflow: hidden; background-color: var(--navy-950); }
.vf-bg, .vf-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf-bg { filter: saturate(.9) brightness(.82); transform: scale(1.04); }
.cam-on .vf-bg { visibility: hidden; }
.vf-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: calc(8px + var(--top)) 8px 0; }
.ib-glass { background: rgba(7, 17, 31, .62); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.loc-pick {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px 0 8px; border-radius: var(--r-pill);
  background: rgba(7, 17, 31, .72); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.loc-pick-k { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: var(--navy-950); font-size: 14px; font-weight: 700; }
.loc-pick b { font: 600 21px/1 var(--f-mono); }
.loc-pick:active { transform: scale(.96); }
.reticle {
  position: absolute; left: 50%; top: 45%; z-index: 2; width: 78%; height: 32%; max-height: 190px;
  transform: translate(-50%, -50%); border-radius: 14px;
  box-shadow: 0 0 0 200vmax rgba(5, 12, 26, .52);
  transition: box-shadow .2s;
}
.rc { position: absolute; width: 30px; height: 30px; border: 4px solid var(--orange); transition: border-color .15s, transform .25s var(--spring); }
.rc.tl { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.rc.tr { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.rc.bl { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.rc.br { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.laser { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; border-radius: 1px; background: #ff9a4d; box-shadow: 0 0 8px 2px rgba(255, 122, 26, .75); animation: laser 2.2s ease-in-out infinite; }
@keyframes laser { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(34px); } }
.reading .laser { animation-duration: .5s; }
.reading .rc { transform: scale(.94); }
.hit .rc { border-color: #fff; }
.hit .reticle { box-shadow: 0 0 0 200vmax rgba(5, 12, 26, .52), inset 0 0 0 3px rgba(255, 255, 255, .9); }
.vf-code { position: absolute; inset: 14% 10%; display: grid; place-items: center; }
.vf-lbl { background: #fff; color: #000; border-radius: 6px; padding: 8px 12px 4px; width: 88%; text-align: center; animation: lblIn .35s var(--spring); }
.vf-lbl .ean { width: 100%; height: 48px; display: block; }
.vf-lbl span { font: 500 13px/1.4 var(--f-mono); letter-spacing: .08em; }
@keyframes lblIn { from { transform: scale(.7) rotate(-4deg); opacity: 0; } }
.vf-hint {
  position: absolute; left: 50%; bottom: 88px; z-index: 3; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(7, 17, 31, .82); color: #fff; font-size: 14px; font-weight: 500; text-align: center; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; width: max-content;
}
.vf-tools { position: absolute; left: 0; right: 0; bottom: 30px; z-index: 3; display: flex; justify-content: center; gap: 10px; padding: 0 16px; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  background: rgba(7, 17, 31, .78); border: 1.5px solid rgba(255, 255, 255, .5); color: #fff; font-size: 14px; font-weight: 700;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .15s var(--spring);
}
.tool .ic { width: 20px; height: 20px; color: var(--orange); }
.tool:active { transform: scale(.95); }
.cam-on [data-act="cam"] { background: var(--orange); color: var(--navy-950); border-color: var(--orange); }
.cam-on [data-act="cam"] .ic { color: var(--navy-950); }
.panel {
  position: relative; z-index: 4; flex: 1; min-height: 0; margin-top: -22px;
  background: var(--steel-50); border-radius: 24px 24px 0 0;
  overflow-y: auto; overscroll-behavior: contain; padding: 16px 0 calc(24px + var(--bot));
}
.panel-h { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.panel-k { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.panel-n { font: 600 18px/1.1 var(--f-num); color: var(--ink-2); white-space: nowrap; }
.panel-n b { font-size: 30px; font-weight: 800; color: var(--ink); }
.pbar { flex: 1; height: 6px; border-radius: 3px; background: var(--steel-200); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--orange); border-radius: 3px; transition: width .4s var(--spring); }
.panel-all { display: flex; gap: 8px; align-items: flex-start; margin: 12px 16px 0; padding: 10px 14px; border-radius: 14px; background: var(--match-bg); color: #0f5636; font-size: 14px; font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
.panel-all .ic { margin-top: 2px; }
.panel-sub { display: flex; align-items: baseline; gap: 8px; padding: 0 16px; margin: 16px 0 8px; font-size: 14px; font-weight: 700; }
.panel-sub span { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.labels { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.labels::-webkit-scrollbar { display: none; }
.lbl {
  position: relative; flex: none; width: 148px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 8px; text-align: left;
  background: #fff; border: 1.5px solid var(--steel-200); border-radius: 8px; box-shadow: var(--sh-1);
  transition: transform .18s var(--spring), box-shadow .15s;
}
.lbl:active { transform: scale(.94) rotate(-1deg); }
.lbl-n { font-size: 14px; font-weight: 700; line-height: 1.35; min-height: 38px; padding-right: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lbl-bc { width: 100%; height: 38px; color: #000; display: block; }
.lbl-c { font: 500 13px/1.3 var(--f-mono); letter-spacing: -.03em; color: var(--ink); }
.lbl.is-extra { border-style: dashed; border-color: var(--orange-ink); background: var(--orange-50); }
.lbl.is-extra .lbl-n { color: #7a2f05; }
.lbl-ok { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; gap: 1px; height: 22px; padding: 0 6px 0 3px; border-radius: 11px; background: var(--navy-800); color: #fff; font: 700 13px/1 var(--f-num); }
.lbl-ok .ic { width: 14px; height: 14px; color: var(--orange); }
.plist { margin: 8px 16px 0; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--sh-1); }
.plist li { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 6px 6px 14px; border-top: 1px solid var(--steel-100); }
.plist li:first-child { border-top: 0; }
.pchk { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--steel-300); display: grid; place-items: center; }
.is-done .pchk { background: var(--orange); border-color: var(--orange); color: var(--navy-950); }
.pl-n { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-q b { font-size: 20px; font-weight: 700; }
.pl-q b small { font-family: var(--f-ja); font-size: 13px; font-weight: 500; margin-left: 2px; }
.pl-todo { display: inline-block; padding: 2px 10px; margin-right: 8px; border-radius: 6px; background: var(--steel-100); color: var(--ink-2); font-size: 13px; font-weight: 700; }

/* ---------- シート ---------- */
.scrim { position: absolute; inset: 0; z-index: 20; background: rgba(7, 17, 31, .5); opacity: 0; transition: opacity .25s; }
.scrim.on { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 0 20px calc(18px + var(--bot));
  transform: translateY(105%); transition: transform .34s var(--spring);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
}
.sheet.on { transform: translateY(0); }
.sheet-grip { display: grid; place-items: center; height: 28px; margin: 0 -20px; cursor: grab; touch-action: none; }
.sheet-grip span { width: 36px; height: 4px; border-radius: 2px; background: var(--steel-300); }
.qty-h { padding-bottom: 4px; }
.qty-loc { display: flex; gap: 6px; align-items: center; }
.tag-warn { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--orange-100); color: #7a2f05; font-size: 13px; font-weight: 700; }
.qty-t { font-size: 19px; font-weight: 700; line-height: 1.4; margin-top: 6px; }
.qty-c { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font: 500 14px/1.4 var(--f-mono); color: var(--ink-2); }
.qty-per { font-family: var(--f-ja); font-weight: 700; color: var(--navy-800); background: var(--navy-100); border-radius: 6px; padding: 1px 8px; font-size: 13px; }
.qty-per .nu { font-family: var(--f-num); }
.qty-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.qf { border: 2px solid var(--steel-200); border-radius: 18px; padding: 8px 8px 6px; text-align: center; transition: border-color .15s, background-color .15s; }
.qf.is-focus { border-color: var(--orange); background: var(--orange-50); }
.qf-one { grid-column: 1 / -1; }
.qf-k { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.qf-row { display: flex; align-items: center; gap: 2px; }
.qf-b { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--steel-100); color: var(--navy-800); transition: transform .15s var(--spring); }
.qf-b:active { transform: scale(.88); background: var(--steel-200); }
.qf-v { flex: 1; min-width: 0; min-height: 52px; }
.qf-v b { font: 800 36px/1 var(--f-num); font-stretch: 85%; }
.qf-x { display: block; font: 600 13px/1.4 var(--f-num); color: var(--ink-2); }
.qty-sum { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; border-radius: 16px; background: var(--navy-800); color: #fff; }
.qty-total { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.qty-total-k { font-size: 14px; color: var(--on-navy-2); font-weight: 700; }
.qty-total b { font: 800 40px/1 var(--f-num); font-stretch: 80%; color: var(--orange); }
.qty-total small { font-size: 15px; font-weight: 700; }
.qty-cmp { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; color: var(--on-navy-2); }
.qty-cmp span { white-space: nowrap; }
.cmp-d { font-weight: 700; }
.qty-cmp .cmp-d { padding: 1px 8px; border-radius: 6px; font-family: var(--f-num); }
.qty-cmp .cmp-d.is-short { background: var(--short-on-navy); color: var(--navy-950); }
.qty-cmp .cmp-d.is-over { background: var(--over-on-navy); color: var(--navy-950); }
.qty-cmp .cmp-d.is-ok { background: #9fe0bb; color: var(--navy-950); font-family: var(--f-ja); }
.cmp-blind { font-size: 13px; }
.qty-warn { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--orange-100); color: #7a2f05; font-size: 14px; font-weight: 700; }
.qty-warn span { flex: 1; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.key { min-height: 52px; border-radius: 14px; background: var(--steel-100); font: 600 24px/1 var(--f-num); color: var(--ink); display: grid; place-items: center; transition: transform .12s var(--spring), background-color .1s; }
.key:active { transform: scale(.93); background: var(--steel-200); }
.key-fn { background: var(--steel-200); font-size: 18px; }
@media (max-height: 700px) { .key { min-height: 46px; } .qf-v { min-height: 46px; } .qf-v b { font-size: 30px; } }

.man-t { font-size: 20px; font-weight: 700; }
.man-s { font-size: 14px; color: var(--ink-2); }
.man-disp { margin-top: 16px; display: flex; justify-content: center; }
.man-disp span { display: flex; gap: 3px; }
.man-disp i { width: 21px; height: 42px; border-bottom: 2.5px solid var(--steel-300); display: grid; place-items: center; font: 600 22px/1 var(--f-mono); font-style: normal; color: var(--ink); }
.man-disp i.f { border-color: var(--navy-800); }
.man-disp i.gap { margin-right: 6px; }
.man-msg { text-align: center; font-size: 14px; color: var(--ink-2); margin-top: 8px; min-height: 22px; font-weight: 700; }
.man-msg.is-ok { color: var(--match); }
.man-msg.is-err { color: var(--short); }

.pick-t { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.pick-a { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 15px; font-weight: 700; }
.pick-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick-b { min-height: 56px; border-radius: 12px; border: 2px solid var(--steel-200); display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; transition: transform .15s var(--spring); }
.pick-b:active { transform: scale(.94); }
.pick-b b { font: 600 17px/1.2 var(--f-mono); }
.pick-b span { font-size: 13px; color: var(--ink-2); }
.pick-b.t-done { background: var(--orange); border-color: var(--orange); }
.pick-b.t-done span { color: var(--navy-950); }
.pick-b.t-doing { border-color: var(--orange); }
.pick-b.is-cur { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--navy-800); }

/* ---------- ダイアログ ---------- */
.dlg-wrap { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(7, 17, 31, .55); opacity: 0; transition: opacity .2s; }
.dlg-wrap.on { opacity: 1; }
.dlg { width: 100%; max-width: 340px; background: #f7f9fc; border-radius: 28px; padding: 24px 22px 14px; transform: scale(.92); transition: transform .3s var(--spring); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.dlg-wrap.on .dlg { transform: scale(1); }
.dlg-ic { display: grid; place-items: center; color: var(--orange-ink); margin-bottom: 10px; }
.dlg-t { font-size: 21px; font-weight: 700; line-height: 1.4; }
.dlg-ic + .dlg-t { text-align: center; }
.dlg-b { margin-top: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.75; }
.dlg-b b { color: var(--ink); }
.dlg-code { font: 600 18px/1.4 var(--f-mono); color: var(--ink); text-align: center; margin-bottom: 6px; letter-spacing: .06em; }
.dlg-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; margin-top: 18px; }

/* ---------- スナックバー ---------- */
.snack {
  position: absolute; left: 12px; right: 12px; bottom: calc(96px + var(--bot)); z-index: 40;
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 6px 6px 16px;
  border-radius: 10px; background: var(--navy-950); color: #fff; font-size: 14px; line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: transform .3s var(--spring), opacity .2s;
}
.snack.on { transform: none; opacity: 1; pointer-events: auto; }
.snack-t { flex: 1; }
.snack-t b { font-family: var(--f-num); color: var(--orange); }
.snack-a { min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--orange); font-weight: 700; font-size: 15px; white-space: nowrap; }

/* ---------- スプラッシュ・オンボーディング ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--navy-800); color: #fff; transition: opacity .3s; }
.splash img { width: 120px; height: 120px; border-radius: 28px; margin-bottom: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); animation: spIn .5s var(--spring); }
.splash.out { opacity: 0; }
.splash-n { font-size: 28px; font-weight: 700; }
.splash-n span { font-family: var(--f-num); color: var(--orange); margin-left: 2px; }
.splash-s { font-size: 14px; color: var(--on-navy-2); }
@keyframes spIn { from { transform: scale(.7); opacity: 0; } }
.onb { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--navy-900); color: #fff; animation: fadeIn .3s; touch-action: pan-y; }
.onb.out { opacity: 0; transition: opacity .22s; }
.onb-ph { flex: 1; min-height: 0; overflow: hidden; border-radius: 0 0 36px 36px; }
.onb-ph img { width: 100%; height: 100%; object-fit: cover; animation: kb 6s ease-out both; }
@keyframes kb { from { transform: scale(1.1); } }
.onb-b { padding: 22px 24px calc(18px + var(--bot)); }
.onb-step { font: 700 14px/1 var(--f-num); color: var(--orange); }
.onb-t { font-size: 25px; font-weight: 700; line-height: 1.4; margin-top: 10px; }
.onb-s { font-size: 15px; color: var(--on-navy-2); line-height: 1.8; margin-top: 8px; }
.onb-dots { display: flex; gap: 6px; margin-top: 18px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--navy-600); transition: width .3s var(--spring); }
.onb-dots i.on { width: 26px; background: var(--orange); }
.onb-acts { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.onb-skip { color: var(--on-navy-2); }

/* ---------- 画面遷移（M3 shared axis / fade through） ---------- */
.in-push { animation: pushIn .32s var(--ease) both; z-index: 2; }
.out-push { animation: pushOut .28s var(--ease) both; }
.in-pop { animation: popIn .32s var(--ease) both; }
.out-pop { animation: popOut .26s var(--ease) both; z-index: 2; }
.in-fade { animation: fadeThrough .3s var(--ease) both; }
.out-fade { animation: fadeOut .12s linear both; }
.in-up { animation: upIn .38s var(--spring) both; z-index: 2; }
.out-up { animation: fadeOut .3s linear both; }
.in-down { animation: fadeIn .2s linear both; }
.out-down { animation: downOut .3s var(--ease) both; z-index: 2; }
@keyframes pushIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes pushOut { to { transform: translateX(-30px); opacity: 0; } }
@keyframes popIn { from { transform: translateX(-30px); opacity: 0; } }
@keyframes popOut { to { transform: translateX(40px); opacity: 0; } }
@keyframes fadeThrough { from { transform: scale(.97); opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes upIn { from { transform: translateY(60px); opacity: 0; } }
@keyframes downOut { to { transform: translateY(80px); opacity: 0; } }

.nojs, .fatal { position: fixed; inset: auto 16px 16px; z-index: 200; padding: 16px; border-radius: 16px; background: #fff; color: var(--ink); font-size: 15px; box-shadow: var(--sh-2); }
.fatal-t { font-weight: 700; font-size: 17px; }
.fatal a { display: inline-block; margin-top: 8px; color: var(--over); text-decoration: underline; min-height: 44px; line-height: 44px; }

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