/* 黑白線框。換主視覺時只改這一段變數。 */
:root {
  --c-fg: #000;          /* 主要文字、線條 */
  --c-bg: #fff;          /* 背景 */
  --c-gray-1: #e6e6e6;   /* 淺灰：佔位底色 */
  --c-gray-2: #8c8c8c;   /* 深灰：次要文字、虛線 */
  --c-overlay: rgba(0, 0, 0, 0.55);   /* 確認視窗後方的遮罩 */

  --font: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;   /* 系統字體 */
  --fs-s: 13px;          /* 小字：說明、標籤 */
  --fs-m: 16px;          /* 內文、按鈕 */
  --fs-l: 20px;          /* 頁面標題 */
  --fs-xl: 24px;         /* 作品名稱、選擇身分的大標 */

  --sp-1: 4px;           /* 間距由小到大 */
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;

  --line: 1px;           /* 一般框線 */
  --line-strong: 2px;    /* 強調框線 */
  --tap: 44px;           /* 按鈕最小尺寸 */
  --bottom-bar-h: 76px;  /* 首頁底部「上傳說明」列的高度 */

  /* 2026-11-30 主視覺（自主學習網頁設計1-7.pdf，1080 寬的設計稿 ÷ 3） */
  --font-dot: "Doto", ui-monospace, monospace;   /* 點陣英文字（設計稿用 Gridlite PE，網頁改用開源的 Doto） */
  --c-dim: #c8c8c8;      /* 反灰：已被選走的相機 */
  --c-scrim: rgba(0, 0, 0, 0.7);   /* 提示條底色（疊在畫面上） */
  --c-dot-line: #d2d2d2; /* 背景空心小方塊的框線 */
  --topbar-h: 56px;      /* 頁首高度（2026-11-30 放大 1.3 倍） */
  --menu-w: 176px;       /* 漢堡選單寬度 */
  --cell-ratio: 540 / 303;   /* 相簿縮圖比例 */

  /* 動態：統一的時間與曲線 */
  --dur: 180ms;                               /* 按下縮放等小動作 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);     /* 出現、展開：快進慢停 */
  --ease-in: cubic-bezier(0.55, 0, 0.75, 0.2);/* 收起 */
  --menu-close: 200ms;                        /* 要和 config.js 的 MENU_CLOSE_MS 一樣 */

  --phone-w: 360px;      /* 狀態預覽頁的手機框 */
  --phone-h: 740px;      /* 狀態預覽頁的手機框高度 */
}

@font-face {
  font-family: "Doto";
  src: url("fonts/Doto.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs-m);
  color: var(--c-fg);
  background: var(--c-bg);
  line-height: 1.5;
}
button, a.btn, a.btn-icon {
  font: inherit;
  color: var(--c-fg);
  background: var(--c-bg);
  border: var(--line) solid var(--c-fg);
  border-radius: 0;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}
button:disabled { color: var(--c-gray-2); border-color: var(--c-gray-2); border-style: dashed; cursor: default; }
/* 按下時縮一下，放開彈回 */
button, a.btn, a.btn-icon {
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur) var(--ease), background-color var(--dur) ease, color var(--dur) ease;
}
button:not(:disabled):active, a.btn:active, a.btn-icon:active { transform: scale(0.94); }
.menu-btn:active { transform: scale(0.88) !important; }

/* 換頁時淡入 */
.screen.enter { animation: fade-in 260ms ease both; }
.screen.enter .center { animation: rise-in 420ms var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.btn-primary { background: var(--c-fg); color: var(--c-bg); border-width: var(--line-strong); }
.btn-primary .ic { color: var(--c-bg); }
.btn-wide { width: 100%; }
.btn-lg { width: 100%; min-height: 64px; font-size: var(--fs-l); }
.btn-plain { border: none; padding: var(--sp-1); }

/* 圖示佔位 */
.ic { font-size: var(--fs-s); white-space: nowrap; }

/* 插圖佔位：灰底＋對角線 */
.pic {
  position: relative;
  background: var(--c-gray-1);
  border: var(--line) solid var(--c-fg);
  aspect-ratio: 4 / 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pic-x { position: absolute; inset: 0; width: 100%; height: 100%; }
.pic-x line { stroke: var(--c-gray-2); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.pic-label { position: relative; background: var(--c-bg); border: var(--line) solid var(--c-fg); padding: var(--sp-1) var(--sp-2); font-size: var(--fs-s); }

/* 標註模式的編號 */
.tag {
  display: inline-block;
  margin-left: var(--sp-1);
  padding: 0 var(--sp-1);
  font-size: 11px;
  line-height: 16px;
  color: var(--c-bg);
  background: var(--c-fg);
  vertical-align: middle;
}

/* ---------- 共通畫面 ---------- */
.screen { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.pad { padding: var(--sp-4); }
.stack > * + * { margin-top: var(--sp-3); }
.note { font-size: var(--fs-s); color: var(--c-gray-2); margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-l); }
h3 { font-size: var(--fs-m); }
p { margin: 0; }

.hdr { border-bottom: var(--line) solid var(--c-fg); padding: var(--sp-2) var(--sp-4); }
.hdr-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-height: var(--tap); }
.hdr-title { font-size: var(--fs-l); font-weight: 600; }
.hdr-back { display: flex; align-items: center; gap: var(--sp-3); }

.banner {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-fg); color: var(--c-bg);
  font-size: var(--fs-s);
}
.banner .msg { flex: 1; }
.banner button { background: var(--c-bg); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--sp-5) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--c-fg); color: var(--c-bg);
  padding: var(--sp-2) var(--sp-4); font-size: var(--fs-s); z-index: 30; white-space: nowrap;
  animation: toast-in 280ms var(--ease) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 主視覺共用：點陣字、頁首、選單、背景點點 ---------- */
.dot { font-family: var(--font-dot); font-weight: 600; letter-spacing: 0.06em; }

.topbar {
  position: relative; height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-bg); border-bottom: var(--line) solid var(--c-fg); z-index: 12;
}
.logo { height: 35px; width: auto; display: block; image-rendering: pixelated; }
.menu-btn {
  position: absolute; left: 9px; top: 9px;
  width: 38px; height: 38px; min-width: 0; min-height: 0; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.menu-btn::after { content: ""; position: absolute; inset: -4px; }   /* 點擊範圍 46px */
.menu-btn span { display: block; width: 22px; height: var(--line); background: var(--c-fg); }
/* 漢堡圖示：打開時三條線變成 ╳（anim：剛打開那次播放；closing：收起時倒播） */
.menu-btn span { transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.menu-btn.open.anim span { animation: burger-in var(--dur) var(--ease) both; }
.menu-btn.open.anim span:nth-child(1) { --to: translateY(8px) rotate(45deg); }
.menu-btn.open.anim span:nth-child(3) { --to: translateY(-8px) rotate(-45deg); }
.menu-btn.open.anim span:nth-child(2) { animation-name: burger-mid; }
@keyframes burger-in { from { transform: none; } to { transform: var(--to); } }
@keyframes burger-mid { from { opacity: 1; } to { opacity: 0; } }
.menu-btn.closing span { transform: none !important; opacity: 1 !important; animation: none !important; }

.menu-scrim { position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 25; }
.menu {
  position: fixed; left: 0; top: var(--topbar-h); bottom: 0; width: var(--menu-w);
  background: var(--c-bg); border-right: var(--line) solid var(--c-fg); z-index: 26;
  display: flex; flex-direction: column;
  touch-action: none;   /* 讓手指按住滑動時灰底跟得上 */
}
.menu.anim { animation: menu-in 320ms var(--ease) both; }
.menu.anim .menu-item { animation: item-in 320ms var(--ease) both; animation-delay: calc(60ms + var(--i) * 40ms); }
.menu.closing { animation: menu-out var(--menu-close) var(--ease-in) both; }
@keyframes menu-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes menu-out { from { transform: none; } to { transform: translateX(-100%); } }
@keyframes item-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.menu-hl {
  position: absolute; left: 0; right: 0; top: 0; height: 58px;
  background: var(--c-gray-1); opacity: 0; pointer-events: none;
  transition: transform 220ms var(--ease), height 220ms var(--ease), opacity 160ms ease;
}
.menu-hl.on { opacity: 1; }
.menu-item {
  position: relative;   /* 疊在灰底上面 */
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
  width: 100%; min-height: 58px; padding: 10px;
  border: none; border-bottom: var(--line) solid var(--c-fg); text-align: left; line-height: 1.2;
  background: transparent;
}
.menu-item .zh { font-size: 16px; }
.menu-item .en { font-size: 12.5px; letter-spacing: 0; white-space: nowrap; }
.menu-item:not(:disabled):active { transform: none; }
.menu-item > span { transition: transform var(--dur) var(--ease); transform-origin: left center; }
.menu-item:active > span { transform: scale(0.94); }
.menu-me { margin-top: auto; padding: 0 0 calc(29px + env(safe-area-inset-bottom)); text-align: center; font-size: 17px; }

.grid-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.grid-bg canvas { display: block; width: 100%; height: 100%; }
.screen > .center { position: relative; z-index: 1; }

.banner { background: var(--c-scrim); padding: var(--sp-3) var(--sp-4); justify-content: center; position: relative; z-index: 11; animation: banner-in 280ms var(--ease) both; }
@keyframes banner-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.banner .msg { flex: 0 1 auto; }
.banner .ic { color: var(--c-bg); }
button.link { background: none; border: none; color: var(--c-bg); text-decoration: underline; text-underline-offset: 3px; padding: 0 var(--sp-1); min-width: var(--tap); }

/* ---------- 6.1 選擇身分 ---------- */
.s-identity .center, .s-message .center {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.s-identity .center { padding-bottom: 40px; }
.who { font-size: 35px; font-weight: 600; margin: 0 0 40px; white-space: nowrap; }
.picks { display: flex; align-items: center; gap: 14px; }
.pick {
  font-size: 28px; line-height: 1; padding: 6px 8px; min-width: var(--tap); min-height: var(--tap);
  border: none; background: none;
}
.pick:disabled { color: var(--c-dim); border: none; }
.pick:not(:disabled):active { background: var(--c-fg); color: var(--c-bg); transform: scale(0.86); }
/* 選定：縮一下再彈回、反白（時間配合 config.js 的 PICK_MS） */
.pick.picked { background: var(--c-fg); color: var(--c-bg); animation: pick-pop 420ms var(--ease) both; }
@keyframes pick-pop {
  0% { transform: scale(0.86); }
  45% { transform: scale(1.14); }
  70% { transform: scale(0.97); }
  100% { transform: scale(1); }
}
.slash { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300; font-size: 21px; }

/* ---------- 5.3 相簿已結束／沒有代碼 ---------- */
.s-message .center { padding: 0 var(--sp-4) 100px; text-align: center; }
.msg-pic { width: 214px; height: auto; display: block; margin-bottom: 48px; }
.msg-zh { font-size: 12px; font-weight: 300; margin: 0 0 12px; }
.msg-en { font-size: 10.5px; letter-spacing: 0; white-space: nowrap; }

/* ---------- 6.2 相簿首頁 ---------- */
.sticky-top { position: sticky; top: 0; z-index: 12; }
.banner.float { position: absolute; left: 0; right: 0; top: 100%; min-height: 60px; }
.album-body { flex: 1; display: flex; flex-direction: column; }   /* 空相簿的文字要能垂直置中 */
.row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--line) dashed var(--c-fg); }
.cell { position: relative; aspect-ratio: var(--cell-ratio); width: 100%; border: none; padding: 0; min-height: 0; overflow: hidden; background: var(--c-bg); }
.row > .cell + .cell { border-left: var(--line) dashed var(--c-fg); }
.cell.photo { display: block; }
.cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cell .err { display: none; }
.cell.broken img { display: none; }
.cell.missing { display: block; }
.cell.broken .err, .cell.missing .err {
  position: absolute; inset: 0; display: block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 32'%3E%3Cpath d='M0 0L23 32M23 0L0 32' stroke='%23000' stroke-width='0.6' fill='none'/%3E%3C/svg%3E") center / 23px 32px no-repeat;
}
/* A／B 標籤：自己的身分反白；照片偏暗時換成白色（app.js 量亮度） */
.cell .corner { position: absolute; left: 10px; top: 6px; font-size: 12px; line-height: 1; padding: 1px 2px; color: var(--c-fg); z-index: 1; opacity: 0; transition: opacity 240ms ease, color 240ms ease, background-color 240ms ease; }
.cell.lit .corner { opacity: 1; }
.cell.photo { transition: transform var(--dur) var(--ease); }
.cell.photo:active { transform: scale(0.96); }
.cell .corner.me { background: var(--c-fg); color: var(--c-bg); }
.cell.on-dark .corner { color: var(--c-bg); }
.cell.on-dark .corner.me { background: var(--c-bg); color: var(--c-fg); }
/* 像素圖示（icons.js 的 pixelSvg） */
.px-ic { display: block; width: 22px; height: 22px; flex-shrink: 0; }

/* ---------- 相簿長按多選 ---------- */
.cell.photo { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.cell.photo img { pointer-events: none; transition: transform 220ms var(--ease); }
.sel-mark {
  position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; z-index: 2;
  display: none; align-items: center; justify-content: center;
  background: var(--c-bg); color: var(--c-fg); border: var(--line) solid var(--c-fg);
}
.sel-mark .px-ic { width: 16px; height: 16px; opacity: 0; transform: scale(0.4); transition: opacity 160ms ease, transform 220ms var(--ease); }
.s-album.selecting .sel-mark { display: flex; }
.cell.selected { outline: 3px solid var(--c-fg); outline-offset: -3px; }
.cell.selected img { transform: scale(0.9); }
.cell.selected .sel-mark { background: var(--c-fg); color: var(--c-bg); }
.cell.selected .sel-mark .px-ic { opacity: 1; transform: none; }
.s-album.selecting .album-body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

.select-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + env(safe-area-inset-bottom));
  background: var(--c-bg); border-top: var(--line) solid var(--c-fg);
}
.select-bar.anim { animation: bar-in 260ms var(--ease) both; }
.select-bar.closing { animation: bar-out var(--menu-close) var(--ease-in) both; }
@keyframes bar-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes bar-out { from { transform: none; } to { transform: translateY(100%); } }
.sb-count { flex: 1; font-size: var(--fs-s); }
.sb-btn { border: none; padding: 0 var(--sp-2); flex-direction: column; gap: 2px; font-size: 10px; line-height: 1; }
.sb-btn .px-ic { width: 20px; height: 20px; }
.pv-phone .select-bar { position: absolute; }

.cell.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1); color: var(--c-gray-2); font-size: var(--fs-s); }
.empty-album { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--sp-5) var(--sp-4); text-align: center; }
.empty-album p { margin: 0; }
.empty-album .zh { font-size: 12px; font-weight: 300; margin-bottom: 8px; }
.empty-album .en { font-size: 10.5px; letter-spacing: 0; }
.loading { padding: var(--sp-5); text-align: center; color: var(--c-gray-2); }

/* ---------- 6.3 大圖檢視 ---------- */
.s-viewer { background: var(--c-fg); color: var(--c-bg); position: fixed; inset: 0; min-height: 0; z-index: 20; }
.s-viewer button, .s-viewer a.btn-icon { background: var(--c-fg); color: var(--c-bg); border-color: var(--c-bg); }
.s-viewer .ic { color: inherit; }
.v-top { position: relative; height: var(--topbar-h); flex-shrink: 0; }
/* 大圖的按鈕：28px 的方框，點擊範圍放大到 44px（關閉鈕另外放大成跟漢堡選單一樣 38px） */
.s-viewer .v-btn {
  position: relative; width: 28px; height: 28px; min-width: 0; min-height: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--c-bg); border: var(--line) solid var(--c-bg);
}
.s-viewer .v-btn::after { content: ""; position: absolute; inset: -8px; }
.s-viewer .v-btn .px-ic { width: 16px; height: 16px; }
.s-viewer .v-btn:active { transform: scale(0.88); }
.v-close { position: absolute !important; left: 9px; top: 9px; }
.s-viewer .v-close { width: 38px; height: 38px; }
.s-viewer .v-close::after { inset: -4px; }
.s-viewer .v-close .px-ic { width: 22px; height: 22px; }
.v-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.v-zoom { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform-origin: center center; }
.v-photo { position: relative; width: 100%; aspect-ratio: 4 / 3; background: var(--c-gray-1); color: var(--c-fg); display: flex; align-items: center; justify-content: center; text-align: center; font-size: var(--fs-s); }
.v-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--c-fg); -webkit-user-drag: none; }
.v-dots { display: flex; justify-content: center; gap: 8px; padding: var(--sp-3) var(--sp-2); }
.v-dots i { width: 8px; height: 8px; border: var(--line) solid var(--c-bg); transition: background-color 200ms ease; }
.v-dots i.on { background: var(--c-bg); }
.v-actions { display: flex; justify-content: center; gap: var(--sp-5); padding: var(--sp-2) var(--sp-3); }
.v-foot { padding: var(--sp-2) var(--sp-3) calc(var(--sp-3) + env(safe-area-inset-bottom)); text-align: center; }
.s-viewer .note { color: var(--c-gray-1); }
.v-error { text-align: center; padding: var(--sp-2); font-size: var(--fs-s); border: var(--line) dashed var(--c-bg); margin: 0 var(--sp-3) var(--sp-2); }

/* ---------- 6.4 上傳說明（設計稿 8-9 頁） ---------- */
.s-upload .center {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 64px 24px calc(40px + env(safe-area-inset-bottom));
}
.up-pic { width: 252px; height: auto; aspect-ratio: 96 / 72; display: block; margin-bottom: 40px; }   /* 先佔好高度，圖片載入後文字不會跳 */
.up-pair { max-width: 300px; }
.up-pair .zh { font-size: 12px; font-weight: 300; margin: 0 0 8px; }
.up-pair .en { font-size: 10.5px; letter-spacing: 0; line-height: 1.6; }
.up-main .zh { font-size: 13px; }
.up-status { margin-top: 32px; }
.up-status .zh { font-size: 15px; font-weight: 400; }
.up-status.done .zh { font-weight: 600; }
/* 等待中的三個點：依序亮起，再一起消失 */
.wait-dots i { font-style: normal; opacity: 0; animation: 1.6s steps(1, end) infinite; }
.wait-dots i:nth-child(1) { animation-name: wait-dot-1; }
.wait-dots i:nth-child(2) { animation-name: wait-dot-2; }
.wait-dots i:nth-child(3) { animation-name: wait-dot-3; }
@keyframes wait-dot-1 { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 1; } }
@keyframes wait-dot-2 { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 1; } }
@keyframes wait-dot-3 { 0% { opacity: 0; } 75% { opacity: 1; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wait-dots i { animation: none; opacity: 1; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 三則提醒：中文一區、英文一區，字比上面小 */
.up-notes { max-width: 300px; margin-top: 52px; color: #555; }   /* 跟上面的「長按快門」或狀態拉開距離 */
.up-notes p { margin: 0; }
.up-notes-zh .zh { font-size: 11px; font-weight: 300; line-height: 1.6; }
.up-notes-zh .zh + .zh { margin-top: 6px; }
.up-notes-en { margin-top: 18px; }
.up-notes-en .en { font-size: 9.5px; letter-spacing: 0; line-height: 1.6; }
.up-notes-en .en + .en { margin-top: 6px; }

/* 舊線框（已不使用） */
.status-line { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-l); }
.warn { display: flex; align-items: center; gap: var(--sp-2); border: var(--line-strong) solid var(--c-fg); padding: var(--sp-2) var(--sp-3); }

/* ---------- 6.5 我的相機（只顯示 SD 卡剩餘容量） ---------- */
.s-cameras .center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 60px; text-align: center; }
.sd-ic { margin-bottom: 20px; }
.sd-ic .px-ic { width: 72px; height: 72px; }
.sd-num { font-size: 35px; font-weight: 600; margin: 0 0 14px; white-space: nowrap; }
.sd-unit { font-size: 18px; }
.sd-zh { font-size: 12px; font-weight: 300; margin: 0 0 8px; }
.sd-en { font-size: 11px; letter-spacing: 0; }

/* ---------- 6.5 相機狀態（舊線框，已不使用） ---------- */
.cam { padding: var(--sp-4); border-bottom: var(--line) solid var(--c-fg); }
.cam-line { display: flex; align-items: center; gap: var(--sp-2); }

/* ---------- 6.6 確認視窗 ---------- */
.overlay { position: fixed; inset: 0; background: var(--c-overlay); display: flex; align-items: center; justify-content: center; padding: var(--sp-4); z-index: 40; }
.dialog { background: var(--c-bg); color: var(--c-fg); border: var(--line-strong) solid var(--c-fg); padding: var(--sp-4); width: 100%; max-width: 320px; }
.dialog .ic { color: var(--c-fg); }
.dlg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-top: var(--sp-4); }
.dialog button { background: var(--c-bg); color: var(--c-fg); border-color: var(--c-fg); }
.dialog .btn-primary { background: var(--c-fg); color: var(--c-bg); }

/* ---------- 6.9 狀態預覽 ---------- */
.pv-page { padding: var(--sp-4); background: var(--c-gray-1); min-height: 100vh; }
.pv-head { margin-bottom: var(--sp-4); }
.pv-head a { color: var(--c-fg); }
.pv-grid { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.pv { margin: 0; }
.pv figcaption { font-size: var(--fs-s); font-weight: 600; margin-bottom: var(--sp-1); }
.pv-phone {
  width: var(--phone-w); height: var(--phone-h);
  max-width: calc(100vw - 2 * var(--sp-4));
  background: var(--c-bg);
  border: var(--line-strong) solid var(--c-fg);
  overflow: hidden;
  position: relative;
  transform: translateZ(0); /* 讓 fixed 元素以手機框為準 */
}
.pv-phone .screen { min-height: 100%; height: 100%; }
.pv-phone .album-body { overflow: hidden; }
.pv-phone .toast, .pv-phone .menu, .pv-phone .menu-scrim { position: absolute; }
.pv-phone .s-album { overflow: hidden; }
