@charset "utf-8";

/* =============================================================================
   FieldSync 画面スタイル

   決めごと
   - 余白は 4px の倍数だけ使う。中途半端な数字を足さない。
   - 触る対象は 44px 角以上。入力欄の文字は 16px 未満にしない（iOSが拡大するため）。
   - 色は意味のあるときだけ使う。状態を色だけで伝えない（文字も添える）。
   - 影は1段階だけ。重ねて深さを作らない。
   - 狭い画面を先に作り、広い画面はその拡張として書く。
   ============================================================================= */

:root {
  /* 色 */
  --navy: #1f3a5f;
  --navy-dark: #16283f;
  --navy-soft: #eef2f7;
  --ink: #1b2430;
  --muted: #5b6672;
  --faint: #6a7480;
  --line: #dfe4ea;
  --line-soft: #eceff3;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ok: #0f7b4f;
  --ok-soft: #e7f4ee;
  --err: #b42318;
  --err-soft: #fdecea;
  --warn: #b45309;
  --warn-soft: #fdf6e7;

  /* かたち */
  --r: 12px;
  --r-sm: 8px;
  --r-pill: 999px;
  --sh: 0 1px 2px rgba(16, 24, 40, 0.06);
  --sh-lift: 0 6px 20px rgba(16, 24, 40, 0.10);

  /* 寸法 */
  --tap: 44px;
  --header-h: 56px;
  --tabbar-h: 60px;
  --wrap: 1120px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
}

a { color: var(--navy); }

/* キーボードで操作している人にだけ、はっきりした枠を出す */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  left: 8px;
  top: 8px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  clip-path: none;
  background: var(--panel);
  border: 1px solid var(--navy);
  border-radius: var(--r-sm);
  z-index: 100;
}

.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------- ヘッダ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: var(--navy);
  color: #fff;
}
.app-header__inner {
  /* 本文は var(--wrap) で中央に寄せるが、**帯は画面いっぱいに使う**。
     行き先が11個あるので、本文と同じ幅に収めると入りきらず、
     ラベルが1文字ずつ縦に割れる（実測して分かった）。 */
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.app-header__brand {
  display: flex;
  align-items: center;
  height: 100%;
  padding-right: 4px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.app-header__user {
  margin-left: auto;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 4px;
  color: #cfd9e6;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.app-header__user:hover { color: #fff; }

/* 広い画面の行き先。狭い画面では下のタブが担うので隠す。 */
.app-nav { display: none; }
.app-nav__item {
  display: flex;
  align-items: center;
  gap: 7px;
  height: var(--header-h);
  padding: 0 4px;
  color: #b9c6d6;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  /* 日本語は語の途中でも改行できてしまう。指定しないと、幅が足りないときに
     「案件」が1文字ずつ縦に割れる。**入りきらないなら折り返さず、横に詰める。** */
  white-space: nowrap;
}
.app-nav__item:hover { color: #fff; }
.app-nav__item.is-current {
  color: #fff;
  font-weight: 700;
  border-bottom-color: #fff;
}

/* ---------------------------------------------------------------- 本文 */
.app-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.page-head .page-title { margin: 0; }

.page-title {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 12px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
}

.muted { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 14px; margin-top: 20px; }
.note a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 4px;
}
.right { text-align: right; }

/* 表の中の文字リンクも、指で押せる高さにする。
   見た目は文字のままだが、当たり判定を44pxにする。 */
table.kv a:not(.btn),
table.list a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

/* ---------------------------------------------------------------- カード */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 20px;
  margin-bottom: 16px;
}
.card--narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.card--flush { padding: 0; overflow: hidden; }

/* ---------------------------------------------------------------- 知らせ */
.flash {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 16px;
  font-size: 15px;
}
.flash--ok { background: var(--ok-soft); color: var(--ok); }
.flash--error { background: var(--err-soft); color: var(--err); }

.alert {
  background: var(--warn-soft);
  border: 1px solid #f0dcb4;
  border-left: 4px solid var(--warn);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.alert--error { background: var(--err-soft); border-color: #f3c9c4; border-left-color: var(--err); }

.warn {
  background: var(--err-soft);
  border-left: 4px solid var(--err);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 16px;
}

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}
/* 色は「担当者に手があるとき」だけ。期限を過ぎた残高は、督促という手がある。 */
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.warn-text { color: var(--warn); }

/* ---------------------------------------------------------------- 行き先タイル */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  text-decoration: none;
  color: var(--ink);
}
.tile:hover { border-color: var(--navy); box-shadow: var(--sh-lift); }
.tile__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--navy-soft);
  color: var(--navy);
  flex: 0 0 auto;
}
.tile__mark .ico { width: 22px; height: 22px; }
.tile__label { display: block; font-weight: 700; font-size: 16px; }
.tile__note { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.6; }

/* ---------------------------------------------------------------- 入力 */
.form { margin-top: 4px; }

.field { display: block; margin-bottom: 20px; }
.field__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.field__input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.5;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
}
.field__input::placeholder { color: var(--faint); }
.field__input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.14);
}
select.field__input {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6672' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
textarea.field__input { line-height: 1.8; resize: vertical; }

.field__help { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.field__error { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--err); }
.field--error .field__input { border-color: var(--err); }
.field--error .field__input:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14); }

.field__input--money { text-align: right; font-variant-numeric: tabular-nums; }
.field__input--code {
  font-size: 28px;
  letter-spacing: 0.5em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-left: 0.5em;
}

.req {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--err-soft);
  color: var(--err);
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}

/* 選ぶ・切り替える */
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
  cursor: pointer;
}
.check input { width: 20px; height: 20px; accent-color: var(--navy); flex: 0 0 auto; }
.check--tight { min-height: 40px; gap: 6px; font-size: 13px; margin-bottom: 0; }
.check--tight input { width: 18px; height: 18px; }

.choice { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.choice__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}
.choice__item:has(input:checked) {
  border-color: var(--navy);
  background: var(--navy-soft);
  font-weight: 700;
}
.choice__item input { width: 18px; height: 18px; accent-color: var(--navy); }

.row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }

/* ---------------------------------------------------------------- ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--faint); background: #fbfcfd; }
.btn--primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn--primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn--block { width: 100%; }
.btn--small { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* 送信ボタンは入力欄から離す。区切りを作り、押し間違いを減らす。 */
.form .btn--block { margin-top: 28px; }

/* ---------------------------------------------------------------- 一覧 */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  vertical-align: middle;
}
table.list thead th {
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: #fbfcfd; }
table.list .right { text-align: right; font-variant-numeric: tabular-nums; }
table.list .list__action { width: 1%; white-space: nowrap; text-align: right; }

/* 明細を入力する表。列の幅を決めないと全部同じ幅になり、品名だけが足りなくなる。
   狭い画面では table.list が縦に崩れるので、この指定は広い画面でだけ意味を持つ。 */
table.list--items th.c-name { width: auto; }
table.list--items th.c-qty,
table.list--items th.c-unit { width: 124px; }
table.list--items th.c-price { width: 148px; }
table.list--items th.c-tax { width: 132px; }
table.list--items th.c-head { width: 116px; }
/* 行の中の編集フォームは、広い画面では1行に収める。
   セルが内容ぶんの幅しか取らないので、折り返しを許すと縦に積み上がる。
   狭い画面の指定（下の @media）を上書きしないよう、min-width の中に閉じ込める。 */
@media (min-width: 701px) {
  table.list .list__action .inline-form--tight { flex-wrap: nowrap; }
}
table.list tr.is-off td { color: var(--faint); }
table.list .list__rowhead { font-weight: 400; color: var(--muted); font-size: 14px; }
table.list--matrix td { padding: 10px 12px; }
table.list--matrix .field__input { min-height: var(--tap); padding: 8px 10px; }

/* 項目と値 */
table.kv { width: 100%; border-collapse: collapse; }
table.kv th, table.kv td {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 400;
  font-size: 15px;
  vertical-align: top;
}
table.kv th { width: 38%; color: var(--muted); font-size: 14px; }
/* .right だけでは効かない。table.kv td のほうが指定が強く、左寄せが勝つ。 */
table.kv td.right { text-align: right; font-variant-numeric: tabular-nums; }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: 0; }

/* 行の中の小さなフォーム */
.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.inline-form .field { margin-bottom: 0; }
.inline-form--tight { margin-bottom: 0; gap: 8px; }
.field--inline { flex: 0 0 auto; }
.field--tight { margin-bottom: 0; }
.field--tight .field__label { font-size: 12px; font-weight: 400; color: var(--muted); margin-bottom: 3px; }
.field--tight .field__input { min-height: 40px; padding: 6px 10px; font-size: 16px; width: 130px; }

/* ---------------------------------------------------------------- 案件の担当 */
.assign {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}
.assign--on { border-color: var(--navy); background: #fbfcfe; box-shadow: inset 3px 0 0 var(--navy); }
.assign__head { margin: 0; }
.assign__body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.assign__body .field { margin-bottom: 14px; }

/* ---------------------------------------------------------------- 二段階認証 */
.steps {
  padding-left: 1.3em;
  margin: 16px 0 20px;
  font-size: 15px;
  line-height: 1.9;
}
.steps li { margin-bottom: 8px; }

.qr { text-align: center; margin: 20px 0 16px; }
.qr img { border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }

.secret {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
  letter-spacing: 0.08em;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px;
  text-align: center;
  word-break: break-all;
  margin: 0 0 20px;
}

.codes {
  list-style: none;
  padding: 16px;
  margin: 16px 0 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.disclosure { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.disclosure summary {
  cursor: pointer;
  font-size: 15px;
  color: var(--navy);
  min-height: var(--tap);
  display: flex;
  align-items: center;
}
.disclosure > *:not(summary) { margin-top: 12px; }

/* ---------------------------------------------------------------- 下部タブ */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
  z-index: 20;
}
.tabbar__item {
  flex: 1;
  min-height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.tabbar__item.is-current { color: var(--navy); font-weight: 700; }
.tabbar__item.is-current .ico { stroke-width: 2; }

.app-footer {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- 経費 */

/* 領収書を撮るボタン。この画面でいちばん押される場所なので、大きく取る。 */
.shoot { display: block; margin-bottom: 16px; cursor: pointer; }
.shoot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.shoot__body {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px 18px;
  border: 2px dashed var(--line);
  border-radius: var(--r);
  background: #fbfcfd;
}
.shoot:hover .shoot__body,
.shoot input:focus-visible + .shoot__body { border-color: var(--navy); background: var(--navy-soft); }
.shoot__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--navy);
  color: #fff;
  flex: 0 0 auto;
}
.shoot__icon .ico { width: 24px; height: 24px; }
.shoot__label { display: block; font-weight: 700; font-size: 16px; }
.shoot__note { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* 写真から読み取った内容。まだ確定していないことが分かる見た目にする。 */
.scanned {
  border: 1px dashed var(--navy);
  border-radius: var(--r-sm);
  background: var(--navy-soft);
  padding: 14px 16px;
  margin: 16px 0;
}
.scanned__head {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.scanned table.kv th, .scanned table.kv td { padding: 6px 0; border-bottom-color: #d7e0ea; }
.scanned table.kv tr:last-child th, .scanned table.kv tr:last-child td { border-bottom: 0; }

/* 明細1件。狭い画面では表にせず、1件1枚のカードで見せる。 */
.entry {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.entry__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.entry__date { font-size: 14px; color: var(--muted); }
.entry__amount { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.entry__body { margin-top: 4px; font-size: 15px; }
.entry__cat {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}
.entry__meta { margin-top: 6px; font-size: 13px; color: var(--muted); }
.entry__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.entry__actions form { margin: 0; }

/* 書き出しのように文字数のある並びは、狭い画面では縦に積む。
   横に並べると1つあたり150px しかなく、ボタンの中で字が折り返す。 */
.entry__actions--stack { flex-direction: column; align-items: stretch; }
@media (min-width: 640px) {
  .entry__actions--stack { flex-direction: row; }
  .entry__actions--stack > .btn { flex: 0 0 auto; }
}

.choice--stack { flex-direction: column; align-items: stretch; }
.choice--stack .choice__item { border-radius: var(--r-sm); justify-content: flex-start; }

/* 合計と提出は、画面の下に貼り付けて常に見えるようにする。 */
.stickybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  z-index: 15;
}
.stickybar__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.stickybar__inner form { margin: 0; }
.stickybar__amount { display: flex; flex-direction: column; line-height: 1.3; }
.stickybar__label { font-size: 12px; color: var(--muted); }
.stickybar__amount strong { font-size: 20px; font-variant-numeric: tabular-nums; }

/* 貼り付けたぶん、本文の下に余白を足す */
body:has(.stickybar) { padding-bottom: calc(var(--tabbar-h) + 72px + var(--safe-bottom)); }

/* =============================================================================
   広い画面
   ============================================================================= */
@media (min-width: 560px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row--3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .app-main { padding: 28px 24px 48px; }
  .card { padding: 24px; }
  .page-title { font-size: 24px; }
}

/* 上の帯に行き先を並べるのは、11個が1行に収まる幅になってから。
   管理者は11個、一般スタッフは4個。**多いほうで測って決めた幅**がこれ。
   ここより狭いときは下のタブが担うので、上の帯には出さない。 */
@media (min-width: 1100px) {
  body { padding-bottom: 0; }
  body:has(.stickybar) { padding-bottom: 84px; }
  .stickybar { bottom: 0; }
  .app-nav { display: flex; align-items: center; gap: 16px; }
  .tabbar { display: none; }
}

/* =============================================================================
   狭い画面では、表を捨ててカードにする。横スクロールさせない。
   ============================================================================= */
@media (max-width: 700px) {
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list thead { display: none; }
  table.list tr { border-bottom: 1px solid var(--line); padding: 12px 16px; }
  table.list tr:last-child { border-bottom: 0; }
  table.list tbody tr:hover td { background: transparent; }
  table.list td {
    border: 0;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  table.list td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    flex: 0 0 auto;
  }
  /* 幅は明示的に戻す。table.list .list__action の width:1% は、
     table.list td の width:100% より詳細度が高く、そのままでは残る（セルが3pxになる）。 */
  table.list .list__action { display: block; width: 100%; white-space: normal; text-align: left; padding-top: 12px; }
  table.list .list__action::before { content: none; }
  table.list .list__rowhead { display: block; padding: 6px 0; }

  /* 行の中の小さなフォームは折り返して全幅にする。詰めたままだと画面の外へ出る。 */
  .inline-form--tight { flex-wrap: wrap; gap: 10px; }
  .inline-form--tight .field--tight { flex: 1 1 130px; }
  .inline-form--tight .field--tight .field__input { width: 100%; }
  .inline-form--tight .btn { flex: 1 1 100%; }
  .btn--small { min-height: var(--tap); }
  /* 指で押す対象は44px。詰めた版でも狭い画面では詰めない。 */
  .check--tight { min-height: var(--tap); }

  table.kv th { width: 42%; }

  /* 見出しの横に置いたフォームは、狭い画面では1行ずつに崩す。 */
  .page-head .inline-form { width: 100%; }
  .page-head .inline-form .field--tight { flex: 1 1 100%; }
  .page-head .inline-form .field--tight .field__input { width: 100%; }
  .page-head .inline-form .btn { flex: 1 1 100%; }
}
