:root {
  --ink: #203136;
  --muted: #7b837c;
  --paper: #f4f3ed;
  --gold: #cfaf71;
  --line: #e1e2d7;
  --sans: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 18px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
a, button, input, textarea { outline-offset: 4px; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, p { margin: 0; }
.header { height: 58px; padding: 0 max(24px, calc((100% - 1080px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #17262c; color: #f4f0e4; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.nav-redeem { font-size: 11px; color: #d2b87e; }
main { max-width: 1080px; margin: auto; padding: 22px 0 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
h1 { font-size: 25px; font-weight: 600; letter-spacing: .5px; line-height: 1.4; }
.page-heading p { margin-top: 5px; font-size: 11px; color: var(--muted); letter-spacing: .8px; }
.version-label { color: #978566; font-size: 10px; border: 1px solid #dcd8c8; padding: 4px 10px; white-space: nowrap; }
.overview { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(275px, 1fr); gap: 18px; align-items: stretch; }
.video-card { min-width: 0; }
.video-shell { width: 100%; aspect-ratio: 16 / 7; overflow: hidden; background: #1c3038; }
.video-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #d9ded7; background: radial-gradient(ellipse at 50% 80%, #a5b4a216, transparent 65%), linear-gradient(135deg, #2b4246, #182a32); }
.video-kicker { font-size: 12px; letter-spacing: 2px; }
.video-play { width: 49px; height: 49px; border-radius: 50%; border: 1px solid #baa67488; background: #ffffff07; color: #ddc185; font-size: 13px; padding-left: 9px; margin: 17px 0 13px; }
.video-play:not(:disabled):hover { background: #ffffff13; }
.video-play:disabled { opacity: .6; }
.video-placeholder p { color: #8fa09e; font-size: 10px; }
.video-shell iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-fallback { display: block; font-size: 10px; color: #8b7851; margin-top: 5px; }
.shop-card { display: flex; flex-direction: column; justify-content: center; gap: 19px; padding: 22px 25px; background: #fffdf7; border: 1px solid #ddd9cb; }
.small-label { display: inline-block; font-size: 9px; color: #8c7954; letter-spacing: 1px; margin-bottom: 8px; }
.shop-card h2 { font-size: 19px; font-weight: 600; }
.shop-platform { font-size: 11px; color: var(--muted); margin-top: 4px; }
.button { border: 0; display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 45px; padding: 12px 16px; font-size: 12px; font-weight: 500; transition: background .15s; }
.button-dark { color: #f3eddd; background: #263e42; width: 100%; }
.button-dark:hover { background: #355156; }
.shop-note { font-size: 10px; line-height: 1.9; color: #919486; }
.redeem-section { background: #fffdf8; border: 1px solid var(--line); margin-top: 20px; padding: 21px 25px 15px; }
.form-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.form-heading h2 { font-size: 19px; font-weight: 600; }
.form-heading p { font-size: 11px; color: var(--muted); margin-top: 4px; }
.form-heading strong { color: #5d665d; font-weight: 500; }
.status { display: inline-flex; gap: 6px; align-items: center; color: #97886a; font-size: 10px; flex-shrink: 0; }
.status i { width: 5px; height: 5px; background: #b9a77b; border-radius: 50%; }
.status.ready { color: #607b4f; }
.status.ready i { background: #72925e; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 190px; gap: 16px; align-items: start; }
.field label { display: block; font-size: 11px; margin-bottom: 6px; }
input[type=text], textarea { display: block; width: 100%; height: 45px; min-height: 45px; border: 1px solid #d7dccf; border-radius: 0; background: #fafaf4; color: var(--ink); padding: 12px; font-size: 12px; line-height: 19px; }
textarea { resize: vertical; font-family: ui-monospace, 'Microsoft YaHei', monospace; }
input[type=text]:focus, textarea:focus { border-color: #ad955e; outline: 1px solid #cbb47a44; outline-offset: 0; }
input[readonly], textarea[readonly] { background: #eeeee6; }
input::placeholder, textarea::placeholder { color: #a1a79a; font-size: 11px; }
.field-hint { display: block; margin-top: 4px; font-size: 9px; color: #969c8d; }
.button-gold { background: var(--gold); color: #29372f; }
.button-gold:hover:not(:disabled) { background: #ddbf86; }
.button-gold:disabled { background: #e1d5bb; color: #87816e; }
.submit { margin-top: 23px; width: 100%; }
.form-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 11px; }
.confirm-row { display: flex; align-items: flex-start; gap: 8px; }
.confirm-row input { margin: 3px 0 0; width: 13px; height: 13px; flex-shrink: 0; accent-color: #9e8144; }
.confirm-row label { font-size: 10px; color: #7b8374; cursor: pointer; }
.privacy-note { font-size: 9px; color: #969c8d; white-space: nowrap; }
.challenge { overflow: hidden; }
.challenge:not(:empty) { margin-top: 14px; }
.result { white-space: pre-line; overflow-wrap: anywhere; font-size: 11px; padding: 12px; margin-top: 13px; background: #f3eddf; border: 1px solid #e0d3b4; }
.result.success { background: #eef2e7; color: #526b48; border-color: #cedabf; }
.result.error { background: #f7ede5; color: #865e45; border-color: #e5cfbc; }
.retry-note { border-top: 1px solid #e8e8dd; padding-top: 11px; margin-top: 13px; font-size: 10px; color: #8b9182; }
footer { max-width: 1080px; display: flex; justify-content: space-between; gap: 15px; margin: auto; padding: 17px 0 20px; color: #969c8f; font-size: 9px; }
[hidden] { display: none !important; }
@media (min-width: 1400px) { main, footer { max-width: 1120px; } .header { padding-right: calc((100% - 1120px) / 2); padding-left: calc((100% - 1120px) / 2); } }
@media (max-width: 1140px) { main, footer { margin-left: 24px; margin-right: 24px; } }
@media (max-width: 760px) {
  .header { padding: 0 18px; height: 53px; }
  .brand { font-size: 14px; gap: 8px; letter-spacing: .5px; }
  .brand img { width: 26px; height: 26px; }
  .nav-redeem { font-size: 10px; }
  main, footer { margin-left: 16px; margin-right: 16px; }
  main { padding-top: 17px; }
  .page-heading { margin-bottom: 13px; }
  h1 { font-size: 21px; }
  .page-heading p { font-size: 10px; }
  .version-label { display: none; }
  .overview { grid-template-columns: 1fr; gap: 12px; }
  .video-shell { aspect-ratio: 16 / 8; }
  .video-kicker { font-size: 11px; }
  .video-play { margin: 13px 0 10px; width: 44px; height: 44px; }
  .shop-card { padding: 16px 18px; gap: 12px; }
  .shop-card h2 { font-size: 17px; }
  .small-label { margin-bottom: 4px; }
  .shop-platform { font-size: 10px; margin-top: 2px; }
  .shop-note { font-size: 9px; line-height: 1.7; }
  .shop-note br { display: none; }
  .button { min-height: 43px; }
  .redeem-section { margin-top: 14px; padding: 17px 18px 13px; }
  .form-heading { align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
  .form-heading h2 { font-size: 18px; }
  .form-heading p { font-size: 10px; }
  .status { font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  input[type=text], textarea { font-size: 16px; }
  .submit { margin-top: 0; }
  .form-bottom { flex-direction: column; gap: 6px; }
  .confirm-row label { font-size: 10px; }
  .privacy-note { font-size: 9px; }
  .retry-note { font-size: 9px; }
  footer { font-size: 8px; padding-top: 13px; flex-wrap: wrap; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .button { transition: none; } }
@media (max-width: 760px) {
  #redeem-form { display: flex; flex-direction: column; gap: 12px; }
  .form-grid { display: contents; }
  .form-bottom { order: 1; margin-top: 0; }
  .challenge { order: 2; }
  .challenge:empty { display: none; }
  .submit { order: 3; }
  .result { order: 4; margin-top: 0; }
}

/* Official video cover, self-hosted; preserve the full frame rather than crop skill text. */
.video-placeholder { position: relative; isolation: isolate; }
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: -2; }
.video-placeholder::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #0009, transparent 40%, #000a); pointer-events: none; }
.video-kicker { position: absolute; top: 13px; left: 16px; letter-spacing: .5px; font-size: 11px; color: #fff6de; text-shadow: 0 1px 5px #000; }
.video-placeholder .video-play { background: #17262ce8; color: #f2d694; border-color: #d4b573; margin: 0; }
.video-placeholder .video-play:not(:disabled):hover { background: #3a4d43; }
.video-placeholder p { position: absolute; bottom: 12px; color: #f2e8cf; }

/* Wide desktops: grow the actual layout and readable type, not CSS/browser zoom. */
@media (min-width: 1440px) {
  :root { --wide-content: min(88vw, 1760px); --muted: #657166; }
  body { font-size: clamp(15px, .72vw, 18px); }
  main, footer { width: var(--wide-content); max-width: none; margin-inline: auto; }
  .header { height: clamp(68px, 3.3vw, 84px); padding-inline: calc((100% - var(--wide-content)) / 2); }
  .brand { font-size: clamp(19px, .95vw, 24px); gap: 14px; }
  .brand img { width: 36px; height: 36px; }
  .nav-redeem { font-size: clamp(13px, .63vw, 16px); }
  main { padding-top: clamp(26px, 1.4vw, 36px); }
  .page-heading { margin-bottom: clamp(20px, 1vw, 26px); }
  h1 { font-size: clamp(30px, 1.65vw, 42px); }
  .page-heading p { font-size: clamp(13px, .67vw, 17px); margin-top: 7px; }
  .version-label { font-size: clamp(12px, .55vw, 14px); padding: 6px 13px; }
  .overview { gap: clamp(22px, 1.2vw, 30px); }
  .video-shell { aspect-ratio: 16 / 8; }
  .video-kicker { font-size: clamp(13px, .67vw, 17px); top: 18px; left: 22px; }
  .video-placeholder .video-play { width: clamp(58px, 3vw, 76px); height: clamp(58px, 3vw, 76px); font-size: 20px; }
  .video-placeholder p, .video-fallback { font-size: clamp(12px, .59vw, 15px); }
  .video-placeholder p { bottom: 18px; }
  .video-fallback { margin-top: 8px; }
  .shop-card { padding: clamp(26px, 1.6vw, 40px); gap: clamp(22px, 1.3vw, 32px); }
  .small-label { font-size: clamp(12px, .55vw, 14px); }
  .shop-card h2 { font-size: clamp(24px, 1.18vw, 30px); }
  .shop-platform { font-size: clamp(14px, .67vw, 17px); }
  .shop-note { font-size: clamp(12px, .59vw, 15px); }
  .button { font-size: clamp(15px, .72vw, 18px); min-height: clamp(56px, 2.5vw, 64px); padding: 14px 20px; }
  .redeem-section { margin-top: clamp(24px, 1.25vw, 32px); padding: clamp(24px, 1.4vw, 36px); }
  .form-heading { margin-bottom: 22px; }
  .form-heading h2 { font-size: clamp(24px, 1.1vw, 28px); }
  .form-heading p { font-size: clamp(13px, .63vw, 16px); }
  .status { font-size: clamp(12px, .55vw, 14px); }
  .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) clamp(210px, 13vw, 290px); gap: 22px; }
  .field label { font-size: clamp(14px, .67vw, 17px); margin-bottom: 8px; }
  input[type=text], textarea { height: clamp(56px, 2.5vw, 64px); min-height: 56px; font-size: clamp(16px, .72vw, 18px); padding: 15px; line-height: 24px; }
  input::placeholder, textarea::placeholder { font-size: clamp(14px, .67vw, 17px); }
  .field-hint { font-size: clamp(12px, .55vw, 14px); margin-top: 6px; }
  .submit { margin-top: calc(clamp(14px, .67vw, 17px) * 1.6 + 8px); }
  .form-bottom { margin-top: 16px; }
  .confirm-row { gap: 10px; }
  .confirm-row input { width: 17px; height: 17px; }
  .confirm-row label { font-size: clamp(13px, .59vw, 15px); }
  .privacy-note { font-size: clamp(12px, .55vw, 14px); }
  .retry-note { font-size: clamp(12px, .55vw, 14px); padding-top: 14px; margin-top: 18px; }
  .result { font-size: clamp(14px, .67vw, 17px); }
  footer { font-size: clamp(11px, .51vw, 13px); padding-top: 22px; }
}

@media (min-width: 1440px) and (max-height: 1100px) {
  .video-shell { aspect-ratio: 16 / 7; }
  .redeem-section { margin-top: 20px; padding: 20px 24px; }
  .form-heading { margin-bottom: 16px; }
}
@media (min-width: 1440px) {
  .shop-note, .field-hint, .privacy-note, .retry-note, footer { color: #687365; }
  .confirm-row label { color: #5d695d; }
  input::placeholder, textarea::placeholder { color: #7b8576; }
}
