/* KGK-ONE デザインシステム
   世界観: かつらぎ瓦斯器具のロゴ（墨の筆文字の山・KATSURAGI）。墨と藍を基調にした、静かで読みやすい画面。
   署名: 承認の「朱印」と、仕事の流れを山の稜線で示す進捗。それ以外は控えめにする。
   配色は :root の変数だけで差し替えられる。 */
:root {
  --sumi: #23282d;        /* 文字（墨） */
  --sumi-2: #4f5a64;      /* 補足の文字 */
  --ai: #2f4b63;          /* 主な色（藍）。ボタン・選択中 */
  --ai-dark: #223a4e;
  --ai-soft: #e4ebf1;
  --yuki: #f2f4f5;        /* 背景（雪） */
  --white: #fff;
  --line: #d9e0e5;
  --shu: #c0392b;         /* 朱。承認・要対応にだけ使う */
  --shu-soft: #fbe9e6;
  --kin: #7a4f00;         /* 注意（金茶） */
  --kin-soft: #fff1cf;
  --matsu: #2b6a4c;       /* 完了（松） */
  --matsu-soft: #e1f1e8;
  --font: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK JP", "Meiryo", sans-serif;
  --font-head: "BIZ UDPMincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(35, 40, 45, .06), 0 4px 14px rgba(35, 40, 45, .05);
  --side: 252px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--yuki); color: var(--sumi); font-family: var(--font); font-size: 16px; line-height: 1.75;
  word-break: keep-all; overflow-wrap: anywhere; line-break: strict; font-feature-settings: "palt" 0;
}
img { max-width: 100%; }
a { color: var(--ai); text-underline-offset: 3px; }
a:hover { color: var(--ai-dark); }
h1, h2, h3 { line-height: 1.4; margin: 0; }
p { margin: 0 0 .6em; }
:focus-visible { outline: 3px solid #5b8bb0; outline-offset: 2px; border-radius: 6px; }
.nw { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.muted { color: var(--sumi-2); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 全体の枠 ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--white); border-right: 1px solid var(--line); padding: 20px 14px 16px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; text-decoration: none; color: var(--sumi); }
.brand svg { flex: none; width: 54px; height: 40px; }
.brand-word { display: block; font-weight: 800; font-style: italic; letter-spacing: .14em; font-size: 17px; line-height: 1.1; }
.brand-sub { display: block; font-size: 11.5px; color: var(--sumi-2); letter-spacing: .02em; margin-top: 4px; line-height: 1.3; white-space: nowrap; }
.nav-group { margin-top: 10px; }
.nav-title { font-size: 13px; color: var(--sumi-2); letter-spacing: .12em; padding: 8px 10px 4px; margin: 0; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 10px; margin: 2px 0; border-radius: 10px;
  color: var(--sumi); text-decoration: none; font-weight: 700; font-size: 16px; position: relative;
}
.nav a:hover { background: var(--yuki); }
.nav a[aria-current="page"] { background: var(--ai-soft); color: var(--ai-dark); }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--shu);
}
.nav .ico { width: 32px; height: 32px; flex: none; object-fit: contain; }
.badge-count {
  margin-left: auto; background: var(--shu); color: #fff; border-radius: 999px; min-width: 26px; height: 26px; padding: 0 8px;
  display: inline-grid; place-items: center; font-size: 14px; font-weight: 800;
}
.me { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.me b { display: block; font-size: 16px; }
.me .links { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ai); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.main { padding: 28px 36px 72px; max-width: 1240px; width: 100%; }
.demo-banner {
  background: var(--kin-soft); color: var(--kin); border-bottom: 1px solid #ecd9a6; font-size: 14px; padding: 6px 16px; text-align: center;
}
.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 27px; font-weight: 800; letter-spacing: .02em; }
.lead { color: var(--sumi-2); margin: 6px 0 0; max-width: 46em; }
.crumbs { font-size: 14px; color: var(--sumi-2); margin-bottom: 6px; }
.crumbs a { color: var(--sumi-2); }

/* ---------- 部品 ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card + .card { margin-top: 18px; }
.grid > .card, .split > .card, .grid > a.card { margin-top: 0; }
.card h2 { font-size: 19px; margin-bottom: 4px; font-weight: 800; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 14px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 18px; align-items: start; }
.sp-only { display: none !important; }
.table-tight th, .table-tight td { padding-left: 6px; padding-right: 6px; }
.table-tight { font-size: 15px; }
.table-tight .name { min-width: 9em; }
.table-tight input[type=number] { padding-left: 6px; padding-right: 6px; }
.table .sub { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 14px; color: var(--sumi-2); font-weight: 400; }
.table .sub select { min-height: 34px; padding: 2px 8px; width: auto; font-size: 14px; }
.link-del { background: none; border: 0; color: var(--shu); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 2px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 20px; border-radius: 10px;
  border: 1.5px solid var(--ai); background: var(--ai); color: #fff; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none;
  line-height: 1.3; text-align: center;
}
.btn:hover { background: var(--ai-dark); color: #fff; }
.btn-ghost { background: var(--white); color: var(--ai); }
.btn-ghost:hover { background: var(--ai-soft); color: var(--ai-dark); }
.btn-seal { background: var(--shu); border-color: var(--shu); }
.btn-seal:hover { background: #a63024; border-color: #a63024; }
.btn-warn { background: var(--white); color: var(--shu); border-color: var(--shu); }
.btn-warn:hover { background: var(--shu-soft); color: #a63024; }
.btn-lg { min-height: 54px; font-size: 18px; padding: 10px 28px; }
.btn-sm { min-height: 38px; padding: 4px 14px; font-size: 15px; }
.btn[disabled], .btn.is-off { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--yuki); color: var(--sumi-2); border: 1px solid var(--line); white-space: nowrap; line-height: 1.6;
}
.tag-ai { background: var(--ai-soft); color: var(--ai-dark); border-color: #c6d4df; }
.tag-shu { background: var(--shu-soft); color: #9d2c20; border-color: #f0c5bf; }
.tag-kin { background: var(--kin-soft); color: var(--kin); border-color: #ecd9a6; }
.tag-matsu { background: var(--matsu-soft); color: var(--matsu); border-color: #bfdccb; }

/* フォーム */
label.f { display: block; font-weight: 800; font-size: 15px; margin: 0 0 4px; }
.hint { font-size: 14px; color: var(--sumi-2); margin: 4px 0 0; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; min-height: 46px; padding: 8px 12px; border: 1.5px solid #b9c4cc; border-radius: 10px; background: #fff; color: var(--sumi);
  font: inherit; line-height: 1.5;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid #b7cfe2; border-color: var(--ai); }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--ai); vertical-align: middle; }
.field { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.search { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.search .grow { flex: 1 1 280px; }
.search .field { margin: 0; }

/* 通知 */
.flash { border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.flash-ok { background: var(--matsu-soft); color: var(--matsu); border-color: #bfdccb; }
.flash-warn { background: var(--kin-soft); color: var(--kin); border-color: #ecd9a6; }
.notice { background: var(--ai-soft); border-radius: 10px; padding: 12px 16px; color: var(--ai-dark); margin: 0 0 16px; }
.notice-warn { background: var(--kin-soft); color: var(--kin); }
.notice-shu { background: var(--shu-soft); color: #8c271c; }

/* 表 */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.table th { text-align: left; font-size: 14px; color: var(--sumi-2); font-weight: 700; padding: 8px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; background: #fafbfb; }
.table td { padding: 12px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fafcfd; }
.table .r { text-align: right; }
.table .name { font-weight: 700; min-width: 14em; }
.table .name small { display: block; font-weight: 400; color: var(--sumi-2); font-size: 14px; }
.table input[type=number] { min-height: 40px; padding: 4px 8px; text-align: right; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a {
  display: inline-flex; gap: 8px; align-items: center; padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--line);
  color: var(--sumi); text-decoration: none; font-weight: 700; min-height: 42px;
}
.tabs a[aria-current="true"] { background: var(--ai); color: #fff; border-color: var(--ai); }
.tabs .n { font-size: 14px; opacity: .85; }

.empty { text-align: center; padding: 36px 16px 28px; color: var(--sumi-2); }
.empty img { width: 120px; height: 120px; object-fit: contain; opacity: .95; }
.empty h3 { font-size: 18px; color: var(--sumi); margin: 6px 0 4px; }

.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 仕事の流れ（山の稜線） ---------- */
.ridge-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 10px; margin-bottom: 20px; box-shadow: var(--shadow); }
.ridge { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.ridge::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 56px; z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 700 56' preserveAspectRatio='none'%3E%3Cpath d='M0 54 L50 40 L150 26 L250 6 L350 22 L450 36 L550 46 L650 52 L700 54' fill='none' stroke='%23c8d3db' stroke-width='3' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.ridge li { position: relative; z-index: 1; text-align: center; padding-top: var(--y, 0); }
.ridge li:nth-child(1) { --y: 30px; } .ridge li:nth-child(2) { --y: 18px; } .ridge li:nth-child(3) { --y: 0px; }
.ridge li:nth-child(4) { --y: 14px; } .ridge li:nth-child(5) { --y: 26px; } .ridge li:nth-child(6) { --y: 36px; } .ridge li:nth-child(7) { --y: 42px; }
.ridge .node {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 14px; font-weight: 800;
  background: var(--white); border: 2.5px solid #8fa0ad; color: #55626c;
}
.ridge .done .node { background: var(--ai); border-color: var(--ai); color: #fff; }
.ridge .now .node { background: var(--shu); border-color: var(--shu); color: #fff; width: 32px; height: 32px; margin-top: -3px; box-shadow: 0 0 0 5px var(--shu-soft); }
.ridge .step { display: block; margin-top: 6px; font-weight: 800; font-size: 15px; color: var(--sumi-2); }
.ridge .done .step { color: var(--ai-dark); }
.ridge .now .step { color: var(--shu); }
.ridge .here { display: block; font-size: 13px; color: var(--shu); font-weight: 800; }
.ridge-note { margin: 8px 0 0; font-size: 15px; color: var(--sumi); }
.ridge-note b { color: var(--shu); }

/* ---------- 朱印 ---------- */
.seal {
  width: 92px; height: 92px; border-radius: 50%; border: 3px solid var(--shu); color: var(--shu); display: inline-grid; place-content: center;
  text-align: center; font-family: var(--font-head); font-weight: 800; transform: rotate(-8deg); background: rgba(192, 57, 43, .03);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4.5px rgba(192, 57, 43, .7); line-height: 1.15; flex: none;
}
.seal .s-d { font-size: 11.5px; letter-spacing: .04em; font-weight: 700; }
.seal .s-m { font-size: 25px; letter-spacing: .1em; margin: 2px 0; }
.seal .s-n { font-size: 11.5px; font-weight: 700; }
.seal.stamp-in { animation: stamp .5s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes stamp { 0% { transform: scale(2.2) rotate(-24deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-8deg); opacity: 1; } }
.approve-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* ---------- ログイン ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--white); }
.login-hero { background: var(--ai); color: #fff; padding: 56px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -2px; height: 46%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200 L0 150 L90 105 L170 130 L280 40 L360 95 L440 70 L520 120 L600 90 L600 200 Z' fill='%23ffffff' fill-opacity='.08'/%3E%3Cpath d='M0 200 L0 175 L120 140 L220 165 L330 100 L430 150 L520 130 L600 160 L600 200 Z' fill='%23ffffff' fill-opacity='.10'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.login-hero .brand { color: #fff; padding: 0; }
.login-hero .brand-sub { color: #cfdbe5; }
.login-hero h1 { font-family: var(--font-head); font-size: 34px; line-height: 1.55; font-weight: 800; position: relative; z-index: 1; margin: 0; }
.login-hero p { color: #dbe5ec; max-width: 28em; position: relative; z-index: 1; }
.login-form { padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; max-width: 560px; width: 100%; margin: 0 auto; }
.login-form h2 { font-size: 26px; margin-bottom: 6px; }
.demo-accts { margin-top: 24px; border: 1.5px dashed #c9bd94; background: #fffaf0; border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.demo-accts h3 { font-size: 15px; margin-bottom: 6px; color: var(--kin); }
.demo-accts button { width: 100%; text-align: left; background: #fff; border: 1px solid #e6d9ae; border-radius: 8px; padding: 8px 12px; margin: 4px 0; font: inherit; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.demo-accts button:hover { background: #fff3d2; }
.code-input { font-size: 34px !important; letter-spacing: .45em; text-align: center; font-variant-numeric: tabular-nums; min-height: 64px !important; }
.steps-mini { display: flex; gap: 8px; margin-bottom: 18px; font-size: 14px; color: var(--sumi-2); }
.steps-mini span { padding: 2px 12px; border-radius: 999px; background: var(--yuki); }
.steps-mini .on { background: var(--ai); color: #fff; font-weight: 800; }

/* ---------- ホーム ---------- */
.greet { font-family: var(--font-head); font-size: 29px; font-weight: 800; }
.todo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.todo { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 16px; box-shadow: var(--shadow); }
.todo .ico { width: 64px; height: 64px; object-fit: contain; grid-row: span 4; align-self: center; }
.todo .cnt { font-size: 34px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.todo .cnt small { font-size: 15px; font-weight: 700; margin-left: 4px; color: var(--sumi-2); }
.todo h3 { font-size: 16px; font-weight: 800; }
.todo p { font-size: 14px; color: var(--sumi-2); margin: 0 0 6px; }
.todo.hot { border-color: #eab5ac; background: #fffafa; }
.todo.hot .cnt { color: var(--shu); }
.todo.zero { background: #fafbfb; }
.todo.zero .cnt { color: var(--sumi-2); }
.todo.zero .btn { display: none; }
.stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stat:last-child { border-bottom: 0; }
.stat b { font-variant-numeric: tabular-nums; }

/* ---------- 見積・受付票 ---------- */
.totals { margin-left: auto; width: min(100%, 360px); }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 16px; }
.totals .row.big { border-top: 2px solid var(--sumi); margin-top: 6px; padding-top: 10px; font-size: 22px; font-weight: 800; }
.stock-badge { font-size: 14px; white-space: nowrap; }
.picker { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; background: #fafbfb; }
.pick-results { margin-top: 10px; max-height: 420px; overflow: auto; }
.pick-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); align-items: center; }
.pick-row b { display: block; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--ai); }
.timeline li.rej::before { background: var(--shu); }
.timeline li.wait::before { background: #fff; border: 2.5px solid #aebbc6; }
.kv { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.kv dt { color: var(--sumi-2); font-size: 15px; }
.kv dd { margin: 0; font-weight: 700; }

/* 棚卸 */
.count-input { width: 110px !important; min-height: 52px !important; font-size: 22px; font-weight: 800; text-align: right; }
.diff-pos { color: var(--matsu); font-weight: 800; }
.diff-neg { color: var(--shu); font-weight: 800; }
.progress { height: 12px; border-radius: 99px; background: var(--ai-soft); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ai); }

/* ---------- スマホ ---------- */
.menu-toggle, .topbar, .tabbar { display: none; }
@media (max-width: 1100px) {
  .todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .main { padding: 24px 22px 80px; }
}
@media (max-width: 900px) {
  .shell { display: block; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between; padding: 8px 14px; }
  .topbar .brand { padding: 0; }
  .topbar .brand svg { width: 42px; height: 32px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 14px; border: 1.5px solid var(--ai); border-radius: 10px; color: var(--ai); font-weight: 800; background: #fff; cursor: pointer; }
  .side { display: none; position: fixed; inset: 0; z-index: 40; height: auto; width: 100%; padding-top: 12px; }
  .menu-toggle:checked ~ .shell .side { display: flex; }
  .side-close { display: inline-flex !important; }
  .main { padding: 18px 14px 96px; }
  .sp-only { display: inline-flex !important; width: 100%; margin-bottom: 14px; }
  .page-head h1 { font-size: 23px; }
  .greet { font-size: 24px; }
  .grid-2, .grid-3, .todo-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--white);
    border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; text-decoration: none; color: var(--sumi); font-size: 12.5px; font-weight: 700; gap: 2px; border-radius: 10px; }
  .tabbar a[aria-current="page"] { background: var(--ai-soft); color: var(--ai-dark); }
  .tabbar img { width: 28px; height: 28px; object-fit: contain; }
  .ridge .step { font-size: 13px; }
  .ridge .node { width: 22px; height: 22px; font-size: 12px; }
  .ridge .now .node { width: 28px; height: 28px; }
  .ridge .here { display: none; }
  .ridge-wrap { padding: 12px 10px 8px; }
  .login-page { grid-template-columns: minmax(0, 1fr); }
  .login-hero { padding: 28px 22px 80px; min-height: 0; }
  .login-hero h1 { font-size: 24px; }
  .login-form { padding: 26px 20px 48px; }
  .totals { width: 100%; }
  /* 表はカードの形にして、横に隠れないようにする */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px; margin-bottom: 12px; background: #fff; }
  .table-cards td { border: 0; padding: 4px 0; display: flex; gap: 10px; justify-content: space-between; align-items: center; text-align: right; }
  .table-cards td::before { content: attr(data-label); color: var(--sumi-2); font-size: 14px; font-weight: 700; text-align: left; flex: none; }
  .table-cards td.name { display: block; text-align: left; font-size: 15px; line-height: 1.6; }
  .table-cards td.name::before { display: none; }
  .table-cards td.act { justify-content: flex-end; }
  .table-cards td.act::before { display: none; }
  .table-cards tr:hover td { background: transparent; }
  .count-input { width: 100% !important; }
  .kv { grid-template-columns: 6.5em minmax(0, 1fr); }
}
.side-close { display: none; }

@media (prefers-reduced-motion: reduce) { .seal.stamp-in { animation: none; } * { scroll-behavior: auto !important; } }

/* 印刷（棚卸の数え用紙・受付票） */
@media print {
  .side, .topbar, .tabbar, .no-print, .demo-banner { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .main { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #999; }
}
