﻿:root {
  --bg: #f6f0e8;
  --bg-soft: #fbf8f3;
  --card: rgba(255, 252, 247, 0.78);
  --card-strong: rgba(255, 252, 247, 0.92);
  --line: rgba(92, 71, 41, 0.1);
  --text: #2f2317;
  --muted: #75624b;
  --accent: #1d7d6a;
  --accent-soft: #d8f1ea;
  --accent-strong: #125b4d;
  --danger: #c25c55;
  --shadow: 0 24px 70px rgba(108, 82, 46, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-display: "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
  --font-text: "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(246, 201, 164, 0.62), transparent 34%),
    radial-gradient(circle at bottom right, rgba(190, 230, 220, 0.72), transparent 28%),
    linear-gradient(180deg, #f9f4ee 0%, #f1ece4 100%);
  color: var(--text);
  font-family: var(--font-text);
}

button,
input,
textarea {
  font: inherit;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.ambient {
  position: fixed;
  inset: auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.65;
  pointer-events: none;
}

.ambient-left {
  top: -60px;
  left: -70px;
  background: rgba(243, 177, 122, 0.35);
}

.ambient-right {
  right: -60px;
  bottom: 120px;
  background: rgba(112, 188, 170, 0.26);
}

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

.glass {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.eyebrow,
.section-kicker,
.board-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-copy h1,
.panel-header h2,
.setup-card h2 {
  margin: 10px 0 10px;
  font-family: var(--font-display);
  line-height: 1.05;
}

.hero-copy h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.hero-copy p,
.setup-card p {
  margin: 0;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
}

.hero-meta {
  display: grid;
  gap: 12px;
  align-content: start;
}

.sync-pill,
.meta-box,
.count-pill,
.helper-text {
  color: var(--muted);
}

.sync-pill,
.count-pill {
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card-strong);
  border: 1px solid rgba(29, 125, 106, 0.12);
}

.sync-pill.online {
  color: var(--accent-strong);
  background: rgba(216, 241, 234, 0.95);
}

.sync-pill.offline {
  color: var(--danger);
  background: rgba(242, 222, 220, 0.95);
}

.meta-box,
.setup-card {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--card-strong);
  border: 1px solid var(--line);
}

.setup-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.setup-card.hidden {
  display: none;
}

.meta-box strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 20px;
}

.view-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(560px, 100%);
  margin: 18px 0 22px;
  padding: 8px;
  border-radius: 999px;
}

.switch-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 180ms ease;
}

.switch-button.active {
  background: var(--card-strong);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(114, 84, 49, 0.12);
}

.view-panel {
  display: none;
  animation: panel-enter 240ms ease;
}

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

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.panel-header h2,
.setup-card h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.helper-text {
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 18px;
}

.order-form {
  gap: 14px;
}

.dish-scroll {
  max-height: min(54vh, 500px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dish-scroll::-webkit-scrollbar {
  width: 8px;
}

.dish-scroll::-webkit-scrollbar-thumb {
  background: rgba(117, 98, 75, 0.28);
  border-radius: 999px;
}

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

.dish-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 170px;
  padding: 22px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dish-card:hover {
  transform: translateY(-2px);
}

.dish-card.selected {
  border-color: rgba(29, 125, 106, 0.34);
  box-shadow: 0 26px 60px rgba(29, 125, 106, 0.16);
}

.dish-card.selected .dish-glow {
  opacity: 1;
}

.dish-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dish-glow {
  position: absolute;
  inset: auto -20px -50px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 213, 192, 0.42), transparent 66%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.dish-tag {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 12px;
}

.dish-name {
  position: relative;
  z-index: 1;
  font-size: 28px;
  font-family: var(--font-display);
  line-height: 1.15;
}

.dish-hint {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 14px;
}

.note-card,
.inline-form,
.menu-item,
.board-card {
  border-radius: var(--radius-lg);
}

.note-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.note-card span {
  font-size: 14px;
  color: var(--muted);
}

textarea,
.inline-form input,
.menu-name-input {
  width: 100%;
  border: 1px solid rgba(118, 95, 69, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

textarea:focus,
.inline-form input:focus,
.menu-name-input:focus {
  border-color: rgba(29, 125, 106, 0.34);
  box-shadow: 0 0 0 4px rgba(29, 125, 106, 0.12);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
}

.menu-scroll {
  max-height: min(50vh, 480px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.menu-scroll::-webkit-scrollbar {
  width: 8px;
}

.menu-scroll::-webkit-scrollbar-thumb {
  background: rgba(117, 98, 75, 0.28);
  border-radius: 999px;
}

.menu-add-form {
  padding: 12px;
  gap: 10px;
}

.menu-list {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.menu-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  padding: 14px 22px;
  background: linear-gradient(135deg, #1d7d6a 0%, #0f6555 100%);
  color: #fdfcf8;
  box-shadow: 0 18px 36px rgba(19, 99, 84, 0.22);
}

.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  border: 1px solid rgba(118, 95, 69, 0.12);
}

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

.compact {
  padding: 11px 16px;
  border-radius: 14px;
}

.board-card {
  padding: 24px;
}

.board-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.board-time {
  font-size: 14px;
  color: var(--muted);
}

.board-dishes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 20px;
  min-height: 72px;
}

.board-dishes.empty {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
}

.board-chip {
  display: inline-flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(29, 125, 106, 0.12);
  box-shadow: 0 14px 26px rgba(111, 83, 50, 0.08);
  font-size: 16px;
}

.board-note-wrap {
  display: grid;
  gap: 10px;
}

.board-note {
  margin: 0;
  padding: 18px;
  min-height: 84px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  line-height: 1.7;
}

.footer-note {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

@media (max-width: 860px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 14px, 100%);
    padding-top: 10px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .ambient {
    display: none;
  }

  .hero-card,
  .board-card,
  .setup-card {
    padding: 14px;
    border-radius: 20px;
  }

  .hero-card {
    gap: 10px;
  }

  .hero-copy .eyebrow {
    display: none;
  }

  .hero-copy h1 {
    margin: 0;
    font-size: 26px;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sync-pill {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 7px 12px;
    font-size: 12px;
  }

  .meta-box {
    padding: 10px 12px;
    border-radius: 16px;
  }

  .meta-box strong {
    margin-top: 4px;
    font-size: 14px;
  }

  .view-switch {
    width: 100%;
    margin: 10px 0 14px;
    padding: 6px;
    position: sticky;
    top: 6px;
    z-index: 5;
  }

  .switch-button {
    padding: 10px 8px;
    font-size: 13px;
  }

  .panel-header,
  .board-topline,
  .menu-item {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .panel-header {
    margin-bottom: 10px;
    gap: 8px;
  }

  .panel-header h2 {
    margin: 2px 0 0;
    font-size: 22px;
  }

  .count-pill {
    padding: 6px 10px;
    font-size: 12px;
  }

  .stack {
    gap: 10px;
  }

  .dish-scroll {
    max-height: 46vh;
    padding: 6px;
  }

  .dish-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .dish-card {
    min-height: 88px;
    padding: 10px;
    gap: 6px;
    border-radius: 16px;
  }

  .dish-name {
    font-size: 17px;
    line-height: 1.15;
  }

  .dish-tag {
    padding: 4px 8px;
    font-size: 10px;
  }

  .dish-hint {
    display: none;
  }

  .dish-glow {
    width: 84px;
    height: 84px;
    inset: auto -10px -20px auto;
  }

  .note-card {
    padding: 8px 10px;
    gap: 4px;
  }

  .note-card span {
    font-size: 12px;
  }

  textarea {
    min-height: 42px;
    padding: 8px 10px;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .menu-add-form {
    padding: 10px;
    gap: 8px;
  }

  .menu-scroll {
    max-height: 44vh;
    padding: 6px;
  }

  .menu-list {
    gap: 8px;
  }

  .menu-item {
    padding: 8px;
    gap: 8px;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    width: 100%;
    justify-content: center;
  }

  .primary-button,
  .secondary-button {
    padding: 12px 14px;
  }

  .order-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .menu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: 24px;
  }

  .dish-scroll {
    max-height: 42vh;
    padding: 4px;
  }

  .menu-scroll {
    max-height: 40vh;
    padding: 4px;
  }

  .dish-grid {
    gap: 6px;
  }

  .dish-card {
    min-height: 80px;
    padding: 9px;
  }

  .dish-name {
    font-size: 15px;
  }

  .board-card {
    padding: 14px;
  }
}




