/* =========================================================
   Glasden的CDK站 · 胶囊池
   骨白纸面 + 墨黑排版 + 一种强调色（荧光笔黄）；颜色只属于胶囊。
   换强调色只改 --accent 一处，WebGL 里的光也读这个变量。
   ========================================================= */
@font-face { font-family: "Archivo"; src: url("/assets/vendor/fonts/archivo-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/vendor/fonts/geist-mono-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --accent: #e4ff54;
  --accent-ink: #0e0e10;
  --paper: #ecebe6;
  --ink: #0e0e10;
  --room: #0e0f12;
  --bone: #f1f0eb;
  --danger: #d9482f;

  --bg: var(--paper);
  --fg: var(--ink);
  --fg-2: #4b4c52;
  --fg-3: #85868c;
  --line: rgba(14, 14, 16, .15);
  --surface: rgba(14, 14, 16, .055);
  --card: rgba(255, 255, 255, .5);
  --warn-fg: var(--danger);

  --r-win: clamp(20px, 2.4vw, 34px);
  --pad: clamp(18px, 4vw, 56px);
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
:root[data-theme="room"] {
  --bg: var(--room);
  --fg: var(--bone);
  --fg-2: rgba(241, 240, 235, .68);
  --fg-3: rgba(241, 240, 235, .42);
  --line: rgba(241, 240, 235, .17);
  --surface: rgba(241, 240, 235, .075);
  --card: rgba(241, 240, 235, .075);
  --warn-fg: #ff9a84;
  color-scheme: dark;
}

/* ---------------- 基础 ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; transition: background-color .5s var(--ease); }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, pre { margin: 0; }
h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cap { font: 500 11px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); }
.plus { flex: none; width: 11px; height: 11px; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; }
main { flex: 1; position: relative; z-index: 1; }

/* ---------------- 胶囊形控件 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--fg); font: 500 14px/1 var(--sans); white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease);
}
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover, .btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.accent:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.ghost { border-color: transparent; }
.btn.danger { color: var(--warn-fg); }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 58px; padding: 0 30px; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.is-busy { opacity: .8; cursor: progress; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
/* 悬停时文字向上滚一格（标签写在 data-t 上） */
.roll { position: relative; display: inline-block; overflow: hidden; line-height: 1.3; }
.roll > span, .roll::after { display: block; transition: transform .45s var(--ease); }
.roll::after { content: attr(data-t); position: absolute; left: 0; top: 100%; }
a:hover .roll > span, button:hover:not(:disabled) .roll > span, a:hover .roll::after, button:hover:not(:disabled) .roll::after { transform: translateY(-100%); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); font: 500 12px/1 var(--sans); color: var(--fg-2); white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip span { font-variant-numeric: tabular-nums; margin: 0 -2px; }
.chip.live, .chip.jade { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip.live .dot { animation: pulse 1.6s ease-in-out infinite; }
.chip.solid, .chip.red { background: var(--fg); color: var(--bg); border-color: transparent; }
.chip.gold { border-color: var(--fg); color: var(--fg); }
.chip.warn { border-color: color-mix(in srgb, var(--warn-fg) 48%, transparent); color: var(--warn-fg); background: color-mix(in srgb, var(--warn-fg) 10%, transparent); }
.chip.ldc { border-color: var(--fg); color: var(--fg); background: var(--surface); font-variant-numeric: tabular-nums; }
:root[data-theme="room"] .chip.ldc { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); background: rgba(14, 15, 18, .35); }
.chip.dim { color: var(--fg-3); }

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--card); font-size: 15px; line-height: 1.55;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.notice .ico { flex: none; font-size: 17px; line-height: 1.4; }
.notice.warn, .notice.red { color: var(--warn-fg); }
.notice small { display: block; margin-top: 4px; color: var(--fg-3); font-size: 13px; }

.empty { padding: clamp(40px, 8vw, 88px) 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-win); color: var(--fg-2); }
.empty .big { font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; color: var(--fg); margin-bottom: 8px; }
.empty .btn { margin-top: 20px; }
.skeleton { border-radius: var(--r-win); background: linear-gradient(100deg, var(--surface) 40%, rgba(127, 127, 127, .16) 50%, var(--surface) 60%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }

.toasts { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: 0 16px 40px rgba(0, 0, 0, .22); animation: toast-in .4s var(--ease); transition: opacity .2s, transform .2s; }
.toast.err { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------------- 顶栏 ---------------- */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--pad); pointer-events: none; transition: opacity .5s var(--ease); }
.top > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 12px; margin-left: -12px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: .02em; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.brand i { width: 28px; height: 13px; border-radius: 999px; transform: rotate(-32deg); background: linear-gradient(90deg, var(--fg) 50%, var(--accent) 50%); box-shadow: 0 0 0 1px var(--line); transition: transform .6s var(--ease-spring); }
.brand:hover i { transform: rotate(148deg); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link, .user-chip {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font: 500 14px/1 var(--sans); color: var(--fg); text-decoration: none; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s;
}
.nav-link:hover, .nav-link[aria-current="page"], .user-chip:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.nav .btn { height: 40px; }
.user-menu { position: relative; }
.user-chip { gap: 8px; padding: 0 14px 0 5px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.initial { display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.user-chip .name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 8px; border-radius: 22px; background: var(--fg); color: var(--bg); box-shadow: 0 24px 60px rgba(0, 0, 0, .28); display: grid; gap: 2px; transform-origin: 90% 0; animation: pop .3s var(--ease); }
.dropdown .who { display: grid; gap: 3px; padding: 10px 12px 12px; font: 12px/1.4 var(--mono); opacity: .9; }
.dropdown .who strong { font: 600 15px/1.3 var(--sans); }
.dropdown a, .dropdown button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: none; color: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: rgba(127, 127, 127, .28); }

/* ---------------- 首页 ---------------- */
.wrap { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--pad); }
.hero { display: grid; gap: clamp(18px, 3vw, 40px); padding: clamp(28px, 7vh, 90px) 0 clamp(28px, 5vw, 64px); }
.marks { display: flex; align-items: center; gap: 14px; }
.marks .rule { flex: 1; height: 1px; background: var(--line); }
.display { font-size: clamp(46px, 10.6vw, 172px); line-height: 1; font-weight: 800; letter-spacing: -.035em; }
.display .line { display: block; overflow: hidden; padding: .06em 0 .1em; margin: -.06em 0 -.1em; }
.display .line > span { display: inline-block; transform: translateY(112%); animation: rise 1s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
.display mark { position: relative; z-index: 0; background: none; color: inherit; white-space: nowrap; }
.display mark::before { content: ""; position: absolute; z-index: -1; inset: .16em -.06em .04em; border-radius: .16em; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; animation: swipe .8s var(--ease-io) .75s forwards; }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero-foot p { max-width: 34em; color: var(--fg-2); font-size: clamp(15px, 1.25vw, 18px); }
.tally { display: flex; gap: clamp(18px, 3vw, 44px); }
.tally div { display: grid; gap: 2px; }
.tally b { font: 900 clamp(34px, 4.4vw, 64px)/.9 var(--sans); font-stretch: 62%; font-variant-numeric: tabular-nums; }

.sec { display: flex; align-items: center; gap: 12px; margin: clamp(36px, 6vw, 84px) 0 16px; }
.sec:first-child { margin-top: 0; }
.sec h2 { font: 500 12px/1 var(--mono); letter-spacing: .1em; color: var(--fg); }
.sec .n { font: 500 12px/1 var(--mono); color: var(--fg-3); }
.sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.windows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.5vw, 22px); }
.card { display: grid; gap: 14px; align-content: start; min-width: 0; color: inherit; text-decoration: none; }
.card.feature, .card:only-child { grid-column: 1 / -1; }
.win {
  position: relative; display: block; overflow: hidden; isolation: isolate; aspect-ratio: 4 / 3;
  border-radius: var(--r-win); background: var(--room); color: var(--bone);
  transition: transform .7s var(--ease);
}
.card.feature .win, .card:only-child .win { aspect-ratio: 16 / 7.4; }
a.card:hover .win { transform: scale(.99); }
.card-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: clamp(12px, 1.6vw, 22px); padding: 0 6px 6px; }
.card-foot h3 { font-size: clamp(18px, 1.75vw, 28px); font-weight: 700; text-wrap: balance; }
.card.feature .card-foot h3 { font-size: clamp(20px, 2.4vw, 38px); }
.win canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s var(--ease); touch-action: pan-y; }
.win.is-live canvas { opacity: 1; }
.win-num { position: absolute; left: 0; right: 0; top: 6%; text-align: center; font: 900 clamp(120px, 26vw, 420px)/.8 var(--sans); font-stretch: 62%; color: rgba(241, 240, 235, .08); pointer-events: none; transition: opacity .6s; }
.win.is-3d .win-num { opacity: 0; }
.win-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(14px, 1.8vw, 26px); pointer-events: none; }
.win-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.win-top .cap { margin-left: auto; color: rgba(241, 240, 235, .6); }
.win .chip { border-color: rgba(241, 240, 235, .26); color: var(--bone); background: rgba(14, 15, 18, .35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.win .chip.live { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.win .chip.ldc { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); background: rgba(14, 15, 18, .45); }
.win .chip.dim { color: rgba(241, 240, 235, .6); }
.go { flex: none; display: grid; place-items: center; width: clamp(42px, 3.6vw, 56px); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); font-size: 19px; transition: background-color .3s, color .3s, border-color .3s, transform .5s var(--ease-spring); }
a.card:hover .go { background: var(--fg); color: var(--bg); border-color: var(--fg); transform: rotate(-45deg); }

.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 8ch minmax(0, 1fr) auto 20px; gap: clamp(12px, 2vw, 28px); align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--fg-2); transition: color .25s, padding .35s var(--ease), background-color .25s; }
.row:hover { color: var(--fg); padding-left: 14px; padding-right: 14px; background: var(--surface); }
.row b { font: 500 13px var(--mono); font-variant-numeric: tabular-nums; }
.row .row-title { font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .arrow { transition: transform .35s var(--ease); }
.row:hover .arrow { transform: translateX(4px); }

.foot { position: relative; z-index: 1; padding: clamp(48px, 9vw, 130px) var(--pad) 22px; transition: opacity .4s; }
.foot-big { font-size: clamp(56px, 15.5vw, 260px); line-height: .95; font-weight: 800; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--line); white-space: nowrap; user-select: none; }
.foot-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
:root[data-theme="room"] .foot { display: none; }

/* ---------------- 活动页：走进视窗里面 ---------------- */
.room { position: fixed; inset: 0; z-index: 0; background: var(--room); opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s .7s; }
:root[data-theme="room"] .room { opacity: 1; visibility: visible; transition-delay: 0s; }
.room canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.room::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 22% 18%, rgba(8, 9, 11, .5), transparent 62%); pointer-events: none; }
.cover { position: fixed; z-index: 90; background: var(--room); pointer-events: none; }

.camp { display: grid; align-content: start; gap: clamp(22px, 4.4vh, 46px); min-height: calc(100svh - 70px); padding: clamp(10px, 3vh, 36px) var(--pad) 44vh; transition: opacity .5s var(--ease), transform .7s var(--ease); }
.camp > * { max-width: min(700px, 100%); }
.back { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); letter-spacing: .06em; color: var(--fg-2); text-decoration: none; }
.back:hover { color: var(--fg); }
.camp-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.camp-title { font-size: clamp(26px, 3.6vw, 52px); font-weight: 700; text-wrap: balance; }
.camp-desc { margin-top: 14px; color: var(--fg-2); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 46em; }
.q-wrap { display: grid; gap: 12px; }
.q { font-weight: 700; letter-spacing: -.02em; line-height: 1.12; white-space: pre-wrap; overflow-wrap: anywhere; font-size: clamp(34px, 6.4vw, 96px); max-width: none; }
.q.m { font-size: clamp(26px, 4.2vw, 60px); }
.q.l { font-size: clamp(19px, 2.2vw, 30px); line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.camp:has(.q) > .q-wrap { max-width: min(1100px, 100%); }

.claim { display: grid; gap: 12px; }
.claim-row { display: flex; gap: 10px; align-items: center; }
.claim.is-direct .claim-row { justify-content: flex-start; }
.field-pill, .code-pill {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; height: 68px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(241, 240, 235, .08);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  transition: border-color .25s, background-color .25s;
}
.field-pill:focus-within, .code-pill:focus-within { border-color: var(--accent); background: rgba(241, 240, 235, .12); }
.field-pill input { flex: 1; min-width: 0; height: 100%; padding: 0 26px; border: 0; outline: 0; background: none; font-size: 20px; font-weight: 500; }
.field-pill input::placeholder { color: var(--fg-3); }
.code-pill { flex: none; gap: 6px; padding: 0 8px; }
.seg4 { display: grid; grid-template-columns: repeat(4, 1ch); gap: .3em; align-items: center; height: 52px; padding: 0 17px; border-radius: 999px; background: rgba(241, 240, 235, .07); font: 500 22px/1 var(--mono); transition: background-color .3s, color .3s; }
.seg4 b { position: relative; display: block; height: 1.3em; line-height: 1.3; text-align: center; font-weight: 500; }
.seg4 b:empty::before { content: "·"; color: var(--fg-3); }
.seg4.on { background: var(--accent); color: var(--accent-ink); animation: click .4s var(--ease-spring); }
.code-pill.all .seg4, .code-pill.all .seg4.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--accent); }
.code-pill.all .seg4 b.cur::after { display: none; }
.code-pill:focus-within .seg4 b.cur::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -3px; height: 2px; border-radius: 2px; background: var(--accent); animation: blink 1s steps(2, jump-none) infinite; }
.code-pill input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; cursor: text; }
.claim .btn.lg { height: 68px; padding: 0 34px; font-size: 17px; font-weight: 600; }
.msg { min-height: 1.5em; padding: 0 6px; font-size: 14px; color: var(--warn-fg); }
.msg.ok { color: var(--accent); }
.msg.faint { color: var(--fg-3); }
.shake { animation: shake .45s var(--ease); }

.count { display: flex; align-items: flex-start; gap: clamp(8px, 1.6vw, 22px); }
.count > div { display: grid; justify-items: center; gap: 8px; }
.count b { font: 900 clamp(64px, 12.5vw, 176px)/.82 var(--sans); font-stretch: 62%; font-variant-numeric: tabular-nums; }
.count .sep { font: 900 clamp(48px, 9vw, 120px)/.9 var(--sans); font-stretch: 62%; color: var(--fg-3); }

.prize { display: grid; gap: 14px; padding: clamp(18px, 2.4vw, 28px); border-radius: 30px; border: 1px solid var(--line); background: var(--card); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.prize-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.prize-head .chip { margin-left: auto; }
.code { font: 500 clamp(17px, 2.3vw, 28px)/1.4 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 38vh; overflow: auto; color: var(--accent); }
:root:not([data-theme="room"]) .code { color: var(--fg); }
.code a { color: inherit; }
.prize-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.ldc-amount { font: 800 clamp(30px, 4.4vw, 52px)/1.05 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--accent); }
:root:not([data-theme="room"]) .ldc-amount { color: var(--fg); }
.ldc-amount.sm { font-size: clamp(18px, 1.8vw, 24px); line-height: 1.15; }
.ldc-meta { display: grid; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.ldc-meta.sm { font-size: 13px; }
.ldc-meta.reveal-meta { justify-items: center; max-width: 44em; color: rgba(241, 240, 235, .78); animation: fade-up .8s var(--ease) .35s both; }
.ldc-err { color: var(--warn-fg); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.ldc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ldc-actions.row-actions { gap: 6px; }

/* 小胶囊图标：合着的 / 打开的 */
.pill { flex: none; display: inline-flex; gap: 0; width: 36px; height: 16px; transform: rotate(-28deg); }
.pill::before, .pill::after { content: ""; flex: 1; }
.pill::before { border-radius: 999px 0 0 999px; background: var(--c, #8fa3b8); }
.pill::after { border-radius: 0 999px 999px 0; background: rgba(255, 255, 255, .78); box-shadow: inset 0 0 0 1px var(--line); }
.pill.open { gap: 7px; width: 43px; }
.pill.open::before { border-radius: 999px 3px 3px 999px; }
.pill.open::after { border-radius: 3px 999px 999px 3px; background: var(--accent); box-shadow: none; }

/* 揭晓 */
.revealing .camp, .revealing .top { opacity: 0; pointer-events: none; }
.revealing .camp { transform: translateY(14px); }
.reveal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 34vh var(--pad) 8vh; color: var(--bone); overflow: auto; }
.reveal-card { display: grid; justify-items: center; gap: clamp(14px, 2.4vh, 24px); width: min(880px, 100%); text-align: center; }
.reveal-card .cap { color: rgba(241, 240, 235, .6); animation: fade-up .8s var(--ease) both; }
.reveal-code { font: 500 clamp(22px, 4.6vw, 62px)/1.25 var(--mono); color: var(--accent); white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 0 0 40px color-mix(in srgb, var(--accent) 45%, transparent); }
.reveal-code.long { font-size: clamp(15px, 1.8vw, 22px); text-align: left; max-height: 34vh; overflow: auto; text-shadow: none; }
.reveal-code span { display: inline-block; white-space: pre; animation: glyph .7s var(--ease) both; animation-delay: calc(var(--i) * 28ms + 120ms); }
.reveal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; animation: fade-up .8s var(--ease) .5s both; }
.reveal-card .faint { font-size: 13px; color: rgba(241, 240, 235, .45); animation: fade-up .8s var(--ease) .65s both; }
.reveal .btn { color: var(--bone); border-color: rgba(241, 240, 235, .3); }
.reveal .btn:hover { background: var(--bone); color: var(--room); }
.reveal .btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------------- 我的奖品 ---------------- */
.mine-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: clamp(24px, 6vh, 72px) 0 clamp(20px, 3vw, 40px); }
.display.sm { font-size: clamp(40px, 7.4vw, 120px); }
.win.shelf { aspect-ratio: 16 / 5.4; margin-bottom: clamp(18px, 2.4vw, 34px); }
.tickets { display: grid; gap: 10px; }
.ticket { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: clamp(12px, 2vw, 26px); align-items: center; padding: 18px clamp(16px, 2vw, 26px); border-radius: 26px; background: var(--card); border: 1px solid var(--line); }
.ticket-title { display: block; font-weight: 700; font-size: 17px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-title:hover { text-decoration: underline; }
.ticket .code { font-size: 15px; max-height: 7.2em; padding: 10px 14px; border-radius: 14px; background: var(--surface); }
.ticket-ldc { display: grid; gap: 6px; min-width: 0; padding: 10px 14px; border-radius: 14px; background: var(--surface); }
.ticket-ldc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------------- 进场 ---------------- */
.page-enter { animation: fade-up .7s var(--ease) both; }
.rise { animation: fade-up .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms + 120ms); }
@keyframes rise { to { transform: none; } }
@keyframes swipe { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes glyph { from { opacity: 0; transform: translateY(.5em); filter: blur(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes pulse { 50% { opacity: .25; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes click { 0% { transform: scale(.9); } 100% { transform: none; } }
@keyframes shake { 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

/* ---------------- 后台（同一套纸面，不上 3D） ---------------- */
.admin { max-width: 1180px; margin: 0 auto; padding: 8px var(--pad) 80px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 22px; }
.admin-bar h1, .admin h1 { font-size: clamp(24px, 2.6vw, 34px); }
.panel { padding: clamp(18px, 2.2vw, 26px); border-radius: 26px; background: var(--card); border: 1px solid var(--line); }
.panel h3 { font-size: 17px; margin-bottom: 14px; }
.gate { display: grid; justify-items: center; gap: 14px; padding: clamp(36px, 7vw, 72px) 24px; text-align: center; }
.gate p { color: var(--fg-2); }
.table-wrap { overflow: auto; border-radius: 22px; border: 1px solid var(--line); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 13px 16px; text-align: left; font: 500 11px/1.2 var(--mono); letter-spacing: .08em; color: var(--fg-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface); }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.wrap-text { max-width: 380px; word-break: break-all; }
.row-title { font-weight: 700; text-decoration: none; }
.row-title:hover { text-decoration: underline; }
.tabs { display: inline-flex; max-width: 100%; overflow: auto; gap: 2px; padding: 4px; margin: 18px 0; border-radius: 999px; background: var(--surface); }
.tabs a { padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--fg-2); text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.stat { display: grid; gap: 6px; padding: 16px 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.stat.warn { border-color: color-mix(in srgb, var(--warn-fg) 48%, transparent); }
.stat .k { font: 500 11px/1.2 var(--mono); letter-spacing: .08em; color: var(--fg-3); }
.stat .v { font: 900 40px/.9 var(--sans); font-stretch: 62%; font-variant-numeric: tabular-nums; }
.stat .v.sm { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.05; }
.stat.warn .v { color: var(--warn-fg); }
.stat .s { font: 500 12px/1.35 var(--mono); color: var(--fg-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .field .label, .label { font-size: 13px; font-weight: 600; }
.field .hint, .hint { font-size: 12px; color: var(--fg-3); }
.input, .textarea, .select { width: 100%; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .55); outline: 0; transition: border-color .2s, box-shadow .2s; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--fg); box-shadow: 0 0 0 3px var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.textarea.mono, .input.mono { font-family: var(--mono); font-size: 13px; }
.seg { display: inline-flex; justify-self: start; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); }
.seg label { position: relative; padding: 8px 18px; border-radius: 999px; font-size: 14px; cursor: pointer; transition: background-color .2s, color .2s; }
.seg.compact label { padding: 4px 11px; font-size: 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--fg); color: var(--bg); }
.seg label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 2px; }
.preset-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.preset-btn { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg-2); font: 500 12px/1 var(--sans); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.preset-btn:hover:not(:disabled) { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.preset-btn:disabled { opacity: .45; cursor: not-allowed; }
.ldc-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.ldc-panel .span-2 { grid-column: span 2; }
.ldc-preview { padding: 11px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font: 500 13px/1.5 var(--mono); color: var(--fg-2); }
.ldc-preview.warn { color: var(--warn-fg); border-color: color-mix(in srgb, var(--warn-fg) 42%, transparent); }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.admin-banner { margin-bottom: 16px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips-row.detail-chips { margin-bottom: 14px; }
.sub-meta { font-size: 12px; line-height: 1.4; margin-top: 2px; }
.ldc-cell { font-weight: 700; white-space: nowrap; }
.del-wrap { display: inline-flex; }
.del-note { margin-top: -10px; margin-bottom: 14px; font-size: 12px; color: var(--fg-3); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.grow { flex: 1; }
.split { display: grid; gap: 18px; grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
.link-box { display: flex; gap: 8px; align-items: center; min-width: 0; padding: 6px 6px 6px 16px; border-radius: 999px; border: 1px dashed var(--line); font: 13px var(--mono); overflow: hidden; }
.link-box > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 窄屏 ---------------- */
@media (max-width: 760px) {
  .windows { grid-template-columns: 1fr; }
  .win, .card.feature .win, .card:only-child .win { aspect-ratio: 4 / 4.2; }
  .card-foot { grid-template-columns: minmax(0, 1fr) auto; }
  .card-foot .cap { grid-column: 1; grid-row: 2; margin-top: -8px; }
  .card-foot .go { grid-row: 1 / 3; grid-column: 2; }
  .win.shelf { aspect-ratio: 4 / 2.6; }
  .nav-link.opt { display: none; }
  .user-chip .name { display: none; }
  .user-chip { padding: 0 5px; }
  .row { grid-template-columns: 7ch minmax(0, 1fr) 16px; }
  .row .cap { display: none; }
  .claim-row { flex-direction: column; align-items: stretch; }
  .field-pill, .code-pill { flex: none; }      /* 竖排时 flex: 1 的基准是 0，高度会塌成输入框一行字高 */
  .field-pill { height: 62px; }
  .code-pill { justify-content: space-between; height: 62px; padding: 0 6px; gap: 4px; }
  .seg4 { height: 48px; padding: 0 11px; font-size: 17px; gap: .22em; }
  .claim .btn.lg { height: 60px; }
  .camp { padding-bottom: 40vh; }
  .ticket { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .ticket .code, .ticket .ticket-ldc { grid-column: 1 / -1; grid-row: 2; }
  .ticket .ldc-actions { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; }
  .form-grid, .split, .ldc-panel { grid-template-columns: 1fr; }
  .form-grid .span-2, .ldc-panel .span-2 { grid-column: auto; }
  .reveal { padding-top: 38vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
