﻿:root {
  --red: #8f0804;
  --red-dark: #5d0302;
  --gold: #ffd36a;
  --gold-soft: #fff1c0;
  --cream: #fff9e8;
  --ink: #280b08;
  --muted: #84645b;
  --line: rgba(142, 8, 4, .16);
  --shadow: 0 18px 45px rgba(71, 5, 2, .18);
}

* {
  box-sizing: border-box;
}

html {
  background: #f2e8d8;
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .08), transparent 18%, transparent 82%, rgba(0, 0, 0, .08)),
    #f2e8d8;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  width: min(390px, 100dvw);
  max-width: 100dvw;
  min-height: 100vh;
  margin: 0;
  padding-bottom: 92px;
  background: var(--cream);
  box-shadow: 0 0 44px rgba(0, 0, 0, .18);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 218, 112, .35), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, .15), transparent 24%),
    linear-gradient(160deg, #b8140c 0%, #7d0503 58%, #4b0201 100%);
}

.hero::after {
  content: "";
  position: absolute;
  left: -30px;
  right: -30px;
  bottom: -64px;
  height: 86px;
  background: var(--cream);
  border-radius: 50% 50% 0 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-topline {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 223, 147, .72);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: var(--gold-soft);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 17px 0 0;
  font-size: clamp(36px, 9.2vw, 42px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
  color: #fff4bd;
  text-shadow: 0 4px 0 rgba(58, 0, 0, .72);
}

.hero-subtitle {
  margin: 5px 0 0;
  font-size: 20px;
  font-weight: 900;
}

.hero-claim {
  margin: 12px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(38, 0, 0, .38);
  border: 1px solid rgba(255, 220, 139, .58);
  color: #fff0bd;
  font-size: 17px;
  font-weight: 900;
}

.price-panel {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff6d6;
  color: var(--red);
  box-shadow: var(--shadow);
}

.price-label {
  display: block;
  color: #8d4d20;
  font-size: 13px;
  font-weight: 800;
}

.price-panel strong {
  font-size: 40px;
  line-height: 1;
  font-weight: 950;
}

.price-unit {
  font-size: 15px;
  font-weight: 800;
}

.price-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 800;
  color: #5a2716;
}

.hero-btn {
  width: 100%;
  margin-top: 12px;
}

.section {
  padding: 15px 14px 0;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.24;
  font-weight: 950;
  color: var(--red-dark);
  overflow-wrap: anywhere;
}

.section h2 span {
  color: var(--red);
  font-size: 1.08em;
}

.section-kicker {
  margin-bottom: 4px;
  color: #b77722;
  font-size: 14px;
  font-weight: 900;
}

.pain-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.pain-card,
.value-item,
.agenda-item,
.day-block,
.teacher-card,
.result-section,
.final-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf3;
  box-shadow: 0 8px 22px rgba(120, 48, 21, .08);
}

.pain-card {
  padding: 9px 11px;
}

.pain-card b {
  display: block;
  margin-bottom: 3px;
  color: var(--red);
  font-size: 16px;
  font-weight: 950;
}

.pain-card span {
  display: block;
  color: #56332b;
  font-size: 14px;
  font-weight: 750;
}

.value-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.value-item {
  padding: 10px;
}

.value-item b {
  display: block;
  margin-bottom: 3px;
  color: var(--red);
  font-size: 17px;
  font-weight: 950;
}

.value-item span {
  display: block;
  color: #5b342b;
  font-size: 14px;
}

.agenda {
  display: grid;
  gap: 10px;
}

.day-block {
  padding: 10px;
}

.day-block h3 {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.28;
}

.agenda-item {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 9px 0 9px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-top: 1px solid rgba(142, 8, 4, .12);
}

.agenda-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d60d08, #f3be37);
}

.agenda-item time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 24px;
  padding: 0 5px;
  border-radius: 7px;
  background: #fff6d6;
  border: 1px solid #f0c76d;
  color: #8f0804;
  box-shadow: 0 3px 8px rgba(143, 8, 4, .07);
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.agenda-item b {
  display: block;
  color: #53130c;
  font-size: 15px;
  line-height: 1.22;
  font-weight: 950;
}

.agenda-item p {
  margin: 0;
  color: #56332b;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 650;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff3ce;
  border: 1px solid #e5bd63;
  color: #6e2a12;
  font-size: 14px;
  font-weight: 800;
}

.teacher-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 11px;
  padding: 10px;
}

.teacher-card img {
  width: 74px;
  height: 88px;
  object-fit: contain;
  background: #fff7dc;
  border-radius: 12px;
  border: 2px solid #f3c55e;
}

.teacher-card h2 {
  margin-bottom: 4px;
  font-size: 19px;
}

.teacher-card p,
.final-section p,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.result-section {
  margin: 16px 14px 0;
  padding: 12px;
}

.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.result-heading h2 {
  margin: 0;
}

.view-list-btn {
  flex: 0 0 auto;
  min-height: 30px;
  border: 1px solid #d8af62;
  border-radius: 999px;
  padding: 0 13px;
  background: #fff8df;
  color: #8f0804;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 5px 12px rgba(143, 8, 4, .08);
}

.registration-ticker {
  position: relative;
  overflow: hidden;
  height: 124px;
  margin-top: 9px;
  border-radius: 11px;
  background: #7c0805;
  color: #fff7d8;
}

.ticker-track {
  display: flex;
  flex-direction: column;
  animation: scrollUp 16s linear infinite;
}

.registration-row,
.empty-list {
  min-height: 34px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 229, 160, .16);
  font-size: 14px;
  font-weight: 800;
}

.registration-row small {
  display: block;
  color: #ffd77c;
  font-size: 13px;
  font-weight: 700;
}

.empty-list {
  display: flex;
  align-items: center;
  height: 100%;
  color: #ffdf9b;
}

.empty-list.light {
  min-height: 60px;
  border: 1px dashed #e1bf7d;
  border-radius: 10px;
  background: #fffaf0;
  color: #7a3b2c;
}

@keyframes scrollUp {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.final-section {
  margin: 16px 14px 0;
  padding: 13px 12px;
  background: linear-gradient(180deg, #fffdf3, #fff0c0);
}

.final-section .primary-btn {
  width: 100%;
  margin-top: 10px;
}

.primary-btn {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: linear-gradient(180deg, #ffe18a, #f7b92d);
  color: #6b0904;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(75, 3, 1, .24);
}

.secondary-btn {
  min-height: 42px;
  border: 1px solid #d8af62;
  border-radius: 999px;
  padding: 0 16px;
  background: #fff9e8;
  color: #7e2a12;
  font-size: 16px;
  font-weight: 950;
}

.bottom-cta {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 20;
  width: min(390px, 100dvw);
  max-width: 100dvw;
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
  align-items: center;
  padding: 10px 13px calc(10px + env(safe-area-inset-bottom));
  background: rgba(80, 4, 2, .96);
  color: #fff8d5;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .22);
}

.bottom-cta span {
  display: block;
  font-size: 15px;
  line-height: 1.05;
  color: #ffd77a;
  font-weight: 900;
}

.bottom-cta strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 4px;
  color: #fff8d5;
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.bottom-cta strong .price-suffix {
  font-size: 17px;
  font-weight: 900;
  font-style: normal;
  line-height: 1;
}

.bottom-cta .primary-btn {
  min-height: 56px;
  padding: 0 14px;
  font-size: 19px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px 10px calc(14px + env(safe-area-inset-bottom));
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .54);
}

.modal-card {
  position: relative;
  width: min(390px, calc(100dvw - 20px));
  max-width: calc(100dvw - 20px);
  max-height: min(86dvh, 680px);
  overflow: auto;
  padding: 13px 12px 14px;
  border-radius: 18px;
  background: var(--cream);
  box-shadow: 0 22px 56px rgba(0, 0, 0, .34);
}

.modal-card h2 {
  margin: 0;
  color: var(--red-dark);
  font-size: 20px;
  font-weight: 950;
}

.list-card {
  max-height: min(78dvh, 620px);
}

.registration-list {
  display: grid;
  gap: 7px;
  max-height: min(56dvh, 430px);
  overflow: auto;
}

.list-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #ead1a9;
  border-radius: 10px;
  background: #fffaf0;
  color: #5a271d;
  font-size: 15px;
  font-weight: 900;
}

.list-row strong {
  color: #8f0804;
  font-size: 15px;
  font-weight: 950;
  text-align: right;
}

.modal-note {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #7c3e2b;
  font-size: 13px;
  font-weight: 800;
}

form label {
  display: block;
  margin-bottom: 7px;
}

form label span,
legend {
  display: block;
  margin-bottom: 5px;
  color: #5b2a20;
  font-size: 14px;
  font-weight: 900;
}

input[type="text"],
input[type="tel"] {
  width: 100%;
  height: 38px;
  border: 1px solid #dfbd8c;
  border-radius: 10px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(143, 8, 4, .12);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.interest-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.interest-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px;
  border: 1px solid #ead1a9;
  border-radius: 10px;
  background: #fffaf0;
}

.interest-group strong {
  flex: 0 0 100%;
  color: #8f0804;
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
}

.interest-grid label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #d6b27d;
  border-radius: 999px;
  background: #fffdf6;
  color: #6d3a28;
  font-size: 12.5px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.interest-grid input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.interest-grid label.is-selected {
  border-color: var(--red);
  background: #8f0804;
  color: #fff6cf;
}

.form-message,
.payment-panel {
  margin-top: 9px;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
}

.submit-btn {
  width: 100%;
  min-height: 42px;
  margin-top: 9px;
}

.payment-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff7db;
}

.payment-panel h3 {
  margin: 0 0 6px;
  color: var(--red-dark);
  font-size: 20px;
}

.payment-panel p {
  margin: 0 0 10px;
  color: #6a3b2e;
  font-size: 16px;
}

.manual-payment {
  display: grid;
  gap: 10px;
}

.manual-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #8f0804;
  color: #fff4c2;
}

.manual-amount span {
  font-size: 15px;
  font-weight: 900;
}

.manual-amount strong {
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.manual-qr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.manual-qr-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ecd4a2;
  border-radius: 14px;
  background: #fffdf5;
}

.manual-qr-box > strong {
  color: var(--red);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 950;
  text-align: center;
}

.assistant-qr-box {
  padding: 14px 12px;
  background: linear-gradient(180deg, #fffdf5, #fff2ca);
}

.assistant-qr-box > strong {
  font-size: 20px;
}

.assistant-qr-box p {
  margin: 0;
  color: #5f2a1e;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 850;
  text-align: left;
}

.manual-qr {
  display: grid;
  place-items: center;
  min-height: 0;
  border-radius: 12px;
  background: #fff;
}

.manual-qr img {
  width: min(280px, 78vw);
  height: min(280px, 78vw);
  object-fit: contain;
  border-radius: 8px;
}

.manual-steps {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fffdf5;
  border: 1px solid #ecd4a2;
  color: #5c2b20;
}

.manual-steps strong {
  display: block;
  margin-bottom: 6px;
  color: #8f0804;
  font-size: 16px;
  font-weight: 950;
}

.manual-steps p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 850;
}

.manual-steps p + p {
  margin-top: 4px;
}

.success-toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 60;
  width: calc(100% - 28px);
  max-width: 402px;
  transform: translateX(-50%);
  padding: 13px 14px;
  border-radius: 14px;
  background: #fff9df;
  color: var(--red-dark);
  box-shadow: var(--shadow);
  border: 1px solid #eec76b;
}

.success-toast strong,
.success-toast span {
  display: block;
}

.success-toast span {
  margin-top: 3px;
  color: #6b3e2f;
  font-size: 15px;
}

@media (max-width: 360px) {
  .price-panel,
  .teacher-card {
    grid-template-columns: 1fr;
  }

  .agenda-item {
    grid-template-columns: 50px 1fr;
    gap: 8px;
  }

  .bottom-cta {
    grid-template-columns: 1fr 132px;
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .bottom-cta span {
    font-size: 14px;
  }

  .bottom-cta strong {
    font-size: 23px;
  }

  .bottom-cta strong .price-suffix {
    font-size: 15px;
  }

  .bottom-cta .primary-btn {
    min-height: 50px;
    font-size: 17px;
  }

  .manual-qr-grid {
    grid-template-columns: 1fr;
  }

  .manual-qr img {
    width: min(268px, 80vw);
    height: min(268px, 80vw);
  }
}

@media (min-width: 900px) {
  .page {
    margin: 0 auto;
  }

  .bottom-cta {
    left: 50%;
    transform: translateX(-50%);
  }

  .modal {
    justify-content: center;
  }
}

.admin-body {
  background: #f2e8d8;
}

.admin-page {
  width: min(760px, 100dvw);
  margin: 0 auto;
  padding: 14px 12px 26px;
}

.admin-hero,
.admin-card,
.admin-stats > div,
.admin-order {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf3;
  box-shadow: 0 8px 22px rgba(120, 48, 21, .08);
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: #fff8d5;
  background: linear-gradient(145deg, #8f0804, #4d0302);
}

.admin-hero p {
  margin: 0 0 3px;
  color: #ffd77a;
  font-size: 14px;
  font-weight: 900;
}

.admin-hero h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.admin-link {
  flex: 0 0 auto;
  color: #fff4bf;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.admin-card {
  margin-top: 12px;
  padding: 12px;
}

.admin-card h2 {
  margin: 0 0 10px;
  color: var(--red-dark);
  font-size: 20px;
  line-height: 1.2;
}

.admin-token span {
  display: block;
  margin-bottom: 6px;
  color: #5b2a20;
  font-size: 15px;
  font-weight: 900;
}

.admin-token input {
  width: 100%;
  height: 42px;
  border: 1px solid #dfbd8c;
  border-radius: 12px;
  padding: 0 13px;
  font-size: 17px;
}

.admin-actions-bar {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 8px;
  margin-top: 10px;
}

.admin-message {
  min-height: 19px;
  margin: 9px 0 0;
  color: #6a3b2e;
  font-size: 15px;
  font-weight: 800;
}

.admin-message.is-error {
  color: var(--red);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.admin-stats > div {
  padding: 10px;
  text-align: center;
}

.admin-stats span {
  display: block;
  color: #7d4c38;
  font-size: 14px;
  font-weight: 900;
}

.admin-stats strong {
  display: block;
  margin-top: 3px;
  color: var(--red);
  font-size: 26px;
  line-height: 1;
}

.admin-order-list {
  display: grid;
  gap: 8px;
}

.admin-order {
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.admin-order.is-paid {
  grid-template-columns: 1fr auto;
}

.admin-order h3 {
  margin: 0 0 5px;
  color: #51150e;
  font-size: 17px;
  line-height: 1.2;
}

.admin-order h3 span {
  color: #8b5e4b;
  font-size: 15px;
}

.admin-order p {
  margin: 3px 0 0;
  color: #6a3b2e;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-confirm-btn {
  min-height: 46px;
  padding: 0 10px;
}

.admin-paid-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff1c0;
  color: var(--red);
  font-size: 14px;
  font-weight: 950;
}

.admin-empty {
  padding: 14px;
  border-radius: 12px;
  background: #fff7db;
  color: #7a4f3d;
  font-size: 15px;
  font-weight: 850;
}

@media (max-width: 520px) {
  .admin-actions-bar,
  .admin-order,
  .admin-order.is-paid {
    grid-template-columns: 1fr;
  }

  .admin-confirm-btn {
    width: 100%;
  }
}

