:root {
  color-scheme: light;
  --ink: #252521;
  --muted: #555950;
  --line: #d7d8cc;
  --paper: #fffdf9;
  --pale: #f5f7ec;
  --accent: #e5edce;
  --green: #303e22;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, sans-serif;
  line-height: 1.55;
}
a { color: #344923; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid #5e713e; outline-offset: 3px; }
.shell { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 8px; z-index: 110; padding: 8px 12px; background: #fff; }
.skip:not(:focus) { clip-path: inset(50%); }
.breadcrumb, .actions { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.breadcrumb { align-items: center; min-height: 44px; margin: 12px 0; font-size: 0.875rem; }
.intro { margin: 8px 0 20px; }
h1, h2, h3, p, ol { margin: 0; }
h1 { font-size: clamp(2.25rem, 4.8vw, 3.6rem); line-height: 1.06; letter-spacing: -0.045em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.65rem); line-height: 1.25; letter-spacing: -0.022em; }
h3 { font-size: 1.06rem; line-height: 1.35; }
.intro p { max-width: 64ch; margin-top: 14px; color: var(--muted); font-size: 1.125rem; }
.privacy {
  margin-bottom: 18px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f4e9;
  color: #3e4838;
  font-size: 0.9rem;
}
.workspace { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); gap: 18px; align-items: start; scroll-margin-top: 100px; }
.editor, .output { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.editor { background: #fff; }
.output { background: var(--pale); }
.editor-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; justify-content: space-between; }
.editor-title a { display: none; font-size: 0.875rem; font-weight: 700; }
#plan-title { scroll-margin-top: 100px; }
.event-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 120px); gap: 12px; margin-top: 16px; }
label { display: block; min-width: 0; font-size: 0.875rem; font-weight: 700; }
label span { color: var(--muted); font-weight: 400; }
input, textarea, button { font: inherit; }
input, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  margin-top: 5px;
  border: 1px solid #a9aea0;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}
textarea { resize: vertical; }
input[aria-invalid="true"] { border: 2px solid #aa3827; }
button {
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid #858d79;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
}
button:hover { background: #f2f5e7; }
button:disabled { opacity: 0.55; cursor: default; }
.strong { background: var(--accent); border-color: #7a8b68; color: var(--green); }
.strong:hover { background: #d7e3bc; }
.help { margin-top: 6px; color: var(--muted); font-size: 0.875rem; }
.help:empty { display: none; }
.menu { min-width: 0; margin: 19px 0 0; padding: 0; border: 0; }
.menu > legend { padding: 0; font-size: 1.125rem; font-weight: 750; }
.dish {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 9px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}
.dish legend { padding: 0 5px; color: var(--green); font-size: 0.875rem; font-weight: 800; }
.dish-identity { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: end; gap: 9px; }
.dish-measurements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dish-measurements input[type="time"] { appearance: none; }
.actions { margin-top: 14px; }
.secondary-actions { margin-top: 10px; }
.plan-meta { margin-top: 6px; color: var(--green); font-weight: 750; overflow-wrap: anywhere; }
.schedule { list-style: none; padding: 0; margin-top: 12px; }
.schedule li { padding: 13px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.schedule li:last-child { border-bottom: 1px solid var(--line); }
.dish-time { color: var(--green); font-size: 0.875rem; font-weight: 750; margin-bottom: 3px; }
.schedule p:not(.dish-time) { color: var(--muted); margin-top: 3px; }
.dish-note { white-space: pre-wrap; }
.muted { color: var(--muted); }
#copy-fallback { margin-top: 12px; }
.guide { max-width: 1100px; margin: 42px 0; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 16px 0 22px; }
.guide-grid p, details p { margin-top: 6px; color: var(--muted); }
details { border-top: 1px solid var(--line); padding: 10px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 750; padding-block: 3px; }
.visually-hidden {
  overflow: hidden;
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  white-space: nowrap;
}
.print-report { display: none; }

@media (max-width: 790px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .editor-title a { display: inline-block; }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 32px); }
  .header-channel { display: none; }
  .editor, .output { padding: 15px; }
  .event-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 75px); }
  .dish-measurements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@page { size: Letter portrait; margin: 0.6in; }
@media print {
  body { background: #fff; color: #111; }
  body > :not(.print-report) { display: none !important; }
  .print-report { display: block; color: #111; font: 10.5pt/1.4 var(--report-body); overflow-wrap: anywhere; }
  .report-header { margin-bottom: 0.16in; padding-bottom: 0.12in; border-bottom: 1px solid #b4b6ad; break-inside: avoid; }
  .report-header h1 { margin: 0.04in 0; font: 700 23pt/1.15 var(--report-heading); }
  .report-brand { color: #303e22; font-weight: 700; }
  .report-info { margin-top: 0.08in; font-weight: 700; }
  .report-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .report-table col:first-child { width: 40%; }
  .report-table col:not(:first-child) { width: 15%; }
  .report-table thead { display: table-header-group; }
  .report-table tr { break-inside: avoid; }
  .report-table th, .report-table td { padding: 0.075in 0.09in; border: 1px solid #8d8d88; text-align: left; vertical-align: top; }
  .report-table th { background: #f4f4ef; }
  .report-dish { font-weight: 700; }
  .report-note { margin-top: 0.04in; white-space: pre-wrap; }
  .report-footer { margin-top: 0.14in; break-inside: avoid; font-size: 9pt; }
}
