:root {
  --bg: #f3f4f6;
  --bg-soft: #faf9f6;
  --panel: rgba(255, 255, 255, 0.96);
  --panel2: rgba(255, 255, 255, 0.99);
  --line: rgba(38, 34, 124, 0.10);
  --text: #262842;
  --muted: #5d647b;
  --muted-soft: #8a8fa3;
  --navy: #26227c;
  --navy-soft: #1f3856;
  --gold: #c79a53;
  --shadow: 0 12px 28px rgba(38, 55, 94, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(199,154,83,0.10), transparent 24%),
    linear-gradient(180deg, rgba(38,34,124,0.04), transparent 24%),
    var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
  color-scheme: light;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.72rem 0.82rem;
  border-radius: 12px;
  border: 1px solid rgba(38, 34, 124, 0.10);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
}

textarea {
  resize: vertical;
}

label span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.hidden {
  display: none !important;
}

.settings-hotspot {
  position: fixed;
  inset: 0 0 auto auto;
  width: 90px;
  height: 90px;
  z-index: 60;
}

.screen-shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.7rem;
  padding: 0.5rem;
}

/* =========================
   HEADER
   ========================= */

.brand-header {
  border: 1px solid rgba(38, 34, 124, 0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72));
  min-height: 136px;
  padding: 0.8rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 640px);
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.brand-center {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.brand-logo-wrap {
  width: clamp(92px, 10vw, 132px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 100%;
  max-height: 112px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(31,43,70,0.10));
}

.eyebrow {
  color: #8a8fa3;
  letter-spacing: 0.16rem;
  font-size: clamp(0.78rem, 1vw, 0.98rem);
  text-transform: uppercase;
  margin-bottom: 0.22rem;
  font-weight: 700;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(2.35rem, 4vw, 4rem);
  line-height: 0.94;
  color: #26227c;
  text-transform: uppercase;
}

.brand-copy p {
  margin: 0.3rem 0 0;
  color: #5d647b;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
}

/* =========================
   HOURS
   Desktop = two compact cards
   Mobile = single stacked card
   ========================= */

.header-hours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-self: stretch;
  width: min(560px, 100%);
  justify-self: end;
}

.hours-display-column {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(38,34,124,0.08);
  border-radius: 22px;
  padding: 0.85rem 0.9rem 0.9rem;
  min-width: 0;
  box-shadow: 0 6px 16px rgba(31,43,70,0.04);
}

.hours-display-title {
  margin-bottom: 0.5rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.hours-display-column:nth-child(2) {
  display: block;
}

.hours-display-column:nth-child(2) .hours-display-title {
  visibility: hidden;
}

.hours-display-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.34rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hours-display-row:first-of-type {
  border-top: none;
}

.hours-display-day {
  color: #26227c;
  font-weight: 700;
  font-size: clamp(0.9rem, 0.9vw, 1rem);
  line-height: 1.2;
  white-space: nowrap;
}

.hours-display-time {
  color: #5d647b;
  font-weight: 700;
  font-size: clamp(0.8rem, 0.72vw, 0.92rem);
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
  justify-self: end;
}

/* =========================
   MAIN STAGE
   ========================= */

.section-stage {
  width: 100%;
  min-height: calc(100vh - 190px);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 0.75rem 0.85rem 0.9rem;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}

.display-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

body.hide-section-controls .display-controls {
  display: none;
}

body.hide-section-controls .section-stage {
  grid-template-rows: auto auto 1fr;
  padding-top: 1rem;
}

body.hide-section-controls .section-meta {
  margin-top: 0;
}

body.hide-section-controls .hero-copy {
  margin-bottom: 0.7rem;
}

.display-nav,
.settings-button,
.section-button,
.primary-btn,
.secondary-btn,
.icon-btn {
  border: 1px solid rgba(38,34,124,0.10);
  background: rgba(255, 255, 255, 0.98);
  color: var(--navy);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(31,43,70,0.06);
}

.display-nav {
  width: 48px;
  height: 44px;
  font-size: 1.35rem;
  cursor: pointer;
}

.settings-button {
  padding: 0.72rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.section-buttons {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.section-button {
  padding: 0.66rem 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}

.section-button.active,
.tab-btn.active,
.primary-btn {
  background: linear-gradient(180deg, rgba(123, 29, 28, 0.92), rgba(83, 14, 14, 0.96));
  border-color: rgba(226, 182, 102, 0.5);
}

.section-meta {
  display: flex;
  justify-content: center;
  margin: 0.1rem 0 0;
}

.section-kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16rem;
  font-size: clamp(0.7rem, 0.95vw, 0.84rem);
  font-weight: 800;
}

.hero-copy {
  text-align: center;
  margin-bottom: 0.45rem;
}

.hero-copy h2 {
  margin: 0.08rem 0 0;
  text-transform: uppercase;
  font-size: clamp(2rem, 3.3vw, 3.25rem);
  line-height: 0.96;
  color: var(--navy);
}

.hero-copy p {
  margin: 0.24rem auto 0;
  color: var(--muted);
  max-width: 50rem;
  font-size: clamp(1rem, 1.1vw, 1.15rem);
}

/* =========================
   MENU GRID
   ========================= */

.menu-list {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.menu-list.layout-1 {
  grid-template-columns: 1fr;
  max-width: 60rem;
  margin: 0 auto;
}

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

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

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

.menu-item {
  border-radius: 18px;
  border: 1px solid rgba(38, 34, 124, 0.08);
  background: rgba(255, 255, 255, 0.99);
  padding: 0.82rem 0.82rem 0.74rem;
  display: grid;
  gap: 0.48rem;
  min-height: 112px;
  box-shadow: 0 8px 20px rgba(31, 43, 70, 0.06);
}

.menu-item:nth-child(4n + 1) {
  border-top: 5px solid #3f37c9;
}

.menu-item:nth-child(4n + 2) {
  border-top: 5px solid var(--gold);
}

.menu-item:nth-child(4n + 3) {
  border-top: 5px solid #a2b2c8;
}

.menu-item:nth-child(4n + 4) {
  border-top: 5px solid #9ab593;
}

.menu-item.sold-out {
  opacity: 0.62;
}

.menu-item-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.menu-item-name {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.18;
  color: var(--navy);
}

.menu-item-price {
  color: var(--gold);
  font-weight: 800;
  font-size: 1.02rem;
  background: rgba(199,154,83,0.08);
  border: 1px solid rgba(199,154,83,0.18);
  border-radius: 8px;
  padding: 0.14rem 0.38rem;
  white-space: nowrap;
}

.menu-item-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
  font-size: 0.96rem;
}

.menu-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  font-size: 0.84rem;
}

.menu-pill {
  color: var(--gold);
}

.menu-pill.featured {
  color: var(--navy-soft);
  font-weight: 700;
}

.menu-pill.soldout {
  color: #8e2332;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(226, 182, 102, 0.22);
  border-radius: 18px;
}

/* =========================
   MODALS / SETTINGS
   ========================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 12, 0.72);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 1rem;
}

.modal {
  width: min(1100px, 100%);
  max-height: calc(100svh - 2rem);
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(38, 34, 124, 0.10);
  background: linear-gradient(180deg, rgba(250, 249, 246, 0.99), rgba(255, 255, 255, 0.99));
  box-shadow: 0 26px 60px rgba(31, 43, 70, 0.14);
  padding: 1rem;
}

.editor-modal {
  width: min(760px, 100%);
}

.confirm-modal {
  width: min(520px, 100%);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.8rem;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.45rem;
}

.modal-header p {
  margin: 0.18rem 0 0;
  color: var(--muted);
}

.icon-btn {
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
  cursor: pointer;
}

.settings-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.tab-btn {
  padding: 0.62rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(38, 34, 124, 0.10);
  background: rgba(255, 255, 255, 0.98);
  color: var(--navy);
  cursor: pointer;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

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

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-top: 1.6rem;
}

.checkbox-row input {
  width: auto;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.primary-btn,
.secondary-btn {
  padding: 0.72rem 1rem;
  cursor: pointer;
  font-weight: 700;
}

.hours-editor-grid,
.section-settings-grid,
.item-admin-list {
  display: grid;
  gap: 0.75rem;
}

.section-settings-name {
  display: grid;
  gap: 0.2rem;
}

.section-settings-name small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.hours-editor-row,
.section-settings-row,
.item-admin-row {
  display: grid;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(38,34,124,0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.hours-editor-row {
  grid-template-columns: 140px auto 1fr 1fr;
}

.section-settings-row {
  grid-template-columns:
    minmax(130px, 1fr)
    auto
    minmax(160px, 1.25fr)
    minmax(220px, 1.7fr)
    90px
    90px
    90px
    110px;
}

.items-toolbar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.items-toolbar select {
  flex: 1;
}

.item-admin-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.item-admin-meta h4 {
  margin: 0 0 0.18rem;
}

.item-admin-meta p {
  margin: 0;
  color: var(--muted);
}

.item-admin-actions {
  display: flex;
  gap: 0.5rem;
}

.item-admin-actions button {
  border: 1px solid rgba(38, 34, 124, 0.10);
  background: rgba(255, 255, 255, 0.98);
  color: var(--navy);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.font-scale-small {
  font-size: 0.93rem;
}

.font-scale-large {
  font-size: 1.07rem;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1200px) {
  .brand-header {
    grid-template-columns: 1fr;
  }

  .menu-list.layout-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .brand-center {
    grid-template-columns: 1fr;
  }

  .brand-logo-wrap {
    width: 150px;
  }

  .hours-editor-row,
  .section-settings-row,
  .item-admin-row,
  .form-grid.two,
  .display-controls {
    grid-template-columns: 1fr;
  }

  .header-hours {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hours-display-column:nth-child(2) {
    display: none;
  }

  .hours-display-column:nth-child(2) .hours-display-title {
    visibility: visible;
  }

  .hours-display-row {
    grid-template-columns: minmax(110px, 140px) minmax(0, 1fr);
    gap: 0.7rem;
  }

  .menu-list.layout-4,
  .menu-list.layout-3,
  .menu-list.layout-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .menu-list.layout-4,
  .menu-list.layout-3,
  .menu-list.layout-2 {
    grid-template-columns: 1fr;
  }

  .section-stage {
    min-height: auto;
  }

  .screen-shell {
    padding: 0.35rem;
  }

  .brand-header {
    padding: 0.7rem 0.75rem;
    gap: 0.8rem;
  }

  .brand-logo-wrap {
    width: 120px;
  }

  .brand-copy h1 {
    font-size: clamp(1.9rem, 10vw, 2.8rem);
  }

  .brand-copy p {
    font-size: clamp(0.95rem, 4.8vw, 1.15rem);
  }

  .display-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .section-buttons {
    order: 1;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    overflow: visible;
    padding-bottom: 0;
  }

  .section-button {
    width: 100%;
    text-align: center;
    padding: 0.78rem 0.7rem;
    white-space: normal;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .display-nav {
    width: 100%;
    height: 52px;
  }

  #navLeft {
    order: 2;
  }

  #navRight {
    order: 3;
  }

  .section-stage {
    padding: 0.75rem 0.7rem 0.9rem;
  }

  .hero-copy {
    margin-bottom: 0.65rem;
  }

  .hero-copy h2 {
    font-size: clamp(2rem, 11vw, 2.7rem);
  }

  .hero-copy p {
    font-size: clamp(1rem, 5vw, 1.1rem);
  }

  .hours-display-column {
    padding: 0.8rem 0.85rem 0.9rem;
  }

  .hours-display-row {
    grid-template-columns: minmax(96px, 120px) minmax(0, 1fr);
    gap: 0.55rem;
  }

  .hours-display-day,
  .hours-display-time {
    font-size: 0.95rem;
  }
}

.support-note{margin-top:.85rem;padding:.85rem 1rem;border:1px solid rgba(199,154,83,.16);border-radius:16px;background:rgba(255,255,255,.82);color:var(--muted);line-height:1.45}.pin-error{color:#8e2332;font-weight:700}.pin-form{margin:0}

.modal-header h3,
.item-admin-meta h4 {
  color: var(--navy);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.98);
}

.primary-btn,
.section-button.active,
.tab-btn.active {
  color: #fff8ef;
  box-shadow: 0 8px 18px rgba(123, 29, 28, 0.16);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-soft);
}

select,
input,
textarea {
  -webkit-text-fill-color: var(--text);
}
