:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color-scheme: dark;
  --ink: #f1f6ff;
  --muted: #b6c8e6;
  --aqua: #91dcff;
  --line: #345489;
  --gold: #ffdd8c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; line-height: 1.55; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
p, h1, h2, dl, dd { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid #86dfff; outline-offset: 4px; }

.event {
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse 64rem 42rem at 50% 0, #102f6b, #071a45 55%, #060f29 100%);
}

.wechat-guided { overflow: hidden; }

.wechat-guide {
  position: fixed;
  z-index: 10;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: rgb(0 0 0 / 64%);
  color: #fff;
}

.wechat-guide-arrow {
  position: absolute;
  top: 13px;
  right: clamp(13px, 5vw, 24px);
  width: clamp(76px, 28vw, 126px);
  height: auto;
}

.wechat-guide-copy {
  position: absolute;
  top: clamp(47px, 14vw, 66px);
  right: clamp(91px, 30vw, 145px);
  left: 12px;
  text-align: right;
  font-size: clamp(1rem, 4.8vw, 1.25rem);
  line-height: 1.6;
  text-shadow: 0 1px 4px #000;
}

.wechat-guide-copy h1 { font: inherit; font-weight: 750; }
.wechat-guide-copy p { margin-top: 3px; }

.landing {
  max-width: 620px;
  margin: 0 auto;
  overflow: hidden;
  background: #0a2156;
}

.hero { position: relative; }
.hero img { width: 100%; }
.hero::after {
  position: absolute;
  right: -8%;
  bottom: -6px;
  left: -8%;
  height: 56px;
  border-bottom: 2px solid #46cfff;
  border-radius: 0 0 53% 47%;
  box-shadow: 0 5px 20px #159cff70, inset 0 -26px 23px -18px #0b245d;
  content: "";
  pointer-events: none;
  transform: rotate(-4deg);
}

.signup {
  position: relative;
  padding: 29px clamp(21px, 5.6vw, 44px) 26px;
  background: radial-gradient(ellipse 115% 58% at 86% 0, #163e81 0%, transparent 70%),
    linear-gradient(172deg, #0b235a, #071a46 72%, #0c255a);
}

.signup h2 { font-size: clamp(1.55rem, 4.9vw, 1.95rem); line-height: 1.25; margin-bottom: 20px; }
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field label { color: #e8f1ff; font-size: .935rem; font-weight: 650; }

.field input, .field select, #order-link {
  width: 100%;
  min-height: 46px;
  padding: 9px 13px;
  border: 1px solid #547ab1;
  border-radius: 9px;
  background: #071b43b3;
  color: var(--ink);
}

.field input::placeholder { color: #a2b7d9; }
.field input:focus, .field select:focus, #order-link:focus { border-color: #75d7ff; }

.price-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 3px 12px;
  margin: 19px 0 13px;
  padding: 11px 0 10px;
  border-top: 1px solid #42639b;
  border-bottom: 1px solid #36578b;
  font-weight: 650;
}

.prices { display: grid; text-align: right; }
.old-price { color: var(--muted); font-size: .85rem; font-weight: 400; }
.prices strong {
  color: var(--gold);
  font-size: clamp(1.9rem, 7vw, 2.5rem);
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
}
.currency { margin-right: .12em; font-size: .62em; }

.consent { display: flex; align-items: flex-start; gap: 8px; color: #d6e4fb; font-size: .875rem; margin: 0 0 15px; }
.consent input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #70d8ff; }

.button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  line-height: 1.35;
  cursor: pointer;
}

.primary {
  color: white;
  border-color: #6faaff;
  background: linear-gradient(180deg, #1768d8, #144ba9);
  box-shadow: 0 4px 19px #0066ff2c, inset 0 1px #8cdeff42;
}

.primary:hover { background: linear-gradient(180deg, #1a73e7, #1857bc); }
.primary:disabled { cursor: wait; opacity: .52; }
.event .primary { width: 100%; }

.payment-note { color: var(--muted); margin-top: 9px; font-size: .875rem; }
.signup .payment-note { text-align: center; }
.notices { margin-bottom: 9px; color: var(--muted); font-size: .875rem; }
.notices summary { color: var(--aqua); cursor: pointer; width: fit-content; }
.notices p { margin-top: 7px; }
.feedback { margin: 0 0 13px; padding: 10px 12px; background: #582b40; border-radius: 8px; color: #fff0f4; font-size: .94rem; }

.order-layout, .poster-layout { width: min(100% - 36px, 620px); margin: 0 auto; padding: 22px 0 40px; }
.event-strip { display: inline-flex; gap: 10px; align-items: center; color: #deebff; font-weight: 650; text-decoration: none; margin-bottom: 20px; }
.event-strip:hover { text-decoration: underline; }
.event-mark { width: 13px; height: 13px; flex: 0 0 auto; border: 2px solid #9ad8ff; border-radius: 50%; box-shadow: 0 0 12px #3ab6ff; }
.order-card { border: 1px solid #3e629b; border-radius: 16px; padding: clamp(17px, 5vw, 32px); background: linear-gradient(148deg, #173e79, #0b2152 47%, #09183b); }
.order-card h1, .poster-heading h1 { margin-top: 7px; font-size: clamp(1.55rem, 5vw, 2.15rem); line-height: 1.25; }
.intro { margin-top: 8px; color: var(--muted); }
.state { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .875rem; white-space: nowrap; }
.state-pending { color: #ffe5af; background: #554020; }
.state-paid { color: #b0f8d3; background: #16473c; }
.state-closed { color: #d5def2; background: #324058; }

.order-details { margin: 17px 0; padding: 10px 0; border-block: 1px solid #3b598c; }
.order-details div { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 0 9px; }
.order-details div + div { margin-top: 4px; }
.order-details dt { color: var(--muted); }
.order-price { color: var(--gold); font-size: 1.45rem; font-weight: 740; }
.order-id, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; overflow-wrap: anywhere; }

.handoff { background: #071a42; padding: 13px; border: 1px solid #3e629b; border-radius: 10px; }
.handoff h2 { font-size: 1.07rem; }
.handoff p { color: #ccddfa; margin: 5px 0 10px; font-size: .94rem; }
.handoff input { margin-bottom: 8px; }
.handoff .copy-result { margin: 7px 0 0; }
.copy-result:empty, #poster-status:empty { display: none; }
.refresh { margin-top: 8px; text-align: center; }
.text-button { display: inline-flex; min-height: 36px; align-items: center; padding: 0; color: var(--aqua); background: transparent; border: 0; text-decoration: underline; text-underline-offset: .21em; cursor: pointer; }

.poster-layout { max-width: 510px; }
.poster-heading { margin-bottom: 15px; }
.poster-heading p { color: var(--muted); margin-top: 6px; }
.poster-image { display: block; width: 100%; height: auto; border-radius: 9px; border: 1px solid #5384c0; }
.poster-actions { display: grid; justify-items: center; gap: 5px; margin-top: 12px; }

.admin { background: #eef3fa; color: #142745; color-scheme: light; }
.admin-layout { width: min(100% - 32px, 1200px); margin: 0 auto; padding: 28px 0; }
.admin-header { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.admin-header p { color: #415778; }
.admin-header h1 { font-size: 1.95rem; line-height: 1.2; }
.admin-header nav { display: flex; gap: 15px; flex-wrap: wrap; }
.admin a, .admin .text-button { color: #144e9d; text-underline-offset: .2em; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 15px; }
.summary > div, .admin-list { background: white; border: 1px solid #d2ddeb; border-radius: 11px; }
.summary > div { padding: 12px; }
.summary dt { color: #425776; font-size: .875rem; }
.summary dd { font-weight: 750; font-size: clamp(1.12rem, 2.3vw, 1.65rem); overflow-wrap: anywhere; }
.admin-list { padding: 15px; }
.admin-list h2 { font-size: 1.25rem; }
.filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 12px; margin: 10px 0 15px; }
.filters .field { margin: 0; }
.filters .field:first-child { flex: 1 1 180px; max-width: 350px; }
.filters label { color: #2d466a; }
.filters input, .filters select { border-color: #b4c4db; color: #142745; background: #f6f9fe; }
.filters input::placeholder { color: #596e8b; }
.filters select {
  appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, #37557e 50%), linear-gradient(135deg, #37557e 50%, transparent 50%);
  background-position: right 17px center, right 12px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: .9rem; }
th, td { padding: 8px 9px; border-bottom: 1px solid #e1e9f4; }
thead { color: #385479; background: #f2f6fc; }
tbody th { white-space: normal; min-width: 72px; }
.empty { padding: 18px 8px; color: #415778; }
.pagination { margin-top: 12px; display: flex; gap: 16px; }
.admin :focus-visible { outline-color: #174eaa; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 660px) {
  .landing { margin-block: 24px; border: 1px solid #496da6; border-radius: 16px; box-shadow: 0 24px 75px #030a2180; }
}

@media (max-width: 600px) {
  .summary { grid-template-columns: repeat(2, 1fr); }
}
