/* 揪in JOIN — 樣式（手機一欄，桌機置中） */
:root {
  /* 揪in 品牌色：陽光黃 #FFC857（主色）、深海藍 #1D4E89（輔色）、銀 #DDE2E8、淺底 #E4ECF7、文字 #14233D */
  --bg: #F3F6FB; --surface: #FFFFFF; --sunk: #E4ECF7; --fg: #14233D; --muted: #5B6B85; --line: #DDE2E8;
  --accent: #FFC857; --accent-ink: #14233D; --accent-text: #1D4E89;
  --yes: #1F9D6B; --no: #D9534F; --blue: #1D4E89; --blue-ink: #FFFFFF; --star: #E8A93B; --line-green: #06C755;
  --heat0: #E4ECF7; --heat: 29, 78, 137;
  --tint-blue: rgba(29, 78, 137, .1); --tint-yellow: rgba(255, 200, 87, .3);
  --display: "Poppins", "Noto Sans TC", system-ui, sans-serif;
  --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1626; --surface: #13223A; --sunk: #1B2E4C; --fg: #EEF3FA; --muted: #9DB0CC; --line: #263C5E;
    --accent: #FFC857; --accent-ink: #14233D; --accent-text: #FFC857;
    --yes: #3CC48D; --no: #FF7A75; --blue: #8FB6E8; --blue-ink: #0B1626; --star: #FFC857;
    --heat0: #1B2E4C; --heat: 143, 182, 232;
    --tint-blue: rgba(143, 182, 232, .14); --tint-yellow: rgba(255, 200, 87, .18); color-scheme: dark;
  }
}
/* 線條圖示（js/icons.js） */
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.22em; }
.sub .i, .label .i, .chip .i, .gdiv .i, .ptag .i, .hours .i, .linkish .i, .areaf .i, .rating .i { width: 1.2em; height: 1.2em; margin-right: 2px; }
.thumb .i, .card .emoji .i { color: #FFFFFF; filter: drop-shadow(0 1px 2px rgba(20, 35, 61, .35)); }
.bigicon { color: var(--blue); }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overscroll-behavior: none; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.5;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.app { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2 { margin: 0; text-wrap: balance; }
h1 { font-size: 22px; } h2 { font-size: 18px; }
p { margin: 0; }
.sub { color: var(--muted); font-size: 13px; }
.label { font-size: 12px; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center, .center { justify-content: center; text-align: center; align-items: center; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
/* 揪ney Logo（F6） */
.brand { display: inline-flex; align-items: center; gap: 4px; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand .wm { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.brand .wm b { font-family: "Noto Sans TC", sans-serif; font-weight: 900; font-size: 21px; line-height: 1.3; color: #1D4E89; background: #FFC857; padding: 0 11px; border-radius: 999px; }
.brand .wm i { font-style: normal; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 9px; letter-spacing: 3.5px; padding-left: 3.5px; color: #1D4E89; }
.splash .brand svg { width: 56px; height: 56px; } .splash .brand .wm b { font-size: 28px; }
@media (prefers-color-scheme: dark) { .brand svg .ln { stroke: #FFFFFF; } .brand .wm i { color: #FFFFFF; } }
.demo { background: var(--tint-yellow); color: var(--fg); font-size: 13px; padding: 8px 12px; border-radius: 12px; }
.splash { min-height: 70vh; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; text-align: center; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; font-weight: 700; padding: 0 18px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); }
.btn.line { background: var(--line-green); color: #fff; }
.btn.danger { background: var(--no); color: #fff; }
.btn.wide { width: 100%; }
.dangertext { color: var(--no); }
.chip { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--sunk); color: var(--muted); font-weight: 500; white-space: nowrap; }
.chip.on { background: var(--fg); color: var(--bg); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.field { font: inherit; color: var(--fg); background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
.field.big { font-size: 17px; font-weight: 700; }
select { font: inherit; color: var(--fg); background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }

.topbar { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.topbar h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { width: 38px; height: 38px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 20px; display: grid; place-items: center; flex: none; }

.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; border: 2px solid var(--surface); object-fit: cover; flex: none; }
.avs { display: inline-flex; } .avs .av + .av { margin-left: -8px; }
.av.more { background: var(--sunk); color: var(--muted); }

/* 首頁 */
.todo { background: var(--fg); color: var(--bg); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.todo .label { color: inherit; opacity: .8; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 24px; line-height: 1.2; }
.tile span { font-size: 12px; font-weight: 500; }
.tile em { font-size: 10px; font-style: normal; color: var(--muted); }
.tile.time { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.tile.soon { opacity: .55; }
.evs { display: flex; flex-direction: column; gap: 8px; }
.ev { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--fg); }
.evmain { display: flex; align-items: center; gap: 12px; padding: 12px; flex: 1; min-width: 0; text-align: left; }
button.ev.evmain { width: 100%; }
.evmore { width: 40px; border-left: 1px solid var(--line); color: var(--muted); font-size: 20px; flex: none; }
.ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; background: var(--tint-blue); color: var(--blue); }
.t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t b, .t .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex: none; }
.t-done { background: var(--sunk); color: var(--muted); font-weight: 500; }
.t-act { background: var(--accent); color: var(--accent-ink); } .t-ok { background: rgba(var(--heat), .18); color: var(--yes); } .t-wait { background: var(--sunk); color: var(--muted); }
.gsec { display: flex; flex-direction: column; gap: 8px; }
.ghead { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 2px; font-weight: 700; text-align: left; }
.ghead .n { color: var(--muted); font-weight: 500; font-size: 13px; } .ghead em { font-style: normal; color: var(--accent-text); font-weight: 700; }
.chev { margin-left: auto; color: var(--muted); transition: transform .2s; } .collapsed .chev { transform: rotate(-90deg); }
.gdot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; } .gdot.big { width: 14px; height: 14px; }
.cdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.empty { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 22px 12px; border: 1.5px dashed var(--line); border-radius: 14px; }

/* 建立 */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .wd { font-size: 11px; color: var(--muted); font-weight: 700; }
.cal button { height: 40px; border-radius: 10px; font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }
.cal button.sel { background: var(--blue); color: var(--blue-ink); }
.cal button:disabled { opacity: .25; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { width: 34px; height: 34px; border-radius: 50%; } .sw.on { outline: 3px solid var(--fg); outline-offset: 2px; }

/* 喬時間 */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--sunk); border-radius: 12px; padding: 4px; }
.seg button { height: 38px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.gridwrap { overflow: visible; }
.tgrid { display: grid; gap: 3px; width: min(75vw, 100%); margin: 0 auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tgrid .hd, .tgrid .corner { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; background: var(--bg); }
.tgrid .hd { text-align: center; font-size: 12px; font-weight: 700; padding: 4px 0; line-height: 1.25; border-radius: 8px; }
.tgrid .hd small { display: block; color: var(--muted); font-weight: 500; font-size: 10px; white-space: nowrap; }
button.hd { background: var(--bg); }
button.hd:active, button.tl:active { background: var(--sunk); }
.tl { font-size: 11px; color: var(--muted); text-align: right; padding: 0 6px 0 0; line-height: 1; transform: translateY(-5px); font-family: var(--display); font-variant-numeric: tabular-nums; }
button.tl { height: 24px; transform: none; display: flex; align-items: flex-start; justify-content: flex-end; border-radius: 4px; }
.cell { height: 24px; background: var(--heat0); border-radius: 4px; touch-action: manipulation; display: block; width: 100%; padding: 0; }
#tgrid .cell { touch-action: none; }
.cell.mine { background: var(--blue); }
.cell.anchor { outline: 3px solid var(--accent); outline-offset: -1px; }
.cell.all { outline: 2px solid var(--accent); outline-offset: -2px; }
.cell.picked { box-shadow: inset 0 0 0 3px var(--fg); }
.sticky-actions { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); background: var(--bg); padding-top: 8px; flex-wrap: nowrap; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { width: 16px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.ring { outline: 2px solid var(--accent); outline-offset: -2px; }
.best { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.slot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--sunk); }
.slot b { font-family: var(--display); font-variant-numeric: tabular-nums; }
.who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.who span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--sunk); }
.who span.off { text-decoration: line-through; opacity: .5; }
.bigicon { font-size: 48px; line-height: 1; }
.howto { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.howto b { font-size: 14px; }
.qgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qbtn { min-height: 44px; border-radius: 12px; background: var(--blue); color: var(--blue-ink); font-weight: 700; font-size: 14px; }
.qbtn.ghosty { background: var(--sunk); color: var(--fg); }

/* 底部視窗 */
.scrim { position: fixed; inset: 0; background: rgba(8, 10, 20, .45); z-index: 15; display: flex; align-items: flex-end; justify-content: center; }
.sheet { position: relative; background: var(--surface); width: 100%; max-width: 460px; max-height: 85vh; overflow: auto; border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column; gap: 14px; padding: 10px max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.x { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); }
.linkbox { display: flex; align-items: center; gap: 8px; background: var(--sunk); border-radius: 12px; padding: 8px 8px 8px 12px; margin: 6px 0 4px; }
.linkbox span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-family: ui-monospace, monospace; }
.flist { display: flex; flex-direction: column; gap: 4px; }
.fitem { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--sunk); width: 100%; text-align: left; }
.fitem span { flex: 1; } .fitem.on { outline: 2px solid var(--blue); outline-offset: -2px; } .fitem b { color: var(--blue); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--fg); color: var(--bg);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; transition: .25s; pointer-events: none; z-index: 20; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 旅遊滑卡 */
.tile.trip { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ic.trip { background: var(--tint-yellow); color: var(--fg); }
.row.nowrap { flex-wrap: nowrap; }
.btn.sm { min-height: 42px; padding: 0 14px; flex: none; }
.linkish { color: var(--blue); font-size: 13px; text-decoration: underline; align-self: flex-start; padding: 4px 0; }
.center { text-align: center; }
.how3 span { font-size: 14px; color: var(--muted); }
.seg3 { grid-template-columns: repeat(3, 1fr); }
.seg .dot { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; margin-left: 2px; }
.thumb { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; flex: none; background-size: cover; background-position: center; }
.thumb.sm { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
.fitem .t { gap: 1px; }
.fitem.res .t .sub { white-space: normal; }
.rating { color: var(--star); font-weight: 700; font-family: var(--display); }
.progress { text-align: center; color: var(--muted); font-family: var(--display); font-weight: 600; }
.deck { position: relative; height: min(62vh, 480px); touch-action: none; user-select: none; -webkit-user-select: none; }
.card { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column;
  box-shadow: 0 10px 30px rgba(10, 15, 40, .14); will-change: transform; touch-action: none; }
.card.under { transform: scale(.95) translateY(12px); }
.card .img { flex: 1; position: relative; display: grid; place-items: center; background-size: cover; background-position: center; min-height: 0; }
.card .emoji { font-size: 84px; line-height: 1; }
.card .info { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.card h3 { margin: 0; font-size: 21px; font-weight: 900; min-width: 0; }
.card .addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stamp { position: absolute; top: 22px; padding: 4px 12px; border: 3px solid; border-radius: 10px; font-weight: 900; font-size: 22px; opacity: 0; background: rgba(255, 255, 255, .85); }
.stamp.yes { left: 18px; color: var(--yes); transform: rotate(-12deg); }
.stamp.no { right: 18px; color: var(--no); transform: rotate(12deg); }
.stamp.star { left: 50%; top: auto; bottom: 18px; transform: translateX(-50%); color: var(--star); }
.by { position: absolute; left: 14px; bottom: 14px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.actions { display: flex; justify-content: center; gap: 22px; align-items: center; }
.act { width: 62px; height: 62px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 26px; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(10, 15, 40, .08); }
.act.s { width: 50px; height: 50px; font-size: 20px; }
.act.no { color: var(--no); } .act.yes { color: var(--yes); } .act.star { color: var(--star); }
.reveal { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.reveal .big { font-family: var(--display); font-size: 44px; font-weight: 700; color: var(--accent-text); line-height: 1; }
.ritem { display: flex; align-items: center; gap: 12px; }
.ritem .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ritem .t .sub { white-space: normal; }
.ritem .bar { height: 7px; border-radius: 4px; background: var(--sunk); overflow: hidden; display: block; }
.ritem .bar i { display: block; height: 100%; background: var(--yes); }
.cnt { font-family: var(--display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; flex: none; }
.badge { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; margin-left: 6px; background: var(--yes); color: #fff; vertical-align: 2px; }
.maplink { width: 36px; height: 36px; border-radius: 10px; background: var(--sunk); display: grid; place-items: center; text-decoration: none; flex: none; }

/* 聚餐 / 去哪玩 */
.tile.meal, .tile.fun, .tile.pet { background: var(--sunk); border-color: var(--sunk); color: var(--blue); }
.tile.meal span, .tile.fun span, .tile.pet span { color: var(--fg); }
.tile span { white-space: nowrap; }
/* 帶寵物標籤 */
.ptags { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.ptag { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--blue); background: var(--tint-blue); padding: 1px 7px; border-radius: 6px; }
.ptag.bag { color: var(--blue); background: var(--tint-blue); }
.ptag.menu { color: var(--fg); background: var(--tint-yellow); }
.ptag.warn { color: var(--muted); background: var(--sunk); }
.petnote { font-size: 11px; line-height: 1.5; }
.tcard .when { font-family: var(--display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--sunk); font-size: 12px; font-weight: 700; }
.cbtn b { font-size: 22px; line-height: 1.1; font-weight: 400; display: grid; place-items: center; }
.cbtn:active { background: var(--line); }
.fitem .thumb, .ritem .thumb, .fitem .ic { flex: none; }
.fitem.off, .panel.off .ritem { opacity: .6; }
.fitem.off .thumb, .panel.off .ritem .thumb, .fitem.off b { filter: grayscale(1); color: var(--muted); }
.closed { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--no); background: rgba(229, 72, 77, .12); padding: 1px 7px; border-radius: 6px; margin: 1px 0; }
.openok { color: var(--yes); font-weight: 700; }
.cbtn.on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--accent); }
.cbtn.on b { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .15)); }
/* 快速選（可複選） */
.tgrid button.hd.quick { background: var(--tint-blue); border: 1.5px solid var(--blue); color: var(--blue); }
.tgrid button.hd.quick small { color: var(--blue); opacity: .8; }
.tgrid button.hd.quick i { display: block; font-style: normal; font-size: 10px; font-weight: 700; background: var(--blue); color: var(--blue-ink); border-radius: 6px; margin: 2px 3px 0; }
.qgrid { grid-template-columns: repeat(2, 1fr); }
.qchip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border-radius: 12px; background: var(--sunk); border: 2px solid transparent; text-align: left; }
.qchip.wide { grid-column: 1 / -1; }
.qchip b { font-size: 15px; } .qchip small { font-size: 12px; color: var(--muted); }
.qchip.on { background: var(--blue); color: var(--blue-ink); } .qchip.on small { color: var(--blue-ink); opacity: .85; }
.qchip.part { border-color: var(--blue); background: var(--tint-blue); }
.qchip.na { opacity: .45; }
.qchip.ghosty { align-items: center; }
.hours { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--fg); background: var(--tint-yellow); padding: 1px 7px; border-radius: 6px; margin: 1px 0; }
.card .hours { margin-top: 2px; }
.hours.ok { background: var(--sunk); color: var(--muted); font-weight: 500; }
.petbar { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--tint-yellow); color: var(--fg); }
.petbar > .i { width: 22px; height: 22px; flex: none; color: var(--accent-ink); }
.petbar .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.petbar.on { background: var(--tint-blue); } .petbar.on > .i { color: var(--blue-ink); }
.petbar .t b, .petbar .t .sub { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
.petbar:not(.on) { flex-wrap: wrap; align-items: flex-start; } .petbar:not(.on) .btn { flex: 1 0 100%; }
.row.end { justify-content: flex-end; }

/* 帶寵物：寵物條件（可複選）＋地點類型（單選） */
.pconds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pcond { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--sunk); font-size: 12px; font-weight: 700; border: 2px solid transparent; }
.pcond b { font-size: 22px; line-height: 1.1; font-weight: 400; color: var(--blue); display: grid; place-items: center; }
.pcond i { position: absolute; top: 4px; right: 6px; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px; line-height: 18px; text-align: center; color: #fff; background: transparent; transform: scale(0); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background-color .15s; }
.pcond.on { background: var(--tint-blue); border-color: var(--blue); color: var(--fg); }
.pcond.on i { background: var(--blue); color: var(--blue-ink); transform: scale(1); }
.cgrid.c3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- 動畫與觸感 ---------- */
body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn, .chip, .tile, .cbtn, .pcond, .fitem, .qchip, .seg button, .act, button.hd, .x, .maplink {
  transition: transform .14s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease; }
.btn:active:not(:disabled), .chip:active, .tile:active, .cbtn:active, .pcond:active, button.fitem:active, .qchip:active, .seg button:active, .x:active, .maplink:active { transform: scale(.95); }
.act:active { transform: scale(.88); }
.tile:active { filter: brightness(.95); }
/* 換頁 */
@keyframes pgIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes pgBack { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pg-in > :not(.scrim) { animation: pgIn .26s cubic-bezier(.2, .8, .2, 1) backwards; }
.pg-back > :not(.scrim) { animation: pgBack .26s cubic-bezier(.2, .8, .2, 1) backwards; }
.pg-in > :not(.scrim), .pg-back > :not(.scrim) { animation-delay: calc(0ms - var(--el, 0ms)); }
.pg-in > :nth-child(2), .pg-back > :nth-child(2) { animation-delay: calc(20ms - var(--el, 0ms)); }
.pg-in > :nth-child(3), .pg-back > :nth-child(3) { animation-delay: calc(40ms - var(--el, 0ms)); }
.pg-in > :nth-child(4), .pg-back > :nth-child(4) { animation-delay: calc(60ms - var(--el, 0ms)); }
.pg-in > :nth-child(n+5):not(.scrim), .pg-back > :nth-child(n+5):not(.scrim) { animation-delay: calc(80ms - var(--el, 0ms)); }
/* 切分頁：分頁按鈕下面的內容淡入 */
.tab-in .seg ~ :not(.scrim) { animation: fadeUp .22s ease backwards; animation-delay: calc(0ms - var(--el, 0ms)); }
.seg button.on { transition: background-color .2s, color .2s, box-shadow .2s; }
/* 底部視窗 */
@keyframes scrimIn { from { background: rgba(8, 10, 20, 0); } }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
.scrim.in { animation: scrimIn .22s ease backwards; animation-delay: calc(0ms - var(--el, 0ms)); }
.scrim.in .sheet { animation: sheetIn .3s cubic-bezier(.2, .9, .25, 1) backwards; animation-delay: calc(0ms - var(--el, 0ms)); }
.scrim.out { transition: background-color .17s; background: rgba(8, 10, 20, 0); }
.scrim.out .sheet { transition: transform .17s ease-in; transform: translateY(100%); }
/* 搜尋結果一個一個出現；新加入候選池的地點彈出來 */
.stagger > * { animation: fadeUp .24s ease backwards; animation-delay: calc(0ms - var(--el, 0ms)); }
.stagger > :nth-child(2) { animation-delay: calc(30ms - var(--el, 0ms)); } .stagger > :nth-child(3) { animation-delay: calc(60ms - var(--el, 0ms)); }
.stagger > :nth-child(4) { animation-delay: calc(90ms - var(--el, 0ms)); } .stagger > :nth-child(5) { animation-delay: calc(120ms - var(--el, 0ms)); }
.stagger > :nth-child(n+6) { animation-delay: calc(150ms - var(--el, 0ms)); }
@keyframes pop { 0% { opacity: 0; transform: scale(.92); } 60% { opacity: 1; transform: scale(1.02); } 100% { transform: none; } }
.fitem.pop { animation: pop .32s ease backwards; }
/* 滑卡：下一張浮上來 */
@keyframes rise { from { transform: scale(.95) translateY(12px); } to { transform: none; } }
.card.rise { animation: rise .25s ease backwards; }
/* 結果長條長出來 */
@keyframes grow { from { transform: scaleX(0); } }
.pg-in .ritem .bar i, .tab-in .ritem .bar i { transform-origin: left; animation: grow .5s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(100ms - var(--el, 0ms)); }

/* 選地點 */
.areaf { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; font-weight: 700; cursor: pointer; }
.areaf.ph { color: var(--muted); font-weight: 400; }
.areaf span { flex: none; font-size: 13px; font-weight: 700; color: var(--blue); }
.agrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.achip { padding: 9px 2px; border-radius: 10px; background: var(--sunk); font-size: 13px; font-weight: 700; transition: transform .14s, background-color .18s; }
.achip:active { transform: scale(.95); }
.achip.on { background: var(--blue); color: var(--blue-ink); }
/* 搜尋結果依地點分組 */
.gdiv { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 2px 2px; }
.gdiv:first-child { padding-top: 0; }
/* 退出／刪除 */
.divider { height: 1px; background: var(--line); margin: 2px 0; }
.warnbox { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--no); background: rgba(229, 72, 77, .08); }
.topbar h2 .i { margin-right: 6px; color: var(--blue); }
/* 算錢 */
.mcard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; transition: transform .14s; }
.mcard:active { transform: scale(.98); }
.mcard .t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.mcard .go { color: var(--muted); font-size: 20px; }
.ic.money { background: var(--tint-yellow); color: var(--fg); }
.badge { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.owe { background: var(--accent); color: var(--accent-ink); }
.badge.get { background: var(--tint-blue); color: var(--blue); }
.badge.ok { background: var(--sunk); color: var(--muted); }
.badge .i { width: 1.2em; height: 1.2em; }
.msum .big { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1.15; }
.msum .right { text-align: right; }
.msum .mine { font-weight: 700; font-size: 15px; margin-top: 4px; }
.mine.get, .mrow .v.get { color: var(--blue); } .mine.owe, .mrow .v.owe { color: var(--no); }
.mbal { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; }
.mrow { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.mrow .av { width: 26px; height: 26px; font-size: 11px; }
.mrow .nm { flex: 1; font-size: 14px; }
.mrow .v { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--muted); }
.fitem.exp .amt, .trow .amt { font-family: var(--display); font-size: 16px; color: var(--fg); white-space: nowrap; }
.fitem.exp .ic { width: 38px; height: 38px; font-size: 18px; }
.trow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--sunk); transition: background-color .2s, opacity .2s; }
.trow.me { background: var(--tint-yellow); }
.trow.done { opacity: .62; } .trow.done .amt { text-decoration: line-through; }
.trow .t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.trow .t b { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.trow .t b .i { color: var(--muted); }
.trow .chip { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); color: var(--blue); font-weight: 700; }
.tick { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 2px solid var(--blue); background: var(--surface); color: var(--blue-ink); display: grid; place-items: center; font-size: 16px; transition: transform .14s, background-color .18s; }
.tick[aria-pressed="true"] { background: var(--blue); }
.tick:active { transform: scale(.88); }
.tick:disabled { border-color: var(--line); opacity: .7; }
.tick:disabled[aria-pressed="true"] { background: var(--muted); border-color: var(--muted); }
.pchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.pchips .achip { display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 9px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msheet { display: flex; flex-direction: column; gap: 8px; }
.msheet .label { margin-top: 4px; }
.i.lg { width: 36px; height: 36px; color: var(--muted); }
/* 首頁：揪一團 */
.cta { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px 18px; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(232, 169, 59, .28); transition: transform .14s; }
.cta:active { transform: scale(.98); }
.cta .plus { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-ink); color: var(--accent); display: grid; place-items: center; font-size: 26px; font-weight: 700; flex: none; }
.cta .t { display: flex; flex-direction: column; gap: 2px; }
.cta .t b { font-size: 20px; } .cta .t span { font-size: 13px; opacity: .8; }
.howto { gap: 10px; }
.step { display: flex; align-items: center; gap: 10px; }
.step .n { width: 20px; font-family: var(--display); font-weight: 700; color: var(--muted); text-align: center; }
.step .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-blue); color: var(--blue); font-size: 18px; flex: none; }
.step .t { display: flex; flex-direction: column; gap: 1px; }
.picks { display: flex; flex-direction: column; gap: 8px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 14px; background: var(--sunk); transition: transform .14s; }
.pick:active { transform: scale(.98); }
.pick .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--blue); font-size: 22px; flex: none; }
.pick .t { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.pick .t b { font-size: 16px; }
.pick .go { color: var(--muted); font-size: 20px; }
.pick.plain { background: none; border: 1.5px dashed var(--line); }
.pick.plain .ic { background: var(--tint-blue); }
.mdet { display: flex; align-items: baseline; gap: 10px; }
.mdet .big { font-family: var(--display); font-size: 30px; font-weight: 700; }
.msheet .mrow .nm .sub { margin-left: 4px; }
.foot { text-align: center; padding: 18px 0 4px; font-size: 12px; } .foot a { color: var(--muted); }
.gsec.past .ev { opacity: .78; }
