:root {
  color-scheme: light;
  --ink: #172523;
  --muted: #50625f;
  --brand: #06694e;
  --brand-dark: #074936;
  --tint: #e6f3ed;
  --paper: #fff;
  --canvas: #f5f7f6;
  --line: #dce5e0;
  --danger: #a12537;
  --amber: #805218;
  --blue: #275386;
  font: 16px/1.55 "Inter", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { color: inherit; font: inherit; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
button, a { touch-action: manipulation; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #19856b; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; overflow-wrap: anywhere; }
.icon { width: 19px; height: 19px; flex: none; display: inline-block; vertical-align: middle; }
.skip { position: fixed; background: white; z-index: 10; padding: .6rem; transform: translateY(-120%); }
.skip:focus { transform: translateY(0); }
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; margin: auto; max-width: 1320px; padding: 0 32px; gap: 12px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 800; text-decoration: none; color: var(--ink); }
.mark .icon { padding: 6px; width: 32px; height: 32px; border-radius: 6px; background: #d2f2e6; }
.top-actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; text-decoration: none; font-weight: 650; overflow-wrap: anywhere; }
.btn:hover { background: #eef4f0; color: var(--ink); }
.btn.primary { color: white; border-color: var(--brand); background: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--danger); }
.btn.icon-btn { width: 44px; padding: 0; }
.btn.subtle { background: transparent; border-color: transparent; }
.hero { min-height: 510px; display: flex; align-items: center; color: #fff; background: #152623; position: relative; isolation: isolate; }
.hero-photo { position: absolute; inset: 0 0 0 auto; width: 78%; height: 100%; object-fit: cover; object-position: center 53%; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #152623 19%, rgba(21,38,35,.94) 36%, rgba(21,38,35,.24) 73%, rgba(21,38,35,.08)); }
.hero-inner, .public-inner { max-width: 1320px; width: 100%; margin: 0 auto; padding: 52px 32px; }
.hero h1 { font-size: 52px; max-width: 560px; font-weight: 800; }
.hero h1 span { display: inline-block; }
.hero p { font-size: 20px; margin: 22px 0 28px; max-width: 450px; color: #e5f3ee; }
.hero .btn { min-height: 48px; }
.public-band { background: #fff; border-bottom: 1px solid var(--line); }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.offers article { border-left: 1px solid var(--line); padding-inline-start: 24px; }
.offers article:first-child { border: 0; padding: 0; }
.offers strong { font-size: 30px; display: block; font-variant-numeric: tabular-nums; }
.offers span, .muted, .sub { color: var(--muted); }
.sub { font-size: 14px; }
footer { color: var(--muted); padding: 26px 32px; max-width: 1320px; margin: auto; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.auth { margin: 52px auto; padding: 0 18px; max-width: 464px; }
.auth form { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin-top: 20px; }
.auth .actions { margin-top: 16px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 5px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; border: 1px solid #a9b9b3; border-radius: 5px; background: white; padding: 8px 10px; min-height: 44px; font-weight: 400; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
textarea { min-height: 100px; resize: vertical; }
.paired { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1480px; margin: auto; min-height: calc(100vh - 69px); }
.side { background: white; border-right: 1px solid var(--line); padding: 24px 12px; }
.side p { padding: 0 12px 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.side nav { display: grid; gap: 3px; }
.side a { color: var(--ink); display: flex; min-height: 44px; align-items: center; gap: 9px; border-radius: 6px; padding: 7px 12px; text-decoration: none; }
.side a:hover { background: var(--canvas); }
.side a[aria-current=page] { color: var(--brand-dark); background: var(--tint); font-weight: 750; }
.content { padding: 30px 34px 44px; min-width: 0; }
.heading { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.heading h1 { font-size: 30px; }
.heading .sub { margin-top: 4px; }
.banner { border: 1px solid #decfae; border-radius: 6px; padding: 12px 15px; color: var(--amber); background: #fff7e7; margin-bottom: 18px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.metric { padding: 14px 18px; min-width: 0; overflow-wrap: anywhere; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric b { display: block; margin-top: 2px; font-size: 22px; font-variant-numeric: tabular-nums; }
.filter { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(125px, .45fr) minmax(125px, .45fr) auto; gap: 10px; margin-bottom: 12px; align-items: end; }
.sheet { width: 100%; border: 1px solid var(--line); border-spacing: 0; border-radius: 6px; background: white; text-align: left; font-size: 14px; }
.sheet thead { background: #ecf1ee; }
.sheet th, .sheet td { padding: 12px; vertical-align: middle; text-align: left; overflow-wrap: anywhere; }
.sheet td { border-top: 1px solid var(--line); }
.sheet td .sub { display: block; }
.sheet td:first-child { min-width: 41px; }
.sheet time { white-space: nowrap; }
.sheet .btn { min-height: 36px; font-size: 13px; }
.sheet .btn.icon-btn { min-height: 44px; }
.tag { display: inline-flex; align-items: center; max-width: 100%; border-radius: 4px; padding: 2px 7px; background: #eef0f2; color: #4d5c60; font-size: 13px; font-weight: 650; }
.tag.online, .tag.success, .tag.redeemed { color: #126048; background: #e0f2e9; }
.tag.address_failed, .tag.failed, .tag.void { color: var(--danger); background: #f9e9ec; }
.tag.waiting, .tag.return_timeout, .tag.expired_unknown, .tag.registered { color: #755018; background: #fff1d8; }
.tag.sent, .tag.queued { color: var(--blue); background: #e9f0fc; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 0; }
.registration-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.registration-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; }
.registration-list li + li { border-top: 1px solid var(--line); }
.registration-list li > div { min-width: 0; overflow-wrap: anywhere; }
.registration-list .btn { flex: none; }
.registration-list .tag { display: table; margin-top: 3px; }
.empty { padding: 44px 20px; border: 1px dashed #b6c5be; border-radius: 6px; background: white; text-align: center; color: var(--muted); }
.empty strong { color: var(--ink); }
.empty p { margin-top: 4px; }
.mobile-list { display: none; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; min-height: 44px; white-space: nowrap; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a[aria-current=page] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }
.panel { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 20px; max-width: 770px; }
.panel + .panel, .section + .section { margin-top: 20px; }
.section h2, .panel h2 { font-size: 19px; margin-bottom: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; gap: 18px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; }
dialog { border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); width: min(600px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 22px; }
dialog::backdrop { background: rgba(15, 28, 25, .55); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.dialog-head h2 { font-size: 23px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.form-error { color: var(--danger); overflow-wrap: anywhere; margin: 0; }
.notice { position: fixed; max-width: min(420px, calc(100vw - 32px)); bottom: 18px; right: 18px; z-index: 5; background: #173c31; color: white; border: 1px solid #34614e; border-radius: 6px; padding: 12px 16px; }
.notice.error { background: #731a29; }
.status-line { font-size: 14px; margin: 0 0 12px; }
.scroll-table { overflow-x: auto; }
.scroll-table .sheet { min-width: 560px; }
.picker { border: 1px solid var(--line); border-radius: 5px; padding: 8px 12px; max-height: 220px; overflow: auto; }
.picker label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.video { max-width: 100%; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.toolbar-end { margin-left: auto; }
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 4px 12px; }
  .side p { display: none; }
  .side nav { display: flex; overflow-x: auto; }
  .side a { white-space: nowrap; }
  .content { padding: 24px 20px 32px; }
}
@media (max-width: 640px) {
  .top-inner, .hero-inner, .public-inner { padding-inline: 16px; }
  .top-inner { min-height: 60px; }
  .top-actions .sub { display: none; }
  .brand-text { font-size: 20px; }
  .hero { min-height: 456px; align-items: flex-start; }
  .hero-photo { inset: auto 0 0; width: 100%; height: 57%; object-position: center 53%; }
  .hero::before { background: linear-gradient(180deg, #152623 40%, rgba(21,38,35,.84) 55%, transparent 76%); }
  .hero-inner { padding-top: 27px; padding-bottom: 215px; }
  .hero h1 { font-size: 34px; max-width: 390px; }
  .hero h1 span { display: block; }
  .hero p { font-size: 16px; margin: 12px 0 16px; }
  .hero .btn { min-height: 44px; }
  .offers { grid-template-columns: 1fr; gap: 16px; padding-block: 26px; }
  .offers article { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .offers strong { font-size: 24px; }
  .heading h1 { font-size: 26px; }
  .content { padding: 18px 14px 80px; }
  .metric { padding: 10px 8px; }
  .metric b { font-size: 16px; }
  .metric .sub { font-size: 12px; }
  .filter { grid-template-columns: 1fr 1fr; }
  .filter .search { grid-column: 1/-1; }
  .filter .btn { grid-column: 1/-1; }
  .desktop-devices { display: none; }
  .mobile-list { display: grid; border: 1px solid var(--line); border-radius: 6px; background: white; }
  .mobile-row { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; padding: 8px 12px; gap: 8px; }
  .mobile-row + .mobile-row { border-top: 1px solid var(--line); }
  .mobile-row label { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
  .mobile-row a { text-decoration: none; color: var(--ink); min-width: 0; display: grid; gap: 2px; min-height: 51px; overflow-wrap: anywhere; }
  .mobile-row .line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px; }
  .mobile-bar { position: sticky; bottom: 8px; margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: white; }
  .settings-grid { grid-template-columns: 1fr; }
  .notice { bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
