:root {
  --navy: #102447;
  --navy-deep: #091831;
  --red: #e83b30;
  --gold: #f3b44e;
  --paper: #f8f3e9;
  --cream: #fffaf1;
  --ink: #172033;
  --muted: #697079;
  --line: rgba(23, 32, 51, .13);
  --shell: min(100vw, 480px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #dfe4ea; }
body { margin: 0; color: var(--ink); background: #dfe4ea; font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; line-height: 1.55; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
main, footer { width: var(--shell); margin: 0 auto; }
main { overflow: hidden; background: var(--paper); box-shadow: 0 0 44px rgba(16,36,71,.13); }

.site-header { position: absolute; z-index: 30; top: 0; left: 50%; width: var(--shell); height: 62px; padding: 0 18px; transform: translateX(-50%); display: flex; align-items: center; color: #fff; border-bottom: 1px solid rgba(255,255,255,.16); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .03em; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; box-shadow: 0 3px 10px rgba(0,0,0,.16); }

.hero { position: relative; padding-bottom: 40px; color: #fff; background: var(--navy); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: radial-gradient(#fff .55px, transparent .55px); background-size: 6px 6px; }
.hero-copy { position: relative; z-index: 2; min-height: 360px; padding: 94px 22px 28px; overflow: hidden; }
.eyebrow, .panel-heading span, .join-heading span, .stories-heading > span { color: #f3c474; font: 800 12px/1.2 Arial, sans-serif; letter-spacing: .14em; }
.hero-kicker { position: relative; z-index: 3; width: 64%; margin: 28px 0 5px; color: #d5dce7; font-family: "Songti SC", "STSong", serif; font-size: 13px; letter-spacing: .06em; }
.hero h1 { position: relative; z-index: 3; width: 72%; margin: 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(42px, 11.8vw, 54px); line-height: .98; letter-spacing: -.06em; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-captain { position: absolute; z-index: 2; right: 2px; bottom: -8px; width: 145px; max-height: 238px; object-fit: contain; object-position: bottom right; filter: drop-shadow(0 12px 16px rgba(0,0,0,.2)); pointer-events: none; }
.primary-btn { width: 100%; padding: 14px 18px; color: #fff; background: var(--red); border: 0; border-radius: 8px; font-weight: 800; box-shadow: 0 9px 22px rgba(232,59,48,.23); }
.primary-btn span { margin-left: 10px; }

.reward-panel { position: relative; z-index: 8; margin: -24px 15px 0; padding: 48px 15px 18px; color: var(--ink); background: var(--cream); border: 1px solid rgba(243,180,78,.72); border-radius: 18px; box-shadow: 0 10px 24px rgba(5,18,39,.14); }
.panel-tab { position: absolute; z-index: 2; top: -20px; left: 50%; min-width: 132px; padding: 9px 22px; transform: translateX(-50%); color: #fff; background: var(--red); border-radius: 999px; text-align: center; font-size: 14px; font-weight: 800; box-shadow: 0 5px 12px rgba(232,59,48,.22); }
.section-tab { position: absolute; z-index: 2; top: -19px; left: 50%; min-width: 130px; padding: 9px 22px; transform: translateX(-50%); color: #fff; background: var(--red); border-radius: 999px; text-align: center; font-size: 14px; font-weight: 800; box-shadow: 0 5px 12px rgba(232,59,48,.22); }
.panel-heading { margin-bottom: 18px; }
.panel-heading h2, .join-heading h2, .stories-heading h2 { margin: 8px 0 0; font-family: "Songti SC", "STSong", serif; font-size: 31px; line-height: 1.05; letter-spacing: -.04em; }
.reward-list { display: flex; flex-direction: column; gap: 10px; }
.reward-item { position: relative; min-height: 128px; padding: 14px 12px 14px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 112px; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.reward-index { position: absolute; left: 12px; top: 14px; width: 27px; height: 27px; display: grid; place-content: center; color: #fff; background: var(--navy); border-radius: 50%; font: 800 10px/1 Arial; }
.reward-copy { min-width: 0; }
.reward-item h3 { margin: 0 0 2px; font-family: "Songti SC", serif; font-size: 17px; }
.reward-item p { margin: 0 0 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.reward-item strong { display: block; color: var(--red); font-size: 12px; line-height: 1.5; }
.reward-media { width: 112px; height: 88px; overflow: hidden; border-radius: 10px; }
.resource-media { position: relative; padding: 0; background: #fff; border: 0; }
.resource-media img { width: 100%; height: 100%; object-fit: cover; object-position: 22% center; }
.resource-media span { position: absolute; right: 6px; bottom: 6px; padding: 3px 7px; color: #fff; background: rgba(9,24,49,.78); border-radius: 999px; font-size: 9px; font-weight: 800; }
.certificate-media { position: relative; padding: 0; background: #eee8dc; border: 0; }
.certificate-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.certificate-media span { position: absolute; right: 6px; bottom: 6px; padding: 3px 7px; color: #fff; background: rgba(9,24,49,.78); border-radius: 999px; font-size: 9px; font-weight: 800; }
.likes-media { display: flex; align-items: center; justify-content: center; padding: 0; background: #fff1ee; border: 1px solid rgba(232,59,48,.16); }
.likes-media img { width: 100%; height: 100%; object-fit: contain; }
.member-media { position: relative; padding: 10px; display: flex; flex-direction: column; color: #fff; background: linear-gradient(130deg, #383536, #282627); }
.member-media::after { content: "M"; position: absolute; right: -6px; top: -14px; color: rgba(255,255,255,.05); font: 900 84px/1 Arial; }
.member-media > span { color: #f0d8c6; font-size: 9px; }
.member-media > b { position: relative; z-index: 1; font-size: 12px; }
.member-media > div { position: relative; z-index: 1; margin-top: auto; display: flex; gap: 3px; }
.member-media img { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; }
.assistant-note { margin-top: 16px; padding: 14px; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 13px; color: var(--muted); background: #f2eadb; border: 1px solid rgba(16,36,71,.1); border-radius: 14px; box-shadow: 0 6px 16px rgba(16,36,71,.07); }
.assistant-qr-button { width: 76px; height: 76px; padding: 4px; border: 0; background: #fff; border-radius: 10px; box-shadow: 0 3px 10px rgba(16,36,71,.1); }
.assistant-qr { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }
.assistant-copy { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; }
.assistant-copy strong { grid-column: 1 / -1; color: var(--navy); font-size: 13px; line-height: 1.45; }
.assistant-copy small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.assistant-note a { min-height: 40px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--red); border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: 0 5px 12px rgba(232,59,48,.22); }

.join-section { position: relative; padding: 55px 20px 54px; background: #efe6d6; }
.section-tab { top: -18px; background: var(--navy); box-shadow: 0 5px 12px rgba(16,36,71,.18); }
.join-heading { position: relative; min-height: 158px; margin-top: -8px; margin-bottom: 0; display: grid; grid-template-columns: 1fr 128px; align-items: center; }
.join-heading span { color: var(--red); }
.join-heading img { position: absolute; z-index: 1; right: -2px; bottom: -18px; width: 138px; max-height: 175px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 10px 12px rgba(16,36,71,.15)); pointer-events: none; }
.join-steps { position: relative; z-index: 2; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; list-style: none; }
.join-steps li { padding: 15px; display: grid; grid-template-columns: 34px 1fr; gap: 11px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.join-steps li > span { width: 32px; height: 32px; display: grid; place-content: center; color: #fff; background: var(--red); border-radius: 50%; font: 800 13px/1 Arial; }
.join-steps h3 { margin: 0 0 3px; font-size: 15px; }
.join-steps p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.privacy-note { margin: 12px 0; padding: 13px 14px; display: flex; flex-direction: column; background: #fff8e9; border-left: 3px solid var(--gold); font-size: 12px; line-height: 1.55; }
.privacy-note b { color: var(--red); }
.privacy-note span { color: var(--muted); }
.dark-btn { background: var(--navy); box-shadow: 0 9px 22px rgba(16,36,71,.2); }

.stories-section { position: relative; padding: 64px 0 54px 20px; color: #fff; background: var(--navy); }
.section-tab.light { background: var(--red); }
.stories-heading { padding-right: 20px; }
.stories-heading h2 { font-size: 37px; }
.stories-heading p { margin: 12px 0 0; color: #aeb9c8; font-size: 13px; }
.story-controls { margin: 18px 0 15px; display: flex; gap: 7px; }
.story-controls button { min-width: 58px; min-height: 34px; padding: 7px 14px; color: #cbd3df; background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-size: 12px; }
.story-controls button.active { color: var(--navy); background: #fff; }
.story-grid { padding-right: 20px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.story-grid::-webkit-scrollbar { display: none; }
.story-card { flex: 0 0 86%; overflow: hidden; scroll-snap-align: start; color: var(--ink); background: #f8f2e8; border-radius: 14px; }
.story-proof-wrap { position: relative; height: 218px; overflow: hidden; background: #e6edf5; border-bottom: 1px solid var(--line); }
.story-proof { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.story-level { position: absolute; top: 11px; left: 11px; width: 42px; height: 42px; display: grid; place-content: center; color: #fff; background: var(--red); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 4px 10px rgba(16,36,71,.18); font: 900 11px/1 Arial; }
.story-summary { padding: 15px 16px 0; }
.story-score { font: 900 35px/1 Arial; letter-spacing: -.04em; }
.story-score small { margin-left: 4px; color: var(--muted); font-size: 10px; }
.story-parts { margin-top: 5px; color: var(--muted); font-size: 11px; }
.story-quote { margin: 14px 16px 11px; font-family: "Songti SC", serif; font-size: 15px; line-height: 1.55; }
.story-user { margin: 0 16px; padding: 10px 0 14px; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.story-user b { color: var(--ink); }
.stories-footer { margin: 22px 20px 0 0; padding-top: 15px; display: flex; justify-content: center; align-items: center; text-align: center; border-top: 1px solid rgba(255,255,255,.16); }
.stories-footer span { font-size: 11px; }
.stories-footer a { min-height: 40px; padding: 8px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--gold); font-size: 13px; font-weight: 800; }

.merch-section { position: relative; padding: 58px 20px 50px; background: #f2e8d7; }
.merch-tab { top: -18px; background: var(--navy); box-shadow: 0 5px 12px rgba(16,36,71,.18); }
.merch-heading { margin-bottom: 18px; }
.merch-heading > span { color: var(--red); font: 800 12px/1.2 Arial, sans-serif; letter-spacing: .15em; }
.merch-heading h2 { margin: 8px 0 0; color: var(--navy); font-family: "Songti SC", "STSong", serif; font-size: 31px; line-height: 1.05; letter-spacing: -.04em; }
.merch-heading p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.course-card-horizontal { position: relative; margin: 0 0 14px; display: block; overflow: hidden; background: #fffdf5; border: 1px solid rgba(23,32,51,.12); border-radius: 15px; box-shadow: 0 7px 18px rgba(16,36,71,.08); }
.course-card-horizontal img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
.course-card-horizontal b { min-height: 42px; margin: 12px 13px 13px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--red); border-radius: 999px; font-size: 14px; font-weight: 800; box-shadow: 0 5px 12px rgba(232,59,48,.2); }
.merch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.merch-card { overflow: hidden; background: #fff; border: 1px solid rgba(23,32,51,.12); border-radius: 16px; box-shadow: 0 7px 18px rgba(16,36,71,.08); }
.merch-visual { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
.merch-info { min-height: 86px; padding: 11px 11px 7px; }
.merch-info h3 { margin: 0; color: var(--navy); font-family: "Songti SC", serif; font-size: 16px; line-height: 1.2; }
.merch-info p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.merch-buy { padding: 9px 9px 11px; display: grid; grid-template-columns: 1fr; gap: 7px; border-top: 1px solid var(--line); }
.shop-button { width: 100%; min-height: 34px; padding: 8px 6px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; color: #fff; background: var(--red); border: 0; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.qr-button { cursor: pointer; }
.qrLightbox p { margin: 14px 0 0; color: #fff; font-size: 13px; text-align: center; }
.image-lightbox p { position: absolute; bottom: 48px; left: 20px; right: 20px; }

.activity-note { position: relative; padding: 92px 20px 46px; background: var(--paper); }
.note-heading { position: absolute; z-index: 1; top: -19px; left: 0; right: 0; min-height: 38px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.note-heading span { position: relative; z-index: 3; min-width: 130px; padding: 9px 22px; color: #fff; background: var(--red); border-radius: 999px; text-align: center; font-size: 14px; font-weight: 800; box-shadow: 0 5px 12px rgba(232,59,48,.22); }
.note-heading img { position: absolute; z-index: 1; right: 20px; top: 10px; width: 112px; height: 112px; object-fit: contain; object-position: bottom; pointer-events: none; }
.activity-note ul { position: relative; z-index: 2; margin: 0; padding: 17px; display: flex; flex-direction: column; gap: 13px; background: #fff; border: 1px solid var(--line); border-radius: 16px; list-style: none; }
.activity-note li { display: grid; grid-template-columns: 27px 1fr; gap: 9px; align-items: start; }
.activity-note li b { width: 25px; height: 25px; display: grid; place-content: center; color: var(--navy); background: var(--gold); border-radius: 50%; font: 800 10px/1 Arial; }
.activity-note li p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

footer { padding: 27px 20px 98px; color: #fff; background: var(--navy-deep); }
footer p { margin: 9px 0 0; color: #7f8ca1; font-size: 12px; }
.footer-brand .brand-logo { width: 29px; height: 29px; }

.bottom-action { position: fixed; z-index: 90; left: 50%; bottom: 0; width: var(--shell); min-height: 82px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; background: rgba(255,250,241,.96); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(16,36,71,.12); backdrop-filter: blur(14px); }
.bottom-action a, .bottom-action button { min-width: 0; min-height: 50px; padding: 12px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #fff; border: 0; border-radius: 999px; font-size: 15px; font-weight: 800; white-space: nowrap; }
.bottom-action .post-button { background: var(--navy); box-shadow: 0 6px 15px rgba(16,36,71,.2); }
.bottom-action .redeem-button { background: var(--red); box-shadow: 0 6px 15px rgba(232,59,48,.22); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 86px; max-width: calc(var(--shell) - 36px); padding: 11px 17px; transform: translate(-50%, 14px); color: #fff; background: rgba(8,19,39,.94); border-radius: 7px; opacity: 0; pointer-events: none; transition: .25s ease; font-size: 12px; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.image-lightbox { position: fixed; z-index: 120; inset: 0; padding: 58px 20px 96px; display: none; align-items: center; justify-content: center; background: rgba(5,14,29,.9); backdrop-filter: blur(8px); }
.image-lightbox.show { display: flex; }
.image-lightbox img { width: min(100%, 440px); max-height: 78vh; object-fit: contain; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.38); }
.lightbox-close { position: absolute; top: max(20px, env(safe-area-inset-top)); right: max(20px, calc((100vw - var(--shell)) / 2 + 20px)); width: 42px; height: 42px; display: grid; place-content: center; color: #fff; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); border-radius: 50%; font-size: 28px; line-height: 1; }

@media (min-width: 481px) {
  body { padding: 22px 0; }
  .site-header { top: 22px; }
  main { border-radius: 18px 18px 0 0; }
  footer { border-radius: 0 0 18px 18px; }
  .bottom-action { bottom: 17px; width: 450px; border: 1px solid var(--line); border-radius: 16px; }
}

@media (max-width: 360px) {
  .hero-copy { padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: 39px; }
  .hero-captain { right: -4px; width: 132px; }
  .panel-heading h2, .join-heading h2 { font-size: 28px; }
  .reward-panel { margin-left: 10px; margin-right: 10px; }
  .stories-heading h2 { font-size: 34px; }
  .assistant-note { grid-template-columns: 66px minmax(0, 1fr); padding: 12px; gap: 10px; }
  .assistant-qr-button { width: 66px; height: 66px; }
  .assistant-copy { grid-template-columns: 1fr; }
  .assistant-copy strong { grid-column: auto; }
  .assistant-note a { width: 100%; margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
