
/* Layout: oversized headline hero with a cookie cluster, menu grid with live cart, then a simple order request form. Owner-only editor. Colors come from the Sablés badge: deep navy, antique gold, warm cream. */
:root {
  --bg: #F6F0E3;
  --surface: #FFFCF5;
  --fg: #1F3A4D;
  --muted: #4F6475;
  --line: #DDD2BC;
  --accent: #1F3A4D;
  --accent-fg: #F6F0E3;
  --gold: #D2AC5C;
  --gold-ink: #8A6618;
  --tag-bg: #F0E1B6;
  --tag-fg: #5E4710;
  --danger: #A3342B;
  --display: "Bagel Fat One", "Arial Rounded MT Bold", "Helvetica Neue", sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14242F; --surface: #1F3A4D; --fg: #F6F0E3; --muted: #B9C6CF; --line: #3A5668;
    --accent: #D9B35E; --accent-fg: #14242F; --gold: #D9B35E; --gold-ink: #E4C071;
    --tag-bg: #D9B35E; --tag-fg: #14242F; --danger: #FF9C90;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14242F; --surface: #1F3A4D; --fg: #F6F0E3; --muted: #B9C6CF; --line: #3A5668;
  --accent: #D9B35E; --accent-fg: #14242F; --gold: #D9B35E; --gold-ink: #E4C071;
  --tag-bg: #D9B35E; --tag-fg: #14242F; --danger: #FF9C90;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 17px; line-height: 1.55;
  padding-block: 0 96px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1080px; margin: 0 auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* top bar */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 20px; }
.brandwrap { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-size: 24px; text-decoration: none; color: var(--accent); display: inline-flex; align-items: center; gap: 10px; }
.logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
.tools { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.top nav { display: flex; gap: 20px; font-weight: 500; font-size: 15px; }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--accent); }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; padding-block: 24px 64px; }
.hero > * { min-width: 0; }
.hero-art { position: relative; min-width: 0; }
.hero-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 28px; display: block; }
.about-left { display: grid; gap: 20px; min-width: 0; align-content: start; }
.about-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; display: block; }
.pic-tools { display: none; flex-wrap: wrap; gap: 8px; }
body.editing .pic-tools { display: flex; }
body.editing [data-k] { outline: 2px dashed var(--gold); outline-offset: 3px; border-radius: 4px; cursor: text; min-width: 2ch; }
body.editing [data-k]:focus { outline-style: solid; }
body.editing #editBtn, body.editing #editPageBtn, body.editing .bar:not(.editbar) { display: none; }
.bar.editbar { display: none; }
body.editing .bar.editbar { display: block; }
.editbar .btn { background: var(--gold); color: #1F3A4D; }
.editbar .btn.ghost { background: transparent; color: var(--bg); box-shadow: inset 0 0 0 2px var(--bg); }
.editbar .sum { font-family: var(--body); font-size: 14px; }
.hero h1 { font-size: clamp(46px, 8.5vw, 104px); color: var(--fg); }
.hero h1 em { font-style: normal; color: var(--gold-ink); }
.hero p.lead { max-width: 46ch; margin-top: 20px; font-size: 19px; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--accent); color: var(--accent-fg);
  padding: 14px 24px; border-radius: 999px; text-decoration: none; display: inline-block;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.btn.small { padding: 8px 16px; font-size: 14px; }
.cluster { position: relative; aspect-ratio: 1 / 1; max-width: 100%; }
.cluster svg { position: absolute; width: 62%; height: auto; filter: drop-shadow(0 10px 0 rgba(31,58,77,.18)); }
.cluster .c1 { left: 0; top: 14%; transform: rotate(-12deg); }
.cluster .c2 { right: 0; top: 0; transform: rotate(9deg); }
.cluster .c3 { left: 22%; bottom: 0; transform: rotate(3deg); }

/* facts strip */
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-block: 18px; border-block: 3px dotted var(--gold); }
.facts span { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }

/* menu */
section { padding-block: 72px 0; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; margin-bottom: 32px; }
.sec-head h2 { font-size: clamp(34px, 5vw, 56px); }
.sec-head p { max-width: 44ch; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; box-shadow: 0 0 0 2px var(--line); }
.card .art { display: grid; place-items: center; background: var(--bg); border-radius: 16px; padding: 12px; position: relative; }
.card .art svg { width: 62%; max-width: 180px; height: auto; transition: transform .25s ease; }
.card:hover .art svg { transform: rotate(-6deg) scale(1.04); }
.card.soldout .art svg, .card.soldout .art img { filter: grayscale(1); opacity: .45; }
.pic { display: contents; }
.card .art img.photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; display: block; }
.tag { position: absolute; top: 10px; left: 10px; background: var(--tag-bg); color: var(--tag-fg); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tag.so { left: auto; right: 10px; background: var(--fg); color: var(--bg); }
.card h3 { font-size: 24px; }
.card .desc { color: var(--muted); font-size: 15px; flex: 1; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-family: var(--mono); font-size: 15px; display: grid; gap: 2px; }
.price small { font-size: 12px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; background: var(--bg); border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); }
.qty button { appearance: none; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 20px; font-weight: 600; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.qty button:hover { color: var(--accent); }
.qty button:disabled { opacity: .35; cursor: default; }
.qty output { min-width: 28px; text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.note { margin-top: 20px; font-size: 15px; color: var(--muted); }
.note strong { color: var(--fg); }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; border-top: 3px solid var(--gold); padding-top: 14px; min-width: 0; }
.steps li::before { content: "Step " counter(s); font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.steps h3 { font-size: 24px; margin: 8px 0; }
.steps p { color: var(--muted); font-size: 15px; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.about > * { min-width: 0; }
.about h2 { font-size: clamp(34px, 5vw, 56px); }
.about p + p { margin-top: 14px; }
.about .copy { color: var(--muted); max-width: 52ch; }

/* order */
.order { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: start; }
.order > * { min-width: 0; }
.panel { background: var(--surface); border-radius: 22px; padding: 24px; box-shadow: 0 0 0 2px var(--line); }
.lines { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.lines li span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); font-size: 15px; margin-top: 14px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--line); }
.total strong { font-family: var(--display); font-weight: 400; font-size: 32px; }
form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--fg); background: var(--bg);
  border: 2px solid var(--line); border-radius: 12px; padding: 11px 14px; width: 100%;
}
.field textarea { min-height: 84px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row2 > * { min-width: 0; }
.err { color: var(--danger); font-size: 14px; min-height: 1.2em; }
.result { margin-top: 18px; display: grid; gap: 12px; }
.result pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 13px; background: var(--bg); border-radius: 12px; padding: 14px; box-shadow: inset 0 0 0 2px var(--line); }

/* price editor (owner only) */
.editor { margin-bottom: 8px; }
.ed-list { display: grid; gap: 16px; margin-top: 16px; }
.ed-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 16px; border-radius: 16px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); }
.ed-pic { display: grid; gap: 8px; justify-items: start; align-content: start; }
.ed-thumb { width: 112px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--surface); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--line); }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-thumb svg { width: 84%; height: auto; }
.ed-fields { display: grid; gap: 12px; min-width: 0; }
.ed-item .field input, .ed-item .field textarea, .ed-item .field select { background: var(--surface); }
.ed-item .field textarea { min-height: 64px; }
.ed-nums { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.ed-nums > * { min-width: 0; }
.ed-on { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-height: 44px; cursor: pointer; }
.ed-on input { width: 20px; height: 20px; accent-color: var(--accent); }
.ed-order { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-shop { margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--line); display: grid; gap: 14px; }
.paybox { display: grid; gap: 10px; justify-items: start; padding: 14px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--gold); color: var(--fg); }
.ed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }

footer { margin-top: 80px; padding-block: 28px; border-top: 2px solid var(--line); display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
footer strong { color: var(--fg); }

/* cart bar */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--fg); color: var(--bg);
}
.bar .in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bar .sum { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.bar .btn { padding: 10px 20px; background: var(--gold); color: #1F3A4D; }

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero, .about, .order { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cluster { max-width: 420px; margin: 0 auto; width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .top nav { gap: 14px; font-size: 14px; }
  .tools { gap: 12px; }
  .ed-item { grid-template-columns: 1fr; }
  .ed-nums .ed-on { grid-column: 1 / -1; }
  .ed-nums { grid-template-columns: 1fr 1fr; }
  section { padding-block: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card .art svg { transition: none; }
}

.cookie-ph{width:100%;aspect-ratio:1/1;border-radius:12px;background:var(--line);display:grid;place-items:center;font-size:56px}
.card .art img.photo{width:100%}
.card .art{padding:12px}
.hero-photo{display:block}
.cluster{display:none}
