:root {
  --ink: #1a1612;
  --ink-soft: #3c342c;
  --cream: #f3eee6;
  --paper: #fffdf9;
  --line: #e6ddd0;
  --muted: #74685c;
  --ember: #d6452c;
  --ember-deep: #b4331d;
  --gold: #e7c98a;
  --shadow: 0 28px 70px rgba(26, 22, 18, .16);
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Outfit, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 100% -10%, #f6d7c8 0%, transparent 58%),
    radial-gradient(700px 380px at -10% 8%, #efe4cf 0%, transparent 55%),
    var(--cream);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input { touch-action: manipulation; }
button, a { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -.03em; }
p { margin: 0; }

header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 5vw;
  background: rgba(243, 238, 230, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 22, 18, .08);
}
.logo-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: var(--ink); max-width: 100%; }
.brand .logo { height: 84px; width: auto; max-width: 100%; display: block; color: var(--ink); }
.brand img.logo { height: 240px; width: auto; max-width: none; }
.brand small {
  display: block;
  margin-top: 0;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}
nav { display: flex; gap: 8px 22px; align-items: center; }
nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}
nav a:hover { color: var(--ink); }
button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: transparent;
}
button.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, .7);
  color: var(--ink-soft);
  font-size: 14px;
}
button.ghost:hover { border-color: #cfc4b4; color: var(--ink); }
.cartbutton {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cartbutton:hover { background: #2a241e; }
.cartbutton b {
  background: var(--ember);
  color: white;
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}

main { max-width: 1240px; margin: 0 auto; padding: 0 5vw 48px; }

.intro {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 48px;
  align-items: center;
  padding: 42px 0 28px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ember-deep);
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(56px, 6.2vw, 92px);
  line-height: .94;
  margin: 0 0 18px;
  font-weight: 520;
}
h1 em { font-style: italic; font-weight: 520; color: var(--ember); }
.lede { max-width: 440px; color: var(--ink-soft); font-size: 18px; }
.heroactions { display: flex; gap: 18px; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ember);
  color: white;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 650;
  border: 0;
  box-shadow: 0 12px 28px rgba(214, 69, 44, .28);
}
.primary:hover { background: var(--ember-deep); }
.textlink { font-weight: 600; text-underline-offset: 4px; }
.facts {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 28px 0 0;
  margin: 8px 0 0;
}
.facts b {
  display: block;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 560;
  letter-spacing: -.04em;
  line-height: 1;
}
.facts span { color: var(--muted); font-size: 13px; }

.cover {
  position: relative;
  height: min(620px, 74vh);
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: #241c16;
  box-shadow: var(--shadow);
}
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.seal {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  display: grid;
  place-content: center;
  text-align: center;
  font-family: var(--serif);
  font-weight: 650;
  font-size: 16px;
  line-height: 1.05;
  transform: rotate(8deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}
.floatcard {
  position: absolute;
  left: 18px;
  bottom: 18px;
  background: rgba(255, 253, 249, .94);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 12px 16px 14px;
  min-width: 168px;
}
.floatcard small {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.floatcard strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 560;
  letter-spacing: -.03em;
  margin: 2px 0;
}
.floatcard span { color: var(--ember-deep); font-weight: 650; font-size: 14px; }

.ritual { padding: 36px 0 18px; }
.sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; margin: 0; }
.sectionhead > p { max-width: 280px; color: var(--muted); font-size: 15px; text-align: right; }
.ritual ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0;
  margin: 0;
}
.ritual li {
  background: rgba(255, 253, 249, .72);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 22px 24px;
}
.ritual li span {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ember);
  letter-spacing: -.04em;
}
.ritual h3 { margin: 8px 0 6px; font-size: 26px; }
.ritual li p { color: var(--muted); }

.menu {
  margin-top: 42px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 36px 28px 32px;
  box-shadow: 0 18px 50px rgba(26, 22, 18, .05);
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(26, 22, 18, .1); }
.card .photo { height: 230px; position: relative; background: #2a211b; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .photo img { transform: scale(1.05); }
.photo span {
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(255, 253, 249, .94);
  color: var(--ink);
  padding: 6px 10px;
}
.cardbody { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 28px; margin: 0 0 6px; line-height: 1.05; }
.blurb { color: var(--ink-soft); font-size: 14.5px; min-height: 44px; }
.ings { color: var(--muted); font-size: 13px; margin: 8px 0 14px; }
.quicksize { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.card .quicksize button {
  width: 100%;
  min-width: 0;
  flex: none;
  padding: 8px 4px 9px;
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: 14px;
  line-height: 1.2;
}
.quicksize small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.quicksize b { display: block; margin-top: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
.card .quicksize .selected { background: var(--ink); color: white; }
.card .quicksize .selected small { color: rgba(255, 253, 249, .72); }
.quickrow { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.quantitycontrol {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: white;
}
.card .quantitycontrol button {
  width: 34px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 18px;
}
.quantitycontrol output { min-width: 18px; text-align: center; font-weight: 700; }
.card .quickadd {
  flex: none;
  width: 100%;
  margin-top: 10px;
  background: var(--ember);
  color: white;
  border-radius: 999px;
  padding: 11px 10px;
  font-weight: 700;
  font-size: 14px;
}
.card .quickadd:hover { background: var(--ember-deep); }
.card .customize {
  background: transparent;
  border: 0;
  margin-top: 10px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  align-self: flex-start;
}
.card .customize:hover { color: var(--ink); }

footer {
  margin-top: 36px;
  padding: 28px 4px 10px;
  display: grid;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}
.footbrand .logo { height: 72px; color: var(--ink); }
.footbrand img.logo { height: 208px; width: auto; }
.footbrand a { display: inline-block; }
.footbrand p { margin-top: 6px; max-width: 460px; }
footer summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
footer details p { margin-top: 8px; max-width: 720px; }
footer a { color: var(--ember-deep); }

dialog {
  border: 0;
  border-radius: 24px;
  padding: 0 0 28px;
  max-width: 680px;
  width: calc(100% - 28px);
  max-height: min(90vh, 860px);
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .35);
}
dialog::backdrop { background: rgba(18, 14, 11, .62); backdrop-filter: blur(6px); }
dialog > .eyebrow,
dialog > h2,
dialog > p,
dialog > label,
#cartitems,
#checkout,
#configbody,
#adminFields { padding-left: 28px; padding-right: 28px; }
dialog > h2 { font-size: 40px; margin: 0 0 8px; padding-right: 72px; }
#configbody { padding-left: 0; padding-right: 0; }
#configbody > :not(.confighero) { margin-left: 28px; margin-right: 28px; }
dialog { position: relative; }
dialog form {
  position: sticky;
  top: 12px;
  z-index: 4;
  height: 0;
  margin: 0;
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0 0;
}
.close {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 253, 249, .94);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}
.confighero { margin: 0 0 18px; height: 230px; background: #241c16; }
.confighero img { width: 100%; height: 100%; object-fit: cover; }
#configbody .eyebrow { padding-top: 4px; }
#configbody h2 { font-size: 40px; margin: 0 0 8px; }
label { display: block; font-weight: 650; margin: 16px 0 8px; }
select, input[type=number], textarea {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #ddd4c6;
  border-radius: 12px;
  background: white;
}
input[type=range] { width: 100%; accent-color: var(--ember); }
.sizes, .payment { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.sizes button { flex: 1 1 120px; }
.sizes button, .payment label {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  margin: 0;
}
.sizes button.active { background: var(--ink); color: white; border-color: var(--ink); }
.ingredient { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ingredient .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ingredient label { margin: 0; }
.levels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.configfoot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 22px;
  gap: 14px;
}
.configfoot strong { font-family: var(--serif); font-size: 32px; font-weight: 560; letter-spacing: -.03em; }
.qty { max-width: 88px; }
.notice, .adminlead { color: var(--ink-soft); font-size: 14px; background: #f6f1e8; border-radius: 14px; padding: 12px 14px; }
.adminlead { margin: 0 28px 8px; }
#configbody .notice { margin-bottom: 8px; }
.cartitem {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cartitem img { width: 86px; height: 86px; object-fit: cover; border-radius: 16px; }
.cartitem h3 { margin: 0; font-size: 22px; }
.cartitem h3 small { font-family: var(--sans); font-weight: 500; color: var(--muted); letter-spacing: 0; font-size: 14px; }
.cartitem p { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.cartactions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cartactions button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.cartactions span { margin-left: auto; font-weight: 700; }
.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 560;
  margin: 18px 0;
}
.payment input { accent-color: var(--ember); }
.empty { color: var(--muted); padding: 12px 0 4px; }
.success { background: #f4efe4; padding: 16px; border-radius: 16px; margin-top: 8px; }
.success p { margin: 6px 0 12px; color: var(--ink-soft); }
.adminprices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#saveAdmin { margin: 8px 28px 0; }
#adminNotice { min-height: 1.2em; font-weight: 600; }
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 14px 18px;
  border-radius: 999px;
  display: none;
  z-index: 30;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
  text-align: center;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .intro { gap: 28px; }
  .cover { min-height: 360px; height: 460px; }
  .brand .logo { height: 68px; }
  .brand img.logo { height: 192px; width: auto; max-width: none; }
}
@media (max-width: 760px) {
  header { min-height: 0; padding: 16px 5vw 14px; gap: 14px; flex-wrap: wrap; }
  .brand { width: 100%; }
  .brand .logo { height: auto; width: min(340px, 100%); }
  .brand img.logo { height: 184px; width: auto; max-width: none; }
  nav a { display: none; }
  .intro { grid-template-columns: 1fr; padding-top: 22px; }
  .cover { order: -1; height: 340px; min-height: 0; border-radius: 22px; }
  h1 { font-size: 58px; }
  .ritual ol, .grid, .adminprices { grid-template-columns: 1fr; }
  .sectionhead { display: block; }
  .sectionhead > p { text-align: left; margin-top: 8px; }
  .menu { padding: 24px 16px; border-radius: 24px; }
  .card .photo { height: 240px; }
  .facts { gap: 18px; }
  dialog > .eyebrow, dialog > h2, dialog > p, dialog > label, #cartitems, #checkout, #adminFields { padding-left: 18px; padding-right: 18px; }
  #configbody > :not(.confighero) { margin-left: 18px; margin-right: 18px; }
  .configfoot { flex-wrap: wrap; }
  #saveAdmin { margin-left: 18px; margin-right: 18px; }
}
.panel { max-width: 860px; margin: 28px auto 56px; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 28px; }
.panel h2 { margin-bottom: 8px; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 18px 0 8px; }
.formgrid .wide { grid-column: 1 / -1; }
.panel input { width: 100%; margin-top: 6px; padding: 12px; border: 1px solid #ddd4c6; border-radius: 12px; background: white; }
#coveragebox { margin: 16px 0; }
#placeorder { margin-top: 8px; }
.orderpizza { padding: 14px 0; border-bottom: 1px solid var(--line); }
.orderpizza h3 { margin: 0 0 6px; }
.orderpizza p { color: var(--muted); margin-bottom: 6px; }
.orderaddress { margin: 14px 0; }
.tokenline { color: var(--muted); margin: 8px 0 16px; }
.jsonbox { margin: 14px 0; padding: 14px; background: #1a1612; color: #f6e7b0; border-radius: 16px; overflow: auto; max-height: 460px; white-space: pre-wrap; font: 13px/1.45 Consolas, ui-monospace, monospace; }
#board { max-width: 1100px; }
#coverage-map { height: 480px; border-radius: 18px; margin: 12px 0 18px; border: 1px solid var(--line); background: #e7e1d6; }
#coverage-map .leaflet-pane { z-index: 1; }
#coverage-map .leaflet-top, #coverage-map .leaflet-bottom { z-index: 2; }
.stafforder { border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; margin: 14px 0; background: white; }
.stafforder h3 { margin: 0 0 6px; }
.staffmeta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.statusrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.statusrow button { border: 1px solid var(--line); background: var(--paper); }
.statusrow button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 760px) { .formgrid { grid-template-columns: 1fr; } .panel { padding: 20px 16px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .photo img { transition: none; }
}
