:root {
  --ink: #062f3f;
  --sea: #0a7286;
  --foam: #effbf7;
  --sand: #fff3cc;
  --sun: #ffcf45;
  --coral: #ff6b48;
  --paper: #fffdf4;
  --line: rgba(6, 47, 63, .16);
  --shadow: 0 18px 55px rgba(6, 47, 63, .14);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--foam);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% -10%, #bdeff1 0, transparent 38%), linear-gradient(145deg, #f2fff9, #fff7db 78%); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
.sun-orb { position: fixed; right: -100px; top: 12vh; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 207, 69, .35); filter: blur(2px); z-index: -1; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 4vw; border-bottom: 1px solid var(--line); background: rgba(255, 253, 244, .78); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; }
.brand-logo { width: 46px; height: 46px; border-radius: 16px; object-fit: contain; background: white; box-shadow: 0 8px 22px rgba(6,47,63,.1); }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--sea); font-size: 11px; }
main { width: min(1180px, 92vw); margin: 32px auto 80px; }
.loading { padding: 20vh 0; text-align: center; color: var(--sea); }
.hero { position: relative; overflow: hidden; padding: clamp(26px, 6vw, 74px); border-radius: 34px; color: white; background: linear-gradient(125deg, #063c4c 0 54%, #0a7d8b); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 360px; height: 360px; right: -120px; bottom: -210px; border: 55px solid rgba(255,255,255,.1); border-radius: 50%; pointer-events: none; }
.eyebrow { margin: 0 0 10px; color: var(--sun); font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(38px, 8vw, 86px); line-height: .98; letter-spacing: -.06em; }
h2 { margin: 0 0 18px; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.04em; }
h3 { margin: 0 0 10px; }
.hero p { max-width: 660px; color: rgba(255,255,255,.78); font-size: 16px; line-height: 1.8; }
.hero-actions, .toolbar, .button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero-actions { position: relative; z-index: 1; margin-top: 24px; }
.btn { display: inline-block; border: 0; border-radius: 13px; padding: 11px 16px; background: var(--ink); color: white; font-weight: 750; text-decoration: none; text-align: center; transition: transform .18s ease, opacity .18s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--sun); color: var(--ink); }
.btn-coral { background: var(--coral); }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn-small { padding: 7px 10px; font-size: 12px; }
.section { margin-top: 34px; }
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 16px; }
.section-head p { margin: 0; color: #54717a; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.stat { padding: 18px; border-radius: 18px; background: rgba(255, 253, 244, .88); border: 1px solid var(--line); }
.stat strong { display: block; margin-top: 8px; font-size: 30px; letter-spacing: -.05em; }
.stat span { color: #68818a; font-size: 12px; }
.panel { padding: 22px; border-radius: 24px; background: rgba(255, 253, 244, .9); border: 1px solid var(--line); box-shadow: 0 10px 35px rgba(6,47,63,.06); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project { min-height: 120px; padding: 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.project.powered { background: var(--ink); color: white; }
.project b { display: block; font-size: 17px; }
.project span { display: inline-block; margin-top: 22px; color: var(--sea); font-size: 12px; }
.project.powered span { color: var(--sun); }
.field { display: grid; gap: 7px; margin-bottom: 13px; }
.field label { font-size: 12px; color: #607a82; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: white; color: var(--ink); outline-color: var(--sea); }
.field textarea { min-height: 90px; resize: vertical; }
.login { width: min(440px, 100%); margin: 10vh auto; }
.login .panel { padding: 32px; }
.login h1 { font-size: 44px; }
.remember-login { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 16px; color: var(--ink); font-size: 13px; font-weight: 800; }
.remember-login input { width: 19px; height: 19px; accent-color: var(--sea); }
.remember-login span { flex-basis: 100%; margin-left: 27px; color: #68818a; font-size: 12px; font-weight: 500; }
.muted { color: #68818a; font-size: 13px; line-height: 1.7; }
.account-list { display: grid; gap: 9px; max-height: 390px; overflow: auto; }
.account-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px; border-radius: 13px; background: white; border: 1px solid var(--line); }
.account-item strong, .account-item span { display: block; }
.account-item div span { margin-top: 3px; color: #68818a; font-size: 12px; }
.form-message { min-height: 22px; margin: 10px 0 0; font-size: 13px; font-weight: 700; }
.form-message.success { color: #32642a; }
.form-message.error { color: #a73d28; }
.compact-panel { max-width: 620px; }
.inline-form, .filter-bar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { min-width: 220px; margin: 0; }
.price-equation { padding-bottom: 12px; color: var(--sea); font-size: 20px; font-weight: 850; }
.price-equation strong { color: var(--coral); }
.filter-bar { margin-bottom: 14px; padding: 14px; border-radius: 16px; background: rgba(255, 253, 244, .88); border: 1px solid var(--line); }
.filter-bar input, .filter-bar select { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; background: white; color: var(--ink); }
.filter-bar input:not([type="date"]) { min-width: 220px; flex: 1; }
.filter-separator { color: #68818a; font-size: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; color: #607a82; font-size: 13px; }
.confirm-check { display: flex; align-items: center; gap: 10px; margin: 16px 0; padding: 14px; border-radius: 13px; background: var(--sand); font-size: 14px; font-weight: 750; }
.confirm-check input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--sea); }
.issued-success { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 18px; border: 2px solid #8fc982; border-radius: 16px; background: #ecf9e8; }
.issued-success span, .issued-success strong { display: block; }
.issued-success span { color: #50784b; font-size: 12px; }
.issued-success strong { margin-top: 4px; font-size: 27px; letter-spacing: .08em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: #607a82; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 800; background: #e6f6f3; color: var(--sea); }
.status.verified, .status.redeemed, .status.weather_continuation { background: #def3d8; color: #32642a; }
.status.active { background: #def3d8; color: #32642a; }
.status.partially_verified { background: #fff0bd; color: #795600; }
.status.refunded, .status.voided, .status.expired, .status.inactive { background: #ffe6df; color: #a73d28; }
.entitlement-summary { display: grid; gap: 5px; margin-top: 7px; }
.entitlement-summary .status { width: fit-content; }
.verify-venue-badge { margin: 12px 0 18px; padding: 12px 14px; border-radius: 14px; background: #e6f6f3; color: var(--sea); }
.ticket-page { max-width: 560px; margin: 0 auto; }
.ticket { overflow: hidden; border-radius: 30px; background: var(--paper); box-shadow: var(--shadow); border: 1px solid var(--line); }
.ticket-head { padding: 28px; background: var(--ink); color: white; }
.ticket-head strong { display: block; font-size: 50px; color: var(--sun); letter-spacing: -.05em; }
.ticket-body { padding: 26px; }
.qr { display: block; width: min(340px, 100%); margin: 4px auto 18px; border-radius: 22px; }
.ticket-code { padding: 12px; border: 1px dashed var(--sea); border-radius: 12px; text-align: center; font-weight: 850; letter-spacing: .12em; }
.ticket-download { width: 100%; margin-bottom: 18px; }
.ticket-image-viewer { position: fixed; inset: 0; z-index: 50; overflow: auto; background: rgba(6, 47, 63, .96); padding: 18px; -webkit-overflow-scrolling: touch; }
.ticket-image-toolbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 14px; width: min(760px, 100%); margin: 0 auto 14px; padding: 14px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.ticket-image-toolbar strong, .ticket-image-toolbar span { display: block; }
.ticket-image-toolbar span { margin-top: 4px; color: #607a82; font-size: 12px; }
.ticket-image-stage { width: min(760px, 100%); margin: 0 auto; }
.ticket-image-stage img { display: block; width: 100%; height: auto; border-radius: 18px; background: var(--paper); -webkit-touch-callout: default; user-select: auto; }
.info-list { display: grid; gap: 10px; margin: 18px 0; }
.info-list div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.verify-box { max-width: 620px; margin: 5vh auto; }
.verify-result { margin-top: 16px; padding: 22px; border-radius: 18px; background: #e0f5d9; color: #2f6229; }
.verify-result.error { background: #ffe4dc; color: #963c28; }
.verify-preview { border: 2px solid #8fc982; }
.camera-wrap { position: relative; display: none; overflow: hidden; margin-top: 16px; border-radius: 18px; background: var(--ink); }
#camera { display: block; width: 100%; min-height: 280px; object-fit: cover; }
.scan-frame { position: absolute; inset: 16% 14% 24%; border: 3px solid var(--sun); border-radius: 20px; box-shadow: 0 0 0 999px rgba(6, 47, 63, .28); pointer-events: none; }
.camera-stop { position: absolute; top: 12px; right: 12px; z-index: 2; }
#camera-status { position: absolute; bottom: 0; left: 0; right: 0; margin: 0; padding: 12px; background: rgba(6, 47, 63, .8); color: white; text-align: center; font-size: 13px; }
.scanner-mode { overflow: hidden; background: #031c25; }
.scanner-mode .sun-orb, .scanner-mode .topbar { display: none; }
.scanner-mode main { width: 100%; max-width: none; min-height: 100dvh; margin: 0; }
.fullscreen-scanner { position: fixed; inset: 0; z-index: 60; min-height: 100vh; height: 100dvh; overflow: hidden; background: #031c25; color: white; }
.scanner-camera { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 40%, #164d59, #031c25 72%); }
.scanner-camera #camera { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.scanner-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,20,27,.72) 0, transparent 24%, transparent 68%, rgba(2,20,27,.86) 100%); pointer-events: none; }
.fullscreen-scanner .scan-frame { inset: 50% auto auto 50%; width: min(72vw, 380px); aspect-ratio: 1; transform: translate(-50%, -52%); border: 3px solid var(--sun); border-radius: 28px; box-shadow: 0 0 0 999px rgba(2, 20, 27, .3), 0 0 34px rgba(255, 207, 69, .36); }
.fullscreen-scanner .scan-frame::before, .fullscreen-scanner .scan-frame::after { content: ""; position: absolute; left: 12%; right: 12%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #fff3b0, transparent); animation: scanner-line 2.2s ease-in-out infinite; }
.fullscreen-scanner .scan-frame::before { top: 18%; }
.fullscreen-scanner .scan-frame::after { bottom: 18%; animation-delay: -1.1s; }
.scanner-top { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top) + 16px) 18px 14px; }
.scanner-top span, .scanner-top strong { display: block; }
.scanner-top span { color: rgba(255,255,255,.66); font-size: 11px; letter-spacing: .12em; }
.scanner-top strong { margin-top: 2px; font-size: 18px; }
.scanner-icon-button { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(3,28,37,.62); color: white; font-size: 25px; backdrop-filter: blur(12px); }
.scanner-guide { position: absolute; z-index: 3; left: 18px; right: 18px; top: calc(50% + min(39vw, 205px)); text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.scanner-guide strong, .scanner-guide span { display: block; }
.scanner-guide strong { font-size: 18px; }
.scanner-guide span { margin-top: 7px; color: rgba(255,255,255,.72); font-size: 12px; }
.scanner-bottom { position: absolute; z-index: 3; left: 18px; right: 18px; bottom: 0; display: grid; gap: 10px; padding-bottom: calc(env(safe-area-inset-bottom) + 16px); text-align: center; }
.scanner-bottom #camera-status { position: static; padding: 0; background: none; color: rgba(255,255,255,.82); font-size: 13px; }
.scanner-bottom .btn { justify-self: center; }
.scanner-text-button { justify-self: center; border: 0; background: transparent; color: rgba(255,255,255,.78); padding: 8px 14px; font: inherit; }
@keyframes scanner-line { 0%, 100% { opacity: .35; transform: translateY(-8px); } 50% { opacity: 1; transform: translateY(8px); } }
.https-tip { display: grid; gap: 9px; margin: 16px 0; padding: 15px; border: 1px solid #f0c456; border-radius: 14px; background: #fff6d8; color: #6b5314; }
.https-tip span { font-size: 13px; line-height: 1.55; }
.capture-button { display: block; margin: 20px 0; padding: 18px; text-align: center; font-size: 17px; }
.capture-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: white; padding: 12px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 30; box-shadow: var(--shadow); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.checkboxes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; max-height: 250px; overflow: auto; padding: 4px; }
.checkboxes label { display: flex; gap: 7px; padding: 8px; border-radius: 10px; background: var(--foam); font-size: 12px; }
.promo-body { background: var(--ink); }
.promo { width: min(760px, 100%); margin: 0 auto; min-height: 100vh; background: var(--sand); }
.promo-top { padding: 70px 56px 45px; color: white; background: radial-gradient(circle at 85% 15%, rgba(255,207,69,.85) 0 14%, transparent 14.5%), linear-gradient(145deg, #073544, #08798a); }
.promo-logo { display: block; width: 88px; height: 88px; margin-bottom: 24px; border-radius: 28px; object-fit: contain; background: white; box-shadow: 0 16px 40px rgba(0,0,0,.16); }
.promo-top h1 { font-size: clamp(70px, 14vw, 118px); }
.promo-top > p:last-child { margin-bottom: 0; color: rgba(255,255,255,.75); }
.promo-price { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 35px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.25); }
.promo-price span { font-weight: 800; }
.promo-price strong { color: var(--sun); font-size: clamp(80px, 18vw, 140px); line-height: .72; letter-spacing: -.09em; }
.promo-price small { font-size: 20px; letter-spacing: 0; }
.promo-projects { padding: 35px 56px; }
.promo-power { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 22px; border-radius: 20px; background: var(--coral); color: white; }
.promo-power b { font-size: 22px; }
.promo-power span { grid-column: span 2; margin-top: 12px; font-size: 12px; }
.promo-list { margin-top: 24px; font-weight: 700; line-height: 2.1; }
.promo-foot { padding: 35px 56px 55px; background: var(--paper); }
.promo-foot strong { font-size: 26px; }
.promo-foot p { line-height: 1.8; }
.promo-foot small { display: block; margin-top: 18px; color: #668089; line-height: 1.6; }
.promo-cta { padding: 14px 18px; border-radius: 12px; background: var(--sun); font-weight: 850; }

@media (max-width: 800px) {
  .topbar { height: 68px; padding: 0 16px; }
  .brand small { display: none; }
  main { width: min(94vw, 620px); margin-top: 18px; }
  .hero { border-radius: 24px; padding: 28px 22px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:last-child { grid-column: span 2; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head .toolbar { margin-top: 12px; }
  .panel { padding: 17px; border-radius: 20px; }
  .login { width: 100%; }
  .login .panel { padding: 24px 20px; overflow: hidden; }
  .account-grid { display: flex; flex-direction: column; }
  .account-grid .panel:first-child { order: -1; }
  .account-section input, .account-section select, .issue-section input { min-height: 48px; font-size: 16px; }
  .mobile-submit { width: 100%; min-height: 52px; font-size: 16px; }
  .inline-form, .filter-bar { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .inline-form .field, .filter-bar input:not([type="date"]) { min-width: 0; width: 100%; }
  .filter-separator { display: none; }
  .issued-success { display: block; }
  .issued-success .button-row { margin-top: 14px; }
  .issued-success .btn { width: 100%; text-align: center; }
  .ticket-image-viewer { padding: 8px; }
  .ticket-image-toolbar { position: static; display: block; border-radius: 14px; }
  .ticket-image-toolbar .button-row { margin-top: 12px; }
  .ticket-image-toolbar .btn { flex: 1; }
  .ticket-image-stage img { border-radius: 12px; }
  .checkboxes { grid-template-columns: 1fr; }
  .promo-top, .promo-projects, .promo-foot { padding-left: 28px; padding-right: 28px; }
}
