/* Who Brings What - linen tablecloth, cranberry and squash, a gingham band. */
:root {
  --bg: #f6efe3; --paper: #fffaf2; --paper2: #f1e7d6; --ink: #2b201b; --muted: #75655a; --line: #e2d4bf;
  --cran: #9e2a3a; --cran-soft: #f6dcdf; --squash: #c9731f; --squash-soft: #fbe6cf; --sage: #4f7a5a; --sage-soft: #dcebdf;
  --plum: #6d4f8f; --shadow: 0 1px 0 rgba(43, 32, 27, .06), 0 6px 18px rgba(43, 32, 27, .07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1b1513; --paper: #261e1b; --paper2: #2f2522; --ink: #f2e8dc; --muted: #b5a493; --line: #43362f;
  --cran: #e0707f; --cran-soft: #4a2228; --squash: #e8a15a; --squash-soft: #46301a; --sage: #8cc199; --sage-soft: #233a2a;
  --plum: #b79be0; --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--cran); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .4em; }
.hidden { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: 13px; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible, summary:focus-visible { outline: 2px solid var(--squash); outline-offset: 1px; }
textarea { width: 100%; resize: vertical; }

/* Header and the gingham band */
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--paper); border-bottom: 1px solid var(--line); position: relative; flex-wrap: wrap; }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--cran) 0 10px, transparent 10px 20px), repeating-linear-gradient(0deg, rgba(201, 115, 31, .55) 0 3px, transparent 3px 6px), var(--squash-soft); opacity: .85; }
.back { text-decoration: none; color: var(--muted); font-size: 14px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 19px; }
.mark { color: var(--cran); display: inline-flex; }
.session { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.credits { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 14px; }
.pill:hover:not(:disabled) { border-color: var(--squash); }
.pill.solid { background: var(--cran); border-color: var(--cran); color: #fff; }
:root[data-theme="dark"] .pill.solid { color: #1b1513; }
.pill.tiny { padding: 2px 9px; font-size: 12px; }
.pill:disabled { opacity: .5; cursor: default; }
.rail { display: flex; gap: 6px; padding: 18px 20px 6px; overflow-x: auto; scrollbar-width: none; }
.rail a { white-space: nowrap; text-decoration: none; color: var(--ink); padding: 5px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; }
.rail b { color: var(--cran); margin-right: 3px; }
.paid { font-size: 10px; letter-spacing: .06em; background: var(--squash-soft); color: var(--squash); border-radius: 4px; padding: 1px 5px; vertical-align: 2px; font-family: var(--sans); }

/* Hero and the place card */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 22px 20px 8px; max-width: 1180px; margin: 0 auto; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--squash); margin: 0 0 8px; font-weight: 600; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); }
.sub { font-size: 17px; max-width: 640px; color: var(--muted); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.ex-label { color: var(--muted); font-size: 14px; }
.chip { border: 1px dashed var(--squash); background: transparent; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 14px; }
.chip.on { background: var(--squash-soft); border-style: solid; }
.placecard { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; box-shadow: var(--shadow); position: relative; transform: rotate(-1.2deg); }
.placecard::before { content: ""; position: absolute; left: 50%; top: -1px; width: 60%; transform: translateX(-50%); border-top: 3px double var(--cran); }
.pc-head { font-family: var(--serif); font-style: italic; font-size: 19px; text-align: center; margin: 4px 0 12px; }
.pc-row { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: 5px 0; }
.pc-row b { font-family: var(--mono); }
.pc-row.warn b { color: var(--cran); }
.pc-foot { font-size: 12px; color: var(--muted); margin: 10px 0 0; text-align: center; }

/* Panels */
main { max-width: 1180px; margin: 0 auto; padding: 0 20px 30px; }
.panel { margin-top: 30px; }
.phead h2 { font-size: 28px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cran); color: var(--paper); font-family: var(--sans); font-size: 16px; }
.lede { color: var(--muted); margin: 0 0 14px; max-width: 760px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font-size: 19px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.count { color: var(--muted); font-family: var(--sans); font-size: 14px; font-weight: 400; }
.sheet-grid { display: grid; grid-template-columns: 300px 1fr; grid-template-areas: "event guests" "event dishes"; gap: 16px; align-items: start; }
.event { grid-area: event; } .guests { grid-area: guests; } .dishes { grid-area: dishes; }
.event label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.event input, .event select, .event textarea { color: var(--ink); font-size: 15px; }
.kitchen-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.drop.over { border-color: var(--squash); background: var(--squash-soft); }
.drop p { margin: 0 0 4px; }
.linkish { color: var(--cran); text-decoration: underline; cursor: pointer; display: inline !important; font-size: 14px !important; }

/* Rows */
.rows { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.row { background: var(--paper2); border-radius: 10px; padding: 7px 8px; }
.row.none, .rows .none { background: none; color: var(--muted); font-style: italic; padding: 4px 0; }
.guest-row { display: grid; grid-template-columns: minmax(90px, 1.2fr) 58px minmax(90px, 1.4fr) auto 30px; gap: 6px; align-items: start; }
.guest-row.is-host { box-shadow: inset 3px 0 0 var(--cran); }
.dish-row .line { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(80px, 1fr) minmax(90px, 1fr) 58px 30px; gap: 6px; align-items: center; }
.dish-row .line.sub { grid-template-columns: minmax(110px, 1fr) 72px minmax(120px, 2fr) auto; margin-top: 6px; align-items: start; }
.g-party, .d-serves, .d-temp { text-align: center; }
.x { border: 0; background: transparent; cursor: pointer; font-size: 20px; line-height: 1; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; }
.x:hover { background: var(--cran-soft); color: var(--cran); }
.host-btn { white-space: nowrap; min-width: 84px; justify-content: center; }
.host-btn.on { background: var(--cran-soft); border-color: var(--cran); color: var(--cran); }
details { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; min-width: 0; }
summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+ "; color: var(--squash); }
details[open] summary::before { content: "- "; }
summary.has { color: var(--ink); font-family: var(--mono); font-size: 12px; }
summary.unsure { color: var(--squash); }
.ticks { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0 2px; }
.tick { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px 2px 4px; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; background: var(--paper2); }
.tick.on, .tick:has(input:checked) { background: var(--sage-soft); border-color: var(--sage); }
.cont .tick:has(input:checked) { background: var(--squash-soft); border-color: var(--squash); }
.tick input { margin: 0 2px 0 0; accent-color: var(--cran); }
.unsure-tick { border-style: dashed; }
.marks { font-family: var(--mono); font-size: 12px; color: var(--sage); align-self: center; white-space: nowrap; }

/* The grid */
.legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.matrix-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 100% 100%; }
.matrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.matrix caption { padding: 24px; color: var(--muted); font-style: italic; }
.matrix th, .matrix td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px 8px; text-align: center; background: var(--paper); }
.matrix thead th { position: sticky; top: 0; z-index: 2; vertical-align: bottom; background: var(--paper2); min-width: 74px; }
.matrix th.corner { left: 0; z-index: 3; text-align: left; font-family: var(--serif); font-size: 16px; }
.matrix tbody th, .matrix tfoot th { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 210px; max-width: 260px; background: var(--paper); }
.matrix tfoot th, .matrix tfoot td { background: var(--paper2); font-size: 13px; }
.gcol .gn { display: block; font-weight: 600; } .gcol.host .gn::after { content: " (host)"; font-weight: 400; color: var(--muted); font-size: 11px; }
.gp { font-size: 11px; color: var(--muted); }
.gd { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; margin-top: 3px; }
.dtag { font-size: 10px; font-family: var(--mono); text-decoration: none; background: var(--sage-soft); color: var(--sage); border-radius: 4px; padding: 0 4px; }
.dtag.allergy { background: var(--cran-soft); color: var(--cran); }
.dname .dn { display: block; font-weight: 600; }
.dc { font-size: 11px; border-radius: 4px; padding: 0 5px; background: var(--paper2); color: var(--muted); margin-right: 6px; }
.c-main { background: var(--cran-soft); color: var(--cran); } .c-dessert { background: var(--squash-soft); color: var(--squash); } .c-side, .c-salad { background: var(--sage-soft); color: var(--sage); }
.db { font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; position: relative; }
.dot.yes { background: var(--sage); box-shadow: inset 0 0 0 4px var(--sage-soft); }
.dot.no { border: 2px solid var(--muted); opacity: .55; }
.dot.no::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--muted); transform: translateX(-50%) rotate(45deg); }
.dot.no.allergy { border-color: var(--cran); background: var(--cran-soft); opacity: 1; }
.dot.no.allergy::after { background: var(--cran); }
.dot.ask { border: 2px dashed var(--squash); }
.dot.ask::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--squash); line-height: 14px; }
.plate { font-size: 12px; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.p-ok { background: var(--sage-soft); color: var(--sage); } .p-thin { background: var(--squash-soft); color: var(--squash); } .p-none { background: var(--cran-soft); color: var(--cran); }
.cnt { font-family: var(--mono); }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.bars { list-style: none; padding: 0; margin: 0 0 14px; }
.cbar { display: grid; grid-template-columns: 76px 1fr 112px; gap: 8px; align-items: center; font-size: 14px; padding: 3px 0; }
.track { position: relative; height: 12px; background: var(--paper2); border-radius: 999px; overflow: hidden; }
.fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--sage); border-radius: 999px; }
.s-short .fill { background: var(--cran); } .s-over .fill { background: var(--squash); }
.target { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .45; }
.bv { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.s-short .bv { color: var(--cran); }
.chips-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kchip { border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; font-size: 13px; background: var(--paper2); }
.kchip.warn { border-color: var(--cran); background: var(--cran-soft); }
.flags, .open, .recon { list-style: none; padding: 0; margin: 0 0 14px; }
.flags li, .recon li { padding: 5px 0 5px 22px; position: relative; font-size: 14px; border-bottom: 1px dotted var(--line); }
.flags li::before, .recon li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.flags li.warn::before, .recon li.warn::before { background: var(--cran); }
.flags li.info::before, .recon li.info::before { background: var(--squash); }
.flags li.ok::before, .recon li.none::before { background: var(--sage); }
.open li { padding: 4px 0; font-size: 14px; } .open li::before { content: "\2610  "; color: var(--squash); }
.open li.none::before { content: ""; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Run boxes and results */
.runbox { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.runrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.run { background: var(--cran); color: #fff; border: 0; border-radius: 10px; padding: 11px 20px; font-size: 16px; font-weight: 600; cursor: pointer; }
:root[data-theme="dark"] .run { color: #1b1513; }
.run:disabled { opacity: .5; cursor: default; }
.meter { font-size: 13px; color: var(--muted); flex: 1; min-width: 200px; }
.note, .clip { font-size: 13px; color: var(--squash); margin: 0 0 8px; }
.gate { font-size: 14px; background: var(--squash-soft); border-radius: 8px; padding: 8px 10px; margin: 10px 0 0; }
.gate-act { font-weight: 600; }
.inline { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.result { margin-top: 16px; }
.partial { background: var(--squash-soft); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.verdict-row { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.stamp { font-family: var(--serif); font-size: 20px; letter-spacing: .1em; border: 3px solid var(--muted); border-radius: 8px; padding: 6px 14px; transform: rotate(-3deg); }
.stamp.v-ready { color: var(--sage); border-color: var(--sage); } .stamp.v-gaps { color: var(--squash); border-color: var(--squash); } .stamp.v-rework { color: var(--cran); border-color: var(--cran); }
.headline { font-family: var(--serif); font-size: 20px; margin: 0; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rcard { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.rcard.wide { grid-column: span 3; }
.rcard h4 { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.rcard ul { padding-left: 18px; margin: 0; } .rcard li { margin-bottom: 6px; font-size: 14px; }
.rcard li.none { list-style: none; margin-left: -18px; color: var(--muted); font-style: italic; }
.tag { font-size: 11px; border-radius: 4px; padding: 0 5px; margin: 0 6px; background: var(--squash-soft); color: var(--squash); }
.s-none .tag { background: var(--cran-soft); color: var(--cran); }
.gaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 0 !important; }
.gaps li { list-style: none; background: var(--paper2); border-radius: 10px; padding: 10px 12px; margin: 0; }
.gaps li.none { background: none; }
.gap-head { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.ask { font-size: 12px; color: var(--plum); }
.suits { display: block; font-size: 12px; color: var(--sage); margin-top: 2px; }
.why { font-size: 13px; color: var(--muted); margin: 4px 0 6px; }
.msg { white-space: pre-wrap; font-family: var(--sans); font-size: 14px; background: var(--paper2); border-radius: 10px; padding: 10px 12px; margin: 0 0 6px; }
.meta { font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* Menu card and tent cards */
.menucard { max-width: 520px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); padding: 34px 38px; text-align: center; box-shadow: var(--shadow); position: relative; }
.menucard::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); pointer-events: none; }
.m-kicker { text-transform: uppercase; letter-spacing: .3em; font-size: 11px; color: var(--squash); margin: 0; }
.m-title { font-size: 30px; margin: 6px 0 4px; }
.m-sub { font-style: italic; color: var(--muted); margin: 0 0 18px; font-family: var(--serif); }
.m-sec { margin: 16px 0; } .m-sec h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .2em; color: var(--cran); font-family: var(--sans); }
.m-item { margin: 8px 0; } .m-top { margin: 0; font-family: var(--serif); font-size: 18px; }
.m-marks { font-family: var(--mono); font-size: 11px; color: var(--sage); margin-left: 8px; letter-spacing: .05em; }
.m-line { margin: 0; font-size: 14px; color: var(--muted); } .m-by { margin: 0; font-size: 12px; color: var(--muted); font-style: italic; }
.m-foot { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 18px; }
.st-candlelit { background: #221a17; color: #f3e6d4; border-color: #221a17; } .st-candlelit .m-sub, .st-candlelit .m-line, .st-candlelit .m-by, .st-candlelit .m-foot { color: #c9b8a3; }
.st-candlelit .m-sec h4 { color: #e8a15a; } .st-candlelit::before { border-color: #5a4a3f; }
.st-playful { text-align: left; border-radius: 18px; } .st-playful .m-title { color: var(--cran); font-family: var(--sans); font-weight: 800; }
.st-playful .m-sec h4 { display: inline-block; background: var(--squash-soft); color: var(--squash); padding: 2px 8px; border-radius: 6px; }
.st-minimal { font-family: var(--sans); text-align: left; } .st-minimal .m-title, .st-minimal .m-top { font-family: var(--sans); } .st-minimal::before { display: none; }
.tents-h { margin-top: 22px; }
.tents { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tent { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); overflow: hidden; }
.tent::before { content: ""; display: block; height: 22px; border-bottom: 1px dashed var(--line); background: var(--paper2); }
.tent-face { padding: 12px 14px; text-align: center; }
.t-dish { font-family: var(--serif); font-size: 20px; margin: 0; }
.t-line { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.t-marks { font-family: var(--mono); color: var(--sage); margin: 0 0 4px; letter-spacing: .1em; font-weight: 600; }
.t-contains { font-size: 12px; margin: 0; } .t-caution { font-size: 12px; color: var(--cran); font-weight: 600; margin: 4px 0 0; }
.t-by { font-size: 11px; color: var(--muted); margin: 6px 0 0; font-style: italic; }

/* Progress, history, footer, toasts */
.progress { background: var(--paper); border: 1px solid var(--squash); border-radius: 12px; padding: 12px 16px; margin-top: 12px; }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.step { color: var(--muted); } .step.active { color: var(--squash); font-weight: 600; } .step.done { color: var(--sage); }
.step-ic { font-family: var(--mono); }
.raw { margin-top: 12px; } .raw pre { white-space: pre-wrap; background: var(--paper2); padding: 10px; border-radius: 8px; max-height: 300px; overflow: auto; font-size: 12px; }
.how { color: var(--cran); }
.history { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.history li { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.history li.cur { border-color: var(--cran); } .history li.none { background: none; border: 0; color: var(--muted); font-style: italic; }
.ht { font-family: var(--serif); font-size: 17px; } .hm { font-size: 13px; color: var(--muted); flex: 1; min-width: 200px; } .hrow { display: flex; gap: 6px; }
.foot { border-top: 1px solid var(--line); padding: 18px 20px 30px; color: var(--muted); font-size: 13px; text-align: center; }
.foot p { max-width: 820px; margin: 6px auto; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); transition: opacity .5s; }
.toast.err { background: var(--cran); color: #fff; } .toast.gone { opacity: 0; } .toast a { color: inherit; font-weight: 600; }
.print-area { display: none; }

/* Docs pages */
.doc { max-width: 900px; margin: 0 auto; padding: 24px 20px 40px; }
.doc pre { background: var(--paper2); border-radius: 10px; padding: 12px; overflow-x: auto; font-size: 13px; }
.doc code { font-family: var(--mono); font-size: 13px; }
.doc table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.codegroup { margin: 10px 0 18px; } .tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.tab { border: 1px solid var(--line); background: var(--paper); border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: 13px; }
.tab.active { background: var(--cran); color: #fff; border-color: var(--cran); }
.statebox { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.tokenrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.tokenbox { font-family: var(--mono); background: var(--paper2); border-radius: 8px; padding: 10px; word-break: break-all; flex: 1; }
.mono { font-family: var(--mono); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; } .placecard { transform: none; max-width: 420px; }
  .sheet-grid { grid-template-columns: 1fr; grid-template-areas: "event" "guests" "dishes"; }
  .grid-two { grid-template-columns: 1fr; } .res-grid { grid-template-columns: 1fr; } .rcard.wide { grid-column: auto; }
}
@media (max-width: 560px) {
  .bar { padding: 10px 16px; } .rail, .hero { padding-left: 16px; padding-right: 16px; } main { padding: 0 16px 24px; }
  .guest-row { grid-template-columns: 1fr 56px 30px; } .guest-row .needs { grid-column: 1 / 3; } .guest-row .host-btn { grid-column: 3; grid-row: 2; }
  .dish-row .line { grid-template-columns: 1fr 1fr 30px; } .dish-row .d-name { grid-column: 1 / 3; } .dish-row .d-serves { grid-column: 3; grid-row: 2; } .dish-row .line .x { grid-column: 3; grid-row: 1; }
  .dish-row .line.sub { grid-template-columns: 1fr 72px; } .dish-row .line.sub details { grid-column: 1 / 3; }
  .matrix tbody th, .matrix tfoot th { min-width: 140px; max-width: 160px; }
  .cbar { grid-template-columns: 64px 1fr 92px; } .menucard { padding: 24px 18px; }
  .verdict-row { flex-direction: column; align-items: flex-start; }
}
@media print {
  body.printing > *:not(#printArea) { display: none !important; }
  body.printing #printArea { display: block !important; color: #000; }
  body.printing { background: #fff; }
  .pr-tents .tents { grid-template-columns: 1fr 1fr; }
  .pr-tents .tent { break-inside: avoid; box-shadow: none; border: 1px solid #999; }
  .pr-tents .tent::before { height: 70px; }
  .pr-menu .menucard { box-shadow: none; border: 0; }
  .ptable { border-collapse: collapse; width: 100%; } .ptable th, .ptable td { border: 1px solid #999; padding: 6px; text-align: left; font-size: 12px; } .ptable tr.blank td { height: 28px; }
}
