:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef7f7;
  --ink: #172026;
  --muted: #63717a;
  --line: #d7e1e5;
  --brand: #1b5e7b;
  --brand-strong: #0d3a50;
  --accent: #c0392b;
  --danger: #a63d40;
  --shadow: 0 18px 44px rgba(23, 32, 38, 0.1);
}

* {
  box-sizing: border-box;
}

.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#config-warning {
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-radius: 6px;
  color: #5d4037;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 10px 14px;
  margin: 12px 0 4px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  padding: 28px clamp(18px, 4vw, 56px);
  background: var(--brand-strong);
  color: #fff;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

/* ロゴ。表示サイズ(62px)に合わせた124pxの画像をデータURIとして埋め込み、
   外部ファイルの読み込みを不要にしている。元画像は白い角丸の板の上に円が
   乗った構成のため、円の部分だけを切り出したうえで border-radius で丸くする。
   差し替える場合は assets/logo.png から同じ手順で作り直す */
.brand-logo {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAAB8CAMAAACcwCSMAAABIFBMVEX////+///+/v////7+/v79/f7+/vz8/f34/P35/Pb2+fz19fbp9/3q8/jb9fzb8frV7vvO6/vL6/vK6fvq6/PX6fbd3+3e3bzI6vrI6PzI6PvH6PvG6PvH6PrG5/rE6vvF5/vD5/vD5vrC4/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nFcC5NqHbjEEv8b+xn/k4WR7/nDgv/9oLG544MIBEe7GeLrIhweMsBcjACVm4cgC+794KHZ/EYLX46Q8Do5I52ywvQ7YbyP/LzjbgS1EPWfHAAAAAElFTkSuQmCC") center / cover no-repeat;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 3px 10px rgba(0, 0, 0, 0.25);
}

/* 小画面では見出しが折り返さないようロゴを小さくする */
@media (max-width: 640px) {
  .header-brand {
    gap: 12px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }
}

.app-header h1 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: 0;
}

.header-meta {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
}

.header-link {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  color: #fff;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.header-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 予約注文フォーム（index.html）の公式サイトリンク。
   .header-link は管理画面とも共有しているため、修飾クラスで上書きする */
.header-link--site {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.header-link--site:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.header-link--site:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.header-link--site .header-link-icon {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .header-link--site {
    transition: none;
  }

  .header-link--site:hover {
    transform: none;
  }
}

/* 小画面ではヘッダーが縦積みになるため、横幅いっぱいに伸びないよう左寄せにする */
@media (max-width: 640px) {
  .header-link--site {
    align-self: flex-start;
  }
}

.eyebrow {
  margin: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.78;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
}

.app-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tab-button {
  min-width: 112px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 10px 16px;
  font-weight: 800;
}

.tab-button.is-active {
  background: var(--brand);
  color: #fff;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 18px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
}

.product-category-note {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.75em;
  font-weight: 600;
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.form-section,
.summary-panel,
.receipt-panel,
.admin-stats,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-section {
  grid-column: 1;
  padding: 22px;
}

.form-section h3,
.summary-panel h3 {
  margin: 0 0 16px;
  font-size: 20px;
  letter-spacing: 0;
}

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

label {
  display: grid;
  gap: 7px;
  color: #24323a;
  font-size: 14px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d5da;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(0, 109, 119, 0.24);
  outline-offset: 2px;
}

.pickup-note {
  margin: -8px 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.pickup-cutoff-banner {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #f0c9c2;
  border-radius: 8px;
  background: #fdf1ee;
}

.pickup-cutoff-banner p {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.pickup-grid {
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.pickup-date-field {
  display: grid;
  gap: 7px;
}

.pickup-date-label {
  color: #24323a;
  font-size: 14px;
  font-weight: 800;
}

.pickup-calendar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.calendar-empty {
  margin: 0;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 13px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.calendar-title {
  font-size: 14px;
  font-weight: 800;
}

.calendar-nav {
  min-height: 28px;
  width: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--brand-strong);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-cell {
  aspect-ratio: 1 / 1;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  padding: 2px;
  cursor: pointer;
}

.calendar-day:hover:not(:disabled) {
  border-color: var(--brand);
}

.calendar-day.is-selected {
  background: var(--brand);
  border-color: var(--brand-strong);
  color: #fff;
  font-weight: 800;
}

.calendar-day.is-disabled {
  background: transparent;
  border-color: transparent;
  color: #c3ccd1;
  cursor: not-allowed;
}

.calendar-day-note {
  font-size: 9px;
  line-height: 1;
}

.slot-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.slot-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.slot-chip strong {
  display: block;
  font-size: 14px;
}

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

.products-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.products-header .muted {
  max-width: 420px;
  margin: 2px 0 0;
  font-size: 13px;
}

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

.product-card {
  display: grid;
  grid-template-rows: 152px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-card.is-sold-out {
  opacity: 0.72;
}

.product-card.is-sold-out .product-image {
  filter: grayscale(1);
}

.sold-out-badge {
  background: #efe3e3;
  color: var(--danger);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.product-image {
  display: grid;
  place-items: center;
  min-height: 152px;
  background:
    linear-gradient(135deg, rgba(0, 109, 119, 0.12), rgba(214, 107, 47, 0.12)),
    #f5fafb;
  color: var(--brand-strong);
  text-align: center;
  font-weight: 900;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.product-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.product-title h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.price {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.product-description {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.qty-control {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  min-height: 40px;
  border: 1px solid #c8d5da;
  border-radius: 6px;
  overflow: hidden;
}

.qty-control button {
  height: 40px;
  border: 0;
  background: var(--surface-soft);
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

@media (max-width: 600px) {
  .qty-control {
    grid-template-columns: 44px 1fr 44px;
    min-height: 44px;
  }
  .qty-control button {
    height: 44px;
  }
}

.qty-control output {
  text-align: center;
  font-weight: 900;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-weight: 700;
}

.check-row input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
}

.summary-panel {
  position: sticky;
  top: 16px;
  grid-column: 2;
  grid-row: 1 / span 4;
  padding: 22px;
}

/* モバイル用固定合計バー — PCでは非表示。≤980px のメディアクエリで表示する */
.mobile-order-bar {
  display: none;
}

.summary-items {
  display: grid;
  gap: 10px;
  min-height: 96px;
  color: var(--muted);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 20px;
}

/* 支払いは店頭というのは予約前に必ず伝えたいので、合計金額の直下に置く */
.summary-payment-note {
  margin: -6px 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent);
  font-weight: 600;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  padding: 10px 16px;
  font-weight: 900;
  transition: filter 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  filter: brightness(1.06);
}

.primary-button:active,
.secondary-button:active,
.danger-button:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.96);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.primary-button {
  width: 100%;
  background: var(--brand);
  color: #fff;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button-spinner,
.inline-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.login-submit.is-loading .button-spinner,
.login-status .inline-spinner {
  display: inline-block;
}

/* ── ボタンの押下フィードバック ──
   押した瞬間に少し沈む → 通信中はスピナー → 完了でチェックマーク、と
   段階を目で追えるようにする。押しただけで何も起きないように見える状態をなくす。 */
.primary-button,
.secondary-button,
.danger-button {
  transition: background 0.15s, color 0.15s, transform 0.08s ease, box-shadow 0.15s;
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.danger-button:active:not(:disabled) {
  transform: scale(0.97);
}

.is-busy {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.is-busy::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.is-done {
  position: relative;
  animation: button-done-pop 0.32s ease;
}

.is-done::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-weight: 900;
  animation: button-check-in 0.25s ease;
}

@keyframes button-done-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes button-check-in {
  from { opacity: 0; transform: translateY(-50%) scale(0.5); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .primary-button:active:not(:disabled),
  .secondary-button:active:not(:disabled),
  .danger-button:active:not(:disabled) { transform: none; }
  .is-done, .is-done::after { animation: none; }
}

.login-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgba(27, 94, 123, 0.24);
  border-radius: 6px;
  background: #eef7f7;
  color: var(--brand-strong);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
}

.login-status[hidden] {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.secondary-button {
  background: var(--brand);
  color: #fff;
}

#reloadBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#reloadBtn::before {
  content: "↻";
  display: inline-block;
  font-size: 1em;
  line-height: 1;
  transition: opacity 0.2s;
}

#reloadBtn.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

#reloadBtn.is-loading::before {
  animation: spin 0.7s linear infinite;
}

.danger-button {
  background: #f8e7e7;
  color: var(--danger);
}

.payment-toggle-btn {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: filter 0.1s, box-shadow 0.1s;
  user-select: none;
}
.payment-toggle-btn:hover:not(:disabled) {
  filter: brightness(0.93);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.payment-toggle-btn:active:not(:disabled) {
  filter: brightness(0.86);
  transform: scale(0.97);
}
.payment-toggle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.payment-toggle-btn.is-unpaid {
  background: #fde8e8;
  color: var(--danger);
  border-color: #f5b8b8;
}
.payment-toggle-btn.is-paid {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}

.print-status-wrap {
  display: inline-grid;
  gap: 4px;
  min-width: 76px;
}

.print-status-toggle-btn {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: filter 0.1s, box-shadow 0.1s, transform 0.1s;
  user-select: none;
}

.print-status-toggle-btn:hover:not(:disabled) {
  filter: brightness(0.94);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.print-status-toggle-btn:active:not(:disabled) {
  filter: brightness(0.88);
  transform: scale(0.97);
}

.print-status-toggle-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.print-status-toggle-btn.is-unprinted {
  background: #fff4e3;
  color: #9a5a00;
  border-color: #e4b46a;
}

.print-status-toggle-btn.is-printed {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}

.print-status-time {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.auto-print-btn.is-on {
  background: #e67e22;
  color: #fff;
}

.auto-print-btn.is-loading {
  cursor: wait;
}

.auto-print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.small-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.receipt-panel {
  margin-top: 18px;
  padding: 22px;
  border-color: rgba(0, 109, 119, 0.36);
  background: #f2fbfa;
}

.receipt-panel h3 {
  margin: 0 0 10px;
}

.receipt-code {
  display: inline-flex;
  margin: 6px 0 12px;
  border-radius: 6px;
  background: var(--brand-strong);
  color: #fff;
  padding: 8px 12px;
  font-size: 22px;
  font-weight: 900;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.receipt-print-button {
  margin-top: 12px;
}

.intake-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.intake-badge.is-web {
  background: #e8f4f8;
  color: var(--brand-strong);
}

.intake-badge.is-store {
  background: #fff1dc;
  color: #9a5a00;
}

.intake-badge.is-phone {
  background: #efe4fb;
  color: #5b2d91;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.stat-card {
  background: #fff;
  padding: 18px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

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

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

th {
  background: var(--brand-strong);
  color: #fff;
  white-space: nowrap;
}

.status-group-row td {
  border-bottom: 1px solid #c9d8dd;
  background: #edf5f6;
  color: var(--brand-strong);
  padding: 10px 14px;
}

.status-group-row span {
  margin-right: 8px;
  font-weight: 900;
}

.status-group-row strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #fff;
  padding: 2px 9px;
  font-size: 12px;
}

.order-row.is-cancelled {
  opacity: 0.55;
}

.order-row.is-unagi-pickup td {
  background: #fff4e0;
  box-shadow: inset 3px 0 0 #d97706;
}

.order-row.is-unagi-pickup:hover td {
  background: #ffe9c2;
}

.order-row.is-unagi-pickup.is-cancelled td {
  background: transparent;
  box-shadow: inset 3px 0 0 var(--line);
}

.unagi-pickup-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

td select {
  min-height: 36px;
  padding: 6px 8px;
}

.cancel-order-btn {
  padding: 6px 10px;
  min-height: 0;
  font-size: 13px;
  white-space: nowrap;
}

/* ── 自動更新トグル ── */
.auto-refresh-btn.is-on {
  background: var(--brand);
  color: #fff;
}

.last-updated-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  align-self: center;
}

/* ── 選択モードトグル ── */
.secondary-button.is-active-mode {
  background: #e67e22;
  color: #fff;
}

/* ── チェックボックス列 ── */
.col-checkbox {
  width: 40px;
  text-align: center;
  padding: 8px 6px;
}

.checkbox-cell {
  text-align: center;
  vertical-align: middle;
}

.order-checkbox {
  width: 18px;
  min-height: 18px;
  cursor: pointer;
  accent-color: var(--brand);
}

.order-row:has(.order-checkbox:checked) {
  background: rgba(27, 94, 123, 0.06);
}

/* ── 一括操作バー ── */
.bulk-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: var(--brand-strong);
  color: #fff;
  box-shadow: 0 -4px 16px rgba(23, 32, 38, 0.2);
  z-index: 100;
}

.bulk-action-bar[hidden] {
  display: none;
}

.bulk-count {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.bulk-status-label {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.bulk-status-label select {
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 0;
}

.bulk-action-bar .primary-button {
  background: #fff;
  color: var(--brand-strong);
  flex-shrink: 0;
}

.bulk-action-bar .secondary-button {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

/* ── 商品写真管理 ── */
.product-image-manager {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.product-image-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}

.product-image-header h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.product-image-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.product-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-manager-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.product-category-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfd;
  overflow: hidden;
}

.product-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.product-category-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(135deg, #e5f2f2, #f4f0eb);
  overflow: hidden;
}

.product-category-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-category-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.product-category-title strong {
  font-size: 15px;
}

.product-category-note {
  margin: 0;
  padding: 8px 12px 0;
  font-size: 12px;
  color: var(--muted);
}

.product-row-list {
  list-style: none;
  margin: 0;
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.product-row.is-hidden {
  background: #f2f4f5;
  opacity: 0.75;
}

.product-row.is-dragging,
.product-category-block.is-dragging {
  opacity: 0.45;
  outline: 2px dashed var(--brand);
  outline-offset: -2px;
}

#productImageManager.is-reorder-saving .product-manager-groups {
  opacity: 0.7;
  pointer-events: none;
}

.product-row.is-drop-target {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(43, 122, 151, 0.15);
}

.product-drag-handle {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px 2px;
  cursor: grab;
  touch-action: none;
}

.product-drag-handle:active {
  cursor: grabbing;
}

.product-move-buttons {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-move-up,
.product-move-down {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 4px;
  font-size: 9px;
  line-height: 1;
  padding: 3px 5px;
  cursor: pointer;
}

.product-move-up:hover,
.product-move-down:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.product-move-up:disabled,
.product-move-down:disabled {
  opacity: 0.3;
  cursor: default;
}

.product-row-thumb {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(135deg, #e5f2f2, #f4f0eb);
  overflow: hidden;
}

.product-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.product-row-name {
  font-size: 14px;
}

.product-row-meta {
  font-size: 12px;
  color: var(--muted);
}

.product-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.product-badge.is-hidden-badge {
  background: #e3e7ea;
  color: #55636c;
}

.product-badge.is-warning-badge {
  background: #fff3d6;
  color: #8a6100;
}

.product-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-visible-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--danger);
}

/* ── 商品の編集・追加モーダル ── */
.product-edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-edit-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.product-edit-form .field input,
.product-edit-form .field textarea {
  min-height: 38px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}

.product-edit-form .field input[readonly] {
  background: #f2f4f5;
}

.product-edit-form .field-hint {
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}

.product-edit-form .field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-form-notice:empty {
  display: none;
}

.product-form-notice {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.6;
}

.product-form-notice.is-info {
  background: var(--surface-soft);
  color: var(--brand-strong);
}

.product-form-notice.is-warning {
  background: #fff8e6;
  color: #8a6100;
  border: 1px solid #f0d18a;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

#productEditSaveBtn.is-loading .button-spinner {
  display: inline-block;
}

#productEditSaveBtn.is-loading {
  cursor: wait;
}

/* ── 商品の削除確認 ── */
.delete-target {
  font-weight: 700;
  margin: 0 0 8px;
}

.delete-notes {
  margin: 0 0 10px;
  padding-left: 1.2em;
  font-size: 13px;
  line-height: 1.8;
}

.delete-recommend {
  margin: 0;
  font-size: 13px;
  color: var(--brand-strong);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 8px 10px;
}

.sale-window-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.upload-file-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.upload-status-text {
  font-size: 12px;
  color: var(--brand);
  font-style: italic;
}

@media (max-width: 720px) {
  .product-header-actions {
    width: 100%;
  }

  .product-header-actions button {
    flex: 1 1 auto;
  }

  .product-category-header {
    flex-wrap: wrap;
  }

  .product-category-title {
    flex: 1 1 40%;
  }

  .product-category-header .product-add-btn {
    width: 100%;
    order: 9;
  }

  .product-row {
    flex-wrap: wrap;
  }

  .product-row-main {
    flex: 1 1 50%;
  }

  .product-row-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .product-edit-form .field-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Feature 5: 注文詳細モーダル ── */
.order-detail-dialog {
  max-width: min(640px, calc(100vw - 32px));
  width: 100%;
}

.detail-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.detail-dialog-header h3 {
  margin: 0;
  font-size: 20px;
}

.dialog-close-btn {
  border: 0;
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-close-btn:hover {
  background: var(--line);
}

.detail-list {
  gap: 12px 16px;
}

.detail-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

/* ===== 顧客注文履歴カード（注文詳細モーダル内） ===== */
.link-button {
  border: none;
  background: none;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--brand-strong);
}

.detail-back-btn {
  display: inline-block;
  margin-bottom: 12px;
}

.customer-history-card {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-history-title {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.customer-history-summary {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 0.95rem;
}

.customer-history-summary span {
  color: var(--muted);
  font-size: 0.85rem;
}

.customer-history-last {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.customer-history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-history-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 4px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}

.customer-history-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.customer-history-search {
  align-self: flex-start;
}

.customer-history-card.is-first-time {
  background: #fff8e6;
  border-color: #f0d18a;
}

.customer-history-firsttime {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #9a6b00;
}

/* 行クリック可能なカーソル */
.order-row {
  cursor: pointer;
}

.order-row:hover td {
  background: rgba(27, 94, 123, 0.03);
}

/* ── エラー表示 ── */
.form-error {
  padding: 10px 14px;
  border-radius: 6px;
  background: #fde8e8;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(166, 61, 64, 0.3);
  margin-bottom: 12px;
}

.field-error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger);
  outline-color: rgba(166, 61, 64, 0.24);
}

/* ── 確認モーダル ── */
dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  box-shadow: var(--shadow);
  max-width: min(480px, calc(100vw - 32px));
  width: 100%;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}

.submission-dialog {
  max-width: min(560px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(23, 32, 38, 0.5);
}

.dialog-inner {
  padding: 28px;
}

.dialog-inner h3 {
  margin: 0 0 18px;
  font-size: 20px;
}

.dialog-body {
  margin-bottom: 24px;
}

.confirm-list {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 10px 16px;
  margin: 0;
  font-size: 14px;
}

.confirm-list dt {
  color: var(--muted);
  font-weight: 800;
}

.confirm-list dd {
  margin: 0;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.dialog-actions .secondary-button {
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.submission-status {
  display: grid;
  gap: 16px;
}

.submission-status h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.submission-kicker {
  margin: 0;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
}

.submission-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.submission-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(0, 109, 119, 0.18);
  border-top-color: var(--brand-strong);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.submission-order-number {
  margin: 0;
}

.submission-close-button {
  width: 100%;
}

.submission-status.is-error .receipt-header {
  margin-bottom: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── 商品プレースホルダー ── */
.product-placeholder {
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

/* ── 注文完了パネル強化 ── */
.receipt-header {
  margin-bottom: 16px;
}

.receipt-header h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.receipt-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.receipt-order-number {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
}

.receipt-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.receipt-detail {
  padding: 14px 0;
  border-top: 1px solid rgba(27, 94, 123, 0.2);
  border-bottom: 1px solid rgba(27, 94, 123, 0.2);
  margin-bottom: 16px;
}

.receipt-detail p {
  margin: 0 0 8px;
  font-size: 14px;
}

.receipt-detail p:last-child {
  margin-bottom: 0;
}

.receipt-notice {
  background: rgba(27, 94, 123, 0.06);
  border-radius: 6px;
  padding: 12px 14px;
}

.receipt-screenshot-note {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-strong);
}

.receipt-mail-note {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
}

.receipt-mail-note .receipt-mail-from {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.receipt-phone-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── スロットチップ視認性 ── */
.slot-chip.is-low {
  border-color: var(--accent);
  background: rgba(192, 57, 43, 0.06);
}

.slot-chip.is-low span {
  color: var(--accent);
  font-weight: 700;
}

.slot-chip.is-full {
  border-color: rgba(166, 61, 64, 0.4);
  background: #f8e7e7;
  opacity: 0.75;
}

.slot-chip.is-full span {
  color: var(--danger);
}

.slot-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ── 時間帯別集計 ── */
.stat-slot-section {
  grid-column: 1 / -1;
  padding: 16px 18px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
}

.stat-slot-heading {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 800;
}

.date-slots-group.is-unagi-pickup .stat-slot-section {
  background: #fff4e0;
  border-top: 1px solid #f0c987;
  box-shadow: inset 3px 0 0 #d97706;
}

.date-slots-group.is-unagi-pickup .stat-slot-heading {
  color: #b5651d;
}

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

.stat-slot-card {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.1s, box-shadow 0.1s;
}
.stat-slot-card:hover {
  background: #eef6f6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.stat-slot-card:active {
  background: #ddeeed;
}

.stat-slot-card span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 2px;
}

.stat-slot-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}

.stat-slot-card small {
  font-size: 11px;
  color: var(--muted);
}

.stat-slot-card.is-low strong,
.stat-slot-card.is-low small {
  color: var(--accent);
}

.stat-slot-card.is-full {
  background: #f8e7e7;
  border-color: rgba(166, 61, 64, 0.3);
}

.stat-slot-card.is-full strong,
.stat-slot-card.is-full small {
  color: var(--danger);
}

.stat-slot-card.has-orders {
  background: #e8f5e9;
  border-color: rgba(46, 125, 50, 0.3);
}

.stat-slot-card.has-orders strong,
.stat-slot-card.has-orders small {
  color: #2e7d32;
}

/* 受取枠カードに出す件数（皿数の下の小さい行） */
.stat-slot-card .stat-slot-orders {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 0;
}

/* 受取上限（時間帯ごと）の設定 */
.slot-capacity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.slot-capacity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.slot-capacity-label {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.slot-capacity-row input {
  width: 64px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  text-align: right;
}

.slot-capacity-unit {
  font-size: 12px;
  color: var(--muted);
}

.slot-capacity-actions {
  margin: 12px 0;
  display: flex;
  justify-content: flex-end;
}

/* ── 検索ボックス ── */
.admin-search {
  min-height: 38px;
  width: 220px;
  padding: 6px 12px;
  border: 1px solid #c8d5da;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}

.admin-search:focus {
  outline: 3px solid rgba(0, 109, 119, 0.24);
  outline-offset: 2px;
}

/* ── 日付フィルター ── */
.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.filter-label select {
  min-height: 38px;
  width: auto;
  padding: 6px 10px;
}

/* ── 注文番号・受取・お客様セル ── */
.order-number-text {
  display: block;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.order-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.pickup-date-text {
  display: block;
  font-weight: 700;
}

.pickup-slot-text {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.customer-name {
  display: block;
  font-size: 15px;
}

/* 氏名クリックで顧客台帳の詳細ポップアップを開けるボタン。<strong>相当の見た目にする */
.customer-name-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.customer-name-btn:hover,
.customer-name-btn:focus-visible {
  text-decoration: underline;
  color: var(--brand-strong);
  outline: none;
}

.customer-kana {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.contact-link {
  display: block;
  font-size: 13px;
  margin-top: 3px;
  color: var(--brand);
  text-decoration: none;
  word-break: break-all;
}

.contact-link:hover {
  text-decoration: underline;
}

.total-amount {
  font-size: 15px;
  white-space: nowrap;
}

.memo-text {
  font-size: 13px;
  color: var(--muted);
}

/* ── ステータス色分け ── */
.status-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-select-wrap::before {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.status-select-wrap.is-warning::before  { background: #e67e22; }
.status-select-wrap.is-accepted::before { background: var(--brand); }
.status-select-wrap.is-preparing::before { background: #e67e22; }
.status-select-wrap.is-ready::before    { background: #27ae60; }
.status-select-wrap.is-delivered::before { background: #95a5a6; }

/* ステータスグループ行のラベル色 */
.status-group-label { font-weight: 900; }
.status-group-label.is-warning  { color: #c0392b; }
.status-group-label.is-accepted { color: var(--brand-strong); }
.status-group-label.is-preparing { color: #d35400; }
.status-group-label.is-ready    { color: #1e8449; }
.status-group-label.is-delivered { color: var(--muted); }
.status-group-label.is-cancelled { color: var(--muted); }

.order-status-label {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid #d2dce0;
  border-radius: 6px;
  background: #f7fafb;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.order-status-label.is-cancelled {
  color: var(--danger);
  background: #fff4f4;
}

/* ── 印刷用（管理画面の予約一覧をキレイに印刷するための調整） ── */
@media print {
  .app-header,
  .toolbar,
  .admin-stats .stat-slot-section,
  td select,
  .cancel-order-btn,
  #loginView {
    display: none !important;
  }

  .mobile-order-bar {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
    color: #000;
    padding-bottom: 0;
  }

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

  .section-heading {
    margin: 0 0 12pt;
  }

  .section-heading h2 {
    font-size: 16pt;
  }

  .table-wrap {
    border: none;
    box-shadow: none;
    overflow: visible;
    margin-top: 0;
  }

  table {
    min-width: 0;
    width: 100%;
    font-size: 10pt;
  }

  th {
    background: #333 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  th, td {
    padding: 6pt 8pt;
    border-bottom: 0.5pt solid #ccc;
  }

  tr {
    page-break-inside: avoid;
  }
}

@media (max-width: 980px) {
  .order-layout {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }

  /* 注文内容パネル内の送信ボタンはモバイルでは固定バーに集約 */
  .summary-panel .primary-button {
    display: none;
  }

  /* 画面下部に固定する合計＋確認ボタンバー */
  .mobile-order-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--surface, #fff);
    border-top: 1px solid var(--line, #e2e2e2);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }

  .mobile-order-bar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    flex-shrink: 0;
  }

  .mobile-order-bar-label {
    font-size: 0.75rem;
    color: var(--muted, #777);
  }

  #mobileBarTotal {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--brand, #b3261e);
  }

  .mobile-order-bar .primary-button {
    flex: 1;
    min-height: 48px;
  }

  /* 固定バーがフォーム末尾を隠さないよう余白を確保 */
  body {
    padding-bottom: 88px;
  }

  /* 埋め込み表示・印刷時は固定バーを出さない */
  body.embed-mode .mobile-order-bar {
    display: none;
  }

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

  .slot-list,
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .app-header,
  .section-heading,
  .products-header {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    width: min(100% - 20px, 1220px);
    margin-top: 14px;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .tab-button {
    min-width: 0;
  }

  .field-grid,
  .product-grid,
  .slot-list,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .pickup-grid {
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .calendar-cell {
    min-height: 42px;
    aspect-ratio: auto;
  }

  .calendar-day-note {
    font-size: 0;
    line-height: 10px;
    white-space: nowrap;
  }

  .calendar-day-note::after {
    content: "終了";
    font-size: 9px;
  }

  .product-image-header {
    align-items: stretch;
    flex-direction: column;
  }

  .form-section,
  .summary-panel {
    padding: 16px;
  }
}

@media (max-width: 760px) {
  .table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  .status-group-row {
    margin: 18px 0 8px;
  }

  .status-group-row:first-child {
    margin-top: 0;
  }

  .status-group-row td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #c9d8dd;
    border-radius: 8px;
  }

  .order-row {
    max-width: 540px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .order-row td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    overflow-wrap: anywhere;
  }

  .order-row td:last-child {
    border-bottom: 0;
  }

  .order-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
  }

  .order-row td[data-label="注文番号"] {
    grid-template-columns: 1fr;
    background: #f7fafb;
  }

  .order-row td[data-label="注文番号"]::before {
    content: none;
  }

  .order-row td[data-label="注文番号"] strong {
    font-size: 18px;
  }

  .order-row td select,
  .order-row td button {
    width: 100%;
  }

  /* モバイルでの検索ボックス */
  .admin-search {
    width: 100%;
    order: -1;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-label {
    justify-content: space-between;
  }

  .filter-label select {
    width: auto;
    flex: 1;
    margin-left: 8px;
  }

  /* ステータスドットをモバイルカードでも表示 */
  .status-select-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* モバイルではチェックボックス列を非表示 */
  .col-checkbox,
  .checkbox-cell {
    display: none !important;
  }

  /* 一括バーをモバイル対応 */
  .bulk-action-bar {
    padding: 10px 16px;
    gap: 8px;
  }

  .bulk-status-label select {
    flex: 1;
  }

  /* 詳細モーダルをモバイル対応 */
  .order-detail-dialog {
    max-width: 100vw;
    max-height: 90vh;
    border-radius: 12px 12px 0 0;
    margin: auto auto 0;
    overflow-y: auto;
  }
}

/* ── 受取枠残数ビュー ── */
.slot-status-outer {
  margin-bottom: 16px;
}

.slot-status-outer .date-slots-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-soft);
}

.slot-status-outer .stat-slot-section {
  grid-column: unset;
  border-top: none;
  padding-top: 0;
}

.slot-status-outer .date-slots-group + .date-slots-group {
  margin-top: 12px;
}

/* うなぎ受取日はグループ全体（ヘッダー含む）を強調 */
.slot-status-outer .date-slots-group.is-unagi-pickup {
  background: #fff4e0;
  border-color: #f0c987;
  box-shadow: inset 3px 0 0 #d97706;
}

.slot-status-outer .date-slots-group.is-unagi-pickup .stat-slot-section {
  background: transparent;
  border-top: none;
  box-shadow: none;
}

/* ── 受取枠グループの開閉ヘッダー ── */
.slot-status-outer summary.stat-slot-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.slot-status-outer summary.stat-slot-heading::-webkit-details-marker {
  display: none;
}

.slot-status-outer summary.stat-slot-heading > span:first-child::before {
  content: "▾";
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
  transition: transform 0.15s ease;
}

.slot-status-outer .date-slots-group:not([open]) summary.stat-slot-heading > span:first-child::before {
  transform: rotate(-90deg);
}

.slot-status-outer summary.stat-slot-heading:hover {
  background: rgba(0, 0, 0, 0.03);
}

.stat-slot-total {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.slot-status-outer .date-slots-group.is-past {
  opacity: 0.75;
}

.past-date-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* ── 受取日別サマリー ── */
.date-summary-section {
  margin-bottom: 16px;
}

.date-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.date-summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.date-summary-heading {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
}

.date-summary-counts {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.date-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.date-summary-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-soft);
  color: var(--muted);
}

.date-summary-badge.is-accepting  { background: #e8f5e9; color: #2e7d32; }
.date-summary-badge.is-preparing  { background: #e3f2fd; color: #1565c0; }
.date-summary-badge.is-ready      { background: #fff3e0; color: #e65100; }
.date-summary-badge.is-delivered  { background: #f3e5f5; color: #6a1b9a; }
.date-summary-badge.is-warning    { background: #fff8e1; color: #f57f17; }
.date-summary-badge.is-cancelled  { background: #f5f5f5; color: #9e9e9e; }

.date-summary-products {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── スタッフメモ編集 ── */
.memo-edit-input {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 6px;
}

.memo-save-btn {
  font-size: 13px;
  padding: 4px 14px;
}

/* ── 管理画面: インディゴ藍テーマ ──
   顧客サイト（ティール青緑系）と一目で区別できるよう、
   .admin-page 配下だけブランド変数を藍/インディゴ系に上書きする。
   styles.css は顧客フォームと共有しているが、ここでの上書きは
   body.admin-page を持つ管理画面にのみ適用される。 */
.admin-page {
  --bg: #f4f5fb;
  --surface-soft: #eef0fb;
  --line: #dadcec;
  --brand: #3c4f93;
  --brand-strong: #262f5a;
  /* 管理ヘッダーの高さ（sticky時にサイドバーを下げるオフセットに使う）。
     JS側の syncAdminHeaderHeight() が実測値で上書きするので、これは初期描画用の概算値 */
  --admin-header-h: 71px;
}

/* 管理ヘッダーを画面上部に固定し、店頭注文受付サイトへいつでも飛べるようにする。
   モバイル（≤768px）はヘッダーが縦に長く画面を占有するため固定しない。
   お客様向けページの大きな見出しをそのまま流用すると実務画面には縦に大きすぎるため、
   PC表示では管理画面だけ高さを詰める。 */
@media (min-width: 769px) {
  .admin-page .app-header {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 0;
    padding: 14px clamp(18px, 3vw, 40px);
  }

  .admin-page .app-header h1 {
    margin: 0;
    font-size: 22px;
  }
}

/* ヘッダー右の「店頭注文受付を開く」ボタン — 店頭ページのアンバー配色で強調 */
.admin-page .header-store-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #d97706;
  border-color: #d97706;
  color: #fff;
  white-space: nowrap;
}
.admin-page .header-store-link:hover {
  background: #b5651d;
  border-color: #b5651d;
}

/* sticky ヘッダーの分だけサイドバーを下げ、上部が隠れないようにする（PC表示のみ。
   モバイル（≤768px）はサイドバーがハンバーガーメニューのドロワーになるため適用しない） */
@media (min-width: 769px) {
  .admin-page .admin-sidebar {
    top: var(--admin-header-h);
    height: calc(100vh - var(--admin-header-h));
  }
}

/* ── 管理画面: 太字を抑えた読みやすさ調整 ── */
.admin-page .app-header h1,
.admin-page .section-heading h2,
.admin-page .form-section h3,
.admin-page .product-image-header h3,
.admin-page .detail-dialog-header h3,
.admin-page .dialog-inner h3 {
  font-weight: 600;
}

.admin-page .eyebrow,
.admin-page .header-meta,
.admin-page label,
.admin-page .filter-label,
.admin-page .bulk-status-label,
.admin-page .product-image-note,
.admin-page .confirm-list dt,
.admin-page .receipt-label,
.admin-page .stat-card span,
.admin-page .stat-slot-card span,
.admin-page .login-status,
.admin-page .form-error,
.admin-page .field-error,
.admin-page .last-updated-label,
.admin-page .order-row td::before {
  font-weight: 500;
}

.admin-page .primary-button,
.admin-page .secondary-button,
.admin-page .danger-button,
.admin-page .print-status-toggle-btn,
.admin-page .payment-toggle-btn,
.admin-page .cancel-order-btn,
.admin-page .memo-save-btn,
.admin-page .dialog-close-btn,
.admin-page th,
.admin-page .bulk-count,
.admin-page .status-group-row span,
.admin-page .status-group-row strong,
.admin-page .status-group-label,
.admin-page .product-image-fields strong,
.admin-page .product-image-fields label,
.admin-page .stat-slot-heading,
.admin-page .date-summary-heading,
.admin-page .date-summary-badge,
.admin-page .order-status-label,
.admin-page .pickup-date-text,
.admin-page .receipt-screenshot-note,
.admin-page .slot-badge {
  font-weight: 600;
}

.admin-page .stat-card strong,
.admin-page .stat-slot-card strong,
.admin-page .order-number-text,
.admin-page .customer-name,
.admin-page .total-amount,
.admin-page .receipt-code,
.admin-page .summary-item strong,
.admin-page .summary-line strong,
.admin-page .detail-list strong,
.admin-page .order-row td[data-label="注文番号"] strong {
  font-weight: 700;
}

.admin-page .date-summary-products,
.admin-page .memo-text,
.admin-page .order-meta,
.admin-page .pickup-slot-text,
.admin-page .customer-kana,
.admin-page .contact-link {
  font-weight: 400;
}

/* ===== 在庫管理テーブル ===== */
.inventory-section {
  margin: 20px 0;
}

.inventory-header {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.inventory-header h3 { margin: 0; }
/* ── 受取日設定カレンダー ── */
.pickup-cal {
  margin: 14px 0 10px;
}

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

.pickup-cal-headrow {
  margin-bottom: 6px;
}

.pickup-cal-head {
  padding: 4px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.pickup-cal-head.is-sun,
.pickup-cal-cell.is-sun .pickup-cal-day {
  color: #a63d40;
}

.pickup-cal-head.is-sat,
.pickup-cal-cell.is-sat .pickup-cal-day {
  color: #2f5d8c;
}

.pickup-cal-grid + .pickup-cal-grid {
  margin-top: 6px;
}

.pickup-cal-week-label {
  margin: 10px 0 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.pickup-cal-headrow + .pickup-cal-week-label {
  margin-top: 6px;
}

.pickup-cal-cell {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 74px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pickup-cal-cell:hover {
  border-color: var(--muted);
}

.pickup-cal-cell:disabled {
  opacity: 0.5;
  cursor: progress;
}

.pickup-cal-cell.is-blank {
  border: 1px dashed var(--line);
  background: transparent;
  cursor: default;
}

.pickup-cal-cell.is-open {
  background: #eaf5ec;
  border-color: #9ecfae;
}

.pickup-cal-cell.is-closed {
  background: var(--surface-soft);
  color: var(--muted);
}

/* 今日のマスは常に見つけられるようリングで強調する */
.pickup-cal-cell.is-today {
  box-shadow: 0 0 0 2px var(--brand);
}

.pickup-cal-cell.is-today .pickup-cal-day::after {
  content: "今日";
  margin-left: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--brand);
  vertical-align: middle;
}

.product-thumb-zoomable {
  cursor: zoom-in;
  transition: transform 0.12s ease;
}

.product-thumb-zoomable:hover {
  transform: scale(1.06);
}

.image-preview-dialog .dialog-inner {
  max-width: min(92vw, 900px);
}

.image-preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-soft);
}

.confirm-dialog .dialog-inner {
  max-width: min(92vw, 460px);
}

/* 確認モーダルでは実行ボタンが主役。淡色のままだとキャンセルより弱く見えるため、
   危険操作でも塗りつぶして「こちらが実行」と分かるようにする。 */
.confirm-dialog .dialog-footer .danger-button {
  background: var(--danger);
  color: #fff;
}

.confirm-dialog .dialog-footer .secondary-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.confirm-dialog-message {
  margin: 0 0 10px;
  line-height: 1.7;
}

.confirm-dialog-details {
  margin: 0 0 10px;
  padding: 10px 12px 10px 28px;
  background: var(--surface-soft);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.8;
}

.confirm-dialog-warning {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdecea;
  color: #a63d40;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.6;
}

.closed-date-weekday {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand);
  min-height: 1.1em;
}

.pickup-cal-month {
  font-size: 0.7rem;
  color: var(--muted);
  min-height: 0.9em;
}

.pickup-cal-day {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.pickup-cal-state {
  font-size: 0.72rem;
}

.pickup-cal-cell.is-open .pickup-cal-state {
  color: #26713a;
  font-weight: 700;
}

.pickup-cal-count {
  font-size: 0.7rem;
  color: var(--muted);
}

.pickup-cal-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.pickup-cal-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.pickup-cal-swatch.is-open {
  background: #eaf5ec;
  border-color: #9ecfae;
}

.pickup-cal-swatch.is-closed {
  background: var(--surface-soft);
}

.pickup-cal-swatch + .pickup-cal-swatch {
  margin-left: 10px;
}

@media (max-width: 760px) {
  .pickup-cal-cell {
    min-height: 62px;
    padding: 4px;
  }
  .pickup-cal-grid {
    gap: 4px;
  }
}

.closed-date-add-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.closed-date-add-form .filter-label {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.closed-date-add-form input {
  min-height: 38px;
  padding: 6px 10px;
}
.inv-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.inv-table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 820px;
}
.inv-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #17384c;
  color: #fff;
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 2px solid #0e2939;
  border-right: 1px solid rgba(255,255,255,0.18);
}
.inv-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.inv-heading-main,
.inv-heading-sub {
  display: block;
  line-height: 1.25;
}
.inv-heading-main {
  font-size: 0.86rem;
  font-weight: 800;
}
.inv-heading-sub {
  margin-top: 2px;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.82;
}
.inv-th-product,
.inv-th-price,
.inv-th-stock {
  text-align: left;
}
.inv-th-price,
.inv-th-stock {
  background: #244f61 !important;
}
.inv-th-date {
  background: #17384c !important;
}
.inv-name { font-weight: 700; min-width: 160px; }
.inv-stock-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 170px;
  background: #f7fbfc;
}
.inv-price-cell { background: #fbf7ec; }
.inv-stock-input,
.inv-price-input {
  width: 76px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.875rem;
  text-align: right;
}
.inv-save-btn,
.inv-price-save-btn { padding: 3px 10px; font-size: 0.8rem; }
.inv-qty { text-align: center; color: var(--muted); }
.inv-total { color: var(--text); }
.inv-remaining {
  text-align: center;
  font-size: 1rem;
  background: #f4f8f5;
}
.inv-ok strong { color: #2e7d32; }
.inv-low strong { color: #e65100; }
.inv-over strong { color: var(--danger); }

.inv-th-total {
  background: #dbeaf0 !important;
  color: var(--brand-strong) !important;
  border-left: 2px solid var(--brand);
}

.inv-th-remaining {
  background: #21613a !important;
  color: #fff !important;
}

.inv-table td.inv-total {
  border-left: 2px solid var(--brand);
  background: #f8fbfc;
  color: var(--text);
}

.inv-table thead,
.inv-table tbody {
  display: table-row-group;
}

.inv-table thead {
  display: table-header-group;
}

.inv-table tr {
  display: table-row;
}

.inv-section-header td.inv-section-label {
  background: var(--surface-soft);
  color: var(--brand);
  font-weight: 900;
  font-size: 0.8rem;
  padding: 6px 12px;
  letter-spacing: 0.03em;
}

.inv-section-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inv-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  padding: 4px 2px;
  color: inherit;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-align: left;
}

.inv-section-toggle-icon {
  font-size: 0.7rem;
  color: var(--muted);
}

.inv-section-count {
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0;
}

.inv-table tr.inv-row-collapsed {
  display: none;
}

.inv-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-row-move.product-move-buttons {
  flex-direction: row;
  gap: 1px;
}

.inv-row-move .product-move-up,
.inv-row-move .product-move-down {
  font-size: 8px;
  padding: 2px 4px;
}

.inv-table th,
.inv-table td {
  display: table-cell;
}

/* ===================================================
   管理画面サイドバーレイアウト
   =================================================== */

/* app-shell をフル幅に上書き（管理画面のみ） */
.admin-page .app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* グローバルメッセージ（サイドバー外） */
.admin-global-message {
  margin: 12px 20px 0;
}

/* 2カラムレイアウト */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 112px);
  align-items: stretch;
}

/* ── サイドバー ── */
.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--brand-strong);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.18s ease;
}

.admin-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 8px;
}

.admin-sidebar-title {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 20px 20px 8px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
}

.admin-sidebar-toggle {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  transition: background 0.15s, color 0.15s, transform 0.18s;
}

.admin-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ── サイドバー折りたたみ（アイコンのみ表示） ── */
.admin-sidebar.is-collapsed {
  width: 56px;
}

.admin-sidebar.is-collapsed .admin-sidebar-title,
.admin-sidebar.is-collapsed .admin-nav-label,
.admin-sidebar.is-collapsed .admin-new-count {
  display: none;
}

.admin-sidebar.is-collapsed .admin-sidebar-head {
  justify-content: center;
  padding-right: 0;
}

.admin-sidebar.is-collapsed .admin-nav-item {
  justify-content: center;
  padding: 13px 0;
}

.admin-sidebar.is-collapsed .admin-sidebar-toggle span {
  display: inline-block;
  transform: rotate(180deg);
}

.admin-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.admin-nav-item.is-active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border-left-color: #8aa0e6;
}

.admin-nav-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.admin-nav-label {
  /* テキストラベル */
}

.admin-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 0;
}

.admin-logout-btn {
  color: rgba(255, 255, 255, 0.5);
}

.admin-logout-btn:hover {
  color: #fff;
}

/* ── コンテンツエリア ── */
.admin-content {
  flex: 1;
  min-width: 0;
  padding: 0 clamp(16px, 3vw, 40px) 48px;
}

/* ── パネル ── */
.admin-panel {
  display: none;
}

.admin-panel.is-active {
  display: block;
}

/* ── モバイル用ハンバーガーボタン（デスクトップでは非表示） ── */
.mobile-admin-topbar {
  display: none;
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle-icon {
  font-size: 16px;
  line-height: 1;
}

.admin-sidebar-mobile-close {
  display: none;
}

.mobile-sidebar-overlay {
  display: none;
}

/* ── モバイル: サイドバーをハンバーガーメニューのドロワーに変形 ── */
@media (max-width: 768px) {
  .mobile-admin-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 150;
    padding: 10px clamp(16px, 3vw, 40px);
    background: var(--brand-strong);
  }

  .admin-layout {
    flex-direction: column;
    position: relative;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(280px, 82vw);
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 210;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.3);
  }

  .admin-sidebar.is-mobile-open {
    transform: translateX(0);
  }

  .admin-sidebar-title {
    display: block;
  }

  .admin-sidebar-toggle {
    display: none;
  }

  .admin-sidebar-mobile-close {
    display: flex;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
  }

  .admin-sidebar-mobile-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
  }

  .admin-nav-list {
    display: block;
  }

  .admin-nav-list li {
    flex: none;
  }

  .admin-nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 13px 20px;
    font-size: 14px;
    border-left: 3px solid transparent;
    border-bottom: none;
    text-align: left;
  }

  .admin-nav-item.is-active {
    border-left-color: #8aa0e6;
    border-bottom-color: transparent;
  }

  .admin-nav-icon {
    font-size: 15px;
    width: 18px;
  }

  .admin-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    padding: 6px 0;
    flex-shrink: 0;
  }

  .admin-logout-btn {
    flex-direction: row;
    gap: 10px;
    font-size: 14px;
    padding: 13px 20px;
  }

  .mobile-sidebar-overlay:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
  }

  .admin-content {
    padding: 16px 16px 48px;
  }

  .admin-global-message {
    margin: 8px 16px 0;
  }
}

/* ── 受取枠別注文ポップアップ ── */
.slot-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.slot-orders-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.slot-orders-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.slot-orders-table tr:last-child td {
  border-bottom: none;
}
.slot-orders-table-wrap {
  margin-top: 0;
}
.slot-orders-kana {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.slot-orders-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge.is-accepted  { background: #e3f2fd; color: #1565c0; }
.status-badge.is-ready     { background: #e8f5e9; color: #2e7d32; }
.status-badge.is-delivered { background: #ede7f6; color: #4527a0; }
.status-badge.is-warning   { background: #fff3e0; color: #e65100; }
.status-badge.is-cancelled { background: #fce4ec; color: #880e4f; }

/* ── 操作マニュアル ── */
.manual-wrap {
  max-width: 760px;
}

.manual-header {
  margin-bottom: 32px;
}

.manual-header h2 {
  margin: 4px 0 12px;
  font-size: 26px;
}

.manual-intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.manual-toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 40px;
}

.manual-toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.manual-toc-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 24px;
}

.manual-toc-list li {
  font-size: 13px;
}

.manual-toc-list a {
  color: var(--brand);
  text-decoration: none;
}

.manual-toc-list a:hover {
  text-decoration: underline;
}

.manual-section {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.manual-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.manual-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
}

.manual-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.manual-body {
  display: grid;
  gap: 12px;
}

.manual-body h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 8px 0 4px;
  color: var(--ink);
}

.manual-body p,
.manual-body li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.manual-body ol,
.manual-body ul {
  padding-left: 20px;
  margin: 0;
  display: grid;
  gap: 4px;
}

.manual-example {
  background: #f4f0eb;
  border-left: 3px solid var(--brand);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  font-size: 13px !important;
  color: var(--muted) !important;
  margin: 4px 0;
}

.manual-note {
  background: #eef6f6;
  border: 1px solid #c5dede;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #2a6060;
}

.manual-caution {
  background: #fff5f5;
  border: 1px solid #f5c6c6;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #8b2020;
}

.manual-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.manual-table th,
.manual-table td {
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--line);
}

.manual-table thead tr {
  background: var(--surface);
}

.manual-table th {
  font-weight: 700;
  color: var(--muted);
}

.manual-table tbody tr:nth-child(even) {
  background: #fafcfc;
}

.manual-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.manual-flow-step {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid transparent;
}

.manual-flow-step.is-accepting { background: #e8f4f8; color: #1a6a8a; border-color: #9fcce0; }
.manual-flow-step.is-ready     { background: #e8f5e9; color: #2a6a30; border-color: #90c49a; }
.manual-flow-step.is-done      { background: #ede7f6; color: #4a2a8a; border-color: #b39ddb; }

.manual-flow-arrow {
  color: var(--muted);
  font-size: 18px;
  font-weight: 300;
}

@media (max-width: 640px) {
  .manual-toc-list {
    grid-template-columns: 1fr;
  }
}

/* 電話・店頭（store）経路ではメール欄を隠す。ネット予約選択時は表示する。 */
body.staff-mode.intake-store #emailField {
  display: none !important;
}

body.embed-mode {
  background: var(--bg);
}

body.embed-mode .app-header {
  display: none;
}

body.embed-mode .app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.embed-mode .section-heading {
  margin-top: 0;
}

@media print {
  body.printing-receipt .app-header,
  body.printing-receipt .section-heading,
  body.printing-receipt #orderForm,
  body.printing-receipt dialog {
    display: none !important;
  }

  body.printing-receipt .app-shell {
    max-width: none;
    padding: 0;
  }

  body.printing-receipt #receiptPanel {
    display: block !important;
    margin: 0;
    border: 0;
    box-shadow: none;
    background: #fff;
  }

  body.printing-receipt .receipt-print-button,
  body.printing-receipt .submission-close-button {
    display: none !important;
  }
}

/* スタッフ入力：注文経路の選択欄 */
.intake-route {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px 16px;
  margin: 0 0 8px;
}
.intake-route legend {
  font-weight: 700;
  color: var(--brand-strong);
  padding: 0 6px;
}
.intake-route-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.intake-route-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
}
.intake-route-options input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}
.intake-route-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ===================================================================
   モーションとアニメーション（分かりやすさ重視 / 動きを減らす設定に対応）
   - 装飾的な動きは prefers-reduced-motion: no-preference のときだけ適用
   - 読み込みスピナーは常に回転（状態が伝わるように）
   =================================================================== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dialogPop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes backdropFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes barSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes valuePop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}

/* 数量ボタンの押し込みフィードバック（常時） */
.qty-control button:active {
  background: var(--brand);
  color: #fff;
}

/* タブ／ナビ切替の押下フィードバック（常時） */
.tab-button { transition: background 0.15s ease, color 0.15s ease; }

@media (prefers-reduced-motion: no-preference) {
  /* 画面・パネル切替をふわっと表示。fill-modeに both/forwards を使わないのは意図的。
     使うとアニメ終了後も computed transform が none にならず残り続け、
     position: fixed な子孫（モバイルのサイドバードロワーなど）の配置基準が
     ビューポートからこの要素に変わってしまう（CSSのcontaining block仕様）。
     fill-modeなし（=none）なら終了後は要素本来の値（transformなし）に戻る。 */
  .view.is-active { animation: fadeInUp 0.3s ease; }
  .admin-panel.is-active { animation: fadeInUp 0.26s ease; }

  /* 注文内容（サマリー）の更新を視認しやすく */
  .summary-item { animation: fadeInUp 0.28s ease both; }

  /* 合計金額が変わったことを伝えるポップ */
  #totalPrice,
  #mobileBarTotal { display: inline-block; transition: transform 0.18s ease; }
  .summary-line strong.is-bumped,
  .mobile-order-bar strong.is-bumped { animation: valuePop 0.32s ease; }

  /* ダイアログの登場（フェード＋せり上がり） */
  dialog[open] { animation: dialogPop 0.24s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  dialog[open]::backdrop { animation: backdropFade 0.22s ease both; }

  /* モバイル固定バーの登場 */
  .mobile-order-bar { animation: barSlideUp 0.3s ease both; }

  /* 完了パネルの登場 */
  .receipt-panel:not([hidden]) { animation: fadeInUp 0.34s ease both; }
}

/* 動きを減らす設定では装飾アニメを止める（スピナーは維持） */
@media (prefers-reduced-motion: reduce) {
  .view.is-active,
  .admin-panel.is-active,
  .summary-item,
  .receipt-panel:not([hidden]),
  dialog[open],
  .mobile-order-bar {
    animation: none;
  }
}

/* ===================================================================
   店頭注文受付ページ（store-order.html / body.store-page）
   - 店頭スタッフがタブレットで操作する前提のUI調整
   - タッチしやすい余白・ボタン・入力欄、やや大きめの文字
   - セレクタは body.store-page にスコープし、通常フォームには影響しない
   =================================================================== */

/* テーマカラー（アンバー系）— 既存フォーム（ティール）・管理サイト（ネイビー）と区別。
   CSS変数を上書きするだけで、ヘッダー・ボタン・見出し等が一括で配色変更される。 */
body.store-page {
  --brand: #d97706;
  --brand-strong: #b5651d;
  --surface-soft: #fdf3e3;
  --bg: #faf6ef;
}

/* スタッフ専用であることを示すヘッダーバッジ */
.store-page .store-badge {
  align-self: center;
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

/* 見出し・本文をやや大きめに */
.store-page .section-heading h2 { font-size: clamp(24px, 3.4vw, 32px); }
.store-page .section-heading .muted { font-size: 16px; }
.store-page .form-section { padding: 26px; }
.store-page .form-section h3,
.store-page .summary-panel h3 { font-size: 22px; }

/* 入力欄・セレクトを大きく、タッチしやすく */
.store-page label { font-size: 16px; }
.store-page input,
.store-page select {
  min-height: 56px;
  font-size: 18px;
  padding: 12px 16px;
  border-radius: 8px;
}
.store-page .field-grid { gap: 18px; }

/* 数量±ボタンを大きく（誤タップ防止のため十分な間隔と当たり判定） */
.store-page .qty-control {
  min-height: 56px;
  gap: 6px;
}
.store-page .qty-control button {
  min-width: 56px;
  min-height: 56px;
  font-size: 26px;
  border-radius: 10px;
}
.store-page .qty-control output {
  min-width: 48px;
  font-size: 22px;
  font-weight: 900;
}

/* 商品カテゴリ配置（タブレット最適化）：
   うなぎは全幅、お刺身・手巻き寿司は横並び2列。
   高さの揃った2種を横に並べることで、旧レイアウトの余白・列の狭さを解消する。 */
.store-page .product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.store-page .product-category { margin-bottom: 0; }
.store-page .product-category[data-category="うなぎ"] {
  grid-column: 1 / -1;
}

/* 商品カード・うなぎ等のセレクトもタブレット用に拡大 */
.store-page .product-category-heading { font-size: 1.15rem; }
.store-page .unagi-style-label { font-size: 1.15rem; min-width: 64px; }
.store-page .unagi-size-select {
  min-height: 56px;
  font-size: 18px;
  max-width: 420px;
}
/* うなぎ全幅時は蒲焼き・白焼きの2行に十分な幅があるため、
   ラベル＋セレクト＋数量を1行に収める（数量が下に折り返さないよう幅を確保） */
.store-page .product-category[data-category="うなぎ"] .unagi-size-select {
  max-width: 460px;
}
.store-page .product-title h4 { font-size: 17px; }
.store-page .product-card .price { font-size: 16px; }

/* 注文内容パネル・合計を見やすく */
.store-page .summary-item { font-size: 16px; }
.store-page .summary-line { font-size: 18px; }
.store-page #totalPrice { font-size: 28px; }

/* 送信ボタンを大きく目立たせる */
.store-page .primary-button {
  min-height: 60px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* タブレット縦（〜980px）で出る固定バーのボタン・文字も大きめに */
@media (max-width: 980px) {
  .store-page .mobile-order-bar { min-height: 84px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .store-page .mobile-order-bar .primary-button { min-height: 60px; font-size: 19px; }
  .store-page #mobileBarTotal { font-size: 1.6rem; }
  .store-page .mobile-order-bar-label { font-size: 0.9rem; }
  body.store-page { padding-bottom: 104px; }
}

/* スマホ縦では商品カテゴリを1列に（横並び2列だと狭くなりすぎるため） */
@media (max-width: 640px) {
  .store-page .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   予約管理サイト：リンク集パネル（#panel-links）
   =================================================================== */
.link-collection {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 12px 28px rgba(23, 32, 38, 0.14);
  outline: none;
}

.link-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 26px;
}

.link-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.link-card-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-strong);
}

.link-card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.link-card-arrow {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 900;
  color: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
  .link-card:hover,
  .link-card:focus-visible {
    transform: none;
  }
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 4px 0;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.qr-card-image {
  width: 120px;
  height: 120px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-card-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--brand-strong);
  margin-top: 4px;
}

.qr-card-desc {
  font-size: 13px !important;
  color: var(--muted) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

.qr-card-url {
  font-size: 12px;
  color: var(--brand);
  word-break: break-all;
  text-decoration: none;
}

.qr-card-url:hover,
.qr-card-url:focus-visible {
  text-decoration: underline;
}

/* ===== 管理画面: 本日のお渡しモード ===== */
.handoff-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.handoff-search {
  flex: 1 1 280px;
  min-width: 200px;
  padding: 14px 16px;
  font-size: 1.05rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.handoff-search:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.handoff-date-label {
  padding: 8px 14px;
  border: 2px solid var(--brand);
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 1rem;
  font-weight: 900;
  color: var(--brand-strong);
}

.handoff-date-label select {
  min-height: 42px;
  padding: 6px 12px;
  font-size: 1.05rem;
  font-weight: 800;
  border: 1px solid var(--brand);
  border-radius: 8px;
  color: var(--brand-strong);
  background: var(--surface);
}

.handoff-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.handoff-toggle-label input {
  width: 20px;
  height: 20px;
}

.handoff-slot-section {
  margin-bottom: 24px;
}

.handoff-slot-date {
  margin: 0 0 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.handoff-slot-title {
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--brand);
  font-size: 1.15rem;
  color: var(--brand-strong);
}

.handoff-slot-count {
  margin-left: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.handoff-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.handoff-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.handoff-card.is-warning {
  border-color: #f9a825;
  background: #fff8e1;
}

.handoff-card.is-done {
  opacity: 0.6;
}

.handoff-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.handoff-order-number {
  font-size: 1.3rem;
  color: var(--brand-strong);
}

.handoff-customer {
  margin: 0;
  font-size: 1.1rem;
}

.handoff-kana {
  margin-left: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.handoff-phone {
  font-size: 0.95rem;
}

.handoff-items {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.handoff-memo {
  margin: 0;
  padding: 8px 10px;
  background: var(--surface-soft);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.handoff-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.handoff-total {
  font-size: 1.2rem;
  color: var(--ink);
}

.handoff-card .handoff-pay-btn {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 0.95rem;
}

.handoff-deliver-btn {
  min-height: 52px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.handoff-deliver-btn:hover:not(:disabled) {
  background: var(--brand-strong);
}

.handoff-deliver-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.handoff-done-note {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}

.handoff-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}

/* ===== 管理画面 UX 改善 ===== */
.admin-toolbar { display: grid; gap: 10px; min-width: min(100%, 720px); }
.toolbar-primary, .toolbar-workflow, .toolbar-state { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.toolbar-primary .admin-search { flex: 1 1 260px; }
.toolbar-more { position: relative; }
.toolbar-more summary { list-style: none; cursor: pointer; padding: 10px 14px; border-radius: 6px; background: var(--brand); color: #fff; font-weight: 600; }
.toolbar-more summary::-webkit-details-marker { display: none; }
.toolbar-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 220px; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(20,30,50,.18); }
.toolbar-more-menu .secondary-button { width: 100%; }
.setting-badge, .sync-status { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 4px 9px; border-radius: 999px; background: #eef0f3; color: #5d6570; font-size: 11px; font-weight: 600; }
.setting-badge.is-on { background: #e8f5e9; color: #26713a; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sync-status.is-fresh { background: #e8f5e9; color: #26713a; }
.sync-status.is-stale { background: #fff4d6; color: #906000; }
.sync-status.is-error { background: #fde8e8; color: #a63d40; }
.sync-status.is-offline { background: #eceff1; color: #59636a; }
.sync-status.is-loading { background: #e5efff; color: #285da8; }
.sync-status.is-loading .sync-dot { animation: pulse 1s infinite; }
.admin-new-count { min-width: 21px; padding: 2px 6px; border-radius: 999px; background: #d64545; color: #fff; font-size: 11px; text-align: center; }
.admin-nav-item .admin-new-count { margin-left: auto; }
.order-row.is-new td, .handoff-card.is-new { animation: newOrderGlow 2s ease-in-out 3; }
.order-row.is-updating, .handoff-card.is-updating { position: relative; opacity: .65; pointer-events: none; }
.order-row.is-updating::after, .handoff-card.is-updating::after { content: "更新中…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.68); color: var(--brand-strong); font-weight: 700; z-index: 4; }
.action-toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 13px 15px; border-radius: 10px; background: #263238; color: #fff; box-shadow: 0 12px 36px rgba(0,0,0,.25); }
.action-toast[hidden] { display: none; }
.action-toast.is-error { background: #8f2f34; }
.action-toast button { min-height: 34px; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; background: #fff; color: #263238; font-weight: 700; cursor: pointer; }
#actionToastClose { background: transparent; color: #fff; border: 0; font-size: 20px; }
.handoff-slot-title.is-soon { padding: 10px 12px; border-radius: 8px; background: #fff3cd; border-bottom-color: #d97706; }
.handoff-soon-label { display: inline-block; margin-right: 8px; padding: 3px 8px; border-radius: 999px; background: #d97706; color: #fff; font-size: 12px; }
.handoff-slot-badge { display: inline-block; margin-right: 8px; padding: 3px 8px; border-radius: 6px; background: var(--surface-soft); color: var(--brand-strong); font-size: 12px; font-weight: 700; }
.handoff-alert, .handoff-unpaid-warning { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fff0db; color: #8a5100; font-weight: 700; font-size: 13px; }
.handoff-phone strong { margin-left: 8px; padding: 3px 7px; border-radius: 5px; background: var(--brand-strong); color: #fff; }
.handoff-item-count { color: var(--muted); font-size: 13px; font-weight: 600; }

@keyframes newOrderGlow { 0%,100% { box-shadow: inherit; } 50% { box-shadow: inset 0 0 0 3px #f5a623, 0 0 16px rgba(245,166,35,.35); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 760px) {
  .admin-toolbar, .toolbar-primary, .toolbar-workflow, .toolbar-state { width: 100%; align-items: stretch; justify-content: stretch; }
  .toolbar-primary, .toolbar-workflow { flex-direction: column; }
  .toolbar-primary > *, .toolbar-workflow > *, .toolbar-more { width: 100%; }
  .toolbar-more-menu { position: static; width: 100%; margin-top: 6px; box-shadow: none; }
  .toolbar-state { justify-content: flex-start; }
  .action-toast { left: 16px; right: 16px; bottom: 16px; flex-wrap: wrap; }
}

/* ===== 顧客台帳 / 予約変更 ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.customer-ledger-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.operations-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.9rem;
}

.operations-notice:empty {
  display: none;
}

.operations-notice.is-warning {
  background: #fff4d6;
  color: #8a5900;
}

.operations-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}

.customer-ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* 電話帳のようにフリガナの行で絞り込むインデックス */
.customer-ledger-body {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.kana-index {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kana-index-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
}

.kana-index-btn:hover:not(:disabled),
.kana-index-btn:focus-visible {
  border-color: var(--brand);
  outline: 0;
}

.kana-index-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.kana-index-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.kana-index-label {
  font-size: 0.95rem;
}

.kana-index-count {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.75;
}

.customer-ledger-toolbar .admin-search {
  width: min(520px, 100%);
}

.customer-ledger-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(20, 40, 60, 0.04);
}

.customer-ledger-card:hover,
.customer-ledger-card:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 105, 122, 0.12);
  outline: 0;
}

.customer-ledger-head,
.customer-ledger-metrics,
.customer-ledger-intake {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-ledger-head strong {
  font-size: 1.1rem;
}

.customer-ledger-phone {
  color: var(--brand-strong);
  font-weight: 700;
}

.customer-ledger-metrics b {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 0.83rem;
}

.customer-note-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #26713a;
  font-size: 0.75rem;
  font-weight: 700;
}

.customer-detail-summary,
.customer-note-form {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.customer-detail-summary p {
  margin: 4px 0;
}

.customer-note-form textarea {
  width: 100%;
  margin: 6px 0 8px;
}

.customer-order-history {
  display: grid;
  gap: 8px;
}

.customer-order-history-row {
  display: grid;
  grid-template-columns: auto auto auto minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customer-detail-intake {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.customer-order-history-row.is-cancelled {
  opacity: 0.6;
}

/* ワークフロー系ダイアログは横に広く。dialog 要素側の幅を広げないと
   .order-detail-dialog の 640px 上限に収まらず横スクロールが発生する */
.workflow-dialog {
  max-width: min(920px, calc(100vw - 24px));
  width: 100%;
}

.workflow-dialog .dialog-inner {
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.customer-order-history-row > * {
  min-width: 0;
}

.customer-order-history-row > span {
  overflow-wrap: anywhere;
}

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

.workflow-form-grid label,
.workflow-checkbox {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.workflow-form-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.workflow-products-fieldset {
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.workflow-products-fieldset legend {
  padding: 0 6px;
  font-weight: 700;
}

.workflow-product-list {
  display: grid;
  gap: 6px;
  max-height: 340px;
  overflow: auto;
}

.workflow-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workflow-product-row span {
  display: grid;
}

.workflow-product-row small {
  color: var(--muted);
}

.workflow-product-row.is-unavailable {
  border-color: #e2a14b;
  background: #fff8e9;
}

.workflow-checkbox {
  display: flex;
  align-items: center;
  grid-template-columns: auto 1fr;
  margin-top: 14px;
}

.detail-actions .muted {
  flex: 1 1 100%;
  font-size: 0.83rem;
}

@media (max-width: 760px) {
  .customer-ledger-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .kana-index {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .kana-index-btn {
    flex-direction: row;
    gap: 4px;
    min-width: 52px;
    justify-content: center;
  }
  .customer-ledger-toolbar {
    display: grid;
    align-items: stretch;
  }
  .customer-ledger-toolbar > *,
  .customer-ledger-toolbar .admin-search {
    width: 100%;
  }
  .customer-order-history-row {
    grid-template-columns: 1fr;
  }
  .workflow-form-grid {
    grid-template-columns: 1fr;
  }
  .workflow-product-row {
    grid-template-columns: minmax(0, 1fr) 72px;
  }
}

/* ===== スマホ表示の最適化（管理画面：共通部分・注文一覧） =====
   375px 幅で確認したところ、次の2点が崩れていたため後段でまとめて上書きする。
   （サイドバーはハンバーガーメニューのドロワーとして別途対応済み）
   1. 検索欄が縦並びのコンテナに入り flex-basis が高さとして効いて260pxになっていた
   2. 注文カードが11項目を全幅で縦積みし、1件あたり約780pxあった              */

@media (max-width: 760px) {
  /* 縦並びコンテナでは flex-basis が高さになるため、検索欄の 260px を打ち消す */
  .toolbar-primary .admin-search {
    flex: 0 0 auto;
  }

  /* 集計カードは1列だと5枚で450px使うので2列にする */
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-card {
    padding: 10px 12px;
  }

  /* 注文カードは短い項目を2列に並べ、長い項目だけ全幅にする */
  .order-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }

  .order-row td {
    grid-column: span 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 8px 12px;
    border-bottom: 0;
    border-top: 1px solid var(--line);
  }

  /* 2列に並ぶ項目は境目が分かるよう左側にも線を引く */
  .order-row td:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .order-row td[data-label="注文番号"],
  .order-row td[data-label="お客様"],
  .order-row td[data-label="商品"],
  .order-row td[data-label="備考"],
  .order-row td[data-label="操作"] {
    grid-column: 1 / -1;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    border-left: 0;
  }

  .order-row td[data-label="注文番号"] {
    border-top: 0;
  }

  /* 苦手なもの・備考が両方空のときは行ごと省く */
  .order-row td.is-empty {
    display: none;
  }

  .order-row td[data-label="操作"] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .order-row td[data-label="操作"]::before {
    content: none;
  }

  .order-row td[data-label="操作"] button {
    flex: 1 1 auto;
    width: auto;
  }
}

@media (max-width: 760px) {
  /* 全幅セルは grid をやめて通常の流し込みにする。
     grid のままだと「商品名」と「3尾」、メールアドレスなどが
     92px のラベル列に落ちて不要に折り返していた。 */
  .order-row td[data-label="お客様"],
  .order-row td[data-label="商品"],
  .order-row td[data-label="備考"] {
    display: block;
  }

  .order-row td[data-label="お客様"]::before,
  .order-row td[data-label="商品"]::before,
  .order-row td[data-label="備考"]::before {
    display: block;
    margin-bottom: 2px;
  }

  /* 名前とフリガナは1行にまとめる。電話・メールは押しやすいよう行のまま残す。 */
  .order-row td[data-label="お客様"] .customer-name,
  .order-row td[data-label="お客様"] .customer-kana {
    display: inline;
    margin: 0;
  }

  .order-row td[data-label="お客様"] .customer-kana {
    margin-left: 8px;
  }

  /* 操作ボタンより上に並ぶ作業ボタンは2列にして、一覧までの距離を縮める */
  .toolbar-workflow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .toolbar-workflow > *,
  .toolbar-workflow .toolbar-more {
    width: auto;
  }
}

@media (max-width: 760px) {
  /* 上の display: block と詳細度が同じで打ち消し合うため、最後に指定し直す。
     苦手なもの・備考が両方空のときは行ごと省く。 */
  .order-row td[data-label].is-empty {
    display: none;
  }
}

/* 受取枠一覧の「過去の受取枠も表示」切り替え。
   一覧本体より目立たないよう、控えめな見た目にする。 */
.past-slots-toggle {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 10px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.past-slots-toggle:hover {
  border-color: var(--brand);
  background: var(--surface-soft);
  color: var(--brand-strong);
}

/* 設定取得失敗時は古い商品を表示せず、復旧導線だけを出す */
.config-error-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(28px, 6vw, 56px) 20px;
  border: 1px solid #e0b6b6;
  border-radius: 12px;
  background: #fff7f7;
  text-align: center;
}

.config-error-state h4 { margin: 0; color: var(--danger); }
.config-error-state .contact-link { font-size: 17px; font-weight: 800; }

/* 注文一覧の当日作業カード */
.today-tasks {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.today-tasks-head,
.today-tasks-empty,
.slot-repair-heading,
.health-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.today-tasks h3,
.slot-repair-section h3,
.health-check-card h3 { margin: 0; }

.today-tasks .eyebrow { margin-bottom: 3px; }

.today-task-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.today-task-card {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.today-task-card:hover,
.today-task-card.is-active {
  border-color: var(--brand);
  background: #eef3ff;
  box-shadow: 0 0 0 2px rgba(57, 78, 148, 0.1);
}

.today-task-card span { display: block; min-height: 34px; color: var(--muted); font-size: 12px; font-weight: 800; }
.today-task-card strong { display: block; margin-top: 7px; font-size: 26px; }
.today-tasks-empty p { margin: 0; }

/* 管理者診断パネル */
.health-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}

.health-summary {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #eef2f6;
  font-weight: 800;
}

.health-summary.is-ok { background: #e7f5ec; color: #1f6b39; }
.health-summary.is-warning { background: #fff4d6; color: #825600; }
.health-summary.is-error { background: #fde8e8; color: var(--danger); }
.health-summary.is-loading { color: var(--muted); }

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

.health-check-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 10px;
  background: #fff;
}

.health-check-card.is-ok { border-left-color: #3c9a5f; }
.health-check-card.is-warning { border-left-color: #d49a13; }
.health-check-card.is-error { border-left-color: #c73b3b; }
.health-check-head span { padding: 3px 8px; border-radius: 999px; background: #eef2f6; font-size: 12px; font-weight: 800; }
.health-check-card > p { margin: 9px 0 0; color: var(--muted); }
.health-details { margin-top: 12px; }
.health-details summary { cursor: pointer; font-weight: 700; }
.health-details p { overflow-wrap: anywhere; }

.slot-repair-section {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #e0b6b6;
  border-radius: 10px;
  background: #fffafa;
}

.slot-repair-heading p { margin: 5px 0 0; }
.slot-repair-diffs { display: grid; gap: 7px; margin-top: 14px; }
.slot-repair-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 7px;
  background: #fff;
}
.slot-repair-row.is-missing { grid-template-columns: minmax(220px, 1fr) 2fr; background: #fff4d6; }

@media (max-width: 1100px) {
  .today-task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .today-task-grid,
  .health-checks { grid-template-columns: 1fr 1fr; }
  .today-tasks-head,
  .today-tasks-empty,
  .slot-repair-heading { align-items: flex-start; flex-direction: column; }
  .slot-repair-heading .danger-button { width: 100%; }
  .slot-repair-row,
  .slot-repair-row.is-missing { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .today-task-grid,
  .health-checks { grid-template-columns: 1fr; }
  .health-toolbar { align-items: stretch; flex-direction: column; }
}


/* ===== 金額・サイズ違いを同時に注文するための行UI（index / store-order 共通） =====
   .unagi-selectors 自体は各ページのインラインstyleで定義済み。ここでは行の追加・削除まわりだけを共通化する。 */
.category-row-label { width: 100%; }
.unagi-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: nowrap; }
/* 焼き方（蒲焼き・白焼き）ごとに、ラベル＋行＋追加ボタンを1グループにまとめる */
.unagi-style-group { display: flex; flex-direction: column; gap: 12px; }
.unagi-style-group .unagi-style-label { width: 100%; }
.category-add-row,
.unagi-add-row {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 16px;
  border: 1px dashed var(--brand);
  border-radius: 8px;
  background: transparent;
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.category-add-row:hover,
.unagi-add-row:hover { background: rgba(0, 0, 0, 0.04); }
.category-remove-row,
.unagi-remove-row {
  flex-shrink: 0;
  width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}
.category-remove-row:hover,
.unagi-remove-row:hover { color: var(--brand); border-color: var(--brand); }
/* 店頭ページは数量ボタンが大きいぶん、セレクトの最大幅を抑えて削除ボタンが折り返さないようにする */
.store-page .unagi-row-actions { gap: 12px; }
.store-page .category-remove-row,
.store-page .unagi-remove-row { width: 56px; min-height: 56px; font-size: 1.125rem; }
.store-page .category-add-row,
.store-page .unagi-add-row { min-height: 56px; font-size: 1.0625rem; }
