:root {
  --navy: #071a38;
  --blue: #0d4fb4;
  --royal: #246fd6;
  --cyan: #48b7ed;
  --ink: #10213d;
  --muted: #6e7f98;
}

* { box-sizing: border-box; }
html { background: #07162e; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 12% 12%, rgb(40 105 205 / 28%), transparent 34%), radial-gradient(circle at 90% 38%, rgb(70 183 237 / 18%), transparent 27%), linear-gradient(150deg, #06152c 0%, #0b2858 52%, #06152c 100%);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
button { font: inherit; -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100dvh; position: relative; overflow: hidden; padding: 22px 14px 42px; }
.ambient { position: fixed; border: 1px solid rgb(110 192 255 / 12%); border-radius: 50%; pointer-events: none; }
.ambient-one { width: 420px; height: 420px; left: -220px; top: 120px; }
.ambient-two { width: 360px; height: 360px; right: -190px; bottom: 80px; }
.mobile-frame { width: min(100%, 520px); margin: 0 auto; position: relative; }
.brand-bar { display: flex; align-items: center; gap: 12px; color: white; padding: 4px 6px 18px; }
.brand-bar img { width: 44px; height: 44px; object-fit: contain; filter: brightness(0) invert(1); }
.brand-bar strong { display: block; font-size: 15px; letter-spacing: .05em; }
.brand-bar span { display: block; margin-top: 3px; font-size: 7.5px; letter-spacing: .08em; opacity: .72; }
.hero-card { min-height: 232px; position: relative; overflow: hidden; border-radius: 28px; padding: 30px 26px; color: white; background: linear-gradient(120deg, rgb(7 27 61 / 96%), rgb(14 82 177 / 82%)), radial-gradient(circle at 76% 20%, #62c4f2, transparent 32%); border: 1px solid rgb(166 219 255 / 24%); box-shadow: 0 26px 70px rgb(0 6 22 / 36%); }
.hero-card::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(to right, black, transparent 80%); }
.hero-copy { position: relative; z-index: 2; width: 62%; }
.eyebrow, .kicker { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.eyebrow { color: #91d9ff; }
.hero-card h1 { margin: 13px 0 10px; font-size: clamp(38px, 10vw, 54px); line-height: .98; letter-spacing: -.05em; }
.hero-title-en { margin: 0 0 10px; color: #8edcff; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.hero-subtitle { margin: 0; font-size: 13px; line-height: 1.65; color: rgb(255 255 255 / 78%); }
.hero-subtitle span { font-size: 9px; }
.mascot { position: absolute; z-index: 2; width: 204px; height: auto; right: -26px; bottom: -74px; filter: drop-shadow(0 18px 20px rgb(0 20 70 / 28%)); }
.panel { margin-top: 16px; border-radius: 24px; padding: 22px; background: rgb(255 255 255 / 97%); border: 1px solid rgb(255 255 255 / 72%); box-shadow: 0 18px 50px rgb(0 12 40 / 18%); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.04em; }
.heading-en { margin: 2px 0 0; color: #72839b; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.kicker { color: var(--royal); }
.progress-pill, .lock-badge { flex: 0 0 auto; border-radius: 999px; padding: 7px 11px; font-size: 11px; font-weight: 800; }
.progress-pill { background: #e9f3ff; color: var(--blue); }
.lock-badge { background: #edf1f6; color: #65758b; }
.lock-badge.unlocked { background: #ddf7ec; color: #05754f; }
.station-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 20px; }
.station-card { position: relative; min-width: 0; padding: 14px 6px 12px; text-align: center; border-radius: 18px; background: #f5f8fc; border: 1px solid #e3eaf3; }
.station-number { position: absolute; left: 9px; top: 8px; font-size: 9px; font-weight: 900; color: #a4b0c0; }
.stamp-ring { width: 56px; height: 56px; margin: 4px auto 10px; display: grid; place-items: center; border: 1px dashed #aebccd; border-radius: 50%; color: #8b99ab; }
.stamp-ring span { font-size: 10px; }
.stamp-ring small { display: block; font-size: 7px; line-height: 1.15; }
.station-card strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-card > small { display: block; min-height: 28px; margin-top: 4px; color: #8290a2; font-size: 7px; line-height: 1.25; overflow: hidden; }
.station-card.checked { background: linear-gradient(145deg, #eef8ff, #effcf7); border-color: #85d7bd; }
.station-card.checked .stamp-ring { border: 2px solid #12a77a; color: #0c8e69; background: #fff; font-size: 22px; box-shadow: 0 5px 16px rgb(18 167 122 / 18%); }
.hint, .guarantee { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 11px; }
.hint span, .guarantee span { font-size: 9px; }
.lottery-panel { background: linear-gradient(145deg, #fff, #f4f8ff); }
.prize-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 20px 0; }
.prize-chip { padding: 13px 5px; text-align: center; border-radius: 16px; border: 1px solid; }
.prize-chip span { display: block; margin-bottom: 6px; }
.prize-chip img { width: 44px; height: 44px; display: block; margin: 0 auto; object-fit: contain; }
.prize-chip strong { display: block; font-size: 11px; }
.prize-chip small { display: block; margin-top: 3px; font-size: 7px; letter-spacing: .04em; }
.prize-chip em { display: block; margin-top: 6px; font-size: 8px; font-style: normal; font-weight: 800; }
.tone-1 { background: #fff8e4; border-color: #f5db93; color: #936515; }
.tone-2 { background: #f7f0ff; border-color: #d9c1f5; color: #7144a3; }
.tone-3 { background: #ebf8ff; border-color: #b8e1f5; color: #1877a3; }
.primary-button { width: 100%; border: 0; border-radius: 15px; padding: 15px 18px; font-weight: 800; color: #8a96a8; background: #e7ecf3; }
.primary-button.active { cursor: pointer; color: white; background: linear-gradient(120deg, #0e51b8, #278fe0); box-shadow: 0 10px 24px rgb(14 81 184 / 25%); }
.primary-button:disabled { cursor: not-allowed; opacity: .72; }
.spin { display: inline-block; animation: spin .55s linear infinite; }
.error-text { margin: 12px 0 0; color: #c73535; text-align: center; font-size: 12px; }
footer { padding: 24px 0 4px; text-align: center; color: rgb(255 255 255 / 50%); font-size: 11px; letter-spacing: .08em; }
footer span { font-size: 8px; }
.center-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; color: white; text-align: center; }
.center-page strong { margin-top: 14px; font-size: 12px; letter-spacing: .08em; }
.loader { width: 34px; height: 34px; margin: 0 auto; border: 3px solid rgb(255 255 255 / 26%); border-top-color: #61c8ff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-panel { min-height: 650px; position: relative; overflow: hidden; text-align: center; padding: 36px 26px; background: radial-gradient(circle at 50% 10%, #e9f8ff, transparent 27%), linear-gradient(155deg, #fff, #f3f8ff); }
.result-panel::before, .result-panel::after { content: "✦  ✧  ✦"; position: absolute; color: #f3ba3b; font-size: 28px; letter-spacing: 24px; opacity: .45; transform: rotate(-18deg); }
.result-panel::before { top: 105px; left: -20px; }
.result-panel::after { bottom: 120px; right: -25px; }
.live-strip { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 8px 12px; background: #e7f9f2; color: #087453; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.live-strip i { width: 7px; height: 7px; border-radius: 50%; background: #14ad7a; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgb(20 173 122 / 15%); opacity: .55; } }
.result-kicker { margin: 38px 0 6px; color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.result-icon { width: 128px; height: 128px; display: grid; place-items: center; margin: 12px auto; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #e3f3ff); border: 1px solid #bfddf6; box-shadow: 0 22px 50px rgb(15 80 175 / 20%); }
.result-icon img { width: 92px; height: 92px; object-fit: contain; }
.result-panel h1 { margin: 10px 0 0; font-size: 36px; color: #0b326c; }
.result-en { margin: 2px 0 10px; color: #4d6f9e; font-weight: 800; letter-spacing: .1em; }
.gift-name { margin: 0 auto 20px; }
.gift-name strong, .gift-name span { display: block; }
.gift-name strong { font-size: 18px; color: #173f76; }
.gift-name span { margin-top: 2px; color: #7386a0; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.screenshot-reminder { margin-top: 20px; padding: 16px; border: 2px solid #f1bd49; border-radius: 18px; color: #7b560d; background: #fff8df; box-shadow: 0 10px 25px rgb(206 146 22 / 15%); }
.screenshot-reminder strong, .screenshot-reminder span { display: block; }
.screenshot-reminder strong { font-size: 20px; }
.screenshot-reminder span { margin-top: 3px; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.result-note { margin: 25px 0 0; color: #4f6077; font-size: 12px; line-height: 1.6; }
.result-note span { font-size: 10px; }
.result-reopen { margin: 13px 0 0; color: #718198; font-size: 10px; line-height: 1.55; }
.result-reopen span { font-size: 8px; }
.result-time { margin: 20px 0 0; color: #8b98aa; font-size: 9px; line-height: 1.5; }
.scan-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, #185fb9, transparent 42%), linear-gradient(150deg, #06152c, #0b2858); text-align: center; }
.scan-card { width: min(100%, 420px); border-radius: 28px; padding: 34px 26px; color: var(--ink); background: white; box-shadow: 0 30px 70px rgb(0 5 22 / 36%); }
.scan-card > img { width: 68px; height: 68px; object-fit: contain; }
.scan-orb { width: 100px; height: 100px; display: grid; place-items: center; margin: 26px auto; border-radius: 50%; color: white; background: linear-gradient(145deg, #174fa2, #39a5e8); font-size: 46px; box-shadow: 0 16px 40px rgb(21 88 172 / 30%); }
.scan-card.success .scan-orb { background: linear-gradient(145deg, #0b8f66, #2bc493); }
.scan-card.error .scan-orb { background: linear-gradient(145deg, #b73333, #ef6a5b); }
.scan-card h1 { margin: 7px 0 3px; font-size: 24px; }
.scan-card > p { color: #61728a; font-size: 11px; line-height: 1.55; }
.station-name { margin: 22px 0; padding: 14px; border-radius: 14px; background: #f0f6fe; }
.station-name strong, .station-name span { display: block; }
.station-name span { margin-top: 4px; color: #6c7d93; font-size: 9px; }
noscript { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; color: white; background: #07162e; text-align: center; }
.prize-chip.unavailable { opacity: .42; filter: grayscale(1); }
.notice { border-radius: 14px; padding: 14px; text-align: center; color: #8a651c; background: #fff7de; border: 1px solid #f3d789; font-size: 12px; font-weight: 800; }
.fatal-card { width: min(100%, 420px); padding: 28px; border-radius: 22px; color: var(--ink); background: white; box-shadow: 0 24px 60px rgb(0 5 22 / 30%); }
.fatal-card strong { display: block; color: #b42c2c; font-size: 15px; }
.fatal-card p { margin: 12px 0 20px; color: #697a91; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }

.admin-page { min-height: 100dvh; padding: 28px 18px 60px; background: #edf3fa; }
.admin-wrap { width: min(100%, 1180px); margin: auto; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.admin-top h1 { margin: 4px 0 0; font-size: 28px; }
.admin-top p { margin: 2px 0; color: #69809e; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.ghost-button { border: 1px solid #cad6e5; border-radius: 12px; padding: 11px 15px; cursor: pointer; color: #21446f; background: white; font-weight: 800; }
.admin-home-link { text-decoration: none; font-size: 11px; }
.admin-panel { margin-top: 16px; padding: 22px; border: 1px solid #dbe4ef; border-radius: 20px; background: white; box-shadow: 0 12px 30px rgb(9 32 68 / 7%); }
.admin-loading { display: grid; place-items: center; min-height: 180px; text-align: center; }
.admin-loading .loader { margin-bottom: 14px; }
.loader.dark { border-color: rgb(13 79 180 / 18%); border-top-color: var(--blue); }
.activity-row { display: flex; align-items: center; justify-content: space-between; }
.admin-panel h2 { margin: 0; font-size: 19px; }
.admin-panel p { margin: 3px 0; color: #718299; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.status-toggle { border: 0; border-radius: 999px; padding: 11px 16px; cursor: pointer; background: #e9edf2; color: #69788a; font-weight: 900; }
.status-toggle.on { color: #087453; background: #dbf5ea; }
.reset-button { border: 1px solid #e4b7b4; border-radius: 12px; padding: 11px 16px; cursor: pointer; color: #a52d29; background: #fff3f2; font-weight: 900; }
.reset-button:disabled { cursor: not-allowed; opacity: .65; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.stats-grid article { padding: 18px; border-radius: 18px; color: white; background: linear-gradient(135deg, #092751, #155bb6); }
.stats-grid strong, .stats-grid span, .stats-grid small { display: block; }
.stats-grid strong { font-size: 30px; }
.stats-grid span { margin-top: 8px; font-weight: 800; }
.stats-grid small { margin-top: 2px; color: #8edcff; font-size: 8px; }
.admin-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.admin-heading > span { color: #74869d; font-size: 9px; text-align: right; }
.inventory-list { display: grid; gap: 12px; margin-bottom: 16px; }
.inventory-row { display: grid; grid-template-columns: 64px 90px repeat(4, minmax(120px, 1fr)) 100px 100px 76px; gap: 10px; align-items: end; padding: 13px; border-radius: 14px; background: #f5f8fc; overflow-x: auto; }
.admin-prize-icon { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid #d7e3ef; border-radius: 14px; background: white; }
.admin-prize-icon img { width: 45px; height: 45px; object-fit: contain; }
.tier-label strong, .tier-label small, .inventory-row label { display: block; }
.tier-label small { margin-top: 2px; color: #718198; font-size: 7px; }
.inventory-row label { font-size: 9px; font-weight: 800; }
.inventory-row input { width: 100%; margin-top: 5px; border: 1px solid #ccd8e6; border-radius: 9px; padding: 10px; color: var(--ink); background: white; }
.drawn-count { text-align: center; font-size: 12px; font-weight: 800; }
.drawn-count small { display: block; margin-top: 3px; color: #718198; font-size: 7px; }
.admin-message { margin: 10px 0; padding: 12px; border-radius: 12px; color: #0c6a4d; background: #dcf5ea; text-align: center; font-weight: 800; }
.admin-message.error { color: #a72d2d; background: #fde5e3; }
.recent-list { display: grid; gap: 8px; }
.recent-list > div { display: grid; grid-template-columns: 40px 1fr 190px; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid #edf1f5; }
.recent-list strong small { display: block; margin-top: 3px; color: #72849a; font-size: 8px; }
.recent-list > div > small { color: #72849a; font-size: 9px; }
.recent-prize-icon { width: 36px; height: 36px; display: grid; place-items: center; }
.recent-prize-icon img { width: 34px; height: 34px; object-fit: contain; }
.empty-state { padding: 28px; text-align: center; color: #78899f; }
@media (max-width: 380px) {
  .app-shell { padding-inline: 9px; }
  .panel { padding-inline: 16px; }
  .mascot { width: 180px; right: -36px; }
  .hero-copy { width: 70%; }
  .station-card strong { font-size: 10px; }
  .prize-chip em { font-size: 7px; }
}
@media (max-width: 760px) {
  .admin-page { padding-inline: 10px; }
  .admin-top { align-items: flex-start; }
  .admin-top h1 { font-size: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .activity-row { gap: 12px; }
  .admin-heading { display: block; }
  .admin-heading > span { display: block; margin-top: 8px; text-align: left; }
  .inventory-row { grid-template-columns: 56px 1fr 1fr; }
  .inventory-row label { grid-column: span 1; }
  .inventory-row label:nth-of-type(1), .inventory-row label:nth-of-type(2), .inventory-row label:nth-of-type(3), .inventory-row label:nth-of-type(4) { grid-column: 1 / -1; }
  .drawn-count { align-self: center; }
  .recent-list > div { grid-template-columns: 40px 1fr; }
  .recent-list > div > small { grid-column: 2; }
}
