/* 待った — 画面のスタイル（.claude/skills/familiar-app-ui の作法。独自の飾りは判子だけ）
   色: 墨＝文字・主ボタン、朱＝待った・停止、若竹＝承認・確かめた、山吹＝保留
   動き: 状態が変わる瞬間と、待っている間の静かな合図だけ。反応は 300ms 以内。reduced-motion で止める
   フォントの CSS は各 HTML の <link> で並列に読む（@import は直列になるため lint で禁止） */

:root {
  --bg: #fff;
  --surface: #f2f2f2;
  --surface-2: #f8f8f8;
  --line: #e5e5e5;
  --line-strong: #858585; /* 入力欄の枠（白地で 3:1 以上） */
  --ink: #1f1f1f;
  --ink-soft: #606060;
  --shu: #c8341c;
  --shu-wash: #fdece9;
  --shu-line: #f3c4ba;
  --take: #127a4f;
  --take-wash: #e5f3eb;
  --kin: #8a5a00;
  --kin-wash: #fff3d9;
  --kin-line: #e9b44c;    /* 保留の輪（文字には使わない） */
  --focus: #1a73e8;
  --f-body: 'BIZ UDPGothic', 'Hiragino Sans', 'Yu Gothic UI', 'Noto Sans JP', sans-serif;
  --f-seal: 'Dela Gothic One', 'BIZ UDPGothic', sans-serif;
  --f-mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --top: 56px;
  --tab: 64px;
  --side: 232px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.7 var(--f-body); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
p, li, h1, h2, h3 { text-wrap: pretty; line-break: strict; margin: 0; }
h1, h2, h3 { font-feature-settings: "palt"; }
@supports (word-break: auto-phrase) { h1, h2, h3 { word-break: auto-phrase; text-wrap: balance; } }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--ink-soft); }
.ico { flex: none; }
.seg { display: inline-block; }
.num, .code { font-variant-numeric: tabular-nums; }

/* ---------- 上部バー ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--top); display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s3) 0 var(--s4); background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; text-decoration: none; flex: none; }
.seal-mini {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--shu); color: #fff; font: 16px/1 var(--f-seal);
  box-shadow: inset 0 0 0 2px var(--shu), inset 0 0 0 3.5px #fff;
}
.wordmark { font-size: 19px; font-weight: 700; letter-spacing: .06em; }
.mock-tag { font-size: 12px; font-weight: 700; color: var(--kin); background: var(--kin-wash); border-radius: 4px; padding: 1px 6px; }
.search { flex: 1; max-width: 600px; margin: 0 auto; display: flex; height: 44px; }
.search input {
  flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line-strong); border-right: 0;
  border-radius: 999px 0 0 999px; padding: 0 18px; font: inherit; font-size: 16px; background: var(--bg);
}
.search input:focus { border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); outline: none; }
.search button {
  width: 64px; height: 44px; border: 1px solid var(--line-strong); border-radius: 0 999px 999px 0;
  background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.search button:hover { background: var(--surface); }
.icon-btn {
  min-width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; cursor: pointer;
  text-decoration: none; font: 700 14px/1 var(--f-body);
}
.icon-btn:hover { background: var(--surface); }
.icon-btn.outline { border: 1px solid var(--line-strong); width: 44px; padding: 0; }
.icon-btn[aria-pressed="true"] { color: var(--shu); border-color: var(--shu); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.search-toggle { display: none; margin-left: auto; }
.who { border: 1px solid var(--line); padding: 0 14px 0 10px; }

/* ---------- 骨組み（PC は左メニュー、スマホは下のタブ） ---------- */
.shell { display: flex; }
.sidenav {
  position: sticky; top: var(--top); align-self: flex-start;
  width: var(--side); height: calc(100vh - var(--top)); padding: var(--s3); display: flex; flex-direction: column; gap: 2px;
}
.side-link {
  display: flex; align-items: center; gap: var(--s4); height: 48px; padding: 0 var(--s4); border-radius: 999px;
  text-decoration: none; font-size: 15px;
}
.side-link:hover { background: var(--surface-2); }
.side-link[aria-current="page"] { background: var(--surface); font-weight: 700; }
.side-link[aria-current="page"] .ico { stroke-width: 2.3; }
main { flex: 1; min-width: 0; padding: var(--s5) var(--s6) 80px; }
main.narrow { display: flex; flex-direction: column; align-items: flex-start; }
main.narrow > * { width: 100%; max-width: 640px; }
main.wide > * { max-width: 1040px; }
main.home > * { max-width: 880px; }
.tabbar { display: none; }

@media (max-width: 760px) {
  .sidenav { display: none; }
  .search { display: none; }
  .search-toggle { display: inline-flex; }
  main { padding: var(--s4) var(--s4) calc(var(--tab) + 40px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    display: grid; grid-template-columns: repeat(5, 1fr); background: var(--bg); border-top: 1px solid var(--line);
  }
  .tab-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    text-decoration: none; font-size: 12px; color: var(--ink-soft);
  }
  .tab-link .ico { padding: 2px 16px; box-sizing: content-box; border-radius: 999px; transition: background-color .2s; }
  .tab-link[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .tab-link[aria-current="page"] .ico { stroke-width: 2.3; background: var(--surface); }
}

/* ---------- 文字 ---------- */
.page-title { font-size: 26px; font-weight: 700; line-height: 1.35; }
.lead-sm { color: var(--ink-soft); margin: 6px 0 var(--s5); max-width: 38em; }
.h-sm { font-size: 18px; font-weight: 700; line-height: 1.45; }
.h-md { font-size: 21px; font-weight: 700; line-height: 1.45; }
.section-title { margin: 40px 0 var(--s2); }
.hint { font-size: 14px; color: var(--ink-soft); line-height: 1.65; margin-top: var(--s2); }
.error { color: var(--shu); font-weight: 700; min-height: 1.5em; margin-top: var(--s2); }
.error:empty { min-height: 0; margin: 0; }
.empty { color: var(--ink-soft); padding: var(--s4) 0; }
@media (max-width: 760px) { .page-title { font-size: 23px; } }

/* ---------- 面と入力 ---------- */
.sheet { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 0 0 var(--s4); background: var(--bg); }
label, .field-label { display: block; font-weight: 700; font-size: 15px; margin: var(--s5) 0 var(--s2); }
label:first-child { margin-top: 0; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 11px 14px; min-height: 48px;
}
input:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); outline: none; }
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.amount-field { display: flex; align-items: baseline; gap: var(--s2); background: var(--bg); border-radius: var(--r-md); padding: 4px 18px; border: 1px solid var(--line-strong); }
.amount-field:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.amount-field .yen { font-size: 26px; font-weight: 700; color: var(--ink-soft); }
.amount-field input { background: transparent; border: 0; box-shadow: none; padding: 8px 0; font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.memo-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin: var(--s5) 0 var(--s2); }
.memo-head .field-label { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px;
  font: 700 16px/1.2 var(--f-body); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .25s, color .25s, border-color .25s, opacity .2s, transform .12s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { cursor: not-allowed; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover:not(:disabled), .btn-shu:hover:not(:disabled) { opacity: .86; }
.btn-ink:disabled { background: var(--surface); color: var(--ink-soft); }
.btn-line { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { background: var(--surface-2); }
.btn-shu { background: var(--shu); color: #fff; }
.btn-shu-line { background: var(--bg); color: var(--shu); border-color: var(--shu); }
.btn-shu-line:hover { background: var(--shu-wash); }
.btn-ok { background: var(--bg); color: var(--take); border-color: var(--take); }
.btn-ok:hover:not(:disabled) { background: var(--take-wash); }
.btn-shu:disabled, .btn-ok:disabled, .btn-line:disabled, .btn-shu-line:disabled { opacity: .45; }
.btn-block { width: 100%; margin-top: var(--s5); }

.pill { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 700; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--surface); color: var(--ink-soft); transition: background-color .3s, color .3s; }
.pill.pending { background: var(--kin-wash); color: var(--kin); }
.pill.executed, .pill.ok { background: var(--take-wash); color: var(--take); }
.pill.stopped, .pill.expired, .pill.bad { background: var(--shu-wash); color: var(--shu); }

.login { max-width: 440px; }
.login form .btn { margin-top: var(--s4); width: 100%; }

/* ---------- 一覧（アイコン・名前・状態） ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: var(--s3);
  min-height: 68px; padding: 10px var(--s2); margin: 0 calc(-1 * var(--s2)); border-radius: var(--r-md); text-decoration: none;
}
a.row:hover, .row[aria-current="true"] { background: var(--surface-2); }
.row[aria-current="true"] { background: var(--surface); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; flex: none; }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.row-payee { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; display: flex; gap: 4px 10px; flex-wrap: wrap; }
.row-amount { color: var(--ink); font-weight: 700; }
mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 1px; }
.filter { margin: calc(-1 * var(--s2)) 0 var(--s4); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.filter:empty { display: none; }
.filter a { display: inline-flex; align-items: center; min-height: 44px; }
.filter .chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 700; }
.filter-search { display: flex; gap: var(--s2); width: 100%; }
.filter-search input { flex: 1; }
@media (min-width: 761px) { .filter-search { display: none; } }

.empty-state { display: grid; justify-items: center; gap: 6px; text-align: center; padding: var(--s6) var(--s4); color: var(--ink-soft); animation: rise .24s var(--ease) both; }
.empty-state .ico-wrap { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); margin-bottom: 6px; }
.empty-title { font-weight: 700; color: var(--ink); }
.live { display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; color: var(--ink-soft); }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--take); animation: beat 2.4s ease-in-out infinite; }

/* ---------- 送金の依頼（伝票） ---------- */
.crumbs { font-size: 14px; margin: calc(-1 * var(--s2)) 0 var(--s2); }
.crumbs a { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding-right: var(--s3); color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* いま何が起きているか */
.status { --tone: var(--ink-soft); display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: var(--s4) 18px; border-radius: var(--r-lg); margin: 0 0 var(--s4); background: var(--surface-2); }
.t-hold, .t-wait { --tone: var(--kin); background: var(--kin-wash); }
.t-go { --tone: var(--take); background: var(--take-wash); }
.t-stop { --tone: var(--shu); background: var(--shu-wash); }
.t-done { --tone: var(--take); }
.status.enter { animation: rise .26s var(--ease) both; }
.status-ico { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); }
.status-ico, .status-eyebrow { color: var(--tone); }
.status-ico::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid; opacity: 0; }
.t-hold .status-ico::after, .t-wait .status-ico::after { animation: halo 2.4s ease-out infinite; }
.t-go .status-ico, .t-stop .status-ico, .t-done .status-ico { animation: pop .28s var(--ease) both; }
.status-main { min-width: 0; }
.status-eyebrow { font-size: 13px; font-weight: 700; line-height: 1.5; }
.status-title { font-size: 21px; font-weight: 700; line-height: 1.4; margin-top: 2px; }
.status-sub { font-size: 15px; line-height: 1.6; margin-top: 4px; }
.status-sub:empty { display: none; }
.status .meter { background: var(--bg); }

.ticket { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-bottom: var(--s4); }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.ticket-kind { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.ticket-amount { font-size: 40px; font-weight: 700; line-height: 1.2; margin-top: var(--s2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; letter-spacing: .01em; }
.ticket-payee { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.ticket-cut { position: relative; border-top: 1px dashed var(--line-strong); margin: 18px 0 14px; }
.ticket-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s2) var(--s6); margin: 0; padding-right: 112px; }
.ticket-meta div { display: flex; flex-direction: column; }
.ticket-meta dt { font-size: 12px; color: var(--ink-soft); }
.ticket-meta dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.code { letter-spacing: .1em; }
.said { margin: var(--s4) 0 0; padding: var(--s3) 14px; border-radius: var(--r-md); background: var(--surface); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.said::before { content: '言われた内容'; display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.said.purpose::before { content: '何の支払いか（本人の言葉）'; }

/* 判子（唯一の装飾） */
.stamp {
  position: absolute; right: 12px; top: -50px; z-index: 2;
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  border: 4px solid currentColor; box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 5px currentColor;
  font: 21px/1.05 var(--f-seal); writing-mode: vertical-rl; letter-spacing: .06em;
  transform: rotate(-12deg); opacity: .9; pointer-events: none; mix-blend-mode: multiply;
}
.stamp.s-stopped { color: var(--shu); }
.stamp.s-approved, .stamp.s-confirmed { color: var(--take); }
.stamp.s-executed { color: var(--ink); }
.stamp.s-expired { color: var(--ink-soft); }
.stamp.s-confirmed, .stamp.s-expired { font-size: 17px; letter-spacing: 0; }
.stamp.press { animation: press .32s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes press {
  0% { opacity: 0; transform: rotate(-12deg) scale(1.7); }
  70% { opacity: .95; transform: rotate(-12deg) scale(.94); }
  100% { opacity: .9; transform: rotate(-12deg) scale(1); }
}

.steps { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 0 0 18px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps li.done::before { background: var(--take); opacity: .35; }
.mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); background: var(--bg); border: 2px solid var(--line); position: relative; z-index: 1; }
.mark .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.steps .done .mark { background: var(--take); border-color: var(--take); color: #fff; }
.steps .now .mark { border-color: var(--kin-line); background: var(--kin-wash); }
.steps .now .mark::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--kin-line); }
.steps .bad .mark { background: var(--shu); border-color: var(--shu); color: #fff; }
.steps .pop .mark { animation: pop .28s var(--ease) both; }
.steps .pop .mark path { stroke-dasharray: 1; animation: draw .3s .08s var(--ease) both; }
.step-title { font-weight: 700; line-height: 1.5; }
.steps .todo .step-title { color: var(--ink-soft); }
.step-sub { font-size: 14px; color: var(--ink-soft); line-height: 1.5; font-variant-numeric: tabular-nums; }
.meter { display: block; height: 6px; border-radius: 999px; background: var(--surface); margin-top: var(--s2); overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; background: var(--kin-line); border-radius: 999px; transition: width .9s linear; }
.meter.indeterminate > span { width: 30%; animation: slide 1.2s ease-in-out infinite; }

.result { font-weight: 700; margin-top: 4px; }
.links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; margin-top: var(--s2); }
.links a { display: inline-flex; align-items: center; min-height: 44px; }
.detail-empty { display: none; }
@media (min-width: 980px) { .ledger .detail-empty { display: grid; place-items: center; min-height: 240px; color: var(--ink-soft); text-align: center; background: var(--surface-2); border-style: dashed; } }
.action-bar { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: var(--s5); }
.action-bar .btn { padding: 0 var(--s3); white-space: nowrap; }
.action-bar.single { grid-template-columns: 1fr; }
@media (max-width: 760px) {
  .action-bar {
    position: sticky; bottom: calc(var(--tab) + env(safe-area-inset-bottom)); z-index: 5;
    margin: var(--s4) calc(-1 * var(--s4)) 0; padding: 10px var(--s4); background: var(--bg); border-top: 1px solid var(--line);
  }
}

.part { border-top: 1px solid var(--line); padding: 20px 0 var(--s2); margin: 0; }
.part > .h-sm { margin-bottom: 4px; }

/* ---------- 家族：依頼 ---------- */
.ask { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 0 0 var(--s4); animation: rise .24s var(--ease) both; }
.ask .stamp { top: 64px; right: 16px; width: 84px; height: 84px; font-size: 19px; }
.ask-head { display: flex; align-items: center; gap: var(--s3); }
.ask-head .avatar { width: 36px; height: 36px; font-size: 15px; }
.ask-head-main { display: flex; flex-direction: column; line-height: 1.4; flex: 1; min-width: 0; }
.ask-head-title { font-weight: 700; }
.ask-head-sub { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ask-amount { font-size: 36px; font-weight: 700; line-height: 1.2; margin-top: var(--s4); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ask-payee { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.code-box { margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface); }
.code-box .code-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.code-box strong { display: block; font-size: 28px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.code-box p { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-top: 2px; }
.ask-note { font-size: 14px; color: var(--ink-soft); margin-top: var(--s3); }
.ask-note.warn { color: var(--shu); font-weight: 700; }
.ask-note.self { display: flex; gap: var(--s2); align-items: flex-start; color: var(--ink); font-weight: 700; }
.ask-note.self .ico { color: var(--take); width: 20px; height: 20px; margin-top: 2px; }
.ask-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: var(--s4); }
.ask-actions .btn { min-height: 52px; }
.pk-ok { display: flex; align-items: center; gap: var(--s2); font-weight: 700; }
#passkey-panel .btn-line { margin-top: var(--s3); }

/* ---------- AI の確かめ係 ---------- */
.ai { margin: 0 0 var(--s4); padding: 20px 0 var(--s2); border-top: 1px solid var(--line); }
.ask .ai { margin: var(--s4) 0 0; padding: var(--s4) 0 0; }
.ai-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); font-weight: 700; font-size: 18px; }
.ai-where { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.ai .btn { margin-top: 10px; min-height: 44px; }
.ai-msg { margin-top: var(--s2); font-size: 17px; line-height: 1.8; }
.ai-hint { margin-top: var(--s2); padding: 10px var(--s3); border-radius: var(--r-md); background: var(--kin-wash); font-weight: 700; line-height: 1.7; }
.ai-sub { margin-top: 14px; font-size: 14px; font-weight: 700; }
.ai-q { margin-top: 4px; padding-left: var(--s3); border-left: 3px solid var(--line-strong); line-height: 1.7; }
.signals { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.signals li { padding-left: var(--s3); border-left: 3px solid var(--shu); }
.sig-kind { display: inline-block; font-size: 12px; font-weight: 700; color: var(--shu); }
.sig-quote { display: block; font-weight: 700; quotes: '「' '」'; overflow-wrap: anywhere; }
.sig-why { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* ---------- 記録 ---------- */
.ledger { display: grid; gap: var(--s4); align-items: start; }
@media (min-width: 980px) { .ledger { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s5); } .ledger #detail { position: sticky; top: calc(var(--top) + var(--s4)); } }
.ledger .sheet { margin: 0; }
.detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2) var(--s3); }
.timeline { list-style: none; margin: 14px 0 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 72px 1fr; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.timeline time { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.timeline .what { font-weight: 700; }
.timeline .hash { display: block; font-size: 12px; color: var(--ink-soft); font-family: var(--f-mono); overflow-wrap: anywhere; }

/* ---------- ホーム ---------- */
.intro { display: flex; gap: 28px; align-items: center; padding: var(--s4) 0 var(--s6); }
.intro-seal {
  flex: none; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; color: var(--shu);
  border: 5px solid currentColor; box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 7px currentColor;
  font: 28px/1 var(--f-seal); writing-mode: vertical-rl; letter-spacing: .06em; transform: rotate(-10deg);
  animation: press-in .42s .1s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes press-in { from { opacity: 0; transform: rotate(-10deg) scale(1.5); } to { opacity: 1; transform: rotate(-10deg) scale(1); } }
.intro-title { font-size: clamp(23px, 3.4vw, 32px); font-weight: 700; line-height: 1.4; }
.intro-lead { color: var(--ink-soft); margin-top: 10px; max-width: 38em; }
@media (max-width: 760px) { .intro { flex-direction: column; align-items: flex-start; gap: var(--s4); padding-bottom: var(--s5); } .intro-seal { width: 84px; height: 84px; font-size: 21px; border-width: 4px; } }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
@media (max-width: 760px) { .quick { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); } }
.quick-item {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  min-height: 72px; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none;
}
.quick-item:hover { background: var(--surface-2); }
.quick-item .ico { grid-row: 1 / 3; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--surface); }
@media (max-width: 760px) { .quick-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: var(--s3) 0; } }
.quick-title { font-weight: 700; }
.quick-sub { font-size: 13px; color: var(--ink-soft); }
.how { margin-top: 44px; }
.how-list { margin: var(--s3) 0 0; padding-left: 1.4em; display: grid; gap: var(--s4); max-width: 40em; }
.how-list li { padding-left: 4px; }
.how-list li::marker { font-weight: 700; }
.how-list strong { display: block; }
.how-list span { color: var(--ink-soft); font-size: 15px; }
.fine { font-size: 13px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 14px; margin-top: var(--s6); }
.fine a { margin-left: var(--s2); }

/* ---------- AI の評価 ---------- */
.eval { overflow-x: auto; }
.eval-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.eval-table th, .eval-table td { text-align: left; vertical-align: top; padding: var(--s2) 6px; border-bottom: 1px solid var(--line); }
.eval-table td.ok { color: var(--take); font-weight: 700; }
.eval-table td.bad { color: var(--shu); font-weight: 700; }

@media (max-width: 480px) {
  .sheet, .ticket, .ask { padding: 18px var(--s4); }
  .ticket-amount { font-size: 36px; }
  .ticket-meta { grid-template-columns: 1fr 1fr; padding-right: 0; }
  .ticket-meta div:first-child { grid-column: 1 / -1; }
  .stamp { width: 84px; height: 84px; font-size: 18px; top: -44px; }
  .ask-actions { grid-template-columns: 1fr; }
  .status { padding: 14px var(--s4); gap: var(--s3); }
  .status-title { font-size: 19px; }
}
.avatar-self { background: var(--ink); }

/* ---------- うっかりの確かめ（2026-11-04） ---------- */
.demo-start { margin-top: var(--s5); }
.demo-start .btn { margin-top: var(--s4); }
.demo-login { margin-top: var(--s3); }
.demo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  margin: 0 0 20px; padding: 6px 6px 6px 14px; border-radius: var(--r-md); background: var(--kin-wash); color: var(--ink); font-size: 14px; line-height: 1.5;
}
.demo-bar strong { color: var(--kin); margin-right: 6px; }
.demo-bar .btn { min-height: 44px; padding: 0 16px; font-size: 14px; flex: none; border-color: var(--kin-line); }

.examples { margin: 0 0 var(--s5); }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.chip-btn {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 56px;
  padding: var(--s2) 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg);
  font: inherit; font-size: 14px; line-height: 1.4; color: var(--ink); cursor: pointer; text-align: left;
  transition: background-color .2s, border-color .2s, transform .12s;
}
.chip-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.chip-btn:active { transform: scale(.98); }
.chip-btn span { color: var(--ink-soft); font-size: 13px; }
@media (max-width: 480px) {
  .chips { grid-template-columns: 1fr; gap: 6px; }
  .chip-btn { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 48px; }
}

.tx-form { margin: 0; }
.payees { border: 0; margin: 0; padding: 0; min-width: 0; }
.payees legend { padding: 0; margin: 0 0 var(--s2); }
.payee-group { border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; }
.payee-list { display: grid; }
.payee-list .empty { padding: var(--s4); }
label.payee-opt {
  display: flex; align-items: center; gap: var(--s3); margin: 0; font-weight: 400; font-size: 16px;
  min-height: 64px; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; background: var(--bg);
  transition: background-color .2s, box-shadow .2s;
}
.payee-list label.payee-opt:first-child { border-top: 0; }
label.payee-opt:hover { background: var(--surface-2); }
label.payee-opt:has(input:checked) { background: var(--surface); box-shadow: inset 4px 0 0 var(--ink); }
.payee-opt input[type="radio"] { width: 22px; height: 22px; min-height: 0; flex: none; margin: 0; accent-color: var(--ink); }
.payee-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.45; }
.payee-name { font-weight: 700; overflow-wrap: anywhere; }
.payee-sub { font-size: 13px; color: var(--ink-soft); }
.payee-new input[type="text"], .payee-new #payee { margin-top: 6px; }
.form-foot { margin-top: var(--s5); }
.form-foot .btn-block { margin-top: 0; }

.checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: var(--s2); }
.check { padding: var(--s3) 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.check .pill { margin-bottom: 6px; }
.check-title { font-weight: 700; }
.check-sub { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin-top: 2px; }
.check.family { border-color: var(--shu-line); background: var(--shu-wash); }
.check.none { background: var(--take-wash); border-color: transparent; }
.check.none .check-title { color: var(--take); }

.confirm-box { border: 2px solid var(--ink); }
.confirm-box form { margin-top: var(--s3); display: grid; gap: var(--s3); }
.confirm-box form .btn-block { margin-top: 0; }
.result-note { margin-top: var(--s3); font-weight: 700; line-height: 1.7; }
.result-note:empty { display: none; }
.result-note.bad { color: var(--shu); background: var(--shu-wash); padding: 10px var(--s3); border-radius: var(--r-md); animation: rise .24s var(--ease) both; }
.ticket-amount.masked { color: var(--ink-soft); letter-spacing: .1em; }

/* ---------- 手元の端末 ---------- */
.devices { margin-top: var(--s2); }
.dev-ico { background: var(--surface); color: var(--ink); }
.device-row .btn { min-height: 44px; padding: 0 var(--s4); }
.device-row .pill { margin-top: 4px; align-self: flex-start; }
.dev-id { font-family: var(--f-mono); font-size: 12px; }
.device-form { display: grid; grid-template-columns: 1fr auto; gap: var(--s2) 10px; align-items: end; margin-top: var(--s4); }
.device-form label { grid-column: 1 / -1; margin: 0; }
.device-form .error { grid-column: 1 / -1; }
@media (max-width: 480px) { .device-form { grid-template-columns: 1fr; } }
.device-secret { margin-top: var(--s4); border: 2px solid var(--ink); }
.secret { margin: var(--s2) 0 var(--s3); padding: var(--s3) 14px; border-radius: var(--r-md); background: var(--surface); font: 13px/1.6 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.device-note { display: flex; gap: var(--s2); align-items: center; justify-content: center; margin-top: var(--s3); font-size: 14px; color: var(--ink-soft); }

.watch { margin-top: var(--s3); padding: 14px var(--s4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.watch.lost { background: var(--shu-wash); border-color: var(--shu-line); }
.watch.lost .pill { background: var(--bg); }
.watch-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; font-weight: 700; }
.watch-head time { font-size: 13px; font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.watch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); }
.watch-chips .pill { font-size: 13px; padding: 7px 12px; }
.watch-chips .pill.live { color: var(--take); background: var(--take-wash); gap: 6px; }
.watch-chips .pill.live::before { width: 7px; height: 7px; }
.watch .hint { margin-top: 6px; }
#watch-off { margin-top: var(--s2); min-height: 44px; }

/* 端末待ち。絵は押すボタンを示す */
.device-box { display: grid; grid-template-columns: 64px 1fr; gap: 4px 18px; align-content: start; }
.device-art { grid-row: span 2; width: 64px; height: auto; color: var(--ink); }
.device-box > .h-sm { align-self: end; }
.device-steps, .device-box .live { grid-column: 1 / -1; }
.device-art .scr { fill: var(--surface); }
.device-art .txt { animation: blink 1.6s ease-in-out infinite; }
.device-art .ring { fill: none; stroke: var(--kin-line); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ring 2s ease-out infinite; }
.device-art .ring.side { animation-delay: 1s; }
.device-steps { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.device-steps li { display: grid; gap: 2px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2); line-height: 1.5; }
.device-steps .key { font-weight: 700; }
.device-steps .key.ok { color: var(--take); }
.device-steps .key.ng { color: var(--shu); }
.device-steps span { font-size: 14px; color: var(--ink-soft); }
.device-box .live { margin-top: var(--s3); }
.device-box.for-family .device-steps { display: none; }
@media (max-width: 400px) { .device-box { grid-template-columns: 52px 1fr; column-gap: 14px; } .device-art { width: 52px; } }

/* ---------- 動き ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes halo { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45); } }
@keyframes beat { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes ring { 0% { opacity: .9; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .meter.indeterminate > span { width: 100%; opacity: .4; }
}
