:root {
  color-scheme: light;
  --yellow: #ffd200;
  --yellow-dark: #e6aa00;
  --bg: #ffffff;
  --ink: #333333;
  --muted: #888888;
  --line: #e6e6e6;
  --soft: #f7f7f7;
  --orange: #f0642f;
  --blue: #3579bd;
  --green: #2f9e63;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: 100%;
  margin: 0;
}

.toolbar {
  background: var(--yellow);
  border-bottom: 1px solid #e8bf00;
}

.brand-block {
  width: min(960px, calc(100vw - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.brand-copy {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.eyebrow {
  display: none;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 900;
}

.brand-block p {
  color: #6f5700;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.controls {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 160px auto 42px;
  gap: 10px;
  align-items: end;
  padding: 14px 0 16px;
}

.search-box,
.select-box {
  display: grid;
  gap: 5px;
}

.search-box span,
.select-box span {
  color: #6f5700;
  font-size: 11px;
  font-weight: 800;
}

input,
select,
button {
  min-height: 42px;
  border: 1px solid #dedede;
  border-radius: 22px;
  background: #ffffff;
  color: var(--ink);
}

input,
select {
  width: 100%;
  padding: 0 14px;
}

input::placeholder {
  color: #b7b7b7;
}

input:focus,
select:focus {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  border-color: var(--yellow-dark);
}

button {
  cursor: pointer;
  font-weight: 800;
}

.toggle-button {
  padding: 0 16px;
  color: var(--orange);
}

.toggle-button.active,
.segmented.active {
  border-color: var(--orange);
  background: var(--orange);
  color: #ffffff;
}

.icon-button {
  width: 42px;
  color: var(--orange);
  font-size: 20px;
}

.summary-grid {
  display: none;
}

.content-area {
  width: min(960px, calc(100vw - 32px));
  margin: 28px auto 48px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  align-items: start;
}

.category-panel,
.results-panel {
  background: #ffffff;
}

.category-panel {
  position: sticky;
  top: 16px;
}

.category-panel h2,
.result-head h2 {
  font-size: 20px;
  font-weight: 900;
}

.chip-list {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.chip.active {
  color: var(--orange);
}

.chip-count {
  color: var(--muted);
  font-size: 12px;
}

.results-panel {
  min-width: 0;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.view-switch {
  display: none;
}

.cards {
  display: grid;
  gap: 0;
}

.dish-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 18px;
  min-height: 0;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.dish-card:hover .dish-name {
  color: var(--orange);
}

.dish-top {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.dish-name {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.category-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.category-pill {
  grid-column: 1;
  width: fit-content;
  background: #fff4c2;
  color: #8a6900;
}

.status-pill {
  white-space: nowrap;
}

.status-made {
  background: #eaf3ff;
  color: var(--blue);
}

.status-regular {
  background: #e8f7ef;
  color: var(--green);
}

.status-empty {
  background: #f1f1f1;
  color: var(--muted);
}

.card-footer {
  grid-row: 1 / 3;
  grid-column: 2;
  display: flex;
  align-items: center;
}

.memo {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.link-button {
  color: var(--orange);
  font-weight: 900;
  text-decoration: none;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  color: #555555;
}

.empty-state {
  padding: 38px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

@media (max-width: 860px) {
  .brand-copy {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .brand-block p {
    white-space: normal;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .content-area {
    grid-template-columns: 1fr;
  }

  .category-panel {
    position: static;
  }

  .chip-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0 16px;
  }
}

@media (max-width: 520px) {
  .brand-block,
  .controls,
  .content-area {
    width: min(100vw - 24px, 960px);
  }

  .controls {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 22px;
  }

  .dish-card {
    grid-template-columns: 1fr;
  }

  .card-footer {
    grid-row: auto;
    grid-column: 1;
  }
}
