/* =========================================================
   拾光画廊 · 设计系统
   暖纸 / 墨色 / 朱砂 / 青绿
   ========================================================= */

:root {
  --bg: #f5efe4;
  --bg-deep: #ece3d4;
  --surface: #fffdf8;
  --surface-2: #f0e8da;
  --surface-3: #e8ddcb;
  --ink: #211d17;
  --ink-soft: #4e473d;
  --muted: #7d7365;
  --muted-2: #a49989;
  --line: rgba(33, 29, 23, 0.12);
  --line-strong: rgba(33, 29, 23, 0.22);
  --accent: #d3542e;
  --accent-deep: #b23e1d;
  --accent-soft: rgba(211, 84, 46, 0.12);
  --teal: #1f6f68;
  --teal-soft: rgba(31, 111, 104, 0.12);
  --gold: #b8893f;
  --danger: #b23a2b;
  --shadow-sm: 0 4px 16px rgba(56, 43, 25, 0.08);
  --shadow-md: 0 18px 50px rgba(56, 43, 25, 0.13);
  --shadow-lg: 0 34px 90px rgba(56, 43, 25, 0.2);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #131210;
  --bg-deep: #0d0c0b;
  --surface: #1c1a16;
  --surface-2: #24211c;
  --surface-3: #2d2922;
  --ink: #f4eddf;
  --ink-soft: #d4cabb;
  --muted: #a79b89;
  --muted-2: #7f7567;
  --line: rgba(255, 248, 235, 0.1);
  --line-strong: rgba(255, 248, 235, 0.2);
  --accent: #ff7a52;
  --accent-deep: #ff9677;
  --accent-soft: rgba(255, 122, 82, 0.14);
  --teal: #64c9be;
  --teal-soft: rgba(100, 201, 190, 0.13);
  --gold: #e0b25c;
  --danger: #ff6f5e;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 34px 90px rgba(0, 0, 0, 0.48);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* 始终为竖向滚动条预留槽位，避免页面长短切换时内容左右跳动 */
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

:focus:not(:focus-visible) {
  outline: none;
}

@media (hover: none) and (pointer: coarse) {
  button:focus,
  a:focus,
  input:focus,
  select:focus,
  textarea:focus,
  [role="button"]:focus {
    outline: none;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.dialog-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(211, 84, 46, 0.08), transparent 32rem),
    radial-gradient(circle at 88% 18%, rgba(31, 111, 104, 0.07), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(184, 137, 63, 0.06), transparent 36rem);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(var(--line) 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
}

[data-theme="dark"] body::after {
  opacity: 0.28;
}

::selection {
  background: var(--accent);
  color: #fff;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

[hidden] {
  display: none !important;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 0;
}

::view-transition-new(root) {
  z-index: 1;
}

html.ticket-to-home::view-transition-old(root) {
  animation: ticketOldOut 0.62s cubic-bezier(0.4, 0, 0.6, 1) both;
}

html.ticket-to-home::view-transition-new(root) {
  animation: ticketHomeIn 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ticketOldOut {
  from {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: scale(0.965);
    filter: blur(5px);
  }
}

@keyframes ticketHomeIn {
  from {
    opacity: 0;
    transform: scale(1.025);
    filter: blur(6px);
  }
  55% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* =========================================================
   顶栏
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  background: var(--bg);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

@supports (background: color-mix(in srgb, white 50%, transparent)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
  }
}

.header-inner {
  width: min(1240px, calc(100% - 56px));
  height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--accent);
  transition: transform 0.6s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(45deg);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.main-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.main-nav .rubber-segment {
  width: 252px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-1px);
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* =========================================================
   通用布局 / 按钮 / 标签
   ========================================================= */

.view {
  position: relative;
  isolation: isolate;
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
  padding-bottom: 90px;
  animation: viewIn 0.55s var(--ease) both;
}

#view-discover {
  position: relative;
  isolation: isolate;
}

.falling-petals {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow > span {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
}

.section {
  margin-top: 58px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-top: 7px;
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading.compact {
  margin-bottom: 18px;
}

.section-note {
  max-width: 280px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s var(--ease),
    box-shadow 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff8f2;
  box-shadow: 0 10px 24px rgba(211, 84, 46, 0.24);
}

.btn-primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 14px 32px rgba(211, 84, 46, 0.3);
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn-soft {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}

.btn-soft:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(0.94);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
}

.btn-wide {
  width: 100%;
}

.btn-icon-only {
  width: 44px;
  padding: 0;
}

.btn.is-loading .icon {
  animation: spin 0.9s linear infinite;
}

.btn.is-loading {
  pointer-events: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tag-accent {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.tag-gold {
  border-color: rgba(224, 178, 92, 0.35);
  background: rgba(224, 178, 92, 0.16);
  color: #f4d79e;
}

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-height: 0;
  padding: 54px 0 36px;
  text-align: center;
}

.hero-copy {
  flex: none;
  width: 100%;
  max-width: 900px;
  min-width: 0;
  animation: rise 0.8s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(48px, 6.2vw, 84px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-lead {
  max-width: 540px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.hero-actions .btn {
  min-height: 50px;
  padding: 0 24px;
  font-size: 14px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.hero-meta strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.hero-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.hero-art {
  position: relative;
  flex: none;
  width: 900px;
  max-width: 100%;
  height: 360px;
  margin: 0 auto;
  pointer-events: auto;
  animation: rise 0.9s 0.1s var(--ease) both;
}

.hero-orbit {
  display: none;
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px dashed var(--line);
  border-radius: 50%;
}

.hero-orbit::after {
  inset: 86px;
  border-style: solid;
  opacity: 0.55;
}

.hero-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 140px;
  height: 196px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: transform 0.6s var(--ease);
}

.hero-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, transparent 35%, rgba(211, 84, 46, 0.06));
}

.hero-card-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 0.8s var(--ease);
}

.hero-card-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 7, 6, 0.06) 0%, rgba(8, 7, 6, 0.22) 42%, rgba(8, 7, 6, 0.82) 100%);
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-card.has-cover .hero-card-cover,
.hero-card.has-cover .hero-card-shade {
  opacity: 1;
}

.hero-card.has-cover {
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.hero-card.has-cover .hero-card-num {
  color: rgba(255, 255, 255, 0.58);
}

.hero-card.has-cover .icon {
  color: #fff;
}

.hero-card.has-cover:hover .hero-card-cover {
  transform: scale(1.07);
}

.hero-card > .hero-card-num,
.hero-card > .hero-card-name,
.hero-card > .icon {
  z-index: 2;
}

.hero-card-num {
  position: relative;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.hero-card-name {
  position: relative;
  margin-top: auto;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 19px;
}

.hero-card .icon {
  position: relative;
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.hero-card-1 {
  top: 17px;
  left: 0;
  transform: rotate(-4deg);
  background: linear-gradient(155deg, var(--surface), var(--surface-2));
}

.hero-card-2 {
  top: 8px;
  left: 152px;
  transform: rotate(-2deg);
  z-index: 2;
}

.hero-card-3 {
  top: 14px;
  left: 304px;
  transform: rotate(0.5deg);
  background: linear-gradient(155deg, var(--surface), rgba(31, 111, 104, 0.1));
}

.hero-card-4 {
  top: 8px;
  left: 456px;
  transform: rotate(2deg);
  z-index: 3;
  background: linear-gradient(155deg, var(--surface), rgba(184, 137, 63, 0.1));
}

.hero-card-5 {
  top: 14px;
  left: 608px;
  transform: rotate(4deg);
  background: linear-gradient(155deg, var(--surface), var(--surface-2));
}

.hero-card-6 {
  top: 8px;
  left: 760px;
  transform: rotate(-3deg);
  z-index: 4;
  background: linear-gradient(155deg, #2a1b16, #101918);
  color: #f5efe4;
}

.hero-card-6:not(.has-cover) .hero-card-cover {
  background:
    radial-gradient(circle at 50% 38%, rgba(211, 84, 46, 0.34), transparent 44%),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255, 255, 255, 0.045) 12px 13px);
  opacity: 1;
}

.hero-card-6 .hero-card-num {
  color: rgba(255, 255, 255, 0.55);
}

.hero-art:hover .hero-card-1 { transform: rotate(-6deg) translate(-2px, -3px); }
.hero-art:hover .hero-card-2 { transform: rotate(-4deg) translate(1px, -4px); }
.hero-art:hover .hero-card-3 { transform: rotate(2.5deg) translate(2px, -2px); }
.hero-art:hover .hero-card-4 { transform: rotate(4deg) translate(-1px, -4px); }
.hero-art:hover .hero-card-5 { transform: rotate(6deg) translate(2px, -3px); }
.hero-art:hover .hero-card-6 { transform: rotate(-5deg) translate(2px, -3px); }

.hero-seal {
  display: none;
  position: absolute;
  right: 4px;
  top: 8px;
  align-items: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.18em;
  line-height: 1.5;
  transform: rotate(14deg);
}

.hero-seal strong {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
}

/* =========================================================
   分类
   ========================================================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  scroll-margin-top: 100px;
  transition: opacity 0.25s ease;
}

.category-grid.is-disabled,
.subtype-row.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 196px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  transition:
    transform 0.35s var(--ease),
    border-color 0.25s ease,
    box-shadow 0.35s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cat-accent, var(--accent));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -58px;
  z-index: -1;
  width: 150px;
  height: 150px;
  border: 1px solid var(--cat-accent, var(--accent));
  border-radius: 50%;
  opacity: 0.16;
  transition: transform 0.5s var(--ease), opacity 0.35s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.category-card:hover::after {
  transform: scale(1.14);
  opacity: 0.28;
}

.category-card.is-selected {
  border-color: var(--cat-accent, var(--accent));
  box-shadow: 0 0 0 1px var(--cat-accent, var(--accent)) inset, var(--shadow-md);
}

.category-card.is-selected::before {
  opacity: 0.075;
}

.cat-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 0.8s var(--ease);
}

.category-card.has-cover .cat-cover {
  opacity: 1;
}

.category-card.has-cover {
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.category-card.has-cover::before {
  background: linear-gradient(
    180deg,
    rgba(8, 7, 6, 0.04) 0%,
    rgba(8, 7, 6, 0.16) 28%,
    rgba(8, 7, 6, 0.62) 62%,
    rgba(8, 7, 6, 0.92) 100%
  );
  opacity: 1;
}

.category-card.has-cover.is-selected::before {
  background: linear-gradient(
    180deg,
    rgba(8, 7, 6, 0.04) 0%,
    rgba(8, 7, 6, 0.16) 28%,
    rgba(8, 7, 6, 0.62) 62%,
    rgba(8, 7, 6, 0.92) 100%
  );
  opacity: 1;
}

.category-card.has-cover .cat-name {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
}

.category-card.has-cover .cat-desc {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.category-card.has-cover:hover .cat-cover {
  transform: scale(1.07);
}

.category-card.has-cover .cat-index {
  color: rgba(255, 255, 255, 0.55);
}

.category-card.has-cover .cat-desc {
  color: rgba(255, 255, 255, 0.72);
}

.category-card.has-cover .cat-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.category-card.has-cover.is-selected .cat-icon {
  background: var(--cat-accent, var(--accent));
}

.category-card.has-cover .cat-arrow {
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
}

.category-card.has-cover:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.category-card.has-cover.is-selected {
  border-color: var(--cat-accent, var(--accent));
}

.cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cat-index {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.cat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--cat-accent, var(--accent));
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s var(--ease);
}

.category-card:hover .cat-icon {
  transform: rotate(-5deg) scale(1.04);
}

.cat-icon .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}

.category-card.is-selected .cat-icon {
  background: var(--cat-accent, var(--accent));
  color: #fff;
}

.cat-watermark {
  position: absolute;
  right: -12px;
  bottom: -22px;
  z-index: -1;
  color: var(--cat-accent, var(--accent));
  opacity: 0.07;
  transform: rotate(-8deg);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.cat-watermark .icon {
  width: 124px;
  height: 124px;
  stroke-width: 1.1;
}

.category-card:hover .cat-watermark {
  opacity: 0.11;
  transform: rotate(-4deg) scale(1.03);
}

.cat-name {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cat-desc {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.cat-arrow {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: transform 0.3s var(--ease), background 0.25s ease, color 0.25s ease;
}

.category-card:hover .cat-arrow,
.category-card.is-selected .cat-arrow {
  background: var(--cat-accent, var(--accent));
  color: #fff;
  transform: rotate(-35deg);
}

.cat-arrow .icon {
  width: 13px;
  height: 13px;
}

.subtype-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.chip,
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip:hover,
.filter-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chip.is-active,
.filter-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.chip .chip-count {
  opacity: 0.55;
  font-family: var(--mono);
  font-size: 10px;
}

/* =========================================================
   大图舞台
   ========================================================= */

.stage-counter {
  padding-bottom: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 96px;
  min-height: clamp(520px, 66vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  background: #141210;
  color: #f8f2e7;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.stage-bg {
  position: absolute;
  inset: -40px;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(42px) saturate(1.15);
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 0.8s ease;
}

.stage[data-has-image="true"] .stage-bg {
  opacity: 0.58;
}

.stage[data-is-gif="true"] .stage-bg {
  opacity: 0;
}

.stage-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 7, 6, 0.62) 0%, transparent 28%, transparent 56%, rgba(8, 7, 6, 0.86) 100%),
    linear-gradient(90deg, rgba(8, 7, 6, 0.32), transparent 40%, transparent 60%, rgba(8, 7, 6, 0.32));
}

.stage-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 0;
}

.stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-info-btn {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stage-info-btn:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.stage-body {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 300px;
  padding: 12px 28px;
}

.stage-img {
  max-width: 100%;
  max-height: clamp(310px, 52vh, 610px);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.55s ease, transform 0.55s var(--ease);
}

.stage-img.is-visible {
  opacity: 1;
  transform: scale(1);
}

.stage-quick {
  position: absolute;
  right: 24px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.stage:not([data-has-image="true"]) .stage-quick {
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
}

.quick-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.4);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.quick-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.quick-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.quick-btn .icon {
  width: 18px;
  height: 18px;
}

.stage-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.stage-placeholder p {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 19px;
}

.stage-placeholder small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.placeholder-ring {
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.placeholder-ring::before,
.placeholder-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.placeholder-ring::before {
  inset: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
}

.placeholder-ring::after {
  inset: 21px;
  background: var(--accent);
  opacity: 0.85;
}

.placeholder-ring span {
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.stage-error {
  max-width: 380px;
  padding: 20px;
  text-align: center;
}

.error-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 122, 82, 0.5);
  border-radius: 50%;
  color: #ff9a7b;
  font-family: var(--serif);
  font-size: 24px;
}

.stage-error h3 {
  font-size: 20px;
}

.stage-error p {
  margin: 8px 0 18px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12.5px;
}

.stage.is-loading .stage-actions {
  opacity: 0.45;
  pointer-events: none;
}

.stage.is-loading .stage-img {
  filter: brightness(0.72);
  transition: filter 0.25s ease;
}

.stage-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px 24px;
}

.stage-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
}

.caption-label {
  font-family: var(--serif);
  font-size: 16px;
}

.caption-sub {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

.stage-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 7px;
}

@media (max-width: 720px) {
  #discover-actions {
    flex-wrap: wrap;
  }
}

.stage-actions .btn {
  min-height: 40px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stage-actions .btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
}

.stage-actions .btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(211, 84, 46, 0.28);
}

.stage-actions .btn-primary:hover {
  background: var(--accent-deep);
}

.stage-actions .btn.is-active,
.stage-actions .btn[aria-pressed="true"] {
  border-color: rgba(255, 122, 82, 0.5);
  background: rgba(255, 122, 82, 0.19);
  color: #ffb59f;
}

.stage-actions .btn.is-active .heart-icon,
.stage-actions .btn[aria-pressed="true"] .heart-icon {
  fill: currentColor;
}

.stage-actions .btn-icon-only {
  width: 40px;
  padding: 0;
}

.stage-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* =========================================================
   抽卡
   ========================================================= */

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 54px 0 8px;
}

.view-heading h1 {
  margin-top: 12px;
  font-size: clamp(42px, 5.5vw, 72px);
  letter-spacing: -0.04em;
}

.view-lead {
  max-width: 460px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.today-badge {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.today-badge strong {
  margin-left: 4px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.today-badge small {
  font-size: 11px;
}

.lucky-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-top: 30px;
}

.lucky-controls {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 0.85fr) auto;
  gap: 16px 26px;
  align-items: end;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.control-block {
  margin-bottom: 0;
}

.control-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pill:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.pill.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.pill-list-subtle .pill {
  border-style: dashed;
}

.pill-list-subtle .pill.is-active {
  border-style: solid;
}

.lucky-controls .btn-lucky {
  width: auto;
  min-width: 190px;
  min-height: 50px;
  margin-top: 0;
  padding: 0 32px;
  font-size: 14px;
}

.control-hint {
  grid-column: 1 / -1;
  margin-top: -2px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}

.lucky-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.lucky-card {
  width: min(600px, 100%);
  aspect-ratio: 3 / 4;
  perspective: 1600px;
  cursor: pointer;
  transition: width 0.5s var(--ease);
}

.lucky-card.is-drawing {
  cursor: wait;
}

.lucky-card:hover .lucky-back-content strong {
  transform: scale(1.04);
}

.lucky-back-content strong {
  transition: transform 0.35s var(--ease);
}

.lucky-card.is-landscape {
  width: min(820px, 100%);
  aspect-ratio: 4 / 3;
}

.lucky-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.lucky-card.is-revealed .lucky-card-inner {
  transform: rotateY(180deg);
}

.lucky-card.is-drawing {
  animation: cardShake 0.62s ease-in-out;
}

@keyframes cardShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-2.2deg) scale(1.01); }
  40% { transform: rotate(2deg) scale(1.02); }
  60% { transform: rotate(-1.2deg) scale(1.015); }
  80% { transform: rotate(0.8deg) scale(1.01); }
}

.lucky-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow-lg);
}

.lucky-back {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(211, 84, 46, 0.3), transparent 34%),
    linear-gradient(145deg, #1d3a37, #111a19 55%, #2a1712);
}

.card-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 13px, rgba(255, 255, 255, 0.04) 13px 14px),
    repeating-linear-gradient(-45deg, transparent 0 13px, rgba(255, 255, 255, 0.04) 13px 14px);
}

.lucky-back::before,
.lucky-back::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.lucky-back::before {
  width: 74%;
  aspect-ratio: 1;
}

.lucky-back::after {
  width: 50%;
  aspect-ratio: 1;
  border-style: dashed;
  opacity: 0.6;
}

.lucky-back-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f7efe2;
  text-align: center;
}

.lucky-back-brand {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
}

.lucky-back-content strong {
  margin: 14px 0 4px;
  font-family: var(--serif);
  font-size: clamp(86px, 13vw, 132px);
  font-weight: 500;
  line-height: 0.9;
  color: #f6d7a8;
  text-shadow: 0 0 50px rgba(224, 178, 92, 0.24);
}

.lucky-back-content small {
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.lucky-front {
  display: flex;
  flex-direction: column;
  background: #0c0b0a;
  transform: rotateY(180deg);
}

.lucky-front-media {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #0c0b0a;
}

.lucky-front-bg {
  position: absolute;
  inset: -28px;
  background-position: center;
  background-size: cover;
  filter: blur(30px) brightness(0.5) saturate(1.1);
  transform: scale(1.12);
}

.lucky-front img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.lucky-front-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 24%, transparent 76%, rgba(0, 0, 0, 0.36) 100%);
}

.lucky-quick {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
  transition: opacity 0.25s ease;
}

.lucky-quick .quick-btn {
  width: 36px;
  height: 36px;
}

.lucky-card:not(.is-revealed) .lucky-quick {
  opacity: 0;
  pointer-events: none;
}

.lucky-front-copy {
  position: relative;
  z-index: 3;
  padding: 16px 22px 20px;
  background: linear-gradient(180deg, rgba(12, 11, 10, 0.78), #0c0b0a 30%);
}

.fortune {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.fortune-stars {
  display: flex;
  gap: 2px;
  color: var(--gold);
}

.fortune-stars .icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: currentColor;
}

.fortune-stars .icon.is-empty {
  fill: transparent;
  stroke: currentColor;
  opacity: 0.26;
}

.fortune strong {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  color: #f6d7a8;
}

.fortune p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11.5px;
  line-height: 1.65;
}

.lucky-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.lucky-actions .btn {
  min-height: 40px;
  font-size: 12px;
}

.lucky-actions .btn[aria-pressed="true"] {
  border-color: rgba(255, 122, 82, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
}

.lucky-actions .btn[aria-pressed="true"] .heart-icon {
  fill: currentColor;
}

.history-section {
  margin-top: 62px;
}

.history-strip {
  display: flex;
  gap: 10px;
  min-height: 96px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.history-strip.is-accordion {
  display: block;
  min-height: 0;
  overflow: visible;
  padding: 0;
}

.history-accordion {
  display: flex;
  gap: 8px;
  height: 290px;
  perspective: 1400px;
}

.history-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0c0b0a;
  cursor: pointer;
  transform-origin: center center;
  transform-style: preserve-3d;
  transition:
    flex-grow 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  will-change: flex-grow, transform;
}

.history-panel.is-active {
  flex-grow: 3.4;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.history-panel.is-before {
  transform: rotateY(3deg);
}

.history-panel.is-after {
  transform: rotateY(-3deg);
}

.history-panel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.history-panel__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.history-panel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s ease, transform 0.6s var(--ease);
}

.history-panel:not(.is-active) .history-panel__media img {
  filter: grayscale(1) brightness(0.72);
}

.history-panel.is-active .history-panel__media img {
  transform: scale(1.035);
}

.history-panel__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.78) 100%);
}

.history-panel__label {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #fff;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease);
}

.history-panel.is-active .history-panel__label {
  opacity: 1;
  transform: translateX(0);
}

.history-panel__label strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.history-panel__label small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item {
  position: relative;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.2s ease;
}

.history-item:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.history-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-item span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 9px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.empty-inline {
  align-self: center;
  color: var(--muted);
  font-size: 12.5px;
}

/* =========================================================
   收藏
   ========================================================= */

.favorites-heading {
  align-items: flex-start;
}

.favorites-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
}

.collection-count {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}

.collection-count strong {
  margin-right: 3px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.favorites-tools .collection-count,
.favorites-tools #favorites-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 84px;
  min-width: 84px;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
}

.favorites-tools .collection-count strong {
  line-height: 1;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 26px 0 28px;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 16px;
}

.fav-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  cursor: pointer;
  isolation: isolate;
}

.fav-open {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.fav-open:focus-visible {
  outline-offset: -4px;
}

.fav-bg {
  position: absolute;
  inset: -24px;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(22px) brightness(0.55) saturate(1.08);
  transform: scale(1.08);
}

.fav-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.72) 100%);
}

.fav-card img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 9px;
  object-fit: contain;
  transition: transform 0.6s var(--ease), filter 0.4s ease;
}

.fav-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 60%),
    var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
}

.fav-fallback .icon {
  width: 30px;
  height: 30px;
  opacity: 0.5;
}

.fav-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.fav-card:hover img {
  transform: scale(1.045);
}

.fav-card:hover::after {
  opacity: 1;
}

.fav-card-meta {
  position: absolute;
  right: 14px;
  bottom: 13px;
  left: 14px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.fav-card-cat {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 10px;
  backdrop-filter: blur(8px);
}

.fav-card-date {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--mono);
  font-size: 9px;
}

.fav-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 10.5px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fav-remove:hover {
  border-color: var(--danger);
  background: var(--danger);
  transform: translateY(-1px);
}

.fav-remove .icon {
  width: 13px;
  height: 13px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 82px 20px 40px;
  text-align: center;
}

.empty-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin-bottom: 28px;
}

.empty-frame {
  position: absolute;
  inset: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  transform: rotate(-8deg);
}

.empty-art > .icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  opacity: 0.85;
}

.empty-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.dot-a {
  top: 18px;
  right: 18px;
}

.dot-b {
  bottom: 24px;
  left: 24px;
  background: var(--teal);
}

.empty-state h2 {
  font-size: 28px;
}

.empty-state p {
  max-width: 320px;
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   页脚
   ========================================================= */

/* =========================================================
   关于本站
   ========================================================= */

.about-page {
  padding-top: 72px;
}

.about-page .about-section {
  margin-top: 0;
}

.about-section {
  margin-top: 82px;
}

.about-card {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  padding: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-sm);
}

.about-card::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -90px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  pointer-events: none;
}

.about-portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.85), transparent 44%),
    var(--surface);
}

.about-portrait::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}

.about-orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit-a {
  inset: 30px;
}

.orbit-b {
  inset: 62px;
  border-style: dashed;
}

.about-seal {
  position: relative;
  z-index: 2;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(84px, 10vw, 132px);
  font-weight: 500;
  line-height: 1;
}

.about-star {
  position: absolute;
  z-index: 2;
  color: var(--gold);
  font-size: 15px;
}

.star-a {
  top: 17%;
  right: 18%;
}

.star-b {
  bottom: 19%;
  left: 15%;
  color: var(--teal);
  font-size: 11px;
}

.about-copy {
  position: relative;
  z-index: 1;
}

.about-copy h2 {
  margin-top: 8px;
  font-size: clamp(34px, 4vw, 52px);
}

.about-lead {
  margin-top: 12px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 20px;
}

.about-text {
  max-width: 620px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.about-meta strong {
  margin-right: 3px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

/* =========================================================
   登录
   ========================================================= */

.auth-page {
  padding-top: 48px;
}

.ticket-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding-top: 4px;
}

.ticket {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}

.ticket.is-torn {
  align-self: flex-start;
  width: calc(100% - 128px);
  border-right: 1px dashed var(--line-strong);
  border-radius: 30px 0 0 30px;
}

.ticket-main {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-width: 0;
  background: linear-gradient(155deg, var(--surface-2) 0%, #ead7b8 100%);
}

.ticket-main::before {
  content: "";
  position: absolute;
  top: -110px;
  left: 24%;
  z-index: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 84, 46, 0.13), transparent 68%);
  pointer-events: none;
}

.ticket-main > .ticket-head,
.ticket-main > .ticket-body {
  position: relative;
  z-index: 1;
}

.ticket-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 26px;
  border-bottom: 1px dashed var(--line-strong);
  background: linear-gradient(90deg, var(--surface-2) 0%, #ecd9ba 100%);
}

.ticket-head::before,
.ticket-head::after {
  content: "";
  position: absolute;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
}

.ticket-head::before {
  left: -9px;
}

.ticket-head::after {
  right: -9px;
}

.ticket-pull-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ticket-pull-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.ticket-pull-code {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.72;
}

.ticket-body {
  display: block;
  overflow: hidden;
}

.ticket-stub {
  position: relative;
  z-index: 2;
  flex: 0 0 128px;
  align-self: stretch;
  width: 128px;
  min-width: 0;
  overflow: visible;
  border-left: 0;
  background: linear-gradient(180deg, var(--surface) 0%, #f6ebd8 100%);
  transition:
    flex-basis 0.45s var(--ease),
    width 0.45s var(--ease),
    opacity 0.25s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.ticket-perf {
  position: absolute;
  top: 0;
  right: 122px;
  bottom: 0;
  z-index: 3;
  width: 12px;
  background:
    radial-gradient(circle at 50% 5px, var(--bg) 0 3.1px, rgba(110, 80, 30, 0.2) 3.3px, transparent 3.9px) 0 0 / 12px 21px repeat-y;
  pointer-events: none;
}

.ticket.is-torn .ticket-perf {
  display: none;
}

.ticket-stub.is-dragging {
  transition: none;
}

.ticket-stub.is-gone {
  flex-basis: 0;
  width: 0;
  max-width: 0;
  overflow: hidden;
  border-left: 0;
  opacity: 0;
  pointer-events: none;
}

.ticket-stub-pull {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 20px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.ticket-stub-pull:active {
  cursor: grabbing;
}

.ticket-stub-pull:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -5px;
}

.ticket-stub.is-dragging .ticket-stub-pull {
  transition: none;
}

.ticket-stub.is-torn .ticket-stub-pull {
  pointer-events: none;
}

.ticket-stub-admit {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 9.5px;
  letter-spacing: 0.16em;
}

.ticket-stub-grip {
  color: var(--accent);
  font-size: 17px;
  letter-spacing: 4px;
  line-height: 1;
}

.ticket-stub-label {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.22em;
  writing-mode: vertical-rl;
}

.ticket-stub-code {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  line-height: 1.7;
  text-align: center;
  writing-mode: vertical-rl;
}

.ticket-stub-pull .icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.ticket .auth-shell {
  flex: 1;
  min-width: 0;
  min-height: 610px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ticket .auth-aside,
.ticket .auth-panel {
  background: transparent;
}

.ticket .auth-aside::before,
.ticket .auth-panel::before {
  display: none;
}

.auth-shell {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 44px;
  background: linear-gradient(155deg, var(--surface-2) 0%, #ead7b8 100%);
}

.auth-aside .falling-petals {
  z-index: 0;
}

.auth-aside-seal {
  z-index: 1;
}

.auth-aside::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -90px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 84, 46, 0.14), transparent 68%);
  pointer-events: none;
}

.auth-aside-top {
  position: relative;
  z-index: 1;
}

.auth-aside h1 {
  margin-top: 18px;
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.15;
}

.auth-aside h1 em {
  color: var(--accent);
  font-style: normal;
}

.auth-aside-copy {
  max-width: 340px;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.9;
}

.auth-quote {
  position: relative;
  z-index: 1;
  padding-top: 34px;
  border-top: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.auth-quote-mark {
  display: block;
  height: 24px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 42px;
  line-height: 0.6;
}

.auth-quote p {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
}

.auth-quote small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.auth-aside-seal {
  position: absolute;
  right: -16px;
  bottom: -40px;
  color: rgba(255, 255, 255, 0.32);
  font-family: var(--serif);
  font-size: 240px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.auth-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 44px 48px;
  background: linear-gradient(180deg, #f5e8d3 0%, #ecdcbf 100%);
}

.auth-panel::before {
  content: "";
  position: absolute;
  top: -110px;
  left: -80px;
  z-index: 0;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 84, 46, 0.12), transparent 68%);
  pointer-events: none;
}

.auth-panel::after {
  content: "光";
  position: absolute;
  right: -18px;
  bottom: -48px;
  z-index: 0;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--serif);
  font-size: 260px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.auth-panel .falling-petals {
  z-index: 0;
}

.auth-panel > .auth-panel-head,
.auth-panel > .auth-signed,
.auth-panel > .auth-form,
.auth-panel > .auth-foot {
  position: relative;
  z-index: 1;
}

.ticket .auth-panel {
  border-left: 0;
}

.auth-panel-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  margin-bottom: 30px;
}

.auth-panel-head h2 {
  margin-top: 8px;
  font-size: clamp(30px, 3vw, 44px);
}

.auth-tabs {
  display: block;
  flex: none;
  width: 176px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.auth-tabs .rubber-segment {
  width: 100%;
  grid-auto-columns: minmax(0, 1fr);
}

.auth-tabs .rubber-segment__item {
  width: 100%;
  min-width: 0;
}

.auth-tab {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 430px;
}

.auth-extra {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
}

.auth-extra .auth-guest {
  margin-top: 0;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-field input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}

.auth-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.auth-local-note {
  color: var(--muted);
  font-size: 10.5px;
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(180, 60, 40, 0.24);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  line-height: 1.6;
}

.auth-guest {
  align-self: flex-start;
  margin-top: -5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-guest:disabled {
  opacity: 0.5;
  cursor: default;
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 4px;
}

.auth-pull-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.auth-pull-hint .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.auth-foot {
  margin-top: 24px;
  color: var(--muted);
  font-size: 11px;
}

.auth-foot a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-signed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.auth-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 8px;
}

.auth-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.auth-avatar svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-avatar-edit {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(90, 50, 20, 0.2);
  transition: transform 0.2s ease, background 0.2s ease;
}

.auth-avatar-edit:hover {
  background: var(--accent-deep);
  transform: scale(1.06);
}

.auth-avatar-edit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-avatar-edit svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.auth-avatar-hint {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.auth-signed h3 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 32px;
}

.auth-signed-copy {
  max-width: 400px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.auth-signed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
  padding: 30px 0;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.footer-brand strong {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.footer-brand span,
.footer-links {
  color: var(--muted);
  font-size: 11px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer-links a,
.footer-links button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--ink);
}

/* =========================================================
   弹窗
   ========================================================= */

dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(16, 14, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox {
  width: min(1080px, 94vw);
  max-width: none;
  max-height: 92vh;
}

.lightbox-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: #151311;
  color: #f8f2e7;
  box-shadow: var(--shadow-lg);
}

.lightbox-media {
  position: relative;
  display: grid;
  place-items: center;
  height: min(62vh, 680px);
  overflow: hidden;
  background: #0a0908;
}

.lightbox-bg {
  position: absolute;
  inset: -30px;
  background-position: center;
  background-size: cover;
  filter: blur(38px) saturate(1.1);
  opacity: 0.34;
}

.lightbox-media img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  backdrop-filter: blur(10px);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, opacity 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lightbox-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.lightbox-nav.prev {
  left: 14px;
}

.lightbox-nav.next {
  right: 14px;
}

.lightbox-info {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px 22px;
}

.lightbox-kicker {
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.lightbox-info h2 {
  margin: 5px 0 9px;
  font-size: 24px;
}

.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.lightbox-actions .btn {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11.5px;
}

.lightbox-actions .btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lightbox-actions .btn-primary {
  border-color: transparent;
  background: var(--accent);
}

.lightbox-actions .btn[aria-pressed="true"] {
  border-color: rgba(255, 122, 82, 0.5);
  background: rgba(255, 122, 82, 0.16);
  color: #ffb59f;
}

.lightbox-actions .btn[aria-pressed="true"] .heart-icon {
  fill: currentColor;
}

.lightbox-delete[aria-pressed="true"] {
  border-color: rgba(255, 122, 100, 0.42);
  background: rgba(178, 58, 43, 0.2);
  color: #ffb3a7;
}

.lightbox-delete[aria-pressed="true"]:hover {
  background: var(--danger);
  color: #fff;
}

.info-dialog {
  width: min(760px, 92vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.info-dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .info-dialog[open] {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

.info-dialog.is-closing {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.info-dialog::backdrop {
  background: rgba(18, 14, 10, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.26s ease;
}

.info-dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .info-dialog[open]::backdrop {
    opacity: 0;
  }
}

.info-dialog.is-closing::backdrop {
  opacity: 0;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin-top: 7px;
  font-size: clamp(23px, 3vw, 30px);
}

.dialog-body {
  padding: 22px 28px 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.code-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 24px;
  padding: 12px 12px 12px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-deep);
}

.code-block code {
  flex: 1;
  overflow: auto;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.code-block .icon-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 26px;
}

.info-grid h3 {
  margin-bottom: 5px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.info-grid p {
  font-size: 12px;
  line-height: 1.8;
}

.info-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.info-links span {
  color: var(--muted);
}

.info-links a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 84, 46, 0.28);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.info-links a:hover {
  color: var(--accent-deep);
  border-color: currentColor;
}

.confirm-dialog {
  width: min(420px, 92vw);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.confirm-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border: 1px solid rgba(178, 58, 43, 0.3);
  border-radius: 50%;
  color: var(--danger);
  font-family: var(--serif);
  font-size: 22px;
}

.confirm-dialog h2 {
  font-size: 24px;
}

.confirm-dialog p {
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 12.5px;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* =========================================================
   Toast
   ========================================================= */

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 11px 17px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.45;
  animation: toastIn 0.28s var(--ease) both;
}

.toast .icon {
  width: 15px;
  height: 15px;
}

.toast.is-success {
  background: var(--teal);
  color: #fff;
}

.toast.is-error {
  background: var(--danger);
  color: #fff;
}

.toast.is-leaving {
  animation: toastOut 0.24s ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}

/* =========================================================
   响应式
   ========================================================= */

@media (max-width: 1120px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    gap: 20px;
  }
}

@media (max-width: 1000px) {
  .hero-art {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 70px;
  }

  .hero {
    min-height: 0;
    padding-top: 44px;
    gap: 20px;
  }

  .hero-art {
    display: none;
  }

  .hero-lead {
    max-width: 520px;
  }

  .hero h1 {
    font-size: clamp(46px, 9vw, 74px);
  }

  .lucky-controls {
    grid-template-columns: 1fr 1fr;
  }

  .lucky-controls .btn-lucky {
    grid-column: 1 / -1;
    width: 100%;
  }

  .lucky-controls .control-hint {
    grid-column: 1 / -1;
  }

  .lucky-card {
    width: min(560px, 100%);
  }

  .lucky-card.is-landscape {
    width: min(760px, 100%);
  }

  .section-heading {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .view,
  .footer-inner {
    width: min(100% - 32px, 1240px);
  }

  .header-inner {
    gap: 10px;
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .main-nav .rubber-segment {
    width: 210px;
    --rs-pad: 6px;
  }

  .hero {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: clamp(42px, 11.5vw, 62px);
  }

  .hero-lead {
    margin-top: 18px;
    font-size: 14px;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    padding: 0 17px;
  }

  .hero-meta {
    margin-top: 28px;
    gap: 10px;
  }

  .section {
    margin-top: 58px;
  }

  .section-heading {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }

  .section-note {
    max-width: none;
    padding: 0;
    text-align: left;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .category-card {
    min-height: 168px;
    padding: 15px;
  }

  .category-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    min-height: 150px;
  }

  .category-card:last-child:nth-child(odd) .cat-name {
    margin-top: 18px;
  }

  .cat-name {
    margin-top: 22px;
    font-size: 18px;
  }

  .cat-desc {
    font-size: 10.5px;
  }

  .stage {
    min-height: 540px;
    border-radius: 26px;
  }

  .stage-top {
    padding: 17px 17px 0;
  }

  .stage-body {
    padding: 10px 14px;
  }

  .stage-img {
    max-height: 48vh;
    border-radius: 10px;
  }

  .stage-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 17px 18px;
  }

  .stage-quick {
    right: 12px;
    bottom: 12px;
  }

  .quick-btn {
    width: 38px;
    height: 38px;
  }

  .lucky-quick {
    top: 10px;
    right: 10px;
  }

  .lucky-quick .quick-btn {
    width: 32px;
    height: 32px;
  }

  .stage-actions {
    justify-content: flex-start;
  }

  .stage-actions .btn {
    flex: 1 1 auto;
    min-width: 96px;
    padding: 0 12px;
  }

  .stage-actions .btn-icon-only {
    flex: 0 0 40px;
    min-width: 40px;
  }

  .stage-hint {
    text-align: left;
    padding-left: 4px;
  }

  .hint-keyboard {
    display: none;
  }

  .view-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding-top: 38px;
  }

  .view-heading h1 {
    font-size: clamp(40px, 11vw, 58px);
  }

  .today-badge {
    align-self: flex-start;
  }

  .lucky-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .lucky-controls .control-block {
    margin-bottom: 14px;
  }

  .lucky-controls .pill-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .lucky-controls .pill-list::-webkit-scrollbar {
    display: none;
  }

  .lucky-controls .pill {
    flex: 0 0 auto;
  }

  .lucky-controls .btn-lucky {
    width: 100%;
  }

  .lucky-card,
  .lucky-card.is-landscape {
    width: min(460px, 100%);
    aspect-ratio: 3 / 4;
  }

  .lucky-actions .btn {
    flex: 1 1 auto;
  }

  .lucky-actions .btn-icon-only {
    flex: 0 0 40px;
  }

  .favorites-heading {
    gap: 14px;
  }

  .favorites-tools {
    padding-top: 0;
  }

  .favorites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .fav-card {
    border-radius: 15px;
  }

  .fav-remove {
    opacity: 1;
    transform: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 24px 0;
  }

  .footer-brand {
    flex-direction: column;
    gap: 3px;
  }

  .footer-links {
    gap: 12px;
  }

  .lightbox {
    width: 100vw;
    max-height: 100vh;
  }

  .lightbox-shell {
    border-radius: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .lightbox-media {
    height: 58vh;
  }

  .lightbox-info {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .lightbox-actions {
    justify-content: flex-start;
  }

  .lightbox-actions .btn {
    flex: 1 1 auto;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
  }

  .info-dialog {
    width: 94vw;
    max-height: 90vh;
  }

  .dialog-head {
    padding: 20px 20px 16px;
  }

  .dialog-body {
    padding: 18px 20px 22px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .toast-stack {
    right: 16px;
    bottom: 16px;
    left: 16px;
    align-items: center;
  }

  .toast {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .header-inner {
    gap: 6px;
  }

  .brand {
    gap: 6px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-text strong {
    font-size: 16px;
    letter-spacing: 0.04em;
  }

  .main-nav .rubber-segment {
    width: 216px;
    --rs-pad: 3px;
    --rs-font: 11px;
  }

  .header-actions {
    gap: 2px;
  }

  .header-actions .icon-btn {
    width: 34px;
    height: 34px;
  }

  .header-actions #info-open {
    display: none;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 52px);
  }

  .hero-meta {
    font-size: 10.5px;
    gap: 8px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .category-card {
    min-height: 158px;
    padding: 14px;
  }

  .cat-name {
    font-size: 17px;
  }

  .cat-desc {
    line-height: 1.45;
  }

  .cat-icon {
    width: 34px;
    height: 34px;
  }

  .stage {
    min-height: 500px;
  }

  .stage-img {
    max-height: 42vh;
  }

  .stage-actions .btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .stage-actions .btn-icon-only {
    flex: 1 1 calc(50% - 4px);
  }

  .lucky-card,
  .lucky-card.is-landscape {
    aspect-ratio: 3 / 4.15;
  }

  .lucky-front-copy {
    padding: 18px;
  }

  .fortune strong {
    font-size: 24px;
  }

  .history-item {
    flex-basis: 78px;
    width: 78px;
    height: 78px;
  }

  .history-accordion {
    flex-direction: column;
    height: auto;
    gap: 6px;
    perspective: none;
  }

  .history-panel {
    flex: none;
    width: 100%;
    height: 66px;
    transition: height 0.45s var(--ease), border-color 0.3s ease;
  }

  .history-panel.is-active {
    height: 230px;
  }

  .history-panel.is-before,
  .history-panel.is-after {
    transform: none;
  }

  .favorites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fav-card-meta {
    right: 9px;
    bottom: 9px;
    left: 9px;
  }

  .fav-card-date {
    display: none;
  }

  .collection-count {
    padding: 8px 12px;
  }

  .info-dialog {
    width: 96vw;
  }

  .confirm-dialog {
    padding: 24px 20px;
  }
}

@media (max-width: 390px) {
  .main-nav .rubber-segment {
    width: 216px;
    --rs-pad: 1px;
    --rs-font: 10.5px;
  }

  .header-actions .icon-btn {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 360px) {
  .main-nav .rubber-segment {
    width: 200px;
    --rs-pad: 1px;
    --rs-font: 9.5px;
  }
}

/* =========================================================
   动效偏好
   ========================================================= */

@media (max-width: 900px) {
  .about-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px;
  }

  .about-portrait {
    max-width: 210px;
    margin: 0 auto;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .ticket-body {
    display: block;
  }

  .ticket-stub {
    display: none;
  }

  .ticket-perf {
    display: none;
  }

  .auth-aside {
    min-height: 300px;
    padding: 34px;
  }

  .auth-aside-seal {
    font-size: 190px;
  }

  .auth-quote {
    margin-top: 32px;
  }

  .auth-panel {
    padding: 36px;
  }
}

@media (max-width: 720px) {
  .about-page {
    padding-top: 36px;
  }

  .about-section {
    margin-top: 56px;
  }

  .about-card {
    padding: 24px;
    border-radius: 26px;
  }

  .about-lead {
    font-size: 18px;
  }

  .about-meta {
    gap: 16px 22px;
  }

  .about-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .auth-page {
    padding-top: 28px;
  }

  .ticket {
    border-radius: 24px;
  }

  .ticket-head {
    height: 56px;
    gap: 8px;
    padding: 0 16px;
  }

  .ticket-pull-mark {
    font-size: 13px;
  }

  .ticket-pull-code {
    display: none;
  }

  .ticket-body {
    display: block;
  }

  .ticket-stub {
    display: none;
  }

  .auth-shell {
    border-radius: 26px;
  }

  .auth-aside {
    min-height: 250px;
    padding: 26px;
  }

  .auth-aside h1 {
    font-size: 36px;
  }

  .auth-aside-copy {
    font-size: 12px;
  }

  .auth-quote {
    margin-top: 24px;
    padding-top: 24px;
  }

  .auth-quote p {
    font-size: 17px;
  }

  .auth-panel {
    padding: 28px 22px;
  }

  .auth-panel::after {
    right: -10px;
    bottom: -28px;
    font-size: 170px;
  }

  .auth-panel-head {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }

  .auth-tabs {
    align-self: flex-start;
  }

  .auth-form {
    max-width: none;
  }

  .auth-signed-actions {
    width: 100%;
  }

  .auth-signed-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .lucky-card-inner {
    transition: none;
  }
}
