:root {
  color-scheme: dark;
  --page-pad: clamp(10px, 4vw, 18px);
  --topbar-content-height: 64px;
  --topbar-height: calc(var(--topbar-content-height) + env(safe-area-inset-top));
  --bg: #080806;
  --panel: #15130f;
  --paper: #f3e7c9;
  --paper-2: #dac28f;
  --ink: #16120c;
  --text: #f8edcf;
  --muted: #a99a77;
  --gold: #d9aa45;
  --gold-2: #f3d486;
  --line: rgba(243, 212, 134, 0.22);
  --line-strong: rgba(243, 212, 134, 0.48);
  --danger: #d45f55;
  --radius: 8px;
  font-family: ui-serif, Georgia, "Times New Roman", "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(243, 212, 134, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 50% 0, rgba(217, 170, 69, 0.18), transparent 360px),
    var(--bg);
  color: var(--text);
  overscroll-behavior-y: none;
}

html {
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-text-size-adjust: 100%;
}

body.drawer-open,
body.drawer-lock {
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.72;
}

:where(button, input, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid #ffe59a;
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hidden {
  visibility: hidden !important;
  pointer-events: none !important;
}

.app-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: clip;
  padding: 0 max(var(--page-pad), env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(var(--page-pad), env(safe-area-inset-left));
  position: relative;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: auto;
  max-width: none;
  min-height: var(--topbar-height);
  padding: env(safe-area-inset-top) max(var(--page-pad), env(safe-area-inset-right), calc((100vw - 430px) / 2 + var(--page-pad))) 4px max(var(--page-pad), env(safe-area-inset-left), calc((100vw - 430px) / 2 + var(--page-pad)));
  border-bottom: 1px solid rgba(243, 212, 134, 0.1);
  background: rgba(8, 8, 6, 0.96);
  backdrop-filter: blur(18px);
}

main {
  padding-top: var(--topbar-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  transform: translateY(-2px);
}

.brand-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(255, 229, 154, 0.34);
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.brand-copy {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--paper);
  font-weight: 700;
  letter-spacing: 0;
}

.brand-primary,
.brand-secondary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-primary {
  font-size: 15px;
  line-height: 1.15;
}

.brand-secondary {
  margin-top: 2px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 11px;
  line-height: 1.15;
}

.top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  transform: translateY(-2px);
}

.icon-btn,
.lang-toggle,
.small-action,
.arrow-btn,
.nav-btn,
.card-action,
.copy-btn {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.icon-btn {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 24px;
}

.lang-toggle {
  min-width: 64px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 11px;
}

#backBtn:not(.hidden) + .brand {
  min-width: 0;
}

.topbar.has-back .brand-icon {
  display: none;
}

#backBtn:not(.hidden) {
  transform: translateY(-2px);
}

.topbar.has-back {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

#backBtn.hidden {
  display: none;
}

@media (max-width: 360px) {
  .brand {
    gap: 6px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 10px;
  }

  .brand-primary {
    font-size: 14px;
  }

  .brand-secondary {
    font-size: 10px;
  }

  .icon-btn {
    min-width: 44px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .lang-toggle {
    min-width: 50px;
    width: 50px;
    height: 44px;
    padding: 0 6px;
    white-space: nowrap;
  }
}

@media (max-width: 410px) {
  .top-actions {
    gap: 5px;
  }

  .icon-btn {
    min-width: 44px;
    width: 44px;
  }

  .lang-toggle {
    min-width: 50px;
    width: 50px;
    padding: 0 5px;
  }
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head,
.saved-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 12px;
}

.section-head p,
.saved-head p {
  margin: 0;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.positioning-copy {
  margin: -10px 2px 24px;
  color: #d8c694;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
}

.small-action {
  min-height: 44px;
  padding: 0 12px;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
}

.deck-stage {
  position: relative;
  aspect-ratio: 3 / 5;
  height: auto;
  margin: 0;
  contain: layout style;
  isolation: isolate;
  overflow: visible;
}

.style-card {
  position: relative;
  overflow: hidden;
  min-height: 598px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(243, 231, 201, 0.92), rgba(218, 194, 143, 0.94)),
    var(--paper);
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.deck-stage .style-card {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  backface-visibility: hidden;
  transition: transform 220ms cubic-bezier(.2, .82, .22, 1), opacity 180ms ease;
}

.deck-stage.dragging .style-card,
.deck-stage.is-animating .style-card {
  will-change: transform, opacity;
}

.deck-stage .cover-image {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.live-card {
  z-index: 3;
  transform: translate3d(var(--drag-x, 0px), var(--drag-y, 0px), 0) rotate(var(--drag-rotate, 0deg));
  transform-origin: 50% 112%;
}

.ghost-card {
  z-index: 1;
  opacity: var(--ghost-opacity, 0.72);
  pointer-events: none;
}

.ghost-card .card-actions {
  display: none;
}

.ghost-card.prev {
  transform: translate3d(var(--ghost-x, -18px), var(--ghost-y, 5px), 0) rotate(var(--ghost-rotate, -2.4deg)) scale(var(--ghost-scale, 0.965));
  transform-origin: 50% 112%;
}

.ghost-card.next {
  transform: translate3d(var(--ghost-x, 18px), var(--ghost-y, 5px), 0) rotate(var(--ghost-rotate, 2.4deg)) scale(var(--ghost-scale, 0.965));
  transform-origin: 50% 112%;
}

.deck-stage.dragging .style-card {
  transition: none;
  cursor: grabbing;
}

.deck-stage.dragging .ghost-card {
  opacity: var(--ghost-opacity, 0.78);
}

.deck-stage.is-animating {
  pointer-events: none;
}

.deck-stage.random-out .live-card {
  animation: random-card-out 180ms cubic-bezier(.4, 0, 1, 1) both;
}

.deck-stage.random-in .live-card {
  animation: random-card-in 360ms cubic-bezier(.18, .82, .2, 1) both;
}

.deck-stage.random-out .ghost-card,
.deck-stage.random-in .ghost-card {
  opacity: 0.42;
}

@keyframes random-card-out {
  to {
    transform: perspective(900px) rotateY(-76deg) scale(.94);
    opacity: 0;
  }
}

@keyframes random-card-in {
  from {
    transform: perspective(900px) rotateY(76deg) scale(.94);
    opacity: 0;
  }

  to {
    transform: perspective(900px) rotateY(0) scale(1);
    opacity: 1;
  }
}

#detailView.edge-back-dragging {
  transform: translate3d(var(--edge-back-x, 0px), 0, 0);
  opacity: var(--edge-back-opacity, 1);
  transition: none;
  will-change: transform, opacity;
}

#detailView.edge-back-settling {
  transition: transform 180ms cubic-bezier(.2, .82, .22, 1), opacity 160ms ease;
}

.deck-stage.fly-left .live-card {
  transform: translate3d(-122%, 5%, 0) rotate(-10deg);
  opacity: 0;
}

.deck-stage.fly-right .live-card {
  transform: translate3d(122%, 5%, 0) rotate(10deg);
  opacity: 0;
}

.deck-stage.fly-left .next {
  z-index: 2;
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
  opacity: 1;
}

.deck-stage.fly-right .prev {
  z-index: 2;
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
  opacity: 1;
}

.style-card::before,
.share-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255,255,255,.22) 39%, transparent 40%),
    repeating-linear-gradient(90deg, rgba(27, 20, 8, .06) 0 1px, transparent 1px 46px);
  content: "";
}

.cover-card::before {
  display: none;
}

.cover-card {
  min-height: 0;
  padding: 0;
  border-color: rgba(255, 236, 187, 0.18);
  border-radius: 24px;
  background: #0e0c08;
  color: #fff6dc;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.62);
}

.deck-stage .cover-card {
  min-height: 0;
}

.cover-image,
.cover-shade {
  position: absolute;
  inset: 0;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-slot {
  position: relative;
  background-color: #11100c;
}

.image-managed {
  opacity: 0;
  transition: opacity 160ms ease;
}

.image-loaded > .image-managed,
.image-loaded .image-managed,
.image-managed[data-image-state="loaded"] {
  opacity: 1;
}

.image-slot.image-failed::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(217, 170, 69, 0.13), transparent 58%),
    repeating-linear-gradient(90deg, rgba(243, 212, 134, 0.055) 0 1px, transparent 1px 42px),
    #11100c;
  color: #d8c694;
  content: attr(data-image-label);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
}

.cover-card.image-failed::after {
  z-index: 1;
  font-size: 18px;
}

.cover-shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 24%, transparent 50%, rgba(0, 0, 0, 0.84)),
    radial-gradient(circle at 50% 38%, transparent 0 34%, rgba(0, 0, 0, 0.28) 78%);
}

.cover-top,
.cover-title {
  position: absolute;
  z-index: 2;
  right: 16px;
  left: 16px;
}

.cover-top {
  top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cover-top > span {
  min-width: 52px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 246, 220, 0.32);
  border-radius: 999px;
  background: rgba(12, 10, 7, 0.42);
  color: #f5d98e;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(14px);
}

.cover-card .card-action {
  border-color: rgba(255, 246, 220, 0.28);
  background: rgba(12, 10, 7, 0.48);
  color: #fff6dc;
  backdrop-filter: blur(14px);
}

.cover-title {
  bottom: 22px;
}

.cover-title h2 {
  margin: 0;
  max-width: 95%;
  color: #fff6dc;
  font-size: clamp(38px, 11vw, 58px);
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.72);
}

.cover-title p {
  margin: 10px 0 0;
  color: #f4cf76;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.7);
}

.badge-row,
.card-actions,
.deck-controls,
.chip-row,
.feature-grid,
.prompt-actions {
  display: flex;
  align-items: center;
}

.badge-row {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  max-width: 72%;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #17130d;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.card-actions {
  gap: 8px;
}

.card-action {
  width: 44px;
  height: 44px;
  border-color: rgba(20, 15, 6, 0.16);
  background: #17130d;
  color: var(--paper);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
}

.card-action.saved {
  color: var(--danger);
}

.visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 282px;
  margin: 22px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(22, 18, 12, 0.22);
  border-radius: 14px;
  background: #111;
  box-shadow: inset 0 0 0 8px rgba(243, 231, 201, 0.14);
}

.visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-title {
  position: relative;
  z-index: 2;
  align-self: end;
  margin: 0 0 24px;
  color: var(--paper);
  font-size: clamp(38px, 13vw, 58px);
  font-weight: 600;
  line-height: 0.95;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.visual .visual-title {
  display: none;
}

.style-card h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(36px, 12vw, 56px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0;
}

.zh-name {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: #57451e;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.summary {
  position: relative;
  z-index: 1;
  margin: 14px 0;
  color: #3f3422;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.62;
}

.card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(22, 18, 12, 0.14);
  color: #5d4a22;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.card-footer button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(22, 18, 12, 0.18);
  border-radius: var(--radius);
  background: #17130d;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
}

.chip-row {
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(22, 18, 12, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  color: #302716;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
}

.deck-controls {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 12px;
  margin: 12px 0 24px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
}

.random-control {
  justify-self: center;
  min-width: 78px;
}

.arrow-btn {
  width: 46px;
  height: 44px;
  color: var(--gold-2);
  font-size: 20px;
}

.category-strip h2,
.detail h2 {
  margin: 0 0 12px;
  color: var(--paper);
  font-size: 18px;
}

.category-cards {
  display: grid;
  gap: 12px;
}

.category-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 132px;
  align-items: center;
  min-height: 102px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.category-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 56%);
  content: "";
}

.category-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.category-copy strong {
  max-width: 180px;
  color: #fff4d1;
  font-size: 15px;
  line-height: 1.25;
}

.category-copy small {
  color: #c9b47e;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.category-stack {
  position: relative;
  z-index: 1;
  height: 76px;
}

.category-stack img {
  position: absolute;
  top: 0;
  width: 52px;
  height: 76px;
  border: 1px solid rgba(255, 239, 190, 0.22);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.34);
}

.category-stack img:nth-child(1) {
  right: 72px;
  transform: rotate(-8deg);
}

.category-stack img:nth-child(2) {
  right: 36px;
  transform: rotate(2deg);
}

.category-stack img:nth-child(3) {
  right: 0;
  transform: rotate(9deg);
}

.detail {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow-anchor: none;
}

.detail-hero {
  margin: 8px 0 18px;
}

.detail .style-card {
  min-height: auto;
}

.detail-hero .visual {
  height: auto;
  aspect-ratio: 3 / 5;
}

.detail-hero .visual img {
  object-fit: contain;
}

.detail-section .chip {
  border-color: rgba(217, 170, 69, 0.36);
  background: rgba(217, 170, 69, 0.16);
  color: #f4e5bd;
  font-weight: 700;
}

.detail-section {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.access-note {
  display: inline-flex;
  margin: -2px 0 8px;
  padding: 6px 10px;
  border: 1px solid rgba(243, 212, 134, 0.28);
  border-radius: 999px;
  background: rgba(217, 170, 69, 0.12);
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.detail-section p {
  margin: 0;
  color: #dbcba4;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: #dbcba4;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

.detail-list li + li {
  margin-top: 6px;
}

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

.gallery-item {
  min-width: 0;
  margin: 0;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #111;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  min-height: 44px;
}

.gallery-item figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 11px;
  line-height: 1.35;
}

.gallery-item a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold-2);
  text-decoration: none;
}

.feature-grid {
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-grid span {
  flex: 1 1 44%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
}

.prompt-box {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0e0d0a;
  color: var(--paper);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

.example-card {
  margin: 0;
}

.example-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 10px;
  background: #111;
}

.example-open {
  overflow: hidden;
  cursor: zoom-in;
}

.example-card figcaption {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.example-card strong {
  color: var(--paper);
  font-size: 14px;
}

.example-card a {
  color: var(--gold-2);
  text-decoration: none;
}

.prompt-actions {
  gap: 8px;
  margin-top: 10px;
}

.overview-actions {
  display: flex;
  justify-content: flex-start;
  margin: 4px 0 12px;
}

.overview-actions .copy-btn {
  min-height: 44px;
  border-color: rgba(67, 50, 18, 0.22);
  background: rgba(255, 255, 255, 0.28);
  color: #302716;
  font-weight: 800;
}

.locked-section {
  position: relative;
  min-height: 190px;
  overflow: hidden;
}

.locked-preview {
  filter: blur(2px);
  opacity: 0.42;
  user-select: none;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(12, 11, 8, 0.52), rgba(12, 11, 8, 0.92)),
    radial-gradient(circle at 50% 0, rgba(217, 170, 69, 0.18), transparent 70%);
  text-align: left;
}

.lock-overlay span {
  width: max-content;
  padding: 4px 8px;
  border: 1px solid rgba(243, 212, 134, 0.32);
  border-radius: 999px;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.lock-overlay strong {
  color: var(--paper);
  font-size: 20px;
}

.lock-overlay p {
  color: #d8c694;
}

.lock-overlay .copy-btn {
  justify-self: start;
  margin-top: 4px;
}

.export-section {
  display: grid;
  gap: 10px;
}

.export-status {
  min-height: 20px;
  color: var(--gold-2) !important;
  font-size: 12px !important;
}

[data-export-control][disabled] {
  cursor: wait;
  opacity: 0.52;
}

.export-section .copy-btn {
  width: 100%;
  min-height: 44px;
  text-align: left;
}

.export-ratios {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.export-ratios .copy-btn {
  min-width: 0;
  padding: 0 6px;
  text-align: center;
}

.locked-export {
  border-color: rgba(243, 212, 134, 0.34);
  background: rgba(217, 170, 69, 0.11);
  color: #d8c694;
}

.plus-export-ready {
  border-color: rgba(243, 212, 134, 0.48);
  background: rgba(217, 170, 69, 0.2);
  color: var(--gold-2);
}

.copy-btn {
  min-height: 44px;
  padding: 0 12px;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
}

.about-hero h1,
.screenshot-head h1 {
  margin: 0 0 14px;
  color: var(--paper);
  font-size: 27px;
  line-height: 1.08;
}

.about-hero p + p,
.detail-section p + p {
  margin-top: 10px;
}

.screenshot-kit {
  padding-bottom: 24px;
}

.screenshot-head {
  padding: 18px 0;
}

.screenshot-head p {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.screenshot-head span {
  display: block;
  color: #d8c694;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.screenshot-grid {
  display: grid;
  gap: 18px;
}

.screenshot-card {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  padding: 24px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0, rgba(217, 170, 69, 0.28), transparent 45%),
    linear-gradient(180deg, #17130d, #080806);
  box-shadow: 0 28px 70px rgba(0,0,0,.45);
}

.shot-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.shot-copy strong {
  max-width: 92%;
  color: #fff5d4;
  font-size: 31px;
  line-height: 1.06;
}

.shot-copy span {
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.screenshot-card > small {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 3;
  color: rgba(255, 246, 220, .72);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.shot-card-visual,
.shot-panel,
.shot-list,
.shot-export,
.shot-paywall {
  position: absolute;
  right: 18px;
  bottom: 46px;
  left: 18px;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(243, 212, 134, .28);
  border-radius: 18px;
  background: rgba(255,255,255,.06);
}

.shot-card-visual {
  height: 62%;
}

.shot-card-visual img,
.shot-export img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-card-visual::after {
  position: absolute;
  inset: 30% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.82));
  content: "";
}

.shot-card-visual h2,
.shot-card-visual p {
  position: absolute;
  z-index: 2;
  left: 16px;
  margin: 0;
}

.shot-card-visual h2 {
  bottom: 42px;
  color: #fff6dc;
  font-size: 34px;
  line-height: .95;
}

.shot-card-visual p {
  bottom: 16px;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-weight: 800;
}

.shot-panel,
.shot-paywall {
  display: grid;
  gap: 12px;
  padding: 16px;
  color: #dfd0aa;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
}

.shot-panel h3,
.shot-paywall h2 {
  margin: 0;
  color: var(--paper);
  font-size: 22px;
}

.shot-panel p,
.shot-paywall p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.shot-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.shot-list span {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--paper);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 13px;
}

.shot-list img {
  width: 52px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
}

.shot-export {
  height: 58%;
}

.shot-export button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(8,8,6,.88);
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
}

.shot-paywall ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}

.search-panel {
  position: sticky;
  top: var(--topbar-height);
  z-index: 5;
  padding: 12px 0 14px;
  background: linear-gradient(180deg, rgba(8, 8, 6, 0.96), rgba(8, 8, 6, 0.86));
  backdrop-filter: blur(14px);
}

.search-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 44px;
  min-height: 48px;
  border: 1px solid rgba(243, 212, 134, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.search-box:focus-within {
  border-color: rgba(243, 212, 134, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.search-box input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 16px;
}

.search-box input:focus-visible {
  outline: none;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-box button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}

.filters {
  flex-wrap: nowrap;
  gap: 8px;
  margin-inline: -2px;
  margin-top: 10px;
  padding: 0 2px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filters .chip {
  flex: 0 0 auto;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.filters .chip.active {
  border-color: var(--gold);
  color: var(--gold-2);
}

.result-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.result-list.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  min-height: 98px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  content-visibility: auto;
  contain-intrinsic-size: 118px;
}

.result-open {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.gallery-grid .result-card {
  display: block;
  min-height: 0;
  padding: 8px;
}

.gallery-grid .result-open {
  display: block;
  width: 100%;
}

.thumb-slot {
  display: block;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border-radius: var(--radius);
}

.thumb-slot .thumb {
  display: block;
}

.gallery-grid .thumb-slot {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  margin-bottom: 9px;
}

.gallery-grid .thumb-slot .thumb {
  height: 100%;
  margin-bottom: 0;
}

.gallery-grid .thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  margin-bottom: 9px;
}

.gallery-grid .result-card h3 {
  font-size: 14px;
}

.gallery-grid .result-card p {
  display: none;
}

.gallery-grid .card-action {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 44px;
  height: 44px;
}

.thumb {
  height: 78px;
  width: 78px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #111;
}

.result-card h3 {
  margin: 0;
  color: var(--paper);
  font-size: 17px;
  line-height: 1.1;
}

.result-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.empty {
  padding: 28px 14px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  text-align: center;
}

.category-card,
.gallery-item,
.screenshot-card {
  content-visibility: auto;
}

.category-card {
  contain-intrinsic-size: 116px;
}

.gallery-item {
  contain-intrinsic-size: 220px 290px;
}

.screenshot-card {
  contain-intrinsic-size: 390px 694px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(2px);
}

.drawer {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right), calc((100vw - 430px) / 2 + 12px));
  z-index: 90;
  width: min(250px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(16, 14, 11, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  opacity: 0;
  pointer-events: none;
  transition: 160ms ease;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--paper);
}

.drawer-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.drawer-nav {
  display: grid;
  gap: 8px;
}

.nav-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 14px;
  text-align: left;
  padding: 0 14px;
}

.nav-btn.active {
  background: rgba(217, 170, 69, 0.16);
  color: var(--gold-2);
}

.plus-nav {
  border-color: rgba(243, 212, 134, 0.42);
  color: var(--gold-2);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 96px;
  left: 22px;
  z-index: 180;
  max-width: 390px;
  margin: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 10, 8, 0.94);
  color: var(--paper);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 13px;
  text-align: center;
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  background: rgba(4, 4, 3, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.plus-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  place-items: end center;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(4, 4, 3, 0.72);
  backdrop-filter: blur(10px);
}

.plus-modal[hidden] {
  display: none;
}

.plus-panel {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(26, 22, 15, 0.98), rgba(11, 10, 8, 0.98)),
    var(--panel);
  color: var(--paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.68);
}

.plus-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid rgba(243, 212, 134, 0.34);
  border-radius: 999px;
  background: rgba(13, 11, 8, 0.94);
  color: var(--paper);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 24px;
  line-height: 1;
}

.plus-close:active {
  transform: scale(0.96);
}

.plus-kicker {
  margin: 0 0 8px;
  padding-right: 52px;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.plus-panel h2 {
  margin: 0;
  padding-right: 52px;
  color: #fff5d4;
  font-size: 24px;
  line-height: 1.15;
}

.plus-subtitle {
  margin: 10px 48px 16px 0;
  color: #d8c694;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.plus-note {
  margin-top: -8px;
  color: #bfae83;
}

.plus-benefits {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #efe2bd;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 13px;
}

.plus-benefits li {
  padding: 10px 12px;
  border: 1px solid rgba(243, 212, 134, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  overflow-wrap: anywhere;
}

.plan-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.plan-compare > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(243, 212, 134, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.plan-compare h3 {
  margin: 0 0 8px;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 13px;
}

.plan-compare ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #d8c694;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 11px;
  line-height: 1.35;
}

.plus-price {
  display: grid;
  gap: 5px;
  margin: 16px 0;
  color: var(--gold-2);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-weight: 800;
}

.plus-price small {
  color: var(--muted);
  font-weight: 700;
}

.plus-footnote {
  margin: -4px 0 12px;
  color: #b8a77d;
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.plus-cta {
  width: 100%;
  min-height: 50px;
  border-color: #f3d486;
  background: #ddb455;
  color: #171109;
  box-shadow: 0 10px 28px rgba(217, 170, 69, 0.24);
  font-family: ui-sans-serif, system-ui, "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 850;
  opacity: 1;
  white-space: normal;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.plus-cta:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
  background: #edc86d;
  box-shadow: 0 5px 16px rgba(217, 170, 69, 0.2);
}

.plus-cta:disabled {
  cursor: default;
  border-color: rgba(243, 212, 134, 0.24);
  background: rgba(217, 170, 69, 0.11);
  color: #bba66f;
  box-shadow: none;
  opacity: 0.78;
}

.plus-restore {
  width: 100%;
  margin-top: 8px;
  border-color: rgba(243, 212, 134, 0.22);
  background: rgba(255, 246, 220, 0.04);
}

.lightbox img {
  max-width: min(100%, 430px);
  max-height: 78vh;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.lightbox-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 15, 10, 0.88);
  color: var(--paper);
  font-size: 24px;
}

.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.a11y-debug-panel {
  position: fixed;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 999;
  max-width: min(280px, calc(100vw - 16px));
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 229, 154, 0.55);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.88);
  color: #fff4cd;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  pointer-events: none;
}

@media (max-width: 350px) {
  .top-actions {
    gap: 4px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 9px;
  }

  .brand-primary {
    font-size: 13px;
  }

  .brand-secondary,
  .topbar.has-back .brand-primary {
    font-size: 10px;
  }

  .plan-compare {
    grid-template-columns: 1fr;
  }

  .plan-compare ul {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  html {
    scroll-behavior: auto !important;
  }

  .deck-stage .style-card,
  .drawer,
  .toast {
    transition: none !important;
  }

  .deck-stage.fly-left .live-card,
  .deck-stage.fly-right .live-card,
  .deck-stage.fly-left .next,
  .deck-stage.fly-right .prev {
    transform: none !important;
  }
}
