
:root {
  --paper: #F5F3EE; --sheet: #FFFDFA; --ink: #2C3537; --muted: #6F7B7D; --rule: #E0DCD3;
  --brand: #4E7A80; --brand-deep: #305A60; --brand-wash: #E2EDEE; --brand-rule: #C6D9DB; --accent: #A85B1F; --hair: #ECE8DF;
  --top-bg: var(--brand-wash); --top-ink: #25464B; --hero-bg: var(--brand-wash); --hero-ink: #223D42; --hero-box: var(--sheet); --hero-rule: var(--brand-rule); --ink2: #3D484A; --urgent: #C2362B; --soon: #C58A3A; --ok: #4E7A5F;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.topbar { background: var(--top-bg); color: var(--top-ink); border-bottom: 1px solid var(--hero-rule); }
.topbar .in { max-width: 860px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.topbar h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.topbar .who { font-size: 13px; opacity: .85; white-space: nowrap; }
main { max-width: 860px; margin: 0 auto; padding: 16px 14px 48px; display: grid; gap: 16px; }

.members { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.members::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--sheet); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.chip small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.chip[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip[aria-pressed=true] small { color: rgba(255,255,255,.8); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 4px; gap: 4px; }
.tab { min-height: 42px; border: 0; border-radius: 7px; background: none; font-weight: 800; font-size: 15px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab[aria-selected=true] { background: var(--brand); color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.tile .label { font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.tile .val { font-size: 24px; font-weight: 900; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .val small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.tile .sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tile.soon .val { color: var(--soon); }
.tile.urgent .val { color: var(--urgent); }

h2.sec { margin: 4px 0 -6px; font-size: 16px; font-weight: 800; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
h2.sec small { font-size: 13px; color: var(--muted); font-weight: 400; white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.card { --bd: var(--rule); background: var(--sheet); border: 1px solid var(--bd); border-left: 4px solid var(--bd); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.card.u-urgent { --bd: var(--urgent); background: #FBEEEC; }
.card.u-soon { --bd: var(--soon); background: #FAF3E4; }
.card.u-done { --bd: #94A3B8; }
.card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card .title { font-weight: 900; font-size: 16px; white-space: nowrap; }
.card .prod { font-size: 14px; color: var(--ink2); font-weight: 600; margin-top: -4px; }
.due { font-size: 12px; font-weight: 700; white-space: nowrap; padding-top: 3px; }
.due.urgent { color: var(--urgent); } .due.soon { color: #85540F; } .due.calm { color: var(--brand-deep); font-weight: 600; } .due.done { color: var(--muted); font-weight: 600; }
.card .person { font-size: 13px; color: var(--ink2); }
.card .person span { color: var(--muted); font-size: 12px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin: 2px 0 0; padding-top: 8px; border-top: 1px dashed var(--rule); font-size: 13px; }
.facts div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.facts dt { color: var(--muted); white-space: nowrap; }
.facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.riders { line-height: 1.8; }
.tag { display: inline-block; background: var(--brand-wash); color: var(--brand-deep); padding: 1px 7px; border-radius: 4px; font-size: 11px; margin: 0 4px 0 0; font-weight: 600; white-space: nowrap; }

.covgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.cov { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.cov h3 { margin: 0; font-size: 16px; font-weight: 900; color: var(--brand); }
.cov h4 { margin: 6px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.cov ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.cov li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--hair); }
.cov li:first-child { border-top: 0; }
.cov li span { min-width: 0; }
.cov li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cov .none { font-size: 13px; color: var(--muted); }
.cov li span small { margin-left: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cov details.more { border-top: 1px dashed var(--rule); padding-top: 4px; }
.cov details.more summary { cursor: pointer; padding: 6px 0; font-size: 13px; font-weight: 700; color: var(--muted); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cov details.more summary::-webkit-details-marker { display: none; }
.cov details.more summary::after { content: '展開 ▾'; font-weight: 400; font-size: 12px; }
.cov details.more[open] summary::after { content: '收起 ▴'; }
.cov details.more summary small { margin-right: auto; font-weight: 400; }
.cov details.more ul { font-size: 13px; }

.tablewrap { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; overflow-x: auto; }
table.fam { border-collapse: collapse; width: 100%; font-size: 14px; }
table.fam th, table.fam td { padding: 10px 12px; border-top: 1px solid var(--hair); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.fam thead th { border-top: 0; background: var(--brand-wash); color: var(--brand-deep); font-weight: 800; }
table.fam th:first-child { text-align: left; position: sticky; left: 0; background: var(--sheet); padding-left: 14px; font-weight: 700; }
table.fam thead th:first-child { background: var(--brand-wash); }
table.fam td.zero { color: #B9B6AD; }

.foot { display: grid; gap: 10px; justify-items: center; font-size: 13px; color: var(--muted); text-align: center; padding-top: 4px; }
.contact { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 22px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 0 var(--brand-deep); }

@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .covgrid { grid-template-columns: minmax(0, 1fr); }
  .tile .val { font-size: 22px; }
  table.fam { font-size: 13px; }
  table.fam th, table.fam td { padding: 10px 6px; }
  table.fam th:first-child { padding-left: 12px; }
  table.fam th:last-child, table.fam td:last-child { padding-right: 12px; }
}

.state { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--brand); border-radius: 10px; padding: 16px; display: grid; gap: 6px; }
.state b { font-size: 16px; }
.state span { font-size: 14px; color: var(--muted); }
.state.err { border-left-color: var(--urgent); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
input[type=search], input[type=text], input[type=password] { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); font: inherit; color: inherit; }
input:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn.primary { border: 0; background: var(--brand); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.26), 0 3px 6px rgba(15,23,42,.18); }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.rows { display: grid; gap: 8px; }
.rowcard { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.rowcard .name { font-weight: 900; font-size: 16px; }
.rowcard .name small { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.rowcard .meta { font-size: 13px; color: var(--muted); }
.rowcard .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2C3537; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 32px); text-align: center; z-index: 9; }
.toast.on { opacity: 1; }

.intro { margin: 0; font-size: 14px; color: var(--muted); }
.form { display: grid; gap: 14px; }
.q { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.q > label { font-weight: 800; font-size: 15px; }
.q > label b { color: var(--urgent); margin-left: 2px; }
.q.bad { border-color: var(--urgent); }
.qerr { font-size: 13px; color: var(--urgent); }
.qnote { margin: -6px 2px 0; font-size: 13px; color: var(--muted); border-left: 4px solid var(--brand); padding-left: 10px; }
.q input, .q textarea { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); font: inherit; color: inherit; }
.q textarea { resize: vertical; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts.col { display: grid; }
.opt { min-height: 42px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); font-weight: 600; font-size: 15px; cursor: pointer; text-align: left; }
.opt[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.big { min-height: 50px; font-size: 16px; font-weight: 800; }
.badge { display: inline-block; background: var(--urgent); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 0 8px; margin-left: 6px; }
.kv { margin: 0; display: grid; gap: 4px; font-size: 14px; }
.kv div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--hair); }
.kv div:first-child { border-top: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; user-select: all; }

.checks2 { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.checks2 .ok { color: var(--ok); } .checks2 .ng { color: var(--urgent); } .checks2 .na { color: var(--muted); font-weight: 400; }
.caution { background: #FEF2F2; border: 1px solid #FCA5A5; border-left: 4px solid var(--urgent); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; font-size: 13px; }
.caution b { font-size: 14px; color: #991B1B; }
.nextstep { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--brand); border-radius: 8px; padding: 12px; display: grid; gap: 6px; font-size: 13px; line-height: 1.6; }
.nextstep b { font-size: 14px; }
.nextstep .btn { margin-top: 4px; }

.rows, .rowcard { min-width: 0; }
@media (max-width: 600px) { .rowcard .acts { grid-template-columns: minmax(0, 1fr); } }

.card .title { display: flex; align-items: center; gap: 8px; }
.colo { flex: none; width: 26px; height: 26px; border-radius: 6px; object-fit: contain; background: var(--sheet); border: 1px solid var(--rule); }
.colo.badge1 { display: grid; place-items: center; background: var(--brand); border-color: var(--brand); color: #fff; font-size: 14px; font-weight: 800; }

.linkbox { display: grid; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.linkbox textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font: inherit; font-size: 13px; line-height: 1.5; color: inherit; resize: none; }

.rowcard.dim { background: var(--paper); }
.checks2 .wait { color: var(--soon); }

.hero { background: var(--hero-bg); color: var(--hero-ink); border: 1px solid var(--hero-rule); border-radius: 16px; padding: 18px 18px 16px; display: grid; gap: 14px; }
.hero .hi { font-size: 20px; font-weight: 900; letter-spacing: .02em; }
.hero .hi small { font-size: 13px; font-weight: 400; opacity: .8; margin-left: 8px; }
.hero .next { display: flex; align-items: center; gap: 12px; background: var(--hero-box); border-radius: 12px; padding: 10px 14px; }
.hero .when { flex: none; font-size: 22px; font-weight: 900; white-space: nowrap; color: var(--accent); }
.hero .what { min-width: 0; font-size: 15px; font-weight: 700; display: grid; }
.hero .what small { font-size: 12px; font-weight: 400; opacity: .8; }
.hero .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hero .stats div { display: grid; gap: 0; }
.hero .stats b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.3; }
.hero .stats span { font-size: 12px; opacity: .82; white-space: nowrap; }
.filters { display: grid; gap: 8px; }
.filters input[type=search] { min-height: 46px; border-radius: 12px; font-size: 15px; }
.frow { display: flex; flex-wrap: wrap; gap: 8px; }
.frow.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.frow.scroll::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--sheet); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.fchip small { font-weight: 400; color: var(--muted); font-size: 12px; }
.fchip .colo { width: 22px; height: 22px; }
.fchip[aria-pressed=true] { background: var(--brand-wash); border-color: var(--brand); color: var(--brand-deep); box-shadow: 0 0 0 1px var(--brand); }
.card .title > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.card .prod { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 0; }
.kind { flex: none; font-size: 11px; font-weight: 800; border-radius: 4px; padding: 0 6px; line-height: 1.7; }
.kind.life { background: var(--brand-wash); color: var(--brand-deep); }
.kind.pc { background: #E8EBDC; color: #4F5A2E; }
.bar { height: 6px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.facts dd.no { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; white-space: normal; text-align: right; }
.state.full { grid-column: 1 / -1; }

.asearch { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.asearch label { font-weight: 900; font-size: 15px; }
.asearch label small { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 8px; }
.asearch input { min-height: 46px; border-radius: 12px; font-size: 16px; }
.asearch .rows { display: grid; gap: 8px; }
.asearch .rows:empty { display: none; }
.rowcard.pick { text-decoration: none; color: inherit; gap: 4px; }
.rowcard.pick .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rowcard.pick .meta b { color: var(--brand); white-space: nowrap; }

.card .plate { font-size: 15px; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

.card .prod .plate { font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.facts div.wide { grid-column: 1 / -1; }
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.subs li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 10px; align-items: baseline; padding-top: 6px; border-top: 1px solid var(--hair); }
.subs .sname { font-weight: 700; min-width: 0; }
.subs .sname small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.subs .sdate { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.subs b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.subs .sno { grid-column: 1 / -1; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }

.subs.same li { grid-template-columns: minmax(0, 1fr) auto; }

.hero .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; text-align: center; }
.hero .stats div { padding: 2px 6px; justify-items: center; }
.hero .stats div + div { border-left: 1px solid var(--hero-rule); }
.hero .stats b { font-size: 20px; letter-spacing: 0; }
.hero .stats span { font-size: 12px; }

.frow.quad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.frow.quad .fchip { justify-content: center; padding: 4px 6px; }
@media (max-width: 600px) { .frow.quad { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card .person { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 14px; color: var(--ink); }
.card .person span { display: flex; align-items: baseline; gap: 6px; min-width: 0; color: inherit; font-size: inherit; }
.card .person i { flex: none; font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.card .person b { font-weight: 800; min-width: 0; overflow-wrap: anywhere; }

.payline { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.payline span { min-width: 0; font-weight: 700; }
.payline .linkbtn { flex: none; white-space: nowrap; }
.payedit { display: grid; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.payedit .opt { min-height: 38px; padding: 4px 12px; font-size: 14px; }
.payrow { display: grid; grid-template-columns: minmax(0, 1fr) 6.5em; gap: 10px; }
.payrow label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.payrow input { min-height: 42px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 8px; font: inherit; font-size: 15px; color: var(--ink); background: var(--sheet); width: 100%; }
.payedit .meta { margin: 0; font-size: 12px; color: var(--muted); }
.payedit .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.payedit .same { display: grid; gap: 6px; }
.payedit .same > span { font-size: 13px; color: var(--muted); }
.payedit .samebtn { text-align: left; justify-content: flex-start; white-space: normal; }
.payedit .also { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.payedit .also input { width: 20px; height: 20px; flex: none; margin-top: 1px; }

table.fam tr.cat th { background: var(--paper); text-align: left; font-weight: 900; color: var(--brand); }

table.fam tr.cat th { position: static; }
table.fam tr.cat th span { position: sticky; left: 14px; display: inline-block; }
table.fam th .short { display: none; }

@media (max-width: 640px) {
  table.fam:not(.prem) th .full { display: none; }
  table.fam:not(.prem) th .short { display: inline; }
  table.fam:not(.prem) tbody tr:not(.cat) th:first-child, table.fam:not(.prem) thead th:first-child { width: 8.5em; min-width: 8.5em; max-width: 8.5em; white-space: normal; line-height: 1.35; padding-right: 4px; box-shadow: 1px 0 0 var(--hair); }
  table.fam:not(.prem) tr.cat th span { left: 12px; }
  
  .tablewrap:has(table.fam:not(.prem)) { scroll-snap-type: x proximity; scroll-padding-left: 111px; }
  table.fam:not(.prem) td, table.fam:not(.prem) thead th:not(:first-child) { scroll-snap-align: start; }
}

h2.sec.fold { cursor: pointer; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; margin: 0; align-items: center; }
h2.sec.fold > span::before { content: '▸'; display: inline-block; width: 1.1em; color: var(--brand); }
h2.sec.fold[aria-expanded=true] > span::before { content: '▾'; }
h2.sec.fold .cnt { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 4px; }

.subs .sdate.urgent { color: var(--urgent); font-weight: 800; }
.subs .sdate.soon { color: #85540F; font-weight: 800; }
.subs:not(.same) li { grid-template-columns: minmax(0, 1fr) auto; }
.subs:not(.same) .sdate { grid-column: 1 / -1; order: 3; }
.subs:not(.same) .sno { order: 4; }

.hero .next .what { flex: 1; }
.hero .next .amt { flex: none; margin-left: auto; text-align: right; display: grid; justify-items: end; line-height: 1.1; }
.hero .next .amt b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hero .next .amt small { font-size: 12px; opacity: .8; }

.payedit .pexprow { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.payedit .pexprow input { max-width: 140px; }
.cardwarn { color: var(--urgent); font-weight: 800; }
.payedit .pexprow input { min-height: 42px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 8px; font: inherit; font-size: 15px; color: var(--ink); background: var(--sheet); }
.payedit .pexprow { font-weight: 700; font-size: 12px; }

:root[data-theme=blue] { 
  --paper: #F4F6F8; --sheet: #FFFFFF; --ink: #2A3644; --ink2: #3B4756; --muted: #6E7A88; --rule: #DDE3EA; --hair: #EAEEF2;
  --brand: #4F6F8F; --brand-deep: #35526F; --brand-wash: #E8EEF4; --brand-rule: #CFDAE5; --accent: #B4690E; --top-ink: #2A3F55; --hero-ink: #26394D; }
:root[data-theme=sage] { 
  --paper: #F6F3EC; --sheet: #FFFDF8; --ink: #2F332E; --ink2: #40453E; --muted: #747A70; --rule: #E3DED2; --hair: #EDE9DE;
  --brand: #5F7A68; --brand-deep: #3F5A48; --brand-wash: #E7EEE6; --brand-rule: #CBD8CC; --accent: #A85B1F; --top-ink: #2F4637; --hero-ink: #2B3D31; }
:root[data-theme=cocoa] { 
  --paper: #F7F2EA; --sheet: #FFFCF7; --ink: #3A302A; --ink2: #4A3F37; --muted: #857868; --rule: #E6DCCD; --hair: #EFE7DA;
  --brand: #8A6A4F; --brand-deep: #6A4D35; --brand-wash: #F0E6D8; --brand-rule: #DDCDB8; --accent: #A6501E; --top-ink: #4A382A; --hero-ink: #3F3026; }
:root[data-theme=navy] { 
  --paper: #F5F7FA; --sheet: #FFFFFF; --ink: #1E293B; --ink2: #334155; --muted: #6B7280; --rule: #E2E8F0; --hair: #EEF1F5;
  --brand: #1E3A5F; --brand-deep: #1E3A5F; --brand-wash: #EEF2F7; --brand-rule: #D5DEEA; --accent: #FCD34D;
  --top-bg: #1E3A5F; --top-ink: #FFFFFF; --hero-bg: linear-gradient(135deg, #2C5282 0%, #1E3A5F 55%, #152D4A 100%); --hero-ink: #FFFFFF; --hero-box: rgba(255, 255, 255, .12); --hero-rule: rgba(255, 255, 255, .22); }

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.themes button { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--sheet); font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; }
.themes button[aria-pressed=true] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.themes i { flex: none; width: 34px; height: 24px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .12); }

.hero .next .amt { display: flex; align-items: baseline; gap: 4px; }
.hero .next .amt small { font-size: 13px; }
.payline { flex-wrap: wrap; }
.payline .cardwarn { display: block; white-space: nowrap; }
h2.sec.fold { flex-wrap: wrap; }
h2.sec.fold > span { white-space: nowrap; }
h2.sec.fold small { margin-left: auto; }
a.btn { text-decoration: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; }
a.btn.primary { color: #fff; }

.dsum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dsum a { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--rule); text-decoration: none; color: inherit; }
.dsum b { font-size: 24px; font-weight: 900; line-height: 1.1; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.dsum span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.drow { gap: 4px; }
.drow .name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.drow .name small { margin-left: 8px; }
.drow .dwhen { flex: none; font-size: 13px; font-weight: 800; white-space: nowrap; margin-left: auto; }
.dwhen.urgent { color: var(--urgent); } .dwhen.soon { color: #85540F; } .dwhen.calm { color: var(--brand-deep); }
.drow .meta { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.drow .meta .linkbtn { margin-left: auto; white-space: nowrap; }
.dnote { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.dblock { display: grid; gap: 10px; scroll-margin-top: 12px; }
.dblock:empty { display: none; }
.dblock h2.sec { margin: 4px 0 0; }
.dblock .dnote { margin: -6px 0 0; }
.dlinks { display: flex; justify-content: center; gap: 20px; margin-top: 6px; }

.dailylink { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-weight: 800; }
.dailylink small { flex: 1; min-width: 0; font-weight: 400; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dailylink b { color: var(--brand); }
.dlist { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; }
.dlist li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 14px; }
.dlist li + li { border-top: 1px solid var(--hair); }
.dlist span { min-width: 0; font-size: 14px; }
.dlist small { display: block; color: var(--muted); font-size: 12px; }
.dlist em { flex: none; font-style: normal; font-weight: 800; font-size: 13px; white-space: nowrap; }
.dlist em.urgent { color: var(--urgent); } .dlist em.soon { color: #85540F; } .dlist em.calm { color: var(--brand-deep); }
.think { background: var(--brand-wash); border: 1px solid var(--brand-rule); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.think b { font-size: 12px; color: var(--brand-deep); }
.think span { font-size: 15px; font-weight: 700; }
.rowcard.news { text-decoration: none; color: inherit; gap: 6px; }
.news .ntitle { font-weight: 800; font-size: 15px; line-height: 1.5; }
.news .ntitle i { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; margin-right: 6px; background: var(--brand-wash); color: var(--brand-deep); vertical-align: 2px; white-space: nowrap; }
.news .nsrc { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.news .nsrc b { color: var(--brand); white-space: nowrap; }
.state.tip .fine { font-size: 12px; }
#content > .dnote { margin: -6px 0 0; }

.hero .stats.four { grid-template-columns: 1fr 1fr; gap: 10px 0; }
.hero .stats.four div:nth-child(3) { border-left: 0; }
.hero .hnote { font-size: 12px; opacity: .8; text-align: center; margin-top: -4px; }
table.fam.prem { width: 100%; }
table.fam.prem th small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 12px; }
table.fam.prem tr.sum th, table.fam.prem tr.sum td { font-weight: 900; background: var(--brand-wash); color: var(--brand-deep); }

.fx { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fx div { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.fx span { font-size: 13px; font-weight: 700; white-space: nowrap; }
.fx span small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 11px; }
.fx b { font-size: 20px; font-weight: 900; color: var(--brand-deep); font-variant-numeric: tabular-nums; }

.ckwrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.ckgroup { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; align-content: start; }
.ckgroup h4 { margin: 0; font-size: 15px; font-weight: 900; color: var(--brand-deep); }

.ckrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.ckrow + .ckrow { border-top: 1px solid var(--hair); padding-top: 10px; }
.ckname { font-size: 14px; font-weight: 700; min-width: 0; line-height: 1.4; }
.ckname small { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.ckhave { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ckhave.zero { color: var(--muted); font-weight: 700; }
.ckmeta { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.ckgoal { font-size: 11px; color: var(--muted); white-space: nowrap; text-align: right; margin-left: auto; }
.ckgoal.wide { white-space: normal; }
.ck { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.ck.none { background: #FBEEEC; color: var(--urgent); }
.ck.part { background: #FAF0DE; color: #85540F; }
.ck.full { background: var(--brand-wash); color: var(--brand-deep); }
.ckbar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.ckbar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.ckbar.part i { background: var(--soon); }
.cknote { margin: -6px 0 0; font-size: 12px; color: var(--muted); }

html.hop body > * { visibility: hidden; }
html.hop body::before { content: '載入中…'; position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 15px; background: var(--paper); }

.fx em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.fx em.up { color: var(--urgent); } .fx em.down { color: var(--ok); }

.card .facts + .bar { margin-top: -2px; }
.paybox { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--rule); font-size: 13px; }
.payinfo { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.paylabel { color: var(--muted); white-space: nowrap; }
.payinfo b { font-weight: 800; white-space: nowrap; }
.payinfo b.payempty { font-weight: 400; color: var(--muted); }
.paydetail { color: var(--ink2); white-space: nowrap; }
.payinfo .cardwarn { flex-basis: 100%; }
.paybox .linkbtn { flex: none; white-space: nowrap; }

.benchcat { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--hair); }
.benchcat > b { font-size: 14px; color: var(--brand-deep); }
.benchrow { display: grid; grid-template-columns: minmax(0, 1fr) 8.5em; gap: 10px; align-items: center; font-size: 14px; }
.benchrow span { min-width: 0; font-weight: 700; }
.benchrow small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.benchrow input { min-height: 40px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 8px; font: inherit; font-size: 15px; text-align: right; background: var(--sheet); color: var(--ink); width: 100%; font-variant-numeric: tabular-nums; }

.caprow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.caprow img { border: 1px solid var(--rule); border-radius: 8px; background: #fff; transition: opacity .2s; }

.consent { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; }
.consent > b { font-size: 15px; color: var(--brand-deep); }
.consent ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; line-height: 1.65; color: var(--ink2); }
.consent li i { font-style: normal; font-weight: 800; color: var(--ink); display: block; }
.agree { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 700; min-height: 44px; }
.agree input { width: 24px; height: 24px; flex: none; accent-color: var(--brand); }

.showpw { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.showpw input { width: 18px; height: 18px; flex: none; }

ol.howto { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: 14px; line-height: 1.6; }
ol.howto li > div { margin-top: 6px; }
#hp-mark { cursor: grab; border-style: dashed; }
.hpcode { display: grid; gap: 2px; padding: 12px; border-radius: 10px; background: var(--brand-wash); text-align: center; }
.hpcode span { font-size: 12px; color: var(--muted); }
.hpcode b { font-size: 28px; letter-spacing: .25em; font-variant-numeric: tabular-nums; color: var(--brand-deep); padding-left: .25em; }
.hpcode small { font-size: 12px; color: var(--muted); }
