/* 拼车分摊 · 应用层样式（基于判定通过的设计稿体系） */
:root { --acc:#0D9488; --acc-d:#0B7A70; --acc-soft:rgba(13,148,136,.10); --acc-fg:#fff; }
/* 覆盖 tokens 浅色主题的靛蓝 --acc（同优先级组，必须覆盖到 prefers-color-scheme 分支） */
:root[data-theme="light"] { --acc:#0D9488; --acc-d:#0B7A70; --acc-soft:rgba(13,148,136,.10); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --acc:#0D9488; --acc-d:#0B7A70; --acc-soft:rgba(13,148,136,.10);
} }
* { box-sizing:border-box; }
html, body { margin:0; padding:0; }
body { background:var(--bg); color:var(--text); font-family:var(--font); font-size:14px; line-height:1.6; -webkit-tap-highlight-color:transparent; }
button { font-family:var(--font); cursor:pointer; }
.wrap { max-width:520px; margin:0 auto; min-height:100dvh; display:flex; flex-direction:column; }
@media(min-width:960px){ body{ background:linear-gradient(180deg,#EDF0F1,var(--bg)); } .wrap{ box-shadow:0 0 0 1px var(--line),0 10px 40px rgba(0,0,0,.06); } }

/* appbar */
.appbar { background:linear-gradient(135deg,var(--acc),var(--acc-d)); color:var(--acc-fg); padding:18px 18px 16px; }
.appbar .row { display:flex; align-items:center; gap:10px; }
.appbar .bt { font-size:19px; font-weight:800; letter-spacing:.5px; flex:1; }
.appbar .bs { font-size:12px; opacity:.88; margin-top:3px; }
.iconbtn { background:rgba(255,255,255,.16); color:#fff; border:0; border-radius:10px; padding:7px 10px; font-size:13px; font-weight:700; }
.iconbtn.plain { background:transparent; border:1.5px solid rgba(255,255,255,.55); }

/* 主体 */
.main { padding:14px; flex:1; position:relative; }
.fab { position:fixed; right:16px; bottom:16px; width:136px; height:50px; border-radius:26px; background:linear-gradient(135deg,var(--acc),var(--acc-d)); color:#fff; border:0; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:800; box-shadow:0 8px 20px rgba(13,148,136,.4); z-index:20; }
@media(min-width:960px){ .fab{ position:sticky; left:calc(100% - 152px); margin-top:-40px; } }

.guide { background:rgba(154,99,0,.10); color:var(--warn,#8A5A00); font-size:12.5px; border-radius:12px; padding:10px 12px; margin-bottom:12px; line-height:1.7; }
.guide b { font-weight:800; }
.guide .gd-x { float:right; border:0; background:none; color:inherit; font-size:14px; padding:0 2px; }

.card { background:var(--island); border-radius:14px; padding:13px 14px; margin-bottom:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.card .r1 { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.card .nm { font-weight:700; font-size:15px; overflow-wrap:anywhere; }
.card .amt { font-family:var(--mono); font-weight:800; font-size:17px; color:var(--acc-d); flex:none; }
.card .r2 { font-size:12px; color:var(--t3); margin-top:4px; display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.card .ops { margin-left:auto; display:flex; gap:10px; }
.card .ops a, .card .ops button { border:0; background:none; color:var(--t2); font-size:12.5px; padding:0; text-decoration:underline; }
.pill { display:inline-block; font-size:11px; border-radius:20px; padding:2px 8px; background:var(--acc-soft); color:var(--acc-d); }
.pill.gray { background:var(--island-2); color:var(--t3); }
.pill.warn { background:rgba(154,99,0,.12); color:#8A5A00; }

.empty { text-align:center; padding:26px 10px 8px; color:var(--t3); font-size:13px; }
.empty .steps { display:flex; gap:8px; justify-content:center; margin:14px 0; flex-wrap:wrap; }
.empty .st { width:96px; background:var(--island); border-radius:12px; padding:12px 6px; font-size:12px; color:var(--t2); box-shadow:0 1px 3px rgba(0,0,0,.05); }
.empty .st i { font-style:normal; font-size:22px; display:block; margin-bottom:6px; }

.about { background:var(--island); border-radius:14px; padding:13px 14px; font-size:12.5px; color:var(--t2); line-height:1.9; margin-top:12px; }
.about b { color:var(--text); }
.foot { text-align:center; font-size:11px; color:var(--t3); padding:12px 0 16px; }

/* 表单 */
.lbl { font-size:12.5px; color:var(--t2); font-weight:700; margin:14px 0 6px; }
.lbl:first-child { margin-top:0; }
.big-amt { display:flex; align-items:baseline; gap:6px; background:var(--island); border-radius:14px; padding:12px 16px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.big-amt span { font-size:26px; font-weight:800; color:var(--t3); }
.big-amt input { border:0; outline:0; font-size:34px; font-weight:800; font-family:var(--mono); width:100%; color:var(--text); background:transparent; min-width:0; }
.err { color:var(--bad); font-size:12px; margin-top:6px; min-height:16px; }
.seg { display:flex; background:var(--island); border-radius:12px; padding:4px; gap:4px; }
.seg i { flex:1; text-align:center; font-style:normal; font-size:13px; padding:8px 0; border-radius:9px; color:var(--t2); cursor:pointer; }
.seg i.on { background:var(--acc); color:var(--acc-fg); font-weight:700; }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip { font-size:13px; border-radius:20px; padding:7px 14px; background:var(--island); border:1px solid var(--line-2); color:var(--t2); }
.chip.on { background:var(--acc); border-color:var(--acc); color:var(--acc-fg); font-weight:700; }
.chip.add { border-style:dashed; color:var(--t3); }
.switchline { display:flex; align-items:center; gap:10px; background:var(--island); border-radius:12px; padding:11px 14px; font-size:13.5px; }
.switchline input { width:18px; height:18px; accent-color:var(--acc); }
.fee { display:flex; align-items:center; gap:10px; background:var(--island); border-radius:12px; padding:10px 12px; margin-bottom:8px; font-size:13px; }
.fee .ft { color:var(--t2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fee .fa { font-family:var(--mono); font-weight:800; flex:none; }
.fee .fx { margin-left:auto; display:flex; gap:10px; flex:none; }
.fee .fx button { border:0; background:none; color:var(--t3); font-size:12.5px; text-decoration:underline; padding:0; }
.bigbtn { display:block; width:100%; border:0; border-radius:14px; background:linear-gradient(135deg,var(--acc),var(--acc-d)); color:var(--acc-fg); font-size:16.5px; font-weight:800; padding:14px; margin-top:16px; box-shadow:0 8px 20px rgba(13,148,136,.35); }
.bigbtn[disabled] { opacity:.5; }
.ghostbtn { display:block; width:100%; border:1.5px solid var(--acc); background:var(--island); color:var(--acc-d); border-radius:14px; font-size:14.5px; font-weight:700; padding:12px; margin-top:10px; }
.dangerbtn { display:block; width:100%; border:1.5px solid var(--bad); background:var(--island); color:var(--bad); border-radius:14px; font-size:14.5px; font-weight:700; padding:12px; margin-top:14px; }
.input { width:100%; border:1px solid var(--line-2); border-radius:12px; padding:11px 12px; font-size:15px; background:var(--island); color:var(--text); outline:none; }
.input:focus { border-color:var(--acc); }

/* 结果页 */
.hero-amt { text-align:center; padding:18px 0 6px; }
.hero-amt .k { font-size:13px; color:var(--t2); }
.hero-amt .v { font-size:44px; font-weight:800; font-family:var(--mono); color:var(--acc-d); letter-spacing:-1px; }
.hero-amt .s { font-size:12px; color:var(--t3); margin-top:4px; overflow-wrap:anywhere; }
.trow { display:flex; align-items:center; gap:12px; background:var(--island); border-radius:14px; padding:12px 14px; margin-bottom:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.av { width:34px; height:34px; border-radius:50%; background:var(--acc-soft); color:var(--acc-d); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; flex:none; }
.trow .who { font-size:14px; font-weight:700; overflow-wrap:anywhere; }
.trow .how { font-size:12px; color:var(--t3); margin-top:2px; }
.trow .how b { color:var(--acc-d); }
.trow .m { margin-left:auto; font-family:var(--mono); font-weight:800; font-size:17px; flex:none; }
.trow .m small { font-size:11px; color:var(--t3); font-weight:400; }
.note { font-size:11.5px; color:var(--t3); text-align:center; margin:6px 0 12px; }
.btn2 { display:flex; gap:10px; }
.btn2 > button { flex:1; border-radius:14px; font-weight:800; font-size:15px; padding:13px; }
.btn2 .b1 { border:0; background:linear-gradient(135deg,var(--acc),var(--acc-d)); color:var(--acc-fg); }
.btn2 .b2 { border:1.5px solid var(--acc); background:var(--island); color:var(--acc-d); }

/* 只读分享条 */
.sharebar { background:rgba(154,99,0,.12); color:#8A5A00; font-size:12.5px; padding:10px 14px; display:flex; gap:6px; align-items:center; }

/* 成员/设置 */
.mrow { display:flex; align-items:center; gap:12px; background:var(--island); border-radius:12px; padding:11px 14px; margin-bottom:8px; font-size:14px; font-weight:600; }
.mrow .tag-d { font-size:11px; background:var(--acc-soft); color:var(--acc-d); border-radius:20px; padding:2px 8px; margin-left:6px; }
.mrow .del { margin-left:auto; border:0; background:none; color:var(--bad); font-size:12.5px; font-weight:700; padding:0; }
.mrow .edit { border:0; background:none; color:var(--t2); font-size:12.5px; text-decoration:underline; padding:0; margin-left:auto; }
.mrow .edit + .del { margin-left:10px; }

/* toast / dialog */
.toast { position:fixed; left:50%; bottom:80px; transform:translateX(-50%); background:#16171B; color:#fff; font-size:13px; border-radius:22px; padding:9px 18px; z-index:99; box-shadow:0 6px 20px rgba(0,0,0,.25); max-width:86vw; text-align:center; }
.scrim { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:50; display:flex; align-items:center; justify-content:center; padding:20px; }
.dialog { background:var(--island); border-radius:16px; padding:20px; max-width:340px; width:100%; }
.dialog h3 { margin:0 0 8px; font-size:16px; }
.dialog p { margin:0 0 16px; font-size:13.5px; color:var(--t2); }
.dialog .dops { display:flex; gap:10px; }
.dialog .dops button { flex:1; border-radius:10px; padding:10px; font-size:14px; font-weight:700; border:1px solid var(--line-2); background:var(--island); color:var(--t2); }
.dialog .dops .ok { border:0; background:var(--bad); color:#fff; }
[hidden] { display:none !important; }
