/* 十万名毛孔洗澡专家培育计划 — 设计令牌 */
:root {
  --ink: #14161c;
  --paper: #e7ecf2;
  --paper-deep: #d5dde8;
  --volt: #3d2bff;
  --volt-soft: #ece9ff;
  --flare: #ff3b5c;
  --flare-ink: #d91442;
  --lime: #d8ff3e;
  --mute: #5c6474;
  --line: rgba(20, 22, 28, 0.12);
  --white: #ffffff;
  --ok: #1f9d63;
  --warn: #c47a00;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 22, 28, 0.08);
  --font-display: Impact, "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-data: "Cascadia Code", Consolas, "SF Mono", monospace;
  --safe: max(16px, env(safe-area-inset-left));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(61, 43, 255, 0.12), transparent 42%),
    radial-gradient(circle at 100% 18%, rgba(216, 255, 62, 0.18), transparent 28%),
    var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--volt);
}

:focus-visible {
  outline: 3px solid var(--volt);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 布局 */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 24px;
}

.app.wide {
  max-width: 1100px;
  padding-bottom: 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--safe);
  position: static;
  z-index: 1;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.topbar .brand {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-left: 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.brand-mark {
  width: 88px;
  height: 40px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
  flex-shrink: 0;
  padding: 0;
  align-self: center;
  margin-left: -4px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  vertical-align: middle;
}

.brand-text {
  min-width: 0;
  margin-left: auto;
  text-align: right;
}

.brand-kicker {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.top-link {
  flex-shrink: 0;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 8px 12px;
}

.top-link:hover {
  border-color: var(--volt);
  color: var(--volt);
}

/* 英雄区 */
.hero {
  padding: 22px var(--safe) 4px;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  margin: 6px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(32px, 9.5vw, 46px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  max-width: 11em;
}

.hero h1 .num-thin {
  font-family: "Segoe UI Semibold", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-sub {
  margin: 0 0 14px;
  color: var(--mute);
  max-width: 28em;
  font-size: 14px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-about {
  min-height: 42px;
  padding: 0 16px;
  margin-bottom: 0;
  display: inline-flex;
  width: fit-content;
}

/* 价签：品牌紫海报牌 */
.price-plate {
  position: relative;
  max-width: 420px;
  background: linear-gradient(145deg, #7a4dff 0%, #8b5cf6 45%, #6d7bff 100%);
  color: var(--white);
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-shadow: 6px 6px 0 rgba(109, 70, 255, 0.2);
  border: 2px solid rgba(109, 70, 255, 0.4);
  overflow: visible;
}

.price-plate-stamp {
  position: absolute;
  top: -12px;
  right: 16px;
  background: #6ee7b7;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(8deg);
  z-index: 2;
}

.price-plate-kicker {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  opacity: 0.85;
  margin-bottom: 8px;
}

.price-plate-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.price-plate-old {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  min-width: 72px;
}

.price-plate-old span {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.price-plate-old s {
  font-family: var(--font-data);
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration-thickness: 2px;
  text-decoration-color: #ff8fab;
}

.price-plate-now {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  line-height: 0.8;
  flex: 1;
  justify-content: flex-end;
}

.price-plate-yen {
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 30px);
  opacity: 0.9;
  padding-bottom: 10px;
}

.price-plate-digits {
  font-family: var(--font-display);
  font-size: clamp(72px, 18vw, 92px);
  letter-spacing: -0.03em;
  color: var(--white);
  text-shadow: 2px 2px 0 rgba(61, 43, 255, 0.2);
}

.price-plate-per {
  font-family: var(--font-display);
  font-size: 15px;
  color: #fff36b;
  padding-bottom: 14px;
  margin-left: 6px;
  letter-spacing: 0.04em;
}

.price-plate-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.4);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

/* 步骤条 */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px var(--safe) 4px;
}

.step-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--mute);
}

.step-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  color: inherit;
  margin-bottom: 2px;
}

.step-chip.is-active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.step-chip.is-done {
  background: var(--volt-soft);
  color: var(--volt);
  border-color: transparent;
}

/* 卡片/面板 */
.panel {
  margin: 12px var(--safe);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.01em;
}

.panel-note {
  margin: 0 0 16px;
  color: var(--mute);
  font-size: 13px;
}

/* 表单 */
.form-grid {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field .req {
  color: var(--flare-ink);
  margin-left: 2px;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 0 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input:hover,
.field select:hover {
  border-color: rgba(61, 43, 255, 0.35);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--volt);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(61, 43, 255, 0.15);
}

.field .hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--mute);
}

.field .error {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--flare-ink);
  display: none;
}

.field.is-invalid input,
.field.is-invalid select {
  border-color: var(--flare);
  background: #fff5f7;
}

.field.is-invalid .error {
  display: block;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  min-height: 42px;
  padding: 8px 14px;
  font-size: 13px;
}

.chip:hover {
  border-color: var(--volt);
  color: var(--volt);
}

.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

/* 支付 */
.pay-options {
  display: grid;
  gap: 10px;
}

.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 14px;
  min-height: 56px;
}

.pay-option.is-on {
  border-color: var(--volt);
  background: var(--volt-soft);
  box-shadow: 0 0 0 3px rgba(61, 43, 255, 0.12);
}

.pay-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--white);
  flex-shrink: 0;
}

.pay-icon.wechat { background: #07c160; }
.pay-icon.alipay { background: #1677ff; }
.pay-icon.card { background: var(--ink); }

.pay-option strong {
  display: block;
}

.pay-option span {
  color: var(--mute);
  font-size: 12px;
}

.pay-offline {
  margin-top: 14px;
  padding: 20px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  text-align: center;
}

.pay-offline-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff3cd;
  color: #8a6d1a;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.pay-offline h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
}

.pay-offline .muted {
  margin: 0 0 16px;
  color: var(--mute);
  font-size: 13px;
}

.pay-offline .btn {
  width: 100%;
}

.pay-summary {
  margin: 16px 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #111318, #2a2f3d);
  color: var(--white);
}

.pay-summary .label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.pay-summary .amount {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  color: var(--lime);
  margin-top: 4px;
}

.pay-summary .strike {
  font-family: var(--font-data);
  color: rgba(255, 255, 255, 0.45);
  text-decoration: line-through;
  margin-left: 8px;
  font-size: 14px;
}

.pay-state {
  display: none;
  text-align: center;
  padding: 28px 10px 10px;
}

.pay-state.is-on {
  display: block;
}

.spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 4px solid var(--paper-deep);
  border-top-color: var(--volt);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.check-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok);
  color: white;
  display: grid;
  place-items: center;
  font-size: 30px;
}

/* 场次 */
.city-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.session-list {
  display: grid;
  gap: 10px;
}

.session-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--paper);
  display: grid;
  gap: 6px;
}

.session-card.is-on {
  border-color: var(--volt);
  background: var(--volt-soft);
  box-shadow: 0 0 0 3px rgba(61, 43, 255, 0.12);
}

.session-card.is-full {
  opacity: 0.55;
}

.session-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.session-title {
  font-weight: 700;
  font-size: 15px;
}

.session-meta {
  color: var(--mute);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag.ok { background: #e2f7ed; color: var(--ok); }
.tag.warn { background: #fff1d8; color: var(--warn); }
.tag.bad { background: #ffe4ea; color: var(--flare); }
.tag.volt { background: var(--volt-soft); color: var(--volt); }
.tag.ink { background: var(--ink); color: var(--white); }

.seats {
  font-family: var(--font-data);
  font-size: 12px;
}

/* 底部操作 */
.bottom-bar {
  position: static;
  left: auto;
  transform: none;
  bottom: auto;
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 12px var(--safe) max(12px, env(safe-area-inset-bottom));
  background: transparent;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  z-index: 1;
}

.panel-actions {
  display: flex;
  gap: 10px;
  width: min(480px, 100%);
  margin: 14px auto 0;
  padding: 0 var(--safe);
}

.panel-actions .btn {
  min-height: 50px;
}

.panel-actions .btn-primary {
  flex: 1;
}

.bottom-admin {
  margin-left: 0;
  align-self: center;
}

.bottom-bar .top-link + .top-link.bottom-admin {
  margin-left: 0;
}

[hidden] {
  display: none !important;
}

.btn {
  min-height: 50px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  flex: 1;
  background: var(--volt);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(61, 43, 255, 0.28);
}

.btn-primary:hover:not([disabled]) {
  background: #2f20e6;
}

.btn-ghost {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--volt);
  color: var(--volt);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

/* 完成态 */
.done-wrap {
  text-align: center;
  padding: 12px 4px 8px;
}

.done-code {
  margin: 14px auto;
  display: inline-block;
  font-family: var(--font-data);
  background: var(--ink);
  color: var(--lime);
  padding: 10px 14px;
  border-radius: 10px;
  letter-spacing: 0.08em;
}

.info-list {
  text-align: left;
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.info-list span:last-child {
  font-weight: 600;
  text-align: right;
}

/* 管理端 */
.admin-header {
  padding: 18px var(--safe) 8px;
}

.admin-header h1 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 32px;
}

.admin-toolbar {
  display: grid;
  gap: 10px;
  margin: 12px var(--safe) 0;
}

.toolbar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toolbar-row .btn {
  min-height: 44px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px var(--safe) 0;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.stat-card .num {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .lbl {
  color: var(--mute);
  font-size: 12px;
}

.table-wrap {
  margin: 14px var(--safe) 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

th {
  font-size: 12px;
  color: var(--mute);
  background: #f3f6fa;
  font-weight: 600;
}

td {
  font-size: 13px;
}

tr:last-child td {
  border-bottom: none;
}

.row-btn {
  color: var(--volt);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty-state {
  padding: 36px 16px;
  text-align: center;
  color: var(--mute);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

/* 抽屉 */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 28, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

.drawer-backdrop.is-on {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: var(--white);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 30px rgba(20, 22, 28, 0.12);
}

.drawer.is-on {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.drawer-body {
  padding: 16px;
  overflow: auto;
  flex: 1;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 18px;
}

.icon-btn:hover {
  border-color: var(--volt);
  color: var(--volt);
}

.field-view {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.field-view .k {
  font-size: 12px;
  color: var(--mute);
}

.field-view .v {
  font-size: 15px;
  font-weight: 600;
}

.capacity-grid {
  display: grid;
  gap: 10px;
  margin: 14px var(--safe) 0;
}

.capacity-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.capacity-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.capacity-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.muted {
  color: var(--mute);
}

.mono {
  font-family: var(--font-data);
}

@media (min-width: 720px) {
  .app.wide .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .app.wide .capacity-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .app.wide .admin-toolbar {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1 {
    font-size: 52px;
    line-height: 1.02;
  }

  .price-plate {
    max-width: 440px;
  }

  .price-plate-digits {
    font-size: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
