:root {
  --canvas: #f7f7f2;
  --paper: #faf0db;
  --ink: #21221e;
  --muted: #62655d;
  --blue: #2448c7;
  --orange: #f67c39;
  --stroke: #d6d7cd;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Georgia", "Noto Serif SC", "Songti SC", "Times New Roman", serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --header-height: 77px;
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.42 0 0 0 0 0.36 0 0 0 0 0.26 0 0 0 0.14 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
[hidden] { display: none !important; }
::selection { background: #f7b487; color: #1f251e; }

.glyphs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--canvas);
  border-bottom: 1px solid var(--stroke);
}

.reading-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}
.reading-progress-track[data-active="true"] { opacity: 1; }
.reading-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  transform-origin: left center;
  transform: scaleX(0);
}

.head-inner, .desk {
  width: min(1144px, calc(100% - clamp(48px, 11.4vw, 184px)));
  margin-inline: auto;
}

.head-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-name {
  font: 800 26px/1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -1.5px;
  white-space: nowrap;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.help-link, .account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #c6c8bf;
  background: transparent;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  min-height: 38px;
  white-space: nowrap;
}
.help-link .icon, .account-link .icon { width: 16px; height: 16px; }
.account-link {
  border-color: #1f3ca8;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 2px 0 #162e84;
}

.desk {
  --desk-inset: clamp(16px, 3dvh, 36px);
  min-height: calc(100vh - var(--header-height) - 1px);
  min-height: calc(100dvh - var(--header-height) - 1px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-block: var(--desk-inset);
}

.ticket {
  --ticket-gutter: clamp(28px, 4vw, 60px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #bfc0b2;
  border-radius: 17px;
  background: #fffefa;
  box-shadow: 0 3px 0 #e4e3d8, 0 12px 24px -18px #222a1e44;
}

.ticket-top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  background: var(--paper);
}

.ticket-face {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.04fr;
  align-items: stretch;
  min-height: clamp(335px, 28vw, 405px);
}

.ticket-face::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image: var(--paper-grain);
  mix-blend-mode: multiply;
}

.paper-light {
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 280px;
  height: 280px;
  opacity: 0;
  background: radial-gradient(ellipse at center, #fffbe6c9 0, #fff8d15c 42%, transparent 70%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: clamp(30px, 3.2vw, 46px) 0 clamp(28px, 3vw, 42px) clamp(32px, 4vw, 60px);
  align-self: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 650 12px/1.3 var(--mono);
  letter-spacing: .06em;
  color: #5a5d52;
  text-transform: uppercase;
}
.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

h1 {
  margin: 12px 0 22px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", var(--sans);
  font-size: clamp(58px, 5.8vw, 84px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.065em;
}

.title-line { display: block; width: fit-content; }
.latin-line { overflow: clip; padding-right: .18em; }
.lettering {
  display: block;
  font: italic 500 1.2em/.96 var(--serif);
  letter-spacing: -.045em;
  transform-origin: 0 90%;
}

.title-cn { position: relative; line-height: 1.18; padding-bottom: 6px; }
.blue-title { color: var(--blue); position: relative; display: inline-block; }
.blue-title::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -6px;
  width: 86%;
  height: 8px;
  background: var(--orange);
  clip-path: polygon(0 58%, 8% 26%, 41% 9%, 69% 17%, 99% 55%, 98% 72%, 53% 58%, 16% 82%, 2% 100%);
  transform: rotate(-1.8deg);
  transform-origin: left center;
}

.sort { display: inline-block; }
.sort:nth-child(1) { --index: 0; }
.sort:nth-child(2) { --index: 1; }
.sort:nth-child(3) { --index: 2; }

.title-dot {
  position: relative;
  display: inline-block;
  width: .17em;
  height: .17em;
  margin-left: .105em;
  border-radius: 50%;
  background: var(--orange);
  vertical-align: .035em;
}
.title-dot i {
  position: absolute;
  inset: -60%;
  background: var(--orange);
  opacity: 0;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}

.hero-intro {
  margin: 0;
  color: #52554b;
  font-size: clamp(14px, 1.14vw, 16px);
  line-height: 1.8;
  letter-spacing: .02em;
}

.art-stage { position: relative; min-width: 0; pointer-events: auto; }
.art-bed { position: absolute; inset: 0; isolation: isolate; pointer-events: none; }
.halftone {
  position: absolute;
  inset: 8% 1% 4% -6%;
  opacity: .5;
  background-image: radial-gradient(circle, #c0ac83 1.05px, transparent 1.25px);
  background-size: 6px 6px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 71%);
  transform: rotate(-8deg);
}

.art-mount {
  position: absolute;
  inset: 7% 7% 6% 2%;
  z-index: 1;
  display: grid;
  place-items: center;
}

.art-folio {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 340px;
  max-height: 310px;
  transform: rotate(7deg);
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 14px 18px rgba(34, 42, 30, .14));
}

.spark {
  position: absolute;
  z-index: 2;
  display: block;
  background: var(--orange);
  clip-path: polygon(50% 0, 58% 36%, 85% 15%, 67% 42%, 100% 50%, 65% 57%, 85% 89%, 56% 68%, 49% 100%, 42% 65%, 12% 86%, 33% 57%, 0 49%, 35% 42%, 15% 14%, 43% 34%);
}
.spark-a { width: 52px; height: 52px; left: 2%; top: 9%; transform: rotate(11deg); }
.spark-b { width: 22px; height: 22px; right: 11%; top: 10%; background: var(--blue); transform: rotate(14deg); }

.annotation {
  position: absolute;
  z-index: 3;
  left: 71%;
  top: 52%;
  color: #253f8e;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transform: rotate(-8deg);
  pointer-events: none;
}
.ink-arrow { width: 65px; height: 41px; align-self: flex-start; margin: 0 23px -4px 0; transform: rotate(8deg); }
.annotation span { font: italic 22px/1 var(--serif); letter-spacing: -1px; white-space: nowrap; }

.ticket-stub {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-block: 26px;
  background: #f5e7c9;
  border-left: 1px dashed #b7a887;
  color: #242a23;
}
.ticket-stub::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--blue);
  transform: scaleY(0);
  transform-origin: 50% 100%;
}

.stub-star { font: 40px/.9 var(--serif); color: var(--orange); }
.barcode {
  height: 65px;
  width: 26px;
  background: repeating-linear-gradient(
    to bottom,
    #34372c 0 2px, transparent 2px 4px,
    #34372c 4px 5px, transparent 5px 8px,
    #34372c 8px 12px, transparent 12px 14px,
    #34372c 14px 16px, transparent 16px 20px,
    #34372c 20px 23px, transparent 23px 25px
  );
}

.perforation {
  position: relative;
  z-index: 3;
  height: 1px;
  background: repeating-linear-gradient(to right, #c0bba8 0 6px, transparent 6px 12px);
}
.perforation::before, .perforation::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 25px;
  height: 25px;
  border: 1px solid #bfc0b2;
  border-radius: 50%;
  background: var(--canvas);
}
.perforation::before { left: -1px; transform: translate(-50%, -50%); }
.perforation::after { right: -1px; transform: translate(50%, -50%); }

.entry { padding: 26px var(--ticket-gutter) 24px; }
.entry-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.entry-heading label { font-weight: 750; font-size: clamp(20px, 1.6vw, 24px); letter-spacing: -.045em; }
.entry-row { display: flex; gap: 12px; }

.input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 54px;
  border: 1px solid #c4c6bc;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 1px 2px #1f27100a;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input-shell:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #2448c71a; }
.input-icon { margin-left: 16px; color: #70766c; }
.input-shell input {
  appearance: none;
  min-width: 0;
  flex: 1;
  align-self: stretch;
  border: 0;
  outline: none;
  padding: 0;
  background: none;
  color: #22251e;
  font-size: 15px;
}
.input-shell input::placeholder { color: #76796f; opacity: 1; }

.paste {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: none;
  padding: 7px 10px;
  border: 1px solid #dadbd2;
  border-radius: 6px;
  background: #f7f7f2;
  color: #464b41;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  margin-right: 8px;
}
.paste .icon { width: 14px; height: 14px; }

.submit {
  flex: 0 0 174px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #1e3fb4;
  border-radius: 9px;
  color: #ffffff;
  background: var(--blue);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .02em;
  min-height: 54px;
  box-shadow: 0 2px 0 #173491;
}
.submit .icon { width: 19px; height: 19px; }

.filter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
}

.category-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #dadbd1;
  border-radius: 999px;
  background: #f7f6ee;
  color: #4d5148;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.cat-tab[aria-pressed="true"] {
  border-color: #2140ad;
  background: #edf1fd;
  color: var(--blue);
}
.cat-count {
  font: 650 11px/1 var(--mono);
  opacity: .78;
}

.message {
  margin: 0;
  color: #63675c;
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.message[data-tone="error"] { color: #a43224; }
.message[data-tone="ready"] { color: #2d5b3c; }

/* Article Ticket-Slip Grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 16px;
  border: 1px solid #d4d2c4;
  border-radius: 12px;
  background: linear-gradient(155deg, #fffdf7 0%, #fcf8eb 100%);
  box-shadow: 0 2px 0 #e6e3d5;
  text-align: start;
}

.post-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
}

.post-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.post-issue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 650 11.5px/1 var(--mono);
  letter-spacing: .06em;
  color: #5b5e54;
}
.post-issue i {
  display: inline-block;
  width: 8px;
  height: 3px;
  background: var(--orange);
  transform: skewX(-16deg);
}

.post-cat-badge {
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #d7d5c6;
  background: #f6f2e4;
  color: #3a466b;
  font-size: 11.5px;
  font-weight: 640;
}

.post-card-title {
  margin: 0 0 8px;
  font-size: 18.5px;
  font-weight: 760;
  line-height: 1.38;
  letter-spacing: -.025em;
  color: var(--ink);
}

.post-card-excerpt {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #55594f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-foot {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px dashed #d9d6c8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #65685e;
}

.post-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
}

.post-read-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-weight: 660;
}
.post-read-cta .icon { width: 14px; height: 14px; }

.post-empty {
  grid-column: 1 / -1;
  padding: 32px 20px;
  border: 1px dashed #cbc8b7;
  border-radius: 12px;
  background: #fbf8ee;
  text-align: center;
}
.post-empty p { margin: 0 0 12px; color: #565a50; font-size: 14px; }
.post-empty button {
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid #c5c7bc;
  background: #ffffff;
  font-size: 13px;
  font-weight: 620;
}

/* Inline Editorial Article Reader */
.article-reader {
  margin-top: 6px;
  scroll-margin-top: calc(var(--header-height) + 18px);
}
body:has(#pinned-bar:not([hidden])) .article-reader {
  scroll-margin-top: calc(var(--header-height) + var(--pinned-height) + 18px);
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #cfcbbd;
}

.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid #c7c9be;
  border-radius: 8px;
  background: #f7f7f2;
  font-size: 13px;
  font-weight: 640;
}
.reader-back .icon { width: 15px; height: 15px; transform: rotate(180deg); }

.reader-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #c7c9be;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 640;
}
.stamp-btn .icon { width: 15px; height: 15px; }
.stamp-btn[aria-pressed="true"] {
  border-color: #9dc0a6;
  background: #e9f3ea;
  color: #2c5b3b;
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: 32px;
  align-items: start;
  margin-top: 22px;
}

.reader-article { min-width: 0; }

.reader-header { margin-bottom: 22px; }
.reader-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font: 620 12px/1.2 var(--mono);
  color: #5d6055;
}
.reader-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 35px);
  font-weight: 820;
  line-height: 1.25;
  letter-spacing: -.04em;
  color: var(--ink);
}
.reader-subtitle {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: #53564c;
}

.reader-prose {
  font-size: 15.5px;
  line-height: 1.85;
  color: #2b2d27;
}
.reader-prose h2 {
  margin: 28px 0 12px;
  padding-top: 8px;
  font-size: 20px;
  font-weight: 760;
  line-height: 1.35;
  letter-spacing: -.025em;
  color: #1f3376;
  scroll-margin-top: 96px;
}
.reader-prose h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  font-weight: 720;
  color: var(--ink);
  scroll-margin-top: 96px;
}
.reader-prose p { margin: 0 0 14px; }
.reader-prose ul, .reader-prose ol { margin: 0 0 16px; padding-left: 20px; }
.reader-prose li + li { margin-top: 6px; }
.reader-prose blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--orange);
  border-radius: 0 8px 8px 0;
  background: #faf3e2;
  color: #42443a;
  font-size: 14.5px;
}
.reader-prose pre {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #d5d4c7;
  border-radius: 10px;
  background: #f5f4ec;
  overflow-x: auto;
  font: 13px/1.6 var(--mono);
  color: #22261e;
}
.reader-prose code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #f0efe5;
  font: .88em var(--mono);
}
.reader-prose pre code { padding: 0; background: none; font-size: inherit; }

.reader-callout {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px dashed #9da8c6;
  border-radius: 10px;
  background: #f3f6fd;
  font-size: 14px;
  line-height: 1.7;
  color: #2f3b5c;
}

.reader-toc {
  position: sticky;
  top: 96px;
  padding: 16px;
  border: 1px solid #d5d3c5;
  border-radius: 11px;
  background: #fbf8ef;
}
.reader-toc-title {
  margin: 0 0 10px;
  font: 700 12px/1.3 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5e6156;
}
.reader-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.reader-toc-link {
  display: block;
  padding: 5px 8px;
  border-left: 2px solid transparent;
  border-radius: 0 5px 5px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #575b51;
}
.reader-toc-link[aria-current="true"] {
  border-left-color: var(--blue);
  background: #edf1fc;
  color: var(--blue);
  font-weight: 650;
}

.reader-nav-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed #cfcbbd;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.reader-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d4d3c5;
  border-radius: 10px;
  background: #fcfaf1;
  text-align: start;
}
.reader-nav-btn[data-dir="next"] { text-align: end; }
.reader-nav-label { font: 650 11px/1.2 var(--mono); color: #676a5f; }
.reader-nav-title { font-size: 14px; font-weight: 700; color: var(--ink); }

/* Footer Rule + 3D Charm Stage */
.ticket-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, clamp(170px, 22vw, 288px));
  column-gap: clamp(12px, 3vw, 38px);
  align-items: center;
  position: relative;
  margin-inline: var(--ticket-gutter);
  border-top: 1px dashed #cfcbbd;
}

.rule-copy { padding-block: 16px; }
.ticket-rule h2 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}
.ticket-rule h2::before {
  content: "";
  width: 10px;
  height: 4px;
  background: var(--orange);
  transform: skewX(-16deg);
}
.ticket-rule p { margin: 4px 0 0; font-size: 13px; line-height: 1.7; color: #53564d; }

.charm-stage {
  height: clamp(114px, 15dvh, 152px);
  position: relative;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
}
.charm-stage:active { cursor: grabbing; }
.charm-stage::before, .charm-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.charm-stage::before {
  inset: 12% 0 6%;
  background: radial-gradient(circle, #bda77e .8px, transparent 1px) 0 0 / 5px 5px;
  mask-image: radial-gradient(ellipse, #0005 5%, transparent 72%);
}
.charm-stage::after {
  width: 56%;
  height: 9%;
  left: 22%;
  bottom: 3%;
  z-index: -1;
  background: radial-gradient(ellipse, #54577933, transparent 68%);
}

.charm-poster, .charm-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.charm-view, .charm-stage[data-charm-ready] .charm-poster { opacity: 0; }
.charm-stage[data-charm-ready] .charm-view { opacity: 1; }
html[data-motion="playing"] .charm-view,
html[data-motion="playing"] .charm-poster { transition: opacity 160ms ease; }

/* Bottom Motion Lab Strip */
.motion-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px dashed #ccc9b9;
  border-radius: 12px;
  background: #f3f1e7;
  font-size: 12.5px;
  color: #5b5f55;
}
.motion-bar-label {
  font: 650 11.5px/1 var(--mono);
  letter-spacing: .05em;
  color: #6b6e62;
}
.motion-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid #cdcbc0;
  border-radius: 999px;
  background: #ffffff;
  color: #353930;
  font-size: 12px;
  font-weight: 600;
}
.motion-chip[aria-pressed="true"] {
  border-color: #1f3da8;
  background: #edf1fd;
  color: var(--blue);
}

/* Ink Press Click Ripple */
.press-mark {
  position: fixed;
  z-index: 15;
  width: 26px;
  height: 26px;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid #2448c7a8;
  opacity: 0;
  animation: ink-press 300ms var(--ease-out) forwards;
}
.press-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--orange);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
@keyframes ink-press {
  0% { opacity: .82; transform: scale(.65) rotate(-18deg); }
  55% { opacity: .55; }
  100% { opacity: 0; transform: scale(1.45) rotate(12deg); }
}

/* Opening Letterpress Sequence */
@keyframes sheet-down {
  from { opacity: .45; transform: perspective(1000px) translateY(-18px) rotateX(3deg) rotate(-1deg); }
  to { opacity: 1; transform: none; }
}
@keyframes pull-type {
  from { opacity: .2; transform: translateY(.67em) rotate(5deg); }
  to { opacity: 1; transform: none; }
}
@keyframes place-sort {
  from { opacity: 0; transform: translateY(.38em) rotate(7deg) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes seat-stop {
  0% { opacity: 0; transform: translate(-.25em, -.44em) scale(.94); }
  62% { opacity: 1; transform: translateY(.025em) scale(1.06, .94); }
  82% { transform: translateY(-.08em); }
  100% { opacity: 1; transform: none; }
}
@keyframes draw-mark {
  from { transform: rotate(-1.8deg) scaleX(.025); opacity: 0; }
  to { transform: rotate(-1.8deg) scaleX(1); opacity: 1; }
}
@keyframes slip-in {
  from { opacity: .25; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}
@keyframes land-folio {
  from { opacity: .35; transform: translateY(-16px) rotate(-3deg) scale(.97); }
  to { opacity: 1; transform: rotate(7deg); }
}
@keyframes press-accent {
  0%, 53%, 94%, 100% { opacity: 0; transform: rotate(-45deg) scale(.6); }
  67%, 76% { opacity: 1; transform: rotate(0) scale(1.06); }
  90% { opacity: 0; transform: rotate(40deg) scale(.72); }
}

@media screen {
  html[data-motion="playing"] { scroll-behavior: smooth; }
  html[data-intro][data-motion="playing"] .ticket { animation: sheet-down 580ms var(--ease-out) backwards; transform-origin: 50% 5%; }
  html[data-intro][data-motion="playing"] .lettering { animation: pull-type 760ms 60ms var(--ease-out) backwards; }
  html[data-intro][data-motion="playing"] .sort { animation: place-sort 590ms calc(140ms + var(--index) * 55ms) var(--ease-out) backwards; }
  html[data-intro][data-motion="playing"] .title-dot { animation: seat-stop 540ms 390ms var(--ease-out) backwards; }
  html[data-intro][data-motion="playing"] .blue-title::after { animation: draw-mark 720ms 480ms var(--ease-out) backwards; }
  html[data-intro][data-motion="playing"] .art-folio { animation: land-folio 840ms 65ms var(--ease-out) backwards; }
  html[data-intro][data-motion="playing"] .hero-intro { animation: slip-in 460ms 180ms var(--ease-out) backwards; }
  html[data-intro][data-motion="playing"] .entry-heading,
  html[data-intro][data-motion="playing"] .entry-row { animation: slip-in 490ms 240ms var(--ease-out) backwards; }
  html[data-intro][data-motion="playing"] .entry-row { animation-delay: 285ms; }

  html[data-motion="playing"] .ticket-stub::before { transition: transform 270ms var(--ease-io); }
  html[data-motion="playing"] .stub-star { transition: transform 250ms var(--ease-out), color 160ms ease; }
  html[data-motion="playing"] .stub-window { transition: color 200ms ease; }
  html[data-motion="playing"] .title-dot i { animation: press-accent 5s 320ms ease-in-out infinite; }
  html[data-motion="playing"] .help-link .icon,
  html[data-motion="playing"] .account-link .icon { transition: transform 180ms var(--ease-out); }
  html[data-motion="playing"] .help-link:active,
  html[data-motion="playing"] .account-link:active { transform: translateY(1px) scale(.97); }
}

.desk[data-link-state="ready"] .ticket-stub::before { transform: scaleY(1); }
.desk[data-link-state="ready"] .stub-window { color: #fff6df; }
.desk[data-link-state="ready"] .stub-star { color: #fbd480; transform: rotate(90deg); }
.desk[data-link-state="ready"] .barcode { background-color: transparent; filter: invert(1); mix-blend-mode: screen; }

@media (hover: hover) and (pointer: fine) {
  html[data-motion="playing"] .paper-light { transition: opacity 240ms ease; }
  html[data-motion="playing"] .ticket-face[data-lit] .paper-light { opacity: 1; }
  html[data-motion="playing"] .sort { transition: transform 180ms var(--ease-out); }
  html[data-motion="playing"] .title-cn .sort:hover { transform: translateY(-.07em) rotate(-2.5deg); }
  html[data-motion="playing"] .help-link:hover { background: #e8ecfa; border-color: #a0aed7; box-shadow: 0 2px 0 #c8d0e9; }
  html[data-motion="playing"] .help-link:hover .icon { transform: rotate(-9deg); }
  html[data-motion="playing"] .account-link:hover { background: #1a3ab1; }
  html[data-motion="playing"] .account-link:hover .icon { transform: translateX(2px); }
}

html[data-motion="paused"] *,
html[data-motion="paused"] *::before,
html[data-motion="paused"] *::after {
  animation: none !important;
  transition: none !important;
}
html[data-motion="paused"] button:active,
html[data-motion="paused"] .submit:hover .icon { transform: none; }

@media (max-width: 960px) {
  .reader-layout { grid-template-columns: 1fr; }
  .reader-toc { position: static; order: -1; }
}

@media (max-width: 860px) {
  .head-inner, .desk { width: calc(100% - 48px); }
  .ticket-top { grid-template-columns: minmax(0, 1fr) 43px; }
  .hero-copy { padding-left: 30px; }
  .ticket-face { min-height: 320px; grid-template-columns: 1fr .94fr; }
  h1 { font-size: 62px; }
  .art-bed { inset: 4% 0; }
  .art-mount { inset: 6% 2% 5% -2%; }
  .annotation { left: auto; right: 2%; top: 56%; }
  .annotation span { font-size: 17px; }
  .ink-arrow { width: 45px; height: 31px; margin-right: 18px; }
  .spark-a { width: 36px; height: 36px; left: 0; }
  .ticket { --ticket-gutter: 30px; }
  .submit { flex-basis: 150px; gap: 10px; }
  .post-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --header-height: 64px; }
  .head-inner, .desk { width: calc(100% - 32px); }
  .brand { gap: 8px; }
  .brand-name { font-size: 22px; letter-spacing: -1.1px; }
  .help-link, .account-link { min-height: 36px; font-size: 12px; padding: 7px 10px; }
  .ticket { border-radius: 13px; --ticket-gutter: 19px; }
  .ticket-top { grid-template-columns: minmax(0, 1fr) 26px; }
  .ticket-face { min-height: 242px; display: block; }
  .hero-copy { padding: 24px 14px 22px 20px; pointer-events: none; max-width: 68%; }
  h1 { font-size: clamp(34px, 8.9vw, 50px); line-height: 1.1; margin: 10px 0 14px; }
  .lettering { font-size: 1.32em; line-height: 1; }
  .title-cn { padding-bottom: 3px; line-height: 1.2; }
  .blue-title::after { height: 5px; bottom: -4px; }
  .hero-intro { font-size: 12px; line-height: 1.65; letter-spacing: 0; max-width: 100%; }
  .art-stage { position: absolute; inset: 8% 0 28% 55%; }
  .art-bed { inset: 0; }
  .art-mount { inset: 0 2% 0 0; }
  .spark-a { width: 17px; height: 17px; top: 5%; left: 8%; }
  .spark-b { width: 12px; height: 12px; right: 3%; top: 1%; }
  .annotation { display: none; }
  .ticket-stub { padding-block: 16px; }
  .stub-star { font-size: 23px; }
  .barcode { width: 13px; height: 37px; }
  .perforation::before, .perforation::after { height: 19px; width: 19px; }
  .entry { padding: 20px var(--ticket-gutter) 18px; }
  .entry-row { flex-direction: column; }
  .submit { flex: none; min-height: 48px; }
  .ticket-rule { grid-template-columns: minmax(0, 1fr) minmax(103px, 41%); column-gap: 8px; }
  .charm-stage { height: clamp(92px, 14dvh, 120px); }
  .reader-nav-footer { grid-template-columns: 1fr; }
}

@media (max-width: 470px) {
  .head-inner { column-gap: 6px; }
  .head-actions .help-link { min-width: 36px; padding-inline: 8px; }
  .head-actions .help-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (max-width: 365px) {
  h1 { font-size: 30px; }
  .brand-name { font-size: 18px; letter-spacing: -1px; }
  .head-actions { gap: 4px; }
}
