/* ÉTOILE — 配色・書体・余白は DESIGN.md を正本とする。 */
:root {
  --ink: #182127; --ink-2: #222d34; --ink-3: #34424b;
  --brass: #ad8c4e; --brass-deep: #86692f; --brass-soft: #f4eddc; --brass-line: #dccba3;
  --paper: #f3f5f5; --surface: #fff; --muted: #58656e; --faint: #8b969d; --rule: #dce2e4; --rule-2: #eceff0;
  --warn: #9a4a12; --warn-bg: #fdf1e3; --warn-line: #ecc594;
  --ok: #2c6a52; --ok-bg: #e8f2ed; --bad: #a2332b;
  --sans: "Yu Gothic Medium", "Yu Gothic", YuGothic, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  --serif: Georgia, "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --r: 4px; --side: 232px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14px/1.75 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
button:disabled { cursor: default; opacity: .38; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brass-deep); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.n { font-family: var(--serif); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .01em; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid transparent; font-weight: 700; font-size: 14px; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color .1s, border-color .1s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.brass { background: var(--brass-deep); color: #fff; }
.btn.brass:hover { background: #765b26; }
.btn.ink { background: var(--ink); color: #fff; }
.btn.line { background: var(--surface); border-color: var(--ink-3); }
.btn.line:hover { background: var(--paper); }
.btn.ghost { border-color: var(--rule); background: var(--surface); color: var(--ink-3); }
.btn.ghost:hover { border-color: var(--faint); }
.btn.danger { color: var(--bad); }
.btn.sq { width: 40px; padding: 0; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn.block { width: 100%; }
.link { color: var(--brass-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* 状態の表示 */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; border: 1px solid var(--rule); background: var(--paper); color: var(--muted); }
.chip .ic { width: 14px; height: 14px; }
.chip.ok { background: var(--surface); }
.chip.soon { background: var(--brass-soft); border-color: var(--brass-line); color: #6d5420; }
.chip.expired, .chip.unpaid { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.chip.off { background: var(--rule-2); color: var(--faint); }
.rank { display: inline-block; padding: 1px 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; border: 1px solid var(--rule); border-radius: 2px; color: var(--muted); white-space: nowrap; }
.rank-1 { background: var(--ink); border-color: var(--ink); color: #e9dcbc; }
.rank-2 { background: var(--brass-soft); border-color: var(--brass); color: #6d5420; }
.rank-3 { background: #eef1f2; border-color: #b9c3c8; color: var(--ink-3); }
.badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--brass); color: var(--ink); font: 700 12px/20px var(--serif); text-align: center; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--brass-soft); color: #6d5420; font-weight: 700; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.empty-t { font-weight: 700; color: var(--ink-3); }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--rule); border-left-width: 4px; border-radius: var(--r); background: var(--surface); }
.notice > div { flex: 1; min-width: 0; }
.notice p { color: var(--muted); font-size: 13px; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); border-left-color: var(--warn); }
.notice.warn > .ic, .notice.warn strong { color: var(--warn); }
.notice.soon { border-left-color: var(--brass); }
.notice.ok { border-left-color: var(--ok); }
.notice.ok > .ic { color: var(--ok); }
.label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin: 16px 0 8px; }
.note, .more, .locked, .hint { font-size: 13px; color: var(--muted); }
.note { margin-top: 12px; }
.more { padding: 8px 12px 0; }
.lead { color: var(--muted); }
.err { color: var(--bad); font-weight: 700; min-height: 0; }
.err:empty { display: none; }

/* ログイン */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; }
.login-brand { background: var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 48px; }
.brand-mark { font: 400 28px/1 var(--serif); letter-spacing: .22em; color: var(--brass); }
.brand-rule { display: block; width: 40px; height: 1px; background: var(--brass); margin: 20px 0; opacity: .7; }
.brand-sub { color: #aeb9bf; letter-spacing: .2em; font-size: 13px; }
.login-brand .brand-mark { font-size: 44px; }
.login-panel { padding: 48px; align-self: center; max-width: 640px; width: 100%; }
.login-panel h1 { font-size: 24px; line-height: 1.4; }
.login-panel .lead { margin: 4px 0 24px; }
.login-group h2 { font-size: 12px; color: var(--muted); letter-spacing: .1em; margin: 20px 0 8px; }
.login-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.login-user { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); transition: border-color .1s; }
.login-user:hover { border-color: var(--brass); }
.login-user > span:nth-child(2) { flex: 1; display: grid; line-height: 1.4; }
.login-user small { color: var(--muted); font-size: 12px; }
.login-user .ic { color: var(--faint); }
.login-enroll { display: inline-flex; align-items: center; gap: 8px; margin-top: 32px; color: var(--brass-deep); font-weight: 700; text-underline-offset: 4px; }

/* 骨組み */
.shell { display: grid; grid-template-columns: var(--side) 1fr; height: 100dvh; }
.side { background: var(--ink); color: #cfd6da; display: flex; flex-direction: column; overflow-y: auto; }
.side-brand { padding: 28px 24px 4px; }
.side .brand-rule { margin: 16px 0 8px; }
.side nav { flex: 1; padding: 0 12px; }
.nav-group { margin-top: 16px; }
.nav-group p { padding: 0 12px 4px; font-size: 11px; letter-spacing: .16em; color: #7f8b92; }
.side nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r); text-decoration: none; font-weight: 700; color: #cfd6da; transition: background-color .1s; }
.side nav a:hover { background: var(--ink-2); }
.side nav a.on { background: var(--brass); color: var(--ink); }
.side nav a.on .badge { background: var(--ink); color: var(--brass); }
.side-foot { padding: 16px; border-top: 1px solid #2c3840; display: grid; gap: 12px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who > span:last-child { display: grid; line-height: 1.4; min-width: 0; }
.who small { color: #8f9aa1; font-size: 12px; }
.side-btn { width: 100%; background: none; border-color: #3a4850; color: #cfd6da; font-weight: 400; }
.side-btn:hover { background: var(--ink-2); }
.work { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 16px; height: 56px; flex: none; padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.top-menu { display: none; }
.top-date { font-weight: 700; }
.top-store select { width: auto; border: 1px solid var(--rule); border-radius: var(--r); height: 36px; min-height: 0; padding: 0 28px 0 12px; background: var(--surface); font-size: 14px; }
.top-user { margin-left: auto; font-weight: 700; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px 0 4px; border: 1px solid var(--rule); border-radius: 99px; background: var(--surface); transition: border-color .1s; }
.top-user:hover { border-color: var(--brass); }
.top-user .avatar { width: 30px; height: 30px; font-size: 13px; }
.top-user .tu-name { display: flex; align-items: baseline; gap: 8px; }
.top-user small { font-weight: 400; color: var(--muted); font-size: 12px; }
.top-user .ic { width: 16px; height: 16px; color: var(--muted); }
.content { flex: 1; overflow-y: auto; padding: 32px 32px 64px; }
.content > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.scrim, .tabbar { display: none; }

/* ページ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 32px; line-height: 1.3; font-weight: 700; padding-left: 16px; border-left: 3px solid var(--brass); }
.page-sub { color: var(--muted); padding-left: 19px; }
.page-sub strong { color: var(--ink); }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: 16px; }
.kpis > div { padding: 16px 24px; border-left: 1px solid var(--rule-2); display: grid; align-content: start; min-width: 0; }
.kpis > div:first-child { border-left: 0; }
.kpis span { font-size: 12px; color: var(--muted); font-weight: 700; }
.kpis b { font-size: 32px; line-height: 1.3; font-weight: 400; white-space: nowrap; }
.kpis b small { font: 400 13px var(--sans); color: var(--muted); margin-left: 4px; }
.kpis em { font-style: normal; font-size: 12px; font-weight: 700; }
.kpis em.up { color: var(--ok); } .kpis em.down { color: var(--bad); }
.kpis.in-panel { grid-template-columns: repeat(3, 1fr); border: 0; border-bottom: 1px solid var(--rule-2); border-radius: 0; margin: 0; }
.spread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 16px; align-items: start; }
.spread.even { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.spread.narrow { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
.spread.narrow.one { grid-template-columns: 1fr; }
.spread.ledger { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
.spread.today { grid-template-areas: "search folio" "lists folio"; grid-template-rows: auto 1fr; }
.spread.today > .search-panel { grid-area: search; } .spread.today > .lists { grid-area: lists; } .spread.today > .folio-col { grid-area: folio; }
.col { display: grid; gap: 16px; min-width: 0; }
.sticky { position: sticky; top: 0; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); min-width: 0; }
.content > .panel { margin-bottom: 16px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule-2); }
.panel-h h2 { font-size: 15px; }
.panel-h > span { color: var(--muted); }
.search { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; border: 1px solid var(--ink-3); border-radius: var(--r); background: var(--surface); color: var(--muted); }
.search:focus-within { outline: 2px solid var(--brass-deep); outline-offset: 1px; }
.search input { flex: 1; min-width: 0; border: 0 !important; outline: 0; background: none !important; font-size: 16px; color: var(--ink); height: 100%; min-height: 0 !important; padding: 0 !important; }
.search-panel { padding: 12px; }
.results { margin-top: 8px; border-top: 1px solid var(--rule-2); }
.results button { display: grid; grid-template-columns: 76px auto 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 4px 8px; border-bottom: 1px solid var(--rule-2); }
.results button:hover { background: var(--brass-soft); }
.results small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-hit { padding: 12px 4px 4px; color: var(--muted); }
.no-hit a { color: var(--brass-deep); font-weight: 700; }
.visit { display: flex; align-items: center; gap: 12px; padding: 0 16px 0 0; border-bottom: 1px solid var(--rule-2); border-left: 3px solid transparent; }
.visit:last-child { border-bottom: 0; }
.visit.sel { background: var(--brass-soft); border-left-color: var(--brass); }
.visit-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 8px 0 8px 13px; }
.visit-main:disabled { opacity: 1; }
.visit .t { font-size: 16px; width: 48px; flex: none; }
.who { min-width: 0; }
.visit .who, .mlist .who, .rows .who { flex: 1; display: grid; line-height: 1.45; min-width: 0; }
.visit .who small, .mlist .who small, .rows .who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit .amt, .rows .amt { font-size: 16px; }
.visits.done .t { color: var(--muted); }

.late { color: var(--warn); }

/* 会員台帳の見開き */
.folio { padding: 24px; border-top: 3px solid var(--brass); }
.folio-empty { border-top-color: var(--rule); min-height: 320px; display: grid; place-items: center; }
.folio-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.folio-no { font: 400 13px var(--serif); letter-spacing: .12em; color: var(--brass-deep); }
.folio-head h2, .apply-h h2 { font-size: 26px; line-height: 1.35; }
.folio-head h2 small, .apply-h h2 small { font-size: 14px; font-weight: 400; }
.kana { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.folio-chips { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--rule); margin-bottom: 16px; }
.facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule-2); }
.facts > div:nth-child(odd) { padding-right: 16px; }
.facts > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule-2); }
.facts dt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.facts dd { font-size: 15px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts dd small { font: 400 12px var(--sans); color: var(--muted); margin-left: 2px; }
.memo label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.memo textarea { width: 100%; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); padding: 8px 12px; resize: vertical; line-height: 1.75; }
.folio-cta { margin-top: 16px; display: grid; gap: 12px; }
.folio-cta.here { padding: 12px 16px; background: var(--brass-soft); border-radius: var(--r); }
.guests { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.count { display: inline-flex; align-items: center; gap: 4px; }
.count em { font-style: normal; margin-right: 4px; }
.count button { width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: var(--r); text-align: center; font-size: 18px; background: var(--surface); color: var(--ink); }
.count b { width: 28px; text-align: center; font-size: 18px; font-weight: 400; color: var(--ink); }
.folio-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; font-size: 13px; color: var(--brass-deep); font-weight: 700; text-underline-offset: 3px; }
.folio-link .ic { width: 16px; height: 16px; }
.back-link { display: none; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; margin-bottom: 12px; min-height: 40px; }
.folio h3, .panel > h3, .panel h3 { font-size: 13px; letter-spacing: .06em; color: var(--muted); margin: 24px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); }
.sub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.kv > div { display: flex; gap: 12px; padding: 4px 0; }
.kv dt { width: 72px; flex: none; color: var(--muted); font-size: 12px; padding-top: 2px; }
.kv dd { overflow-wrap: anywhere; }
.sub-grid .btn { margin-top: 8px; }
.folio-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 104px; padding-top: 8px; }
.bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; height: 100%; }
.bars i { display: block; width: 100%; max-width: 40px; background: var(--ink-3); border-radius: 2px 2px 0 0; }
.bars i.off { background: var(--rule); }
.bars .v { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars .l { font-size: 11px; color: var(--muted); line-height: 1.3; text-align: center; }
.bars.tall { height: 220px; padding: 16px 16px 0; }
.bars.dense { gap: 3px; }
.panel > .note { padding: 0 16px 12px; }

/* 表 */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: #fafbfb; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl tfoot td { border-top: 1px solid var(--ink-3); font-weight: 700; }
.tbl tr.dim td { color: var(--faint); }
.tbl a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--brass-line); }
.tbl.perm td:not(:first-child), .tbl.perm th:not(:first-child) { text-align: center; width: 96px; }
.tbl.perm td:first-child { white-space: normal; }
.yes { color: var(--ok); display: inline-flex; } .no { color: var(--faint); }
.meter { display: block; width: 96px; height: 6px; background: var(--rule-2); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brass); }
.prev { color: var(--muted); font-size: 13px; }

/* 会員一覧 */
.list-pane { padding: 12px; position: sticky; top: 0; max-height: calc(100dvh - 56px - 64px - 96px); display: flex; flex-direction: column; }
.filters { display: flex; gap: 4px; margin: 12px 0 8px; flex-wrap: wrap; }
.filters button { display: inline-flex; gap: 6px; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 99px; font-size: 13px; color: var(--muted); }
.filters button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters .n { font-size: 12px; opacity: .8; }
.mlist { overflow-y: auto; border-top: 1px solid var(--rule-2); margin: 0 -12px -12px; }
.mlist button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 12px 6px 9px; border-bottom: 1px solid var(--rule-2); border-left: 3px solid transparent; }
.mlist button:hover { background: var(--paper); }
.mlist button.sel { background: var(--brass-soft); border-left-color: var(--brass); }
.mlist .n { width: 64px; flex: none; font-size: 13px; color: var(--muted); }

/* フォームとダイアログ */
label { display: block; }
input:not([type=radio]):not([type=checkbox]):not([type=file]), select, textarea { border: 1px solid #b9c3c8; border-radius: var(--r); background: var(--surface); min-height: 44px; padding: 0 12px; width: 100%; font-size: 16px; }
textarea { padding: 8px 12px; }
.form, .dlg, .enroll-form { display: grid; gap: 16px; }
.form label, .dlg label, .enroll-form label, .enroll-form legend { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.form label > input, .form label > select, .form label > .yen-in, .dlg label > input, .dlg label > select, .dlg label > .yen-in, .enroll-form label > input { margin-top: 4px; font-weight: 400; }
.form { padding: 24px; align-content: start; }
.form .label, .dlg .label { margin: 0 0 -8px; }
.form-h { font-size: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.form-h:not(:first-child) { margin-top: 12px; }
.form-bar { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.yen-in { position: relative; display: block; }
.yen-in i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font: normal 15px var(--serif); color: var(--muted); pointer-events: none; }
.yen-in input { padding-left: 28px !important; font-family: var(--serif); text-align: right; }
.inline { display: flex !important; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 400 !important; font-size: 14px !important; }
.inline .yen-in { width: 160px; }
.inline input.short { width: 76px !important; text-align: right; font-family: var(--serif); }
.inline .rank { width: 96px; text-align: center; }
.fixed { color: var(--muted); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.check { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 400 !important; font-size: 14px !important; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; margin: 2px 0 0; accent-color: var(--brass-deep); }
.choice { display: grid; gap: 8px; }
.choice label { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer; font-weight: 400; }
.choice label:has(:checked) { border-color: var(--brass); background: var(--brass-soft); }
.choice input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brass-deep); flex: none; }
.choice span { display: grid; } .choice small { color: var(--muted); font-size: 13px; font-weight: 400; }
.menu-edit { display: grid; gap: 8px; }
.menu-edit li { display: grid; grid-template-columns: 1fr 132px 40px; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--ink-3); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg > button, .seg > label > span { display: grid; place-items: center; min-height: 42px; padding: 0 20px; font-weight: 700; font-size: 14px; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.seg > * + * { border-left: 1px solid var(--ink-3); }
.seg > label { flex: 1; position: relative; }
.seg > label input { position: absolute; opacity: 0; inset: 0; }
.seg > button.on, .seg > label input:checked + span { background: var(--ink); color: #fff; }
.seg > label input:focus-visible + span { outline: 2px solid var(--brass-deep); outline-offset: -3px; }
.form .seg, .dlg .seg, .enroll-form .seg { display: flex; }
.seg.tabs > button { min-height: 38px; }
.seg.wrap { flex-wrap: wrap; border: 0; gap: 8px; overflow: visible; }
.seg.wrap > label { flex: 1 1 40%; border: 1px solid var(--ink-3); border-radius: var(--r); overflow: hidden; }
dialog { background: var(--surface); border: 0; border-radius: 6px; padding: 0; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: 0 24px 64px rgba(24, 33, 39, .28); color: var(--ink); }
dialog.wide { width: min(820px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(24, 33, 39, .55); }
dialog[open] { animation: rise .14s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.dlg { padding: 24px; }
.dlg h2 { font-size: 20px; line-height: 1.4; }
.dlg h2 + .lead { margin-top: -12px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.checkout header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.amount-box { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border: 1px solid var(--ink-3); border-radius: var(--r); background: var(--paper); margin-bottom: 12px; }
.amount-box span { font-size: 12px; font-weight: 700; color: var(--muted); }
.amount-box output { font-size: 36px; line-height: 1.2; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { height: 60px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); text-align: center; font: 400 24px var(--serif); transition: background-color .1s; }
.keypad button:active { background: var(--brass-soft); }
.checkout .label:first-child { margin-top: 0; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick button { display: grid; padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--r); line-height: 1.4; font-size: 13px; font-weight: 700; }
.quick button:active { background: var(--brass-soft); }
.quick small { font-weight: 400; color: var(--muted); font-size: 13px; }
.quick .clear { grid-column: 1 / -1; text-align: center; color: var(--muted); font-weight: 400; border-style: dashed; }
.bill { margin: 16px 0; border-top: 1px solid var(--rule); }
.bill > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule-2); }
.bill dt small { color: var(--muted); margin-left: 8px; font-family: var(--serif); }
.bill dd { font-size: 16px; }
.bill dd input { width: 132px !important; text-align: right; min-height: 36px !important; }
.bill .sum { border-bottom: 0; border-top: 1px solid var(--ink-3); }
.bill .sum dt { font-weight: 700; } .bill .sum dd { font-size: 26px; }
.bill.flat { margin: 0 16px 8px; border-top: 0; }
.idimg { border: 1px solid var(--rule); border-radius: var(--r); width: 100%; }
#toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px); padding: 12px 20px; border-radius: var(--r); background: var(--ink); color: #fff; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .14s, transform .14s; z-index: 100; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(24, 33, 39, .3); border-left: 4px solid var(--brass); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { border-left-color: #e2776d; }

/* 経費・勤怠 */
.rows li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto 40px; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--rule-2); }
.rows li:last-child { border-bottom: 0; }
.rows .d { font-size: 13px; color: var(--muted); }
.punch { padding: 32px 24px; text-align: center; display: grid; gap: 12px; border-top: 3px solid var(--rule); }
.punch.in { border-top-color: var(--brass); }
.punch-state { font-weight: 700; color: var(--muted); }
.punch.in .punch-state { color: var(--brass-deep); }
.punch-clock { font-size: 64px; line-height: 1.1; }
.punch-break { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 700; }
.punch-break select { width: 120px !important; }
.spread.narrow .col > .panel > .note { padding: 0 16px 12px; }

/* レポート・月締め・収支 */
.range { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stepper-nav { display: inline-flex; align-items: center; gap: 12px; }
.stepper-nav strong { min-width: 112px; text-align: center; font-size: 16px; }
.spread.even .panel > .label { margin: 16px 16px 8px; }
.split { display: flex; height: 16px; margin: 0 16px; border-radius: 2px; overflow: hidden; background: var(--rule-2); }
.split .m, .legend .m { background: var(--ink-3); } .split .f, .legend .f { background: var(--brass); }
.legend { display: flex; gap: 24px; padding: 8px 16px 0; flex-wrap: wrap; }
.legend > div { display: flex; gap: 8px; align-items: baseline; }
.legend dt { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legend dt i { width: 10px; height: 10px; border-radius: 2px; }
.legend .inc { background: var(--ink-3); } .legend .cost { background: var(--brass-line); }
.legend.row { padding-bottom: 16px; }
.rank-dist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.rank-dist > div { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; display: grid; justify-items: start; gap: 2px; }
.rank-dist b { font-size: 28px; font-weight: 400; line-height: 1.3; margin-top: 4px; }
.rank-dist b small { font: 400 13px var(--sans); color: var(--muted); margin-left: 2px; }
.rank-dist > div > small { color: var(--muted); font-size: 12px; }
.content > .note { margin-top: 0; }
.pl-head { display: flex; align-items: center; gap: 24px; background: var(--ink); color: #fff; border-radius: var(--r); padding: 24px 32px; margin-bottom: 16px; flex-wrap: wrap; }
.pl-head > div { display: grid; }
.pl-head span { font-size: 12px; color: #aeb9bf; font-weight: 700; letter-spacing: .08em; }
.pl-head b { font-size: 36px; line-height: 1.25; font-weight: 400; }
.pl-head > i { font-style: normal; font-size: 22px; color: #6f7c84; }
.pl-head .res { margin-left: auto; text-align: right; }
.pl-head .res b { color: #e3cf9c; font-size: 44px; }
.pl-head .res.neg b { color: #f0a59d; }
.pl-head small { color: #aeb9bf; }
.spread.even .panel > h3 { margin: 16px 16px 8px; }
.trend { display: flex; align-items: flex-end; gap: 12px; padding: 8px 16px 0; height: 172px; }
.trend > div { flex: 1; display: grid; justify-items: center; align-content: end; gap: 2px; height: 100%; }
.trend .pair { display: flex; align-items: flex-end; gap: 3px; }
.trend .pair i { display: block; width: 16px; border-radius: 2px 2px 0 0; }
.trend .inc { background: var(--ink-3); } .trend .cost { background: var(--brass-line); }
.trend .l { font-size: 11px; color: var(--muted); }
.trend .p { font-size: 13px; } .trend .p.neg { color: var(--bad); }
.pay-import { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--rule-2); font-size: 13px; color: var(--muted); }
.cat { border-bottom: 1px solid var(--rule-2); padding: 8px 16px; }
.cat-h { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; }
.cat-h .n { font-size: 16px; }
.cat ul { margin: 4px 0 4px; padding-left: 12px; border-left: 2px solid var(--rule); }
.cat ul li { display: grid; grid-template-columns: 1fr auto 40px; gap: 12px; align-items: center; padding: 3px 0; font-size: 13px; color: var(--ink-3); }
.cat ul small { color: var(--muted); margin-left: 8px; font-size: 12px; }

/* 分析 */
.kpis.six { grid-template-columns: repeat(6, 1fr); }
.kpis.six > div { padding: 14px 16px; }
.kpis.six b { font-size: 24px; }
.kpis.six b small { font-size: 12px; }
.kpis em { font-style: normal; font-size: 12px; color: var(--muted); }
.insights { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--brass); border-radius: var(--r); padding: 16px 20px; margin-bottom: 16px; }
.insights h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .08em; color: var(--brass-deep); margin-bottom: 8px; }
.insights h2 .ic { width: 16px; height: 16px; }
.insights ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; }
.insights li { padding: 8px 0; border-top: 1px solid var(--rule-2); }
.insights li strong { font-size: 13px; }
.insights li p { font-size: 14px; color: var(--ink-3); }
.insights li b { font-family: var(--serif); font-size: 16px; color: var(--ink); font-weight: 400; background: linear-gradient(transparent 62%, var(--brass-soft) 62%); }
.insights a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--brass); }
.axis-bar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #fafbfb; border-bottom: 1px solid var(--rule-2); }
.axis-bar label { display: grid; gap: 2px; }
.axis-bar label span { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.axis-bar select { width: auto !important; min-width: 168px; min-height: 40px !important; font-size: 14px !important; font-weight: 700; border-color: var(--ink-3) !important; }
.axis-bar select:disabled { opacity: 1; background: var(--paper); color: var(--muted); border-color: var(--rule) !important; }
.axis-bar > i { font: normal 18px var(--serif); color: var(--brass-deep); padding-bottom: 8px; }
.axis-bar label:last-child { margin-left: auto; }
.abar .w { width: 34%; min-width: 120px; }
.hbar { display: block; height: 14px; background: var(--rule-2); border-radius: 2px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--ink-3); border-radius: 2px; }
.heat td, .heat th { border-right: 1px solid #fff; }
.heat td.z { color: var(--faint); }
.heat td.t { font-weight: 700; background: #fafbfb; }
.heat td.up { color: var(--bad); } .heat td.dn { color: var(--ok); }
.heat .neg { color: var(--bad); }
.heat tfoot tr:not(:first-child) td { border-top: 1px solid var(--rule-2); font-weight: 400; }
.heat tfoot td:first-child { font-weight: 700; }
.panel > .tbl-wrap + .note { padding: 0 16px 12px; }
.meter { display: inline-block; vertical-align: middle; }
.login-users.one { grid-template-columns: 1fr; }
.login-user.cur { border-color: var(--brass); background: var(--brass-soft); }
.dlg .login-group h2 { font-size: 12px; margin: 4px 0 6px; }
.switch-links { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--rule); }
.switch-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--brass-deep); font-weight: 700; font-size: 13px; text-underline-offset: 3px; }
.switch-links .ic { width: 16px; height: 16px; }
@media (max-width: 1280px) { .kpis.six { grid-template-columns: repeat(3, 1fr); } .kpis.six > div:nth-child(4) { border-left: 0; } .kpis.six > div:nth-child(n+4) { border-top: 1px solid var(--rule-2); } }

.filters.big { margin: 0 0 16px; gap: 8px; }
.filters.big button { min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 700; background: var(--surface); }
.out-lead { padding: 12px 16px; color: var(--muted); border-bottom: 1px solid var(--rule-2); }
.ledger-check { font-size: 14px; }
.ledger-check .bad { color: var(--bad); font-weight: 700; }
.ledger-check ul { margin-top: 4px; padding-left: 1.2em; list-style: disc; color: var(--muted); font-size: 13px; }
.dlg textarea { width: 100%; margin-top: 4px; font: 13px/1.7 Consolas, "SFMono-Regular", monospace; font-weight: 400; white-space: pre; }
.folio-chips .chip { max-width: 100%; }

.led-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.led-pick label { cursor: pointer; }
.led-review { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.led-review figure { display: grid; gap: 4px; justify-items: start; position: sticky; top: 0; }
.led-review img { border: 1px solid var(--rule); border-radius: var(--r); width: 100%; }
.led-grid { border-collapse: collapse; width: 100%; margin-bottom: 4px; }
.led-grid th { font-size: 11px; color: var(--muted); text-align: left; padding: 2px 4px; white-space: nowrap; }
.led-grid td { padding: 2px; }
.led-grid input { min-height: 36px !important; padding: 0 6px !important; font-size: 13px !important; min-width: 84px; }
.led-grid td.doubt input { background: var(--warn-bg); border-color: var(--warn) !important; }
dialog.wide:has(.led-review) { width: min(1080px, calc(100vw - 32px)); }
@media (max-width: 860px) { .led-review { grid-template-columns: 1fr; } .led-review figure { position: static; } }

/* その場で入力する経費 */
.xbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #fafbfb; border-bottom: 1px solid var(--rule-2); }
.xprog { display: grid; gap: 4px; min-width: 200px; font-size: 13px; color: var(--muted); }
.xprog b { font-size: 18px; font-weight: 400; color: var(--ink); }
.xprog i { display: block; height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.xprog u { display: block; height: 100%; background: var(--brass); transition: width .14s; }
.xbar-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.xcat { padding: 10px 16px 8px; border-bottom: 1px solid var(--rule-2); border-left: 3px solid transparent; }
.xcat.has { border-left-color: var(--brass-line); }
.xcat:focus-within { background: #fdfbf6; border-left-color: var(--brass); }
.xcat-h { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.xcat-h strong { flex: none; }
.xsum { margin-left: auto; font-size: 16px; }
.xcopy { font-size: 12px; font-weight: 700; color: var(--brass-deep); padding: 2px 10px; border: 1px dashed var(--brass); border-radius: 99px; white-space: nowrap; }
.xcopy:hover { background: var(--brass-soft); border-style: solid; }
.xrow { display: grid; grid-template-columns: minmax(0, 1fr) 184px 36px; gap: 6px; align-items: center; margin-top: 4px; }
.xrow small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.xrow input { min-height: 38px !important; font-size: 14px !important; border-color: transparent !important; background: transparent !important; }
.xrow input:hover { border-color: var(--rule) !important; }
.xrow input:focus { border-color: var(--ink-3) !important; background: var(--surface) !important; outline: 0; }
.xrow.new input { border-color: var(--rule) !important; background: var(--surface) !important; border-style: dashed !important; }
.xrow.new input:focus { border-style: solid !important; border-color: var(--brass-deep) !important; }
.xrow .yen-in input { font-size: 16px !important; }
.xdel, .xadd { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); color: var(--faint); }
.xdel:hover { color: var(--bad); background: var(--warn-bg); }
.xadd { color: var(--brass-deep); opacity: 0; }
.xrow.new:focus-within .xadd { opacity: 1; }
.xdel .ic, .xadd .ic { width: 16px; height: 16px; }
.xcats + .note { padding: 8px 16px 12px; margin: 0; }
/* よく使う内容 */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -8px; }
.chips button { font-size: 13px; padding: 4px 12px; border: 1px solid var(--rule); border-radius: 99px; color: var(--ink-3); background: var(--surface); }
.chips button:hover { border-color: var(--brass); background: var(--brass-soft); }
/* 勤務中の人 */
.duty { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--rule-2); font-size: 13px; }
.duty > span { color: var(--muted); font-weight: 700; margin-right: 4px; }
.duty b { display: inline-flex; gap: 6px; align-items: baseline; padding: 2px 10px; border-radius: 99px; background: var(--brass-soft); color: #6d5420; }
.duty small { font-weight: 400; }
/* 給与の内訳 */
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fafbfb; }
.tbl tr.click td:first-child { display: flex; align-items: center; gap: 4px; }
.tbl tr.click .ic { width: 14px; height: 14px; color: var(--faint); transition: transform .1s; }
.tbl tr.click.open .ic { transform: rotate(90deg); color: var(--brass-deep); }
.tbl tr.detail td { background: #fafbfb; padding: 8px 16px 12px; white-space: normal; }
.sbars { display: grid; gap: 4px; }
.sbar, .sbar-axis { display: grid; grid-template-columns: 92px minmax(120px, 1fr) 230px; gap: 12px; align-items: center; font-size: 13px; }
.sbar-track { position: relative; height: 14px; background: var(--rule-2); border-radius: 2px; }
.sbar-axis .sbar-track { height: 16px; background: none; }
.sbar-axis i { position: absolute; top: 0; transform: translateX(-50%); font: normal 11px var(--serif); color: var(--muted); }
.sbar-track em { position: absolute; top: 0; bottom: 0; background: var(--brass-soft); border-left: 1px dashed var(--brass); border-right: 1px dashed var(--brass); }
.sbar-track b { position: absolute; top: 2px; bottom: 2px; background: var(--ink-3); border-radius: 2px; }
.sbar small { color: var(--muted); }
/* 締める前の確認 */
.checklist { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 20px; margin-bottom: 16px; }
.checklist h2 { font-size: 13px; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.checklist ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 32px; }
.checklist li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rule-2); }
.checklist li .ic { margin-top: 3px; }
.checklist li.ok .ic { color: var(--ok); } .checklist li.ng .ic, .checklist li.ng strong { color: var(--warn); }
.checklist li p { font-size: 13px; color: var(--muted); }
.checklist a { color: var(--brass-deep); font-weight: 700; }
.move { font-size: 12px; font-weight: 700; white-space: nowrap; }
.move.up { color: var(--ok); } .move.down { color: var(--bad); } .move.same, .move.new { color: var(--faint); font-weight: 400; }
/* 身分証のカメラ */
#cam { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; }
#cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-mask { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
.cam-frame { position: relative; width: min(86vw, 640px, calc((100dvh - 300px) * 1.585)); aspect-ratio: 85.6 / 54; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(10, 14, 17, .68); }
.cam-frame i { position: absolute; width: 34px; height: 34px; border: 3px solid #e3cf9c; }
.cam-frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.cam-frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.cam-frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.cam-frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.cam-guide { position: absolute; top: max(24px, env(safe-area-inset-top)); left: 0; right: 0; text-align: center; display: grid; gap: 4px; padding: 0 56px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.cam-guide strong { font-size: 17px; } .cam-guide span { font-size: 13px; opacity: .85; }
.cam-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .35); border-radius: 50%; }
.cam-shot { position: absolute; bottom: max(32px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: 76px; height: 76px; border-radius: 50%; border: 3px solid #fff; display: grid; place-items: center; }
.cam-shot b { width: 60px; height: 60px; border-radius: 50%; background: #fff; transition: transform .1s; }
.cam-shot:active b { transform: scale(.9); }
.shoot-check { display: flex; gap: 8px 20px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: var(--muted); }
.shoot-check li::before { content: "□ "; color: var(--brass-deep); }
.shoot-alt { text-align: center; font-size: 13px !important; font-weight: 400 !important; color: var(--muted) !important; cursor: pointer; }
.shoot-alt span { color: var(--brass-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
@media (max-width: 860px) {
  .xrow { grid-template-columns: minmax(0, 1fr) 128px 36px; }
  .sbar, .sbar-axis { grid-template-columns: 64px minmax(80px, 1fr); } .sbar > span:last-child, .sbar-axis > span:last-child { grid-column: 1 / -1; }
  .xadd { opacity: 1; }
}

/* 印刷 */
@media print {
  body { background: #fff; }
  .side, .top, .tabbar, .scrim, .page-actions, .stepper-nav .btn, .axis-bar, #toast, .pay-import, .cat-h .btn, .cats .link { display: none !important; }
  .shell { display: block; height: auto; }
  .work, .content { display: block; overflow: visible; padding: 0; }
  .panel, .kpis, .insights, .pl-head { break-inside: avoid; }
  .pl-head { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
  .pl-head .res b { color: var(--ink); }
  .tbl-wrap { overflow: visible; }
}

/* 入会確認 */
.apply { padding: 24px; border-top: 3px solid var(--brass); margin-bottom: 16px; }
.apply-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.apply .facts { grid-template-columns: repeat(3, 1fr); }
.apply .facts > div { padding: 8px 16px 8px 0 !important; border-left: 0 !important; flex-direction: column; gap: 0; }
.apply .facts dd { text-align: left; }
.apply-sign { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-end; }
.apply-sign .label { margin-top: 0; }
.apply-sign img { height: 64px; border-bottom: 1px solid var(--ink-3); }
.apply-foot { display: grid; gap: 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule); }
.apply-foot > div { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* お客様の入会手続き */
body[data-mode=member] { background: #faf8f3; }
.enroll { min-height: 100dvh; }
.enroll-top { text-align: center; padding: 32px 16px 0; }
.enroll-top .brand-mark { color: var(--brass-deep); font-size: 24px; }
.enroll-top .brand-rule { margin: 16px auto 0; width: 56px; }
.enroll-main { max-width: 720px; margin: 0 auto; padding: 32px 24px 64px; }
.steps { display: flex; justify-content: center; margin-bottom: 40px; }
.steps li { display: grid; justify-items: center; gap: 4px; width: 132px; position: relative; font-size: 13px; color: var(--faint); }
.steps li + li::before { content: ""; position: absolute; top: 16px; right: calc(50% + 24px); width: calc(100% - 48px); height: 1px; background: var(--brass-line); }
.steps b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--brass-line); font-weight: 400; font-size: 15px; background: #fff; color: var(--muted); }
.steps b .ic { width: 16px; height: 16px; }
.steps .on { color: var(--ink); font-weight: 700; }
.steps .on b { background: var(--brass-deep); border-color: var(--brass-deep); color: #fff; }
.steps .done b { border-color: var(--brass-deep); color: var(--brass-deep); }
.enroll-form { gap: 20px; }
.enroll-form h1, .enroll-done h1 { font-size: 28px; line-height: 1.4; padding-left: 16px; border-left: 3px solid var(--brass); }
.enroll-form h1 + .lead { margin-top: -12px; font-size: 15px; }
.enroll-form label, .enroll-form legend { font-size: 14px; }
.enroll-form legend { margin-bottom: 4px; }
.enroll-form input:not([type=radio]):not([type=checkbox]):not([type=file]) { min-height: 52px; }
.enroll-form .seg > label > span { min-height: 50px; }
.req { font-style: normal; font-size: 11px; color: #6d5420; background: var(--brass-soft); padding: 1px 6px; border-radius: 2px; margin-left: 6px; }
.terms { height: 320px; overflow-y: auto; border: 1px solid var(--brass-line); border-radius: var(--r); background: #fff; padding: 24px; font-size: 15px; line-height: 1.9; }
.terms h2 { font-size: 17px; margin-bottom: 8px; }
.terms h2:not(:first-child) { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.terms h3 { font-size: 14px; margin-top: 16px; }
.terms-end { text-align: right; margin-top: 24px; color: var(--muted); }
.hint:empty { display: none; }
.check.big { padding: 12px 16px; border: 1px solid var(--rule); border-radius: var(--r); background: #fff; font-size: 15px !important; align-items: center; }
.check.big:has(:disabled) { opacity: .5; cursor: default; }
.check.big:has(:checked) { border-color: var(--brass); }
.check.big input { margin: 0; width: 24px; height: 24px; }
.sign-h { display: flex; justify-content: space-between; align-items: center; }
.sign-h .label { margin: 0; }
.sign canvas { width: 100%; height: auto; aspect-ratio: 900 / 240; border: 1px solid var(--brass-line); border-bottom: 2px solid var(--ink-3); border-radius: var(--r); background: #fff; touch-action: none; cursor: crosshair; }
.shoot { aspect-ratio: 86 / 54; max-width: 480px; width: 100%; margin: 0 auto; border: 1px dashed var(--brass); border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.shoot.has { border-style: solid; }
.shoot img { width: 100%; height: 100%; object-fit: cover; }
.shoot-guide { text-align: center; color: var(--faint); }
.shoot-guide .ic { width: 56px; height: 56px; stroke-width: 1; margin: 0 auto 4px; }
.shoot-btn { max-width: 480px; margin: 0 auto; cursor: pointer; font-size: 16px !important; font-weight: 700 !important; }
.cautions { display: grid; gap: 4px; font-size: 13px; color: var(--muted); padding-left: 16px; list-style: disc; }
.enroll-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.enroll-done { text-align: center; display: grid; justify-items: center; gap: 20px; padding-top: 48px; }
.enroll-done h1 { border: 0; padding: 0; }
.done-mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--brass); color: var(--brass-deep); }
.done-mark .ic { width: 32px; height: 32px; }
.enroll-done .btn { margin-top: 24px; }

/* タブレット縦・スマートフォン */
@media (max-width: 1100px) {
  .spread, .spread.ledger, .spread.narrow, .spread.even { grid-template-columns: minmax(0, 1fr); }
  .spread.today { grid-template-areas: "search" "folio" "lists"; grid-template-rows: auto; }
  .spread.today .folio-empty { display: none; }
  .sticky, .list-pane { position: static; max-height: none; }
  .mlist { max-height: 420px; }
  .spread.ledger.has-sel .list-pane { display: none; }
  .back-link { display: inline-flex; }
  .kpis b { font-size: 26px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(280px, 84vw); z-index: 30; transform: translateX(-100%); transition: transform .14s ease-out; }
  .nav-open .side { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(24, 33, 39, .5); z-index: 20; }
  .top { padding: 0 16px; gap: 12px; }
  .top-menu { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -8px; }
  .top-date { font-size: 12px; white-space: nowrap; }
  .top-user { margin-left: 0; padding: 0 8px 0 4px; }
  .top-user .tu-name { display: none; }
  .top-store { margin-left: auto; min-width: 0; }
  .top-store select { max-width: 132px; }
  .content { padding: 20px 16px 96px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; background: var(--surface); border-top: 1px solid var(--rule); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; font-size: 10px; font-weight: 700; color: var(--muted); text-decoration: none; text-align: center; white-space: nowrap; }
  .tabbar a.on { color: var(--brass-deep); }
  .page-head h1 { font-size: 24px; }
  .kpis, .kpis.six { grid-template-columns: repeat(2, 1fr); }
  .kpis.six > div:nth-child(4) { border-left: 1px solid var(--rule-2); }
  .axis-bar > i { display: none; } .axis-bar label { flex: 1 1 100%; } .axis-bar select { width: 100% !important; } .axis-bar label:last-child { margin-left: 0; }
  .kpis > div { padding: 12px 16px; }
  .kpis > div:nth-child(odd) { border-left: 0; }
  .kpis > div:nth-child(n+3) { border-top: 1px solid var(--rule-2); }
  .kpis.in-panel { grid-template-columns: repeat(3, 1fr); }
  .kpis.in-panel > div { border-top: 0 !important; padding: 12px 8px 12px 16px; }
  .kpis.in-panel b { font-size: 20px; }
  .kpis b { font-size: 22px; }
  .rank-dist { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pl-head { padding: 16px; gap: 12px 16px; }
  .pl-head b { font-size: 24px; } .pl-head .res b { font-size: 32px; }
  .pl-head .res { margin-left: 0; text-align: left; width: 100%; padding-top: 12px; border-top: 1px solid #34424b; }
  .pl-head > i:last-of-type { display: none; }
  .checkout-grid { grid-template-columns: 1fr; gap: 16px; }
  .keypad button { height: 52px; }
  .folio, .apply { padding: 16px; }
  .sub-grid, .row2 { grid-template-columns: 1fr; }
  .folio .facts { grid-template-columns: 1fr; }
  .folio .facts > div { padding: 8px 0 !important; border-left: 0 !important; }
  .guests > span:first-child { width: 100%; }
  .apply .facts { grid-template-columns: repeat(2, 1fr); }
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { padding: 32px 24px; } .login-brand .brand-mark { font-size: 32px; }
  .login-panel { padding: 24px; align-self: start; }
  .results button { grid-template-columns: 70px 1fr auto; } .results small { display: none; }
  .rows li { grid-template-columns: 64px minmax(0, 1fr) auto 36px; gap: 8px; padding: 10px 12px; }
  .visit { padding-right: 12px; gap: 8px; } .visit-main { gap: 10px; }
  .visit .chip.ok, .visit .chip.soon { display: none; }
  .visit .who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .visit .who small { white-space: normal; }
  .steps li { width: 104px; }
  .enroll-main { padding: 24px 16px 48px; }
  .enroll-form h1 { font-size: 22px; }
  .terms { padding: 16px; }
  .notice { flex-wrap: wrap; } .notice .btn { width: 100%; }
  .menu-edit li { grid-template-columns: 1fr 112px 40px; }
  #toast { bottom: 80px; width: max-content; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
