:root {
  --ink: #1f1a24; --muted: #5c5463; --line: #e6e1ea; --soft: #f4f1f6; --edge: #a9a2b0;
  --accent: #b02a5b; --accent-dark: #7a1d40; --accent-soft: #fbe6ee;
  --ok: #14663a; --ok-soft: #ddf3e5; --no: #8a1f1f; --no-soft: #fbe3e3; --no-ink: #6b1515;
  --warn: #5e4300; --warn-soft: #fff4d6;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--soft); color: var(--ink); font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
.wrap { max-width: 520px; margin: 0 auto; background: #fff; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 15px; margin: 0; }
.top { padding: 20px 20px 12px; }
.brand { display: block; font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand-sub { font-size: 15px; font-weight: 500; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; line-height: 1.6; }
.pad { padding: 16px 20px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs a { flex: 1; text-align: center; padding: 14px 0; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
main { flex: 1; }
.sec { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.sec + .sec { border-top: 1px solid var(--line); }
.foot { padding: 16px 20px 24px; background: var(--soft); color: var(--muted); font-size: 12px; line-height: 1.6; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; }
label.fld { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
select, input[type="text"] { min-height: 48px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 10px; background: #fff; font-size: 16px; width: 100%; }
.btn { min-height: 48px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--edge); background: #fff; font-size: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn.ghost { border-color: var(--accent); color: var(--accent); font-weight: 700; border-width: 2px; }
.btn.big { width: 100%; min-height: 52px; font-size: 17px; border-radius: 12px; }
.btn.link { border: 0; background: none; color: var(--accent); font-weight: 700; min-height: 44px; padding: 0 12px; }
.btn.plain { border: 0; background: none; color: var(--muted); text-decoration: underline; min-height: 44px; padding: 0; font-size: 13px; align-self: flex-start; }
.btn:disabled { opacity: .5; cursor: default; }
.btn[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 700; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; }
a.card:hover { color: var(--ink); border-color: var(--edge); }
.card.dashed { border-style: dashed; border-color: var(--edge); }
.card.strong { border: 2px solid var(--ink); background: var(--soft); }
.card.mine { border: 2px solid var(--accent); }
.card.gone { background: var(--soft); color: var(--muted); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { font-size: 16px; font-weight: 700; }
.pill { padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; align-self: flex-start; }
.pill.in { background: var(--ok-soft); color: var(--ok); }
.pill.out { background: var(--no-soft); color: var(--no); }
.pill.none { background: var(--soft); color: var(--muted); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.mine { background: var(--accent-soft); color: var(--accent-dark); }
.pill.grey { background: var(--line); color: #3d3644; }
.note { padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.danger { background: var(--no-soft); color: var(--no-ink); border: 2px solid var(--no); display: flex; flex-direction: column; gap: 6px; }
.note.ok { background: var(--ok-soft); color: var(--ok); display: flex; flex-direction: column; gap: 6px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 12px; }
.day { padding: 8px 0; border-radius: 8px; background: var(--soft); color: var(--muted); }
.day b { display: block; }
.day.in { background: var(--ok-soft); color: var(--ok); }
.day.out { background: var(--no-soft); color: var(--no); }
.day.today { outline: 2px solid currentColor; }
.dist { display: grid; grid-template-columns: 84px 1fr 34px 34px 66px; gap: 10px 8px; align-items: center; font-size: 14px; }
.dist .hd { font-size: 12px; color: var(--muted); text-align: right; }
.dist .num { text-align: right; }
.dist .pct { text-align: right; font-size: 12px; }
.mem { display: flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 6px; flex: none; }
.bar { height: 12px; border-radius: 6px; background: #efeaf4; overflow: hidden; }
.bar > i { display: block; height: 12px; border-radius: 6px; }
.list { display: flex; flex-direction: column; font-size: 13px; }
.list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mbtn { min-height: 52px; border: 1px solid var(--edge); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; }
.mbtn.hid { min-height: 48px; border: 1px dashed var(--ink); background: var(--soft); font-size: 14px; }
.picked { border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.picked > div { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 14px; }
.picked > div + div { border-top: 1px solid var(--line); }
.chk { min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 22px; font-size: 14px; }
.chip:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 700; }
.wants { display: grid; grid-template-columns: 1fr 64px 64px; gap: 4px 8px; align-items: center; }
.wants .hd { font-size: 12px; color: var(--muted); text-align: center; }
.wants label { min-height: 44px; display: flex; align-items: center; justify-content: center; }
.handle { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 4px 12px; border-radius: 8px; background: var(--soft); }
.handle span { font-size: 15px; font-weight: 500; word-break: break-all; }
.at { display: flex; align-items: center; gap: 4px; border: 1px solid var(--edge); border-radius: 10px; padding: 0 12px; }
.at input { border: 0; outline: 0; padding: 0; min-height: 46px; }
.at:focus-within { outline: 2px solid var(--accent); }
.code { width: 120px !important; font-size: 20px !important; letter-spacing: 8px; }
.confirm { padding: 14px; border: 2px solid var(--ink); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.ownerbox { padding: 12px; border: 1px solid var(--edge); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 90vw; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }
