:root {
  --brand: #f5af19;
  --brand-dark: #d88f00;
  --brand-light: #fff8e7;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --success: #15803d;
  --success-bg: #f0fdf4;
  --warning: #92400e;
  --warning-bg: #fef3c7;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

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

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.header {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  width: 110px;
  height: auto;
  margin: 0 auto 14px;
  display: block;
}

.header h1 {
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 6px;
}

.header p {
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 24px 0 12px;
}

.section-title:first-child {
  margin-top: 0;
}

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

.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--ink);
}

input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245, 175, 25, .15);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.help.warning-text {
  color: var(--warning);
  font-weight: 500;
}

.choice {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.choice input {
  width: auto;
  cursor: pointer;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.line-item {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}

.line-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.line-item-title {
  font-size: 13px;
  font-weight: 700;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
}

.submit-btn, .primary-btn {
  width: 100%;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  margin-top: 20px;
  transition: background .15s;
}

.submit-btn:hover, .primary-btn:hover {
  background: var(--brand-dark);
}

.submit-btn:disabled, .primary-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.ghost-btn {
  width: 100%;
  padding: 13px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--line);
  border-radius: 10px;
}

.ghost-btn:hover {
  background: #f3f4f6;
}

.add-btn {
  width: 100%;
  padding: 11px;
  background: var(--brand-light);
  color: #8a5b00;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px dashed #efc257;
  border-radius: 8px;
  margin-top: 12px;
}

.danger-link {
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  padding: 2px 0;
}

.notice {
  background: var(--brand-light);
  color: #8a5b00;
  border: 1px solid #f4d37d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.notice.subtle {
  font-size: 12px;
  margin-bottom: 0;
}

.error-box {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

.error-box.visible {
  display: block;
}

.success-box {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

.success-box.visible {
  display: block;
}

.cap-message {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  margin-top: 8px;
  font-weight: 500;
}

.area-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 500;
}

.review-shell {
  /* Hidden by default via .hidden class; visibility managed by class toggling. */
}

.review-badge {
  display: inline-block;
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.review-heading {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 6px;
}

.review-subtext {
  font-size: 14px;
  color: var(--muted);
}

.review-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.review-block:first-child {
  border-top: 0;
  margin-top: 0;
}

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 14px;
}

.review-row .lbl {
  color: var(--muted);
}

.review-row .val {
  font-weight: 600;
  text-align: right;
}

.review-row .free-tag {
  color: var(--success);
}

.review-total {
  display: flex;
  justify-content: space-between;
  border-top: 2px solid var(--ink);
  margin-top: 10px;
  padding-top: 10px;
  font-size: 16px;
  font-weight: 700;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  margin-top: 4px;
}

.review-actions .primary-btn {
  margin-top: 0;
}

.hold-countdown {
  background: var(--brand-light);
  color: #8a5b00;
  border: 1px solid #f4d37d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  font-weight: 500;
}

.hold-countdown.warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: #fcd34d;
  font-weight: 700;
}

.hold-countdown.expired {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
  font-weight: 700;
}

.substitution-panel {
  background: var(--brand-light);
  border: 1px solid #f4d37d;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 12px;
}

.terms {
  text-align: center;
  font-size: 13px;
  margin-top: 16px;
}

.terms a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .grid, .review-actions {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
}
