:root {
  --porcelain: #f7fbf7;
  --mist: #edf5f0;
  --paper: #fffdf7;
  --ink: #182321;
  --muted: #65736e;
  --line: #d8e2dc;
  --leaf: #2e725f;
  --leaf-soft: #dcece5;
  --tomato: #c94d3b;
  --tomato-soft: #fae7e0;
  --indigo: #253d55;
  --gold: #c28a2e;
  --butter: #fff3c9;
  --shadow: 0 18px 44px rgba(33, 54, 47, 0.12);
  --tight-shadow: 0 10px 24px rgba(33, 54, 47, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(46, 114, 95, 0.09), transparent 34%),
    linear-gradient(315deg, rgba(201, 77, 59, 0.08), transparent 30%),
    var(--porcelain);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.screen-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.app-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  color: var(--paper);
  background:
    linear-gradient(140deg, rgba(37, 61, 85, 0.98), rgba(24, 35, 33, 0.96)),
    var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--tomato);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-hero .eyebrow {
  color: #f8d88d;
}

.app-hero h1 {
  max-width: 10ch;
  margin: 8px 0 12px;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.45rem, 12vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 253, 247, 0.88);
  font-size: 1rem;
  line-height: 1.85;
}

.hero-note {
  min-width: 0;
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 146px;
  padding: 16px;
  background: rgba(255, 253, 247, 0.1);
  border: 1px solid rgba(255, 253, 247, 0.18);
  border-radius: 16px;
}

.hero-note span {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  color: #20170a;
  background: var(--butter);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.hero-note strong {
  font-size: 1.2rem;
  line-height: 1.25;
}

.hero-note p {
  margin: 0;
  color: rgba(255, 253, 247, 0.82);
  line-height: 1.65;
}

.start-panel {
  min-width: 0;
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 16px;
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--tight-shadow);
}

.start-copy h2,
.panel-head h2 {
  margin: 3px 0 0;
  font-size: clamp(1.25rem, 4.5vw, 1.7rem);
  line-height: 1.3;
}

.mode-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mode-choice-card {
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 15px;
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(33, 54, 47, 0.06);
}

.mode-choice-card:hover,
.mode-choice-card.is-active {
  border-color: var(--tomato);
  box-shadow: 0 16px 32px rgba(201, 77, 59, 0.15);
  transform: translateY(-1px);
}

.choice-kicker {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--indigo);
  border-radius: 14px;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 900;
}

.mode-choice-card.is-active .choice-kicker {
  background: var(--tomato);
}

.mode-choice-card strong,
.mode-choice-card small {
  grid-column: 2;
  min-width: 0;
}

.mode-choice-card strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.mode-choice-card small {
  color: var(--muted);
  font-weight: 800;
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.panel {
  min-width: 0;
  background: rgba(255, 253, 247, 0.95);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--tight-shadow);
}

.input-panel {
  padding: 16px;
}

.panel-head {
  padding: 18px 18px 0;
}

.input-panel .panel-head {
  padding: 0 0 14px;
}

.inline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.small-label {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 6px 9px;
  color: var(--indigo);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.flow-steps {
  display: grid;
  gap: 12px;
}

.flow-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbf7);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.step-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--leaf);
  border-radius: 12px;
  font-weight: 900;
}

.step-body {
  min-width: 0;
}

.step-body h3 {
  margin: 2px 0 10px;
  font-size: 1rem;
  line-height: 1.35;
}

.compact-grid,
.form-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 4px rgba(46, 114, 95, 0.13);
}

.full {
  margin-top: 0;
}

.family-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.family-cell {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: center;
  font-size: 0.76rem;
}

.family-cell input {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  outline: none;
}

.family-cell input:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 4px rgba(46, 114, 95, 0.13);
}

.family-total {
  margin: 2px 0 0;
  padding: 8px 10px;
  color: #20170a;
  background: var(--butter);
  border-radius: 10px;
  font-size: 0.8rem;
}

.meal-switches,
.goal-grid {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.meal-switches legend,
.goal-grid legend {
  width: 100%;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.meal-switches label,
.goal-grid label {
  min-height: 42px;
  display: inline-grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--leaf-soft);
  border: 1px solid #bfd9cf;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.3;
}

.goal-grid label {
  border-radius: 14px;
}

.meal-switches input,
.goal-grid input {
  width: 16px;
  height: 16px;
  accent-color: var(--leaf);
}

.safe-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #654036;
  background: var(--tomato-soft);
  border: 1px solid #efc8bd;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.65;
}

.field.is-muted {
  opacity: 0.56;
}

.sticky-action-bar {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  margin-top: 14px;
  padding: 8px;
  background: rgba(247, 251, 247, 0.88);
  border: 1px solid rgba(216, 226, 220, 0.9);
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.primary-button {
  width: 100%;
  min-height: 54px;
  color: var(--paper);
  background: linear-gradient(135deg, var(--tomato), #a93c2f);
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 14px 26px rgba(201, 77, 59, 0.22);
}

.primary-button:hover {
  filter: brightness(1.04);
}

.output-stack {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.summary-strip {
  min-height: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: var(--ink);
  border-radius: 18px;
  box-shadow: var(--tight-shadow);
}

.summary-chip {
  padding: 8px 10px;
  color: var(--paper);
  background: rgba(255, 253, 247, 0.11);
  border: 1px solid rgba(255, 253, 247, 0.16);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.result-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  background: rgba(247, 251, 247, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.result-tabs button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 6px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.result-tabs button.is-active {
  color: var(--paper);
  background: var(--indigo);
}

.result-panel {
  display: none;
  min-width: 0;
}

.result-panel.is-active {
  display: grid;
  gap: 12px;
}

.today-focus {
  display: grid;
  gap: 10px;
  padding: 0 18px 14px;
}

.nutrient-band {
  margin: 0 18px 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title-row,
.nutrient-card-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.section-title-row h3 {
  margin: 4px 0 12px;
  color: var(--indigo);
  font-size: 1.08rem;
}

.nutrient-coverage {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nutrient-card {
  min-width: 0;
  padding: 11px;
  background: var(--mist);
  border-left: 3px solid var(--leaf);
}

.nutrient-card-head strong {
  font-size: 0.86rem;
}

.nutrient-card-head span {
  flex: 0 0 auto;
  color: var(--tomato);
  font-size: 0.78rem;
  font-weight: 900;
}

.nutrient-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.focus-card {
  min-width: 0;
  padding: 15px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.main-focus {
  background:
    linear-gradient(135deg, rgba(46, 114, 95, 0.12), rgba(255, 255, 255, 0.92)),
    #ffffff;
  border-color: #bcd8ce;
}

.focus-card h3 {
  margin: 8px 0 8px;
  font-size: 1.12rem;
  line-height: 1.38;
}

.focus-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.method-panel,
.detail-panel {
  padding-bottom: 18px;
}

.method-board,
.recipe-options,
.detail-columns,
.evidence-list {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0 18px 16px;
}

.method-card,
.recipe-card,
.detail-block,
.shopping-block,
.check-section,
.batch-card,
.day-card,
.evidence-item {
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(33, 54, 47, 0.05);
}

.method-card,
.detail-block,
.shopping-block,
.check-section,
.batch-card,
.day-card,
.evidence-item {
  padding: 14px;
}

.accent-card {
  background: var(--leaf-soft);
  border-color: #bfd9cf;
}

.food-card {
  background: #fff8df;
  border-color: #eadcab;
}

.notice-card {
  background: var(--tomato-soft);
  border-color: #efc8bd;
}

.method-card h3,
.shopping-block h3,
.batch-card h3,
.day-card h3,
.check-section h3,
.detail-block h4 {
  margin: 0 0 10px;
  color: var(--indigo);
  font-size: 0.98rem;
  line-height: 1.35;
}

.recipe-card {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 15px;
  color: var(--ink);
  text-align: left;
}

.recipe-card:hover,
.recipe-card.is-active {
  border-color: var(--tomato);
  box-shadow: 0 12px 24px rgba(201, 77, 59, 0.13);
  transform: translateY(-1px);
}

.recipe-card strong {
  font-size: 1rem;
  line-height: 1.35;
}

.recipe-card p,
.detail-heading p,
.evidence-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.recipe-card small {
  margin-top: auto;
  color: var(--indigo);
  font-weight: 900;
}

.recipe-card .macro-line {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.recipe-card-label {
  padding: 5px 8px;
  color: var(--paper);
  background: var(--indigo);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

#recipeDetail {
  padding: 0 18px;
}

.detail-heading {
  padding: 16px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.detail-heading h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  line-height: 1.35;
}

.dish-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.dish-list span,
.tag-list span,
.goal-tags span,
.mini-tags span,
.nutrient-tags span {
  max-width: 100%;
  padding: 6px 9px;
  color: var(--paper);
  background: var(--leaf);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.dish-list .is-dessert {
  color: #6b3227;
  background: #f7d7ce;
  border: 1px solid #e7afa0;
}

.tag-list,
.goal-tags,
.mini-tags,
.nutrient-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.goal-tags {
  margin-bottom: 10px;
}

.mini-tags span {
  color: var(--indigo);
  background: var(--mist);
  border: 1px solid var(--line);
}

.measure-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.measure-block,
.nutrition-summary,
.substitute-note,
.koji-note {
  min-width: 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.measure-block h4,
.nutrition-summary h4,
.substitute-note h4,
.koji-note h4 {
  margin: 0 0 10px;
  color: var(--indigo);
  font-size: 0.92rem;
}

.koji-note {
  margin-bottom: 12px;
  background: var(--butter);
  border-color: #e5d49a;
}

.koji-toggle {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  background: var(--butter);
  border: 1px solid #e5d49a;
  border-radius: 14px;
  cursor: pointer;
}

.koji-toggle input {
  margin-top: 3px;
}

.koji-toggle strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
}

.koji-toggle small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.ingredient-table {
  width: 100%;
  min-width: 260px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ingredient-table th,
.ingredient-table td {
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e7eee9;
}

.ingredient-table th {
  color: var(--muted);
  background: var(--mist);
  font-size: 0.74rem;
}

.ingredient-table td:last-child {
  width: 46%;
  color: var(--indigo);
  font-weight: 900;
}

.nutrition-summary {
  margin-bottom: 12px;
  background: #fff8df;
  border-color: #eadcab;
}

.dessert-card {
  min-width: 0;
  margin: 0 0 12px;
  padding: 16px;
  background: #fff5f1;
  border: 1px solid #edc6ba;
  border-radius: 12px;
}

.dessert-heading {
  display: grid;
  gap: 12px;
}

.dessert-heading h4,
.dessert-guide h5 {
  margin: 0;
  color: var(--indigo);
}

.dessert-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.dessert-kicker {
  display: inline-block;
  margin-bottom: 4px;
  color: #9a4c3b;
  font-size: 0.72rem;
  font-weight: 900;
}

.dessert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: start;
}

.dessert-meta span,
.meal-dessert {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  color: #74392d;
  background: #ffffff;
  border: 1px solid #e9bbae;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.dessert-measures,
.dessert-guide {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.dessert-card .measure-block {
  padding: 0;
  background: transparent;
  border: 0;
}

.dessert-card .ingredient-table th {
  background: #f9e6df;
}

.dessert-guide section {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid #edc6ba;
}

.dessert-guide ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.nutrition-stat {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: baseline;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid #eadcab;
  border-radius: 8px;
}

.nutrition-stat span {
  color: var(--tomato);
  font-size: 0.72rem;
  font-weight: 900;
}

.nutrition-stat strong {
  color: var(--indigo);
  font-size: 1.08rem;
}

.nutrition-stat small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.68rem;
}

.nutrient-tags {
  margin-bottom: 9px;
}

.nutrient-tags span {
  color: var(--indigo);
  background: #ffffff;
  border: 1px solid #eadcab;
}

.nutrition-note,
.shopping-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.substitute-note {
  margin-top: 12px;
  background: var(--mist);
}

.plain-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.weekly-plan {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(160px, 1fr));
  gap: 10px;
  padding: 0 18px 14px;
  overflow-x: auto;
}

.meal-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid #e7eee9;
}

.meal-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.meal-dessert {
  display: inline-block;
  margin-top: 6px;
}

.meal-label {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--paper);
  background: var(--leaf);
  border-radius: 10px;
  font-weight: 900;
}

#shoppingList,
.shopping-checklist,
.batch-plan {
  display: grid;
  gap: 12px;
  padding: 0 18px 16px;
}

.check-section {
  display: grid;
  gap: 8px;
}

.check-item {
  min-height: 50px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-weight: 900;
}

.check-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--leaf);
}

.check-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-copy {
  display: grid;
  gap: 3px;
}

.check-copy strong {
  font-size: 0.86rem;
}

.check-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.check-item.is-done span {
  color: var(--muted);
  text-decoration: line-through;
}

.evidence-item strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
}

.evidence-item a {
  display: inline-block;
  margin-top: 8px;
  color: var(--tomato);
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 719px) {
  .recipe-options {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 88%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .recipe-card {
    scroll-snap-align: start;
  }
}

@media (min-width: 720px) {
  .app-shell {
    padding: 24px;
  }

  .app-hero {
    grid-template-columns: minmax(0, 1fr) 300px;
    padding: 28px;
  }

  .start-panel {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    padding: 18px;
  }

  .mode-choice-grid,
  .compact-grid,
  .recipe-options,
  .method-board,
  .detail-columns,
  .evidence-list,
  .today-focus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-focus {
    grid-column: span 2;
  }

  .nutrient-coverage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .measure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dessert-heading,
  .dessert-measures,
  .dessert-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nutrition-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1060px) {
  .workspace {
    grid-template-columns: minmax(340px, 410px) minmax(0, 1fr);
  }

  .input-panel {
    position: sticky;
    top: 18px;
  }

  .result-tabs {
    top: 12px;
  }

  .method-board,
  .evidence-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .recipe-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding: 12px;
  }

  .app-hero,
  .start-panel,
  .input-panel {
    border-radius: 18px;
  }

  .result-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-step {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    padding: 12px;
  }

  .step-number {
    width: 28px;
    height: 28px;
  }
}

/* ===== 同時調理の設計図 ===== */
.simul-plan {
  margin: 14px 0;
  padding: 16px;
  background: var(--leaf-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.simul-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.simul-head h4 {
  margin: 0;
  font-size: 15px;
  color: var(--leaf);
}

.simul-device {
  font-size: 12px;
  font-weight: 700;
  color: var(--indigo);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
}

.simul-zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.simul-zone {
  min-width: 0;
  background: #ffffff;
  border: 1px dashed var(--leaf);
  border-radius: 12px;
  padding: 10px 12px;
}

.simul-zone strong {
  display: block;
  font-size: 12.5px;
  color: var(--leaf);
  margin-bottom: 4px;
}

.simul-zone-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.simul-zone-items li {
  font-size: 13px;
  line-height: 1.5;
}

.simul-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.simul-timeline li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.simul-at {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: var(--leaf);
  border-radius: 999px;
  text-align: center;
  padding: 2px 6px;
  margin-top: 2px;
}

.simul-do {
  font-size: 13.5px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .simul-zones {
    grid-template-columns: 1fr;
  }
}
