/* ==========================================================================
   zhr0913.fr — 全站样式
   框架:按定稿参考(顶栏 / 整幅首屏图+句子 / 搜索区 / 功能卡片 / 页脚)
   主题:亮色 / 暗色 两套,按访问者本地时间 18:30 / 06:30 自动切换
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #f4f4f2;
  --surface-2: #ececea;
  --cell: #e4e6e6;
  --ink: #0f1113;
  --ink-2: #464b51;
  --ink-3: #686d73;
  --line: #e8e8e6;
  --line-strong: #d6d6d3;
  --pos: #0a7d43;
  --neg: #c22f28;
  --accent: #102957;
  --accent-2: #1a3c78;
  --radius: 14px;
  --pill: 999px;
  --shadow-1: 0 1px 2px rgba(15, 17, 19, .05), 0 8px 26px rgba(15, 17, 19, .07);
  --shadow-2: 0 2px 6px rgba(15, 17, 19, .06), 0 20px 48px rgba(15, 17, 19, .12);
  --focus-ring: rgba(15, 17, 19, .55);
  --dur: .48s;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --wrap: 1480px;
  --wraps: 1040px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e0f11;
  --surface: #17181b;
  --surface-2: #1f2125;
  --cell: #23272c;
  --ink: #f2f3f4;
  --ink-2: #a7adb4;
  --ink-3: #868c93;
  --line: #24262a;
  --line-strong: #34373c;
  --pos: #46c98a;
  --neg: #e56a5e;
  --accent: #2b62ca;
  --accent-2: #4a7de0;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px rgba(0, 0, 0, .5);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .5), 0 22px 54px rgba(0, 0, 0, .6);
  --focus-ring: rgba(242, 243, 244, .65);
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color .6s ease, color .6s ease;
}

main { flex: 1 0 auto; width: 100%; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; width: 100%; }
.wrap-s { max-width: var(--wraps); margin: 0 auto; padding: 0 28px; width: 100%; }

.tabular { font-variant-numeric: tabular-nums; }

/* Browser surfaces, themed */
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }

/* ---------- 3. Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.tb-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 28px;
  height: 60px; display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 24px;
}
.tb-left { display: flex; align-items: center; gap: 30px; min-width: 0; }
.brand { font-size: 24px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.brand .dot { color: var(--ink-2); }

.mainnav { position: relative; display: flex; gap: 6px; }
.nav-link {
  font-size: 15.5px; font-weight: 600; color: var(--ink-2);
  padding: 6px 14px; position: relative;
  transition: color .18s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--ink); }
/* 无 JS 时保留静态下划线;app.js 放好滑动指示条后由 .has-ind 接管 */
.nav-link.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -2px;
  height: 2.5px; background: var(--accent); border-radius: 2px;
}
/* 一条共享的下划线,在导航项之间滑动;未来新增 .nav-link 无需改样式 */
.nav-ind {
  position: absolute; left: 0; bottom: -2px; z-index: 1;
  width: 0; height: 2.5px; background: var(--accent); border-radius: 2px;
  pointer-events: none;
  transform: translateX(0);
  transition: transform .26s var(--ease), width .26s var(--ease);
  will-change: transform, width;
}
.nav-ind.no-anim { transition: none; }
.mainnav.has-ind .nav-link.active::after { display: none; }

.tb-right { display: flex; align-items: center; gap: 16px; justify-self: end; }
.tb-sep { width: 1px; height: 30px; background: var(--line); }

.langs { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.lang { color: var(--ink-3); }
.lang:hover { color: var(--accent); }
.lang.active { color: var(--accent); }
.lang-sep { color: var(--line-strong); font-weight: 400; }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: background-color .2s ease, color .2s ease;
}
.theme-toggle:hover { background: var(--surface); color: var(--ink); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .ic-moon { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: block; }

/* ---------- 4. FX widget(单按钮 + 点开展开详情) ---------- */
.fx { position: relative; display: flex; align-items: center; user-select: none; }

/* 收起态:整个汇率就是一个按钮;货币对在上、数字在下,面板里不再重复“货币对”文字 */
.fx-trigger {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 2px 0; border-radius: 8px; color: var(--ink);
  transition: background-color .2s ease;
}
.fx-trigger:hover, .fx-trigger[aria-expanded="true"] { background: var(--surface); }
.fx-pair {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; line-height: 1.1;
  color: var(--ink-2); white-space: nowrap;
}
.fx-pair .fx-arrow { width: 8.5px; height: 8.5px; color: var(--ink-3); }
.fx-trigger-rate { display: flex; align-items: center; gap: 2px; }
.fx-trigger .fx-num { font-size: 14px; font-weight: 700; letter-spacing: 0; line-height: 1.05; }
.fx-chev { width: 7px; height: 7px; color: var(--ink-3); flex: none; transition: transform .2s ease; }
.fx-trigger[aria-expanded="true"] .fx-chev { transform: rotate(180deg); }

/* 展开态:V2 的细节都收进这块安静的面板 */
.fx-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: min(380px, calc(100vw - 24px));
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-2); padding: 16px;
}
.fx-panel[hidden] { display: none; }
.fx-panel-pair { position: relative; display: flex; align-items: center; gap: 8px; }
.fx-panel-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.fx-panel-figure { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fx-panel .fx-num { font-size: 22px; font-weight: 700; letter-spacing: 0; line-height: 1.1; }
.fx-panel .fx-tags { flex-direction: column; gap: 0; }
.fx-panel .fx-tag { font-size: 10px; font-weight: 600; line-height: 1.3; }
.fx-panel .fx-tag i { font-size: 9px; font-weight: 500; margin-left: 2px; }
.fx-panel .fx-spark { width: 120px; height: 32px; flex: none; }
.fx-panel .fx-spark polyline { stroke-width: 1.6; }
.fx-panel-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 9px; line-height: 1.6; letter-spacing: .01em;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.fx-panel-meta b { font-weight: 600; color: var(--ink-2); }
.fx-meta-sep { color: var(--line-strong); }

.fx-base {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: var(--pill);
  padding: 2px 9px;
  transition: border-color .2s ease, color .2s ease;
}
.fx-base:hover { border-color: var(--ink-3); color: var(--ink); }
.fx-base svg { width: 10px; height: 10px; }
.fx-arrow { width: 13px; height: 13px; color: var(--ink-3); flex: none; }
.fx-panel-pair .fx-arrow { width: 12px; height: 12px; }

.fx-num { font-variant-numeric: tabular-nums; }
.fx-tags { display: flex; flex-direction: column; gap: 0; }
.fx-tag { font-size: 10px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-tag i { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: 9px; margin-left: 2px; }
.fx-tag.up { color: var(--pos); }
.fx-tag.down { color: var(--neg); }
.fx-tag.flat { color: var(--ink-3); }

.fx-spark { width: 120px; height: 32px; }
.fx-spark polyline { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fx-spark.up polyline { stroke: var(--pos); }
.fx-spark.down polyline { stroke: var(--neg); }
.fx-spark.flat polyline { stroke: var(--ink-3); }
.fx-spark polyline.draw {
  stroke-dasharray: var(--fx-len);
  animation: fx-draw .8s var(--ease) both;
}
@keyframes fx-draw {
  from { stroke-dashoffset: var(--fx-len); }
  to { stroke-dashoffset: 0; }
}

.fx.skeleton .fx-num { color: var(--line-strong); }
.fx.skeleton .fx-num::after { content: "—"; }

.fx-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-2); padding: 6px;
  min-width: 132px;
}
.fx-menu button {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: 14px; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
}
.fx-menu button:hover { background: var(--surface); }
.fx-menu button[aria-selected="true"] { color: var(--ink); }
.fx-menu button[aria-selected="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.fx-menu button:not([aria-selected="true"]) { color: var(--ink-2); }

/* pulse when the 汇率 card is clicked */
.fx.pulse .fx-trigger { animation: fx-pulse 1.1s var(--ease) 1; }
@keyframes fx-pulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 17, 19, 0); }
  25% { box-shadow: 0 0 0 6px var(--line-strong); }
  100% { box-shadow: 0 0 0 6px rgba(15, 17, 19, 0); }
}

/* ---------- 5. Hero ---------- */
.hero {
  --hero-fg: #f7f4ec;
  --hero-fg-soft: rgba(247, 244, 236, .86);
  --hero-cap-fg: rgba(247, 244, 236, .92);
  position: relative; width: 100%;
  height: clamp(400px, 48vw, 560px);
  background: var(--surface-2);
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: opacity .7s ease;
}

/* 白字模式下压在左侧的软纱:保证任意照片上文字可读;亮图转深色字时自动退场 */
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(92deg, rgba(8, 9, 10, .42) 0%, rgba(8, 9, 10, .24) 40%, rgba(8, 9, 10, 0) 64%);
  opacity: 0; transition: opacity .5s ease;
}
.hero:not(.on-light) .hero-veil { opacity: 1; }

.hero-copy {
  position: absolute; left: max(28px, calc((100vw - var(--wrap)) / 2 + 28px)); top: 50%;
  transform: translateY(-56%); max-width: min(620px, 46vw);
  display: flex; flex-direction: column; gap: 14px;
}
.hero-sentence {
  font-size: clamp(34px, 4.4vw, 62px); font-weight: 800; line-height: 1.06;
  letter-spacing: -.02em; color: var(--hero-fg); white-space: pre-line;
  text-shadow: 0 1px 18px rgba(0, 0, 0, .18);
  transition: color .5s ease;
}
.hero-sub {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; line-height: 1.9;
  text-transform: uppercase; color: var(--hero-fg-soft); white-space: pre-line;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .2);
  transition: color .5s ease;
}
.hero-sentence.long { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; }
.hero-sentence.xlong {
  font-size: clamp(22px, 2.6vw, 30px); line-height: 1.18; letter-spacing: -.012em;
}
.hero.on-light {
  --hero-fg: #0f1113;
  --hero-fg-soft: rgba(15, 17, 19, .74);
}
.hero.on-light .hero-sentence { text-shadow: none; }
.hero.on-light .hero-sub { text-shadow: none; }

.hero-cap {
  position: absolute; right: max(28px, calc((100vw - var(--wrap)) / 2 + 28px)); bottom: 22px;
  font-size: 13px; line-height: 1.5; letter-spacing: .035em; color: var(--hero-cap-fg);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
  max-width: 44ch; text-align: right;
  transition: color .5s ease;
}
.hero.on-light-cap { --hero-cap-fg: rgba(15, 17, 19, .8); }
.hero.on-light-cap .hero-cap { text-shadow: none; }

.hero.swap .hero-sentence, .hero.swap .hero-sub { animation: hero-swap var(--dur) var(--ease) 1; }
@keyframes hero-swap {
  from { opacity: .35; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 6. Search zone ---------- */
.searchzone { padding: 56px 28px 8px; }
.searchbar {
  max-width: var(--wraps); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 12px;
  box-shadow: var(--shadow-1);
  padding: 8px 8px 8px 24px; height: 68px;
  transition: box-shadow .25s ease;
}
.searchbar:focus-within { box-shadow: var(--shadow-2); }
.searchbar .mag { width: 21px; height: 21px; color: var(--ink-3); flex: none; }
.searchbar input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 16.5px; color: var(--ink); height: 100%;
}
.searchbar input::placeholder { color: var(--ink-3); }

.sb-right { display: flex; align-items: center; gap: 8px; flex: none; }
.engine-select { position: relative; display: flex; align-items: center; }
.engine-select select {
  appearance: none; -webkit-appearance: none;
  border: 0; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  padding: 10px 26px 10px 12px; border-radius: 8px;
}
.engine-select select:hover { color: var(--ink); background: var(--surface); }
.engine-select select option { background: var(--bg); color: var(--ink); }
.engine-select .chev { position: absolute; right: 10px; width: 12px; height: 12px; color: var(--ink-3); pointer-events: none; }

.btn-search {
  height: 52px; padding: 0 30px; border-radius: 10px;
  background: var(--accent); color: #ffffff;
  font-size: 15.5px; font-weight: 700; letter-spacing: .01em;
  transition: transform .18s var(--ease), opacity .2s ease;
}
.btn-search:hover { opacity: .88; }
.btn-search:active { transform: scale(.98); }

/* ---------- 7. 公共画布 ---------- */
.canvassec { padding: 52px 0 76px; }
.cv-head { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cv-title { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.cv-scroll { overflow-x: auto; }
/* 缩略图模式:整块画布已 transform 缩进 stage 的宽高里,但网格布局盒仍是 48×29 的
   原始尺寸;某些浏览器会把它算进可滚动区域,导致能上下/左右拖出空白。这里直接裁掉。 */
.cv-scroll.mini { overflow: hidden; }
.cv-stage { position: relative; }
.cv-stage.mini { cursor: zoom-in; overflow: hidden; }
.cv-stage.mini .pc { pointer-events: none; }
.cv-grid {
  display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 5px;
  transition: transform .25s var(--ease);
}
.pc {
  aspect-ratio: 1 / 1; border-radius: 3px; background: var(--cell);
  cursor: pointer; transition: background-color .15s ease, transform .12s ease;
}
.pc:hover { transform: scale(1.14); }
.cv-expand {
  margin-top: 16px; padding: 9px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  transition: background-color .2s ease, border-color .2s ease;
}
.cv-expand:hover { background: var(--surface); border-color: var(--ink-3); }
.cv-hint { font-size: 12px; line-height: 1.5; color: var(--ink-3); margin-top: 8px; }
.cv-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-top: 16px;
}
.cv-palette { display: flex; gap: 10px; }
.cv-sw {
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  background: var(--sw); border: 1px solid var(--line-strong);
  transition: box-shadow .15s ease, transform .15s ease;
}
.cv-sw:hover { transform: translateY(-1px); }
.cv-sw.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.cv-erase {
  background: var(--bg); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.cv-erase svg { width: 15px; height: 15px; }
.cv-left {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
/* 额度文字左侧的小彩票按钮:点开刮刮乐(用户提供图标,裁去透明边后等比缩放) */
.cv-lot {
  position: relative; flex: none; padding: 0; display: inline-flex;
  cursor: pointer; transition: transform .15s ease;
}
.cv-lot img { display: block; width: 18px; height: 26px; }
.cv-lot:hover { transform: translateY(-1px) scale(1.05); }
.cv-lot:active { transform: scale(.97); }
.cv-lot:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 3px; }
.cv-lot.has-spins::after {
  content: ""; position: absolute; top: -3px; right: -4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2); border: 2px solid var(--bg);
}
.cv-msg { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--neg); }
/* 玩法:收进标题旁的小问号,点击弹出气泡(纸底 + ambient-2 的“浮起”菜单) */
.cv-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  color: var(--ink-3); background: none;
  transition: color .2s ease, background-color .2s ease;
}
.cv-help svg { width: 17px; height: 17px; }
.cv-help:hover { color: var(--ink); background: var(--surface); }
.cv-help[aria-expanded="true"] { color: var(--ink); }
.cv-pop {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30;
  width: min(430px, calc(100vw - 40px));
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-2); padding: 18px 20px;
}
.cv-pop h3 { font-size: 14px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.cv-pop ul { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; }
.cv-pop li {
  font-size: 13px; color: var(--ink-2); line-height: 1.55;
  padding-left: 15px; position: relative;
}
.cv-pop li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 5px; height: 5px; border-radius: 1.5px; background: var(--ink-3);
}

/* ---------- 8. Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 0 30px; margin-top: auto; }
.ft-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-size: 12px; line-height: 1.5; color: var(--ink-3);
}
.ft-mail { letter-spacing: .04em; font-size: 12px; font-weight: 400; }
.ft-mail:hover { color: var(--accent); }
.ft-inner .langs { justify-self: auto; }

/* ---------- 9. Album ---------- */
.page-head { padding-top: 54px; padding-bottom: 12px; scroll-margin-top: 76px; }
.page-head h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.page-head .lead { color: var(--ink-2); margin-top: 6px; font-size: 15.5px; line-height: 1.5; }

.album-wrap { padding: 24px 0 72px; }
/* 零缝隙、整行铺满的分页相册:同一行高度一致,整页因此没有参差底边 */
.album-grid { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.alb-row { display: flex; width: 100%; overflow: hidden; }
.alb-card {
  display: block; height: 100%; min-width: 0; background: var(--surface);
  cursor: zoom-in; overflow: hidden; container-type: inline-size;
}
.alb-card .ph { position: relative; width: 100%; height: 100%; background: var(--surface-2); overflow: hidden; }
.alb-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.alb-card:hover .ph img { transform: scale(1.015); }
/* 信息压在图片底部(网格里不加水印;水印只在查看器和下载导出里出现) */
.alb-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 46px 16px 13px;
  background: linear-gradient(180deg, rgba(8, 9, 10, 0) 0%, rgba(8, 9, 10, .58) 78%);
  color: #fff; display: flex; align-items: flex-end;
  pointer-events: none; text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.alb-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.alb-title, .alb-place {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.alb-title { font-size: clamp(10px, 4.2cqw, 13px); font-weight: 700; line-height: 1.25; letter-spacing: .01em; }
.alb-place { font-size: clamp(9px, 3.6cqw, 11px); font-weight: 600; line-height: 1.3; color: rgba(255, 255, 255, .9); }
.alb-date { font-size: 9px; font-weight: 600; line-height: 1.3; letter-spacing: .03em; color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; }

@container (max-width: 170px) {
  .alb-overlay { padding: 32px 10px 9px; }
  .alb-title { font-size: 11px; }
  .alb-place { font-size: 9px; }
}
/* 窄卡:保留地名,日期让位;地名最多两行,不会把图占满 */
@container (max-width: 150px) {
  .alb-info.has-place .alb-date { display: none; }
  .alb-overlay { padding: 28px 8px 8px; }
}
@container (max-width: 70px) {
  .alb-overlay { padding: 22px 4px 5px; }
  .alb-title, .alb-place { font-size: 8px; line-height: 1.25; }
}
@container (max-width: 40px) {
  .alb-title, .alb-place, .alb-date { display: none; }
  .alb-overlay { background: none; padding: 0; }
}

.album-empty { color: var(--ink-3); padding: 30px 4px; }

/* 分页栏:靠左的页码/箭头,不加横线;当前页用强调色 */
.album-pager {
  max-width: var(--wrap); margin: 24px auto 0; padding: 0 28px;
  scroll-margin-top: 76px;
}
.alb-pg-inner { display: flex; align-items: center; justify-content: flex-end; }
.alb-pg-controls { display: flex; align-items: center; gap: 4px; }
.alb-pg-arrow {
  width: 30px; height: 30px; border: 0; border-radius: 999px; background: none;
  color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background-color .2s ease, color .2s ease;
}
.alb-pg-arrow svg { width: 15px; height: 15px; }
.alb-pg-arrow:hover:not(:disabled) { background: var(--surface); color: var(--accent); }
.alb-pg-arrow:disabled { opacity: .3; cursor: default; }
.alb-pg-nums { display: flex; align-items: center; }
.alb-pg-num {
  min-width: 28px; height: 30px; padding: 0 4px; border: 0; background: none;
  color: var(--ink-3); font: inherit; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; font-variant-numeric: tabular-nums; cursor: pointer;
}
.alb-pg-num:hover { color: var(--accent); }
.alb-pg-num[aria-current="page"] {
  color: var(--accent); text-decoration: underline;
  text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 2px;
}
.alb-pg-gap { padding: 0 2px; color: var(--ink-3); font-size: 12px; }

.album-grid.alb-swap { animation: alb-swap .32s var(--ease) 1; }
@keyframes alb-swap { from { opacity: .25; } to { opacity: 1; } }

/* 图片浏览器(信息面板在右) */
.lb {
  position: fixed; inset: 0; z-index: 90; display: flex;
  background: rgba(10, 11, 12, .93);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.lb.open { opacity: 1; pointer-events: auto; }
.lb-view { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 26px; }
.lb-figure { position: relative; display: grid; max-width: 100%; }
.lb-figure img { grid-area: 1 / 1; max-width: 100%; max-height: calc(100vh - 52px); border-radius: 6px; }
.lb-wm {
  grid-area: 1 / 1; align-self: end; justify-self: end; margin: 0 12px 9px 0;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: rgba(255, 255, 255, .85); text-shadow: 0 1px 8px rgba(0, 0, 0, .45); pointer-events: none;
}
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-arrow.lb-prev { left: 14px; }
.lb-arrow.lb-next { right: 14px; }
.lb-info {
  width: 318px; flex: none; display: flex; flex-direction: column;
  background: #16181b; border-left: 1px solid rgba(255, 255, 255, .08);
  color: #e8e9ea; padding: 22px 22px 18px; overflow-y: auto;
}
.lb-count { font-size: 12px; letter-spacing: .08em; color: #9a9ea3; font-variant-numeric: tabular-nums; }
.lb-title { font-size: 22px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; margin-top: 10px; }
.lb-rows { margin-top: 8px; margin-bottom: 16px; }
.lb-row { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.lb-row .k { display: block; font-size: 11px; font-weight: 500; line-height: 1.4; letter-spacing: .08em; color: #8b9096; margin-bottom: 4px; }
.lb-row .v { display: block; font-size: 14px; font-weight: 600; line-height: 1.45; font-variant-numeric: tabular-nums; word-break: break-word; }
.lb-dl {
  margin-top: auto; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  color: #e8e9ea; font-size: 13px; font-weight: 700; letter-spacing: .02em;
  transition: background-color .2s ease;
}
.lb-dl:hover { background: rgba(255, 255, 255, .18); }
.lb-dl[disabled] { opacity: .5; cursor: default; }
.lb-dl svg { width: 15px; height: 15px; }
.lb-btn {
  width: 40px; height: 40px; border-radius: 50%; color: #e8e9ea;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(13, 15, 17, .55); border: 1px solid rgba(255, 255, 255, .14);
  transition: background-color .2s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, .18); }
.lb-btn svg { width: 18px; height: 18px; }
.lb-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
@media (max-width: 900px) {
  .lb { flex-direction: column; }
  .lb-view { padding: 12px 12px 0; }
  .lb-figure img { max-height: 58vh; }
  .lb-wm { font-size: 11px; margin: 0 9px 7px 0; }
  .lb-info { width: auto; max-height: 42vh; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 18px 18px; }
  .lb-title { font-size: 18px; margin-top: 6px; }
  .lb-row { padding: 9px 0; }
}

/* ---------- 10. OnionBay ---------- */
.ob-hero {
  position: relative; height: clamp(320px, 40vw, 480px);
  background: var(--surface-2) center / cover no-repeat;
  background-image: url('/res/onionbay-day.webp');
  display: flex; align-items: flex-end; overflow: hidden;
  padding-top: 24px;
}
/* 昼夜头图跟随全站亮暗主题(时段自动 / 手动开关 / ?theme=),与 data-theme 实时同步 */
html[data-theme="dark"] .ob-hero { background-image: url('/res/onionbay-night.webp'); }
.ob-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .42) 100%);
}
.ob-hero .ob-title {
  position: relative; z-index: 1;
  padding: 24px max(28px, calc((100vw - var(--wrap)) / 2 + 28px)) 34px;
  color: #fff;
}
.ob-hero h1 { font-size: clamp(34px, 4.4vw, 62px); font-weight: 800; letter-spacing: -.02em; line-height: 1.06; }
.ob-hero .ob-tag { margin-top: 8px; font-size: 16.5px; line-height: 1.5; color: rgba(255, 255, 255, .9); }

.ob-body { padding: 52px 0 76px; }
.ob-grid { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: start; }
.ob-prose { font-size: 16.5px; line-height: 1.7; color: var(--ink); }
.ob-prose p + p { margin-top: 16px; }
.ob-prose .muted { color: var(--ink-2); font-size: 15.5px; margin-top: 16px; }

.ob-panel { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.ob-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; }
.ob-row + .ob-row { border-top: 1px solid var(--line); }
.ob-row .k { font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.ob-row .v { font-size: 19px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.ob-copy {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: var(--pill);
  padding: 7px 15px; transition: all .2s ease;
}
.ob-copy:hover { color: var(--ink); border-color: var(--ink-3); }
.ob-copy svg { width: 14px; height: 14px; }
.ob-copy.copied { color: var(--pos); border-color: var(--pos); }

/* ---------- 11. Prose pages / stubs ---------- */
.prose-wrap { max-width: 860px; margin: 0 auto; padding: 54px 28px 90px; }
.prose-wrap h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.prose { margin-top: 24px; font-size: 16.5px; line-height: 1.7; color: var(--ink); }
.prose p + p { margin-top: 16px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose .muted { color: var(--ink-2); font-size: 15.5px; margin-top: 16px; }
.stub-note {
  margin-top: 30px; padding: 18px 22px; background: var(--surface);
  border-radius: var(--radius); color: var(--ink-2); font-size: 15.5px;
  display: flex; align-items: center; gap: 12px;
}
.stub-note svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }

/* ---------- 12. Admin (hidden page) ---------- */
.adm-wrap { max-width: 1120px; margin: 0 auto; padding: 40px 28px 90px; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.adm-head h1 { font-size: 24px; font-weight: 800; line-height: 1.15; }
.adm-card { background: var(--surface); border-radius: var(--radius); padding: 24px; margin-top: 22px; }
.adm-card h2 { font-size: 16.5px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.adm-hint { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.adm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg); border-radius: var(--pill);
  padding: 10px 22px; font-size: 14px; font-weight: 700;
  transition: opacity .2s ease;
}
.adm-btn:hover { opacity: .88; }
.adm-btn[disabled] { opacity: .4; cursor: default; }
.adm-btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong); }
.adm-btn.ghost:hover { color: var(--ink); border-color: var(--ink-3); }
.adm-input, .adm-area {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 11px 14px; font-size: 14px; outline: none;
}
.adm-input:focus, .adm-area:focus { border-color: var(--accent); }
.adm-area { min-height: 260px; resize: vertical; line-height: 1.7; font-size: 15.5px; }
.adm-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
/* 句子编辑器 + 首屏效果预览 */
.adm-sen-preview {
  position: relative; margin-bottom: 18px; border-radius: 14px; overflow: hidden;
  height: clamp(240px, 28vw, 340px);
  background: var(--ink) center / cover no-repeat;
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.adm-sen-preview::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 9, 10, .62) 0%, rgba(8, 9, 10, .3) 55%, rgba(8, 9, 10, .08) 100%);
}
.adm-sen-preview-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.adm-sen-preview-label { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.adm-sen-preview-lang { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: rgba(255, 255, 255, .82); }
.adm-sen-preview-link { margin-left: auto; color: rgba(255, 255, 255, .78); font-size: 11px; font-weight: 600; text-decoration: none; }
.adm-sen-preview-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.adm-sen-preview-copy { position: relative; z-index: 1; padding: 0 24px 22px; }
.adm-sen-preview-text {
  max-width: 820px; font-size: clamp(24px, 3.4vw, 40px); font-weight: 800;
  line-height: 1.06; letter-spacing: -.02em; white-space: pre-line;
  text-shadow: 0 1px 18px rgba(0, 0, 0, .25);
}
.adm-sen-preview-text.long { font-size: clamp(20px, 2.7vw, 32px); line-height: 1.12; }
.adm-sen-preview-text.xlong { font-size: clamp(16px, 2.1vw, 25px); line-height: 1.18; letter-spacing: -.012em; }
.adm-sen-preview-text.is-empty { opacity: .55; font-size: clamp(16px, 2vw, 24px); font-weight: 600; }
.adm-sen-preview-sub {
  margin-top: 12px; color: rgba(255, 255, 255, .85); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; line-height: 1.9; text-transform: uppercase; white-space: pre-line;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .3);
}

.adm-sen { display: grid; grid-template-columns: 1fr; gap: 22px; }
.adm-sen-lang { display: flex; flex-direction: column; gap: 8px; }
.adm-sen-head { display: flex; align-items: center; gap: 10px; }
.adm-sen-head label { font-size: 13px; font-weight: 700; }
.adm-sen-count { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.adm-sen-add { margin-left: auto; padding: 6px 12px; font-size: 12px; }
.adm-sen-list { display: flex; flex-direction: column; gap: 10px; }
.adm-sen-item {
  display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 10px; align-items: start;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  transition: border-color .15s ease;
}
.adm-sen-item.is-active { border-color: var(--accent); }
.adm-sen .adm-sen-item .adm-area { min-height: 96px; font-size: 14px; line-height: 1.6; resize: vertical; }
.adm-sen .adm-sen-item .adm-sen-sub { font-size: 13px; }
.adm-sen-del {
  align-self: start; border: 0; background: none; color: var(--neg);
  font-size: 12px; font-weight: 700; cursor: pointer; padding: 6px 2px;
}
.adm-sen-del:hover { text-decoration: underline; text-underline-offset: 3px; }
.adm-sen-empty { font-size: 13px; color: var(--ink-3); padding: 8px 2px; }
.adm-hero { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.adm-hero input { accent-color: var(--ink); width: 15px; height: 15px; }
.adm-msg { font-size: 13px; color: var(--ink-2); }
.adm-msg.err { color: var(--neg); }
.adm-msg.ok { color: var(--pos); }
.adm-login { max-width: 380px; margin: 8vh auto 0; }
.adm-login .adm-card { margin-top: 0; }
.adm-login h1 { font-size: 22px; font-weight: 800; line-height: 1.2; }
.adm-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 16px; }
.adm-item { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.adm-item .thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.adm-item .fields { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.adm-item .adm-input { font-size: 13px; padding: 8px 10px; }
.adm-item .ops { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.adm-del { font-size: 12px; font-weight: 700; color: var(--neg); }
.adm-meta { font-size: 12px; color: var(--ink-3); }
.adm-card .cv-grid { gap: 3px; }
.adm-card .pc { border-radius: 2px; }
.adm-drop {
  margin-top: 16px; border: 1.5px dashed var(--line-strong); border-radius: 12px;
  padding: 26px; text-align: center; color: var(--ink-2); font-size: 15.5px;
  cursor: pointer; transition: border-color .2s ease, background-color .2s ease;
}
.adm-drop:hover, .adm-drop.over { border-color: var(--ink-3); background: var(--bg); }
.adm-progress { height: 4px; border-radius: 2px; background: var(--line); margin-top: 12px; overflow: hidden; }
.adm-progress i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .25s ease; }

/* 后台分栏:左侧分区导航 + 右侧面板 */
.adm-shell { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; margin-top: 26px; align-items: start; }
.adm-nav { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 4px; }
.adm-tab {
  text-align: left; padding: 10px 14px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.adm-tab:hover { color: var(--ink); background: var(--surface); }
.adm-tab.active { color: var(--ink); background: var(--surface); font-weight: 700; }
.adm-panels .adm-card { margin-top: 0; }
.adm-acc { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.adm-ob-shared { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.adm-ob .blk { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.adm-ob .blk label { font-size: 13px; font-weight: 700; display: block; }
.adm-ob .adm-area { min-height: 150px; }
@media (max-width: 760px) {
  .adm-shell { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 18px; }
  .adm-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .adm-tab { white-space: nowrap; padding: 8px 12px; }
  .adm-ob-shared { grid-template-columns: minmax(0, 1fr); }
  .adm-sen-item { grid-template-columns: minmax(0, 1fr); }
  .adm-sen-del { justify-self: start; }
  .adm-sen-preview { height: 220px; }
}

/* ---------- 13. 刮刮乐 ---------- */
body.lot-lock { overflow: hidden; }
.lot-ov {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 10, 13, .78); padding: 16px;
  user-select: none; -webkit-user-select: none; /* 刮的时候别选中图案和数字 */
}
.lot-ov img { -webkit-user-drag: none; }
.lot-ov[hidden] { display: none; }
.lot-panel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lot-x {
  position: absolute; top: -42px; right: 0; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .08); cursor: pointer;
  transition: background-color .2s ease;
}
.lot-x:hover { background: rgba(255, 255, 255, .18); }
.lot-x svg { width: 17px; height: 17px; }
/* 还剩几张:和 ? × 同一排 */
.lot-count {
  position: absolute; top: -42px; right: 88px; height: 34px;
  display: inline-flex; align-items: center;
  color: rgba(255, 255, 255, .85); font-size: 12px; font-weight: 600;
  letter-spacing: .02em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.lot-h {
  position: absolute; top: -42px; right: 44px; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .08); cursor: pointer;
  transition: background-color .2s ease;
}
.lot-h:hover { background: rgba(255, 255, 255, .18); }
.lot-h svg { width: 17px; height: 17px; }
/* ? 气泡:玩法 + 概率(纸底浮层,和画布玩法气泡同一套语汇) */
.lot-h-pop {
  position: absolute; top: 0; right: 0; z-index: 6;
  width: min(310px, calc(92vw - 50px));
  max-height: min(72vh, 520px); overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-2); padding: 16px 18px; text-align: left;
}
.lot-h-pop[hidden] { display: none; }
.lot-h-pop h4 { font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.lot-h-pop h5 { margin-top: 12px; font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.lot-h-pop p { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.lot-odds { margin-top: 6px; list-style: none; padding: 0; }
.lot-odds li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lot-odds li + li { border-top: 1px solid var(--line); }
.lot-odds b { color: var(--ink); font-weight: 700; }

/* 票面 = 用户提供的 Lottery.png(两个银灰区是底纸,图案印在其上;涂层由 canvas 另盖) */
.lot-card {
  position: relative; container-type: inline-size;
  width: min(440px, 92vw);
  width: min(440px, 92vw, calc((100vh - 200px) * 0.75));
  width: min(440px, 92vw, calc((100dvh - 200px) * 0.75));
  aspect-ratio: 1086 / 1448;
  background: url('/res/lottery-card.webp') center / 100% 100% no-repeat;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
/* Lottery2.png 票面;服务端每张票随机 card:0/1 */
.lot-card[data-card="1"] { background: url('/res/lottery-card-2.webp') center / 100% 100% no-repeat; }
/* 两个刮区的百分比位置由 tools/process_lottery.py 在原图上量得 */
.lot-zone { position: absolute; overflow: hidden; border-radius: 10px; border-radius: 2.4cqw; }
.lot-z-t { left: 64.92%; top: 20.44%; width: 28.18%; height: 14.99%; }
.lot-z-g { left: 9.85%; top: 36.95%; width: 82.78%; height: 51.72%; }
.lot-cv {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: crosshair;
  transition: opacity .45s ease;
}
.lot-cv.off { opacity: 0; pointer-events: none; }

.lot-tgt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.lot-tgt img { max-width: 78px; max-height: 48px; max-width: 21cqw; max-height: 11cqw; }

.lot-grid {
  position: absolute; inset: 0; padding: 3%;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 3%;
}
.lot-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; border-radius: 8px;
}
.lot-cell img { max-width: 92%; max-height: 48px; max-height: 11cqw; }
.lot-cell b {
  font-size: 13px; font-size: 3.1cqw; font-weight: 800;
  color: #383838; font-variant-numeric: tabular-nums;
}
.lot-grid.revealed .lot-cell.on { box-shadow: inset 0 0 0 2px rgba(16, 41, 87, .55); }

.lot-start {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; gap: 4cqw; padding: 8%; text-align: center;
  background: rgba(8, 21, 45, .55);
}
.lot-start[hidden] { display: none; }
.lot-left { color: rgba(255, 255, 255, .88); font-size: 13px; font-size: 2.9cqw; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.lot-big {
  border: 0; background: #fff; color: #102957; border-radius: 10px;
  padding: 13px 36px; padding: 2.9cqw 8cqw;
  font-size: 15px; font-size: 3.4cqw; font-weight: 700; letter-spacing: .02em;
  cursor: pointer; transition: transform .15s ease, opacity .2s ease;
}
.lot-big:hover { transform: translateY(-1px); }
.lot-big:active { transform: scale(.98); }
.lot-big:disabled { opacity: .55; cursor: default; transform: none; }

.lot-bar { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lot-msg { color: rgba(255, 255, 255, .78); font-size: 13px; line-height: 1.45; font-variant-numeric: tabular-nums; min-height: 19px; text-align: center; max-width: 440px; }
.lot-msg.win { color: #fff; font-weight: 700; }
.lot-actions { display: flex; gap: 10px; }
.lot-mini {
  border: 1px solid rgba(255, 255, 255, .38); color: #fff; background: none;
  border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color .2s ease;
}
.lot-mini:hover { background: rgba(255, 255, 255, .12); }
.lot-mini:disabled { opacity: .45; cursor: default; }
.lot-primary { background: #fff; color: #102957; border-color: #fff; }
.lot-primary:hover { background: rgba(255, 255, 255, .88); }
.lot-primary:disabled { background: none; color: rgba(255, 255, 255, .5); border-color: rgba(255, 255, 255, .3); }

/* ---------- 14. Responsive ---------- */
@media (max-width: 1279px) {
  /* 中小屏:缩略图模式下用固定的 14px 格(展开后横向滑动),绝不压缩变形 */
  .cv-grid { grid-template-columns: repeat(48, 14px); gap: 3px; }
}

@media (max-width: 1200px) {
  /* 相册改为整行铺满的分页布局,不再使用多列瀑布流 */
}

@media (max-width: 1024px) {
  .tb-inner { height: 56px; }
  .hero { height: clamp(360px, 52vw, 520px); }
  .hero-copy { max-width: min(560px, 60vw); }
  .ob-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .tb-inner {
    height: auto; padding: 12px 12px 10px; gap: 8px 10px;
    grid-template-columns: auto 1fr; grid-template-areas: "brand right" "nav nav";
  }
  .tb-left { display: contents; }
  .brand { grid-area: brand; font-size: 19px; }
  .tb-right { grid-area: right; gap: 8px; min-width: 0; }
  .mainnav { grid-area: nav; justify-self: start; gap: 2px; margin-left: -10px; }
  .nav-link { padding: 6px 10px; font-size: 14px; }
  .tb-sep { display: none; }
  .fx { flex-direction: row; align-items: center; gap: 0; }
  .fx-trigger { gap: 1px; padding: 2px 0; }
  .fx-pair { font-size: 9px; gap: 3.5px; }
  .fx-pair .fx-arrow { width: 8px; height: 8px; }
  .fx-trigger .fx-num { font-size: 13px; }
  .fx-trigger-rate { gap: 2px; }
  .fx-chev { width: 6px; height: 6px; }
  .fx-base { margin: 0; font-size: 10px; padding: 2px 6px; gap: 4px; }

  /* 展开面板在手机上贴顶栏下方,左右留 12px,内部可滚动 */
  .fx-panel {
    position: fixed; top: 104px; left: 12px; right: 12px;
    width: auto; padding: 14px; border-radius: 12px;
  }
  .fx-panel-main { gap: 10px; }
  .fx-panel .fx-num { font-size: 20px; }
  .fx-panel .fx-spark { width: 96px; height: 28px; }
  .fx-panel-meta { font-size: 8.5px; gap: 2px 6px; }

  .langs { font-size: 11px; gap: 4px; }

  .hero { height: clamp(340px, 78vw, 460px); }
  .hero-copy { left: 20px; right: 20px; max-width: none; transform: translateY(-58%); gap: 14px; }
  /* 长句子在手机上降字号,保证整块能放进首屏(否则长句会被首屏上下裁掉) */
  .hero-sentence { font-size: clamp(28px, 8.2vw, 34px); }
  .hero-sentence.long { font-size: clamp(23px, 6.4vw, 30px); }
  .hero-sentence.xlong { font-size: clamp(18px, 5vw, 23px); }
  .hero-sub { font-size: 11px; letter-spacing: .12em; line-height: 1.9; }
  .hero-cap { left: 20px; right: 20px; text-align: left; bottom: 14px; }

  .searchzone { padding: 34px 16px 4px; }
  .searchbar { height: auto; padding: 10px 10px 10px 18px; flex-wrap: wrap; gap: 8px; border-radius: 12px; }
  .searchbar input { flex-basis: 140px; height: 44px; font-size: 15.5px; }
  .sb-right { width: 100%; justify-content: space-between; }
  .btn-search { flex: 1; height: 46px; }

  .canvassec { padding: 38px 0 56px; }
  .canvas-wrap { padding: 0 16px; }

  .ft-inner { gap: 12px; text-align: left; }

  .page-head { padding-top: 34px; padding-bottom: 8px; scroll-margin-top: 104px; }
  .album-grid { padding: 0 16px; }
  .album-pager { padding: 0 16px; margin-top: 24px; }

  .ob-hero .ob-title { padding: 0 20px 24px; }
  .ob-body { padding: 30px 0 64px; }
  .ob-grid { padding: 0 16px; }
}

@media (max-width: 420px) {
  /* 相册的整行布局在 420px 以下保持同样的分页逻辑 */
}
