/* ═══════════════════════════════════════════════
   Kimbap Shop — style.css
   Korean cute aesthetic, mobile-first
   ═══════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:      #e85d4a;
  --red-dark: #c4442f;
  --red-soft: #fdecea;
  --green:    #3d9e6e;
  --green-dk: #2d7a56;
  --green-lt: #e8f6ef;
  --cream:    #fff9f0;
  --cream2:   #fdf3e4;
  --brown:    #5c3d2e;
  --gray:     #7a7a7a;
  --gray-lt:  #f4f4f4;
  --white:    #ffffff;
  --shadow:   0 4px 16px rgba(0,0,0,0.10);
  --shadow-sm:0 2px 8px rgba(0,0,0,0.07);
  --radius:   18px;
  --radius-sm:10px;
  --font: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

html {
  height: 100%;
  height: -webkit-fill-available;
}

body {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  background: var(--cream);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Splash Screen ── */
#start-screen {
  position: fixed; inset: 0; z-index: 9000;
  background: linear-gradient(160deg, #fff5ee 0%, #ffe8d6 50%, #ffd6c4 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#start-screen.hidden {
  opacity: 0; pointer-events: none; transform: scale(1.04);
}
.splash-inner {
  text-align: center;
  animation: splashPop 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes splashPop {
  from { opacity:0; transform: scale(0.8) translateY(20px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.splash-emoji {
  font-size: 96px; line-height: 1;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
  display: block;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.splash-title {
  font-size: 38px; font-weight: 900; color: var(--red);
  letter-spacing: -1px; margin-bottom: 8px;
}
.splash-sub {
  font-size: 16px; color: var(--gray); margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.splash-deco {
  font-size: 28px; display: flex; gap: 12px; justify-content: center;
  animation: wiggle 2s ease-in-out infinite alternate;
}
@keyframes wiggle {
  0%   { transform: rotate(-3deg); }
  100% { transform: rotate(3deg); }
}

/* ── Game Shell ── */
#game {
  display: flex; flex-direction: column;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  height: -webkit-fill-available;
  width: 100%;
  overflow: hidden;
}

/* ── Top Bar ── */
.top-bar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  padding-top: max(8px, env(safe-area-inset-top, 8px));
  background: var(--white);
  border-bottom: 2px solid #f0e8df;
  min-height: 52px;
  z-index: 100;
}
.top-left-group { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--gray-lt); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--brown); transition: background 0.15s;
}
.icon-btn:active { background: #e0dbd4; }
.top-center { text-align: center; flex: 1; }
.top-center strong {
  display: block; font-size: 15px; font-weight: 900; color: var(--brown);
}
.top-center span {
  font-size: 11px; color: var(--gray); font-weight: 400;
}
.money-display {
  font-size: 15px; font-weight: 900; color: var(--red);
  background: var(--red-soft); padding: 6px 10px; border-radius: 20px;
  min-width: 72px; text-align: right;
}

/* ── Screen section (scrollable) ── */
#screen {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ── Bottom Area ── */
.bottom-area {
  flex-shrink: 0;
  padding: 10px 14px;
  padding-bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  background: var(--white);
  border-top: 2px solid #f0e8df;
  z-index: 100;
}
.main-btn {
  width: 100%; padding: 15px 0;
  background: linear-gradient(135deg, var(--red) 0%, #f07060 100%);
  color: #fff; font-size: 17px; font-weight: 900;
  border: none; border-radius: var(--radius); cursor: pointer;
  box-shadow: 0 4px 12px rgba(232,93,74,0.35);
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: -0.3px;
}
.main-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(232,93,74,0.25);
}
.main-btn:disabled {
  background: #c8c0b8; box-shadow: none; cursor: not-allowed;
}
.main-btn.ready-to-serve {
  background: linear-gradient(135deg, var(--green) 0%, #4fc48a 100%);
  box-shadow: 0 4px 12px rgba(61,158,110,0.35);
  animation: servePulse 1.2s ease-in-out infinite;
}
@keyframes servePulse {
  0%,100%{ transform: scale(1); }
  50%{ transform: scale(1.02); }
}

/* ─────────────────────────────────────────
   HOME SCREEN
───────────────────────────────────────── */
.home-screen {
  padding: 20px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.home-emoji-anim {
  font-size: 88px; line-height: 1;
  animation: float 3s ease-in-out infinite;
}
.home-title {
  font-size: 26px; font-weight: 900; color: var(--red);
  letter-spacing: -0.5px;
}
.home-stats {
  display: flex; gap: 10px; width: 100%;
}
.home-stat {
  flex: 1; background: var(--white); border-radius: var(--radius-sm);
  padding: 14px 10px; text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid #f0e8df;
}
.home-stat-value { font-size: 17px; font-weight: 900; color: var(--brown); }
.home-stat-label { font-size: 11px; color: var(--gray); margin-top: 2px; }
.home-welcome {
  width: 100%; background: var(--green-lt);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-size: 13px; color: var(--green-dk); line-height: 1.5;
  border: 1.5px solid #b8e6d0;
}

/* ─────────────────────────────────────────
   PREP SCREEN
───────────────────────────────────────── */
.prep-screen { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.prep-delivery-panel {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--white); border-radius: var(--radius-sm);
  padding: 12px; box-shadow: var(--shadow-sm);
  border: 1.5px solid #f0e8df;
}
.delivery-portrait {
  font-size: 42px; line-height: 1; flex-shrink: 0;
  animation: float 4s ease-in-out infinite;
}
.prep-bubble { flex: 1; }
.prep-bubble-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.prep-bubble-top span { font-size: 12px; font-weight: 700; color: var(--gray); }
.prep-bubble p { font-size: 13px; color: var(--brown); line-height: 1.5; }

.prep-station { display: flex; flex-direction: column; gap: 10px; }
.prep-section {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 12px; box-shadow: var(--shadow-sm);
  border: 1.5px solid #f0e8df;
}
.prep-section-label {
  font-size: 12px; font-weight: 700; color: var(--gray);
  margin-bottom: 8px; letter-spacing: 0.3px;
}
.prep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

/* Prep cards */
.prep-card {
  background: var(--cream2); border-radius: 12px;
  border: 2px solid #e8e0d8; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; position: relative; transition: all 0.12s;
  min-height: 80px;
}
.prep-card:active { transform: scale(0.95); }
.prep-card.prep-locked { background: #f0ece8; opacity: 0.75; }
.prep-card.prep-empty { opacity: 0.6; }
.prep-card-emoji { font-size: 32px; line-height: 1; }
.prep-card-label { font-size: 10px; font-weight: 700; color: var(--brown); text-align: center; }
.prep-card-price {
  font-size: 9px; font-weight: 700; color: var(--red);
  background: var(--red-soft); padding: 2px 5px; border-radius: 6px;
}
.prep-card-stock {
  position: absolute; top: 4px; right: 4px;
  font-size: 10px; font-weight: 900; color: var(--white);
  background: var(--green); padding: 1px 5px; border-radius: 6px;
}
.prep-card-stock.stock-low { background: #e88c2a; }
.prep-card-lock {
  position: absolute; bottom: 4px; right: 4px; font-size: 12px;
}
.prep-card-sold {
  position: absolute; inset: 0; background: rgba(255,255,255,0.75);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: var(--red);
}

/* Upgrade cards */
.prep-upgrade-card { background: #f0f8f4; border-color: #b8e6d0; }
.prep-upgrade-card.upgrade-owned { background: #e8f6ef; border-color: var(--green); }
.upgrade-status-badge {
  font-size: 9px; font-weight: 900; color: var(--green);
  background: #c8f0dc; padding: 2px 5px; border-radius: 6px;
}

/* Menu FAB */
.menu-fab {
  position: absolute; top: 8px; right: 8px; z-index: 50;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); border: 2px solid #f0e8df;
  box-shadow: var(--shadow-sm);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s;
}
.menu-fab:active { transform: scale(0.92); }

/* ─────────────────────────────────────────
   MAKING SCREEN
───────────────────────────────────────── */
.making-screen { display: flex; flex-direction: column; gap: 0; }

/* Customer panel */
.customer-panel {
  background: var(--white); padding: 10px 12px;
  border-bottom: 1.5px solid #f0e8df;
  display: flex; gap: 10px; align-items: flex-start;
  position: relative;
}
.customer-portrait { font-size: 44px; line-height: 1; flex-shrink: 0; }
.customer-bubble { flex: 1; }
.customer-bubble-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.customer-name { font-size: 12px; font-weight: 700; color: var(--gray); }
.customer-order {
  font-size: 14px; font-weight: 700; color: var(--brown); line-height: 1.4;
}
.customer-note {
  font-size: 12px; color: var(--gray); margin-top: 4px;
  font-style: italic;
}
#customer-reaction {
  font-size: 12px; color: var(--red); margin-top: 6px;
  font-weight: 600; min-height: 16px;
}

/* Timer bar */
.timer-wrap {
  height: 6px; background: #f0e8df;
}
.timer-bar {
  height: 100%; border-radius: 0 3px 3px 0;
  transition: width 1s linear, background-color 0.5s;
}
.timer-bar.green  { background: linear-gradient(90deg, #4fc48a, #3d9e6e); }
.timer-bar.yellow { background: linear-gradient(90deg, #f0b429, #e88c2a); }
.timer-bar.red    { background: linear-gradient(90deg, #e85d4a, #c4442f); animation: timerPulse 0.5s ease-in-out infinite; }
@keyframes timerPulse { 0%,100%{ opacity:1 } 50%{ opacity:0.6 } }

/* Queue */
.patience-queue {
  background: var(--cream2); padding: 6px 12px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1.5px solid #f0e8df; flex-wrap: wrap; min-height: 38px;
}
.queue-label { font-size: 11px; font-weight: 700; color: var(--gray); flex-shrink: 0; }
.queue-empty { font-size: 11px; color: var(--gray); }
.queue-ticket {
  display: flex; align-items: center; gap: 4px;
  background: var(--white); border-radius: 8px;
  padding: 3px 8px; font-size: 12px; font-weight: 700;
  border: 2px solid #f0e8df; cursor: pointer; transition: all 0.12s;
}
.queue-ticket.active { border-color: var(--red); color: var(--red); }
.queue-ticket:active { transform: scale(0.95); }
.queue-ticket-timer {
  font-size: 10px; font-weight: 600;
  color: var(--gray);
}
.queue-ticket-timer.warn { color: #e88c2a; }
.queue-ticket-timer.danger { color: var(--red); }

/* Kimbap workspace */
.kimbap-workspace {
  padding: 10px 12px;
  background: #faf5ee;
  border-bottom: 1.5px solid #f0e8df;
  display: flex; flex-direction: column; gap: 8px;
}

/* Kimbap visual */
.kimbap-visual {
  background: var(--white); border-radius: 14px;
  border: 2px solid #f0e8df; padding: 10px;
  min-height: 90px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.kimbap-mat {
  width: 56px; height: 68px; flex-shrink: 0;
  background: repeating-linear-gradient(
    45deg, #d4a848 0, #d4a848 2px, #e8c870 2px, #e8c870 10px
  );
  border-radius: 6px; border: 2px solid #b88a2a;
  position: relative; overflow: hidden;
}
.kimbap-mat-inner {
  position: absolute; inset: 4px;
  background: #2d2d2d; border-radius: 3px;
  transition: all 0.3s;
}
.kimbap-mat-inner.has-rice {
  background: linear-gradient(180deg, #e8e0d0 0%, #d8cfbe 100%);
}
.kimbap-mat-inner.has-fillings {
  background: linear-gradient(180deg, #e8e0d0 0%, #d8cfbe 60%, #8bc080 80%, #e88080 90%, #f0c060 100%);
}
.kimbap-mat-inner.rolled {
  background: linear-gradient(90deg, #2d2d2d 0%, #3a3a3a 15%, #e8e0d0 16%, #d8cfbe 60%, #2d2d2d 100%);
  border-radius: 6px;
}

.kimbap-info { flex: 1; }
.kimbap-recipe-name { font-size: 14px; font-weight: 900; color: var(--brown); }
.kimbap-step-hint {
  font-size: 12px; color: var(--green-dk); margin-top: 4px;
  font-weight: 600; line-height: 1.4;
}
.kimbap-fillings-preview {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
}
.kimbap-filling-dot {
  font-size: 16px; line-height: 1;
  background: var(--cream2); border-radius: 50%; padding: 2px;
}

/* Builder station */
.kimbap-builder-station {
  padding: 8px 12px 10px;
  background: var(--white);
  border-bottom: 1.5px solid #f0e8df;
}
.builder-section-label {
  font-size: 11px; font-weight: 700; color: var(--gray);
  margin-bottom: 6px; letter-spacing: 0.3px;
}
.builder-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.builder-btn {
  background: var(--cream2); border-radius: 12px;
  border: 2.5px solid #e8e0d8; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; transition: all 0.1s; min-height: 68px;
  position: relative;
}
.builder-btn:active { transform: scale(0.93); }
.builder-btn.selected, .builder-btn.active-choice {
  border-color: var(--green); background: var(--green-lt);
}
.builder-btn.correct { border-color: #4fc48a; background: #e0f7ec; }
.builder-btn.wrong { border-color: var(--red); background: var(--red-soft); }
.builder-btn.locked { opacity: 0.5; cursor: not-allowed; }
.builder-btn.out-of-stock {
  opacity: 0.55;
  border-color: #e57373;
  background: #fff0f0;
}
.builder-btn.next-step-hint {
  border-color: #ff7043;
  box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.25);
  animation: pulseHint 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
@keyframes pulseHint {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}
.builder-btn-emoji { font-size: 28px; line-height: 1; }
.builder-btn-label { font-size: 10px; font-weight: 700; color: var(--brown); text-align: center; }
.builder-btn-stock {
  font-size: 8px; font-weight: 800;
  color: #555; background: #f0e8df;
  padding: 1px 4px; border-radius: 4px;
}
.builder-btn-stock.empty {
  color: #fff; background: var(--red);
  font-weight: 900;
}
.builder-btn-check {
  position: absolute; top: -5px; right: -5px;
  font-size: 14px; line-height: 1;
}

/* Feedback row */
.drink-feedback {
  font-size: 12px; color: var(--gray); text-align: center;
  padding: 6px 0 0;
}
.drink-feedback.correct { color: var(--green); font-weight: 700; }
.drink-feedback.wrong { color: var(--red); font-weight: 700; }

/* Tutorial banner */
.tutorial-banner {
  background: linear-gradient(135deg, #fffae8 0%, #fff3cc 100%);
  border: 1.5px solid #f0d060; border-radius: 10px;
  padding: 8px 10px; margin: 8px 12px 0;
}
.tutorial-badge {
  font-size: 10px; font-weight: 900; color: #b08000;
  display: block; margin-bottom: 3px; letter-spacing: 0.3px;
}
.tutorial-banner p {
  font-size: 12px; color: #6a5000; line-height: 1.5;
}

/* ─────────────────────────────────────────
   WAITING SCREEN
───────────────────────────────────────── */
.waiting-panel { background: var(--cream2); }
.waiting-portrait { color: var(--gray); }
.wait-countdown {
  font-size: 12px; color: var(--gray); display: block; margin-top: 4px;
}

/* ─────────────────────────────────────────
   SUMMARY SCREEN
───────────────────────────────────────── */
.summary-screen {
  padding: 16px 12px; display: flex; flex-direction: column; gap: 12px;
}
.summary-title {
  font-size: 22px; font-weight: 900; color: var(--red);
  text-align: center; letter-spacing: -0.5px;
}
.summary-emoji { font-size: 48px; text-align: center; display: block; }
.summary-card {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 14px; box-shadow: var(--shadow-sm);
  border: 1.5px solid #f0e8df;
}
.summary-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
}
.summary-row + .summary-row { border-top: 1px solid #f4f0ea; }
.summary-row-label { font-size: 13px; color: var(--gray); }
.summary-row-value { font-size: 14px; font-weight: 700; color: var(--brown); }
.summary-row-value.positive { color: var(--green); }
.summary-row-value.negative { color: var(--red); }
.summary-total {
  border-top: 2px solid #f0e8df; margin-top: 4px; padding-top: 8px;
}
.summary-total .summary-row-label { font-weight: 700; color: var(--brown); }
.summary-total .summary-row-value { font-size: 17px; }
.summary-stars {
  font-size: 22px; text-align: center;
  background: linear-gradient(135deg, #fffae8, #fff3cc);
  border-radius: 12px; padding: 10px;
  border: 1.5px solid #f0d060;
}
.summary-stars p { font-size: 13px; color: #8a6800; margin-top: 4px; }
.summary-combo { font-size: 12px; color: var(--green); font-weight: 700; }

/* ─────────────────────────────────────────
   MENU MODAL
───────────────────────────────────────── */
.menu-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end;
  transition: opacity 0.2s;
}
.menu-modal.hidden { opacity:0; pointer-events:none; }
.menu-modal-inner {
  background: var(--white); border-radius: 22px 22px 0 0;
  width: 100%; max-height: 75vh; overflow-y: auto;
  padding: 16px;
  animation: slideUp 0.25s cubic-bezier(0.34,1.4,0.64,1) both;
}
@keyframes slideUp {
  from{ transform: translateY(100%); }
  to{ transform: translateY(0); }
}
.menu-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.menu-modal-header h2 { font-size: 18px; font-weight: 900; color: var(--brown); }
.close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gray-lt); border: none; cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  color: var(--gray);
}
.close-btn:active { background: #e0dbd4; }

.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid #f4f0ea;
}
.menu-item:last-child { border-bottom: none; }
.menu-item-emoji { font-size: 28px; flex-shrink: 0; }
.menu-item-info { flex: 1; }
.menu-item-name { font-size: 13px; font-weight: 700; color: var(--brown); }
.menu-item-fillings { font-size: 11px; color: var(--gray); margin-top: 2px; }
.menu-item-price { font-size: 13px; font-weight: 900; color: var(--red); }
.menu-item-locked {
  font-size: 10px; color: var(--gray); background: var(--gray-lt);
  padding: 2px 6px; border-radius: 6px;
}

/* ─────────────────────────────────────────
   POPUP
───────────────────────────────────────── */
.popup-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.popup-overlay.hidden { display: none; }
.popup-box {
  background: var(--white); border-radius: var(--radius);
  padding: 24px 20px; width: 100%; max-width: 360px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  animation: popupIn 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes popupIn {
  from{ opacity:0; transform: scale(0.88); }
  to{ opacity:1; transform: scale(1); }
}
.popup-icon { font-size: 44px; text-align: center; margin-bottom: 10px; }
.popup-title { font-size: 18px; font-weight: 900; color: var(--brown); text-align: center; margin-bottom: 8px; }
.popup-message { font-size: 13px; color: var(--gray); text-align: center; line-height: 1.6; margin-bottom: 18px; white-space: pre-wrap; }
.popup-btns { display: flex; flex-direction: column; gap: 8px; }
.popup-btn {
  width: 100%; padding: 13px;
  border-radius: 12px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  transition: transform 0.1s;
}
.popup-btn:active { transform: scale(0.97); }
.popup-confirm {
  background: linear-gradient(135deg, var(--red), #f07060);
  color: white;
}
.popup-confirm.green { background: linear-gradient(135deg, var(--green), #4fc48a); }
.popup-cancel { background: var(--gray-lt); color: var(--brown); }
.popup-cancel.hidden { display: none; }
.popup-confirm.danger { background: #c4442f; }

/* ─────────────────────────────────────────
   SETTINGS PANEL
───────────────────────────────────────── */
.settings-panel {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
}
.settings-panel.hidden { display: none; }
.settings-inner {
  background: var(--white); border-radius: 22px 22px 0 0;
  width: 100%; padding: 16px;
  animation: slideUp 0.25s ease both;
}
.settings-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.settings-header h2 { font-size: 18px; font-weight: 900; color: var(--brown); }
.settings-section { margin-bottom: 14px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
}
.settings-row span { font-size: 14px; font-weight: 600; color: var(--brown); }
.settings-label { font-size: 13px; font-weight: 700; color: var(--gray); margin-bottom: 8px; }
.lang-picker { display: flex; gap: 8px; }
.lang-btn {
  flex: 1; padding: 8px 4px; border-radius: 10px;
  border: 2px solid #e8e0d8; background: var(--cream2);
  font-size: 12px; font-weight: 700; color: var(--brown); cursor: pointer;
  font-family: var(--font); transition: all 0.12s;
}
.lang-btn.active { border-color: var(--green); background: var(--green-lt); color: var(--green-dk); }
.lang-btn:active { transform: scale(0.95); }

/* Chef name editor */
.name-editor-row {
  display: flex; gap: 8px; margin-top: 6px;
}
.name-input {
  flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid #e0d8cf; background: #fff;
  font-size: 14px; font-weight: 700; color: var(--brown);
  outline: none; font-family: inherit;
  transition: border-color 0.15s;
}
.name-input:focus { border-color: var(--red); }
.name-random-btn {
  width: 44px; height: 42px; border-radius: var(--radius-sm);
  background: var(--cream2); border: 1.5px solid #e0d8cf;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s;
}
.name-random-btn:active { transform: scale(0.92); }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 26px;
  background: #ccc; cursor: pointer; transition: 0.2s;
}
.toggle-slider::before {
  content: ""; position: absolute;
  width: 20px; height: 20px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider { background: var(--green); }
input:checked + .toggle-slider::before { transform: translateX(20px); }

.settings-actions { display: flex; flex-direction: column; gap: 8px; }
.settings-action-btn {
  width: 100%; padding: 11px;
  border-radius: 10px; border: 1.5px solid #e8e0d8;
  background: var(--cream2); cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--brown);
  font-family: var(--font); text-align: left;
  transition: background 0.12s;
}
.settings-action-btn:active { background: #f0e8df; }
.settings-action-btn.danger { color: var(--red); border-color: #fdecea; background: var(--red-soft); }
.settings-footer { margin-top: 12px; }
.settings-continue { background: var(--green) !important; }

/* ─────────────────────────────────────────
   TOAST NOTIFICATIONS
───────────────────────────────────────── */
.toast-container {
  position: fixed; top: 60px; left: 0; right: 0; z-index: 5000;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 0 12px; pointer-events: none;
}
.toast {
  background: rgba(44,36,28,0.92); color: white;
  padding: 9px 14px; border-radius: 22px;
  font-size: 13px; font-weight: 600; line-height: 1.4;
  max-width: 340px; text-align: center;
  animation: toastIn 0.3s cubic-bezier(0.34,1.5,0.64,1) both;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.toast.success { background: rgba(61,158,110,0.95); }
.toast.error { background: rgba(196,68,47,0.95); }
.toast.warning { background: rgba(232,140,42,0.95); }
.toast.out { animation: toastOut 0.25s ease forwards; }
@keyframes toastIn {
  from{ opacity:0; transform: translateY(-12px) scale(0.9); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from{ opacity:1; transform: translateY(0) scale(1); }
  to{ opacity:0; transform: translateY(-8px) scale(0.92); }
}

/* ─────────────────────────────────────────
   DOOR OPEN ANIMATION
───────────────────────────────────────── */
.door-overlay {
  position: fixed; inset: 0; z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.door-left, .door-right {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: linear-gradient(180deg, #3d2d1e 0%, #5c3d2e 100%);
  transition: transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.door-left { left: 0; transform-origin: left; }
.door-right { right: 0; transform-origin: right; }
.door-overlay.door-opening .door-left { transform: rotateY(-90deg); }
.door-overlay.door-opening .door-right { transform: rotateY(90deg); }
.door-sign {
  position: relative; z-index: 1;
  font-size: 22px; font-weight: 900; color: white;
  background: var(--red); padding: 12px 24px; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: signBounce 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
@keyframes signBounce {
  from{ transform: scale(0.4) rotate(-10deg); opacity:0; }
  to{ transform: scale(1) rotate(0); opacity:1; }
}

/* ─────────────────────────────────────────
   ORDER RESULT OVERLAY
───────────────────────────────────────── */
.order-result {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0);
  z-index: 7000; background: var(--white); border-radius: var(--radius);
  padding: 24px; text-align: center; min-width: 220px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;
}
.order-result.show { transform: translate(-50%, -50%) scale(1); }
.order-result.hide { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
.order-result-stars { font-size: 32px; margin-bottom: 6px; }
.order-result-msg { font-size: 15px; font-weight: 700; color: var(--brown); }
.order-result-tip { font-size: 13px; color: var(--green); margin-top: 4px; font-weight: 600; }

/* ─────────────────────────────────────────
   SCROLL STYLING
───────────────────────────────────────── */
#screen::-webkit-scrollbar { width: 3px; }
#screen::-webkit-scrollbar-track { background: transparent; }
#screen::-webkit-scrollbar-thumb { background: #d8cfc6; border-radius: 3px; }

/* ─────────────────────────────────────────
   SAFE AREAS (notch / home bar)
───────────────────────────────────────── */
.bottom-area {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.top-bar {
  padding-top: max(8px, env(safe-area-inset-top));
}
