:root {
  color-scheme: light;
  --canvas: #f7eae6;
  --paper: #fffbf8;
  --ink: #251a1d;
  --muted: #422f34;
  --accent-ink: #5b2a40;
  --field-border: #80616b;
  --placeholder: #513b42;
  --focus: #793a54;
  --warning-ink: #482707;
  --stop-ink: #651a12;
  --line: #dec2c4;
  --soft: #f5e2e7;
  --soft-hover: #efd4dd;
  --heading-bg: #f3d9e1;
  --tinted: #fcf1ed;
  --input-bg: #fff7f4;
  --disabled-bg: #efe2e0;
  --radius: 22px;
  font-family: "Meiryo", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 112.5%;
  font-weight: 500;
  line-height: 1.7;
  background: var(--canvas);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; font-weight: 600; }
button, summary, select { cursor: pointer; }
a { color: var(--accent-ink); text-underline-offset: .22em; font-weight: 700; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
h2, h3 { line-height: 1.4; }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 800; }
.shell { width: min(890px, calc(100% - 64px)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .95rem; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; top: .5rem; left: .5rem; padding: .8rem; background: var(--paper); z-index: 9; }
.masthead { border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.masthead-inner { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: clamp(1rem, 3vw, 1.35rem); line-height: 1.3; font-weight: 800; letter-spacing: .035em; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; flex: none; background: var(--accent-ink); border-radius: 50%; }
.brand-mark i { width: 16px; height: 8px; border: 1.7px solid #fff5ec; border-radius: 1px 1px 9px 9px; position: relative; margin-top: 5px; }
.brand-mark i::before { content: ""; position: absolute; left: 5px; top: -7px; height: 5px; width: 4px; border-left: 1.5px solid #fff5ec; border-radius: 50%; transform: rotate(20deg); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(10px, 3vw, 30px); font-size: .95rem; font-weight: 750; }
nav a { padding-block: 10px; white-space: nowrap; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.workspace { display: grid; gap: 16px; margin: 0 0 28px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.picker { padding: 22px 24px; scroll-margin-top: 16px; }
.picker-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(126px, 176px); gap: 13px; align-items: center; margin-bottom: 12px; }
.picker-season { min-width: 0; margin: 0; }
.picker-season img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.picker-season figcaption { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 .45em; margin-top: 4px; color: #775d66; font-size: .8rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.picker-season figcaption span { white-space: nowrap; }
.picker-season figcaption strong { font-weight: inherit; }

.picker-intro { margin-top: 5px; }
.searchbox { display: flex; align-items: center; gap: 12px; border: 1px solid var(--field-border); border-radius: 12px; background: var(--input-bg); min-width: 0; padding-left: 14px; }
.searchbox:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.searchbox input { border: 0; background: transparent; outline: none; min-width: 0; width: 100%; min-height: 47px; padding: 8px 12px 8px 0; }
.search-icon { flex: none; position: relative; width: 13px; height: 13px; border: 1.7px solid var(--accent-ink); border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; background: var(--accent-ink); height: 1.7px; width: 7px; top: 10px; left: 8px; transform: rotate(45deg); }
.food-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.food-button { text-align: left; display: flex; align-items: center; gap: 7px; min-height: 50px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--paper); padding: 6px 9px; font-weight: 750; overflow-wrap: anywhere; }
.food-button i { font-style: normal; font-size: 1.18rem; flex: none; }
.food-button:hover, .pair-option:hover { background: var(--tinted); }
.food-button.is-added { background: var(--soft); border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.no-food { margin-top: 14px; }
.recipe { scroll-margin-top: 12px; }
.recipe-head { padding: 23px 24px 19px; background: var(--heading-bg); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.recipe-intro { margin-top: 6px; }
.recipe-body { padding: 19px 24px 24px; }
.batch-guide { padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--tinted); }
.batch-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block: 8px; }
.batch-options div { min-width: 0; background: var(--soft); padding: 8px 10px; border-radius: 8px; }
.batch-options dt { font-weight: 800; }
.batch-options dd { display: flex; flex-wrap: wrap; column-gap: 15px; color: var(--accent-ink); }
.batch-options dd span { white-space: nowrap; }
.batch-options dd strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.batch-feedback { margin-top: 10px; padding: 9px 11px; border-radius: 8px; background: var(--soft); }
.batch-feedback[data-tone="caution"] { border: 1px solid #9b633d; background: #fbf1d9; color: var(--warning-ink); font-weight: 700; }
.batch-feedback[data-tone="stop"] { border: 1px solid #993c30; background: #fdece5; color: var(--stop-ink); font-weight: 800; }
.entry-head, .vegetable-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(96px, 145px) 48px; gap: 8px; align-items: center; }
.entry-head { align-items: end; color: var(--ink); font-weight: 750; margin-bottom: 5px; }
.vegetables { display: grid; gap: 10px; }
.vegetable-name, .amount-box { min-width: 0; border: 1px solid var(--field-border); border-radius: 9px; background: #fff; }
.vegetable-name { width: 100%; min-height: 50px; padding: 7px 10px; font-weight: 650; }
.amount-box { display: flex; align-items: center; gap: 2px; padding-right: 9px; }
.amount-box:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.amount-box input { min-width: 0; width: 100%; padding: 7px 0 7px 9px; font-size: 1.1rem; font-weight: 800; border: 0; background: transparent; min-height: 48px; outline: none; font-variant-numeric: tabular-nums; }
.amount-box span { color: var(--muted); font-weight: 650; }
.amount-box:has(input[aria-invalid="true"]) { border-color: #a75542; }
.entry-note { margin: 2px 0 0; overflow-wrap: anywhere; }
.remove-vegetable { width: 48px; height: 48px; border: 1px solid var(--field-border); background: var(--input-bg); border-radius: 10px; font-size: 1.2rem; font-weight: 750; }
.remove-vegetable:disabled, .voice-button:disabled { color: var(--muted); background: var(--disabled-bg); border-style: dashed; cursor: default; }
.add-vegetable { margin-top: 10px; padding: 5px 12px; min-height: 48px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--soft); color: var(--accent-ink); font-weight: 800; }
.add-vegetable:hover { background: var(--soft-hover); }
.pair-section { padding: 17px 24px; }
#pairs-placeholder { margin-top: 4px; }
.pairs:empty { display: none; }

.pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.pair-option { display: grid; align-content: start; gap: 2px; border-radius: 10px; border: 1px solid var(--field-border); background: var(--paper); padding: 8px 10px; min-height: 48px; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.pair-option strong { color: var(--accent-ink); }
.pair-option span { color: var(--muted); line-height: 1.5; }
.text-button { border: 0; background: transparent; color: var(--accent-ink); text-decoration: underline; text-underline-offset: .22em; padding: 8px 0; min-height: 48px; font-weight: 750; text-align: left; }
.text-button:hover, a:hover { text-decoration-thickness: 2px; }
.liquid-choice { margin-block: 15px; }
.control-label { font-weight: 800; }
.liquid-choice select, .seasoning select { max-width: 310px; margin-bottom: 5px; }
.recipe-result { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--tinted); }
.empty-result { margin-top: 7px; }
.recipe-result h3 { font-size: clamp(1.35rem, 4vw, 1.65rem); }
#recipe-meta { margin-top: 3px; color: var(--ink); font-weight: 750; }
.recipe-basis { margin-top: 10px; }
.seasoning { margin-top: 12px; }
select { display: block; width: 100%; appearance: none; font-weight: 700; min-height: 48px; padding: 6px 27px 6px 9px; margin-top: 4px; background: linear-gradient(45deg, transparent 50%, var(--accent-ink) 50%) right 14px center / 5px 5px no-repeat, linear-gradient(135deg, var(--accent-ink) 50%, transparent 50%) right 9px center / 5px 5px no-repeat, white; border: 1px solid var(--field-border); border-radius: 8px; }
.input-error { color: var(--stop-ink); font-weight: 750; }
.material-list { margin-top: 11px; border-top: 1px solid var(--line); }
.material-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.material-row dt { font-weight: 700; overflow-wrap: anywhere; }
.material-row dd { white-space: nowrap; font-size: 1.18rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.capacity { margin-block: 16px 5px; padding: 12px 14px; border-radius: 12px; border: 2px solid #9b633d; background: #fbf1d9; color: var(--warning-ink); }
.capacity.is-outside { background: #fdece5; color: var(--stop-ink); border-color: #993c30; }
.capacity p { margin: 4px 0 8px; }
.capacity strong { font-weight: 900; }
.capacity a { color: inherit; }
.copy-tools { margin-top: 13px; }
.copy-tools summary { min-height: 40px; padding-block: 7px; font-weight: 750; }
#copy-message { margin-top: 6px; }
.voice-panel { margin-bottom: 14px; padding: 8px 12px; background: var(--tinted); border: 1px solid var(--line); border-radius: 10px; }
.voice-panel summary { min-height: 40px; padding-block: 7px; font-weight: 800; }
.voice-panel p { margin-bottom: 5px; }
.voice-panel label { display: block; }
.voice-panel textarea { display: block; width: 100%; border: 1px solid var(--field-border); border-radius: 8px; padding: 7px 9px; resize: vertical; background: white; }
.voice-button { min-height: 48px; margin: 5px 0; border: 1px solid var(--field-border); border-radius: 8px; padding: 6px 10px; background: var(--soft); color: var(--accent-ink); font-weight: 750; }
.voice-button:disabled { color: var(--muted); background: var(--disabled-bg); border-style: dashed; }
#voice-preview { padding: 5px 0; }
#overflow-tip { font-weight: 800; }
#manual-copy { display: block; width: 100%; margin-top: 8px; padding: 8px; resize: vertical; border: 1px solid var(--field-border); border-radius: 8px; }
.official { padding-top: 15px; margin-top: 17px; border-top: 1px solid var(--line); }
.official ul { margin: 4px 0 0; padding-left: 1.2rem; }
.official a { display: inline-block; padding: 5px 0; }
.guide { border-top: 1px solid var(--line); padding-block: 20px 27px; }
.guide-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 13px; }
.guide-columns div { border: 1px solid var(--line); border-radius: 13px; padding: 16px; }
.guide-columns p { color: var(--muted); margin-top: 5px; }
.footer { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; border-top: 1px solid var(--line); padding-block: 15px 26px; font-size: .95rem; color: var(--muted); }

@media (max-width: 800px) {
  .shell { width: calc(100% - 36px); }
  .workspace { gap: 14px; }
  .food-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 510px) {
  .shell { width: calc(100% - 24px); }
  .masthead { margin-bottom: 12px; }
  .masthead-inner { min-height: 56px; flex-wrap: wrap; gap: 0 12px; padding-block: 6px; }
  .brand { gap: 6px; }
  .brand-mark { width: 26px; height: 26px; }
  nav { gap: 0 12px; }
  .picker, .pair-section, .recipe-head, .recipe-body { padding-inline: 14px; }
  .picker { padding-block: 15px; }
  .food-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .picker-lead { grid-template-columns: minmax(0, 1fr) minmax(90px, 31%); gap: 9px; }
  .food-button { padding: 5px; gap: 4px; }
  .food-button i { font-size: 1rem; }
  .entry-head, .vegetable-fields { grid-template-columns: minmax(0, 1fr) minmax(88px, 28%) 48px; gap: 5px; }
  .pairs { grid-template-columns: minmax(0, 1fr); }
  .recipe-result { padding: 10px; }
  .guide-columns { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 375px) {
  .batch-options { grid-template-columns: 1fr; }
}
