:root {
  --bg: #efe6d6;
  --paper: #f7f1e6;
  --ink: #1c2834;
  --muted: #5c6a76;
  --card: #fbf6ec;
  --rule: #cbbba3;
  --rule-soft: #ddd0ba;
  --coral: #c45c3e;
  --coral-deep: #9f4630;
  --teal: #2f5f68;
  --gold: #c4a15a;
  --shadow: 0 12px 28px rgba(28, 40, 52, 0.07);
  --radius: 6px;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(28, 40, 52, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28, 40, 52, 0.045) 1px, transparent 1px),
    radial-gradient(900px 420px at 100% -8%, rgba(196, 92, 62, 0.12), transparent 55%),
    radial-gradient(700px 380px at -8% 18%, rgba(47, 95, 104, 0.1), transparent 50%);
  background-size: 24px 24px, 24px 24px, auto, auto;
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: var(--teal); }
a:hover { color: var(--coral-deep); }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 6vw;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
}
.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand em {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--ink);
}
nav { display: flex; flex-wrap: wrap; gap: 0.15rem; }
nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid transparent;
}
nav a:hover { color: var(--coral); border-bottom-color: var(--coral); }

.hero, .how, .panel, footer {
  width: min(1120px, calc(100% - 8vw));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.4rem;
  align-items: center;
  padding: 1.6rem 0 3rem;
}
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
}

.kicker {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--coral);
}
h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 0.8rem;
}
h1 { font-size: clamp(2.15rem, 5.6vw, 3.45rem); }
h2 { font-size: clamp(1.6rem, 3.8vw, 2.25rem); }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.4rem 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--coral);
  color: #fffaf6;
  text-decoration: none;
  border: 1px solid var(--coral-deep);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--coral-deep); color: #fff; }
.btn.ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid var(--rule);
}

.stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.stats li {
  padding: 0.55rem 0.9rem;
  min-width: 7.2rem;
  border-right: 1px solid var(--rule);
}
.stats li:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--mono); font-size: 0.82rem; font-weight: 500; }
.stats span { color: var(--muted); font-size: 0.78rem; }
@media (max-width: 560px) {
  .stats { flex-direction: column; }
  .stats li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .stats li:last-child { border-bottom: 0; }
}

.frame {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 7px 7px 0;
  box-shadow: var(--shadow);
}
.frame img {
  width: 100%;
  display: block;
}
.frame figcaption, .hero-art figcaption, .preview-col figcaption, .side-card figcaption {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0;
  padding: 0.55rem 0.2rem 0.65rem;
}
.fig {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.how { padding: 0 0 2.5rem; }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 0;
  margin: 1.2rem 0 0;
}
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}
.steps li {
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5px var(--rule-soft);
  border-radius: var(--radius);
  padding: 1.05rem 1.05rem 1.15rem;
}
.steps .n {
  font-family: var(--mono);
  color: var(--teal);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.steps h3 { margin: 0.35rem 0 0.3rem; font-size: 1.02rem; font-family: var(--display); }
.steps p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.panel { padding: 0 0 3.4rem; }
.panel-head { max-width: 42rem; margin-bottom: 1.4rem; }
.panel-head p { color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.4rem;
  align-items: start;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5px var(--rule-soft), var(--shadow);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.who-row, .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .who-row, .two { grid-template-columns: 1fr; }
}
label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 0.85rem;
}
.opt { font-weight: 500; opacity: 0.7; }
input, select, textarea {
  width: 100%;
  margin-top: 0.3rem;
  border: 1px solid var(--rule);
  background: #fffdf8;
  color: var(--ink);
  border-radius: 4px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  font-size: 16px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--gold) 65%, white);
  border-color: var(--coral);
}
.row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.7rem;
}
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
}
.mini {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  margin: 0.2rem 0 0.4rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 0.9rem; }
.chip {
  width: 36px;
  height: 36px;
  border-radius: 3px;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px #cbbba3;
  padding: 0;
  cursor: pointer;
}
@media (min-width: 821px) {
  .chip { width: 28px; height: 28px; }
}
.chip.on { box-shadow: 0 0 0 2px var(--ink); }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin: 0.4rem 0 0.8rem;
}
.price-row strong {
  font-family: var(--display);
  font-size: 2.05rem;
}
.price-row span { color: var(--muted); }

button {
  width: 100%;
  background: var(--coral);
  color: #fffaf6;
  border: 1px solid var(--coral-deep);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--coral-deep); }
.link-add {
  width: auto;
  background: transparent;
  color: var(--teal);
  padding: 0.2rem 0;
  box-shadow: none;
  border: 0;
  font-size: 0.88rem;
}
.link-add:hover { background: transparent; color: var(--coral-deep); }

.drop-wrap { margin-bottom: 1rem; }
.drop {
  margin-top: 0.35rem;
  border: 1px dashed #b7a48a;
  background: #fffaf3;
  border-radius: 4px;
  padding: 1.1rem;
  text-align: center;
  cursor: pointer;
}
.drop strong { display: block; color: var(--ink); }
.drop span { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.drop:hover, .drop.over { border-color: var(--coral); background: #fff4ee; }
.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.6rem;
}
.thumbs figure {
  position: relative;
  margin: 0;
  width: 72px;
  height: 72px;
}
.thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
}
.thumbs button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 2px;
  font-size: 0.8rem;
  line-height: 1;
}

.preview {
  background: #24303a;
  min-height: 210px;
  padding: 2rem 1.5rem 1.5rem 3.4rem;
  position: relative;
  color: #f5f5f5;
  border: 1px solid var(--ink);
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow);
}
.preview-ring {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 26px;
  height: 26px;
  border: 3px solid #d5dde6;
  border-radius: 50%;
  transform: translateY(-50%);
}
.preview-line {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 1.7rem;
  line-height: 1.15;
  text-transform: uppercase;
}
.quiet {
  display: inline-block;
  margin-top: 0.35rem;
  margin-bottom: 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
}
.note { color: var(--muted); font-size: 0.92rem; margin: 0.7rem 0 0; }
.ok { color: var(--teal); }
.err { color: #b42318; }
.venmo { font-size: 0.95rem; color: var(--muted); }

.titleblock {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1.6fr;
  border: 1px solid var(--ink);
  background: var(--paper);
  margin-bottom: 2.4rem;
}
.tb-cell {
  padding: 0.7rem 0.9rem 0.85rem;
  border-right: 1px solid var(--ink);
}
.tb-cell:last-child { border-right: 0; }
.tb-cell span {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.tb-cell strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}
@media (max-width: 720px) {
  .titleblock { grid-template-columns: 1fr; }
  .tb-cell { border-right: 0; border-bottom: 1px solid var(--ink); }
  .tb-cell:last-child { border-bottom: 0; }
}

.dlg-back {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(28, 40, 52, 0.42);
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
.dlg-back[hidden] { display: none; }
.dlg {
  width: min(28rem, 100%);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.3rem 1.2rem;
}
.dlg .kicker { margin: 0 0 0.35rem; }
.dlg h2 {
  font-size: 1.55rem;
  margin: 0 0 0.55rem;
}
.dlg p { margin: 0 0 0.7rem; color: var(--muted); }
.dlg.ok .kicker { color: var(--teal); }
.dlg.err .kicker { color: #b42318; }
.dlg.wait .dlg-ok { display: none; }
.dlg-ok { width: 100%; margin-top: 0.4rem; }
