/* 監査ボード — Dev Board（design/DESIGN.md 方向L）の骨格そのままに、地を明るくした版。
   色はここの変数以外を足さない。開発者向け Dev Board とは別アプリ。 */
:root {
  --bg: #f4f6fb;        /* 画面の地（藍を薄く含んだ白） */
  --card: #ffffff;      /* カードの面 */
  --line: #dde2ee;      /* 枠・区切り線 */
  --dim: #e7eaf3;       /* セグメントバーの未点灯 */
  --txt: #1c2338;       /* 見出し・数字 */
  --sub: #4b5470;       /* 本文 */
  --mute: #79829c;      /* ラベル・URL・時刻 */
  --note: #98a0b6;      /* 注釈 */
  --accent: #3f5bd4;    /* 点灯・選択中 */
  --good: #1f9d68;      /* 開ける */
  --warn: #b7761a;      /* 準備中 */
  --r: 12px;
  --rs: 8px;
  --sans: 'Geist', -apple-system, 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  --mono: 'Geist Mono', 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--txt); font-family: var(--sans); font-size: 13px; -webkit-font-smoothing: antialiased; }
a { color: var(--txt); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.mono { font-family: var(--mono); }

.app { overflow-x: hidden; max-width: 560px; margin: 0 auto; padding: 22px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }

/* ヘッダー（走る猫は Dev Board と同じ5コマ。明るい地なので墨色に反転して使う） */
.top { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.runcat { position: relative; width: 28px; height: 24px; flex: none; }
.runcat img { position: absolute; inset: 0; width: 28px; height: 24px; object-fit: contain; opacity: 0; filter: invert(1) brightness(0.22); animation: rc var(--speed, 0.7s) steps(1) infinite; }
.runcat img:nth-child(1) { animation-delay: 0s; }
.runcat img:nth-child(2) { animation-delay: calc(var(--speed, 0.7s) * 0.2); }
.runcat img:nth-child(3) { animation-delay: calc(var(--speed, 0.7s) * 0.4); }
.runcat img:nth-child(4) { animation-delay: calc(var(--speed, 0.7s) * 0.6); }
.runcat img:nth-child(5) { animation-delay: calc(var(--speed, 0.7s) * 0.8); }
@keyframes rc { 0%, 19.99% { opacity: 1; } 20%, 100% { opacity: 0; } }
.who { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--mute); }

/* 数字タイル */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tile { background: var(--card); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile .label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--mute); white-space: nowrap; }
.tile .num { font-size: 26px; overflow-wrap: anywhere; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.tile .sub { font-family: var(--mono); font-size: 10px; color: var(--mute); overflow-wrap: anywhere; }
.tile .num.word { font-size: 20px; letter-spacing: -0.02em; }
.seg { display: flex; gap: 2px; margin-top: 2px; }
.seg span { flex: 1; height: 3px; border-radius: 1px; background: var(--dim); }
.seg span.on { background: var(--accent); }

/* 案件カード */
.list { display: flex; flex-direction: column; gap: 10px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px 11px; min-height: 44px; }
.card-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.card .name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.card .url { font-family: var(--mono); font-size: 10.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.status .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--good); }
.card[data-state="pending"] .status { color: var(--mute); }
.card[data-state="pending"] .status .dot { background: var(--warn); }

.body { border-top: 1px solid var(--line); padding: 10px 14px 11px; display: flex; flex-direction: column; gap: 6px; }
.line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 12px; }
.line .v { font-family: var(--mono); font-size: 10.5px; color: var(--mute); text-align: right; }
.line .v.is-old { color: var(--warn); }

.actions { border-top: 1px solid var(--line); padding: 10px 14px 13px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.btn { min-width: 0; height: 44px; border-radius: var(--rs); border: 1px solid var(--txt); background: var(--txt); color: var(--card); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; padding: 0 14px; }
.btn:hover { opacity: 0.9; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.foot { font-family: var(--mono); font-size: 10.5px; color: var(--note); line-height: 1.7; padding: 8px 2px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.linkbtn { border: 1px solid var(--line); border-radius: var(--rs); background: var(--card); color: var(--sub); font-family: var(--sans); font-size: 12.5px; font-weight: 500; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; }
.linkbtn[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .runcat img { animation: none; opacity: 1; } .runcat img:not(:first-child) { display: none; } }

/* 意見のダイアログ（Dev Board の dlg と同じ骨格） */
.dlg { background: var(--card); color: var(--txt); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; width: min(92vw, 420px); }
.dlg::backdrop { background: rgba(28, 35, 56, 0.35); }
.dlg h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.dlg-text { margin: 0 0 14px; color: var(--sub); font-size: 12.5px; line-height: 1.6; }
.dlg textarea { width: 100%; background: var(--bg); color: var(--txt); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; font: inherit; font-size: 13px; line-height: 1.6; resize: vertical; margin-bottom: 14px; }
.dlg textarea::placeholder { color: var(--note); }
.dlg textarea:focus { outline: none; border-color: var(--accent); }
.dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-quiet { background: var(--card); color: var(--txt); border-color: var(--line); font-weight: 500; }
