/* てつづきLINE（仮）だけの見た目。値は tokens.css の変数を使う（UI.md 8章） */
.appbar { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--surface); border-bottom: 1px solid var(--border); }
.appbar-name { font-weight: 700; }
.page { padding-bottom: calc(var(--sp-10) + 72px); }
.skeleton-block { min-height: 160px; }
.stack { display: grid; gap: var(--sp-4); }
.section-title { font-size: var(--text-lg); font-weight: 700; margin: 0 0 var(--sp-2); }
.lead { margin: 0; }
.toast[data-kind="error"] { background: var(--danger); }
a.btn { text-decoration: none; }
.btn-secondary { background: var(--surface); }

/* 手続きのメニュー：大きなボタン */
.menu { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.menu-item { display: grid; gap: 2px; padding: var(--sp-4); min-height: 64px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); color: var(--text); text-decoration: none; }
.menu-item-title { font-weight: 700; font-size: var(--text-lg); }

/* 要対応（差し戻し） */
.alert { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-card); border: 1px solid var(--warn); background: var(--warn-bg); color: var(--text); }
.alert-title { font-weight: 700; margin: 0 0 var(--sp-1); }
.alert-danger { border-color: var(--danger); background: var(--danger-bg); }
.notice { margin-top: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-left: 4px solid var(--info); background: var(--info-bg); font-size: var(--text-sm); }

/* 入力 */
.fieldset { border: 0; margin: 0 0 var(--sp-4); padding: 0; min-width: 0; }
.fieldset legend { font-weight: 600; font-size: var(--text-sm); margin-bottom: var(--sp-1); padding: 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.choice { position: relative; display: flex; align-items: center; justify-content: center; min-height: var(--tap); border: 1px solid var(--gray-300); border-radius: var(--radius-control); background: var(--surface); font-weight: 600; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.input-short { max-width: 12em; }
.input-mid { max-width: 18em; }
.row-card { border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--sp-4); margin-bottom: var(--sp-3); background: var(--gray-50); }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); font-weight: 700; }
.stepper { display: flex; gap: var(--sp-1); margin-bottom: var(--sp-3); }
.stepper span { flex: 1; height: 6px; border-radius: 3px; background: var(--gray-200); }
.stepper span[data-done="true"] { background: var(--primary); }
.step-label { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--sp-1); }
.fixed-value { padding: var(--sp-2) 0; }
.files { display: grid; gap: var(--sp-2); margin: var(--sp-2) 0; padding: 0; list-style: none; }
.file-item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); font-size: var(--text-sm); overflow-wrap: anywhere; }
.file-buttons { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.file-buttons label.btn { position: relative; overflow: hidden; }
.file-buttons input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; }
.action-bar .btn { flex: 1; }
.has-action-bar .tabbar { display: none; }

/* 確認・詳細 */
.dl dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.subhead { font-weight: 700; margin: var(--sp-3) 0 var(--sp-2); }
.done-number { font-size: 28px; font-weight: 700; letter-spacing: .02em; }
.history { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--sp-2); }
.history li { display: grid; gap: 2px; padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
.history li:last-child { border-bottom: 0; }

/* 診断パネル */
.diag { font-family: var(--font-mono); font-size: var(--text-sm); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.footer-links { text-align: center; margin-top: var(--sp-6); }

/* WebKit（iPhone）は select の min-height を効かせない（実測 23px）。見た目を自前にして 44px にする */
.select { -webkit-appearance: none; appearance: none; height: var(--tap); padding-right: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2352525b' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
/* 下に固定した操作と通知が重ならないように */
.has-action-bar .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
/* hidden 属性を display の指定より優先する（起動前・未連携の画面で下タブを出さない。Android 実機で確認） */
[hidden] { display: none !important; }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
