:root {
  --bg:        #FFFAF3;
  --surface:   #FFFFFF;
  --border:    #EADFD2;
  --text:      #1F2933;
  --muted:     #667085;
  --accent:    #183B66;
  --accent2:   #183B66;
  --coral:     #F56555;
  --chip-bg:   #F5F0E8;
  --overlay:   rgba(31,41,51,0.5);
  --red:       #183B66;
  --green:     #2d7a55;
  --radius:    16px;
  --header-h: 110px;
  --nav-h:     62px;
  --font:      system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-jp:   'Noto Sans JP', sans-serif;
  --shadow-sm: 0 2px 8px rgba(24,59,102,0.08), 0 0 0 0.5px rgba(24,59,102,0.05);
  --shadow-md: 0 4px 18px rgba(24,59,102,0.14), 0 0 0 0.5px rgba(24,59,102,0.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; overflow: hidden; }

/* ── HEADER ── */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: env(safe-area-inset-top, 0) 0 0;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}
#header > * { width: 100%; max-width: 680px; }
#header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
}
#logo { display: flex; align-items: center; gap: 10px; }
#logo img {
  height: 50px; width: 50px; object-fit: contain;
}
#logo-name { font-size: 17px; font-weight: 600; letter-spacing: -0.4px; line-height: 1.1; }
#logo-name span { font-size: 11px; color: var(--muted); font-weight: 400; display: block; margin-top: 1px; }

#cat-bar {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 12px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
#cat-bar::-webkit-scrollbar { display: none; }

.cat-chip {
  flex-shrink: 0; white-space: nowrap;
  font-size: 12px; font-weight: 500;
  padding: 7px 16px; border-radius: 20px;
  border: 1.5px solid transparent;
  background: var(--chip-bg);
  color: var(--muted); cursor: pointer;
  transition: all .18s cubic-bezier(.4,0,.2,1);
}
.cat-chip:active { transform: scale(0.96); }
.cat-chip.active {
  background: var(--coral); color: #fff;
  border-color: var(--coral);
  box-shadow: 0 3px 10px rgba(245,101,85,0.35);
}

/* ── CONTENT ── */
#content {
  position: fixed; top: var(--header-h);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  left: 50%; right: auto;
  transform: translateX(-50%);
  width: 100%; max-width: 680px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
}

/* ── SECTION HEADER ── */
.section-header { margin: 28px 0 10px; }
.section-header-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.section-icon { font-size: 30px; line-height: 1; }
.section-name {
  font-size: 23px; font-weight: 600; letter-spacing: -0.5px; line-height: 1.1;
}
.section-info-box {
  border-left: 3px solid var(--coral);
  background: rgba(245,101,85,0.05);
  border-radius: 0 10px 10px 0;
  padding: 9px 14px; margin: 8px 0 12px;
}
.section-info-text { font-size: 12px; color: #666; line-height: 1.7; }
.section-info-toggle {
  font-size: 11px; color: var(--coral); margin-top: 6px;
  cursor: pointer; display: inline-block;
  border: none; background: none; padding: 0; font-family: var(--font); font-weight: 600;
}

.section-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .7px;
  margin: 4px 0 10px;
}

/* ── HIGHLIGHT CARD ── */
.highlight-card {
  background: var(--surface); border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px; overflow: hidden;
}
.highlight-photo {
  background: #EDE0D0;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.highlight-photo img { width: 100%; height: auto; object-fit: contain; display: block; }
.highlight-photo .placeholder { color: #ccc; }
.badge-row { position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; }
.badge {
  font-size: 10px; font-weight: 600;
  padding: 4px 9px; border-radius: 20px;
  letter-spacing: .3px;
}
.badge-week { background: var(--coral); color: #fff; }
.badge-new  { background: none; color: var(--coral); padding: 0; font-size: 18px; line-height: 1; vertical-align: middle; }
.badge-sold { background: #aaa; color: #fff; }
.badge-soon { background: #f0a500; color: #fff; }
.highlight-body { padding: 14px 16px; }

/* ── DISH ROW ── */
.dish-row {
  background: var(--surface); border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px; margin-bottom: 10px;
  transition: box-shadow .15s, opacity .2s;
}
.dish-row:active { box-shadow: var(--shadow-md); }
.dish-row.unavailable { opacity: .35; }

.dish-top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; margin-bottom: 4px;
}
.dish-name-wrap {
  display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0;
}
.dish-name {
  font-size: 15px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dish-subtitle-jp { font-size: 12px; color: var(--muted); line-height: 1.3; }
.dish-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.price {
  font-size: 15px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
  color: var(--accent);
}
.dish-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.traits { display: flex; flex-wrap: wrap; gap: 4px; }

.trait-chip {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500;
  padding: 4px 9px; border-radius: 20px;
  background: var(--chip-bg); color: var(--text); white-space: nowrap;
}
.trait-chip i { font-size: 13px; }

.photo-btn {
  flex-shrink: 0; font-size: 11px; font-weight: 500;
  padding: 4px 11px; border-radius: 20px;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; white-space: nowrap;
  font-family: var(--font); transition: all .15s;
}
.photo-btn:hover { border-color: var(--coral); color: var(--coral); }

.allergen-btn {
  flex-shrink: 0; font-size: 11px; font-weight: 500;
  padding: 4px 11px; border-radius: 20px;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; white-space: nowrap;
  font-family: var(--font); transition: all .15s;
}
.allergen-btn:hover { border-color: var(--coral); color: var(--coral); }

/* Variants */
.dish-variants { margin: 8px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.dish-variant {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 5px 11px; border-radius: 20px;
  background: var(--chip-bg); border: 1px solid var(--border);
}
.variant-name { color: var(--muted); }
.variant-price { font-weight: 600; color: var(--accent); }

/* ── SERVICE TOGGLE ── */
.avail-toggle {
  display: none;
  width: 44px; height: 26px; border-radius: 13px;
  background: #ddd; position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .2s; border: none;
}
.avail-toggle.on { background: var(--green); }
.avail-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: left .2s; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.avail-toggle.on::after { left: 21px; }
body[data-role="service"] .avail-toggle,
body[data-role="admin"] .avail-toggle { display: block; }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.88);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 85vh;
  border-radius: 16px; object-fit: contain; display: block;
}

/* ── BOTTOM NAV ── */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; justify-content: center; align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
}
#bottom-nav-inner {
  display: flex; width: 100%; max-width: 680px;
  height: var(--nav-h); align-items: center; padding: 0 16px;
}
.nav-btn {
  -webkit-tap-highlight-color: transparent;
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; cursor: pointer;
  border: none; background: none; color: inherit;
  position: relative; padding: 8px 0; border-radius: 12px;
  transition: background .15s;
}
.nav-btn svg, .nav-btn i { color: #C4B8B0; transition: color .15s; font-size: 17px; }
.nav-btn.active svg, .nav-btn.active i { color: var(--accent); }
.nav-label { font-size: 10px; font-weight: 500; color: #C4B8B0; transition: color .15s; }
.nav-btn.active .nav-label { color: var(--accent); }
.nav-btn.active::before { display: none; }

/* ── OVERLAYS / SHEETS ── */
.overlay-bg {
  position: fixed; inset: 0; z-index: 200;
  background: var(--overlay); display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay-bg.open { opacity: 1; pointer-events: all; }
.sheet {
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 16px 20px 32px; width: 100%;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.32,0,.67,0);
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.12);
}
.overlay-bg.open .sheet {
  transform: translateY(0); transition-timing-function: cubic-bezier(.33,1,.68,1);
}
.sheet-handle {
  width: 40px; height: 4px; background: var(--chip-bg);
  border-radius: 2px; margin: 0 auto 18px;
}
.sheet-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; letter-spacing: -0.3px; }

/* Allergen list */
.allergen-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 0.5px solid var(--border);
}
.allergen-item:last-child { border-bottom: none; }
.allergen-code {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(24,59,102,0.08); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.allergen-name { font-size: 12px; font-weight: 500; }
.ingredients-text {
  font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 8px;
}

/* Filter */
.filter-section { margin-bottom: 20px; }
.filter-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip {
  font-size: 12px; font-weight: 500;
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; transition: all .15s;
}
.filter-chip.selected {
  background: var(--coral); color: #fff; border-color: var(--coral);
  box-shadow: 0 3px 10px rgba(245,101,85,0.3);
}
.filter-reset {
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-align: center; margin-top: 18px; cursor: pointer; padding: 8px;
}
.filter-reset:hover { color: var(--coral); }

/* Settings */
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 0; border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 14px; font-weight: 500; }
.lang-row { display: flex; gap: 6px; }
.lang-opt {
  font-size: 12px; font-weight: 600; padding: 6px 16px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; transition: all .15s; letter-spacing: .3px;
}
.lang-opt.active { background: var(--coral); color: #fff; border-color: var(--coral); }

/* Wizard */
.wizard-step { padding: 10px 0 20px; }
.wizard-q {
  font-size: 18px; font-weight: 600; margin-bottom: 20px;
  line-height: 1.4; letter-spacing: -0.3px;
}
.wizard-opts { display: flex; flex-direction: column; gap: 10px; }
.wizard-opt {
  padding: 15px 18px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 500; cursor: pointer; text-align: left;
  transition: all .15s; font-family: var(--font);
}
.wizard-opt:hover { border-color: var(--accent); background: rgba(24,59,102,0.04); }
.wizard-opt:active { background: var(--chip-bg); transform: scale(0.98); }
.wizard-back { font-size: 13px; color: var(--muted); margin-top: 16px; cursor: pointer; text-align: center; }
.wizard-match-count { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

/* JP font */
.jp * { font-family: var(--font-jp); }

/* empty state */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 14px; }

/* ── Icon Colors ── */
.icon-ramen,.icon-pork,.icon-chicken,.icon-cow,.icon-cow-face { color: #F9695D; }
.icon-fish,.icon-fish-small,.icon-octopus,.icon-shrimp { color: #2F75EA; }
.icon-kunbu,.icon-vegan { color: #73C014; }
.icon-chili { color: #F40707; }
.icon-naruto,.icon-home,.icon-limo,.icon-bottle,.icon-sake,.icon-cup,.icon-chopstick,.icon-spike,.icon-egg,.icon-noodle,.icon-new-label,.icon-teapot,.icon-teapot-style,.icon-cake,.icon-beer,.icon-glass-beer,.icon-whisky { color: #F9695D; }
.icon-cold,.icon-still,.icon-sparkle { color: #14ADDC; }
.icon-warm { color: #F75929; }
.icon-tea,.icon-teacup,.icon-fork,.icon-onigiri { color: #555; }
.icon-greentea { color: #5CB250; }
.icon-blacktea { color: #B26250; }
.icon-rice { color: #E4980B; }
.icon-sakura { color: #F776C1; }
.icon-gluten,.icon-nogluten { color: #D4A800; }
.icon-icecream,.icon-ice { color: #555; }
.icon-bee,.icon-bee2 { color: #E4980B; }
