:root {
  color-scheme: light;
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-soft: #fff2e9;
  --ink: #3b2b2c;
  --muted: #7d6664;
  --line: #efd8ce;
  --accent: #e85f7f;
  --accent-deep: #bf3f62;
  --mint: #69b7a7;
  --gold: #f4b34f;
  --shadow: 0 18px 50px rgba(132, 72, 70, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 179, 79, 0.2), transparent 34rem),
    linear-gradient(135deg, #fff8f2 0%, #fff0f5 52%, #f4fbf7 100%);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px 24px;
  align-items: center;
  min-height: 0;
  padding: 26px;
  border: 1px solid rgba(232, 95, 127, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 242, 233, 0.88)),
    repeating-linear-gradient(45deg, rgba(232, 95, 127, 0.08) 0 10px, transparent 10px 22px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.55rem;
}

h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.35;
}

.work-title {
  max-width: 780px;
  color: #24191a;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0;
}

.hero__text {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.draw-panel {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 12px;
  align-items: stretch;
}

.hero__ticket {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 154px;
  border: 2px dashed rgba(232, 95, 127, 0.45);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(232, 95, 127, 0.18);
  transform: rotate(-1deg);
}

.hero__ticket:hover {
  box-shadow: 0 18px 34px rgba(232, 95, 127, 0.24);
  transform: translateY(-2px) rotate(-1deg);
}

.hero__ticket:active {
  transform: translateY(0) scale(0.98) rotate(-1deg);
}

.hero__ticket > span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.hero__ticket strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transform: translateY(-15px);
}

.hero__ticket-icon {
  width: 52px;
  height: 52px;
  display: inline-block;
  object-fit: contain;
  flex-shrink: 0;
}

.hero__ticket-text {
  display: inline-block;
  color: var(--accent);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
}

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

.quick-draw-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--accent-deep);
  background: #ffe8ef;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 10px 20px rgba(232, 95, 127, 0.1);
}

.section {
  display: none;
  margin-top: 14px;
}

.section--active {
  display: block;
}

.panel,
.work-card,
.paid-teaser {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
}

.panel__head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.section-note {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.draw-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button,
.soft-button,
.ghost-button,
.draw-box [data-free-filter],
.paid-entry-button,
.filter-group button,
.series-group button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  white-space: normal;
  text-align: center;
}

.primary-button {
  min-width: 180px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(232, 95, 127, 0.28);
  font-weight: 800;
}

.soft-button,
.draw-box [data-free-filter],
.filter-group button,
.series-group button {
  color: var(--accent-deep);
  background: #ffe8ef;
  font-weight: 700;
}

.paid-entry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, #d94d72, #f08a7d);
  box-shadow: 0 10px 22px rgba(217, 77, 114, 0.2);
  font-weight: 800;
}

.paid-entry-button__icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  object-fit: contain;
  flex-shrink: 0;
}

.paid-entry-button__text {
  display: inline-block;
}

.quick-draw-grid button {
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 16px;
  font-weight: 800;
}

.ghost-button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.series-group {
  display: flex;
  gap: 12px;
  margin-top: 0;
}

.series-group button {
  flex: 1 1 0;
  color: #27766b;
  background: #e7f6f1;
}

#openCompanionCollection {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

#openCompanionCollection .companion-button__icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  object-fit: contain;
  flex-shrink: 0;
}

#openCompanionCollection .companion-button__text {
  display: inline-block;
}

.result-area {
  margin-top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.work-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 8px solid var(--accent);
  pointer-events: none;
}

.work-card--paid::before {
  border-top-color: var(--mint);
}

.series-card::before {
  border-top-color: var(--gold);
}

.companion-card {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.companion-card::before {
  border-top-color: var(--accent);
}

.card-kicker {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 800;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #4b3a3b;
  background: var(--surface-soft);
  font-size: 0.9rem;
}

.meta,
.note,
.reason {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.note {
  color: var(--ink);
  font-size: 1.03rem;
}

.reason {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f3faf7;
}

.rich-text {
  white-space: pre-line;
}

.rich-text strong {
  font-weight: 800;
  color: inherit;
}

.unlock-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.unlock-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: min(100%, 260px);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(232, 95, 127, 0.28);
  background: linear-gradient(135deg, #fff8fb, #ffe8ef);
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  box-shadow: 0 6px 14px rgba(232, 95, 127, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.unlock-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow: 0 10px 20px rgba(232, 95, 127, 0.16);
}

.unlock-cta__label {
  display: block;
}

.unlock-cta__note {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.free-audio-block {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 95, 127, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
}

.free-audio-head {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.free-audio-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.free-audio-version {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--accent-deep);
  background: #fff4f7;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.free-audio-version.is-active {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

.free-audio-el {
  display: block;
  width: 100%;
  margin: 0 0 10px;
}

.sleep-timer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sleep-timer__label {
  width: 100%;
  margin: 0 0 2px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.sleep-timer__btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface-soft);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.sleep-timer__btn:hover {
  filter: brightness(1.03);
}

.free-audio-night-msg {
  margin: 10px 0 0;
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 0.95rem;
}

.series-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.series-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #fff8f2);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.5;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.link-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-deep);
  font-weight: 700;
}

.paid-teaser {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px 20px;
}

.paid-teaser p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}

.list-head h3 {
  font-size: 1.25rem;
}

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 22px, 1080px);
    padding-top: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .draw-panel {
    grid-template-columns: 1fr;
  }

  .hero__ticket {
    min-height: 126px;
  }

  .hero__ticket-icon {
    width: 46px;
    height: 46px;
  }

  .quick-draw-grid button {
    min-height: 58px;
  }

  .series-group {
    grid-column: auto;
  }

  .panel__head,
  .paid-teaser,
  .list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .draw-box,
  .filter-group,
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  #openCompanionCollection {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .primary-button,
  .soft-button,
  .ghost-button,
  .draw-box [data-free-filter],
  .quick-draw-grid button,
  .paid-entry-button,
  .filter-group button,
  .series-group button,
  .link-button {
    width: 100%;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .paid-entry-button__icon {
    width: 22px;
    height: 22px;
  }

  #openCompanionCollection .companion-button__icon {
    width: 22px;
    height: 22px;
  }
}
