:root {
  color-scheme: light;
  --bg-top: #eef7ff;
  --bg-bottom: #fff6e7;
  --text: #1e2a35;
  --muted: #4f6476;
  --section-bg: rgba(255, 255, 255, 0.92);
  --section-border: #d2e1f0;
  --accent: #0d8fd3;
  --accent-dark: #0a70a6;
  --ok: #157a57;
  --error: #ad3131;
  --shadow: 0 10px 26px rgba(21, 62, 106, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
  font-family:
    "Inter",
    "Avenir Next",
    "Segoe UI",
    Roboto,
    sans-serif;
}

.page {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.hero {
  padding: 1.2rem 1.1rem;
  border: 2px solid #b7d6ef;
  background: linear-gradient(125deg, #dff3ff, #fff7d6);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.hero-tag {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f6e9a;
  text-transform: uppercase;
}

.hero-title {
  margin: 0.45rem 0 0.2rem;
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  line-height: 1.15;
}

.hero-subtitle {
  margin: 0;
  color: #2b465d;
  font-size: 1.02rem;
}

.event-grid {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.76);
  padding: 0.7rem 0.8rem;
  border: 1px solid #cdddf1;
  border-radius: 8px;
}

.event-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  font-weight: 600;
}

.event-label {
  color: var(--muted);
}

.section {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--section-border);
  background: var(--section-bg);
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
}

.menu-list {
  display: grid;
  gap: 0.7rem;
}

.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem;
  border: 1px solid #d6e2ee;
  border-radius: 8px;
  background: #fff;
}

.menu-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.menu-price {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b8d4e8;
  border-radius: 8px;
  overflow: hidden;
}

.qty-button {
  width: 46px;
  height: 46px;
  border: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #16557f;
  background: #ebf5fc;
}

.qty-button:disabled {
  opacity: 0.45;
}

.qty-value {
  width: 48px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.tip-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  border: 0;
  padding: 0;
}

.tip-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem;
  border: 1px solid #d5e2f2;
  border-radius: 8px;
  background: #fff;
}

.tip-option label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
  font-weight: 700;
}

.tip-option input[type="radio"] {
  width: 22px;
  height: 22px;
}

.coupon-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-weight: 600;
}

.coupon-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

#coupon-input {
  width: 100%;
  height: 46px;
  border: 1px solid #b7cbe0;
  border-radius: 8px;
  padding: 0 0.75rem;
  font-size: 1rem;
  text-transform: uppercase;
}

#apply-coupon-button {
  min-width: 92px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 0.95rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}

#apply-coupon-button:disabled {
  opacity: 0.6;
}

.coupon-message {
  margin: 0.65rem 0 0;
  min-height: 1.2rem;
  color: var(--muted);
  font-weight: 600;
}

.coupon-message.error {
  color: var(--error);
}

.coupon-message.success {
  color: var(--ok);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.55rem;
  font-size: 1rem;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-row.discount {
  color: var(--ok);
}

.summary-row.total {
  margin-top: 0.2rem;
  padding-top: 0.7rem;
  border-top: 1px dashed #bfd2e5;
  font-size: 1.08rem;
}

.checkout-button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 1.16rem;
  font-weight: 800;
}

.checkout-button:disabled {
  background: #8ca8be;
}

.checkout-message {
  margin: 0.7rem 0 0;
  min-height: 1.2rem;
  text-align: center;
  color: var(--error);
  font-weight: 700;
}

.status-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.status-card {
  width: min(560px, 100%);
  padding: 1.4rem 1.2rem;
  border-radius: 12px;
  border: 2px solid #c7dcf0;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.status-card.success {
  border-color: #8ccbb0;
}

.status-card.canceled {
  border-color: #efc2c2;
}

.status-card h1 {
  margin: 0;
  font-size: 1.6rem;
}

.status-card p {
  margin: 0.7rem 0 1rem;
  color: #345167;
}

.status-link {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 9px;
  border: 1px solid #b8d1e8;
  color: #174f79;
  text-decoration: none;
  font-weight: 700;
  background: #eff7ff;
}

@media (max-width: 360px) {
  .page {
    padding: 0.8rem 0.7rem 1.5rem;
  }

  .menu-item {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .qty-controls {
    justify-self: end;
  }
}
