/* Polar 標記（Polar Tags）
   跟 Polar 課程網站同一套：深灰黑底 + 單一主色（珊瑚橘）。所有顏色都從這裡的變數來，不另外用綠、藍、紫。
   玩家的顏色標籤也只用主色的深淺＋暖灰（跟範圍表的動作顏色同一組），每個顏色旁邊一定寫出它代表的意思。 */
:root {
  color-scheme: dark;
  --bg: #1a1a19;
  --bg-2: #1e1e1d;
  --card: #242423;
  --card-2: #2b2b29;
  --line: #2f2e2c;
  --line-2: #3a3936;
  --ink: #eceae6;
  --ink-2: #c2bfb8;
  --muted: #8d8a83;
  --faint: #67645f;
  --accent: #d97757;
  --accent-2: #e3906f;
  --accent-deep: #b55d3f;
  --accent-soft: rgba(217, 119, 87, .12);
  --accent-line: rgba(217, 119, 87, .45);
  --danger: #e0715a;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  --navw: 260px;
  --rail: 20px;
  --topbar: 72px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  /* 顏色標籤（跟範圍表的動作顏色同一組：主色深淺＋暖灰） */
  --tag-coral: #d97757;
  --tag-peach: #efb08e;
  --tag-brick: #b5482e;
  --tag-ochre: #c08a4e;
  --tag-gold: #dcb36a;
  --tag-sand: #d9cdb4;
  --tag-taupe: #a59b88;
  --tag-stone: #7a756d;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, rgba(255, 255, 255, .025), transparent 70%), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.6 var(--font);
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { cursor: default; opacity: .5; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent-soft); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: #3a3936 transparent; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; fill: currentColor; flex: none; display: block; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.xs { width: 13px; height: 13px; }
svg.i.lg { width: 26px; height: 26px; }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 外框：上方列、側欄 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: calc(var(--topbar) + var(--safe-t)); padding: var(--safe-t) var(--safe-r) 0 var(--safe-l); display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; background: rgba(26, 26, 25, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.icon-btn { width: 46px; height: 46px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset; transition: color .15s, border-color .15s; }
.icon-btn:hover { color: var(--ink); border-color: #4a4844; }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.flat { background: transparent; border-color: transparent; box-shadow: none; }
.icon-btn.flat:hover { background: var(--card); border-color: var(--line-2); }
.tb-left { display: grid; place-items: center; }
.corner-mark { display: none; width: 44px; height: 44px; place-items: center; border-radius: 12px; transition: background .15s; }
.corner-mark:hover { background: var(--card); }
.corner-mark svg { width: 30px; height: 30px; }
.logo { justify-self: center; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo-mark { display: inline-flex; color: var(--accent); }
.logo-mark svg { width: 24px; height: 24px; }
.logo-text { font-size: 17px; font-weight: 500; letter-spacing: .14em; color: var(--ink-2); }
.logo-sub { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--accent); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-soft); }
.tb-right { display: grid; place-items: center; }

.layout { display: grid; grid-template-columns: var(--navw) minmax(0, 1fr); transition: grid-template-columns .22s ease; }
.sidenav { position: sticky; top: calc(var(--topbar) + var(--safe-t)); height: calc(100vh - var(--topbar) - var(--safe-t)); overflow-x: hidden; overflow-y: auto; padding: 8px 14px 40px; transition: opacity .16s ease, visibility .22s; }
.sidenav .nav { width: 232px; }
.nav a, .nav button.nav-a { display: flex; width: 100%; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-size: 14.5px; text-align: left; transition: background .12s, color .12s; }
.nav a svg, .nav button.nav-a svg { color: var(--muted); }
.nav a:hover, .nav button.nav-a:hover { background: var(--card); color: var(--ink); }
.nav a.active { background: var(--card-2); color: var(--ink); }
.nav a.active svg { color: var(--accent); }
.nav-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav-sep { height: 1px; background: var(--line); margin: 12px 10px; }
.nav-label { font-size: 11px; letter-spacing: .12em; color: var(--faint); padding: 16px 12px 6px; display: flex; align-items: center; justify-content: space-between; }
.nav-label button { color: var(--faint); border-radius: 6px; padding: 2px; }
.nav-label button:hover { color: var(--accent); }
.nav .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin: 0 6px; }
.nav-me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.nav-me .who { min-width: 0; flex: 1; }
.nav-me .nm { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-me .em { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; overflow-x: clip; container-type: inline-size; }
.page { max-width: 1120px; margin: 0 auto; padding: 18px 36px 120px; }
.page.narrow { max-width: 760px; }
.scrim { display: none; }

body.nav-collapsed { --navw: 0px; }
body.nav-collapsed .sidenav { opacity: 0; visibility: hidden; pointer-events: none; }
.nav-line { position: fixed; z-index: 30; top: calc(var(--topbar) + var(--safe-t)); bottom: 0; left: var(--navw); width: 1px; background: rgba(236, 234, 230, .13); pointer-events: none; transition: left .22s ease, background .15s; }
body.nav-collapsed .nav-line { left: var(--rail); }
.nav-toggle { position: fixed; z-index: 31; top: calc(var(--topbar) + (100vh - var(--topbar)) / 2 - 15px); left: calc(var(--navw) - 15px); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: var(--bg-2); border: 1px solid rgba(236, 234, 230, .22); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: left .22s ease, color .15s, border-color .15s; }
.nav-toggle:hover { color: var(--accent); border-color: var(--accent); }
.nav-toggle svg { width: 18px; height: 18px; transition: transform .2s; }
body.nav-collapsed .nav-toggle { left: calc(var(--rail) - 15px); }
body.nav-collapsed .nav-toggle svg { transform: rotate(180deg); }

/* ---------- 字、常用元件 ---------- */
.overline { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; color: var(--muted); }
.overline.orange { color: var(--accent); }
.h1 { font-size: 30px; font-weight: 500; margin: 0; line-height: 1.3; letter-spacing: .02em; color: var(--ink); }
.h2 { font-size: 19px; font-weight: 500; margin: 0; letter-spacing: .02em; }
.h3 { font-size: 16px; font-weight: 500; margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.accent { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 18px 20px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 14px; }
.section-title:first-child { margin-top: 8px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 22px; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.page-head .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.empty { padding: 40px 20px; color: var(--muted); text-align: center; display: grid; justify-items: center; gap: 10px; }
.empty .em-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--accent); }
.empty .em-t { color: var(--ink); font-size: 16px; font-weight: 500; }
.empty .em-s { font-size: 14px; max-width: 420px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 500; font-size: 14px; border: 1px solid var(--line-2); color: var(--ink); background: var(--card); white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.btn:hover { border-color: #4a4844; background: var(--card-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1b1310; font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--card); color: var(--ink); }
.btn.danger { color: var(--danger); border-color: rgba(224, 113, 90, .4); }
.btn.danger:hover { background: rgba(224, 113, 90, .1); border-color: var(--danger); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15.5px; }
.btn.block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line-2); color: var(--ink-2); }
.pill svg { width: 11px; height: 11px; }
.pill.on { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.pill.dim { color: var(--muted); }
.badge-new { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; padding: 1px 7px; border-radius: 999px; color: #1b1310; background: var(--accent); }
.kbd { font-size: 11.5px; color: var(--faint); border: 1px solid var(--line-2); border-radius: 6px; padding: 0 6px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.sp { flex: 1; }
.stack { display: grid; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 表單 ---------- */
.field { display: grid; gap: 7px; }
.field + .field { margin-top: 16px; }
.field > label, .field > .lb { font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field .hint { font-size: 12.5px; color: var(--faint); }
.input, .textarea, .select { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238d8a83'%3E%3Cpath d='M7.4 8.6 12 13.2l4.6-4.6L18 10l-6 6-6-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
.input.code { font-size: 26px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-left: 42px; }
.input-wrap > svg { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.input-wrap .clear { position: absolute; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); }
.input-wrap .clear:hover { color: var(--ink); background: var(--card-2); }
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 3px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; padding: 5px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--card-2); color: var(--accent); box-shadow: 0 0 0 1px var(--line-2) inset; }
.seg.full { display: flex; }
.seg.full button { flex: 1; }
.switch { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; background: var(--card); }
.switch i { position: relative; width: 28px; height: 16px; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-2); transition: transform .15s, background .15s; }
.switch.on { color: var(--ink); border-color: var(--accent-line); }
.switch.on i { background: var(--accent); }
.switch.on i::after { transform: translateX(12px); background: #fff7f2; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); }
.stepper button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.stepper button:hover { color: var(--accent); }
.stepper .v { min-width: 34px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.form-err { color: var(--danger); font-size: 13.5px; min-height: 20px; }

/* ---------- 顏色標籤 ---------- */
.tagdot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25) inset; }
.tagdot.lg { width: 18px; height: 18px; }
.tagchip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line-2); background: var(--bg-2); white-space: nowrap; max-width: 100%; }
.tagchip span { overflow: hidden; text-overflow: ellipsis; }
.tagchip.sm { height: 24px; font-size: 12px; padding: 0 9px 0 7px; gap: 6px; }
.tagchip.sm .tagdot { width: 9px; height: 9px; }
button.tagchip { cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
button.tagchip:hover { border-color: #4a4844; color: var(--ink); }
button.tagchip.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }
.tagpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tagpick button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); text-align: left; font-size: 14px; transition: border-color .15s, background .15s; }
.tagpick button:hover { border-color: var(--line-2); color: var(--ink); }
.tagpick button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.tagpick button .tl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tagpick button .ck { color: var(--accent); visibility: hidden; }
.tagpick button.on .ck { visibility: visible; }
.c-coral { background: var(--tag-coral); } .c-peach { background: var(--tag-peach); } .c-brick { background: var(--tag-brick); } .c-ochre { background: var(--tag-ochre); }
.c-gold { background: var(--tag-gold); } .c-sand { background: var(--tag-sand); } .c-taupe { background: var(--tag-taupe); } .c-stone { background: var(--tag-stone); }
.c-none { background: transparent; box-shadow: 0 0 0 1.5px var(--line-2) inset; }

/* ---------- 頭像 ---------- */
.av { position: relative; width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: #2e2d2b; color: var(--muted); }
.av svg.face, .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring, transparent); }
.av.xs { width: 26px; height: 26px; }
.av.sm { width: 36px; height: 36px; }
.av.md { width: 56px; height: 56px; }
.av.lg { width: 88px; height: 88px; }
.av.xl { width: 132px; height: 132px; }
.av .ini { font-weight: 600; font-size: 40%; color: var(--ink-2); }
.av-stack { display: flex; }
.av-stack .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }
.av-stack .av:first-child { margin-left: 0; }

/* ---------- 玩家卡 ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pgrid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pcard { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 14px 14px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; transition: border-color .15s, background .15s, transform .15s; overflow: hidden; }
.pcard::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ring, transparent); }
.pcard:hover { border-color: var(--line-2); background: var(--card-2); }
.pcard .pc-body { flex: 1; min-width: 0; display: grid; gap: 5px; }
.pcard .pc-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pcard .pc-name { font-weight: 500; font-size: 15.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .pc-nick { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .pc-note { font-size: 13px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pcard .pc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.pcard .pc-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.pcard.sel { border-color: var(--accent); background: var(--accent-soft); }
.pcard .pc-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.pcard.sel .pc-check { background: var(--accent); border-color: var(--accent); color: #1b1310; }
.plist { display: grid; gap: 8px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; transition: border-color .15s, background .15s; }
.prow:hover { border-color: var(--line-2); background: var(--card-2); }
.prow.sel { border-color: var(--accent); background: var(--accent-soft); }
.prow .pr-body { flex: 1; min-width: 0; }
.prow .pr-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .pr-s { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticker { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; line-height: 1; }
.sticker.lg { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; }

/* 工具列：搜尋、篩選、排序 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input-wrap { flex: 1 1 280px; }
.toolbar .input { min-height: 42px; border-radius: 999px; background: var(--card); }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 16px; }
.filters::-webkit-scrollbar { display: none; }
.count-line { font-size: 13px; color: var(--faint); margin: -4px 0 12px; }

/* ---------- 首頁 ---------- */
.home-hero { min-height: 34vh; display: grid; place-items: center; text-align: center; padding: 34px 0 6px; }
.hero-mark { color: var(--accent); display: inline-flex; margin-bottom: 18px; }
.hero-mark svg { width: 52px; height: 52px; }
.greet { font-size: 30px; font-weight: 400; color: var(--ink-2); letter-spacing: .04em; margin: 0 0 26px; }
.ask-bar { width: min(640px, 100%); margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 22px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--muted); font-size: 16px; text-align: left; transition: border-color .15s; }
.ask-bar:hover { border-color: #4a4844; }
.ask-bar > span:first-child { flex: 1; }
.ask-bar .go { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--faint); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 30px; }
.qcard { display: flex; gap: 14px; align-items: center; padding: 16px 16px 16px 18px; text-align: left; width: 100%; transition: border-color .15s, background .15s; }
.qcard:hover { border-color: var(--line-2); background: var(--card-2); }
.qcard.hot { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--card) 80%); }
.cc-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--accent); flex: none; }
.qcard.hot .cc-ic { background: var(--accent); border-color: var(--accent); color: #1b1310; }
.cc-body { flex: 1; min-width: 0; }
.cc-t { font-weight: 500; font-size: 15.5px; }
.cc-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.chev { display: inline-flex; color: var(--faint); }
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--card); margin-bottom: 18px; }
.banner .b-t { font-weight: 500; }
.banner .b-s { font-size: 13px; color: var(--muted); }

/* ---------- 集卡冊 ---------- */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.bcard { display: grid; gap: 0; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; text-align: left; width: 100%; transition: border-color .15s, transform .15s; }
.bcard:hover { border-color: var(--line-2); }
.bcard .bc-cover { position: relative; height: 104px; display: flex; align-items: flex-end; padding: 12px 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--cv, var(--accent)) 38%, #1e1e1d), #1e1e1d 85%); }
.bcard .bc-cover .pix { position: absolute; right: 12px; top: 12px; opacity: .55; color: var(--cv, var(--accent)); }
.bcard .bc-cover .pix svg { width: 44px; height: 44px; }
.bcard .bc-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.bcard .bc-t { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard .bc-s { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 20px; }
.bcard .bc-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); }
.bcard.add { place-items: center; align-content: center; min-height: 200px; color: var(--muted); border-style: dashed; background: transparent; gap: 10px; }
.bcard.add:hover { color: var(--accent); border-color: var(--accent-line); }
.cover-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-pick button { width: 36px; height: 36px; border-radius: 10px; border: 2px solid transparent; }
.cover-pick button.on { border-color: var(--ink); }
.binder-hero { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; padding: 22px 22px 18px; border-radius: var(--radius); margin-bottom: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--cv, var(--accent)) 30%, #1e1e1d), var(--card) 75%); }
.binder-hero .bh-t { font-size: 26px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.binder-hero .bh-s { color: var(--ink-2); margin-top: 6px; overflow-wrap: anywhere; }
.binder-hero .bh-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.binder-hero .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- 玩家頁 ---------- */
.p-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px; margin-bottom: 16px; }
.p-hero .ph-t { font-size: 28px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.p-hero .ph-nick { color: var(--muted); margin-top: 2px; }
.p-hero .ph-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.p-hero .acts { display: flex; gap: 8px; flex-wrap: wrap; align-self: start; }
.p-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.p-note { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; color: var(--ink); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.note-log { display: grid; gap: 10px; }
.note-item { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); }
.note-item .ni-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.note-item .ni-b { white-space: pre-wrap; overflow-wrap: anywhere; }

/* 編輯玩家 */
.edit-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.look-card { padding: 18px; position: sticky; top: calc(var(--topbar) + 16px); }
.look-preview { display: grid; place-items: center; padding: 8px 0 14px; }
.photo-box { position: relative; width: 168px; height: 168px; border-radius: 50%; overflow: hidden; background: #2e2d2b; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ring, var(--line-2)); }
.photo-box img, .photo-box svg { width: 100%; height: 100%; object-fit: cover; }
.look-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.avb { margin-top: 14px; }
.avb-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.avb-tabs::-webkit-scrollbar { display: none; }
.avb-tabs button { flex: none; padding: 6px 11px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.avb-tabs button.on { background: var(--card-2); color: var(--accent); box-shadow: 0 0 0 1px var(--line-2) inset; }
.avb-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 2px; }
.avb-opts button { aspect-ratio: 1; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; transition: border-color .12s; }
.avb-opts button:hover { border-color: var(--line-2); }
.avb-opts button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.avb-opts button svg { width: 100%; height: 100%; }
.avb-opts .swatch { width: 60%; height: 60%; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset; }
.avb-opts .none { font-size: 12px; color: var(--faint); }
.stick-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.stick-pick button { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .12s, transform .12s; }
.stick-pick button:hover { border-color: var(--line-2); }
.stick-pick button.on { border-color: var(--accent); background: var(--accent-soft); }
.stick-pick button:active { transform: scale(.94); }
.save-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 0 calc(12px + var(--safe-b)); margin-top: 18px; background: linear-gradient(180deg, transparent, var(--bg) 30%); }

/* 裁切照片 */
.crop { position: relative; width: min(340px, 80vw); aspect-ratio: 1; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #111; touch-action: none; cursor: grab; }
.crop:active { cursor: grabbing; }
.crop img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(10, 10, 10, .6); pointer-events: none; outline: 1.5px solid rgba(255, 255, 255, .5); outline-offset: -1px; }
.crop-zoom { display: flex; align-items: center; gap: 12px; margin: 16px auto 0; width: min(340px, 80vw); color: var(--muted); }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 4px; background: var(--line-2); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }

/* ---------- 對話框：桌機置中，手機從下面滑上來 ---------- */
.sheet-ov { position: fixed; inset: var(--vvt, 0px) 0 var(--kb, 0px) 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(10, 10, 10, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .18s ease; }
.sheet-ov.on { opacity: 1; }
.sheet { width: min(520px, 100%); max-height: min(86vh, 820px, calc(100vh - 48px - var(--kb, 0px) - var(--vvt, 0px))); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; transform: translateY(10px) scale(.98); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.sheet.wide { width: min(760px, 100%); }
.sheet-ov.on .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 22px; border-bottom: 1px solid var(--line); }
.sheet-head .st { flex: 1; min-width: 0; font-size: 17px; font-weight: 500; }
.sheet-head .ss { font-size: 13px; color: var(--muted); }
.sheet-body { padding: 18px 22px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 22px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg-2); }
.sheet-grab { display: none; }
.confirm-t { font-size: 17px; font-weight: 500; margin-bottom: 6px; }
.confirm-s { color: var(--muted); white-space: pre-wrap; }

/* ---------- 成員、邀請 ---------- */
.mrow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .mr-body { flex: 1; min-width: 0; }
.mrow .mr-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .mr-s { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .select { min-height: 34px; height: 34px; padding: 4px 34px 4px 12px; font-size: 13px; border-radius: 999px; width: auto; background-position: right 8px center; background-size: 18px; }
.invite-box { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 12px; border: 1px dashed var(--accent-line); background: var(--accent-soft); }
.invite-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.role-list { display: grid; gap: 8px; }
.role-list button { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); text-align: left; }
.role-list button .rl-ic { grid-row: span 2; color: var(--muted); padding-top: 2px; }
.role-list button .rl-t { font-weight: 500; }
.role-list button .rl-s { font-size: 12.5px; color: var(--muted); }
.role-list button.on { border-color: var(--accent); background: var(--accent-soft); }
.role-list button.on .rl-ic { color: var(--accent); }

/* ---------- 臨時桌子 ---------- */
.table-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.table-stage { position: relative; padding: 10px; }
.tbl-svg { display: block; width: 100%; height: auto; max-height: calc(100vh - 220px); margin: 0 auto; font-family: var(--font); user-select: none; -webkit-user-select: none; }
.tb-rail { fill: #161615; stroke: rgba(217, 119, 87, .55); stroke-width: 1.5; }
.tb-felt { fill: #232220; stroke: #2f2e2c; stroke-width: 1; }
.tb-line { fill: none; stroke: rgba(236, 234, 230, .06); stroke-width: 1; }
.tb-brand text { fill: var(--accent); opacity: .42; font-size: 15px; letter-spacing: .3em; }
.tb-pot { fill: var(--ink-2); font-size: 14px; font-weight: 500; }
.tb-main { fill: var(--muted); font-size: 12px; }
.seat { cursor: pointer; }
.seat .s-box { fill: #2b2b29; stroke: #3a3936; stroke-width: 1; transition: stroke .15s; }
.seat:hover .s-box { stroke: #5a5752; }
.seat.on .s-box { stroke: var(--accent); stroke-width: 2; }
.seat.empty .s-box { fill: #1f1f1e; stroke-dasharray: 4 4; }
.seat.me .s-box { stroke: var(--accent); }
.seat .s-name { fill: var(--ink); font-size: 13px; font-weight: 500; }
.seat .s-sub { fill: var(--muted); font-size: 11.5px; }
.seat .s-stack { fill: var(--accent); font-size: 12px; font-weight: 600; }
.seat .s-num { fill: var(--faint); font-size: 11px; font-weight: 600; }
.seat .s-plus { fill: var(--faint); font-size: 22px; }
.seat .s-ring { fill: none; stroke-width: 3; }
.seat .s-avbg { fill: #2e2d2b; }
.btn-dealer { fill: var(--ink); }
.btn-dealer-t { fill: #1d1c1b; font-size: 11px; font-weight: 700; }
.tbl-side { display: grid; gap: 12px; position: sticky; top: calc(var(--topbar) + 16px); }
.tbl-side .card { padding: 14px 16px; }
.tbl-stat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tbl-stat > div { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.tbl-stat .k { font-size: 11.5px; color: var(--faint); letter-spacing: .06em; }
.tbl-stat .v { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.seat-list { display: grid; gap: 6px; }
.seat-li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 13.5px; text-align: left; width: 100%; }
.seat-li:hover { border-color: var(--line-2); }
.seat-li.on { border-color: var(--accent-line); background: var(--accent-soft); }
.seat-li .sn { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); flex: none; }
.seat-li .stk { margin-left: auto; color: var(--accent); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.blind-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.blind-row .input { min-height: 40px; padding: 8px 10px; font-size: 14px; text-align: center; }
.mini-lb { font-size: 11.5px; color: var(--faint); margin-bottom: 4px; display: block; }

/* ---------- 方案 ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan { padding: 22px; display: grid; gap: 12px; align-content: start; }
.plan.on { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--card) 60%); }
.plan .pl-n { font-size: 18px; font-weight: 500; }
.plan .pl-p { font-size: 28px; font-weight: 500; }
.plan .pl-p small { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { color: var(--accent); margin-top: 3px; }
.meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.usage { display: grid; gap: 14px; }
.usage .u-h { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }

/* ---------- 設定、帳號 ---------- */
.set-list { display: grid; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; color: var(--ink); }
.set-row:last-child { border-bottom: 0; }
a.set-row:hover, button.set-row:hover { background: var(--card-2); }
.set-row > svg:first-child { color: var(--muted); }
.set-row .sr-body { flex: 1; min-width: 0; }
.set-row .sr-t { font-size: 14.5px; }
.set-row .sr-s { font-size: 12.5px; color: var(--faint); }
.set-row.danger { color: var(--danger); }
.set-row.danger > svg:first-child { color: var(--danger); }
.tag-edit { display: grid; gap: 8px; }
.tag-edit .te-row { display: flex; align-items: center; gap: 12px; }
.tag-edit .te-row .input { min-height: 42px; padding: 8px 12px; }
.doc { line-height: 1.8; color: var(--ink-2); }
.doc h1 { font-size: 26px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.doc h2 { font-size: 18px; font-weight: 500; color: var(--ink); margin-top: 28px; }
.doc h3 { font-size: 16px; font-weight: 500; color: var(--ink); }
.doc a { color: var(--accent); }
.doc ul, .doc ol { padding-left: 22px; }

/* ---------- 登入 ---------- */
.auth-page { min-height: calc(100vh - var(--topbar) - var(--safe-t) - var(--safe-b) - 44px); min-height: calc(100dvh - var(--topbar) - var(--safe-t) - var(--safe-b) - 44px); display: grid; place-items: center; }
.auth-card { width: min(440px, 100%); padding: 30px 30px 24px; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; margin-bottom: 22px; }
.auth-brand .ab-ic { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; }
.auth-card h1 { font-size: 24px; font-weight: 600; margin: 0 0 8px; }
.auth-card p { color: var(--ink-2); margin: 0 0 22px; }
.auth-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- 搜尋 ---------- */
.search-ov { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 10, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: none; padding: calc(90px + var(--safe-t)) 16px 16px; }
.search-ov.open { display: block; }
.search-box { max-width: 680px; margin: 0 auto; background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 130px); box-shadow: var(--shadow); }
.search-box .in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 17px; }
.search-box input::placeholder { color: var(--faint); }
.search-res { overflow-y: auto; padding: 6px; }
.search-res .sh { font-size: 11px; letter-spacing: .12em; color: var(--faint); padding: 10px 12px 4px; }
.search-res a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); }
.search-res a svg { color: var(--faint); }
.search-res a:hover, .search-res a.sel { background: var(--card-2); color: var(--ink); }
.search-res a.sel svg { color: var(--accent); }
.search-res .p { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-res .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 1px; }

/* ---------- 浮動按鈕（手機：標記新玩家） ---------- */
.fab { position: fixed; right: calc(18px + var(--safe-r)); bottom: calc(22px + var(--safe-b)); z-index: 25; height: 54px; padding: 0 20px 0 16px; border-radius: 999px; display: none; align-items: center; gap: 8px; background: var(--accent); color: #1b1310; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.fab:active { transform: scale(.97); }

/* ---------- 提示、同步狀態 ---------- */
.toast { position: fixed; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translateX(-50%) translateY(16px); background: var(--card-2); border: 1px solid var(--line-2); padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--ink-2); opacity: 0; transition: all .2s; pointer-events: none; z-index: 120; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { border-color: rgba(224, 113, 90, .5); color: var(--ink); }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.sync.ok i { background: var(--tag-taupe); }
.sync.busy i { background: var(--accent); animation: blink 1s ease-in-out infinite; }
.sync.off i { background: transparent; box-shadow: 0 0 0 1.5px var(--faint) inset; }
@keyframes blink { 50% { opacity: .3; } }
.skel { border-radius: var(--radius); background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border: 1px solid var(--line); }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 200; transition: opacity .3s; }
.boot svg { width: 56px; height: 56px; color: var(--accent); animation: bootp 1.4s ease-in-out infinite; }
@keyframes bootp { 50% { opacity: .45; transform: scale(.94); } }
.boot.out { opacity: 0; pointer-events: none; }

/* ---------- 前導教學（跟 Polar 課程網站同一種：畫面變暗、只亮一塊、旁邊氣泡講解） ---------- */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.tour.on { opacity: 1; }
.tour-spot { position: fixed; left: 0; top: 0; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(9, 9, 8, .74); outline: 1.5px solid rgba(236, 234, 230, .38); pointer-events: none; transition: left .34s cubic-bezier(.2, .8, .2, 1), top .34s cubic-bezier(.2, .8, .2, 1), width .34s cubic-bezier(.2, .8, .2, 1), height .34s cubic-bezier(.2, .8, .2, 1); }
.tour-spot.none { outline: 0; width: 0 !important; height: 0 !important; left: 50% !important; top: 50% !important; }
.tour-blk { position: fixed; inset: 0; pointer-events: auto; }
.tour-bub { position: fixed; left: 0; top: 0; width: 344px; max-width: calc(100vw - 24px); pointer-events: auto; padding: 16px 18px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 24px 70px rgba(0, 0, 0, .6); color: var(--ink); outline: none; transition: left .34s cubic-bezier(.2, .8, .2, 1), top .34s cubic-bezier(.2, .8, .2, 1); }
.tour-bub.center { width: 400px; padding: 22px 22px 16px; }
.tr-k { display: flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .12em; color: var(--accent); margin-bottom: 6px; }
.tr-h { font-size: 17px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.tour-bub.center .tr-h { font-size: 21px; }
.tr-b { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }
.tr-f { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tr-dots { display: flex; gap: 5px; margin-right: auto; }
.tr-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.tr-dots i.on { background: var(--accent); width: 16px; border-radius: 6px; }
.tr-skip { font-size: 13px; color: var(--faint); padding: 6px 4px; }
.tr-skip:hover { color: var(--ink-2); }

/* ---------- 響應式 ---------- */
@media (max-width: 1180px) {
  .table-wrap { grid-template-columns: minmax(0, 1fr); }
  .tbl-side { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .p-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .edit-grid { grid-template-columns: minmax(0, 1fr); }
  .look-card { position: static; }
}
@media (max-width: 900px) {
  :root { --topbar: 64px; }
  :root, body.nav-collapsed { --navw: 0px; }
  .nav-toggle, .nav-line { display: none; }
  body.nav-collapsed .sidenav { opacity: 1; visibility: visible; pointer-events: auto; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidenav { position: fixed; z-index: 40; top: 0; left: 0; height: 100vh; height: 100dvh; width: 290px; max-width: 86vw; padding-top: calc(24px + var(--safe-t)); padding-bottom: calc(40px + var(--safe-b)); background: var(--bg-2); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .5); }
  .sidenav .nav { width: auto; }
  body.nav-open .sidenav { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .5); }
  .topbar { grid-template-columns: 64px 1fr 64px; }
  .page { padding: 12px max(16px, var(--safe-r)) calc(110px + var(--safe-b)) max(16px, var(--safe-l)); }
  .h1, .greet { font-size: 24px; }
  .fab { display: inline-flex; }
  .fab[hidden] { display: none; }
  .fab-dup { display: none !important; }
  .p-hero { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 16px; }
  .p-hero .acts { grid-column: 1 / -1; }
  .p-hero .ph-t { font-size: 23px; }
  .binder-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .binder-hero .acts { justify-content: flex-start; }
  .binder-hero .bh-t { font-size: 22px; }
  /* 手機：對話框從下面滑上來 */
  .sheet-ov { place-items: end stretch; padding: calc(40px + var(--safe-t)) var(--safe-r) 0 var(--safe-l); }
  .sheet, .sheet.wide { width: 100%; max-height: calc(100dvh - 40px - var(--safe-t) - var(--kb, 0px) - var(--vvt, 0px)); border-radius: 22px 22px 0 0; border-bottom: 0; transform: translateY(100%); }
  .sheet-grab { display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 8px auto 0; flex: none; }
  .sheet-head { padding: 8px 12px 10px 18px; }
  .sheet-body { padding: 16px 18px; }
  .sheet-foot { padding: 12px 18px calc(12px + var(--safe-b)); }
  .sheet-foot .btn { flex: 1; }
  .search-ov { padding-top: calc(12px + var(--safe-t)); padding-left: 10px; padding-right: 10px; }
  .search-box { max-height: calc(100dvh - 24px - var(--safe-t) - var(--kb, 0px)); }
}
@media (min-width: 901px) {
  .topbar .menu-btn { display: none; }
  .corner-mark { display: grid; }
  .logo .logo-mark { display: none; }
}
@media (max-width: 640px) {
  .pgrid, .pgrid.compact { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pcard { padding: 12px; gap: 12px; }
  .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bcard .bc-cover { height: 78px; }
  .bcard .bc-cover .pix svg { width: 32px; height: 32px; }
  .bcard .bc-body { padding: 10px 12px 12px; }
  .bcard .bc-t { font-size: 15px; }
  .bcard .bc-s { display: none; }
  .bcard.add { min-height: 150px; }
  .quick { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 22px; }
  .home-hero { min-height: 0; padding-top: 24px; }
  .hero-mark svg { width: 42px; height: 42px; }
  .greet { margin-bottom: 18px; }
  .ask-bar { font-size: 15px; padding: 8px 8px 8px 18px; }
  .ask-bar .go { width: 38px; height: 38px; }
  .page-head { margin-bottom: 16px; }
  .page-head .acts .btn:not(.primary) .lbl { display: none; }
  .tagpick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-box { width: 136px; height: 136px; }
  .auth-card { padding: 24px 20px 18px; border-radius: 18px; }
  .tbl-stat .v { font-size: 15px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .card.pad { padding: 16px; }
  .logo-text { font-size: 16px; letter-spacing: .1em; }
}
@media (max-width: 380px) {
  .bgrid { grid-template-columns: minmax(0, 1fr); }
  .logo-sub { font-size: 11px; padding: 0 7px; }
}
/* 手機橫放、矮螢幕：上方列變矮 */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --topbar: 54px; }
  .icon-btn { width: 40px; height: 40px; }
  .tbl-svg { max-height: calc(100dvh - 80px); }
}
/* ============================================================
   第二批：登入／邀請頁外框、玩家卡編輯、捏臉、集卡冊、臨時桌、帳號
   ============================================================ */

/* 沒登入的頁面（登入、邀請）：沒有側欄，只留上方的標誌 */
body.bare { --navw: 0px; }
body.bare .page { padding-bottom: 24px; }
body.bare .sidenav, body.bare .nav-toggle, body.bare .nav-line, body.bare .fab, body.bare .scrim { display: none !important; }
body.bare .tb-left > *, body.bare .tb-right > * { visibility: hidden; }
body.bare .layout { grid-template-columns: minmax(0, 1fr); }
body.bare .logo .logo-mark { display: inline-flex; }

/* 頭像：字的大小跟著圓的大小走（.ini 是 40%） */
.av { font-size: 48px; }
.av.xs { font-size: 26px; }
.av.sm { font-size: 36px; }
.av.md { font-size: 56px; }
.av.lg { font-size: 88px; }
.av.xl { font-size: 132px; }
.av.seat { width: var(--seat, 58px); height: var(--seat, 58px); font-size: var(--seat, 58px); }
.av > svg.i { width: 46%; height: 46%; }
.av svg.face, .av svg.avatar { width: 100%; height: 100%; display: block; }
.photo-box { display: grid; place-items: center; font-size: 168px; color: var(--ink-2); flex: none; }
.photo-box .ini { font-size: 38%; font-weight: 600; }
button.photo-box { cursor: pointer; transition: box-shadow .15s, transform .15s; }
button.photo-box:hover { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-line); }
button.photo-box:active { transform: scale(.98); }

.btn.icon { width: 40px; padding: 0; flex: none; }
.btn.sm.icon { width: 32px; }
.sheet-foot .btn.icon { flex: none; }
.sheet-foot .sp { flex: 1; }
.sheet-foot[hidden] { display: none; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); padding: 6px 10px 6px 4px; margin: 0 0 10px -4px; border-radius: 999px; }
.back-link:hover { color: var(--accent); }
.tagchip.ghost { border-style: dashed; background: transparent; color: var(--muted); }
.toolbar .select { width: auto; min-height: 42px; border-radius: 999px; background-color: var(--card); font-size: 14px; padding-top: 8px; padding-bottom: 8px; flex: none; }
.toolbar .seg { flex: none; }
.menu-list { margin: -6px -8px -2px; }
.menu-list .set-row { border-radius: 12px; border-bottom: 0; padding: 12px 14px; }
.hint { font-size: 12.5px; color: var(--faint); }

/* 玩家卡：編輯／只能看 */
.pe { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 24px; align-items: start; }
.pe-look { display: grid; justify-items: center; gap: 14px; position: sticky; top: 0; }
.pe-look .look-actions { gap: 6px; }
.pe-form { min-width: 0; }
.pe-form .textarea { min-height: 132px; }
.pe-form .tagpick { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.pe-meta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 12.5px; color: var(--faint); }
.pe-why { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pe-why svg { flex: none; margin-top: 2px; color: var(--accent); }
.sheet.pe-sheet { width: min(780px, 100%); }
.sheet.pe-sheet .p-note { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); margin-top: 14px; line-height: 1.7; }

/* 捏虛擬頭像 */
.sheet.fb-sheet { width: min(720px, 100%); }
.fb-top { display: flex; align-items: center; justify-content: center; gap: 18px; padding-bottom: 6px; }
.fb-top .photo-box { width: 148px; height: 148px; font-size: 148px; background: #2e2d2b; }
.fb-side { display: grid; gap: 8px; }
.fb-regions { display: flex; margin-bottom: 12px; }
.fb .avb { margin-top: 10px; }
.fb .avb-opts { max-height: none; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }
.avb-opts.faces { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.avb-opts.faces button { aspect-ratio: auto; display: grid; grid-template-rows: auto auto; padding: 8px 6px 7px; gap: 6px; border-radius: 14px; }
.avb-opts.faces button svg { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; background: #2e2d2b; }
.avb-opts .cap { font-size: 11.5px; line-height: 1.3; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.avb-opts button.on .cap { color: var(--accent); }
.avb-opts.colors { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
.avb-opts.colors button { border-radius: 50%; }
.avb-opts.colors .swatch { width: 72%; height: 72%; }

/* 集卡冊 */
.bcard .bc-cover { overflow: hidden; }
.bc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.bcard .bc-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(20, 20, 19, .55)); pointer-events: none; }
.bcard .bc-cover .pill { z-index: 1; background: rgba(26, 26, 25, .7); }
.bcard .bc-cover .pill.on { background: rgba(48, 30, 24, .85); }
.bh-main { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.bh-pic { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; flex: none; border: 1px solid var(--line-2); }
button.pill { cursor: pointer; transition: border-color .15s, color .15s; }
button.pill:hover { border-color: var(--accent-line); color: var(--accent); }
.cover-row { display: flex; align-items: center; gap: 14px; }
.cover-prev { width: 92px; height: 64px; border-radius: 12px; flex: none; overflow: hidden; display: grid; place-items: center; color: var(--cv, var(--accent)); border: 1px solid var(--line-2); background: linear-gradient(135deg, color-mix(in srgb, var(--cv, var(--accent)) 38%, #1e1e1d), #1e1e1d 85%); }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.cover-prev svg { width: 30px; height: 30px; opacity: .7; }
.role-help { display: grid; gap: 8px; }
.rh { padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.rh-t { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.rh-t svg { color: var(--accent); }
.rh-t b { font-weight: 500; }
.rh-s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.inv-done { display: grid; gap: 14px; justify-items: stretch; }
.qr { width: min(220px, 62vw); aspect-ratio: 1; margin: 0 auto; padding: 12px; border-radius: 16px; background: #f4f1ea; }
.qr svg { width: 100%; height: 100%; display: block; }
.sheet.pick-sheet .sheet-body { min-height: min(46vh, 380px); }
.pick-ck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; flex: none; }
.prow.sel .pick-ck { background: var(--accent); border-color: var(--accent); color: #1b1310; }
.inv-cover { position: relative; height: 132px; margin: -30px -30px 0; border-radius: 22px 22px 0 0; overflow: hidden; display: grid; place-items: center; color: var(--cv, var(--accent)); background: linear-gradient(135deg, color-mix(in srgb, var(--cv, var(--accent)) 42%, #1e1e1d), #1e1e1d 85%); }
.inv-cover img { width: 100%; height: 100%; object-fit: cover; }
.inv-cover .pix svg { width: 56px; height: 56px; opacity: .8; }

/* 臨時桌：橢圓牌桌，座位照比例擺；窄畫面變成直的 */
.table-stage { padding: 14px; container-type: inline-size; }
.ptable { --seat: 58px; position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: calc(100dvh - var(--topbar) - 150px); margin: 0 auto; user-select: none; -webkit-user-select: none; }
.pt-felt { position: absolute; inset: 13% 11%; border-radius: 999px; background: radial-gradient(ellipse at 50% 38%, #33312e, #262524 72%); border: 1px solid #45423d; box-shadow: 0 0 0 10px #201f1e, 0 0 0 11px var(--line-2), 0 24px 60px rgba(0, 0, 0, .45), 0 0 80px rgba(217, 119, 87, .05) inset; display: grid; place-items: center; }
.pt-felt::before { content: ""; position: absolute; inset: 9%; border-radius: 999px; border: 1px dashed rgba(236, 234, 230, .1); }
.pt-center { position: relative; text-align: center; display: grid; gap: 4px; padding: 0 12px; }
.pt-brand { font-size: 12px; letter-spacing: .42em; padding-left: .42em; color: var(--faint); font-weight: 600; }
.pt-info { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pt-dealer { position: absolute; left: 50%; top: 92%; transform: translate(-50%, -50%); font-size: 11px; letter-spacing: .1em; color: var(--muted); padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); white-space: nowrap; }
.pt-seat { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; width: calc(var(--seat) + 44px); padding: 2px 0; border-radius: 14px; z-index: 1; }
.pt-av { position: relative; display: block; border-radius: 50%; transition: transform .15s; }
.pt-seat:hover .pt-av { transform: scale(1.05); }
.pt-seat:active .pt-av { transform: scale(.96); }
.pt-seat .av { background: #302f2c; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ring, var(--line-2)), 0 8px 18px rgba(0, 0, 0, .4); }
.pt-seat.empty .av { background: var(--bg-2); color: var(--faint); box-shadow: 0 0 0 1px var(--line-2) inset; border: 1px dashed transparent; }
.pt-seat.empty:hover .av { color: var(--accent); box-shadow: 0 0 0 1px var(--accent-line) inset; }
.pt-num { position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.pt-name { max-width: 100%; margin-top: 4px; padding: 0 2px; font-size: 12.5px; line-height: 1.25; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.pt-stack { font-size: 12px; line-height: 1.2; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.seat-note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 132px; overflow-y: auto; }
@container (min-width: 521px) and (max-width: 720px) {
  .ptable { --seat: 50px; aspect-ratio: 16 / 10.6; }
  .pt-seat { width: calc(var(--seat) + 36px); }
  .pt-name { font-size: 12px; }
}
@container (max-width: 520px) {
  .ptable { --seat: 48px; aspect-ratio: 3 / 4.25; max-height: none; }
  .pt-felt { inset: 9% 17%; box-shadow: 0 0 0 8px #201f1e, 0 0 0 9px var(--line-2), 0 20px 50px rgba(0, 0, 0, .45); }
  .pt-seat { width: calc(var(--seat) + 34px); }
  .pt-name { font-size: 12px; }
  .pt-info { font-size: 13px; }
}
@container (max-width: 400px) {
  .ptable { --seat: 42px; aspect-ratio: 3 / 4.5; }
  .pt-seat { width: calc(var(--seat) + 30px); }
  .pt-name, .pt-stack { font-size: 11px; }
  .pt-num { min-width: 18px; height: 18px; font-size: 10px; }
}

/* 帳號 */
.me-card { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.me-av { position: relative; border-radius: 50%; flex: none; }
.me-cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.me-av:hover .me-cam { color: var(--accent); border-color: var(--accent-line); }
.doc p { margin: 10px 0; }
.doc li { margin: 4px 0; }
.doc b { color: var(--ink); font-weight: 500; }
.doc-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.doc-table th { color: var(--faint); font-weight: 500; font-size: 12.5px; letter-spacing: .06em; }
.doc-table td:first-child { color: var(--ink); white-space: nowrap; }
button.sync { cursor: pointer; }
button.sync:hover { color: var(--ink-2); }
.search-res a .grow { min-width: 0; }
.search-res .tagdot { flex: none; }

@media (max-width: 900px) {
  .hide-m { display: none !important; }
  .inv-cover { margin: -30px -30px 0; }
}
@media (max-width: 640px) {
  .pe { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pe-look { position: static; }
  .pe-form .tagpick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-box { font-size: 136px; }
  .fb-top .photo-box { width: 120px; height: 120px; font-size: 120px; }
  .avb-opts.faces { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
  .inv-cover { height: 112px; margin: -24px -20px 0; border-radius: 18px 18px 0 0; }
  .me-card { gap: 14px; flex-wrap: wrap; }
  .me-card > .grow { min-width: 0; flex: 1 1 140px; }
  .me-card > .btn { flex: 1 1 100%; }
  .bh-pic { width: 60px; height: 60px; border-radius: 14px; }
  .binder-hero .acts .btn { flex: 1 1 auto; }
  .binder-hero .acts .btn.icon { flex: none; }
  .toolbar .select { flex: 1 1 auto; }
  .cover-row { align-items: flex-start; }
  .doc-table td:first-child { white-space: normal; }
}
/* 手機橫放：對話框用滿高度，牌桌不要超出畫面 */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --topbar: 52px; }
  .page-head { margin: 0 0 10px; align-items: center; }
  .page-head .overline, .page-head .sub { display: none; }
  .h1, .greet { font-size: 21px; }
  .ptable { max-height: calc(100dvh - var(--topbar) - 36px); min-height: 250px; }
  .fab { height: 46px; bottom: calc(12px + var(--safe-b)); }
  .sheet, .sheet.wide { max-height: calc(100dvh - 8px - var(--safe-t) - var(--kb, 0px) - var(--vvt, 0px)); }
  .sheet-ov { padding-top: calc(8px + var(--safe-t)); }
  .pe { grid-template-columns: 170px minmax(0, 1fr); gap: 16px; }
  .pe-look { position: sticky; }
  .pe .photo-box { width: 104px; height: 104px; font-size: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .topbar, .sidenav, .nav-toggle, .nav-line, .fab { display: none !important; }
  .layout { grid-template-columns: 1fr; }
}

/* iPhone 會在字級小於 16px 的輸入框取得焦點時自動放大整頁：觸控裝置的輸入框一律 16px */
@media (pointer: coarse) {
  .input, .textarea, .select, .mrow .select, .blind-row .input, .toolbar .select { font-size: 16px; }
  .input.code { font-size: 26px; }
}

/* 捏頭像：桌機沒辦法用手指左右滑，分頁和地區全部攤開（換行）；手機維持左右滑，右邊淡出提示後面還有 */
@media (min-width: 641px) {
  .fb .avb-tabs { flex-wrap: wrap; overflow: visible; }
  .fb .fb-regions { flex-wrap: wrap; overflow: visible; border-radius: 18px; }
}
@media (max-width: 640px) {
  .fb .avb-tabs, .fb .fb-regions { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); padding-right: 26px; }
}

/* 鍵盤開著的時候（手機瀏覽器）：底部不用再留 Home 橫條的空間 */
.kb-open .sheet-foot { padding-bottom: 12px; }
