:root {
  --maroon: #671b2a;
  --maroon-light: #863249;
  --maroon-dark: #42111e;
  --gold: #d8b36b;
  --gold-deep: #b08a45;
  --paper: #fffaf3;
  --card: #ffffff;
  --ink: #291b1b;
  --muted: #7d6c62;
  --line: #e9dfd2;
  --error: #a32832;
  --ok: #2f6b3f;
  --warn: #8a5a12;
  --radius: 14px;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; margin: 0 0 8px; line-height: 1.15; }
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 21px; }
p { margin: 0 0 12px; }
a { color: var(--maroon); }
img { max-width: 100%; }
[hidden] { display: none !important; }

.top {
  background: var(--maroon-dark);
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
.top-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand span { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; font-weight: 600; letter-spacing: .5px; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .nav button {
  color: #f5e1ac;
  background: none;
  border: 0;
  font: inherit;
  font-size: 15px;
  padding: 8px 10px;
  min-height: 40px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
}
.nav a:hover, .nav button:hover, .nav a[aria-current] { background: rgba(255, 255, 255, .12); }

.wrap { max-width: 880px; margin: 0 auto; padding: 24px var(--gutter) 56px; }
.narrow { max-width: 480px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card > :last-child { margin-bottom: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.row.top-aligned { align-items: flex-start; }
.stack > * + * { margin-top: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--maroon);
  background: var(--maroon);
  color: #fff;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--maroon-light); border-color: var(--maroon-light); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--maroon); }
.btn.secondary:hover { background: #f6ece3; }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.link-btn { background: none; border: 0; color: var(--maroon); font: inherit; text-decoration: underline; cursor: pointer; padding: 6px 0; min-height: 40px; }

label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(103, 27, 42, .35);
  outline-offset: 2px;
  border-color: var(--maroon);
}
.otp { letter-spacing: 10px; font-size: 26px; text-align: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 12px; }

.notice { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.notice.error { background: #fbeaec; color: var(--error); border: 1px solid #f0c4c9; }
.notice.ok { background: #e8f3ea; color: var(--ok); border: 1px solid #c4e0ca; }
.notice.info { background: #f6efe3; color: var(--warn); border: 1px solid #ecdcc0; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: #f1e9df;
  color: var(--ink);
  white-space: nowrap;
}
.badge.ok { background: #e1f1e5; color: var(--ok); }
.badge.warn { background: #f8ecd3; color: var(--warn); }
.badge.bad { background: #fbeaec; color: var(--error); }

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img, .thumb { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; background: #f1e9df; flex: none; }
.line .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.totals { margin-top: 8px; }
.totals .row { padding: 4px 0; }
.totals .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; font-size: 19px; font-weight: 600; }

.methods { display: grid; gap: 10px; margin: 12px 0 16px; }
.method {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  min-height: 56px;
  background: #fff;
}
.method input { width: 20px; height: 20px; accent-color: var(--maroon); flex: none; }
.method.selected { border-color: var(--maroon); background: #fbf3ee; }
.method.disabled { opacity: .5; cursor: not-allowed; }

.status-hero { text-align: center; padding: 28px 12px 8px; }
.status-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 14px;
  font-size: 36px; color: #fff; background: var(--ok);
}
.status-icon.bad { background: var(--error); }
.status-icon.wait { background: var(--gold-deep); }
.refs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 15px; }
.refs dt { color: var(--muted); }
.refs dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 16px; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-deep); }

.order-link {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit;
}
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--maroon);
  animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

footer.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 8px var(--gutter) 32px; }

@media (max-width: 560px) {
  h1 { font-size: 28px; }
  .grid2 { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .refs { grid-template-columns: 1fr; gap: 0; }
  .refs dd { margin-bottom: 8px; }
  .btn.stack-sm { width: 100%; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1214;
    --card: #241a1d;
    --ink: #f3e9e4;
    --muted: #b3a29a;
    --line: #3a2c30;
  }
  a, .link-btn { color: #f5c9a8; }
  .btn.secondary { color: #f5c9a8; border-color: #f5c9a8; }
  .btn.secondary:hover { background: #2f2226; }
  input[type=text], input[type=email], input[type=tel], input[type=search], select, textarea, .method { background: #1a1214; }
  .method.selected { background: #2f2226; border-color: #f5c9a8; }
  .badge { background: #3a2c30; }
  .badge.ok { background: #1f3a27; color: #9dd6ab; }
  .badge.warn { background: #433417; color: #f0cf8a; }
  .badge.bad { background: #4a2227; color: #f3a5ac; }
  .notice.error { background: #3d1c21; color: #f3a5ac; border-color: #5a2a31; }
  .notice.ok { background: #1f3a27; color: #9dd6ab; border-color: #2d5239; }
  .notice.info { background: #433417; color: #f0cf8a; border-color: #5c4a22; }
  .line img, .thumb { background: #3a2c30; }
}
