/* 拾光回憶倉庫 Keepsake
   視覺世界：典藏登錄卡。每件作品、每個景點、每張投影片都是一張「登錄卡」：
   白卡、紅色頂線、淡藍橫格線；機器整理的欄位用打字般的字，使用者自己寫的感想用手寫字。
   底部分頁是卡片抽屜的索引分隔卡。照片永遠是主角。 */
:root {
  --drawer: #e3e7eb;      /* 抽屜（底色）：冷灰鋼板 */
  --card: #ffffff;        /* 卡片 */
  --ink: #1b2230;         /* 主要文字 */
  --ink-2: #4f5a69;       /* 次要文字 */
  --rule-red: #c0392f;    /* 索引卡頂線、印章、目前分頁 */
  --rule-blue: #c9d8ea;   /* 索引卡橫格線 */
  --line: #cfd5dc;        /* 邊框 */
  --pencil: #3d4a5c;      /* 手寫字 */
  --photo-bg: #d4d9de;    /* 圖片載入前 */
  --shade: rgba(17, 22, 30, .14);

  --f-text: "Noto Sans TC", "PingFang TC", "Heiti TC", system-ui, sans-serif;
  --f-hand: "LXGW WenKai TC", "Kaiti TC", "BiauKai", serif;
  --f-data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --r-card: 6px;
  --r-index: 2px;  /* 索引卡：幾乎方角 */
  --tabbar-h: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --drawer: #121518; --card: #1c2025; --ink: #e7eaee; --ink-2: #a3adba;
    --rule-red: #e5675d; --rule-blue: #2b3a4c; --line: #2c333b; --pencil: #c2ccd8;
    --photo-bg: #262c33; --shade: rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --drawer: #121518; --card: #1c2025; --ink: #e7eaee; --ink-2: #a3adba;
  --rule-red: #e5675d; --rule-blue: #2b3a4c; --line: #2c333b; --pencil: #c2ccd8;
  --photo-bg: #262c33; --shade: rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--drawer); color: var(--ink);
  font: 400 16px/1.6 var(--f-text);
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 30; background: var(--drawer);
}
::selection { background: var(--rule-red); color: #fff; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--rule-red); outline-offset: 2px; border-radius: 4px; }
.num { font-family: var(--f-data); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ---------- 版面骨架 ---------- */
.app { min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--s-5)); }
.wrap {
  max-width: 760px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--drawer) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: var(--s-2); min-height: 52px; }
.topbar h1 {
  flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.topbar h1.brand { font-family: var(--f-text); font-weight: 700; font-size: 20px; letter-spacing: .06em; color: var(--ink); }  /* 黑體粗體，和整理站一致 */
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border: 0; background: none; border-radius: 22px; cursor: pointer; color: var(--ink);
}
.icon-btn:active { background: var(--shade); }
.icon-btn svg, .ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.spacer { width: 44px; flex: none; }

.page-title { padding-block: var(--s-3) var(--s-4); }
.page-title h2 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: .01em; text-wrap: balance; }
.page-title p { margin: var(--s-1) 0 0; color: var(--ink-2); font-size: 15px; }

.demo-flag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-2);
  font-size: 13px; color: var(--ink-2); border: 1px dashed var(--line); border-radius: 4px; padding: 2px 8px;
}

/* ---------- 索引分隔卡（底部分頁） ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 0 max(12px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(12px, env(safe-area-inset-left, 0px));
  background: var(--card); border-top: 1px solid var(--line);
}
.tabbar ul { list-style: none; margin: 0 auto; padding: 0; max-width: 520px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tab {
  position: relative; width: 100%; height: var(--tabbar-h); border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.tab::before { /* 分隔卡的凸出小耳朵 */
  content: ""; position: absolute; top: -1px; left: 18%; right: 18%; height: 5px;
  background: transparent; border-radius: 0 0 3px 3px; transition: background .25s var(--ease);
}
.tab[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tab[aria-current="page"]::before { background: var(--rule-red); }
.tab svg { width: 24px; height: 24px; }

/* ---------- 列表：抽屜裡的卡 ---------- */
.drawer-list { display: grid; gap: var(--s-4); padding-bottom: var(--s-5); }
.folder {
  display: block; width: 100%; text-align: left; border: 0; padding: 0; cursor: pointer;
  background: var(--card); border-radius: var(--r-card); overflow: hidden;
  box-shadow: 0 1px 2px var(--shade), 0 8px 24px -12px var(--shade);
  transition: transform .2s var(--ease);
}
.folder:active { transform: scale(.985); }
.folder .cover { aspect-ratio: 16 / 9; background: var(--photo-bg); position: relative; overflow: hidden; }
.folder .cover img { width: 100%; height: 100%; object-fit: cover; }
.folder .cover .strip { position: absolute; inset: auto 0 0; display: flex; gap: 2px; height: 28%; }
.folder .cover .strip img { flex: 1; min-width: 0; border-top: 2px solid var(--card); }
.folder .meta { padding: var(--s-3) var(--s-4) var(--s-4); border-top: 3px solid var(--rule-red); }
.folder h3 { margin: 0; font-size: 20px; line-height: 1.35; text-wrap: balance; }
.folder .sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* ---------- 分段切換 ---------- */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--card); border-radius: 10px; border: 1px solid var(--line); margin-bottom: var(--s-4); }
.seg button {
  flex: 1; min-height: 40px; border: 0; border-radius: 7px; background: none; cursor: pointer;
  color: var(--ink-2); font-size: 15px; font-weight: 500;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--card); }

.group-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin: var(--s-5) 0 var(--s-3); }
.group-h h3 { margin: 0; font-size: 18px; }
.group-h span { color: var(--ink-2); font-size: 14px; }

/* ---------- 作品格 ---------- */
.works { columns: 2; column-gap: var(--s-3); }
@media (min-width: 640px) { .works { columns: 3; } }
.work-tile {
  break-inside: avoid; display: block; width: 100%; margin: 0 0 var(--s-4); padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; color: inherit;
}
.work-tile .img { background: var(--photo-bg); border-radius: 3px; overflow: hidden; position: relative; box-shadow: 0 1px 2px var(--shade); }
.work-tile img { width: 100%; height: auto; }
.work-tile .t { font-size: 15px; font-weight: 700; margin-top: var(--s-2); line-height: 1.35; }
.work-tile .a { font-size: 13px; color: var(--ink-2); }
.work-tile:active .img { opacity: .85; }

/* 印章：待確認 / 依說明牌 */
.stamp {
  display: inline-block; font-family: var(--f-hand); font-size: 15px; line-height: 1; padding: 5px 8px 4px;
  color: var(--rule-red); border: 2px solid var(--rule-red); border-radius: 4px; transform: rotate(-4deg);
  background: color-mix(in srgb, var(--card) 85%, transparent);
}
.work-tile .stamp { position: absolute; top: 8px; right: 8px; }
.stamp.quiet { color: var(--ink-2); border-color: var(--ink-2); transform: none; font-size: 13px; }

/* ---------- 作品頁 ---------- */
.hero-photo { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); background: var(--photo-bg); position: relative; }
@media (min-width: 760px) { .hero-photo { margin: 0; border-radius: var(--r-card); overflow: hidden; } }
.hero-photo img { width: 100%; max-height: 72vh; object-fit: contain; background: var(--photo-bg); cursor: zoom-in; }
.ba-switch { position: absolute; left: var(--s-3); bottom: var(--s-3); display: flex; background: rgba(15, 18, 24, .72); border-radius: 18px; padding: 3px; }
.ba-switch button { border: 0; background: none; color: #fff; font-size: 13px; min-height: 32px; padding: 0 12px; border-radius: 15px; cursor: pointer; }
.ba-switch button[aria-pressed="true"] { background: #fff; color: #111; }
.ba-note { font-size: 13px; color: var(--ink-2); margin: var(--s-2) 0 0; }

.thumbs { display: flex; gap: var(--s-2); overflow-x: auto; padding: var(--s-3) 0 2px; scrollbar-width: none; }
.thumbs button { flex: none; width: 76px; height: 76px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: var(--photo-bg); cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--rule-red); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* 登錄卡 */
.record {
  position: relative; margin: var(--s-4) 0; background: var(--card); border-radius: var(--r-index);
  border-top: 4px solid var(--rule-red);
  box-shadow: 0 1px 2px var(--shade), 0 10px 28px -16px var(--shade);
  padding: var(--s-4) var(--s-4) var(--s-5);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule-blue) 31px 32px);
  background-position: 0 58px;
}
.record h2 { margin: 0; font-size: 24px; line-height: 1.3; text-wrap: balance; }
.record .orig { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.record .stamp { position: absolute; top: var(--s-4); right: var(--s-4); }
.record .acc { font-size: 12px; color: var(--ink-2); margin-top: var(--s-1); }
.fields { display: grid; grid-template-columns: 4.5em 1fr; margin: var(--s-4) 0 0; }
.fields dt, .fields dd { margin: 0; line-height: 32px; min-height: 32px; }
.fields dt { color: var(--ink-2); font-size: 14px; }
.fields dd { font-weight: 500; min-width: 0; }
.fields dd button { border: 0; background: none; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; font-weight: 500; }
.intro { margin: var(--s-4) 0 0; line-height: 32px; }
.pending-note { font-family: var(--f-hand); color: var(--pencil); font-size: 18px; line-height: 32px; margin: var(--s-3) 0 0; }

.label-block { margin: var(--s-5) 0; }
.label-block h3, .section-h { font-size: 17px; margin: 0 0 var(--s-3); }
.label-zh { white-space: pre-line; background: var(--card); padding: var(--s-4); border-radius: var(--r-card) var(--r-card) 0 0; border: 1px solid var(--line); border-bottom: 0; }
.label-orig { white-space: pre-line; color: var(--ink-2); font-size: 14px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: 0 0 var(--r-card) var(--r-card); }
.label-photo { margin-top: var(--s-3); display: flex; gap: var(--s-2); }
.label-photo button { width: 96px; padding: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--card); cursor: zoom-in; }

/* ---------- 處理紀錄 ---------- */
.review-entry { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-card); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); cursor: pointer; }
.review-entry b { display: block; font-size: 16px; }
.review-entry span { color: var(--ink-2); font-size: 14px; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin-bottom: var(--s-2); }
.ba-pair figure { margin: 0; min-width: 0; }
.ba-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--photo-bg); border-radius: 3px; cursor: zoom-in; }
.ba-pair figcaption { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.ba-item { padding-bottom: var(--s-4); margin-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.ba-item h4 { margin: 0 0 var(--s-2); font-size: 15px; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.qlist li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-3) var(--s-4); display: flex; gap: var(--s-3); align-items: center; }
.qlist img { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; flex: none; }
.qlist .q { min-width: 0; }
.qlist .q b { display: block; font-size: 14px; }
.qlist .q span { font-size: 14px; color: var(--ink-2); }

/* ---------- 旅遊 ---------- */
.hand { font-family: var(--f-hand); color: var(--pencil); font-size: 19px; line-height: 1.75; }
.note-card { background: var(--card); border-radius: var(--r-index); padding: var(--s-4); margin: var(--s-4) 0; border-top: 4px solid var(--rule-red);
  background-image: repeating-linear-gradient(to bottom, transparent 0 32px, var(--rule-blue) 32px 33px); background-position: 0 6px; }
.note-card p { margin: 0; line-height: 33px; }
.highlight { margin: var(--s-4) 0; border-radius: var(--r-card); overflow: hidden; background: #000; }
.highlight video { width: 100%; display: block; aspect-ratio: 16 / 9; }
.cap { font-size: 13px; color: var(--ink-2); margin-top: var(--s-2); }
.day-list { display: grid; gap: var(--s-3); margin: var(--s-4) 0 var(--s-5); }
.day-row { display: grid; grid-template-columns: 112px 1fr; gap: var(--s-3); align-items: stretch; width: 100%; padding: 0; border: 0; background: var(--card); border-radius: var(--r-card); overflow: hidden; cursor: pointer; text-align: left; box-shadow: 0 1px 2px var(--shade); }
.day-row img { width: 100%; height: 100%; min-height: 96px; object-fit: cover; }
.day-row .d { padding: var(--s-3) var(--s-3) var(--s-3) 0; min-width: 0; }
.day-row .d b { display: block; font-size: 17px; }
.day-row .d span { font-size: 14px; color: var(--ink-2); display: block; }
.map { background: var(--card); border-radius: var(--r-card); border: 1px solid var(--line); margin: var(--s-3) 0 var(--s-4); overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.map .grid { stroke: var(--rule-blue); stroke-width: 1; }
.map .route { stroke: var(--rule-red); stroke-width: 2.5; fill: none; stroke-dasharray: 6 6; }
.map .pin { fill: var(--rule-red); }
.map .pin-n { fill: #fff; font: 700 12px var(--f-data); }
.map .pin-l { fill: var(--ink); font: 500 13px var(--f-text); paint-order: stroke; stroke: var(--card); stroke-width: 4px; }
.map .foot { display: flex; justify-content: space-between; gap: var(--s-2); font-size: 12px; color: var(--ink-2); padding: 6px var(--s-3); border-top: 1px solid var(--line); }
.spot { margin: var(--s-5) 0; }
.spot-h { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.spot-h .n { width: 26px; height: 26px; border-radius: 13px; background: var(--rule-red); color: #fff; display: grid; place-items: center; font: 700 13px var(--f-data); flex: none; }
.spot-h h3 { margin: 0; font-size: 19px; }
.spot-h a { margin-left: auto; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; min-height: 44px; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.pgrid button { position: relative; padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: var(--photo-bg); cursor: pointer; }
.pgrid button:first-child { grid-column: span 2; grid-row: span 2; }
.pgrid img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; background: rgba(12, 15, 20, .72); color: #fff; font: 500 12px var(--f-data); padding: 3px 7px; border-radius: 10px; }
.badge svg { width: 12px; height: 12px; fill: #fff; stroke: none; }

/* ---------- 搜尋 ---------- */
.search-box { display: flex; align-items: center; gap: var(--s-2); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 var(--s-3); margin: var(--s-2) 0 var(--s-4); }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 17px; color: var(--ink); min-height: 48px; outline: none; }
.search-box:focus-within { border-color: var(--rule-red); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.chip { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 14px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.results button { display: flex; gap: var(--s-3); align-items: center; width: 100%; text-align: left; padding: var(--s-2); border: 0; border-radius: var(--r-card); background: var(--card); cursor: pointer; }
.results img { width: 64px; height: 64px; object-fit: cover; border-radius: 3px; flex: none; background: var(--photo-bg); }
.results .x { min-width: 0; }
.results b { display: block; font-size: 15px; }
.results span { display: block; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results mark { background: color-mix(in srgb, var(--rule-red) 22%, transparent); color: inherit; border-radius: 2px; }
.empty { color: var(--ink-2); padding: var(--s-6) 0; text-align: center; }

/* ---------- 全螢幕看圖 ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #0b0d10; display: flex; flex-direction: column; }
.viewer[hidden] { display: none; }
.viewer .vbar { display: flex; align-items: center; justify-content: space-between; color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 4px) max(8px, env(safe-area-inset-right, 0px)) 4px max(8px, env(safe-area-inset-left, 0px)); }
.viewer .vbar .icon-btn { color: #fff; }
.viewer .vcount { font: 500 14px var(--f-data); color: #c9cfd6; }
.viewer .stage { flex: 1; min-height: 0; display: grid; place-items: center; touch-action: pan-y; }
.viewer .stage img, .viewer .stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .vcap { color: #c9cfd6; font-size: 14px; text-align: center; padding: 8px 16px calc(env(safe-area-inset-bottom, 0px) + 12px); min-height: 44px; }
.viewer .vcap a { color: #fff; }

.view-enter { animation: enter .32s var(--ease) both; }
@keyframes enter { from { opacity: .35; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .view-enter { animation: none; }
  .folder, .tab::before { transition: none; }
}

/* =====================================================================
   字級與節奏（第二版）
   6 級固定字級，比例約 1.2～1.5，相鄰角色不再只差 1px：
     data 12  等寬：日期、編號、計數
     small 14 次要可讀文字：欄名、說明、原文
     body 16  內文
     heading 19 黑體粗：段落標題
     title 26 明體：卡片與作品標題
     display 40 明體特粗：頁面標題
   明體負責「被收藏的東西的名字」，黑體負責介面與內文，
   等寬負責數字，手寫字只給使用者自己的話。
   ===================================================================== */
:root {
  --f-display: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --fs-data: .75rem; --fs-small: .875rem; --fs-body: 1rem;
  --fs-heading: 1.1875rem; --fs-title: 1.625rem; --fs-display: clamp(2.25rem, 1.7rem + 2.6vw, 3rem);
  --lh-tight: 1.18; --lh-title: 1.3; --lh-body: 1.75;
}
body { line-height: var(--lh-body); }
p, li, dd { text-wrap: pretty; }
.num { font-size: .9em; letter-spacing: .02em; }

/* 頁首：標題 → 表頭，上方留白大於下方 */
.page-title { padding-block: var(--s-6) var(--s-5); display: grid; gap: var(--s-3); }
.page-title h2 {
  font-family: var(--f-display); font-weight: 900; font-size: var(--fs-display);
  line-height: var(--lh-tight); letter-spacing: .02em;
}
.page-title.root { padding-block: var(--s-5) var(--s-6); border-bottom: 1px solid var(--line); margin-bottom: var(--s-5); }
.page-title.root h2 { font-size: clamp(2.75rem, 2rem + 4vw, 3.5rem); }
.page-title p { margin: 0; }
.tally { font-size: var(--fs-small); color: var(--ink-2); }
.tally b { font-family: var(--f-data); font-weight: 500; font-size: var(--fs-heading); color: var(--ink); margin-right: 2px; }
.lede { font-size: var(--fs-body); color: var(--ink-2); max-width: 34em; }
.demo-flag { margin-top: 0; justify-self: start; font-size: var(--fs-data); }

/* 典藏卡表頭：欄名小字在上、內容在下，三欄並排 */
.catalog-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; }
.catalog-meta div { min-width: 0; }
.catalog-meta dt { font-size: var(--fs-data); color: var(--ink-2); line-height: 1.4; letter-spacing: .08em; }
.catalog-meta dd { margin: 0; font-size: var(--fs-body); font-weight: 500; line-height: 1.5; }
.catalog-meta dd.num { font-size: .9375rem; }
.catalog-meta.compact { gap: 2px var(--s-4); margin-top: var(--s-2); }
.catalog-meta.compact dd { font-size: var(--fs-small); }
.catalog-meta.compact dd.num { font-size: .8125rem; }

/* 段落標題：細線分隔，上方留白大、下方小 */
.group-h { margin: var(--s-7) 0 var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.group-h h3 { font-size: var(--fs-heading); font-weight: 700; line-height: var(--lh-title); }
.group-h span { font-size: var(--fs-small); }
.label-block, .spot { margin: 0; }
.label-block .group-h { margin-top: var(--s-6); }

/* 抽屜裡的卡（列表） */
.drawer-list { gap: var(--s-5); }
.folder .meta { padding: var(--s-4) var(--s-4) var(--s-5); }
.folder h3 { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-title); line-height: var(--lh-title); }
.folder .demo-flag { margin-top: var(--s-3); display: inline-flex; }

/* 作品格 */
.work-tile { margin-bottom: var(--s-5); }
.work-tile .t { font-family: var(--f-display); font-weight: 700; font-size: 1.0625rem; margin-top: var(--s-3); line-height: var(--lh-title); }
.work-tile .a { font-size: var(--fs-small); margin-top: 2px; }
.seg { margin: var(--s-2) 0 var(--s-5); }
.seg button { font-size: var(--fs-small); }
.review-entry { padding: var(--s-4); }
.review-entry b { font-size: var(--fs-body); }
.review-entry span { font-size: var(--fs-small); }

/* 登錄卡 */
.record { padding: var(--s-5) var(--s-4) var(--s-5); margin-top: var(--s-5); background-position: 0 86px; }
.record h2 { font-family: var(--f-display); font-weight: 900; font-size: 1.875rem; line-height: var(--lh-tight); padding-right: 92px; }
.record .orig { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-body); margin-top: var(--s-2); }
.record .acc { font-size: var(--fs-data); margin-top: var(--s-2); letter-spacing: .06em; }
.fields { margin-top: var(--s-5); }
.fields dt { font-size: var(--fs-small); }
.fields dd { font-size: var(--fs-body); }
.intro { margin-top: var(--s-5); }
.label-zh { font-size: var(--fs-body); line-height: 1.85; }
.label-zh::first-line { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-heading); }
.label-orig { font-size: var(--fs-small); line-height: 1.7; }
.ba-note { font-size: var(--fs-small); }

/* 處理紀錄 */
.ba-item h4 { font-family: var(--f-display); font-size: var(--fs-body); font-weight: 700; margin-bottom: var(--s-3); }
.ba-pair figcaption, .cap { font-size: var(--fs-small); }
.qlist .q b { font-size: var(--fs-data); font-family: var(--f-data); font-weight: 500; }
.qlist .q span { font-size: var(--fs-small); color: var(--ink); }

/* 旅遊 */
.highlight { margin-top: var(--s-2); }
.note-card .hand { font-size: 1.1875rem; }
.day-row { grid-template-columns: 120px 1fr; }
.day-row .d { padding: var(--s-4) var(--s-4) var(--s-4) 0; display: grid; gap: 2px; align-content: center; }
.day-row .d b { font-family: var(--f-display); font-size: 1.25rem; line-height: var(--lh-title); }
.day-row .d span { font-size: var(--fs-small); }
.day-row .d span.num { font-size: var(--fs-data); color: var(--ink-2); }
.spot { margin-top: var(--s-6); }
.spot-h { margin-bottom: var(--s-3); }
.spot-h h3 { font-family: var(--f-display); font-size: 1.375rem; font-weight: 700; line-height: var(--lh-title); }
.spot-h a { font-size: var(--fs-small); }
.map .pin-l { font-size: 13px; }

/* 搜尋與介面 */
.topbar h1 { font-size: var(--fs-body); }
.results b { font-size: var(--fs-body); }
.results span { font-size: var(--fs-small); }
.chip { font-size: var(--fs-small); }
.tab { font-size: var(--fs-data); }

/* 標題斷行、橫格線對齊（第二版修正） */
.nb { white-space: nowrap; }
.page-title h2.long { font-size: clamp(1.875rem, 1.4rem + 2.2vw, 2.5rem); }
.record { background-image: none; }
.fields dt, .fields dd { border-bottom: 1px solid var(--rule-blue); }
.intro {
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule-blue) 31px 32px);
  line-height: 32px;
}
.note-card { background-position: 0 16px; }
.note-card p { line-height: 33px; }
.summary { background-position: 0 17px; }

/* =====================================================================
   相聚（婚禮、活動、固定聚會）
   ===================================================================== */
.spot-time { margin-left: auto; font-size: var(--fs-data); color: var(--ink-2); }
.spot-h .spot-time + a { margin-left: var(--s-3); }
.ordinal { display: block; font-family: var(--f-data); font-weight: 500; font-size: var(--fs-heading); color: var(--rule-red); letter-spacing: .04em; margin-top: var(--s-2); }

/* 系列卡：後面疊兩張卡，表示裡面有好幾次 */
.folder.series { overflow: visible; position: relative; margin-top: 10px; }
.folder.series::before, .folder.series::after {
  content: ""; position: absolute; left: 10px; right: 10px; top: -6px; height: 12px; z-index: -1;
  background: var(--card); border-radius: var(--r-card) var(--r-card) 0 0; box-shadow: 0 -1px 2px var(--shade);
}
.folder.series::after { left: 20px; right: 20px; top: -11px; opacity: .7; }
.folder.series .cover { border-radius: var(--r-card) var(--r-card) 0 0; }
.cover .count { position: absolute; right: var(--s-3); top: var(--s-3); background: rgba(12, 15, 20, .74); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: var(--fs-data); }

/* 系列時間軸 */
.timeline { list-style: none; margin: 0; padding: 0 0 var(--s-5) 22px; position: relative; display: grid; gap: var(--s-4); }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: var(--s-5); width: 2px; background: var(--line); }
.tl-card { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: var(--s-3); align-items: center; width: 100%; padding: 0; border: 0; background: var(--card); border-radius: var(--r-card); overflow: visible; cursor: pointer; text-align: left; box-shadow: 0 1px 2px var(--shade); }
.tl-card img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-card) 0 0 var(--r-card); }
.tl-dot { position: absolute; left: -22px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 7px; background: var(--drawer); border: 3px solid var(--rule-red); }
.tl-meta { display: grid; gap: 2px; padding-right: var(--s-3); min-width: 0; }
.tl-meta b { font-family: var(--f-display); font-size: 1.25rem; line-height: var(--lh-title); }
.tl-meta .num { font-size: var(--fs-data); color: var(--ink-2); }
.tl-meta span:last-child { font-size: var(--fs-small); color: var(--ink-2); }
.drawer-list { isolation: isolate; }

/* =====================================================================
   匯入頁
   三個步驟有先後順序，所以用編號。完成的步驟編號變成紅底。
   ===================================================================== */
.imp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); }
.imp-step { background: var(--card); border-radius: var(--r-index); padding: var(--s-4); box-shadow: 0 1px 2px var(--shade); }
.imp-h { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.imp-h h3 { margin: 0; font-size: var(--fs-heading); line-height: var(--lh-title); }
.imp-n { width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; flex: none;
  border: 2px solid var(--ink); font-size: var(--fs-small); font-weight: 500; }
.imp-step.ok .imp-n { background: var(--rule-red); border-color: var(--rule-red); color: #fff; }
.imp-sources { display: grid; gap: var(--s-3); }
.imp-src { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 64px; padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--drawer); text-align: left; cursor: pointer; color: var(--ink); }
.imp-src:active { background: var(--shade); }
.imp-src svg { width: 28px; height: 28px; flex: none; }
.imp-src b { display: block; font-size: var(--fs-body); }
.imp-src span span { display: block; font-size: var(--fs-small); color: var(--ink-2); }
.imp-picked { margin-top: var(--s-4); }
.imp-picked-h { display: flex; align-items: baseline; gap: var(--s-2); font-size: var(--fs-small); color: var(--ink-2); margin-bottom: var(--s-2); }
.imp-picked-h b { font-family: var(--f-data); font-size: var(--fs-heading); color: var(--ink); font-weight: 500; }
.link { border: 0; background: none; padding: 0 4px; min-height: 44px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: var(--fs-small); }
.imp-picked-h .link { margin-left: auto; }
.link.strong { color: var(--rule-red); font-weight: 700; text-decoration: none; font-size: var(--fs-body); }
.link:disabled { opacity: .4; cursor: default; }
.imp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.imp-thumb { position: relative; aspect-ratio: 1; background: var(--photo-bg); display: grid; place-items: center; overflow: hidden; border-radius: 2px; color: var(--ink-2); }
.imp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.imp-thumb.more { font-size: var(--fs-small); color: var(--ink); }
.imp-v { position: absolute; left: 2px; bottom: 2px; font-style: normal; font-size: 10px; background: rgba(12, 15, 20, .72); color: #fff; padding: 0 4px; border-radius: 3px; }
.imp-step .seg { margin: 0; }
.imp-hint { font-size: var(--fs-small); color: var(--ink-2); margin: var(--s-2) 0 0; }
.imp-radio { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.imp-radio label { display: flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r-card); font-weight: 500; cursor: pointer; }
.imp-radio label:has(input:checked) { border-color: var(--rule-red); background: color-mix(in srgb, var(--rule-red) 6%, var(--card)); }
.imp-radio input { accent-color: var(--rule-red); width: 18px; height: 18px; }
.imp-radio span { margin-left: auto; font-size: var(--fs-small); color: var(--ink-2); font-weight: 400; }
.field { display: grid; gap: 4px; margin-bottom: var(--s-3); }
.field > span { font-size: var(--fs-data); color: var(--ink-2); letter-spacing: .08em; }
.field input, .field select { font: inherit; font-size: var(--fs-body); color: var(--ink); background: var(--drawer); border: 1px solid var(--line);
  border-radius: var(--r-card); min-height: 48px; padding: 0 var(--s-3); width: 100%; min-width: 0; }
.field input:focus, .field select:focus { outline: 2px solid var(--rule-red); outline-offset: 0; border-color: transparent; }
.imp-confirm { margin: var(--s-6) 0 var(--s-5); display: grid; gap: var(--s-3); }
.imp-path { display: grid; gap: 4px; margin: 0; }
.imp-path > span { font-size: var(--fs-data); color: var(--ink-2); letter-spacing: .08em; }
.imp-path code { font-family: var(--f-data); font-size: var(--fs-small); background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-card); padding: var(--s-3); overflow-wrap: anywhere; }
.btn.primary { justify-content: center; min-height: 52px; background: var(--rule-red); border-color: var(--rule-red); color: #fff; font-size: var(--fs-body); font-weight: 700; border-radius: 26px; }
.btn.primary:disabled { background: var(--line); border-color: var(--line); color: var(--ink-2); cursor: default; }
.imp-progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.imp-progress span { display: block; height: 100%; background: var(--rule-red); transition: width .2s var(--ease); }
.imp-err { margin: 0; padding: var(--s-3); border: 1px solid var(--rule-red); border-radius: var(--r-card); color: var(--ink); font-size: var(--fs-small); background: color-mix(in srgb, var(--rule-red) 8%, var(--card)); }
.imp-done { display: grid; gap: var(--s-4); }
.imp-big { margin: 0; font-size: var(--fs-heading); }
.imp-big b { font-family: var(--f-data); font-size: 2.5rem; font-weight: 500; margin-right: 4px; }
.imp-done .note-card p { line-height: 33px; }

/* 示範模式的選取畫面（底部抽屜） */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(10, 12, 16, .45); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 82vh; overflow: auto; background: var(--card);
  border-radius: 14px 14px 0 0; padding: var(--s-3) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + var(--s-4)) max(16px, env(safe-area-inset-left, 0px));
  box-shadow: 0 -8px 30px var(--shade); animation: sheet-up .3s var(--ease); }
@keyframes sheet-up { from { transform: translateY(30px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.sheet-h b { font-size: var(--fs-body); }
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: var(--s-3); }
.pick { position: relative; padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: var(--photo-bg); cursor: pointer; }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick[aria-pressed="true"]::after { content: "✓"; position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 11px; background: var(--rule-red); color: #fff; font: 700 13px/22px var(--f-text); text-align: center; }
.pick[aria-pressed="true"] img { opacity: .75; }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

/* 示範模式提示（匯入頁）：要比流程卡更醒目，避免誤以為已上傳 */
.demo-banner { background: var(--card); border: 2px solid var(--rule-red); border-radius: var(--r-index); padding: var(--s-4); margin: 0 0 var(--s-5); }
.demo-banner-h { margin: 0 0 var(--s-2); font-family: var(--f-display, inherit); font-size: var(--fs-heading, 1.1875rem); font-weight: 700; color: var(--rule-red); }
.demo-banner p { margin: 0 0 var(--s-2); }
.demo-banner ol { margin: 0; padding-left: 1.4em; }
.demo-banner li { margin: var(--s-1) 0; }
.imp-done .demo-banner { margin-top: var(--s-4); }

/* ---------- 看展首頁：作品／展覽／藝術家／場館（v5） ---------- */
.art-modes { position: sticky; top: calc(var(--topbar-h, 56px) + 4px); z-index: 5; box-shadow: 0 6px 14px -10px var(--shade); }
.art-modes button { min-width: 0; padding: 0 4px; }
.ico.mini { width: 14px; height: 14px; stroke-width: 2; flex: none; }

/* 作品清單：典藏卡一列一件，縮圖＋明體作品名＋藝術家＋場館 */
.lib { list-style: none; margin: 0 0 var(--s-6); padding: 0; background: var(--card); border-radius: var(--r-index); border-top: 3px solid var(--rule-red); }
.lib li + li { border-top: 1px solid var(--rule-blue); }
.lib-row, .artist-row { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--s-3); align-items: center; width: 100%; padding: var(--s-3) var(--s-4); border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.lib-row:active, .artist-row:active { background: var(--drawer); }
.lib-img { width: 72px; height: 72px; background: var(--photo-bg); border-radius: 2px; overflow: hidden; }
.lib-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-x, .artist-x { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.lib-x b, .artist-x b { font-family: var(--f-display); font-weight: 700; font-size: 1.0625rem; line-height: var(--lh-title); text-wrap: balance; }
.lib-a { font-size: var(--fs-small); color: var(--ink-2); }
.lib-v { display: flex; align-items: center; gap: 4px; font-size: var(--fs-data); color: var(--ink-2); }
.lib-v .num { margin-left: 6px; }
.lib-row .stamp { position: static; transform: rotate(-4deg); font-size: 12px; }

/* 藝術家 */
.artist-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; row-gap: var(--s-2); }
.artist-n { font-size: var(--fs-small); color: var(--ink-2); align-self: start; padding-top: 2px; }
.artist-thumbs { grid-column: 1 / -1; display: flex; gap: 4px; }
.artist-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 2px; background: var(--photo-bg); }
.orig-name { margin: 2px 0 0; color: var(--ink-2); font-size: var(--fs-body); }

/* 場館 */
.venue-row { display: grid; grid-template-columns: 32px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4) var(--s-2); }
.pin-n-badge { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--rule-red); color: #fff; font-size: 13px; }
.map-link { font-size: var(--fs-small); color: var(--ink); text-underline-offset: 4px; text-decoration-color: var(--line); }
.venue-visits { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0 var(--s-4) var(--s-4) calc(var(--s-4) + 32px + var(--s-3)); }
.venue-visits .chip { height: auto; min-height: 36px; text-align: left; }

/* 作品頁：關於這件作品、看到的地方 */
.about-h { margin: var(--s-5) 0 0; font-size: var(--fs-data); font-family: var(--f-text); font-weight: 600; letter-spacing: .08em; color: var(--ink-2); }
.about-h + .intro { margin-top: var(--s-2); }
.seen { margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--rule-blue); display: grid; gap: var(--s-1); }
.seen-k { font-size: var(--fs-data); color: var(--ink-2); }
.seen button { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.seen button .num { color: var(--ink-2); font-weight: 400; font-size: var(--fs-small); }

/* ---------- v6：頁首動作、編輯模式、播放器 ---------- */
.pill { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4); border-radius: 22px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: var(--fs-small); font-weight: 700; cursor: pointer;
  transition: background-color .15s var(--ease), transform .15s var(--ease); }
.pill:active { transform: scale(.97); }
.pill .ico { width: 18px; height: 18px; }
.ico.solid { fill: currentColor; stroke: none; }
.pill.play, .pill.primary { background: var(--rule-red); border-color: var(--rule-red); color: #fff; }
.pill.quiet { background: transparent; color: var(--ink-2); }
.pill.sm { min-height: 36px; padding: 0 var(--s-3); }
.pg-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: calc(var(--s-2) * -1) 0 var(--s-5); }

.edit-bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 56px); z-index: 5; display: flex; align-items: center; gap: var(--s-3);
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--rule-red); border-radius: var(--r-index);
  padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-5); box-shadow: 0 6px 18px -10px var(--shade); }
.edit-bar div { flex: 1; display: grid; gap: 2px; }
.edit-bar b { font-size: var(--fs-body); }
.edit-bar span { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.45; }
.spot.editing .spot-h h3 { flex: 1; }
.ed-move { display: flex; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.ed-list, .offstage { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-index); overflow: hidden; }
.ed-list li, .offstage li { display: flex; align-items: center; gap: var(--s-3); background: var(--card); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-2); min-height: 76px; }
.ed-img { position: relative; width: 60px; height: 60px; flex: none; background: var(--photo-bg); border-radius: 2px; overflow: hidden; }
.ed-img img { width: 100%; height: 100%; object-fit: cover; }
.ed-img .badge { transform: scale(.8); transform-origin: right bottom; }
.ed-n { font-size: var(--fs-small); color: var(--ink-2); flex: 1; }
.ed-btns { display: flex; align-items: center; gap: 2px; }
.ed-btns .pill { margin-left: var(--s-1); }
.off-x { flex: 1; display: grid; gap: 2px; min-width: 0; }
.off-x b { font-size: var(--fs-small); }
.off-x span { font-size: var(--fs-data); color: var(--ink-2); line-height: 1.45; }
.offstage { margin-bottom: var(--s-4); }
.ed-note { font-size: var(--fs-small); color: var(--ink-2); margin: 0 0 var(--s-3); line-height: 1.6; }
.empty-s { color: var(--ink-2); font-size: var(--fs-small); }

/* 播放器：深色全螢幕，照片是主角；登錄卡在換天、換景點時抽出來 */
.player { position: fixed; inset: 0; z-index: 60; background: #0b0d10; color: #fff; overflow: hidden; outline: none;
  opacity: 0; transition: opacity .3s var(--ease); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.player.in { opacity: 1; }
.player[hidden] { display: none; }
.pl-stage, .pl-layer { position: absolute; inset: 0; }
.pl-layer { display: grid; place-items: center; opacity: 0; transition: opacity var(--fade, .9s) ease-in-out; }
.pl-layer.on { opacity: 1; }
.pl-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(28px) brightness(.45); }
.pl-media { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }  /* 整張照片一定在畫面內（橫的螢幕不會切掉上下） */
.player:not(.manual):not(.still) .kb { animation: kb 5s linear both; }
.player.paused .kb, .player.paused .pl-card { animation-play-state: paused; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.08); } }
.pl-long { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  background: rgba(11, 13, 16, .72); padding: var(--s-2) var(--s-3); border-radius: var(--r-index); font-size: var(--fs-small); }
.pl-long a { color: #fff; }

.pl-card { position: relative; width: min(84vw, 360px); background: #fff; color: #1b2230; border-top: 5px solid #c0392f; border-radius: 2px;
  padding: var(--s-5) var(--s-5) var(--s-6); display: grid; gap: var(--s-2); box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .6); }
.pl-layer.on .pl-card { animation: drawer-out .7s var(--ease) both; }
.player.still .pl-layer.on .pl-card { animation: none; }
@keyframes drawer-out { from { transform: translateY(28px); } to { transform: none; } }
.pl-card .num { font-family: var(--f-data); font-size: var(--fs-small); color: #4f5a69; }
.pl-card b { font-family: var(--f-display); font-weight: 900; font-size: 2.25rem; line-height: 1.2; text-wrap: balance; }
.pl-card.spot .n { width: 30px; height: 30px; border-radius: 15px; background: #c0392f; color: #fff; display: grid; place-items: center; font-weight: 700; }
.pl-card .hand { margin: var(--s-3) 0 0; color: #3d4a5c; line-height: 33px; font-size: 19px; max-height: 330px; overflow: hidden;
  background-image: repeating-linear-gradient(transparent 0 32px, #c9d8ea 32px 33px); border-top: 1px solid #c9d8ea; }

.pl-top, .pl-bottom { position: absolute; left: 0; right: 0; z-index: 2; transition: opacity .25s var(--ease); }
.pl-top { top: 0; display: flex; align-items: center; gap: var(--s-2); padding: calc(env(safe-area-inset-top, 0px) + 4px) max(8px, env(safe-area-inset-right, 0px)) var(--s-5) max(8px, env(safe-area-inset-left, 0px));
  background: linear-gradient(rgba(11, 13, 16, .7), transparent); }
.pl-top .icon-btn { color: #fff; }
.pl-title { flex: 1; min-width: 0; font-size: var(--fs-small); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-speed { min-height: 36px; padding: 0 var(--s-3); border: 0; border-radius: 18px; background: rgba(255, 255, 255, .14); color: #fff; font-size: var(--fs-small); font-weight: 700; cursor: pointer; white-space: nowrap; }
.pl-mode { display: flex; padding: 3px; gap: 2px; border-radius: 20px; background: rgba(255, 255, 255, .14); }
.pl-mode button { min-height: 36px; min-width: 52px; padding: 0 var(--s-3); border: 0; border-radius: 17px; background: transparent; color: #dfe4ea; font-size: var(--fs-small); font-weight: 700; cursor: pointer; }
.pl-mode button[aria-pressed="true"] { background: #fff; color: #1b2230; }
.pl-bottom { bottom: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s-2) var(--s-3);
  padding: var(--s-6) var(--s-4) calc(env(safe-area-inset-bottom, 0px) + var(--s-4)); background: linear-gradient(transparent, rgba(11, 13, 16, .75)); }
.pl-cap { grid-column: 1 / -1; margin: 0; font-size: var(--fs-body); font-weight: 700; min-height: 1.6em; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.pl-track { height: 3px; background: rgba(255, 255, 255, .25); border-radius: 2px; overflow: hidden; }
.pl-track i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.pl-count { font-size: var(--fs-data); color: #c9cfd6; min-width: 4.5em; text-align: right; }
.pl-state { position: absolute; left: 50%; top: 50%; z-index: 2; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 36px;
  display: grid; place-items: center; background: rgba(11, 13, 16, .6); opacity: 0; transform: scale(.85); transition: opacity .2s var(--ease), transform .2s var(--ease); pointer-events: none; }
.pl-state svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.player.paused .pl-state { opacity: 1; transform: none; }
.player.bare .pl-top, .player.bare .pl-bottom { opacity: 0; pointer-events: none; }
.pl-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .pl-layer { transition-duration: .2s; } }

/* 編輯時改景點名稱 */
.ed-name { flex: 1; min-width: 0; font: 700 1.25rem/1.3 var(--f-display); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
.ed-name:focus { outline: 2px solid var(--rule-red); outline-offset: 1px; }
/* 小提示 */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); z-index: 80; transform: translate(-50%, 12px);
  max-width: min(92vw, 520px); padding: 10px 16px; border-radius: 10px; background: #1b2230; color: #fff; font-size: .95rem; line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.day-empty { display: grid; place-items: center; min-height: 96px; padding: 8px; background: var(--photo-bg, #d4d9de); color: var(--ink-2, #4f5a69); font-size: .8rem; text-align: center; }
