/* ===== 字體：ROG 三套 + 中文黑體（依介面風格說明） ===== */
@font-face { font-family: "ROG Fonts"; src: url("../assets/fonts/ROGFonts-Regular.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Trade Gothic LT Pro Bold"; src: url("../assets/fonts/TradeGothicLTPro-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Roboto Condensed"; src: url("../assets/fonts/RobotoCondensed-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

/* ===== Design tokens（暗色為預設；亮色在 [data-theme=light] 覆寫；強調色由 theme.js 動態寫入） ===== */
:root {
  --bg: #0e0f13;
  --surface-1: #1a1b1f;
  --surface-2: #24252a;
  --surface-hover: #2c2d33;
  --surface-glass: rgba(26, 27, 31, 0.72);
  --text-1: #f2f2f2;
  --text-2: #9a9ca3;
  --text-3: #5c5e66;
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.16);
  --highlight-top: inset 0 1px 0 rgba(255,255,255,0.08);
  --card-sheen: linear-gradient(180deg, rgba(255,255,255,.035), transparent 40%);
  --shadow: none;
  --accent: #b840ff;
  --accent-rgb: 184,64,255;
  --accent-soft: rgba(184,64,255,0.14);
  --accent-glow: 0 0 24px rgba(184,64,255,0.45);
  --on-accent: #ffffff;
  --warn: #f5a56a;
  --glow-alpha: 0.22;
  --r-card: 20px; --r-dialog: 26px; --r-pill: 9999px; --r-badge: 6px;
  --font-product: "ROG Fonts", "Roboto Condensed", sans-serif;
  --font-head: "Trade Gothic LT Pro Bold", "Roboto Condensed", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-body: "Roboto Condensed", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --blur: blur(28px);
  --nav-w: 76px; --nav-w-open: 232px; --panel-w: 500px;
  --bottom-nav: 64px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #dcdcdf;
  --surface-1: #ebebed;
  --surface-2: #f4f4f5;
  --surface-hover: #ffffff;
  --surface-glass: rgba(235, 235, 237, 0.78);
  --text-1: #1a1a1a;
  --text-2: #6b6b70;
  --text-3: #a0a0a5;
  --border: rgba(0,0,0,0.07);
  --border-strong: rgba(0,0,0,0.12);
  --highlight-top: inset 0 1px 0 rgba(255,255,255,0.6);
  --card-sheen: none;
  --shadow: 0 8px 32px rgba(0,0,0,0.08);
  --glow-alpha: 0.16;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text-1); }
body {
  font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(var(--accent-rgb),0.06), transparent 60%);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: var(--surface-hover); border-radius: 8px; }
[hidden] { display: none !important; }

h1, h2, h3, .head, .btn, .label, .chip, .tab { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
h1 { font-size: 22px; margin: 0; } h2 { font-size: 16px; margin: 0; } h3 { font-size: 13px; margin: 0; color: var(--text-2); letter-spacing: .08em; }
.zh { text-transform: none; letter-spacing: 0; font-family: var(--font-body); }
.product { font-family: var(--font-product); font-style: italic; letter-spacing: .02em; }
.label { font-size: 11px; letter-spacing: .08em; color: var(--text-2); }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent); }
.glow-text { text-shadow: 0 0 18px rgba(var(--accent-rgb), .55); }
.small { font-size: 12px; }
.credit { font-size: 11px; color: var(--text-3); letter-spacing: .04em; }

/* 唯讀（僅查看／分享連結）時隱藏所有編輯控件 */
.readonly .edit-only { display: none !important; }

/* ===== 版面 ===== */
#app { min-height: 100vh; display: flex; }
.nav {
  position: sticky; top: 0; height: 100vh; width: var(--nav-w); flex: 0 0 auto;
  background: var(--surface-glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px;
  transition: width .18s ease; overflow: hidden; z-index: 20;
}
.nav.open { width: var(--nav-w-open); }
.nav .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; white-space: nowrap; }
.nav .brand svg { flex: 0 0 auto; border-radius: 8px; }
.nav .brand .name { font-family: var(--font-product); font-style: italic; font-size: 17px; letter-spacing: .06em; opacity: 0; transition: opacity .15s; }
.nav.open .brand .name { opacity: 1; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: var(--r-pill); color: var(--text-2); white-space: nowrap; border: 1px solid transparent; }
.nav-item svg { flex: 0 0 auto; }
.nav-item span { opacity: 0; transition: opacity .15s; font-family: var(--font-body); font-size: 14px; }
.nav.open .nav-item span, .nav.open .nav-credit { opacity: 1; }
.nav-item:hover { background: var(--surface-2); color: var(--text-1); }
.nav-item.active { background: var(--surface-2); color: var(--text-1); border-color: var(--border); box-shadow: var(--highlight-top); }
.nav-item.active svg { color: var(--accent); filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .6)); }
.nav .spacer { flex: 1; }
.nav-toggle { color: var(--text-3); }
.nav-credit { padding: 6px 12px 2px; opacity: 0; transition: opacity .15s; white-space: nowrap; }

main { flex: 1; min-width: 0; padding: 24px 28px 48px; max-width: 1240px; transition: padding-right .18s ease; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }

.bottom-nav { display: none; }

/* ===== 卡片 / 玻璃 ===== */
.card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--highlight-top), var(--shadow); background-image: var(--card-sheen); padding: 20px;
}
.card.tight { padding: 14px 16px; }
.card.sub { background: var(--surface-2); border-radius: 14px; box-shadow: none; }
.glass { background: var(--surface-glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--border); }
.hairline { border-top: 1px solid var(--border); margin: 12px 0; }

/* ===== 按鈕 / chip / tab ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--r-pill); font-size: 12px; border: 1px solid transparent; transition: background .12s, transform .08s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--accent-glow); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { border-color: var(--border-strong); color: var(--text-1); background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--surface-2); color: var(--text-1); }
.btn.soft:hover { background: var(--surface-hover); }
.btn.sm { height: 32px; padding: 0 14px; font-size: 11px; }
.btn.icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; color: var(--text-2); }
.btn.icon:hover { background: var(--surface-2); color: var(--text-1); }
.btn.icon.sm { width: 30px; height: 30px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn .zh { font-size: 13px; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 10px; letter-spacing: .06em; border: 1px solid var(--border-strong); color: var(--text-2); background: rgba(127,127,127,.06); white-space: nowrap; line-height: 1; }
.chip .zh { font-size: 11px; }
.chip.accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip.fill { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip.fill.glow { box-shadow: 0 0 16px rgba(var(--accent-rgb), .55); }
.chip.dim { opacity: .55; }
.chip.warn { border-color: rgba(245,165,106,.5); color: var(--warn); background: rgba(245,165,106,.08); }
.chip.clickable { cursor: pointer; } .chip.clickable:hover { background: var(--surface-hover); }
.chip.add { border-style: dashed; color: var(--text-3); }
.chip .swatch { width: 6px; height: 6px; border-radius: 50%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-pill); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 34px; padding: 0 16px; border-radius: var(--r-pill); font-size: 11px; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex: 0 0 auto; border: 1px solid transparent; }
.tab .zh { font-size: 12px; }
.tab:hover { color: var(--text-1); }
.tab.active { background: var(--surface-hover); color: var(--text-1); box-shadow: var(--highlight-top); border-color: var(--border); }
.tab .wd { font-family: var(--font-body); font-size: 10px; color: var(--text-3); text-transform: none; letter-spacing: 0; }
.tab .wd.holiday, .holiday { color: var(--warn); }
.tab.active .wd { color: var(--text-2); } .tab.active .wd.holiday { color: var(--warn); }

/* ===== 表單 ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > .label { padding-left: 2px; }
.input, textarea.input, select.input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; height: 40px; padding: 0 14px; color: var(--text-1); width: 100%; outline: none; transition: border-color .12s;
}
.input:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }
textarea.input { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; }
.input.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.input.inline { width: auto; display: inline-block; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select.input.sm { background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; padding-right: 26px; }
select.input option { background: var(--surface-2); }
.toggle { width: 40px; height: 22px; border-radius: var(--r-pill); background: var(--surface-hover); border: 1px solid var(--border-strong); position: relative; flex: 0 0 auto; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: left .15s, background .15s; }
.toggle.on { background: var(--accent-soft); border-color: var(--accent); } .toggle.on::after { left: 20px; background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), .8); }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); height: 30px; padding: 0 4px; }
.stepper button { width: 26px; height: 26px; border-radius: 50%; color: var(--text-2); display: grid; place-items: center; } .stepper button:hover { background: var(--surface-hover); color: var(--text-1); }
.stepper .val { min-width: 54px; text-align: center; font-size: 13px; }
select.input.stay-select { height: 22px; width: auto; padding: 0 22px 0 9px; font-size: 11px; line-height: 1; border-radius: var(--r-pill); background-color: rgba(127,127,127,.06); border-color: var(--border-strong); color: var(--text-2); background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px; }
select.input.stay-select:hover { background-color: var(--surface-hover); color: var(--text-1); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches .sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; position: relative; box-shadow: 0 0 0 1px var(--border-strong); }
.swatches .sw.on { border-color: var(--bg); box-shadow: 0 0 0 2px var(--text-1), 0 0 14px var(--c); }
.swatches .sw.custom { display: grid; place-items: center; background: var(--surface-2); overflow: hidden; }
.swatches .sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ===== 下拉多選 ===== */
.pop-wrap { position: relative; display: inline-block; }
.pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 200px; padding: 6px; border-radius: 16px; background: var(--surface-glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--border); box-shadow: 0 12px 40px rgba(0,0,0,.3); max-height: 60vh; overflow: auto; }
.pop.right { left: auto; right: 0; }
.pop .opt { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); color: var(--text-1); cursor: pointer; font-size: 14px; white-space: nowrap; }
.pop .opt:hover { background: var(--surface-hover); }
.pop .opt .tick { margin-left: auto; color: var(--accent); width: 16px; }
.pop .opt.danger { color: var(--text-2); }
.pop .grp { font-size: 10px; letter-spacing: .08em; color: var(--text-3); padding: 8px 12px 4px; font-family: var(--font-head); text-transform: uppercase; }
.pop .swatch { width: 8px; height: 8px; border-radius: 50%; }

/* ===== 對話框 / 面板 ===== */
.overlay { position: fixed; inset: 0; background: rgba(8,9,12,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100; display: grid; place-items: center; padding: 16px; }
.dialog { width: min(440px, 100%); border-radius: var(--r-dialog); padding: 28px 24px 24px; text-align: center; }
.dialog .q { font-size: 17px; margin-bottom: 22px; }
.dialog .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet { width: min(640px, 100%); max-height: 92vh; overflow: auto; border-radius: var(--r-dialog); padding: 24px; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.toast { position: fixed; left: 50%; bottom: calc(28px + var(--sab)); transform: translateX(-50%); z-index: 200; padding: 10px 18px; border-radius: var(--r-pill); font-size: 13px; animation: toastin .18s ease; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px);} to { opacity: 1; transform: translate(-50%, 0);} }

/* 桌機：編輯面板固定在右側，主內容往左讓位（版面切左右） */
@media (min-width: 1100px) {
  .overlay.panel { left: auto; right: 0; top: 0; bottom: 0; width: var(--panel-w); background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; display: block; }
  .overlay.panel .sheet { width: 100%; height: 100%; max-height: 100%; border-radius: 0; border-left: 1px solid var(--border); border-top: 0; border-bottom: 0; border-right: 0; padding: 24px 24px 32px; }
  #app.panel-open main { padding-right: calc(var(--panel-w) + 28px); }
  #app.panel-open .ov-board { grid-auto-columns: minmax(230px, 1fr); }
}

/* ===== 日期標示 ===== */
.date-big { font-size: 28px; line-height: 1; }
.wd { font-size: 12px; color: var(--text-2); }
.wd.holiday { color: var(--warn); }
.badge { font-family: var(--font-head); text-transform: uppercase; font-size: 9px; letter-spacing: .06em; padding: 2px 6px; border-radius: var(--r-badge); border: 1px solid var(--border-strong); color: var(--text-2); }
.badge.warn { border-color: rgba(245,165,106,.6); color: var(--warn); background: rgba(245,165,106,.1); }

/* ===== 行程卡片（每日） ===== */
.day-list { display: flex; flex-direction: column; }
.item-card {
  position: relative; display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 14px 14px 16px;
  box-shadow: var(--highlight-top), var(--shadow); overflow: hidden; cursor: pointer; transition: border-color .12s, opacity .2s;
}
.item-card::before { content: ""; position: absolute; inset: 0; background: var(--glow, none); opacity: calc(var(--glow-alpha) / 0.22); pointer-events: none; }
.item-card:hover { border-color: var(--border-strong); }
.item-card.done { opacity: .42; }
.item-card.done .name { text-decoration: line-through; text-decoration-color: var(--text-3); }
.item-card.key { border-color: rgba(var(--accent-rgb), .35); box-shadow: var(--highlight-top), 0 0 28px rgba(var(--accent-rgb), .12); }
.item-card > * { position: relative; }
.item-card .times { display: flex; flex-direction: column; gap: 2px; }
.item-card .times .t1 { font-size: 22px; line-height: 1; }
.item-card .times .t2 { font-size: 12px; color: var(--text-2); }
.item-card .times .late { font-size: 10px; color: var(--warn); }
.item-card .times.clickable { cursor: pointer; border-radius: 10px; margin: -4px; padding: 4px; }
.item-card .times.clickable:hover { background: var(--surface-2); }
.item-card .body { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.item-card .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-card .name { font-size: 17px; font-weight: 700; font-family: var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.item-card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item-card .time-edit { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.item-card .actions { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex: 0 0 auto; }
.check.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 14px rgba(var(--accent-rgb), .6); }
.handle { color: var(--text-3); cursor: grab; touch-action: none; padding: 4px; }
.sortable-ghost { opacity: .3; } .sortable-chosen { border-color: var(--accent) !important; } .sortable-drag { opacity: .95; }

.transit { display: flex; align-items: center; gap: 10px; padding: 6px 0 6px 30px; color: var(--text-3); font-size: 12px; position: relative; flex-wrap: wrap; }
.transit::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; border-left: 1px dashed var(--border-strong); }
.transit .modes { display: inline-flex; gap: 2px; }
.transit .mode { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); border: 1px solid transparent; }
.transit .mode:hover { background: var(--surface-2); color: var(--text-2); }
.transit .mode.on { color: var(--text-1); background: var(--surface-2); border-color: var(--border); }
.transit .min { color: var(--text-2); cursor: pointer; border-bottom: 1px dashed var(--border-strong); }
.transit .link { color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; } .transit .link:hover { color: var(--text-2); }

/* ===== 總覽 ===== */
.ov-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.ov-col { min-height: 200px; }
.ov-col .ov-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.ov-col .ov-head .d { font-size: 20px; }
.ov-col .ov-theme { font-size: 12px; color: var(--text-2); margin-bottom: 10px; min-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-col .start { color: var(--accent); text-shadow: 0 0 12px rgba(var(--accent-rgb), .5); font-weight: 700; }
.ov-list { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.ov-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; position: relative; overflow: hidden; min-height: var(--h, 44px); }
.ov-item::before { content: ""; position: absolute; inset: 0; background: var(--glow, none); opacity: calc(var(--glow-alpha) / 0.22); pointer-events: none; }
.ov-item > * { position: relative; }
.ov-item .t { font-size: 13px; color: var(--text-2); align-self: start; padding-top: 2px; }
.ov-item .n { font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; align-self: start; }
.ov-item .dur { position: absolute; right: 10px; bottom: 6px; font-size: 10px; color: var(--text-3); }
.ov-item.done { opacity: .4; }
.ov-item.key { border-color: rgba(var(--accent-rgb), .4); }
.ov-item .k { position: absolute; right: 10px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), .9); }

/* ===== 細節頁 ===== */
.hero { position: relative; height: 240px; border-radius: var(--r-card); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-3); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .hero-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; align-items: baseline; font-size: 14px; }
.kv .k { color: var(--text-2); font-size: 12px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.link-row { display: flex; gap: 8px; flex-wrap: wrap; }
.list-plain { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.list-plain li { display: flex; gap: 10px; align-items: flex-start; }
.list-plain li .bullet { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex: 0 0 auto; box-shadow: 0 0 6px rgba(var(--accent-rgb), .7); }
.list-plain li .step { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; display: grid; place-items: center; flex: 0 0 auto; color: var(--text-2); }
.rating { display: inline-flex; align-items: center; gap: 6px; }
.rating svg { color: var(--accent); }

.gallery { cursor: default; }
.gallery .g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(14,15,19,.55); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.gallery .g-arrow.l { left: 10px; } .gallery .g-arrow.r { right: 10px; }
.gallery:hover .g-arrow { opacity: 1; }
.gallery .g-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.gallery .g-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; }
.gallery .g-dots i.on { background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), .9); }
.gallery .g-cap { position: absolute; left: 12px; bottom: 30px; font-size: 12px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.undo-pill { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); }
.undo-pill button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-1); }
.undo-pill button:hover { background: var(--surface-hover); } .undo-pill button:disabled { color: var(--text-3); }
.progress-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }

/* ===== 進度 ===== */
.bar { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.bar > i { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .6); border-radius: 6px; transition: width .3s; }
.bar.gray > i { background: var(--text-2); box-shadow: none; }
.ring { position: relative; width: 150px; height: 150px; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-2); } .ring .fill { stroke: var(--accent); filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .7)); transition: stroke-dasharray .4s; stroke-linecap: round; }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.kpi { font-size: 40px; line-height: 1; font-weight: 700; }
.kpi.sm { font-size: 26px; }

.empty { text-align: center; color: var(--text-2); padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty svg { color: var(--text-3); }
.empty .btns { display: flex; gap: 10px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; color: var(--text-3); padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--border); }
table.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }

.member-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-hover); border: 1px solid var(--border-strong); display: inline-grid; place-items: center; font-size: 10px; color: var(--text-1); font-family: var(--font-head); flex: 0 0 auto; }
.member-dot.sm { width: 18px; height: 18px; font-size: 9px; }

.booking { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; }
.booking .kind { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.booking .title { font-size: 16px; }
.booking .when { font-size: 13px; color: var(--text-2); }

.pack-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 6px; border-bottom: 1px solid var(--border); }
.pack-item:last-child { border-bottom: 0; }
.pack-item.on .n { color: var(--text-3); text-decoration: line-through; }

.share-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }

/* ===== RWD ===== */
@media (max-width: 860px) {
  .nav { display: none; }
  main { padding: calc(14px + var(--sat)) 14px calc(var(--bottom-nav) + var(--sab) + 28px); }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bottom-nav) + var(--sab)); padding: 6px 8px var(--sab); z-index: 50; border-top: 1px solid var(--border); justify-content: space-around; align-items: center; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-3); font-size: 10px; width: 64px; height: 50px; justify-content: center; border-radius: 18px; }
  .bottom-nav a.active { color: var(--text-1); background: var(--surface-2); }
  .bottom-nav a.active svg { color: var(--accent); filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .7)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .item-card { grid-template-columns: 58px 1fr auto; gap: 10px; padding: 12px 10px 12px 12px; }
  .item-card .times .t1 { font-size: 18px; }
  .item-card .name { font-size: 15px; white-space: normal; }
  .ov-board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; }
  .hero { height: 200px; }
  .kv { grid-template-columns: 90px 1fr; }
  .overlay { align-items: end; padding: 0; }
  .sheet { border-radius: var(--r-dialog) var(--r-dialog) 0 0; max-height: 94vh; padding: 20px 16px calc(20px + var(--sab)); }
  .overlay .dialog { margin-bottom: calc(24px + var(--sab)); }
  h1 { font-size: 20px; }
  .booking { grid-template-columns: 44px 1fr; } .booking .kind { width: 44px; height: 44px; } .booking .acts { grid-column: 1 / -1; }
  .share-row { grid-template-columns: 1fr auto; } .share-row .rm { grid-column: 2; }
  .undo-pill { right: 12px; bottom: calc(var(--bottom-nav) + var(--sab) + 12px); }
}
