/* 收藏卡冊首頁（第 2 步）。自己的深藍卡套風：皮面卡冊、透明卡袋、薄荷綠與珊瑚色點綴。
 * 不用黃黑配色、不用暖白底、不放頂端大搜尋框和膠囊標籤列（避開 yellowbrickdb／cfelix）。 */
/* 介面字型 Card Sans：tll-env.js 載入切好的思源黑體小片（build/v2/assets/fonts/fonts.css；整合外掛 B-5），不再整個載 12 MB 的可變字型 */
:root {
  --bg: #0a1222; --bg-2: #0f1b33;
  --binder: #14284a; --binder-edge: #0c1a33; --stitch: rgba(160, 196, 255, .28);
  --page: #182e52; --page-2: #13254a;
  --pocket-line: rgba(176, 208, 255, .22); --pocket-fill: rgba(255, 255, 255, .035);
  --ink: #e9eff9; --muted: #9db0cc; --faint: #6f84a6;
  --mint: #6fd6c4; --coral: #ff8a76; --sky: #8fb6ff;
  --radius: 14px;
  --font: "Card Sans", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  /* 這頁本來就是深色：告訴手機瀏覽器不要再用深色模式調暗 */
  color-scheme: dark;
}
/* 卡片本身是淺色配色；框（iframe）也標成淺色，卡角的透明處才不會被補成一塊底色 */
.cf-frame { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.al { background: radial-gradient(1200px 700px at 50% -10%, #17305a 0%, var(--bg) 60%) fixed, var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* ── 頁首：小，只有品牌和兩個連結；搜尋不放這裡 ── */
.al-top { position: fixed; left: 0; right: 0; top: 0; height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 20px; z-index: 20; }
.al-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.al-brand img { width: 28px; height: 42px; object-fit: contain; }
.al-brand b { font-size: 17px; letter-spacing: .08em; }
.al-brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .12em; font-weight: 500; }
.al-top nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
.al-top nav a { text-decoration: none; } .al-top nav a:hover { color: var(--ink); }

/* ── 桌面：左書背｜中卡冊｜右索引 ── */
.al-desk { position: fixed; inset: 52px 0 0 0; display: grid; grid-template-columns: auto 1fr; }
.al-spines { position: relative; display: flex; flex-direction: row; align-items: flex-end; gap: 3px; padding: 18px 14px 96px 22px; overflow-x: hidden; overflow-y: hidden; }
.al-spine-list { display: flex; flex-direction: column; gap: 4px; height: 100%; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.spine { position: relative; flex: none; width: 46px; min-height: 108px; border: 0; border-radius: 6px 3px 3px 6px; cursor: pointer; padding: 10px 0;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.12) 18%, rgba(0,0,0,.05) 40%, rgba(0,0,0,.3)), var(--c, #1b2a44);
  box-shadow: inset -2px 0 0 rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.35); writing-mode: vertical-rl; text-orientation: mixed;
  display: flex; align-items: center; justify-content: flex-start; gap: 8px; color: var(--t, #fff); font-weight: 700; font-size: 15px; letter-spacing: .12em;
  transition: transform .18s ease, filter .18s ease; }
.spine::before { content: ""; position: absolute; left: 6px; right: 6px; top: 8px; height: 3px; border-radius: 2px; background: var(--a, #8fb6ff); opacity: .9; }
.spine small { font-size: 11px; font-weight: 600; opacity: .75; letter-spacing: 0; }
.spine:hover { transform: translateX(4px); filter: brightness(1.12); }
.spine[aria-pressed="true"] { transform: translateX(10px); box-shadow: inset -2px 0 0 rgba(0,0,0,.35), 0 0 0 2px var(--mint), 0 6px 14px rgba(0,0,0,.45); }
.spine.all { --c: #24406e; --a: var(--mint); }

.al-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 8px 86px 96px 18px; min-width: 0; }
.al-book { position: relative; height: 100%; aspect-ratio: var(--book-ratio, .78); max-width: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(0,0,0,.18)), repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 5px), var(--binder);
  border-radius: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06), inset 0 0 0 9px var(--binder-edge);
  padding: 22px; perspective: 2200px; }
.al-book::before { content: ""; position: absolute; inset: 12px; border-radius: 15px; border: 1.5px dashed var(--stitch); pointer-events: none; }
.al-spread { position: relative; height: 100%; display: grid; grid-template-columns: repeat(var(--pages, 1), 1fr); gap: 0; }
.al-page { position: relative; height: 100%; border-radius: 12px; padding: 16px; display: grid;
  grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr); gap: 14px;
  background: linear-gradient(180deg, var(--page), var(--page-2)); box-shadow: inset 0 0 40px rgba(0,0,0,.35);
  transform-origin: left center; backface-visibility: hidden; }
.al-spread[data-pages="2"] .al-page:first-child { border-radius: 12px 2px 2px 12px; }
.al-spread[data-pages="2"] .al-page:last-child { border-radius: 2px 12px 12px 2px; }
.al-crease { position: absolute; top: 0; bottom: 0; left: calc(50% - 14px); width: 28px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.45) 45%, rgba(255,255,255,.05) 52%, rgba(0,0,0,.35) 58%, transparent); }
.al-rings { position: absolute; left: -11px; top: 12%; bottom: 12%; width: 22px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.al-rings i { display: block; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d8e4f5, #6b7c96 60%, #36435a); box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.al-spread[data-pages="2"] + .al-rings { display: none; }

/* 卡袋 */
.pocket { position: relative; min-width: 0; min-height: 0; border-radius: 9px; background: var(--pocket-fill); border: 1px solid var(--pocket-line);
  display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; cursor: pointer; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease; }
.pocket::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 62%, rgba(255,255,255,.07) 74%, rgba(255,255,255,0) 82%); }
.pocket::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 7px; border-radius: 0 0 8px 8px; background: rgba(0,0,0,.28); z-index: 2; pointer-events: none; }
.pocket:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.45), 0 0 0 1px rgba(111,214,196,.55); }
.pocket.empty { cursor: default; background: rgba(255,255,255,.015); border-style: dashed; }
.pocket.empty:hover { transform: none; box-shadow: none; }
.pocket .slot { position: relative; height: 100%; max-width: 100%; aspect-ratio: var(--card-ratio, .6667); border-radius: 6px; overflow: hidden; }
.pocket .slot .cf-box { position: absolute; inset: 0; width: 100%; }
.pocket .cf-frame { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: transparent; pointer-events: none; }
.pocket .ph { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 6px; background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.01));
  color: var(--faint); font-size: 13px; text-align: center; padding: 8px; }
.pocket .ph b { display: block; color: var(--muted); font-size: 15px; }
.pocket-name { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; padding: 6px 8px; border-radius: 8px; background: rgba(8,14,28,.86); font-size: 12.5px; line-height: 1.35;
  opacity: 0; transform: translateY(6px); transition: .18s ease; pointer-events: none; }
.pocket:hover .pocket-name, .pocket:focus-visible .pocket-name { opacity: 1; transform: none; }
.pocket-name b { color: var(--mint); margin-right: 6px; }

/* 清單（一頁一張表，像卡冊裡夾的目錄頁） */
.al-page.list { display: block; padding: 18px 22px; overflow: hidden; }
.al-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.al-list th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .08em; padding: 6px 8px; border-bottom: 1px solid var(--pocket-line); }
.al-list td { padding: 9px 8px; border-bottom: 1px dashed rgba(176,208,255,.12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.al-list td.n { color: var(--mint); font-weight: 700; width: 12%; } .al-list td.zh { width: 40%; } .al-list td.num { text-align: right; width: 12%; }
.al-list tr { cursor: pointer; } .al-list tr:hover td { background: rgba(111,214,196,.07); }

/* 翻頁 */
.al-page.turn-next { animation: turnNext .42s ease-in forwards; }
.al-page.turn-prev { animation: turnPrev .42s ease-in forwards; transform-origin: right center; }
.al-page.enter { animation: enter .32s ease-out; }
@keyframes turnNext { to { transform: rotateY(-100deg); opacity: .2; } }
@keyframes turnPrev { to { transform: rotateY(100deg); opacity: .2; } }
@keyframes enter { from { opacity: .4; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* ── 右緣凸出的索引標籤 ── */
.al-tabs { position: absolute; right: -64px; top: 40px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.tab { position: relative; width: 70px; padding: 12px 8px 12px 18px; border: 0; border-radius: 0 12px 12px 0; cursor: pointer; text-align: left;
  background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 30%), var(--tc, #2a4777); color: #f4f8ff; font-size: 14px; font-weight: 700; line-height: 1.25;
  box-shadow: 3px 3px 8px rgba(0,0,0,.35); transition: transform .15s ease; }
.tab small { display: block; font-size: 11px; font-weight: 500; opacity: .7; }
.tab:hover { transform: translateX(4px); }
.tab[aria-pressed="true"] { transform: translateX(10px); box-shadow: 3px 3px 10px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.55); }
.tab:nth-child(1) { --tc: #2a4777; } .tab:nth-child(2) { --tc: #b1513f; } .tab:nth-child(3) { --tc: #2e8a7c; }
.tab:nth-child(4) { --tc: #6a4fb0; } .tab:nth-child(5) { --tc: #2f6fae; } .tab:nth-child(6) { --tc: #8a6a2c; }

/* 頁碼與目前條件 */
.al-caption { position: absolute; left: 0; right: 0; bottom: -34px; text-align: center; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.al-caption b { color: var(--ink); }

/* ── 卡冊下方中間的浮動工具列 ── */
.al-toolbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 4px; padding: 6px;
  background: rgba(14, 26, 50, .9); backdrop-filter: blur(10px); border: 1px solid rgba(176,208,255,.18); border-radius: 18px; box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.tb-btn { height: 40px; min-width: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.tb-btn:hover { background: rgba(255,255,255,.07); }
.tb-btn[aria-expanded="true"] { background: rgba(111,214,196,.16); color: var(--mint); }
.tb-sep { width: 1px; height: 24px; background: rgba(176,208,255,.18); margin: 0 4px; }
.tb-seg { display: inline-flex; background: rgba(0,0,0,.25); border-radius: 12px; padding: 3px; }
.tb-seg button { height: 34px; padding: 0 12px; white-space: nowrap; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 13.5px; color: var(--muted); }
.tb-seg button[aria-pressed="true"] { background: var(--mint); color: #062520; font-weight: 700; }
.tb-page { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 92px; text-align: center; }
.tb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); display: none; }
.tb-btn.on .tb-dot { display: inline-block; }
kbd { font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 5px; border: 1px solid rgba(176,208,255,.3); color: var(--muted); }

/* 工具列彈出面板 */
.al-pop { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 31; width: min(520px, calc(100vw - 32px)); padding: 16px 18px;
  background: #10203e; border: 1px solid rgba(176,208,255,.2); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.al-pop h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .08em; }
.al-pop .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.al-pop .chips button { border: 1px solid rgba(176,208,255,.22); background: transparent; border-radius: 8px; padding: 6px 11px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.al-pop .chips button[aria-pressed="true"] { border-color: var(--mint); color: var(--mint); background: rgba(111,214,196,.1); }
.al-pop select { font: inherit; background: #0b1730; color: var(--ink); border: 1px solid rgba(176,208,255,.22); border-radius: 8px; padding: 6px 8px; }

/* ── 搜尋：按 / 或放大鏡叫出來的查卡面板 ── */
.al-search { position: fixed; inset: 0; z-index: 50; background: rgba(4, 9, 20, .62); backdrop-filter: blur(3px); display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.al-search.open { display: flex; }
.al-search-box { width: min(620px, calc(100vw - 32px)); background: #0f1f3d; border-radius: 18px; border: 1px solid rgba(176,208,255,.22); box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; }
.al-search-box label { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(176,208,255,.14); }
.al-search-box input { flex: 1; min-width: 0; font: 500 19px var(--font); background: transparent; border: 0; outline: 0; color: var(--ink); }
.al-search-box input::placeholder { color: var(--faint); }
.al-hits { max-height: 52vh; overflow-y: auto; }
.al-hit { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 10px 18px; cursor: pointer; text-decoration: none; }
.al-hit:hover, .al-hit.sel { background: rgba(111,214,196,.1); }
.al-hit .n { color: var(--mint); font-weight: 700; font-variant-numeric: tabular-nums; }
.al-hit .t { min-width: 0; } .al-hit .t b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-hit .t small { color: var(--muted); font-size: 12.5px; }
.al-hit .y { color: var(--faint); font-size: 12.5px; }
.al-search-foot { padding: 10px 18px; color: var(--faint); font-size: 12.5px; display: flex; gap: 14px; border-top: 1px solid rgba(176,208,255,.1); }

.al-burger { display: none; }
.al-top .al-find { display: inline-flex; }

/* ── 一般手機：一頁 4 格，左細書背、右索引、底部工具列、放大鏡叫搜尋 ── */
body.m-phone .al-top { height: 46px; padding: 0 12px; }
body.m-phone .al-top nav { display: none; }
body.m-phone .al-desk { inset: 46px 0 0 0; grid-template-columns: 30px 1fr; }
body.m-phone .al-spines { padding: 6px 0 84px 4px; }
body.m-phone .spine { width: 24px; min-height: 76px; font-size: 11px; letter-spacing: .04em; padding: 6px 0; border-radius: 4px 2px 2px 4px; }
body.m-phone .spine small { display: none; }
body.m-phone .spine:hover, body.m-phone .spine[aria-pressed="true"] { transform: translateX(3px); }
body.m-phone .al-stage { padding: 6px 40px 84px 6px; }
body.m-phone .al-book { padding: 10px; border-radius: 14px; height: auto; width: 100%; aspect-ratio: auto; }
body.m-phone .al-book::before { inset: 6px; }
body.m-phone .al-page { padding: 8px; gap: 8px; }
body.m-phone .al-tabs { right: -38px; top: 14px; gap: 6px; }
body.m-phone .tab { width: 40px; padding: 8px 4px 8px 10px; font-size: 11px; writing-mode: vertical-rl; letter-spacing: .1em; }
body.m-phone .tab small { display: none; }
body.m-phone .al-toolbar { left: 8px; right: 8px; bottom: 8px; transform: none; justify-content: space-between; border-radius: 16px; }
body.m-phone .tb-btn { padding: 0 9px; } body.m-phone .tb-btn .lbl-long, body.m-phone kbd { display: none; }
body.m-phone .tb-page { min-width: 0; }
body.m-phone .al-caption { bottom: -26px; font-size: 12px; }
body.m-phone .al-rings { display: none; }
body.m-phone .al-pop { bottom: 70px; }

/* ── 摺疊外螢幕（瘦長）：一頁 6 格，書背收成左上按鈕，索引只留兩個 ── */
body.m-slim .al-desk { grid-template-columns: 1fr; }
body.m-slim .al-spines { position: fixed; left: 8px; top: 50px; bottom: 74px; width: 64px; z-index: 40; padding: 8px; background: rgba(10,18,34,.96); border-radius: 12px; display: none; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
body.m-slim.spines-open .al-spines { display: flex; }
body.m-slim .spine { width: 44px; font-size: 13px; }
body.m-slim .al-burger { display: inline-flex; }
body.m-slim .al-stage { padding: 6px 34px 80px 6px; }
/* 摺疊外螢幕：書籤只畫 5 個（album.js renderTabs：全部、今日特價、快退市、未上市、願望）；原本這裡又藏掉第 3 個以後，只剩 2 個（App 聊天室 11/21 發現），拿掉 */
body.m-slim .al-tabs { right: -32px; }
body.m-slim .tab { width: 34px; }

/* ── 摺疊內螢幕展開：雙頁攤開，摺痕在中間 ── */
body.m-spread .al-book { --book-ratio: 1.42; padding: 18px; }
body.m-spread .al-stage { padding: 8px 76px 90px 12px; }

/* ── 半摺立在桌上：上半只放卡，下半是系列切換和翻頁 ── */
body.m-table .al-top { display: none; }
body.m-table .al-desk { inset: 0 0 50% 0; grid-template-columns: 1fr; }
body.m-table .al-spines { position: fixed; left: 0; right: 0; top: calc(50% + 12px); bottom: 70px; padding: 8px 14px; z-index: 5; }
body.m-table .al-spine-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; height: auto; align-items: stretch; width: 100%; }
body.m-table .spine { writing-mode: horizontal-tb; min-height: 0; width: auto; height: 54px; padding: 0 16px; border-radius: 6px; }
body.m-table .spine::before { left: 0; top: 6px; bottom: 6px; width: 3px; height: auto; right: auto; }
body.m-table .al-stage { padding: 8px; }
body.m-table .al-book { height: 100%; aspect-ratio: auto; width: 100%; }
body.m-table .al-tabs { display: none; }
body.m-table .al-toolbar { bottom: 12px; }
body.m-table .al-caption { display: none; }

/* 頁碼兩旁的翻頁鈕（手機用；電腦的翻頁在工具列） */
.cap-nav { display: none; border: 0; background: rgba(255,255,255,.08); width: 34px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 18px; margin: 0 8px; vertical-align: middle; }
.cap-page { display: none; }
body.m-phone .cap-nav, body.m-slim .cap-nav { display: inline-block; }
body.m-phone .cap-page, body.m-slim .cap-page { display: inline; }
body.m-phone .tb-nav, body.m-slim .tb-nav { display: none; }
body.m-phone .al-caption, body.m-slim .al-caption { bottom: -40px; }
body.m-phone .al-stage, body.m-slim .al-stage { padding-bottom: 116px; }
body.m-phone .al-toolbar, body.m-slim .al-toolbar { left: 8px; right: 8px; bottom: 8px; transform: none; justify-content: space-between; }
body.m-slim .al-top { height: 46px; padding: 0 10px; }
body.m-slim .al-top nav, body.m-slim .al-brand small, body.m-slim .al-brand img { display: none; }
body.m-slim .al-desk { inset: 46px 0 0 0; }
body.m-slim .tab { width: 34px; padding: 8px 4px 8px 8px; font-size: 11px; writing-mode: vertical-rl; letter-spacing: .1em; }
body.m-slim .tab small { display: none; }
body.m-slim .al-rings, body.m-phone .al-rings { display: none; }
body.m-slim .tb-btn .lbl-long, body.m-slim kbd { display: none; }
body.m-slim .tb-btn { padding: 0 8px; }
body.m-slim .tb-seg button, body.m-phone .tb-seg button { padding: 0 9px; }

/* 電腦與雙頁：書背貼著卡冊、整組置中 */
.al-desk { display: flex; justify-content: center; }
.al-spines { flex: none; }
.al-stage { flex: none; }
body.m-phone .al-desk, body.m-slim .al-desk, body.m-table .al-desk { display: grid; }
body.m-phone .al-stage, body.m-slim .al-stage, body.m-table .al-stage { flex: initial; }
body.m-slim .al-caption, body.m-phone .al-caption { white-space: nowrap; font-size: 12px; }
body.m-slim .al-caption #caption b, body.m-slim .al-caption #caption { display: inline-block; max-width: calc(100% - 100px); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* 書背：不要橫向捲軸；直向捲軸做成卡冊邊的細滑軌，不突兀；書背上不放色槓 */
.al-spine-list { overflow-x: hidden; overflow-y: auto; padding-right: 14px; scrollbar-width: thin; scrollbar-color: rgba(143,182,255,.28) transparent; }
.al-spine-list::-webkit-scrollbar { width: 6px; height: 0; }
.al-spine-list::-webkit-scrollbar-track { background: linear-gradient(90deg, transparent 2px, rgba(176,208,255,.08) 2px 4px, transparent 4px); }
.al-spine-list::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(143,182,255,.3); }
.al-spine-list::-webkit-scrollbar-thumb:hover { background: rgba(111,214,196,.55); }
.spine::before { display: none; }
.spine { box-shadow: inset -2px 0 0 rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.35); }

/* ── 翻頁：每一面頁疊在同一個位置，翻的時候繞著書脊轉 ── */
.al-spread { position: relative; display: block; perspective: 2600px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.al-spread .al-page { position: absolute; top: 0; bottom: 0; height: auto; backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: transform; animation: none; }
.al-page.left { border-radius: 12px 2px 2px 12px; } .al-page.right { border-radius: 2px 12px 12px 2px; }
.al-spread[data-pages="2"] .al-page:first-child, .al-spread[data-pages="2"] .al-page:last-child { border-radius: inherit; }
.al-paper { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; border-radius: 12px; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 12%), repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 3px, transparent 3px 7px), #1d3459; }
.al-spread.flipping .al-page { box-shadow: 0 0 30px rgba(0,0,0,.35); }
.al-spread.flipping .pocket-name { display: none; }
.al-crease { z-index: 6; }

/* ── 右邊索引：字不被切 ── */
.al-tabs { right: auto; left: calc(100% - 8px); }
.tab { width: auto; min-width: 80px; white-space: nowrap; padding: 10px 14px 10px 20px; }
.tab small { white-space: nowrap; }
body.m-desk .al-stage, body.m-spread .al-stage { padding-right: 118px; }
body.m-phone .al-tabs, body.m-slim .al-tabs { left: calc(100% - 4px); }
body.m-phone .tab, body.m-slim .tab { min-width: 0; width: 36px; padding: 10px 4px 10px 10px; }
/* 手機上被選中的索引少凸一點：凸 10px 會超出畫面右邊 2px、被切掉（驗證 A8 11/20） */
body.m-phone .al-tabs:not(.tabs-mirror) .tab[aria-pressed="true"], body.m-slim .al-tabs:not(.tabs-mirror) .tab[aria-pressed="true"] { transform: translateX(5px); }

/* 手機不論設深色或淺色，看起來都一樣：宣告這頁本來就支援深色（樣式完全不變），瀏覽器就不會自己調暗 */
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; } }
/* 頁碼不要被下方工具列蓋到 */
body.m-desk .al-stage, body.m-spread .al-stage { padding-bottom: 116px; }
.al-hit.al-all { width: 100%; border: 0; background: rgba(111,214,196,.08); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.al-hit.al-all .n { color: var(--mint); }

/* ── 手機（一般手機、摺疊外螢幕）：系列書背改放上面，從最左邊排起，左右滑選系列 ── */
body.m-phone .al-desk, body.m-slim .al-desk { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
body.m-phone .al-spines, body.m-slim .al-spines { position: static; display: block; width: auto; height: auto; padding: 4px 0 2px; background: none; box-shadow: none; border-radius: 0; overflow: hidden; }
body.m-phone .al-spine-list, body.m-slim .al-spine-list { flex-direction: row; align-items: flex-end; gap: 3px; height: auto; overflow-x: auto; overflow-y: hidden; padding: 4px 10px 8px 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-bottom: 2px solid rgba(143,182,255,.12); }
body.m-phone .al-spine-list::-webkit-scrollbar, body.m-slim .al-spine-list::-webkit-scrollbar { display: none; }
body.m-phone .spine, body.m-slim .spine { flex: none; width: 30px; height: 70px; min-height: 0; padding: 6px 0; font-size: 12px; letter-spacing: .02em; scroll-snap-align: start; border-radius: 4px 4px 2px 2px; overflow: hidden; }
body.m-phone .spine small, body.m-slim .spine small { display: none; }
body.m-phone .spine:hover, body.m-slim .spine:hover { transform: none; }
body.m-phone .spine[aria-pressed="true"], body.m-slim .spine[aria-pressed="true"] { transform: translateY(-6px); }
body.m-phone .spine.all, body.m-slim .spine.all { width: 34px; }
body.m-slim .al-burger { display: none !important; }
body.m-phone .al-stage, body.m-slim .al-stage { padding-top: 8px; }

/* ── 清單：一盒一列；電腦一行排，手機兩行排，字不再被切掉 ── */
.al-rows { display: flex; flex-direction: column; }
.al-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 10px 6px; border-bottom: 1px dashed rgba(176,208,255,.14); text-decoration: none; color: var(--ink); }
.al-row:hover { background: rgba(111,214,196,.07); }
/* 盒號字級自己定（外掛頁面的主題會把字放大到 22px，7 位數盒號蓋到名字；驗證 A6 11/20）；欄放不下時縮字，不疊到名字 */
.r-n { color: var(--mint); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; line-height: 1.2; min-width: 0; overflow: hidden; white-space: nowrap; letter-spacing: -.01em; }
.r-n.r-n7 { font-size: 13px; }
.r-name { min-width: 0; } .r-name b { display: flex; align-items: baseline; gap: 0 8px; min-width: 0; font-size: 15px; }
.r-name b .r-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 上市／退市日期標籤：名字太長時縮名字、標籤一定完整（11/19 巡檢：日期標籤被截成刪節號、手機「預」字後斷行） */
.al-row .r-name .shop-rowtag { flex: none; margin-left: 0; white-space: nowrap; }
.r-name small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-meta { display: flex; gap: 12px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.r-meta .r-score { color: var(--ink); font-weight: 700; min-width: 42px; text-align: right; }
body.m-phone .al-row, body.m-slim .al-row { grid-template-columns: 58px minmax(0, 1fr); padding: 8px 4px; }
body.m-phone .r-meta, body.m-slim .r-meta { grid-column: 1 / -1; flex-wrap: nowrap; gap: 4px 10px; font-size: 12px; padding-left: 62px; }
/* 清單一頁的列數由程式照高度算好（--lrows），列平均分掉整頁高度，不會有最後一列切一半 */
.al-page.list { container-type: inline-size; }
.al-page.list .al-rows { height: 100%; display: grid; grid-template-rows: repeat(var(--lrows, 10), minmax(0, 1fr)); }
.al-page.list .al-row { padding-top: 2px; padding-bottom: 2px; min-height: 0; overflow: hidden; }
/* 頁面窄（摺疊機雙頁、手機）：一列分兩行，盒號＋名字一行、系列日期價格一行（11/19 巡檢：摺疊 832 寬名字欄整欄不見、價格被切） */
@container (max-width: 560px) {
  .al-row { grid-template-columns: 58px minmax(0, 1fr); column-gap: 8px; }
  .r-n { font-size: 14px; } .r-n.r-n7 { font-size: 12px; }
  .r-meta { grid-column: 1 / -1; flex-wrap: nowrap; gap: 10px; font-size: 12px; padding-left: 66px; min-width: 0; }
  .r-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* 放不下時縮系列名，分數不要掉到下一行 */
  .r-meta .r-score { min-width: 0; flex: none; }
  .r-name b { flex-wrap: wrap; font-size: 14px; }
  .r-name b .r-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
}
body.m-phone .r-name b, body.m-slim .r-name b { font-size: 14px; }
html.theme-light .al-row { border-bottom-color: rgba(24,48,96,.1); }

/* ── 條件、排列面板：全部清除、排列項目分組 ── */
.al-pop { max-height: min(70vh, 640px); display: flex; flex-direction: column; }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pop-head h3 { margin: 0 0 10px; }
.pop-clear { border: 1px solid rgba(255,138,118,.5); background: transparent; color: var(--coral); border-radius: 8px; padding: 5px 12px; font: 600 13px var(--font); cursor: pointer; margin-bottom: 10px; }
.pop-clear:hover { background: rgba(255,138,118,.1); }
.pop-scroll { overflow-y: auto; min-height: 0; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.pop-scroll h4 { margin: 10px 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.al-pop .chips { margin-bottom: 6px; }
.al-pop .chips.dir { margin-bottom: 10px; }
.al-pop .chips button.sub { font-size: 12.5px; padding: 5px 9px; opacity: .92; }
.pop-note { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
.al-pop[hidden] { display: none; }

/* 翻頁光影（翻頁時才加進去） */
.al-shade { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 30; }
.al-spread.flipping { overflow: visible; }
/* 書背字一律排成一行（使用者 11/17：手機字會被換行）；書背高度跟著字長，像真的書高低不一 */
.spine { white-space: nowrap; }
body.m-phone .spine, body.m-slim .spine { height: auto; min-height: 70px; }
.spine { font-size: var(--fs-d, 15px); }
body.m-phone .spine, body.m-slim .spine { font-size: var(--fs-p, 12px); }

/* ── 封面、封底：書闔起來 ── */
.al-page.al-cover { padding: 0; display: block; overflow: hidden; background: #2a1b22; box-shadow: none; }
.al-page.al-cover .cv-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.al-page.al-cover.right, .al-page.al-cover:not(.left):not(.right) { border-radius: 4px 14px 14px 4px; }
.al-page.al-cover.left { border-radius: 14px 4px 4px 14px; }
.al-page.al-blank { background: none !important; box-shadow: none !important; pointer-events: none; }
.cv-title { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; white-space: nowrap; pointer-events: none; font-family: var(--font); line-height: 1.1; }
.cv-title b { letter-spacing: .08em; } .cv-title small { letter-spacing: .12em; }
.cv-change { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(8,14,28,.62); color: #fff; font: 600 13px/1 var(--font); cursor: pointer; z-index: 5; backdrop-filter: blur(4px); }
.cv-change:hover { background: rgba(8,14,28,.82); }
/* 闔起來時：書本外框、裝訂環、中縫都收掉，只剩一本有厚度的書 */
.al-book.is-closed { background: transparent; box-shadow: none; }
.al-book.is-closed::before, .al-book.is-closed .al-crease, .al-book.is-closed .al-rings { display: none; }
.al-book.is-closed .al-cover { box-shadow: 1px 1px 0 var(--edge), 3px 3px 0 var(--edge), 5px 5px 0 color-mix(in srgb, var(--edge) 75%, #000), 7px 7px 0 color-mix(in srgb, var(--edge) 60%, #000), 0 24px 50px rgba(0,0,0,.55); }
.al-book.is-closed .al-cover.left { box-shadow: -1px 1px 0 var(--edge), -3px 3px 0 var(--edge), -5px 5px 0 color-mix(in srgb, var(--edge) 75%, #000), -7px 7px 0 color-mix(in srgb, var(--edge) 60%, #000), 0 24px 50px rgba(0,0,0,.55); }
.al-coverpick { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(4,8,18,.6); padding: 16px; }
.al-coverpick .cp-card { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px; border-radius: 18px; background: #14223f; border: 1px solid rgba(176,208,255,.2); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.al-coverpick h3 { margin: 0 0 12px; font-size: 18px; }
.al-coverpick .cp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.al-coverpick .cp-grid button { padding: 6px; border-radius: 12px; border: 2px solid transparent; background: rgba(255,255,255,.04); color: inherit; cursor: pointer; font: 600 12.5px/1.3 var(--font); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.al-coverpick .cp-grid button[aria-pressed="true"] { border-color: var(--mint); }
.al-coverpick .cp-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }
.al-coverpick .cp-grid small { display: block; color: var(--mint); font-size: 11px; }
.al-coverpick .cp-upload, .al-coverpick .cp-reset, .al-coverpick .cp-close { display: block; width: 100%; margin-top: 12px; padding: 11px; border-radius: 12px; text-align: center; cursor: pointer; font: 700 14px/1 var(--font); }
.al-coverpick .cp-upload { border: 1px dashed rgba(176,208,255,.4); color: var(--ink); }
.al-coverpick .cp-reset { border: 1px solid rgba(255,138,118,.4); background: none; color: var(--coral); }
.al-coverpick .cp-close { border: 0; background: var(--mint); color: #0b1a2e; }
.al-coverpick .cp-note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.al-coverpick .cp-err { margin: 6px 0 0; color: var(--coral); font-size: 13px; }
@media (max-width: 520px) { .al-coverpick .cp-grid { grid-template-columns: repeat(3, 1fr); } }

/* 封面內側、封底內側（蝴蝶頁）：硬紙板，沒有卡袋 */
.al-page.al-endpaper, .al-paper.al-endpaper { padding: 0; display: block; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--edge, #efe1c7) 92%, #fff), color-mix(in srgb, var(--edge, #efe1c7) 80%, #000)); box-shadow: inset 0 0 40px rgba(0,0,0,.25); }
.al-page.al-endpaper .cv-bg, .al-paper.al-endpaper .cv-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.al-page.al-endpaper.left { box-shadow: inset -18px 0 26px -14px rgba(0,0,0,.45); }
.al-page.al-endpaper.right { box-shadow: inset 18px 0 26px -14px rgba(0,0,0,.45); }

/* ── 書架統一在上面（使用者 11/18）：左右滑，正中間那本浮起來；點它（或「打開 ›」）就換成那一系列 ── */
body:not(.m-table) .al-desk { display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; justify-content: stretch; }
body:not(.m-table) .al-spines { position: relative; display: block; width: auto; height: auto; padding: 0 0 4px; background: none; box-shadow: none; border-radius: 0; overflow: hidden; }
body:not(.m-table) .al-spine-list { display: flex; flex-direction: row; align-items: flex-end; gap: 4px; height: auto; overflow-x: auto; overflow-y: hidden;
  padding: 24px calc(50% - 22px) 10px; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  border-bottom: 2px solid rgba(143,182,255,.14);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
body:not(.m-table) .al-spine-list::-webkit-scrollbar { display: none; }
body:not(.m-table) .spine { flex: none; width: 40px; height: auto; min-height: 92px; scroll-snap-align: center; overflow: visible; transform-origin: 50% 100%;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s, filter .28s; filter: brightness(.8) saturate(.9); }
body:not(.m-table) .spine small { display: none; }
body:not(.m-table) .spine:hover { transform: translateY(-3px); filter: brightness(.95); }
body:not(.m-table) .spine[aria-pressed="true"] { transform: none; box-shadow: inset -2px 0 0 rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.35); }
body:not(.m-table) .spine[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--mint); }
body:not(.m-table) .spine.is-center { transform: translateY(-16px) scale(1.14); filter: brightness(1.1) saturate(1.05); z-index: 2;
  box-shadow: 0 16px 22px rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.22), 0 0 20px rgba(111,214,196,.4); }
body.m-phone .spine, body.m-slim .spine { width: 30px; min-height: 70px; }
body.m-phone .al-spine-list, body.m-slim .al-spine-list { padding: 20px calc(50% - 16px) 8px; gap: 3px; }
.al-shelf-label { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 30px; margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.al-shelf-label b { color: var(--ink); font-size: 15px; }
.al-shelf-label em { font-style: normal; color: var(--mint); font-size: 12px; }
.al-shelf-label button { border: 0; border-radius: 999px; padding: 5px 12px; background: var(--mint); color: #0b1a2e; font: 700 13px/1 var(--font); cursor: pointer; }
body.m-table .al-shelf-label { display: none; }
.al-flybook { pointer-events: none; box-shadow: 0 30px 60px rgba(0,0,0,.6); transform-origin: 50% 50%; }

/* ── 書架抽屜（使用者 11/18）：平常只留一條把手，要選時拉下來、選完收回，卡冊可以用整個畫面 ── */
body:not(.m-table) .al-spines { position: relative; z-index: 35; overflow: visible; padding: 0; }
.al-shelf-handle { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 36px; border: 0; border-bottom: 1px solid rgba(143,182,255,.14);
  background: rgba(10,18,34,.55); color: var(--muted); font: 600 13.5px/1 var(--font); cursor: grab; touch-action: none; user-select: none; }
.al-shelf-handle b { color: var(--ink); }
.al-shelf-handle .sh-grip { width: 38px; height: 4px; border-radius: 2px; background: rgba(176,208,255,.35); }
.al-shelf-handle .sh-tip { color: var(--mint); font-size: 12.5px; }
body.shelf-open .al-shelf-handle .sh-tip { visibility: hidden; }
body:not(.m-table) .al-shelf-drawer { position: absolute; left: 0; right: 0; top: 100%; padding-bottom: 6px; background: rgba(10,18,34,.97); backdrop-filter: blur(8px);
  box-shadow: 0 22px 40px rgba(0,0,0,.55); border-bottom: 1px solid rgba(143,182,255,.18); border-radius: 0 0 18px 18px;
  clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .34s cubic-bezier(.2,.8,.2,1), visibility 0s linear .34s; }
body.shelf-open:not(.m-table) .al-shelf-drawer { clip-path: inset(0 0 -60px 0); visibility: visible; transition: clip-path .34s cubic-bezier(.2,.8,.2,1), visibility 0s; }
body:not(.m-table) .al-shelf-drawer .al-spine-list { border-bottom: 0; }
body.m-table .al-shelf-handle { display: none; }
html.theme-light .al-shelf-handle { background: rgba(255,255,255,.7); }
html.theme-light body:not(.m-table) .al-shelf-drawer { background: rgba(244,247,252,.97); }

/* 書架左右箭頭（電腦用滑鼠也能滑） */
.al-shelf-drawer .sh-arrow { position: absolute; top: 50%; transform: translateY(-70%); z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(176,208,255,.3);
  background: rgba(14,26,50,.9); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.al-shelf-drawer .sh-prev { left: 12px; } .al-shelf-drawer .sh-next { right: 12px; }
.al-shelf-drawer .sh-arrow:hover { border-color: var(--mint); color: var(--mint); }
body.m-phone .al-shelf-drawer .sh-arrow, body.m-slim .al-shelf-drawer .sh-arrow { display: none; }
body:not(.m-table) .al-shelf-drawer .al-spine-list { cursor: grab; }

.tll-collect-dialog .tll-collect-offs { margin-top: 8px !important; }
/* 卡冊工具列：圖卡／卡牌改成開關（使用者 11/18） */
.tb-switch { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 700 13.5px/1 var(--font); cursor: pointer; }
.tb-switch i { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #2b3d5e; box-shadow: inset 0 0 0 1px rgba(176,208,255,.25); transition: background .2s; }
.tb-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.tb-switch[aria-checked="true"] i { background: var(--mint); } .tb-switch[aria-checked="true"] i::after { transform: translateX(18px); }
.tb-switch .on-l { color: var(--ink); } .tb-switch[aria-checked="true"] .on-l { color: var(--muted); } .tb-switch[aria-checked="true"] .on-r { color: var(--ink); }
.tb-switch[data-list="1"] .on-l, .tb-switch[data-list="1"] .on-r { color: var(--muted); }
.tb-list { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(176,208,255,.2); background: none; color: var(--muted); font: 700 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; flex: none; }   /* 摺疊機上不擠成兩行（11/19 巡檢） */
.tb-list[aria-pressed="true"] { background: var(--mint); color: #0b1a2e; border-color: var(--mint); }
/* 摺疊機（雙頁）：書本大一點、上下間距小一點（使用者 11/18） */
body.m-spread .al-stage { padding: 2px 100px 62px 6px; }
body.m-spread .al-book { padding: 12px; }
body.m-spread .al-book::before { inset: 6px; }

/* 翻頁只用翻起來那片自己的透視，外層不再疊一層 */
.al-spread { perspective: none; }
.al-book { perspective: none; }
/* 索引「新到」的綠底加深一點，白字才清楚（深淺色都適用） */
.tab:nth-child(3) { --tc: #23705f; }
/* 陳列格、書架箭頭本身是深色：字固定淺色，不跟外觀切換 */
.sh-arrow { color: #f4f7ff; }

/* ── 書殼＝封面、封底兩塊硬板（使用者 11/18：「最外圍的是甚麼 為甚麼不是跟封面封底同步」）──
 * 之前書殼是另外畫的一個固定外框，顏色另外挑、尺寸比封面大一圈，翻封面時不會跟著動。
 * 現在：左右各一塊硬板，顏色＝封面底色；那一邊有卡袋頁才露出來。封面和封面內側本身做成硬板大小，翻的時候帶著那半邊一起轉。 */
.al-book { --bk-rad: 22px; background: none !important; box-shadow: none !important; }
body.m-phone .al-book { --bk-rad: 14px; }
.al-book::before { display: none !important; }
.al-board { position: absolute; top: 0; bottom: 0; display: none; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(0,0,0,.2)), repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 5px), var(--binder);
  box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.08); }
.al-board.bl { left: 0; width: 50%; border-radius: var(--bk-rad) 3px 3px var(--bk-rad); }
.al-board.br { right: 0; width: 50%; border-radius: 3px var(--bk-rad) var(--bk-rad) 3px; }
.al-book.bd-l .al-board.bl, .al-book.bd-r .al-board.br { display: block; }
.al-board::before, .al-page.al-endpaper::after, .al-paper.al-endpaper::after { content: ""; position: absolute; top: calc(var(--bk-pad, 12px) * .5); bottom: calc(var(--bk-pad, 12px) * .5); border: 1.5px dashed var(--stitch); pointer-events: none; z-index: 2; }
.al-board.bl::before, .al-page.al-endpaper.left::after, .al-paper.al-endpaper::after { left: calc(var(--bk-pad, 12px) * .5); right: 0; border-right: 0; border-radius: calc(var(--bk-rad) - 6px) 0 0 calc(var(--bk-rad) - 6px); }
.al-board.br::before, .al-page.al-endpaper.right::after { right: calc(var(--bk-pad, 12px) * .5); left: 0; border-left: 0; border-radius: 0 calc(var(--bk-rad) - 6px) calc(var(--bk-rad) - 6px) 0; }
/* 單頁（手機）：只有一塊硬板，書脊在左邊 */
.al-book.one .al-board.br { width: 100%; border-radius: 4px var(--bk-rad) var(--bk-rad) 4px; }
/* 封面、封面內側：做成硬板大小（往上、下多出書殼那一圈；往外的那一圈由程式加寬） */
.al-spread .al-page.al-cover, .al-spread .al-page.al-endpaper, .al-spread .al-paper.al-endpaper { top: calc(-1 * var(--bk-pad, 0px)); bottom: calc(-1 * var(--bk-pad, 0px)); height: auto; }
.al-spread .al-page.al-cover.right, .al-spread .al-page.al-cover:not(.left):not(.right) { border-radius: 3px var(--bk-rad) var(--bk-rad) 3px; }
.al-spread .al-page.al-cover.left { border-radius: var(--bk-rad) 3px 3px var(--bk-rad); }
/* 封面內側：硬板的布面包一圈，裡面才是蝴蝶頁的圖 */
.al-spread .al-page.al-endpaper, .al-spread .al-paper.al-endpaper { background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(0,0,0,.2)), var(--binder); }
.al-spread .al-page.al-endpaper.left, .al-spread .al-paper.al-endpaper { border-radius: var(--bk-rad) 3px 3px var(--bk-rad); }
.al-spread .al-page.al-endpaper.right { border-radius: 3px var(--bk-rad) var(--bk-rad) 3px; }
.al-page.al-endpaper.left .cv-bg, .al-paper.al-endpaper .cv-bg { inset: var(--bk-pad, 0px) 0 var(--bk-pad, 0px) var(--bk-pad, 0px); width: auto; height: auto; border-radius: 10px 0 0 10px; }
.al-page.al-endpaper.right .cv-bg { inset: var(--bk-pad, 0px) var(--bk-pad, 0px) var(--bk-pad, 0px) 0; width: auto; height: auto; border-radius: 0 10px 10px 0; }

/* 圖卡／卡牌：兩顆並排、一次只亮一顆（使用者 11/18 改回）；清單是旁邊另一顆 */
.tb-views { display: inline-flex; align-items: center; gap: 6px; }
/* 封面內側的圖要撐滿內框：圖片絕對定位時寬高 auto 會照原本長寬比縮放，下面空出一塊露出硬板底色（使用者 11/18：「封面有奇怪的色塊」） */
.al-page.al-endpaper .cv-bg, .al-paper.al-endpaper .cv-bg { width: calc(100% - var(--bk-pad, 0px)) !important; height: calc(100% - 2 * var(--bk-pad, 0px)) !important; object-fit: cover; }
/* 封面內側圖靠書脊那邊有 Codex 畫的書背色帶（inside.json：封面內側右側 840–900、封底內側左側 0–60），
 * 書本身已經有書脊，色帶會變成一條怪色塊（使用者 11/18）。把圖放寬 900/840 倍，讓色帶落到頁面外被裁掉。 */
.al-page.al-endpaper.left .cv-bg, .al-paper.al-endpaper .cv-bg { width: calc((100% - var(--bk-pad, 0px)) * 1.0715) !important; object-position: left center; border-radius: 10px 0 0 10px; }
.al-page.al-endpaper.right .cv-bg { left: calc((100% - var(--bk-pad, 0px)) * -0.0715) !important; width: calc((100% - var(--bk-pad, 0px)) * 1.0715) !important; object-position: right center; }
/* 闔書（使用者 11/18：「封面蓋上去的時候會跳轉圖 有點不順暢 標籤也沒有夾在裡面」）
 * 1. 翻完那一刻封面的層級被清掉，標籤（z-index 3）一下子跑到封面上面 → 闔著時封面固定在標籤上面，標籤像從書頁裡伸出來、被封面壓著。
 * 2. 書口的紙邊（封面的陰影）在翻完那一刻一下子冒出來 → 改成淡入。 */
.al-book.is-closed .al-cover { z-index: 4; }
.al-spread .al-page.al-cover { transition: box-shadow .45s ease; }
.al-book.is-closed .al-tabs { animation: al-tabs-tuck .45s ease; }
@keyframes al-tabs-tuck { from { opacity: .4; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
/* 闔在封底時，標籤要從另一邊（左邊）伸出來，跟著書翻面 */
.al-book[data-closed="back"] .al-tabs { right: auto; left: -64px; }
.al-book[data-closed="back"] .tab { border-radius: 12px 0 0 12px; padding: 12px 18px 12px 8px; text-align: right; }
body.m-phone .al-book[data-closed="back"] .al-tabs { left: -38px; }
body.m-slim .al-book[data-closed="back"] .al-tabs { left: -32px; }
@keyframes al-tabs-tuck-l { from { opacity: .4; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.al-book[data-closed="back"] .al-tabs { animation-name: al-tabs-tuck-l; }
/* 封底那邊的標籤：字靠外側，才不會被封底壓住 */
.al-book[data-closed="back"] .tab { text-align: left; padding: 12px 14px 12px 10px; }
.al-book[data-closed="back"] .al-tabs { left: -70px; }

/* ── 漲價紅框（11/18，price-frame.js）：現在價格比台灣定價貴 ── */
.pocket.px-up { position: relative; }
.pocket .px-ring { position: absolute; inset: 0; z-index: 5; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 3px #ff4d4d, inset 0 0 20px rgba(255,77,77,.55); }   /* 卡袋會裁掉外面，紅框畫在內側 */
.pocket .px-tag, .px-tag-set { position: absolute; top: 6px; right: 6px; z-index: 7; padding: 2px 7px; border-radius: 7px; background: #c8262a; color: #fff; font: 800 11.5px/1.4 var(--font); letter-spacing: .02em; box-shadow: 0 2px 6px rgba(0,0,0,.4); pointer-events: auto; }
.flip.px-up { outline: 3px solid #ff4d4d; outline-offset: 16px; border-radius: 24px; box-shadow: 0 0 0 16px transparent, 0 0 34px 14px rgba(255,77,77,.28); }   /* 推到星級外框（彩虹、藍白、金）外面，兩種框可以同時看得到 */
.px-tag-set { position: absolute; top: auto; right: auto; display: inline-block; margin: 0; font-size: 13px; padding: 3px 10px; white-space: nowrap; }   /* 掛在卡外那圈紅框的線上（位置由 price-frame.js 算），不佔版面、不擋卡（使用者 11/19：漲幅框會擋到下面的元件） */
/* ── 特效框開關（設定 → 特效框）：星級框／價格框 ── */
html.no-fx-star .ca-ring-wrap { display: none !important; }
html.no-fx-price .pocket .px-ring, html.no-fx-price .pocket .px-tag, html.no-fx-price .px-tag-set,
html.no-fx-price .pocket .shop-ring, html.no-fx-price .pocket .shop-lamps, html.no-fx-price .pocket .shop-plate { display: none !important; }
html.no-fx-price .flip.px-up { outline: none; box-shadow: none; }
html.no-fx-price .al-row.shop-lit { box-shadow: none !important; }

/* 設定面板要在導購的進站提示卡上面 */
.tll-settings { z-index: 120 !important; }

/* ── 說明列離書遠一點；下面是快速翻頁拉桿（使用者 11/18）── */
.al-caption { bottom: -48px; }
body.m-phone .al-caption, body.m-slim .al-caption { bottom: -50px; }
body.m-desk .al-stage, body.m-spread .al-stage { padding-bottom: 178px; }
body.m-phone .al-stage, body.m-slim .al-stage { padding-bottom: 172px; }
.al-scrub { position: absolute; left: 50%; bottom: -104px; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 12px; width: min(640px, calc(100% + 40px)); }
body.m-phone .al-scrub, body.m-slim .al-scrub { width: calc(100% + 10px); gap: 8px; bottom: -106px; }
body.m-table .al-scrub { display: none; }
/* 自動翻閱按鈕 */
.sc-auto { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,220,105,.5); background: linear-gradient(180deg, #2a2412, #15120a); color: #ffe7a6; font: 700 13.5px/1 var(--font); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,240,200,.25), 0 4px 10px rgba(0,0,0,.4); white-space: nowrap; }
.sc-auto i { font-style: normal; font-size: 11px; }
.sc-auto[aria-pressed="true"] { background: linear-gradient(180deg, #ffe08a, #c99a2e); color: #2a1c00; border-color: #ffe08a; }
.sc-auto[data-paused="1"] { border-color: var(--mint); color: var(--mint); }
body.m-phone .sc-auto span, body.m-slim .sc-auto span { display: none; }
body.m-phone .sc-auto, body.m-slim .sc-auto { width: 38px; padding: 0; justify-content: center; }
/* 秒數 */
.sc-sec select { height: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid rgba(176,208,255,.25); background: #0f1d38; color: var(--muted); font: 600 12.5px var(--font); cursor: pointer; }
body.m-phone .sc-sec select, body.m-slim .sc-sec select { width: 74px; font-size: 11.5px; padding: 0 4px; }
/* 拉桿：黃銅滑軌＋書籤 */
.sc-rail { position: relative; flex: 1; height: 38px; display: flex; align-items: center; }
.sc-ticks { position: absolute; left: 11px; right: 11px; top: 50%; height: 14px; transform: translateY(-50%); pointer-events: none; border-radius: 7px;
  background: repeating-linear-gradient(90deg, rgba(255,231,166,.55) 0 1px, transparent 1px calc(100% / (var(--n, 10) - 1))) 0 50% / 100% 6px no-repeat; }
.sc-rail input[type=range] { position: relative; z-index: 1; width: 100%; height: 38px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; --p: 0%; }
.sc-rail input[type=range]:disabled { opacity: .4; cursor: default; }
.sc-rail input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 6px; border: 1px solid rgba(0,0,0,.6);
  background: linear-gradient(90deg, #ffd56b var(--p), transparent var(--p)) 0 0 / 100% 2px no-repeat, linear-gradient(180deg, #6b5420, #c9a64f 30%, #8a6a26 55%, #4a3812); box-shadow: inset 0 1px 2px rgba(0,0,0,.6), 0 1px 0 rgba(255,240,200,.18); }
.sc-rail input[type=range]::-moz-range-track { height: 10px; border-radius: 6px; border: 1px solid rgba(0,0,0,.6); background: linear-gradient(180deg, #6b5420, #c9a64f 30%, #8a6a26 55%, #4a3812); }
.sc-rail input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 34px; margin-top: -13px; border: 0; cursor: grab;
  background: linear-gradient(180deg, #ff7a6a, #c8262a 70%, #8e1418); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); box-shadow: inset 0 3px 0 #ffe08a; }
.sc-rail input[type=range]::-moz-range-thumb { width: 22px; height: 34px; border: 0; border-radius: 0; background: linear-gradient(180deg, #ff7a6a, #c8262a 70%, #8e1418); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.sc-rail input[type=range]:active::-webkit-slider-thumb { cursor: grabbing; }
.sc-bubble { position: absolute; bottom: 40px; transform: translateX(-50%); padding: 4px 10px; border-radius: 9px; background: #1b1408; border: 1px solid #ffd56b; color: #ffe7a6; font: 800 13px/1.3 var(--font); white-space: nowrap; pointer-events: none; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
/* 快速翻頁時：卡先淡掉，上面一疊空白紙快速翻過去，頁碼放中間 */
.al-book.scrubbing .al-spread .al-page:not(.al-cover):not(.al-endpaper) > * { opacity: .12; transition: opacity .15s; }
.al-riffle { position: absolute; z-index: 9; pointer-events: none; perspective: 3200px;
  left: calc(50% + 4px); right: var(--bk-pad, 22px); top: var(--bk-pad, 22px); bottom: var(--bk-pad, 22px); }
.al-book.one .al-riffle { left: calc(var(--bk-pad, 22px) + 4px); }
.al-riffle i { position: absolute; inset: 0; border-radius: 4px 10px 10px 4px; transform-origin: left center; backface-visibility: visible;
  background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 14%), linear-gradient(180deg, var(--page, #182e52), var(--page-2, #13254a)); box-shadow: 0 0 18px rgba(0,0,0,.4);
  animation: rf-flip var(--rf, .3s) linear infinite; opacity: 0; }
.al-riffle i:nth-child(2) { animation-delay: calc(var(--rf, .3s) * -.2); } .al-riffle i:nth-child(3) { animation-delay: calc(var(--rf, .3s) * -.4); }
.al-riffle i:nth-child(4) { animation-delay: calc(var(--rf, .3s) * -.6); } .al-riffle i:nth-child(5) { animation-delay: calc(var(--rf, .3s) * -.8); }
.al-riffle.back i { animation-direction: reverse; }
.al-riffle.slow i { animation-play-state: paused; opacity: 0; }
@keyframes rf-flip { 0% { transform: rotateY(0deg); opacity: .95; } 50% { opacity: .8; } 100% { transform: rotateY(-180deg); opacity: .0; } }
.al-book.one .al-riffle i { transform-origin: left center; }
.rf-no { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 14px; background: rgba(10,16,30,.85); border: 1px solid rgba(255,213,107,.6); color: #ffe7a6; font: 800 20px/1 var(--font); white-space: nowrap; box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.al-book:not(.one) .rf-no { left: 0; }

/* 闔著的書拖著翻面 */
.al-book.is-closed .al-cover { cursor: grab; }
.al-c3d { position: absolute; z-index: 12; transform-style: preserve-3d; pointer-events: none; }
.al-c3d .c3-face { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 24px 50px rgba(0,0,0,.55); }
.al-c3d .c3-back { transform: rotateY(180deg); }

/* ── 闔上的卡冊＝立體書盒（11/18）── */
.al-book.has-c3d .al-tabs { visibility: hidden; }
.al-book.is-closed .al-cube .al-cover { box-shadow: none; }
.al-cube-wrap { position: absolute; z-index: 12; perspective: 2400px; cursor: grab; touch-action: none; }
.al-cube-wrap:active { cursor: grabbing; }
.al-cube { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.al-cube .cb-face { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; left: 0 !important; top: 0 !important; margin: 0 !important;
  border-radius: 3px var(--bk-rad, 22px) var(--bk-rad, 22px) 3px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--binder, #2a1b22); transform: translateZ(calc(var(--t) / 2)); }
.al-cube .cb-face .cv-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.al-cube .cb-back { transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); }
.al-cube .cb-side { position: absolute; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* 書背：封面的布面色＋兩道壓線 */
.al-cube .cb-spine { left: calc(var(--w) / 2 - var(--t) / 2); top: 0; width: var(--t); height: 100%; transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
  background: linear-gradient(180deg, transparent 6%, rgba(255,255,255,.18) 6.4%, transparent 7%, transparent 93%, rgba(255,255,255,.18) 93.4%, transparent 94%), linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.12) 50%, rgba(0,0,0,.35)), var(--binder, #3a2230); }
/* 書口：一頁一頁的紙邊 */
.al-cube .cb-fore, .al-cube .cb-top, .al-cube .cb-bottom { background: repeating-linear-gradient(90deg, #f3ead6 0 2px, #d9cdb3 2px 3px), #efe4cc; box-shadow: inset 0 0 6px rgba(0,0,0,.35); }
.al-cube .cb-fore { left: calc(var(--w) / 2 - var(--t) / 2); top: 6px; width: var(--t); height: calc(100% - 12px); transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 6px)); }
.al-cube .cb-top, .al-cube .cb-bottom { left: 6px; top: calc(var(--h) / 2 - var(--t) / 2); width: calc(100% - 12px); height: var(--t); background: repeating-linear-gradient(0deg, #f3ead6 0 2px, #d9cdb3 2px 3px), #efe4cc; }
.al-cube .cb-top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 6px)); }
.al-cube .cb-bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - 6px)); }
/* 夾在書頁中間的索引書籤 */
.al-cube .cb-tabs { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.al-cube .cb-tab { position: absolute !important; margin: 0; transform: translateZ(calc((var(--k) - 3) * var(--t) / 10)); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.al-cube .cb-tab.cb-tab-back { transform: translateZ(calc((var(--k) - 3) * var(--t) / 10)) rotateY(180deg); border-radius: 12px 0 0 12px; text-align: right; }
.c3d-hint { position: absolute; left: 0; right: 0; bottom: -74px; margin: 0; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .04em; pointer-events: none; }
.al-book:not(.has-c3d) .c3d-hint { display: none; }

/* ── 卡在卡袋正中間（使用者 11/18：「卡牌要顯示在正中間 不要偏上」）── */
.pocket { container-type: size; }
.pocket .slot { height: auto; width: min(100cqw, calc(100cqh * var(--card-ratio, .6667))); max-height: 100cqh; }
/* ── 索引顏色照種類（插在中間不會變色）＋自訂索引 ── */
.al-tabs .tab[data-tab=all] { --tc: #2a4777; } .al-tabs .tab[data-tab=retiring] { --tc: #b1513f; } .al-tabs .tab[data-tab=new] { --tc: #23705f; }
.al-tabs .tab[data-tab=dual] { --tc: #6a4fb0; background: linear-gradient(135deg, #3d8fb8, #7a5cc8 45%, #c45a8e); }
.al-tabs .tab[data-tab=stars5] { --tc: #1f6fb0; } .al-tabs .tab[data-tab=sticker5] { --tc: #a07216; }
.al-tabs .tab[data-tab=ultimate] { --tc: #4a57a8; } .al-tabs .tab[data-tab=mine] { --tc: #8a6a2c; }
.al-tabs .tab-add { --tc: transparent; background: rgba(255,255,255,.06) !important; border: 1.5px dashed rgba(176,208,255,.6) !important; color: #c8d6ee !important; }
/* 淺色模式：「＋ 自訂」和說明列的「法律聲明」貼在淺色頁面上，用深色字（驗證 A9 11/20：對比只有 1.6，幾乎看不見） */
html.theme-light .al-tabs .tab-add { background: rgba(24,48,96,.06) !important; border-color: rgba(24,48,96,.45) !important; color: #3d4d68 !important; box-shadow: none; }
html.theme-light .al-tabs .tab-add:hover { color: #0f7c6f !important; border-color: #0f7c6f !important; }
html.theme-light .al-legal-link { color: #3d4d68; }
.al-tabs .tab-add:hover { color: var(--mint) !important; border-color: var(--mint) !important; }
.al-tabs .ct-editlink { cursor: pointer; text-decoration: underline; opacity: 1 !important; }
/* 索引多了放不下：可以上下捲 */
.al-tabs { max-height: calc(100% - 40px); overflow-y: auto; overflow-x: visible; scrollbar-width: none; padding-right: 14px; }
.al-tabs::-webkit-scrollbar { display: none; }
/* 自訂索引編輯器 */
.ct-card { width: min(720px, 100%) !important; }
.ct-lbl { margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ct-tpl { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-tpl button, .ct-mode button, .ct-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(176,208,255,.28); background: rgba(255,255,255,.04); color: var(--ink); font: 600 13px var(--font); cursor: pointer; }
.ct-mode { display: inline-flex; gap: 6px; }
.ct-mode button[aria-pressed="true"], .ct-chip[aria-pressed="true"] { background: var(--mint); color: #062520; border-color: var(--mint); }
.ct-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ct-name { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ct-name input, .ct-card select, .ct-card input { height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(176,208,255,.3); background: #0d1a31; color: var(--ink); font: 600 14px var(--font); }
.ct-colors { display: flex; gap: 6px; }
.ct-colors button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; }
.ct-colors button[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--mint); }
.ct-rules { display: grid; gap: 8px; }
.ct-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(176,208,255,.12); }
.ct-rule .ct-a, .ct-rule .ct-b { width: 96px; }
.ct-rule .ct-wide { width: 220px; }
.ct-to { color: var(--muted); }
.ct-range { color: var(--faint); font-size: 11.5px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow: auto; width: 100%; }
.ct-del { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255,138,118,.4); background: none; color: var(--coral); cursor: pointer; }
.ct-add { margin-top: 8px; padding: 8px 14px; border-radius: 10px; border: 1px dashed rgba(111,214,196,.6); background: none; color: var(--mint); font: 700 13.5px var(--font); cursor: pointer; }
.ct-count { margin: 14px 0 0; font-size: 14px; color: var(--muted); } .ct-count b { color: var(--mint); font-size: 20px; }
.ct-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ct-btns button { height: 40px; padding: 0 16px; border-radius: 10px; font: 700 14px var(--font); cursor: pointer; border: 1px solid rgba(176,208,255,.3); background: none; color: var(--ink); }
.ct-btns .ct-save { background: var(--mint); border-color: var(--mint); color: #062520; }
.ct-btns .ct-remove { margin-right: auto; border-color: rgba(255,138,118,.5); color: var(--coral); }
@media (max-width: 600px) { .ct-rule .ct-a, .ct-rule .ct-b { width: 80px; } .ct-rule .ct-wide { width: 100%; } }

/* 索引太多放不下：先藏小字（目前選的那個留著），再縮窄 */
.al-tabs.tabs-tight { gap: 5px; }
.al-tabs.tabs-tight .tab { padding-top: 8px; padding-bottom: 8px; }
.al-tabs.tabs-tight .tab:not([aria-pressed="true"]) small { display: none; }
.al-tabs.tabs-tighter { gap: 3px; }
.al-tabs.tabs-tighter .tab { padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
body.m-phone .al-tabs.tabs-tighter .tab, body.m-slim .al-tabs.tabs-tighter .tab { font-size: 12px; padding-top: 4px; padding-bottom: 4px; }
.al-tabs.tabs-more { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 34px), transparent); }
/* 自訂索引：直接加進來的盒組 */
.ct-lbl small { font-weight: 500; font-size: 12px; opacity: .8; }
.ct-idrow { display: flex; gap: 8px; }
.ct-idrow input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(176,208,255,.28); background: rgba(0,0,0,.25); color: var(--ink); font: 600 14px var(--font); }
.ct-idadd { padding: 8px 16px; border-radius: 10px; border: 0; background: var(--mint); color: #0b1a2a; font: 800 14px var(--font); cursor: pointer; white-space: nowrap; }
.ct-idmsg { margin: 6px 0 0; min-height: 1em; font-size: 12.5px; color: var(--gold, #ffd666); }
.ct-idmsg:empty { display: none; }
.ct-idlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 120px; overflow-y: auto; }
.ct-id { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: rgba(111,214,196,.12); border: 1px solid rgba(111,214,196,.4); font-size: 12.5px; color: var(--ink); max-width: 100%; }
.ct-id b { font-weight: 800; color: var(--mint); }
.ct-iddel { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--ink); cursor: pointer; font-size: 11px; line-height: 1; }
.ct-iddel:hover { background: #b1513f; color: #fff; }
html.theme-light .ct-idrow input { background: #fff; border-color: #c8d3e3; }
html.theme-light .ct-id { background: #e6f6f2; border-color: #8fd3c4; }
html.theme-light .ct-idadd { color: #0b1a2a; }
/* 單頁闔上／打開封底：書框先收起來（下面是空的）、書籤翻過書脊後從左邊伸出 */
.al-book.al-closing { background: transparent; box-shadow: none; }
.al-book.al-closing::before, .al-book.al-closing .al-rings, .al-book.al-closing .al-board { opacity: 0; }
.al-tabs.tabs-mirror .tab { border-radius: 12px 0 0 12px; text-align: right; }
.al-tabs.tabs-mirror .tab[aria-pressed="true"] { transform: translateX(-10px); }

/* ══ 真的收藏冊（使用者 11/18：「卡冊打開的跟單頁的樣子根本不像一本書…要真的符合現實的收藏冊一樣」）══
 * Codex 設計（design-briefs/codex-收藏冊/規格.md）：活頁環扣式卡片收藏冊。
 * 書皮（兩塊硬板）有皮革紋理、往下的厚度；書脊上金屬底板＋三個環扣（12%／50%／88%）；內頁靠書脊那邊有打孔邊條；
 * 卡袋是透明塑膠：熱壓接縫、上緣拇指缺口、淡淡的斜高光；兩側看得到一疊內頁的書口，翻得越後面左邊越厚。 */
.al-board { background: var(--tll-asset-binder-leather-png) 0 0 / 256px repeat, linear-gradient(135deg, rgba(255,255,255,.07), rgba(0,0,0,.2)), var(--binder);
  background-blend-mode: soft-light, normal, normal;
  box-shadow: 0 7px 0 color-mix(in srgb, var(--binder) 50%, #000), 0 8px 0 #120f18, 0 18px 40px rgba(0,0,0,.63), inset 0 0 0 1px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.12); }
/* 內頁：深色襯頁＋內頁投影 */
.al-spread .al-page:not(.al-cover):not(.al-endpaper):not(.al-blank):not(.list) { box-shadow: 0 5px 10px rgba(0,0,0,.51), inset 0 0 0 .8px rgba(116,112,122,.55), inset 0 0 36px rgba(0,0,0,.3); }
/* 打孔邊條：靠書脊那一邊（雙頁的左頁在右邊、右頁在左邊；單頁在左邊），三個孔對準環扣 */
.al-spread .al-page:not(.al-cover):not(.al-endpaper):not(.al-blank) { --hole: radial-gradient(circle, #0b090e 0 46%, rgba(188,181,192,.8) 48% 55%, transparent 58%); }
.al-spread[data-pages="1"] .al-page:not(.al-cover):not(.al-endpaper):not(.al-blank):not(.list),
.al-spread[data-pages="2"] .al-page.right:not(.al-cover):not(.al-endpaper):not(.al-blank):not(.list) {
  background: var(--hole) calc(2.75% - 11px) 12% / 22px 22px no-repeat, var(--hole) calc(2.75% - 11px) 50% / 22px 22px no-repeat, var(--hole) calc(2.75% - 11px) 88% / 22px 22px no-repeat,
    linear-gradient(90deg, rgba(113,105,117,.8), rgba(64,59,71,.8)) 0 0 / 5.5% 100% no-repeat, linear-gradient(180deg, var(--page), var(--page-2));
  padding-left: calc(5.5% + 10px); }
.al-spread[data-pages="2"] .al-page.right:not(.al-cover):not(.al-endpaper):not(.al-blank):not(.list) { padding-left: calc(5.5% + 10px); }
.al-spread[data-pages="2"] .al-page.left:not(.al-cover):not(.al-endpaper):not(.al-blank):not(.list) {
  background: var(--hole) calc(97.25% + 11px) 12% / 22px 22px no-repeat, var(--hole) calc(97.25% + 11px) 50% / 22px 22px no-repeat, var(--hole) calc(97.25% + 11px) 88% / 22px 22px no-repeat,
    linear-gradient(90deg, rgba(64,59,71,.8), rgba(113,105,117,.8)) 100% 0 / 5.5% 100% no-repeat, linear-gradient(180deg, var(--page), var(--page-2));
  padding-right: calc(5.5% + 10px); }
body.m-phone .al-spread .al-page:not(.al-cover):not(.al-endpaper):not(.al-blank) { --hole: radial-gradient(circle, #0b090e 0 42%, rgba(188,181,192,.8) 45% 54%, transparent 57%); }

/* 書脊：金屬底板＋三個環扣（雙頁在正中間，單頁在左邊） */
.al-ringbar { position: absolute; top: 0; bottom: 0; z-index: 7; pointer-events: none; }
.al-spread[data-pages="2"] .al-ringbar { left: 44.6%; width: 10.8%; }
.al-spread[data-pages="2"] .al-ringbar::before { content: ""; position: absolute; top: 1%; bottom: 1%; left: 37.5%; width: 25%; border-radius: 99px;
  background: linear-gradient(90deg, #414652, #a1a8b1 25%, #d9dddf 45%, #7e8795 70%, #454c59); box-shadow: 0 0 0 1px rgba(215,219,223,.55), 0 4px 10px rgba(0,0,0,.55); }
.al-spread[data-pages="1"] .al-ringbar { left: calc(-.7 * var(--bk-pad, 16px)); width: calc(.7 * var(--bk-pad, 16px) + 2.75%); }
.al-spread[data-pages="1"] .al-ringbar::before { content: ""; position: absolute; top: 1%; bottom: 1%; left: -4px; width: clamp(8px, calc(.45 * var(--bk-pad, 16px)), 22px); border-radius: 99px;
  background: linear-gradient(90deg, #414652, #a1a8b1 30%, #d9dddf 50%, #454c59); box-shadow: 0 0 0 1px rgba(215,219,223,.5), 0 4px 10px rgba(0,0,0,.55); }
.al-ringbar i { position: absolute; left: -2%; right: -2%; aspect-ratio: 120 / 50; max-height: 7%; transform: translateY(-58%); background: var(--tll-asset-binder-ring-svg) center / 100% 100% no-repeat; filter: drop-shadow(0 3px 3px rgba(0,0,0,.45)); }
.al-ringbar i:nth-child(1) { top: 12%; } .al-ringbar i:nth-child(2) { top: 50%; } .al-ringbar i:nth-child(3) { top: 88%; }
.al-spread[data-pages="2"] .al-crease { display: none; }
/* 闔上、只露封面或蝴蝶頁、翻硬殼時不顯示環扣 */
.al-book.is-closed .al-ringbar, .al-book:not(.bd-l):not(.bd-r) .al-ringbar, .al-spread.hardflip .al-ringbar, .al-book.al-closing .al-ringbar { display: none; }

/* 書口：兩側一疊內頁的邊 */
.al-edge { position: absolute; top: 1.2%; bottom: 1.2%; z-index: 0; pointer-events: none; transition: width .3s ease;
  background: var(--tll-asset-binder-edge-svg) 0 0 / 32px 100% repeat-x; box-shadow: 0 3px 6px rgba(0,0,0,.45); }
.al-edge.r { left: 100%; width: var(--edge-r, 12px); border-radius: 0 6px 6px 0; }
.al-edge.l { right: 100%; width: var(--edge-l, 2px); border-radius: 6px 0 0 6px; transform: scaleX(-1); transform-origin: right center; }
.al-spread[data-pages="2"] .al-edge.l { transform: none; }
.al-book.is-closed .al-edge, .al-book:not(.bd-l):not(.bd-r) .al-edge, .al-book.al-closing .al-edge { display: none; }
.al-book.bd-r:not(.bd-l) .al-spread[data-pages="2"] .al-edge.l, .al-book.bd-l:not(.bd-r) .al-spread[data-pages="2"] .al-edge.r { display: none; }

/* 卡袋：透明塑膠，熱壓接縫（上緣開口）、拇指缺口、淡斜高光 */
.al-spread .pocket { background: rgba(255,255,255,.012); border: 1px solid rgba(163,156,169,.62); border-radius: 5px; }
.al-spread .pocket::after { inset: 3px 3px 3px 3px; border: .6px solid rgba(163,156,169,.38); border-top: 0; border-radius: 0 0 4px 4px;
  background: linear-gradient(135deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.04) 30%, transparent 46%), linear-gradient(90deg, rgba(255,255,255,.18) 0 .7px, transparent 1px); z-index: 3; }
.al-spread .pocket::before { left: calc(50% - min(12px, 8%)); right: auto; width: min(24px, 16%); height: min(12px, 4.5%); top: -1px; border-radius: 0 0 99px 99px;
  background: linear-gradient(180deg, var(--page), var(--page-2)); box-shadow: inset 0 -1px 0 rgba(163,156,169,.6); z-index: 4; }
.al-spread .pocket.empty { border-style: solid; border-color: rgba(163,156,169,.35); }
html.theme-light .al-edge { box-shadow: 0 3px 6px rgba(0,0,0,.22); }
.al-rings { display: none !important; }   /* 舊的單頁環扣，換成 .al-ringbar */

/* ══ 闔起來的收藏冊：腔背圓書脊＋硬板厚度＋卡袋頁書口（使用者 11/18）══ */
.al-cube .cb-spn { top: 0; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background-image: linear-gradient(90deg, rgba(255,255,255,var(--hi)), rgba(255,255,255,var(--hi))), var(--spimg), linear-gradient(180deg, transparent 8%, rgba(255,255,255,.16) 8.5%, rgba(0,0,0,.3) 9.5%, transparent 10%, transparent 90%, rgba(255,255,255,.16) 90.5%, rgba(0,0,0,.3) 91.5%, transparent 92%);
  background-color: var(--binder, #3a2230); background-repeat: no-repeat; box-shadow: inset 0 0 0 999px rgba(0,0,0,var(--sh)); }
.al-cube .cb-spine-title { top: 18%; height: 64%; display: flex !important; align-items: center; justify-content: center; writing-mode: vertical-rl; font: 800 clamp(10px, 1.6vmin, 18px) var(--font); letter-spacing: .3em;
  color: color-mix(in srgb, var(--stitch, #c9a96e) 85%, #fff); text-shadow: 0 1px 0 rgba(0,0,0,.6), 0 -1px 0 rgba(255,255,255,.12); white-space: nowrap; overflow: hidden; }
.al-cube .cb-board { background: linear-gradient(90deg, color-mix(in srgb, var(--binder, #3a2230) 60%, #000), color-mix(in srgb, var(--binder, #3a2230) 80%, #fff 6%)); }
/* 活頁收藏冊的書口是一疊透明卡袋頁，不是紙 */
.al-cube .cb-fore { background: repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 1px, var(--page, #352a33) 1px 3px, color-mix(in srgb, var(--page, #352a33) 70%, #000) 3px 4px), var(--page, #352a33); box-shadow: inset 0 0 8px rgba(0,0,0,.55); }
.al-cube .cb-top, .al-cube .cb-bottom { background: repeating-linear-gradient(0deg, rgba(255,255,255,.22) 0 1px, var(--page, #352a33) 1px 3px, color-mix(in srgb, var(--page, #352a33) 70%, #000) 3px 4px), var(--page, #352a33); box-shadow: inset 0 0 8px rgba(0,0,0,.55); }
/* 封面、封底靠書脊那一側的書溝（壓下去的一道） */
.al-cube .cb-face::after { content: ""; position: absolute; top: 0; bottom: 0; width: 5%; pointer-events: none; z-index: 3; left: 3.5%;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,.05) 35%, rgba(255,255,255,.14) 60%, rgba(0,0,0,.18)); }
.al-cube .cb-back::after { left: auto; right: 3.5%; transform: scaleX(-1); }
/* 雙頁中間露出的一段書脊（--gap，佔整本 7%）：書皮往下壓的兩道書溝，中間是放底板的地方 */
.al-spread[data-pages="2"] { --gap: 7%; }
.al-spinegap { display: none; }
.al-spread[data-pages="2"] .al-spinegap { display: block; position: absolute; top: -1.5%; bottom: -1.5%; left: calc(50% - var(--gap) / 2); width: var(--gap); pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,.12) 10%, rgba(255,255,255,.06) 16%, rgba(0,0,0,.28) 22%, rgba(0,0,0,.08) 30%, rgba(0,0,0,.22) 50%, rgba(0,0,0,.08) 70%, rgba(0,0,0,.28) 78%, rgba(255,255,255,.06) 84%, rgba(0,0,0,.12) 90%, rgba(0,0,0,.5)); }
.al-book.is-closed .al-spinegap, .al-book:not(.bd-l):not(.bd-r) .al-spinegap { display: none !important; }
/* 環扣從左頁的孔跨到右頁的孔：孔在各頁靠書脊 2.75% 的地方 */
.al-spread[data-pages="2"] .al-ringbar { left: calc(50% - (var(--gap) / 2 + (50% - var(--gap) / 2) * .0275) / .8667); width: calc((var(--gap) + (100% - var(--gap)) * .0275) / .8667); }
.al-spread[data-pages="2"] .al-ringbar::before { left: 36%; width: 28%; }

/* ══ 寫實環扣與底板（Codex 第二輪，data/binder/；位置由 placeRings() 算）══ */
.al-spread .al-ringbar, .al-spread .al-ringback { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.al-spread .al-ringbar::before { display: none !important; }
.al-spread .al-ringbar > i, .al-spread .al-ringback > i { position: absolute; left: 0; width: 100%; right: auto; aspect-ratio: auto; max-height: none; transform: none; filter: none; background: var(--tll-asset-binder-ring-front-png) 0 0 / 100% 100% no-repeat; }
.al-spread .al-ringback > i { background-image: var(--tll-asset-binder-ring-back-png); }
.al-spread[data-pages="1"] .al-ringbar > i { background-image: var(--tll-asset-binder-ring1-front-png); }
.al-spread[data-pages="1"] .al-ringback > i { background-image: var(--tll-asset-binder-ring1-back-png); }
.al-ringbar > i:nth-child(n) { top: auto; }
.al-ringbar .pl { position: absolute; top: -1.2%; bottom: -1.2%; z-index: -1; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.al-ringbar .pl b { position: absolute; left: 0; right: 0; background: center / 100% 100% no-repeat; }
.al-ringbar .pl .pt { top: 0; height: var(--cap); background-image: var(--tll-asset-binder-plate-top-png); }
.al-ringbar .pl .pb { bottom: 0; height: var(--cap); background-image: var(--tll-asset-binder-plate-bottom-png); }
.al-ringbar .pl .pm { top: calc(var(--cap) - 1px); bottom: calc(var(--cap) - 1px); background: var(--tll-asset-binder-plate-mid-png) center top / 100% auto repeat-y; }
/* 底板要在頁面下面、在環扣下面：環扣列本身在頁面上面，所以底板另外用負的層 */
.al-ringbar { isolation: auto; }
.al-book.is-closed .al-ringback, .al-book:not(.bd-l):not(.bd-r) .al-ringback, .al-spread.hardflip .al-ringback, .al-book.al-closing .al-ringback { display: none; }
/* 第二輪封面自己畫了書溝，不再疊一道；書背書名放在 Codex 書背圖的標籤框（y486–714／1200） */
.al-cube .cb-face::after { display: none; }
.al-cube .cb-spine-title { top: 40.5%; height: 19%; letter-spacing: .12em; font-size: clamp(9px, 1.3vmin, 15px); }

/* ══ 系列書架也是書脊（11/18 使用者：「在系列的部分也是放書脊」「系列的文字框再大一點 系列的圖示也看不太像書脊」）══
 * Codex 畫的中性灰書脊（design-briefs/codex-書架書脊/，data/binder/shelf-spine.webp）：圓背明暗、皮紋、上下頭帽與竹節帶、正中大的壓框標籤（高 14%～86%），
 * 用 multiply 疊在各系列顏色上；書名直排在標籤框裡。 */
.al-spines .spine { isolation: isolate; justify-content: center; border-radius: 8px / 5px; padding-top: 15%; padding-bottom: 15%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35) 0, transparent 2.5%, transparent 5%, rgba(255,255,255,.4) 5.6%, rgba(0,0,0,.55) 8%, transparent 8.6%, transparent 9.4%, rgba(255,255,255,.35) 10%, rgba(0,0,0,.5) 12.4%, transparent 13%,
      transparent 87%, rgba(255,255,255,.35) 87.6%, rgba(0,0,0,.5) 90%, transparent 90.6%, transparent 91.4%, rgba(255,255,255,.4) 92%, rgba(0,0,0,.55) 94.4%, transparent 95%, transparent 97.5%, rgba(0,0,0,.45) 100%),
    linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,.1) 14%, rgba(255,255,255,.28) 30%, rgba(255,255,255,.05) 48%, rgba(0,0,0,.12) 74%, rgba(0,0,0,.62)),
    var(--tll-asset-binder-shelf-spine-webp) center / 100% 100% no-repeat,
    var(--c, #1b2a44);
  background-blend-mode: normal, normal, multiply, normal; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
/* 書名標籤：大框（左右 13%、上下 14%），凹下去、金色細框 */
.al-spines .spine::before { display: block !important; content: ""; position: absolute; z-index: -1; left: 13%; right: 13%; top: 14.5%; bottom: 14.5%; height: auto; border-radius: 3px; opacity: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.3), rgba(0,0,0,.1) 40%, rgba(0,0,0,.26));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a, #d8b878) 75%, #fff 10%), inset 0 0 0 2.5px rgba(0,0,0,.35), inset 0 2px 3px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.14); }
body.m-table .al-spines .spine { padding: 0 18px; }
body.m-table .al-spines .spine::before { left: 8%; right: 8%; top: 18%; bottom: 18%; }

/* 環扣後弧：壓在封面內側（蝴蝶頁）上面、卡袋頁下面。沒有卡袋頁的那一邊看得到整圈環扣（使用者 11/18：環扣空著的一端不能懸在半空） */
.al-spread > .al-ringback { z-index: 1; }
#spread > .al-page:not(.al-cover):not(.al-endpaper):not(.al-blank) { z-index: 2; }   /* 只限卡冊本身：預畫區也有 al-spread，之前套到預畫區，翻頁時預畫的頁疊到上面，閃出不相干的頁（使用者 11/19：翻頁整張一直閃） */

/* 卡袋頁翻頁時彎折：頁面變成立體容器，背景交給每一欄的紙片 */
.al-spread .al-page.al-bend { transform-style: preserve-3d; background: none !important; backface-visibility: visible; -webkit-backface-visibility: visible; overflow: visible; }   /* 外面的投影照留（內陰影被紙片蓋住，紙片自己抄了一份） */
/* 停著的頁平常也是可折的結構（album.js settleBend）：卡袋有了 inline transform，滑過去浮起來改用 translate */
.al-spread:not(.flipping) .al-page.al-bend > .pocket { transition: translate .15s ease, box-shadow .15s ease !important; }
.al-spread:not(.flipping) .al-page.al-bend > .pocket:hover { translate: 0 -3px; }
.al-page.al-bend > .al-sheet { position: absolute; top: 0; bottom: 0; overflow: hidden; display: block; pointer-events: none; transform-origin: 0 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.al-page.al-bend > .pocket { transform-origin: 0 0; transition: none !important; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* 翻封面、封底時環扣照樣顯示（板子從上面蓋過去），透明度由 drawHard 控制 */
.al-book.ring-anim .al-ringbar, .al-book.ring-anim .al-ringback { display: block !important; }
.al-page.al-bend > :not(.pocket):not(.al-sheet):not(.al-shade):not(.ca-ring-wrap):not(.al-empty) { visibility: hidden !important; }
/* 空狀態提示（願望清單還是空的…）：停著的頁也是可折的結構，不能跟著藏；只有正在翻頁時才藏（它不會跟著折）（驗證 A1 11/20） */
.al-spread.flipping .al-page.al-bend > .al-empty { visibility: hidden !important; }
/* 五星外框跟著那一欄一起折（album.js bendPrep／bendDraw） */
.al-page.al-bend > .ca-ring-wrap { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }   /* 外框容器要貼齊整頁，立體折的基準點才對（沒定位時框會被推到卡冊下面） */
.al-page.al-bend > .ca-ring-wrap > * { transform-origin: 0 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }

/* ══ 無環卡冊（使用者 11/18：「把金屬環拿掉 改成一般翻書的感覺就好 卡套要保留」，翻頁參考拉鍊式大卡冊）══
 * 環扣、底板都不畫了；內頁靠書脊那邊的打孔邊條換成車在書脊上的布邊（深色邊條＋一道車線），卡袋照舊。 */
#spread .al-ringbar, #spread .al-ringback { display: none !important; }
.al-spread[data-pages="1"] .al-page:not(.al-cover):not(.al-endpaper):not(.al-blank):not(.list),
.al-spread[data-pages="2"] .al-page.right:not(.al-cover):not(.al-endpaper):not(.al-blank):not(.list) {
  background: repeating-linear-gradient(180deg, rgba(196,188,204,.5) 0 7px, transparent 7px 12px) calc(5.5% - 7px) 0 / 1.5px 100% no-repeat,
    linear-gradient(90deg, rgba(22,19,27,.92), rgba(58,53,66,.85) 55%, rgba(34,30,40,.9)) 0 0 / 5.5% 100% no-repeat, linear-gradient(180deg, var(--page), var(--page-2)); }
.al-spread[data-pages="2"] .al-page.left:not(.al-cover):not(.al-endpaper):not(.al-blank):not(.list) {
  background: repeating-linear-gradient(180deg, rgba(196,188,204,.5) 0 7px, transparent 7px 12px) calc(94.5% + 7px) 0 / 1.5px 100% no-repeat,
    linear-gradient(90deg, rgba(34,30,40,.9), rgba(58,53,66,.85) 45%, rgba(22,19,27,.92)) 100% 0 / 5.5% 100% no-repeat, linear-gradient(180deg, var(--page), var(--page-2)); }

/* 書脊跟著系列名長高（使用者 11/18：「系列名稱會超出書脊的高度」）：書名框佔書脊 71%，字長÷0.66 才放得進框 */
body:not(.m-table) .al-spines .spine { height: max(92px, calc(var(--len, 3) * 1.13em / .66 + 8px)); }
body.m-phone .al-spines .spine, body.m-slim .al-spines .spine { height: max(70px, calc(var(--len, 3) * 1.08em / .66 + 6px)); }

/* ══ 卡框佔位（使用者 11/18：「全部的框架都先秀出來 然後才上圖片-文字最後數值」）══
 * 卡還沒畫好前，每個卡袋先放一張這個系列顏色的卡框：上緣條、產品圖區（微微反光掃過）、名稱、數值列。卡畫好就換成真的卡（cardframe.js 的 stage）。 */
.pocket .ph.sk { --sk: #24365a; --ska: #8fb6ff; display: block; padding: 0; border-radius: 6px; overflow: hidden;
  background: linear-gradient(165deg, color-mix(in srgb, var(--sk) 88%, #fff 8%), color-mix(in srgb, var(--sk) 72%, #000));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ska) 55%, transparent), inset 0 0 0 5px rgba(0,0,0,.18); }
.pocket .ph.sk i { position: absolute; left: 8%; right: 8%; border-radius: 3px; background: rgba(255,255,255,.1); }
.pocket .ph.sk .sk-top { top: 4%; height: 5%; }
.pocket .ph.sk .sk-img { top: 11.5%; height: 37%; background: linear-gradient(100deg, rgba(255,255,255,.07) 35%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.07) 65%) 0 0 / 260% 100%; animation: sk-shine 1.5s linear infinite; }
.pocket .ph.sk .sk-name { top: 52%; height: 5.5%; left: 20%; right: 20%; }
.pocket .ph.sk .sk-rows { top: 61%; bottom: 6%; background: repeating-linear-gradient(180deg, rgba(255,255,255,.08) 0 17%, transparent 17% 24%); }
.pocket .ph.sk span { position: absolute; left: 6%; right: 6%; bottom: 6%; text-align: center; font-size: 11px; color: rgba(255,255,255,.7); opacity: 0; animation: sk-late .4s 2.5s forwards; }   /* 2.5 秒還沒畫好才出現盒號名字 */
.pocket .ph.sk span b { display: block; color: rgba(255,255,255,.85); font-size: 12px; }
@keyframes sk-shine { from { background-position: 100% 0; } to { background-position: -160% 0; } }
@keyframes sk-late { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pocket .ph.sk .sk-img { animation: none; } }
/* 盒組頁漲價：卡外紅框（16＋3px）和掛在框線上的標籤要露出來，不被頁首蓋住（11/19） */
.sp-main .flip.px-up, #flip.px-up { margin-top: 30px; margin-bottom: 24px; }   /* 下面也留 24px：紅框在卡外 19px，不留會蓋到下面那排按鈕（使用者 11/19：「還是會切到元件」） */
html.no-fx-price #flip.px-up { margin-top: 0; margin-bottom: 0; }
/* 前後頁預畫區（album.js prebuildNear）：放在目前這頁正後面、被它蓋住——不藏起來，瀏覽器預畫時就把卡畫好，翻頁那一刻不用一次畫十幾張（之前藏起來會停 0.4 秒）。
 * 書闔著（立體書）時平的封面藏起來了，預畫區也要藏，不然會從後面露出來。 */
.al-book.is-closed .al-pre-stage, .al-book.has-c3d .al-pre-stage, .al-book.ring-anim .al-pre-stage, .al-book.al-closing .al-pre-stage { visibility: hidden; }   /* 翻封面、封底時那一側可能沒有書殼蓋著，也藏 */
/* 圖卡快照圖（album.js snap）：放在卡袋裡，跟活卡同一個位置大小 */
.pocket .cf-snap { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
/* 今日特價（使用者 11/20）：書籤紅色；卡袋右上角斜貼一張價格貼紙（折扣＋現在價格），跟「比定價貴」紅框成對 */
.al-tabs .tab[data-tab=sale] { --tc: #c8262a; }
/* 特價貼紙掛在卡袋下緣、卡片外面（使用者 11/20：不要擋產品圖；驗證 A16：貼在卡上會蓋到價格、系列字）：單行「7.2 折 NT$129」 */
.pocket .px-sale { position: absolute; bottom: 2px; right: 4px; z-index: 8; transform: rotate(-2deg); transform-origin: 100% 100%; pointer-events: none;
  display: flex; align-items: baseline; gap: .35em; padding: .18em .5em .2em; border-radius: 5px;
  background: #fff6f2; border: 1.5px solid #d8302f; box-shadow: 0 2px 5px rgba(0,0,0,.4);
  color: #a3161a; font: 900 clamp(10px, 8cqw, 15px)/1.15 var(--font); letter-spacing: .01em; white-space: nowrap; }
.pocket .px-sale i { font-style: normal; }
.al-row .r-sale { color: #ff8a80; font-weight: 800; white-space: nowrap; }
html.theme-light .al-row .r-sale { color: #b3201f; }
/* 已收藏打勾：卡袋左上角、卡片外面（驗證 A17：放卡上會蓋到系列名、盒號） */
.pocket .px-own { position: absolute; top: 2px; left: 2px; z-index: 8; pointer-events: none; display: grid; place-items: center;
  width: clamp(15px, 10cqw, 24px); aspect-ratio: 1; border-radius: 50%; background: #2f9e58; color: #fff; border: 2px solid #eaf7ee;
  font: 900 clamp(11px, 8cqw, 17px)/1 var(--font); box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.pocket .px-sale b { font-weight: 700; font-size: .86em; color: #7a1214; }
.al-caption .cap-wish { color: #e48a9a; }
.al-caption .cap-note { position: absolute; left: 8px; right: 8px; top: 100%; margin-top: 1px; font-size: 11px; line-height: 1.2; opacity: .75; letter-spacing: 0; white-space: normal; }
body.m-phone .al-caption .cap-note, body.m-slim .al-caption .cap-note { font-size: 10.5px; }   /* 價格說明（酷澎要求的查詢時間與聲明）放在說明列下面一行，不擠到書裡 */
/* C 實驗：卡冊裡只放圖，翻動中的頁不再藏卡（原本的 .al-moving 規則拿掉） */

/* 五星外框畫在圖卡本身的邊上（使用者 11/19：「雙五星框跟其他兩個 為何不框在圖卡上 卡套用來框漲幅及退上市」）：
   框在卡裡面（卡袋 .slot 的子層），跟著卡一起折，不會偏；卡套那一圈留給漲價紅框（px-ring）、快退市等分類框（shop-catring）。
   兩層：
   ・底層：不會動的簡單框（.slot[data-ring]::after，只有邊線＋往內的光，沒有遮罩、沒有混色），一直都在。
   ・上層：會動的框（card-anim 的 ca-ring-wrap.ca-in：流動漸層、亮光、小閃光，用了遮罩和混色）。
   翻頁中、還沒翻到的預畫頁（.al-pre-stage），上層整個藏起來，只剩底層——
   使用者 11/19：「只是把框放在卡上 怎麼翻頁閃爍bug又跑出來了?」：會動、有遮罩的框在立體翻折的頁裡，每一格都要重畫，預畫頁上一百多個框也一直在動；
   之前框在卡套外、翻頁時換成不動的框是順的，這裡用同一個做法，只是框改在卡上。 */
.pocket .slot[data-ring]::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; box-sizing: border-box;
  border: var(--rs-b, 3px) solid var(--rs-c); box-shadow: inset 0 0 0 1px #172b4e66, inset 0 0 calc(var(--rs-b, 3px) * 3) var(--rs-g); }
.pocket .slot[data-ring^="collector"] { --rs-c: #35a9ec; --rs-g: #35bcff99; }
.pocket .slot[data-ring^="sticker"] { --rs-c: #e6ad35; --rs-g: #ffc44799; }
.pocket .slot[data-ring="ultimate"] { --rs-c: #b9a6ff; --rs-g: #a3c4ffcc; }
.pocket .slot[data-ring="ultimate"]::after { border-image: conic-gradient(from 200deg, #94eeff, #b7a1ff, #ffe3a1, #fda9d8, #94eeff) 1; box-shadow: inset 0 0 calc(var(--rs-b, 3px) * 4) #a3c4ffcc, inset 0 0 calc(var(--rs-b, 3px) * 8) #fda9d855; }
html.no-fx-star .pocket .slot[data-ring]::after { display: none; }
#spread.flipping .ca-ring-wrap, .al-pre-stage .ca-ring-wrap { visibility: hidden !important; }
.al-pre-stage .ca-ring-wrap *, #spread.flipping .ca-ring-wrap * { animation-play-state: paused !important; }
/* 圖卡還沒換上前的佔位卡框（11/19）：顏色壓低、不掃光——一頁十幾格鮮豔的系列色在翻頁、換圖時像在閃（使用者：「還沒有完整載入好 還是會閃爍」） */
.pocket .ph.sk { background: linear-gradient(165deg, color-mix(in srgb, var(--sk) 30%, #2a2530), color-mix(in srgb, var(--sk) 22%, #17141c));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ska) 28%, transparent), inset 0 0 0 5px rgba(0,0,0,.18); }
.pocket .ph.sk i { background: rgba(255,255,255,.06); }
.pocket .ph.sk .sk-img { animation: none; background: rgba(255,255,255,.07); }
/* 空的索引：書頁正中間一句提示（11/19） */
.al-empty { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; pointer-events: none; }
.al-empty b { font-size: 34px; opacity: .55; }
.al-empty p { margin: 0; max-width: 300px; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
/* 雙頁攤開時右側書口凸出書外，被書架抽屜和下方工具列蓋住、只在中間露出一小段灰色長條（11/19 巡檢 13）：右側不畫 */
.al-book:not(.is-closed) .al-spread[data-pages="2"] > .al-edge.r { display: none; }
/* 外掛頁尾的法律聲明（footer.tll-v2-footer，法律要求一定要在頁面上）：卡冊是滿版的，聲明放在「往下拉」才看得到的地方——
   頁面可以往下捲一個畫面，聲明從下面整塊蓋上來（不透明底、比卡冊高一層）；書下面的說明列有一個「法律聲明」連結直接捲過去 */
body.al:has(footer.tll-v2-footer) { overflow-y: auto; overflow-x: hidden; }
body.al .tll-v2-footer { position: relative; z-index: 60; max-width: none; margin: calc(100vh - 8px) 0 0; margin-top: calc(100dvh - 8px);
  padding: 18px max(20px, calc((100vw - 960px) / 2)) 28px; background: rgba(10, 18, 34, .97); border-top: 1px solid rgba(176,208,255,.16);
  box-shadow: 0 -18px 40px rgba(0,0,0,.45); color: var(--muted); font-size: 12px; line-height: 1.7; opacity: 1; }
body.al .tll-v2-footer a { color: var(--sky); }
.al-legal-link { display: none; margin-left: 10px; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
body.al:has(footer.tll-v2-footer) .al-legal-link { display: inline; }
/* 手機、摺疊外螢幕：album.js applyLayout 把連結搬到 #book 底下，放在書的右上角上方（頁碼列放不下，隱私審核 1.7.18） */
#book > .al-legal-link { position: absolute; right: 4px; bottom: 100%; margin: 0 0 6px; font-size: 12px; line-height: 1.3; white-space: nowrap; z-index: 5; }
html.theme-light body.al .tll-v2-footer { background: rgba(244,247,251,.98); border-top-color: #dfe6f0; }

/* ── 手機橫放（album.js detect：高 < 500 且寬 > 高 1.3 倍 → m-land；驗證 A21 11/21）──
   高度很矮：工具列改成左邊一條直的（不佔書下面的高度）、系列把手變矮、書的邊框變薄、一頁一列；
   快速翻頁拉桿收起來（頁碼列的 ‹ › 一樣能翻），工具列的頁碼也收起來（頁碼列有） */
body.m-land .al-top { height: 40px; }
body.m-land .al-desk { inset: 40px 0 0 0; }
body.m-land .al-shelf-handle { height: 28px; font-size: 12.5px; }
body.m-land .al-stage { padding: 4px 118px 62px 84px; }   /* 右邊留給書籤（和電腦一樣 118；圖卡模式書比較寬，原本 56 會把書籤擠出畫面，驗證 A22） */
body.m-land .al-book { padding: 10px; border-radius: 14px; }
body.m-land .al-book::before { inset: 6px; }
body.m-land .al-page { padding: 8px; gap: 8px; }
body.m-land .al-rings { display: none; }
body.m-land .al-scrub { display: none; }
body.m-land .al-caption { bottom: -38px; font-size: 12px; white-space: nowrap; }
body.m-land .cap-nav { display: inline-block; }
body.m-land .al-toolbar { left: 6px; top: 46px; bottom: 6px; transform: none; flex-direction: column; justify-content: center; gap: 2px; padding: 4px; border-radius: 14px; width: 68px; }
body.m-land .tb-btn { height: 32px; min-width: 0; width: 100%; justify-content: center; padding: 0 4px; font-size: 12.5px; }
body.m-land .tb-btn .lbl-long, body.m-land kbd, body.m-land .tb-nav, body.m-land .tb-page { display: none; }
body.m-land .tb-sep { width: 32px; height: 1px; margin: 3px 0; }
body.m-land .tb-views { flex-direction: column; gap: 4px; }
body.m-land .tb-seg { flex-direction: column; padding: 2px; }
body.m-land .tb-seg button { height: 30px; padding: 0 8px; font-size: 12.5px; }
body.m-land .tb-list { height: 30px; padding: 0 8px; font-size: 12.5px; }
body.m-land .al-pop { left: 84px; right: 12px; bottom: 8px; transform: none; width: auto; max-height: calc(100vh - 60px); overflow: auto; }
