/* 小島房護 低像素風格：方角、3px 粗框、硬邊陰影 */
@font-face {
  font-family: 'VT323';
  src: url('../fonts/vt323.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #1F3A2A;      /* 深綠：文字、框線 */
  --green: #2F6B45;    /* 主綠：主要按鈕 */
  --grass: #A6D36F;    /* 草綠：選取、成功 */
  --sand: #F3E7C9;     /* 沙灘米：區塊底色 */
  --paper: #FBF8EF;    /* 紙白：背景 */
  --sea: #4A90B8;
  --sea-light: #6FB3D9;
  --night: #13241A;
  --night-deep: #0A140E;
  --night-panel: #2A4A36;
  --muted: #4F5E52;
  --muted-night: #B9C9B4;
  --warn: #8A3A12;
  --rec: #FF5A5F;
  --c-motion: #A6D36F;
  --c-sound: #E8913A;
  --c-light: #F2D04B;
  --c-cry: #6FB3D9;
  --c-zone: #F3E7C9;
  --font: 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif;
  --pixel: 'VT323', ui-monospace, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* 點一下就反應：關掉「點兩下放大」的等待（兩指放大照樣可以） */
html { touch-action: manipulation; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body.night { background: var(--night); color: var(--sand); }
img, canvas { image-rendering: pixelated; }
a { color: inherit; }
.pixel { font-family: var(--pixel); letter-spacing: .02em; }
.muted { color: var(--muted); }
body.night .muted { color: var(--muted-night); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.app { max-width: 480px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(14px + var(--safe-t)) 16px 10px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; text-decoration: none; }
.brand-logo { height: 32px; image-rendering: auto; }
.brand-word { height: 22px; image-rendering: auto; }
.main { flex: 1; padding: 6px 16px 24px; display: flex; flex-direction: column; gap: 16px; }

/* 按鈕 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  font: 700 16px var(--font); color: #fff; text-decoration: none;
  background: var(--green); border: 3px solid var(--ink); border-radius: 0;
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.block { width: 100%; }
.btn.light { background: var(--paper); color: var(--ink); }
.btn.grass { background: var(--grass); color: var(--ink); }
.btn.danger { background: #fff; color: var(--warn); border-color: var(--warn); box-shadow: 4px 4px 0 var(--warn); }
.btn.icon { width: 44px; min-height: 44px; padding: 0; }
body.night .btn.light { background: var(--sand); }
.linkbtn { background: none; border: 0; padding: 8px 4px; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* 卡片 */
.card { border: 3px solid var(--ink); background: #fff; box-shadow: 4px 4px 0 var(--ink); }
.panel { border: 3px solid var(--ink); background: var(--sand); padding: 12px 14px; }
.panel h3, .card h3 { margin: 0 0 6px; font-size: 16px; }
body.night .panel { background: var(--night-panel); border-color: var(--night-deep); }

.cam-card { display: block; text-decoration: none; color: var(--ink); }
.cam-thumb {
  position: relative; aspect-ratio: 16 / 9; background: var(--sea);
  border-bottom: 3px solid var(--ink); overflow: hidden;
}
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; display: block; }
.cam-thumb .tag {
  position: absolute; left: 10px; top: 10px; display: flex; align-items: center; gap: 6px;
  background: var(--ink); color: #fff; font-size: 12px; padding: 3px 8px;
}
.cam-thumb .tag i { width: 8px; height: 8px; background: var(--grass); display: inline-block; }
.cam-thumb .ago { position: absolute; right: 10px; top: 6px; font-family: var(--pixel); font-size: 20px; color: #fff; text-shadow: 2px 2px 0 var(--ink); }
.cam-thumb.offline { background: var(--sand); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 16px; }
.cam-thumb.offline .big { font-family: var(--pixel); font-size: 26px; color: var(--warn); }
.cam-meta { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.cam-meta b { font-size: 16px; }
.cam-meta .sub { font-size: 12px; color: var(--muted); }

.cap-bar { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 2px; margin: 8px 0; }
.cap-bar span { height: 10px; background: #DCCB9F; }
.cap-bar span.on { background: var(--green); }
.cap-bar span.other { background: var(--sea); }
a.cap-link { display: block; color: inherit; text-decoration: none; }
.cap-more { color: var(--green); font-weight: 700; white-space: nowrap; }
input[type=range] { width: 100%; height: 32px; margin: 8px 0 0; accent-color: var(--green); }

/* 底部選單 */
.tabbar {
  position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 3px solid var(--ink); padding: 4px 4px calc(8px + var(--safe-b));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; font-size: 12px; color: var(--muted); text-decoration: none; }
.tabbar a.on { color: var(--green); font-weight: 700; }
.tabbar svg { width: 20px; height: 20px; }

/* 表單 */
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
input[type=text], select {
  font: 16px var(--font); min-height: 48px; padding: 0 12px; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 0; background: #fff; width: 100%;
}
/* 排程的時間選擇（自製，iPhone / Android 一致） */
.tp { position: relative; min-width: 0; }
.tp-btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 3px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; padding: 0 8px; }
.tp-btn .pixel { font-size: 28px; line-height: 1; }
.tp-btn i { font-style: normal; font-size: 12px; }
.tp-btn[aria-expanded=true] { background: var(--grass); }
.tp-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(280px, 82vw); background: var(--paper); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.tp-menu.right { left: auto; right: 0; }
.tp-menu b { font-size: 12px; }
.tp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.tp-grid button { min-height: 36px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font-family: var(--pixel); font-size: 20px; cursor: pointer; padding: 0; }
.tp-grid button[aria-pressed=true] { background: var(--grass); box-shadow: 2px 2px 0 var(--ink); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  display: flex; flex-direction: column; gap: 4px; padding: 12px; text-align: left;
  border: 3px solid var(--ink); background: #fff; font: inherit; color: inherit; cursor: pointer; border-radius: 0;
}
.choice small { color: var(--muted); font-size: 12px; }
.choice[aria-pressed=true] { background: var(--grass); box-shadow: 4px 4px 0 var(--ink); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.seg { display: flex; border: 3px solid var(--ink); }
.seg button { flex: 1; min-height: 40px; border: 0; background: #fff; font: inherit; cursor: pointer; color: var(--ink); }
.seg button + button { border-left: 3px solid var(--ink); }
.seg button[aria-pressed=true] { background: var(--grass); font-weight: 700; }
.toggle { width: 60px; height: 32px; border: 3px solid var(--ink); background: #DCCB9F; position: relative; cursor: pointer; padding: 0; border-radius: 0; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--ink); }
.toggle[aria-checked=true] { background: var(--grass); }
.toggle[aria-checked=true]::after { left: 31px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); flex-shrink: 0; margin-top: 2px; }

/* QR */
.qr-box { background: #fff; border: 3px solid var(--ink); padding: 14px; box-shadow: 4px 4px 0 var(--ink); align-self: center; }
.qr-box canvas { display: block; width: 240px; height: 240px; }
.countdown { font-family: var(--pixel); font-size: 28px; text-align: center; }

/* 時間線（夜間） */
.player { position: relative; aspect-ratio: 16 / 9; background: var(--night-panel); border-block: 3px solid var(--night-deep); margin: 0 -16px; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player .kind { position: absolute; right: 10px; top: 10px; font-size: 12px; font-weight: 700; color: var(--night-deep); padding: 3px 8px; pointer-events: none; }
.player .status { position: absolute; left: 10px; bottom: 48px; /* 讓開播放控制列 */ display: flex; align-items: center; gap: 6px; font-size: 12px; color: #fff; background: var(--night-deep); padding: 3px 8px; pointer-events: none; }
.player .status i { width: 8px; height: 8px; background: var(--grass); }
.player .status.off i { background: var(--rec); }
.player .empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted-night); }
.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.controls button.speed { border: 3px solid var(--sand); background: none; color: var(--sand); font-family: var(--pixel); font-size: 22px; min-width: 56px; height: 38px; cursor: pointer; }
/* 睡眠音／說故事：跟 x1 一樣的外框；播放中變米白色 */
.pill { display: flex; align-items: center; justify-content: center; height: 38px; padding: 0 8px; border: 3px solid var(--sand); background: none; color: var(--sand); font: 700 14px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.pill.on { background: var(--sand); color: var(--night); }
/* 可撥動的時間條（左右滿版） */
.scrub-wrap { margin: 0 -16px; border-block: 3px solid var(--night-deep); background: #0F1D15; }
.scrub { position: relative; height: 64px; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.scrub-layer { position: absolute; inset: 0; pointer-events: none; }
.scrub .tick { position: absolute; top: 0; width: 2px; height: 6px; background: var(--muted-night); opacity: .6; }
.scrub .tick.major { height: 10px; opacity: 1; }
.scrub .tlabel { position: absolute; top: 10px; transform: translateX(-50%); font-family: var(--pixel); font-size: 18px; color: var(--muted-night); }
.scrub .bar { position: absolute; top: 34px; height: 20px; background: var(--night-panel); }
.scrub .clip { position: absolute; top: 34px; height: 20px; min-width: 3px; }
.scrub .needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: #fff; pointer-events: none; }
.tl-foot { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 0 8px 4px; }
.tl-foot .step { width: 48px; height: 40px; border: 0; background: none; color: var(--sand); font-family: var(--pixel); font-size: 26px; cursor: pointer; padding: 0; }
.needle-time { text-align: center; font-size: 22px; font-weight: 400; color: var(--sand); }
/* 像素遊戲對話框 */
.rpg-wrap { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; padding: 16px 12px calc(16px + var(--safe-b)); background: rgba(10, 20, 14, .45); }
.rpg-box, .rpg-choices { width: 100%; max-width: 460px; background: #fff; color: var(--ink); border: 4px solid var(--ink); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink); }
.rpg-box { position: relative; min-height: 120px; padding: 18px 22px 26px; cursor: pointer; }
.rpg-text { margin: 0; font-size: 17px; line-height: 1.7; font-weight: 700; white-space: pre-wrap; }
.rpg-more { position: absolute; right: 18px; bottom: 10px; font-style: normal; font-size: 14px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.rpg-choices { align-self: flex-end; width: auto; min-width: 150px; display: flex; flex-direction: column; padding: 12px 14px;
  max-height: calc(100dvh - 230px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.rpg-choices button { flex: none; }
.rpg-choices button { border: 0; background: none; font: 700 17px var(--font); color: var(--ink); text-align: left; padding: 6px 4px 6px 26px; position: relative; cursor: pointer; }
.rpg-choices button.sel::before { content: '▶'; position: absolute; left: 4px; font-size: 13px; top: 10px; }
.rpg-choices button:focus-visible { outline: none; }
.daynav { display: flex; align-items: center; justify-content: space-between; }
.daynav button { width: 44px; height: 44px; border: 3px solid var(--sand); background: none; color: var(--sand); font-family: var(--pixel); font-size: 22px; cursor: pointer; }
.daynav button:disabled { opacity: .3; }
.ruler { display: flex; justify-content: space-between; font-family: var(--pixel); font-size: 16px; color: var(--muted-night); }
.track { position: relative; height: 26px; background: var(--night-panel); border: 3px solid var(--night-deep); cursor: pointer; touch-action: none; }
.track span { position: absolute; top: 0; bottom: 0; min-width: 3px; }
.track .head { position: absolute; top: -8px; bottom: -8px; width: 3px; background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 2px solid var(--sand); background: none; color: var(--sand); font: 13px var(--font); cursor: pointer; }
.chip i { width: 8px; height: 8px; display: inline-block; }
.chip[aria-pressed=true] { background: var(--sand); color: var(--night); font-weight: 700; }
.events { display: flex; flex-direction: column; gap: 8px; }
.event { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 3px solid transparent; background: none; color: var(--sand); font: inherit; text-align: left; cursor: pointer; }
.event.on { background: var(--ink); border-color: var(--grass); }
.event .th { width: 80px; aspect-ratio: 16 / 9; background: var(--night-panel); border: 2px solid var(--night-deep); flex-shrink: 0; object-fit: cover; image-rendering: auto; }
.event b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.event b i { width: 8px; height: 8px; display: inline-block; }
.event .t { font-family: var(--pixel); font-size: 18px; color: var(--muted-night); }

/* 偵測範圍編輯 */
.zone-edit { position: relative; aspect-ratio: 16 / 9; background: var(--sea); border: 3px solid var(--ink); touch-action: none; overflow: hidden; }
.zone-edit, .zone-edit img { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.zone-edit img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; display: block; }
.zone-edit .zone { position: absolute; border: 3px dashed var(--grass); background: rgba(166, 211, 111, .18); }

/* 對話框 */
.sheet-wrap { position: fixed; inset: 0; background: rgba(10, 20, 14, .6); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { width: 100%; max-width: 480px; background: var(--paper); color: var(--ink); border-top: 3px solid var(--ink); padding: 20px 16px calc(20px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.sheet h2 { margin: 0; font-size: 20px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; font-size: 14px; z-index: 60; max-width: 90vw; }
.banner { border: 3px solid var(--warn); background: #FFF1E6; color: var(--warn); padding: 10px 12px; font-size: 14px; }
.banner.info { border-color: var(--sea); background: #EAF4FA; color: #1D4F6B; }
.ok { color: var(--green); }

/* 加入主畫面引導 */
.a2hs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: #fff; padding: 16px 16px calc(24px + var(--safe-b)); text-align: center; }
.a2hs .arrow { font-family: var(--pixel); font-size: 36px; animation: bob 1s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* 睡眠音 */
.snd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.snd-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.snd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; min-width: 0; font: inherit; color: var(--ink); background: #fff; border: 3px solid var(--ink); cursor: pointer; }
.snd svg { color: var(--green); }
.snd b { font-size: 14px; }
.snd .sub { font-size: 11px; color: var(--muted); }
.snd[aria-pressed=true] { background: var(--green); color: #fff; box-shadow: inset 0 0 0 2px var(--sand); }
.snd[aria-pressed=true] svg, .snd[aria-pressed=true] .sub { color: var(--sand); }
.scrub .clip.sel { outline: 2px solid #fff; z-index: 1; }

/* 回放影片：下方控制列（拍照、錄影、x1、聲音、畫質、放大） */
.player video { cursor: pointer; }
.player .pbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-around; padding: 18px 6px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.player .pbar button { width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: #fff; cursor: pointer; padding: 0; filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .6)); }
.player .pbar button.speed { width: 44px; height: 40px; position: relative; font-family: var(--pixel); font-size: 15px; line-height: 1; filter: none; }
/* x1 跟其他圖示一樣大：24×24 的框 */
.player .pbar button.speed::before { content: ''; position: absolute; left: 10px; top: 8px; width: 24px; height: 24px; box-sizing: border-box; border: 3px solid #fff; }
.player .pbar button[aria-pressed=true] { color: var(--grass); }
.player .bigplay { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; padding: 0 0 0 6px; background: rgba(10, 20, 14, .75); border: 3px solid #fff; color: #fff; cursor: pointer; }
.player .kind { top: 8px; }

/* 睡眠音／說故事／對話：圖示按鈕 */
.actions { display: flex; justify-content: center; gap: 14px; }
.ibtn { width: 60px; height: 40px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--sand); background: none; color: var(--sand); cursor: pointer; text-decoration: none; padding: 0; }
.ibtn.on { background: var(--sand); color: var(--night); }
.ibtn.talk-on { background: var(--sea); border-color: var(--sea-light); color: #fff; }

/* 影片和時間條固定在上方，只捲動下方的錄影片段 */
.tl-sticky { position: sticky; top: 0; z-index: 5; display: flex; flex-direction: column; gap: 12px; margin: -6px -16px 0; padding: var(--safe-t) 16px 0; background: var(--night); box-shadow: 0 6px 8px -4px rgba(0, 0, 0, .5); }
.tl-sticky .scrub-wrap { margin-bottom: 0; }
.daynav button { width: 40px; height: 40px; }

/* 登島安全守則 */
.energy-row { display: flex; align-items: center; gap: 8px; }
.energy-row .pixel { font-size: 20px; }
.energy { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border: 3px solid var(--ink); background: #fff; height: 26px; }
.energy i { background: #E4DDC8; }
.energy i.on { background: var(--grass); }
.energy-pct { min-width: 44px; text-align: right; }
.rules-card { display: block; color: inherit; text-decoration: none; }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 2px dashed rgba(31, 58, 42, .2); }
.rule:first-of-type { border-top: 0; }
.rule b { cursor: pointer; }
.rule-check { flex: none; width: 28px; height: 28px; margin-top: 1px; border: 3px solid var(--ink); background: #fff; padding: 0; cursor: pointer; position: relative; }
.rule-check[aria-checked="true"] { background: var(--grass); }
.rule-check[aria-checked="true"]::after { content: ''; position: absolute; left: 6px; top: 1px; width: 7px; height: 13px; border: solid var(--ink); border-width: 0 4px 4px 0; transform: rotate(40deg); }
.item-get { position: fixed; z-index: 61; left: 0; right: 0; top: calc(var(--safe-t) + 7vh); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.item-get .pixel { margin: 0; padding: 4px 12px; background: var(--ink); color: var(--sand); font-size: 22px; }
.item-raft { animation: bob 1.2s steps(2) infinite; filter: drop-shadow(0 0 12px rgba(243, 231, 201, .6)); }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .item-raft { animation: none; } }

/* 任務・道具 */
.btn.small { min-height: 36px; padding: 4px 14px; font-size: 15px; width: auto; }
.quest { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 2px dashed rgba(31, 58, 42, .25); }
.quest:first-of-type { border-top: 0; }
.quest.soon { opacity: .55; }
.quest-prog { font-size: 22px; white-space: nowrap; }
.quest-tag { font-size: 13px; font-weight: 700; padding: 2px 8px; border: 2px solid var(--ink); white-space: nowrap; }
.quest-tag.done { background: var(--grass); }
.item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.item-slot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px; border: 3px solid var(--ink); background: #fff; color: inherit; text-decoration: none; }
.item-slot p { margin: 0; }
.item-art { height: 70px; display: flex; align-items: center; justify-content: center; }
.item-slot.locked { background: transparent; border-style: dashed; opacity: .6; }
.item-slot.locked .item-art .pixel { font-size: 44px; }
.mega-label { display: inline-flex; align-items: center; gap: 8px; }
.mega-label svg { display: block; }
@media (hover: hover) { .rpg-choices:hover button.sel:not(:hover)::before { content: none; } .rpg-choices button:hover::before { content: '▶'; position: absolute; left: 4px; font-size: 13px; top: 10px; } }
.player .mask-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.player .pbar { display: none; }
.player.ui .pbar { display: flex; }
.player .bigplay.is-pause { padding: 0; }

/* 面具收藏 */
button.item-slot { font: inherit; cursor: pointer; }
.item-slot.on { background: #E6F2D9; box-shadow: inset 0 0 0 3px var(--green, #2F6B45); }

/* 好友島：我的小島 */
.island-card { display: block; color: inherit; text-decoration: none; }
.island { position: relative; height: 190px; margin: 10px -4px 4px; overflow: hidden;
  background: linear-gradient(#F3E7C9 0 34%, #CFE6F2 34% 100%); border: 3px solid var(--ink); }
.island.big { height: 230px; margin: 0 0 4px; }
.isl-land { position: absolute; left: 50%; top: 20%; width: 56%; max-width: 300px; transform: translateX(-50%); image-rendering: pixelated; }
.isl-tower { position: absolute; transform: translateX(-50%); z-index: 2; }
.isl-float { position: absolute; inset: 0; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-2px, -4px) rotate(-1deg); } 50% { transform: translate(0, -6px) rotate(0); } 75% { transform: translate(2px, -3px) rotate(1deg); } }
.isl-raft { position: absolute; bottom: 5%; z-index: 3; animation: drift 3.2s steps(8) infinite; }
.isl-more { position: absolute; right: 8px; top: 6px; font-size: 22px; }
.isl-stats { display: flex; justify-content: space-around; gap: 6px; flex-wrap: wrap; padding-top: 6px; }
.isl-stats b { font-size: 24px; }
.tw-light { animation: blink 1s steps(1) infinite; }
.tw-wave { opacity: 0; animation: wave 1.8s steps(1) infinite; }
.tw-w2 { animation-delay: .3s; }
.tw-w3 { animation-delay: .6s; }
@keyframes wave { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 0; } }
@keyframes bob2 { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .tw-wave { opacity: 1; animation: none; } .isl-raft, .tw-light { animation: none; } }

.new-tag { display: inline-block; margin-left: 6px; padding: 0 4px; background: #E5383B; color: #fff; font-size: 14px; line-height: 18px; vertical-align: middle; }
.raft-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 2px dashed rgba(31, 58, 42, .25); }
.raft-row.sample { opacity: .75; }
.raft-ico { flex: none; padding-top: 2px; }
.raft-chks { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.raft-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.raft-mask { display: inline-flex; }
.player .freeze { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
/* iPhone 的放大：播放區鋪滿畫面，面具和布景跟著放大 */
.player.pfull { position: fixed; inset: 0; z-index: 200; margin: 0; aspect-ratio: auto; border: 0; background: #000; }
.player.pfull video { object-fit: contain; }
.player:fullscreen { aspect-ratio: auto; background: #000; }
.player:fullscreen video { object-fit: contain; }
html.no-scroll, html.no-scroll body { overflow: hidden; }

/* 登島解鎖 */
html.lk-on, html.lk-on body { overflow: hidden; }
.lk-wrap { position: fixed; inset: 0; z-index: 1000; background: var(--sea); display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); }
.lk-screen { width: 100%; max-width: 360px; color: #fff; text-align: center; display: flex; flex-direction: column; gap: 8px; margin: auto; }
.lk-screen h2 { margin: 0; font-size: 22px; }
.lk-sub { margin: 0 0 6px; font-size: 14px; }
.lk-msg { min-height: 22px; margin: 4px 0; font-size: 15px; font-weight: 700; }
.lk-sea { width: 300px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; touch-action: none; border: 3px solid var(--ink); image-rendering: pixelated; display: block; }
.lk-pix { image-rendering: pixelated; display: block; }
.lk-chest .lk-pix:first-child { margin: 0 auto; }
.lk-slots { display: flex; justify-content: center; gap: 8px; margin: 8px 0 12px; }
.lk-slot { width: 50px; height: 50px; border: 3px solid var(--ink); background: #2c6a96; display: flex; align-items: center; justify-content: center; }
.lk-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 270px; margin: 0 auto; }
.lk-keys button { height: 58px; border: 3px solid var(--ink); background: var(--sand); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; color: var(--ink); }
.lk-keys button:active { background: #e0d1a6; }
.lk-keys .txt { font: 700 14px var(--font); }
.lk-bio .lk-pix { margin: 0 auto 12px; }
.lk-link { background: none; border: 0; color: #fff; text-decoration: underline; font: 14px var(--font); padding: 6px; cursor: pointer; }
.lk-screen .btn.light { margin-top: 6px; }
.lk-shake { animation: lk-sh .35s; }
@keyframes lk-sh { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
/* 放大時，播放鍵左右的上一段／下一段 */
.player .sidenav { display: none; position: absolute; top: 45%; transform: translate(-50%, -50%); width: 52px; height: 52px; align-items: center; justify-content: center; padding: 0; background: rgba(10, 20, 14, .6); border: 3px solid #fff; color: #fff; cursor: pointer; }
.player .sidenav.prev { left: calc(50% - 96px); }
.player .sidenav.next { left: calc(50% + 96px); }
.player.pfull .sidenav, .player:fullscreen .sidenav { display: flex; }
.player .sidenav.hidden { display: none; }
/* 我的大聲公：錄音 */
.rec-tools { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rec-bar { height: 14px; border: 3px solid var(--ink); background: #fff; }
.rec-bar i { display: block; height: 100%; background: #c0392b; transition: width .1s linear; }
.rec-tools input { font: 700 16px var(--font); padding: 8px 10px; border: 3px solid var(--ink); }
.my-voice { min-width: 0; flex: 1; }
.my-voice b { word-break: break-all; }
.my-voice-btns { display: flex; gap: 6px; flex: none; }
.my-voice-btns .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }

/* ---------- 家人登島 ---------- */
.tabbar.two { grid-template-columns: repeat(2, 1fr); }
a.raft-row.link { color: inherit; text-decoration: none; align-items: center; }
.mask-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mask-pick button { width: 44px; height: 44px; border: 3px solid var(--ink); background: #fff; padding: 0; display: grid; place-items: center; cursor: pointer; }
.mask-pick button[aria-pressed="true"] { background: var(--grass); }
.mask-pick button.wide { width: auto; padding: 0 12px; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.copy-box { width: 100%; font: 14px/1.4 ui-monospace, monospace; border: 3px solid var(--ink); padding: 8px; background: #fff; color: var(--ink); word-break: break-all; }
.rpg-box.static { cursor: default; min-height: 0; max-width: none; }
/* 島主要求戴面具：面具準備好之前，影片先蓋住 */
.player video.fam-cover { visibility: hidden; }
img.pixelated { image-rendering: pixelated; }
.fam-note { margin: 6px 0 0; text-align: center; color: var(--muted-night); }

/* 首頁：我的小島／家人島 標題 */
.home-sec { display: flex; align-items: center; gap: 8px; margin: 4px 0 -6px; font-size: 16px; }
.cam-thumb .fam-tag { position: absolute; right: 10px; bottom: 10px; background: #E8913A; color: #fff; border: 2px solid var(--ink); font-size: 12px; font-weight: 700; padding: 1px 6px; }

/* 小島夜間模式關掉、或白天：攝影機頁面用明亮的小島配色（跟首頁一樣） */
body.cam-day .main { --sand: #1F3A2A; --night: #FBF8EF; --night-panel: #F3E7C9; --night-deep: #1F3A2A; --muted-night: #4F5E52; }
body.cam-day .tl-sticky { box-shadow: 0 6px 8px -4px rgba(31, 58, 42, .25); }
body.cam-day .scrub-wrap { background: #F3E7C9; }
body.cam-day .scrub .bar, body.cam-day .track { background: #E4D7AF; }
body.cam-day .scrub .needle, body.cam-day .track .head { background: var(--ink); }
body.cam-day .scrub .clip.sel { outline-color: var(--ink); }
body.cam-day .player { background: #000; }
body.cam-day .event.on { background: #fff; border-color: var(--green); }
body.cam-day .ibtn, body.cam-day .pill, body.cam-day .chip, body.cam-day .daynav button { background: #fff; }
body.cam-day .ibtn.on, body.cam-day .pill.on { background: var(--grass); color: var(--ink); }
body.cam-day .chip[aria-pressed=true] { background: var(--ink); color: var(--paper); }
body.cam-day .player .empty { color: #D9D9D9; }

/* 獲得道具：放在畫面上方，不擋對話框和選項；矮螢幕（瀏覽器網址列、小手機）縮小一點 */
.item-raft svg { width: min(216px, 55vw, 22vh); height: auto; display: block; }
.item-get .pixel { font-size: min(22px, 5.5vw); }
body:has(.item-get) .rpg-wrap { background: rgba(10, 20, 14, .78); }

/* 首頁卡片：畫面先模糊，點了在卡片裡播最新一段 */
.cam-thumb { cursor: pointer; }
.cam-thumb img.blurred { filter: blur(14px); transform: scale(1.12); }
.cam-thumb.playing img { visibility: hidden; }
.cam-thumb .thumb-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cam-thumb .thumb-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(31, 58, 42, .85); color: #fff; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; pointer-events: none; }
.cam-thumb .thumb-hint.msg { width: auto; height: auto; font-size: 14px; font-weight: 700; padding: 6px 12px; white-space: nowrap; }
.cam-thumb.playing .thumb-hint:not(.msg) { display: none; }
.cam-thumb.playing.paused .thumb-hint { display: flex; }
.cam-thumb .thumb-mute { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 36px; border: 2px solid #fff; background: rgba(31, 58, 42, .85); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.cam-thumb .tag, .cam-thumb .ago, .cam-thumb .fam-tag { z-index: 1; }
.cam-meta { text-decoration: none; color: var(--ink); }
.cam-thumb.playing .fam-tag { display: none; }
.cam-thumb .thumb-hint { z-index: 1; }
.cam-thumb .thumb-mute { z-index: 2; }

/* ---------- 即時畫面（第三階段，付費） ---------- */
/* 即時｜回放｜島冊：小小的一排 */
.live-tabs { display: flex; border: 2px solid var(--sand); margin: 0 0 6px; }
.ltab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 26px; border: 0; background: none; color: var(--sand); font: 700 12px var(--font); cursor: pointer; text-decoration: none; }
.ltab:empty { display: none; }
.ltab + .ltab { border-left: 2px solid var(--sand); }
.ltab.on { background: var(--grass); color: var(--ink); }
.ltab .dot { width: 6px; height: 6px; background: var(--rec); }
body.cam-day .ltab { background: #fff; }
body.cam-day .ltab.on { background: var(--grass); color: var(--ink); }
.player .kind.live, .cam-thumb .live-badge { background: var(--rec); color: #fff; border: 2px solid var(--ink); font-family: var(--pixel); font-size: 18px; font-weight: 400; line-height: 18px; padding: 1px 6px; }
.player .kind.live { left: 10px; right: auto; }
.player .kind.live::before, .cam-thumb .live-badge::before { content: '● '; animation: blink 1s steps(2) infinite; }
.cam-thumb .live-badge { position: absolute; left: 10px; top: 10px; z-index: 2; }
.cam-thumb.live-on .tag, .cam-thumb.live-on .ago { visibility: hidden; }
.cam-thumb.live-on .thumb-video { object-fit: cover; }
.player.is-live .no-live { display: none; }
.player:not(.is-live) .live-only { display: none !important; }
.player.is-snap .pbar, .player.is-snap .bigplay, .player.is-snap .sidenav { display: none !important; }
.player .kind.snapk { left: 10px; right: auto; background: var(--sand); color: var(--ink); border: 2px solid var(--ink); }
/* 即時分頁：右上角關閉攝影機 */
.pwr-btn { position: absolute; right: 10px; top: 8px; z-index: 4; width: 40px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; border: 3px solid var(--sand); background: rgba(0, 0, 0, .45); color: var(--sand); cursor: pointer; }
.pwr-btn.off { background: var(--rec); border-color: var(--ink); color: #fff; }
.player .live-snap { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: brightness(.55); }
.player .live-over { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px 56px; text-align: center; color: #fff; }
.live-over .lo-msg { font-size: 14px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.live-over .lo-btn { border: 3px solid var(--ink); background: var(--sand); color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; padding: 8px 14px; cursor: pointer; }
.live-over .lo-link { border: 0; background: none; color: #fff; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; padding: 0; }
.pbar .rec-on { color: var(--rec); animation: blink 1s steps(2) infinite; }
.pbar .qbtn { min-width: 44px; }
/* 遙控舊手機那排：圖示＋小字 */
.actions.remote { gap: 8px; margin-top: 10px; }
.actions .ibtn.lbl { width: 62px; height: 54px; flex-direction: column; gap: 3px; }
.ibtn.lbl .lbl-t { font-size: 10px; line-height: 1; white-space: nowrap; }
/* 即時分頁下面：最近 3 段 */
.recent-box { margin-top: 14px; }
.recent-box h3 { margin: 0 0 8px; font-size: 14px; }
.recent { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.recent-item { display: flex; flex-direction: column; gap: 3px; padding: 0; border: 3px solid var(--night-deep); background: var(--night-panel); color: inherit; font: inherit; cursor: pointer; text-align: left; }
.recent-item .th { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; display: block; }
.recent-item .ri-k { font-size: 11px; padding: 0 5px; display: flex; align-items: center; gap: 4px; }
.recent-item .ri-k i { width: 8px; height: 8px; display: inline-block; }
.recent-item .ri-t { font-size: 15px; padding: 0 5px 3px; }
.live-note { margin: 6px 0 0; text-align: center; color: var(--muted-night); }
.live-retry { border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
@media (prefers-reduced-motion: reduce) { .player .kind.live::before, .cam-thumb .live-badge::before { animation: none; } }

/* ---------- 島冊 ---------- */
.scrub .clip.kept { box-shadow: 0 0 0 2px var(--sea-light); }
.scrub .clip.kept::after { content: ''; position: absolute; left: 50%; top: -9px; width: 6px; height: 6px; margin-left: -3px; background: var(--sea-light); }
.event { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.event.kept { border-left-color: var(--sea-light); background: rgba(111, 179, 217, .12); }
.event.kept.on { border-color: var(--grass); border-left-color: var(--sea-light); }
.event .book-chip { font-style: normal; font-size: 11px; font-weight: 700; background: var(--sea-light); color: var(--night-deep); padding: 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 6em; }
.keep-btn { flex: none; width: 36px; height: 32px; display: grid; place-items: center; border: 2px solid var(--sand); color: var(--sand); font: 700 18px var(--font); cursor: pointer; }
.keep-btn.on { background: var(--sea-light); border-color: var(--sea-light); color: var(--night-deep); }
.book-sum { display: flex; justify-content: space-between; align-items: center; border: 3px solid var(--ink); padding: 8px 12px; font-size: 14px; }
.book-sum .pixel { font-size: 20px; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.book { display: flex; flex-direction: column; border: 3px solid var(--ink); background: var(--sand); color: var(--ink); text-decoration: none; box-shadow: 4px 4px 0 var(--ink); }
.book .cover { position: relative; aspect-ratio: 4 / 3; background: var(--night-panel); border-bottom: 3px solid var(--ink); overflow: hidden; }
.book .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book .nm { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 6px 8px; font-size: 14px; min-width: 0; }
.book .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book .nm .pixel { font-size: 18px; color: var(--muted); }
.book.add { align-items: center; justify-content: center; gap: 4px; min-height: 150px; border-style: dashed; box-shadow: none; background: none; font: 700 14px var(--font); cursor: pointer; }
.book.add b { font-family: var(--pixel); font-size: 34px; font-weight: 400; line-height: 1; }
.kept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kept-cell { position: relative; padding: 0; border: 3px solid var(--ink); background: var(--night-panel); cursor: pointer; aspect-ratio: 16 / 9; overflow: hidden; }
.kept-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kept-cell .d { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 15px; padding: 0 4px; }
.kept-cell .from { position: absolute; right: 4px; top: 4px; background: var(--sea-light); color: var(--ink); font-size: 11px; font-weight: 700; padding: 0 4px; }
.kept-cell .p { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; display: grid; place-items: center; background: rgba(31, 58, 42, .85); border: 2px solid #fff; color: #fff; }
.kept-player { margin: 0; }
.kept-player video { width: 100%; height: 100%; display: block; background: #000; }
.player .kp-bar { justify-content: space-between; padding: 22px 10px 8px; }
/* 攝影機頁的島冊分頁 */
.book-pane { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.book-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.book-back { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: inherit; font: 700 18px var(--font); cursor: pointer; text-align: left; min-height: 40px; }
.book-back .pixel { font-size: 26px; }
.player.pfull.kept-player { position: fixed; inset: 0; z-index: 300; }

/* 島冊播放：右上角 ×、下面一排像素小圖示 */
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-x { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; padding: 0; box-shadow: 3px 3px 0 var(--ink); }
.sheet-x:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.kept-acts { display: flex; flex-wrap: nowrap; gap: 6px; justify-content: space-between; }
.kept-acts .ibtn { flex: 1 1 0; min-width: 0; height: 48px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; padding: 0; box-shadow: 3px 3px 0 var(--ink); }
.kept-acts .ibtn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.kept-acts .ibtn[aria-pressed=true] { background: var(--sand); }
.kept-acts .ibtn.danger { color: var(--warn); border-color: var(--warn); box-shadow: 3px 3px 0 var(--warn); }

/* 小島守衛 */
.gdev { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 2px dashed #cfc3a3; }
.gdev:first-of-type { border-top: 0; }
.gdev b { display: block; font-size: 15px; word-break: break-all; }
.gdev .small { display: block; }
.gico { width: 34px; height: 34px; flex: none; border: 3px solid var(--ink); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.gbtn { min-height: 36px; padding: 0 12px; font-size: 14px; flex: none; }
.gbtn.lost { border-color: var(--warn); color: var(--warn); box-shadow: 3px 3px 0 var(--warn); }
.tag-me { flex: none; border: 3px solid var(--ink); background: var(--grass); font-weight: 700; font-size: 13px; padding: 2px 8px; }
.gpend { display: inline-block; margin-top: 4px; border: 2px solid var(--warn); color: var(--warn); font-weight: 700; font-size: 12px; padding: 1px 6px; }
.guard-alert { background: #fff; border-color: var(--warn); }
.guard-alert h3 { color: var(--warn); }

/* 隱藏任務：巡島 50 次（撿到警報器前先跳「！」） */
.patrol-bang { position: fixed; z-index: 61; left: 0; right: 0; top: calc(var(--safe-t) + 12vh); display: flex; flex-direction: column; align-items: center; gap: 0; pointer-events: none; }
.patrol-bubble { background: #fff; color: #D9442B; border: 4px solid var(--ink); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink); padding: 4px 22px; font-size: 64px; line-height: 1; animation: bob .6s steps(2) infinite; }
.patrol-tail { width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 14px solid var(--ink); margin-bottom: 8px; }
body:has(.patrol-bang) .rpg-wrap { background: rgba(10, 20, 14, .6); }
@media (prefers-reduced-motion: reduce) { .patrol-bubble { animation: none; } }
.hidden-quest { position: relative; background: var(--ink); color: var(--sand); margin: 10px -6px 0; padding: 12px; border: 3px solid var(--ink); border-top: 3px solid var(--ink); }
.hidden-quest b { display: block; }
.hidden-quest .hq-star { color: #F2C94C; font-size: 20px; }
.hidden-quest .quest-tag.done { color: var(--ink); border-color: var(--sand); }
.hidden-quest .new-tag { position: absolute; right: -4px; top: -12px; margin: 0; }
button.item-slot { font: inherit; cursor: pointer; }

/* 換頁載入中：上面一條像素小方塊跑馬燈（0.15 秒內載好就不出現） */
body::after { content: ''; position: fixed; left: 0; right: 0; top: var(--safe-t); height: 4px; z-index: 200; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(90deg, var(--grass) 0 8px, transparent 8px 16px); background-size: 32px 4px; }
body.busy::after { opacity: 1; transition: opacity 0s .15s; animation: busy-run .5s steps(4) infinite; }
@keyframes busy-run { to { background-position: 32px 0; } }
/* 夜間的攝影機頁：島冊分頁的框線、新增島冊看得到 */
body.night .book-pane .book.add { color: var(--sand); border-color: var(--sand); }
body.night .book-pane .book-sum { border-color: var(--sand); }
/* 攝影機頁白天會把 --sand 換成深色，島冊卡片的名字列固定用米色 */
.book-pane .book:not(.add) { background: #F3E7C9; color: #1F3A2A; }
.book-pane .book .cover { background: #13241A; }

/* 島冊播放：進度條（像素方塊拉桿） */
.kp-prog { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 0 6px; }
.kp-seek { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; touch-action: none; --p: 0%; }
.kp-seek::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(90deg, var(--grass) var(--p), rgba(255, 255, 255, .45) var(--p)); border: 2px solid #fff; box-sizing: content-box; }
.kp-seek::-moz-range-track { height: 6px; background: rgba(255, 255, 255, .45); border: 2px solid #fff; }
.kp-seek::-moz-range-progress { height: 6px; background: var(--grass); }
.kp-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -4px; background: #fff; border: 2px solid var(--ink); border-radius: 0; }
.kp-seek::-moz-range-thumb { width: 12px; height: 12px; background: #fff; border: 2px solid var(--ink); border-radius: 0; }
.kp-time { color: #fff; font-size: 14px; line-height: 1; text-align: right; text-shadow: 1px 1px 0 rgba(0, 0, 0, .6); }
