:root {
  color-scheme: light;
  --ink: #221916;
  --muted: #6f625b;
  --line: #e4ddd6;
  --paper: #f7f2eb;
  --white: #ffffff;
  --accent: #9d3f2e;
  --accent-dark: #6f291f;
  --gold: #b9893b;
  --green: #416c58;
  --danger: #9a2f2f;
  --shadow: 0 10px 26px rgba(55, 35, 24, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1120px, calc(100% - 36px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.brand span,
.meta,
.small-note,
.admin-table small,
.slot-button small {
  color: var(--muted);
  font-size: 12px;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px 14px;
  font-size: 12px;
  font-weight: 800;
}

.header-nav a {
  padding: 7px 0;
  border-bottom: 2px solid transparent;
}

.header-nav a:hover,
.header-nav a:focus {
  color: var(--accent-dark);
  border-color: var(--accent);
}

.app-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.takeout-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
}

.hero-copy,
.summary-panel,
.panel,
.admin-login {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 230px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(34, 25, 22, 0.72), rgba(34, 25, 22, 0.34)),
    url("./takeout-food-sheet.png") center / cover;
  color: #fff;
  display: grid;
  align-content: end;
}

.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.88);
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 900;
  color: var(--gold);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.16;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

p {
  margin: 0;
}

.summary-panel {
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.summary-head,
.product-title,
.day-head,
.summary-line,
.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-line,
.cart-line {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.summary-line span:first-child {
  color: var(--muted);
}

.summary-line strong,
.total strong {
  text-align: right;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  background: #f4e6db;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.cart-line {
  align-items: center;
}

.cart-line strong,
.cart-line span {
  display: block;
}

.quantity-control {
  display: grid;
  grid-template-columns: 30px 28px 30px;
  align-items: center;
  text-align: center;
  border: 1px solid var(--line);
}

.quantity-control button {
  min-height: 30px;
  border: 0;
  background: #fff8f2;
  color: var(--accent-dark);
  font-weight: 900;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.step-pill {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.step-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.panel-head p {
  margin-top: 6px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.tab {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tab.is-active {
  background: #2d2521;
  border-color: #2d2521;
  color: #fff;
}

.product-grid,
.grid {
  display: grid;
  gap: 12px;
}

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

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

.product-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fffdfb;
}

.product-photo {
  height: 118px;
  background-image: url("./takeout-food-sheet.png");
  background-size: 230%;
  background-position: center;
}

.product-card[data-image="karaage"] .product-photo { background-position: 18% 20%; }
.product-card[data-image="sashimi"] .product-photo { background-position: 82% 18%; }
.product-card[data-image="yakitori"] .product-photo { background-position: 18% 52%; }
.product-card[data-image="dashimaki"] .product-photo { background-position: 82% 52%; }
.product-card[data-image="bento"] .product-photo { background-position: 18% 86%; }
.product-card[data-image="onigiri"] .product-photo,
.product-card[data-image="gyusuji"] .product-photo,
.product-card[data-image="party"] .product-photo { background-position: 82% 86%; }

.product-body {
  padding: 14px;
  display: grid;
  gap: 9px;
}

.product-title {
  align-items: start;
}

.product-title strong {
  color: var(--accent-dark);
  white-space: nowrap;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: var(--white);
  color: #3d463f;
  font-size: 11px;
  font-weight: 800;
}

.calendar {
  display: grid;
  gap: 14px;
}

.day-block {
  border: 1px solid var(--line);
  background: #fffdfb;
  padding: 14px;
}

.day-head {
  margin-bottom: 10px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.slot-button {
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--white);
  display: grid;
  gap: 1px;
  place-items: center;
  font-weight: 900;
  font-size: 12px;
}

.slot-button:not(:disabled):hover,
.slot-button:not(:disabled):focus {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.slot-button.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.slot-button.is-selected small {
  color: rgba(255, 255, 255, 0.84);
}

.slot-button:disabled {
  color: #a09a93;
  background: #f0ebe5;
  cursor: not-allowed;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 12px;
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 0;
  font-size: 14px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--white);
  font-weight: 900;
  font-size: 13px;
}

.button.secondary {
  background: var(--white);
  color: var(--accent-dark);
}

.button:disabled {
  border-color: #cfc8bf;
  background: #d9d2ca;
  color: #756f68;
  cursor: not-allowed;
}

.add-button {
  width: 100%;
}

.alert {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid #d9b6a8;
  background: #fff5f0;
  color: #743521;
  font-size: 13px;
  font-weight: 800;
}

.done-box {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #b6d5c7;
  background: #effaf5;
}

.order-no {
  font-size: 20px;
  font-weight: 900;
  color: var(--green);
}

.admin-login {
  max-width: 520px;
  padding: 22px;
  display: grid;
  gap: 14px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: var(--white);
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.admin-table th {
  background: #f3ede6;
  font-size: 12px;
}

.status-label {
  font-weight: 900;
  color: var(--accent-dark);
}

.loading-view {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
}

@media (max-width: 920px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .takeout-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .app-shell {
    width: min(100% - 24px, 1120px);
  }

  .header-inner {
    align-items: start;
    padding: 10px 0;
    display: grid;
  }

  .header-nav {
    justify-content: start;
  }

  .hero-copy,
  .summary-panel,
  .panel {
    padding: 18px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  .stepper,
  .product-grid,
  .grid.two,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .panel-head {
    display: grid;
  }
}
