:root {
  --ink: #171611;
  --muted: #6f6b5f;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --yellow: #f5bd18;
  --yellow-soft: #fff4bf;
  --green: #15875d;
  --red: #bf3f36;
  --line: #dedbd0;
  --shadow: 0 24px 80px rgba(59, 49, 18, 0.11);
  --radius-lg: 30px;
  --radius-md: 20px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 88% 3%, rgba(245, 189, 24, 0.2), transparent 27rem),
    linear-gradient(rgba(23, 22, 17, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 22, 17, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 32px 32px, 32px 32px, auto;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }

.site-header, main, .site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand img { border-radius: 13px; box-shadow: 0 8px 22px rgba(64, 48, 2, 0.18); }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.header-link {
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: .2s ease;
}
.header-link:hover { color: #fff; background: var(--ink); }

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  align-items: center;
  gap: 72px;
  padding: 72px 0 108px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 24px;
  padding: 7px 11px;
  color: #8a6100;
  background: var(--yellow-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 26px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 1.05;
  letter-spacing: -.055em;
  font-weight: 850;
}
.hero-copy > p { max-width: 610px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.85; }

.share-ticket {
  position: relative;
  min-height: 312px;
  padding: 34px 36px 28px;
  overflow: hidden;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 16px 18px 0 var(--ink), var(--shadow);
  transform: rotate(1.8deg);
}
.share-ticket::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(125deg, transparent 0 13px, rgba(255,255,255,.13) 13px 14px);
}
.ticket-topline, .ticket-footer, .share-code { position: relative; z-index: 1; }
.ticket-topline, .ticket-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; font-weight: 800; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid rgba(23,22,17,.35); border-radius: 999px; background: rgba(255,255,255,.45); }
.status-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.valid { color: #07593c; }
.status-badge.invalid { color: #7d201c; }
.status-badge.loading i { animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }

.share-code {
  display: block;
  margin: 51px 0 43px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(21px, 2.4vw, 31px);
  font-weight: 800;
  letter-spacing: .055em;
  white-space: nowrap;
}

.ticket-divider { position: relative; height: 1px; margin: 0 -36px 26px; border-top: 2px dashed rgba(23,22,17,.55); }
.ticket-divider::before, .ticket-divider::after { content: ""; position: absolute; top: -14px; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); }
.ticket-divider::before { left: -14px; }
.ticket-divider::after { right: -14px; }
.text-button { padding: 0; border: 0; color: inherit; background: none; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.text-button:disabled { cursor: default; opacity: .45; }

.code-form { margin-top: 28px; max-width: 610px; }
.code-form label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 800; }
.code-form-row { display: flex; gap: 10px; }
.code-form input { min-width: 0; flex: 1; height: 52px; padding: 0 17px; border: 1.5px solid var(--ink); border-radius: 14px; background: #fff; outline: none; }
.code-form input:focus { box-shadow: 0 0 0 4px var(--yellow-soft); }
.code-form button, .copy-dock button { border: 0; border-radius: 14px; color: #fff; background: var(--ink); font-weight: 800; }
.code-form button { padding: 0 22px; }
.form-error { min-height: 20px; margin: 8px 0 0; color: var(--red); font-size: 13px; }

.download-section, .album-section, .guide-section { padding: 98px 0 20px; }
.section-heading { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 38px; }
.section-index { padding-top: 6px; color: #9a947f; font-family: monospace; font-size: 13px; }
.section-heading h2 { margin-bottom: 9px; font-size: clamp(30px, 4vw, 48px); line-height: 1.15; letter-spacing: -.035em; }
.section-heading p { margin-bottom: 0; color: var(--muted); line-height: 1.7; }

.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.platform-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.9);
  box-shadow: 0 16px 50px rgba(39,34,18,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.platform-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.android-card { background: var(--ink); color: #fff; border-color: var(--ink); }
.platform-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 42px; border-radius: 15px; color: var(--ink); background: var(--yellow); }
.platform-icon svg { width: 28px; height: 28px; fill: currentColor; }
.wechat-icon { color: #fff; background: #18a46c; }
.platform-name { margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.android-card .platform-name { color: #aaa69a; }
.platform-card h3 { margin-bottom: 26px; font-size: 23px; line-height: 1.4; letter-spacing: -.02em; }
.platform-action { margin-top: auto; padding: 10px 0; border: 0; color: inherit; background: transparent; font-size: 14px; font-weight: 800; text-decoration: underline; text-underline-offset: 5px; }

.viewer-panel { position: relative; min-height: 500px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.viewer-message { min-height: 500px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; }
.viewer-message strong { margin: 20px 0 8px; font-size: 25px; }
.viewer-message p { margin-bottom: 22px; color: var(--muted); }
.loader { width: 36px; height: 36px; border: 3px solid #e9e5d9; border-top-color: var(--yellow); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font-size: 26px; font-weight: 850; }
.outline-button { padding: 11px 18px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 800; }
#album-frame { width: 100%; height: min(78vh, 920px); min-height: 680px; border: 0; background: #fff; }
.open-h5-link { position: absolute; top: 14px; right: 14px; z-index: 2; padding: 9px 13px; border-radius: 999px; color: #fff; background: rgba(23,22,17,.78); backdrop-filter: blur(10px); text-decoration: none; font-size: 12px; font-weight: 750; }

.guide-section { padding-bottom: 120px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.steps li { min-height: 190px; display: flex; align-items: flex-start; gap: 20px; padding: 28px; border-top: 2px solid var(--ink); background: rgba(255,255,255,.6); }
.steps li > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); font-weight: 850; }
.steps strong { display: block; margin: 5px 0 12px; font-size: 19px; }
.steps p { color: var(--muted); line-height: 1.7; }

.site-footer { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; }

.copy-dock {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  width: min(580px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 12px 11px 20px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 19px;
  color: #fff;
  background: rgba(23,22,17,.94);
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.copy-dock div { min-width: 0; display: flex; flex-direction: column; }
.copy-dock small { margin-bottom: 3px; color: #aaa69a; font-size: 10px; }
.copy-dock strong { overflow: hidden; font-family: monospace; font-size: 16px; text-overflow: ellipsis; }
.copy-dock button { flex: 0 0 auto; padding: 13px 18px; color: var(--ink); background: var(--yellow); }

.toast { position: fixed; left: 50%; bottom: 100px; z-index: 30; padding: 10px 16px; border-radius: 999px; color: #fff; background: rgba(23,22,17,.92); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

[hidden] { display: none !important; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 50px; padding: 48px 0 80px; }
  .hero-copy > p { max-width: 680px; }
  .share-ticket { width: min(610px, 96%); margin-inline: auto; transform: rotate(1deg); }
  .platform-grid, .steps { grid-template-columns: 1fr; }
  .platform-card { min-height: 260px; }
  .platform-icon { margin-bottom: 28px; }
  .steps li { min-height: auto; }
}

@media (max-width: 560px) {
  .site-header, main, .site-footer { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 78px; }
  .brand img { width: 38px; height: 38px; }
  .brand small { display: none; }
  .header-link { padding: 9px 13px; font-size: 12px; }
  .hero { min-height: auto; padding-top: 46px; }
  h1 { font-size: clamp(43px, 13vw, 62px); }
  .hero-copy > p { font-size: 15px; }
  .share-ticket { min-height: 265px; padding: 27px 22px 23px; border-radius: 24px; box-shadow: 8px 10px 0 var(--ink); transform: none; }
  .share-code { margin: 42px 0 37px; font-size: clamp(17px, 4.9vw, 23px); letter-spacing: .025em; }
  .ticket-divider { margin-inline: -22px; }
  .ticket-footer > span { font-size: 10px; }
  .code-form-row { flex-direction: column; }
  .code-form button { height: 50px; }
  .download-section, .album-section, .guide-section { padding-top: 76px; }
  .section-heading { gap: 14px; }
  .platform-card { padding: 25px; }
  #album-frame { min-height: 640px; height: 78vh; }
  .open-h5-link { top: 10px; right: 10px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

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