:root {
  --bg: #f7f0e8;
  --bg-soft: #fcf7f2;
  --ink: #1f2330;
  --muted: #6b6474;
  --line: rgba(31, 35, 48, 0.1);
  --card: rgba(255, 255, 255, 0.82);
  --brand: #0f6c73;
  --brand-deep: #0b4e54;
  --accent: #c45c32;
  --accent-soft: #f3d8c9;
  --gold: #c9972a;
  --shadow: 0 18px 40px rgba(29, 32, 43, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(196, 92, 50, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(15, 108, 115, 0.18), transparent 26%),
    var(--bg);
  font-family: "Aptos", "Trebuchet MS", "Segoe UI Variable Display", "Segoe UI", sans-serif;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    linear-gradient(transparent 0 50%, rgba(255, 255, 255, 0.2) 50% 100%),
    linear-gradient(90deg, transparent 0 50%, rgba(255, 255, 255, 0.18) 50% 100%);
  background-size: 12px 12px;
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.65), transparent 80%);
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  backdrop-filter: blur(18px);
  background: rgba(247, 240, 232, 0.84);
  border-bottom: 1px solid rgba(31, 35, 48, 0.08);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, var(--accent), transparent 55%),
    linear-gradient(315deg, var(--brand), var(--brand-deep));
  box-shadow: 0 0 0 5px rgba(15, 108, 115, 0.1);
}

.brand-lockup h1,
.landing-copy h2,
.hero-card h2,
.section-heading h3,
.payment-header h3,
.qr-card h3,
.table-preview h3 {
  margin: 0;
  font-family: "Georgia", "Cambria", serif;
}

.brand-lockup h1 {
  font-size: 1.3rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.topbar-actions,
.scan-actions,
.catalog-tools,
.quantity-row,
.cart-totals,
.hero-grid,
.split-tools,
.inline-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

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

button {
  cursor: pointer;
  border: 0;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
  box-shadow: none;
}

.primary-btn,
.ghost-btn {
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 108, 115, 0.24);
}

.ghost-btn {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(31, 35, 48, 0.08);
}

.ghost-btn.small,
.primary-btn.small {
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
}

.full-width {
  width: 100%;
  justify-content: center;
}

.page-shell {
  width: min(1400px, calc(100vw - 2rem));
  margin: 1.4rem auto 2.8rem;
}

.landing-view {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 1.25rem;
  min-height: calc(100vh - 12rem);
}

.guest-entry-view {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 1.1rem;
  min-height: calc(100vh - 12rem);
  align-items: center;
}

.landing-copy,
.qr-card,
.table-preview,
.guest-entry-card,
.guest-entry-preview,
.hero-card,
.catalog-panel,
.sidebar-card,
.drawer,
.payment-modal {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
}

.landing-copy,
.hero-card,
.catalog-panel,
.sidebar-card,
.payment-modal {
  border-radius: var(--radius-lg);
}

.landing-copy {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guest-entry-card,
.guest-entry-preview {
  padding: 1.8rem;
  border-radius: var(--radius-lg);
}

.guest-entry-card {
  display: grid;
  gap: 1rem;
}

.guest-entry-form {
  display: grid;
  gap: 0.9rem;
}

.guest-entry-preview {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 1rem;
  background:
    linear-gradient(160deg, rgba(15, 108, 115, 0.12), rgba(255, 255, 255, 0.84)),
    var(--card);
}

.guest-entry-preview h3 {
  margin: 0;
  font-family: "Georgia", "Cambria", serif;
  font-size: 1.8rem;
}

.guest-entry-preview ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.85;
}

.landing-copy h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.02;
  max-width: 10ch;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 60ch;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.6rem;
}

.feature-pills span,
.term-chip {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 108, 115, 0.08);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.92rem;
}

.note-card {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed rgba(31, 35, 48, 0.12);
}

.note-card p,
.helper-text,
.scan-url {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.qr-stage {
  display: grid;
  gap: 1rem;
  align-content: center;
}

.qr-card {
  border-radius: 32px;
  padding: 1.6rem;
  display: grid;
  place-items: center;
  text-align: center;
}

.qr-image {
  width: min(100%, 280px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 24px;
  border: 14px solid rgba(255, 255, 255, 0.95);
  background: #fff;
}

.scan-url {
  word-break: break-word;
  font-size: 0.92rem;
}

.table-preview {
  border-radius: 24px;
  padding: 1.4rem;
}

.table-preview ul {
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.8;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(196, 92, 50, 0.12);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-card {
  padding: 1.6rem;
  margin-bottom: 1rem;
  display: grid;
  gap: 1rem;
}

.hero-grid {
  flex-wrap: wrap;
}

.menu-view {
  padding-bottom: 5.8rem;
}

.mini-stat {
  min-width: 200px;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(31, 35, 48, 0.08);
}

.guest-strip {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(31, 35, 48, 0.08);
}

.guest-strip-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.guest-hint {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
}

.guest-chips {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.guest-chip {
  min-width: 150px;
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 0.95rem;
  border-radius: 18px;
  text-align: left;
  background: rgba(247, 240, 232, 0.9);
  border: 1px solid rgba(31, 35, 48, 0.08);
  box-shadow: 0 10px 18px rgba(31, 35, 48, 0.06);
}

.guest-chip.active {
  background: linear-gradient(135deg, rgba(15, 108, 115, 0.14), rgba(255, 255, 255, 0.96));
  border-color: rgba(15, 108, 115, 0.28);
}

.guest-chip.has-items .guest-chip-total {
  color: var(--brand-deep);
}

.guest-chip-name {
  font-weight: 700;
  color: var(--ink);
}

.guest-chip-total {
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-stat-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.catalog-panel {
  padding: 1.35rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading.compact {
  margin-bottom: 0.8rem;
}

.search-input,
.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(31, 35, 48, 0.12);
  background: rgba(255, 255, 255, 0.76);
  padding: 0.85rem 0.95rem;
  color: var(--ink);
}

.term-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.term-chip {
  border: 1px solid transparent;
  cursor: pointer;
}

.term-chip.active {
  background: var(--ink);
  color: #fff;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.95rem;
}

.course-card {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 240, 233, 0.95));
  border: 1px solid rgba(31, 35, 48, 0.08);
  box-shadow: 0 12px 30px rgba(31, 35, 48, 0.08);
  text-align: left;
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--term-color, var(--brand));
}

.course-card h4 {
  margin: 0.2rem 0 0.55rem;
  font-family: "Georgia", "Cambria", serif;
  font-size: 1.16rem;
  line-height: 1.3;
}

.course-meta,
.cart-item-meta,
.split-row,
.transcript-row,
.checkout-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.course-meta,
.course-card p,
.cart-item p,
.transcript-row span,
.checkout-meta {
  color: var(--muted);
}

.course-card p {
  margin: 0 0 0.9rem;
  line-height: 1.55;
}

.course-tags,
.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.course-tag {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(31, 35, 48, 0.06);
  font-size: 0.84rem;
  font-weight: 700;
}

.sidebar-panel {
  position: sticky;
  top: 6.25rem;
  display: grid;
  gap: 1rem;
}

.sidebar-card {
  padding: 1.15rem;
}

.field {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.85rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.check-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.85rem;
  font-weight: 700;
}

.preorder-fields {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.split-tools {
  align-items: stretch;
  flex-direction: column;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
}

.cart-list,
.split-summary,
.transcript-list {
  display: grid;
  gap: 0.75rem;
}

.cart-item,
.split-pill,
.transcript-row {
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(31, 35, 48, 0.08);
}

.cart-item h4,
.split-pill strong,
.detail-box strong,
.payment-balance strong {
  margin: 0;
}

.cart-item h4 {
  font-size: 0.98rem;
}

.cart-assignment,
.split-subline {
  font-size: 0.85rem;
  color: var(--muted);
}

.split-pill.active {
  border-color: rgba(15, 108, 115, 0.26);
  background: rgba(15, 108, 115, 0.08);
}

.split-pill.idle {
  opacity: 0.76;
}

.split-subline {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.55rem;
}

.cart-item-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.8rem;
}

.cart-item select {
  max-width: 150px;
}

.cart-totals {
  flex-direction: column;
  align-items: stretch;
  margin: 1rem 0;
}

.cart-totals > div {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.grand-total {
  padding-top: 0.7rem !important;
  border-top: 1px solid var(--line);
  font-size: 1.06rem;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(20, 24, 34, 0.42);
  backdrop-filter: blur(10px);
}

.drawer,
.payment-modal {
  position: fixed;
  z-index: 30;
}

.drawer {
  top: 1rem;
  right: 1rem;
  width: min(520px, calc(100vw - 2rem));
  height: calc(100vh - 2rem);
  border-radius: 28px;
  padding: 1.35rem 1.35rem 1.6rem;
  overflow: auto;
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.drawer:not(.hidden) {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  background: rgba(31, 35, 48, 0.08);
  color: var(--ink);
  font-size: 1.4rem;
}

.drawer-content {
  padding-top: 1rem;
}

.drawer-subtitle,
.drawer-description {
  color: var(--muted);
  line-height: 1.7;
}

.detail-grid,
.payment-grid {
  display: grid;
  gap: 0.85rem;
}

.detail-grid {
  grid-template-columns: repeat(3, 1fr);
  margin: 1rem 0;
}

.detail-box {
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(245, 240, 233, 0.95);
}

.detail-box span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.quantity-row {
  justify-content: space-between;
  margin: 1rem 0;
}

.quantity-picker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.payment-modal {
  inset: 4.5rem 2rem 2rem;
  padding: 1.4rem;
  overflow: auto;
}

.payment-balance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}

.payment-balance > div,
.payment-summary,
.transcript-card {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 35, 48, 0.08);
}

.payment-grid {
  grid-template-columns: 1.3fr 0.8fr;
}

.transcript-row {
  align-items: center;
}

.checkout-meta {
  flex-direction: column;
  margin: 1rem 0;
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(15, 108, 115, 0.08);
}

.payment-subsection {
  margin-top: 1rem;
}

.split-settlement {
  display: grid;
  gap: 0.7rem;
}

.settlement-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  background: rgba(247, 240, 232, 0.82);
  border: 1px solid rgba(31, 35, 48, 0.08);
}

.settlement-copy {
  display: grid;
  gap: 0.18rem;
}

.settlement-copy span {
  font-size: 0.84rem;
  color: var(--muted);
}

.settlement-row.payer {
  background: rgba(15, 108, 115, 0.11);
  border-color: rgba(15, 108, 115, 0.26);
}

.payment-success {
  min-height: 420px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 3.5rem 1.25rem 2rem;
}

.payment-success-orb {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.18)),
    linear-gradient(180deg, rgba(15, 108, 115, 0.14), rgba(15, 108, 115, 0.05));
  box-shadow:
    0 18px 36px rgba(15, 108, 115, 0.16),
    inset 0 0 0 10px rgba(255, 255, 255, 0.48);
}

.payment-success-orb svg {
  width: 78px;
  height: 78px;
}

.success-ring,
.success-check {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-ring {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.success-check {
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
}

.payment-success.play .success-ring {
  animation: ring-draw 420ms ease forwards;
}

.payment-success.play .success-check {
  animation: check-draw 320ms 240ms ease forwards;
}

.payment-success-copy {
  max-width: 28ch;
  margin: 0 auto;
}

.payment-success-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  background: rgba(15, 108, 115, 0.08);
  color: var(--brand-deep);
}

@keyframes ring-draw {
  from {
    stroke-dashoffset: 151;
    transform: scale(0.84);
    transform-origin: center;
  }

  to {
    stroke-dashoffset: 0;
    transform: scale(1);
    transform-origin: center;
  }
}

@keyframes check-draw {
  from {
    stroke-dashoffset: 34;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 40;
  min-width: min(90vw, 360px);
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  background: rgba(31, 35, 48, 0.92);
  box-shadow: var(--shadow);
}

.empty-state {
  padding: 1.1rem;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  border: 1px dashed rgba(31, 35, 48, 0.14);
}

.mobile-order-dock {
  position: fixed;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 26;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, rgba(14, 59, 64, 0.96), rgba(11, 78, 84, 0.98));
  box-shadow: 0 18px 36px rgba(11, 78, 84, 0.28);
}

.mobile-order-copy {
  display: grid;
  gap: 0.15rem;
  text-align: left;
}

.mobile-order-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.mobile-order-action {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .landing-view,
  .guest-entry-view,
  .layout-grid,
  .payment-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .topbar,
  .section-heading,
  .hero-grid,
  .quantity-row {
    flex-direction: column;
    align-items: stretch;
  }

  .page-shell {
    width: min(100vw - 1rem, 100%);
  }

  .topbar {
    padding: 1rem;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions button {
    flex: 1;
  }

  .landing-copy,
  .guest-entry-card,
  .guest-entry-preview,
  .hero-card,
  .catalog-panel,
  .sidebar-card,
  .payment-modal {
    border-radius: 24px;
  }

  .drawer,
  .payment-modal {
    inset: auto 0 0 0;
    width: 100%;
    height: min(88vh, 100%);
    border-radius: 28px 28px 0 0;
  }

  .guest-entry-view {
    min-height: auto;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-card {
    padding: 1rem 1rem 1rem 1.1rem;
    border-radius: 20px;
  }

  .course-card h4 {
    font-size: 1.05rem;
  }

  .guest-strip-header,
  .split-subline,
  .cart-item-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-item select {
    max-width: none;
  }

  .mobile-order-dock {
    display: flex;
  }
}
