/* ==========================================================================
 * Star Chef Showdown (星厨对决) — Cozy Culinary Bistro Digital Tabletop Styles
 * Optimized simultaneously for 960x640 itch.io Embed, 1280x720+ Desktop & Mobile
 * ========================================================================== */

:root {
  --wood-dark: #1c130e;
  --wood-mid: #2b1d15;
  --linen: #fcf6ec;
  --card-bg: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --border-ink: #292524;
  --amber-gold: #f59e0b;
  --crimson: #e11d48;
  --cobalt: #2563eb;
  --emerald: #16a34a;
  --plum: #7c3aed;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, #342218 0%, #19110c 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

button, a {
  font-family: inherit;
}

#starChefApp {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bistro-shell {
  width: 100%;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

/* ---------------- Top Bar & Non-Intrusive Upsell Pill ---------------- */
.bistro-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: linear-gradient(180deg, #2c1e16 0%, #211610 100%);
  border: 1.5px solid #5c4033;
  border-radius: 10px;
  padding: 4px 8px;
  color: #fef3c7;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

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

.brand-logo {
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.2px;
  color: #fde68a;
  white-space: nowrap;
}

.mode-seg {
  display: inline-flex;
  background: #150e0a;
  border: 1px solid #574135;
  border-radius: 7px;
  padding: 1.5px;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: #d6d3d1;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.seg-btn.active {
  background: #e11d48;
  color: #ffffff;
}

.topbar-upsell-pill {
  border: 1.5px solid #fbbf24;
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
  color: #78350f;
  font-weight: 800;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.topbar-upsell-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.45);
}

.toolbar-cluster {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.tool-btn {
  border: 1px solid #6b4f3f;
  background: #36251b;
  color: #fef3c7;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.tool-btn:hover {
  background: #4a3326;
}

.tool-btn.lang-btn {
  background: #fef3c7;
  color: #451a03;
  border-color: #f59e0b;
}

/* ---------------- Guided 60s Coach Banner ---------------- */
.coach-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbeb;
  border: 1.5px solid #d97706;
  border-radius: 8px;
  padding: 3px 8px;
  min-height: 28px;
  flex-shrink: 0;
}

.turn-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  color: #ffffff;
  flex-shrink: 0;
}

.turn-pill.p1 { background: var(--crimson); }
.turn-pill.p2 { background: var(--cobalt); }
.turn-pill.over { background: #78350f; }

.inline-btn {
  border: none;
  background: #fde047;
  color: #1c1917;
  font-weight: 800;
  font-size: 10.5px;
  border-radius: 4px;
  padding: 1px 5px;
  cursor: pointer;
}

.coach-text {
  flex: 1;
  font-size: 11.5px;
  font-weight: 700;
  color: #451a03;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coach-text.muted-tip {
  color: #92400e;
}

.coach-hide {
  border: 1px solid #fcd34d;
  background: #fef3c7;
  color: #78350f;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 5px;
  padding: 1px 6px;
  cursor: pointer;
}

/* ---------------- Main 3-Column Tabletop Grid ---------------- */
.tabletop-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) 256px;
  gap: 7px;
}

@media (min-width: 1140px) {
  .tabletop-grid {
    grid-template-columns: 272px minmax(0, 1fr) 304px;
    gap: 10px;
  }
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

/* ---------------- Chef Dashboard Panel ---------------- */
.chef-panel {
  background: var(--linen);
  border: 2px solid var(--border-ink);
  border-radius: 10px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.chef-panel.p1-theme { background: #fffdf5; }
.chef-panel.p2-theme { background: #f8fafc; }

.chef-panel.active-turn.p1-theme {
  border-color: var(--crimson);
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.35), 0 3px 8px rgba(0, 0, 0, 0.25);
}

.chef-panel.active-turn.p2-theme {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), 0 3px 8px rgba(0, 0, 0, 0.25);
}

.chef-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.chef-ident {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.chef-name {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-loc-pill {
  font-size: 10.5px;
  font-weight: 800;
  background: #fef08a;
  border: 1px solid #854d0e;
  border-radius: 5px;
  padding: 0 4px;
  white-space: nowrap;
}

.star-badge-big {
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: #1c1917;
  color: #fde047;
  padding: 1px 7px;
  border-radius: 7px;
  flex-shrink: 0;
}

.star-num {
  font-size: 14px;
  font-weight: 900;
}

.star-goal {
  font-size: 9.5px;
  color: #d6d3d1;
  font-weight: 700;
}

.star-progress-track {
  height: 5px;
  background: #e7e5e4;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.star-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #e11d48 100%);
  transition: width 0.25s ease;
}

.pantry-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.token-counter {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  background: #ffffff;
  border: 1.2px solid #cbd5e1;
  border-radius: 6px;
  padding: 1px 5px;
}

.token-counter b {
  font-weight: 800;
  color: #0f172a;
}

.token-counter.has-ice {
  background: #e0f2fe;
  border-color: #0284c7;
}

.stamps-and-milestone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.stamps-bar {
  display: flex;
  gap: 3px;
}

.stamp-chip {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px dashed #94a3b8;
  opacity: 0.45;
  background: #ffffff;
}

.stamp-chip.owned {
  border-style: solid;
  border-color: #1c1917;
  opacity: 1;
  background: #fef08a;
}

.stamp-bonus-hint {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
}

.gears-list {
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.gear-empty {
  font-size: 10px;
  color: #78716c;
  border: 1px dashed #cbd5e1;
  border-radius: 5px;
  padding: 2px 6px;
  text-align: center;
}

.gear-mini-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  background: #fef3c7;
  border: 1.2px solid #92400e;
  border-radius: 5px;
  padding: 2px 6px;
  cursor: pointer;
}

.gear-mini-pill b {
  background: #78350f;
  color: #ffffff;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 9.5px;
}

/* ---------------- Milestones & Live Bistro Log ---------------- */
.milestones-card {
  background: #fffbeb;
  border: 1.6px solid #78350f;
  border-radius: 9px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.milestones-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #78350f;
  border-bottom: 1px solid #fde68a;
  padding-bottom: 2px;
}

.ms-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #292524;
}

.bistro-log-box {
  flex: 1;
  min-height: 90px;
  background: #231812;
  border: 1.5px solid #574135;
  border-radius: 9px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #f5f5f4;
  overflow: hidden;
}

.log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  color: #fde68a;
}

.link-mini-btn {
  border: 1px solid #785a46;
  background: #38261c;
  color: #fef3c7;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  cursor: pointer;
}

.log-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  line-height: 1.3;
}

.log-entry {
  padding: 2.5px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 2.5px solid #a8a29e;
}

.log-entry.tone-gold { border-left-color: #fbbf24; background: rgba(251, 191, 36, 0.14); color: #fef3c7; }
.log-entry.tone-perfect { border-left-color: #f97316; background: rgba(249, 115, 22, 0.22); color: #ffedd5; font-weight: 700; }
.log-entry.tone-danger { border-left-color: #fb7185; background: rgba(225, 29, 72, 0.2); color: #ffe4e6; }
.log-entry.tone-accent { border-left-color: #38bdf8; }
.log-entry.tone-win { border-left-color: #4ade80; background: rgba(34, 197, 94, 0.22); font-weight: 800; }

.log-r {
  font-weight: 800;
  color: #fbbf24;
}

/* ---------------- Center 8-Seat Clockwise Bistro Rondel ---------------- */
.rondel-board {
  background: var(--linen);
  border: 2.2px solid var(--border-ink);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 0;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
}

.rondel-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  flex-shrink: 0;
}

.rondel-seat {
  border: 1.6px solid #44403c;
  border-radius: 8px;
  padding: 4px 5px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
  min-height: 76px;
  background: #ffffff;
  color: var(--ink);
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.rondel-seat:disabled {
  opacity: 0.94;
  cursor: default;
}

.rondel-seat.seat-fire { background: #fff1f2; }
.rondel-seat.seat-water { background: #f0f9ff; }
.rondel-seat.seat-grass { background: #f0fdf4; }
.rondel-seat.seat-elec { background: #fefce8; }
.rondel-seat.seat-boss { background: #faf5ff; }

.rondel-seat.clickable {
  cursor: pointer;
  border-color: #d97706;
  box-shadow: 0 0 0 1.5px rgba(245, 158, 11, 0.45), 0 2px 5px rgba(0, 0, 0, 0.12);
}

.rondel-seat.clickable:hover {
  transform: translateY(-2px);
  border-color: #e11d48;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.45), 0 4px 10px rgba(0, 0, 0, 0.18);
}

.rondel-seat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.seat-num {
  font-size: 11px;
  font-weight: 900;
  background: #1c1917;
  color: #ffffff;
  border-radius: 4px;
  padding: 0 4px;
}

.seat-num small {
  color: #fde047;
  margin-left: 2px;
  font-size: 9px;
}

.seat-icon {
  font-size: 14px;
  line-height: 1;
}

.seat-name {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-desc {
  font-size: 9.5px;
  color: #44403c;
  line-height: 1.2;
}

.seat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 16px;
  margin-top: 1px;
}

.seat-pawns {
  display: flex;
  gap: 2px;
}

.chef-pawn {
  font-size: 12px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

.step-cost-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  white-space: nowrap;
}

.step-cost-pill.free {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #16a34a;
}

.step-cost-pill.paid {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #d97706;
}

.step-cost-pill.locked {
  background: #e7e5e4;
  color: #78716c;
}

/* ---------------- Open Menu Pool & Signature Dish Cards ---------------- */
.open-menu-box {
  flex: 1;
  min-height: 0;
  background: #f5efe4;
  border: 1.5px solid #d6c7b2;
  border-radius: 9px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.open-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  color: #44403c;
}

.deck-pill {
  background: #ffffff;
  border: 1px solid #a8a29e;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
}

.open-menu-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.dish-card {
  background: #ffffff;
  border: 1.6px solid #292524;
  border-radius: 8px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  min-width: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.dish-card.cuisine-fire { background: #fff8f8; }
.dish-card.cuisine-water { background: #f5fbff; }
.dish-card.cuisine-grass { background: #f6fef8; }
.dish-card.cuisine-elec { background: #fffef5; }
.dish-card.boss-card { background: #fbf7ff; border-color: #6d28d9; }
.dish-card.can-cook {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1.5px rgba(22, 163, 74, 0.35);
}

.open-menu-grid .dish-card {
  justify-content: space-between;
}

.open-menu-grid .dish-card-mid {
  flex: 1;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed #d6d3d1;
  border-radius: 7px;
  padding: 6px 7px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.open-menu-grid .dish-art {
  width: 56px;
  height: 56px;
}

.open-menu-grid .dish-meta {
  align-items: center;
  width: 100%;
}

.open-menu-grid .dish-recipe-row {
  justify-content: center;
}

.dish-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  border-bottom: 1px solid #e7e5e4;
  padding-bottom: 2px;
}

.dish-code {
  font-size: 9px;
  font-weight: 800;
  background: #1c1917;
  color: #ffffff;
  border-radius: 3px;
  padding: 0 3px;
  flex-shrink: 0;
}

.dish-title {
  font-size: 10.5px;
  font-weight: 800;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-cuisine-tag {
  font-size: 11px;
  flex-shrink: 0;
}

.dish-card-mid {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dish-art {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  cursor: zoom-in;
}

.dish-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dish-recipe-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.ing-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.ready-dot {
  background: var(--emerald);
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  border-radius: 999px;
  padding: 0 4px;
}

.dish-prep-line {
  font-size: 9.5px;
  color: #44403c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-uses {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e7e5e4;
  border-radius: 5px;
  padding: 3px 4px;
}

.dish-use-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  gap: 3px;
}

.dish-use-line span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-use-line em {
  font-style: normal;
  background: #292524;
  color: #fde68a;
  font-size: 8.8px;
  padding: 0 4px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dish-bonus-sub {
  font-size: 9px;
  color: #57534e;
  line-height: 1.18;
}

.dish-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 1px;
}

.card-act-btn {
  flex: 1;
  border: 1.2px solid #1c1917;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 4px;
  cursor: pointer;
  white-space: nowrap;
}

.card-act-btn.cook {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border-color: #9a3412;
}

.card-act-btn.prep {
  background: #dcfce7;
  color: #14532d;
  border-color: #15803d;
}

.card-act-btn.gear {
  background: #fef3c7;
  color: #78350f;
  border-color: #b45309;
}

.card-act-btn.primary {
  background: #0284c7;
  color: #ffffff;
}

.card-act-btn.warn {
  background: #fde047;
  color: #1c1917;
}

.card-act-btn.disabled {
  background: #f5f5f4;
  color: #a8a29e;
  border-color: #d6d3d1;
  cursor: not-allowed;
}

.card-need-hint {
  width: 100%;
  text-align: center;
  font-size: 9px;
  color: #78716c;
  font-weight: 600;
}

/* ---------------- Blackjack-Style 21° Wok Heat Stove Arena ---------------- */
.wok-arena-box {
  flex: 1;
  background: linear-gradient(180deg, #291a12 0%, #1c120d 100%);
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 8px 10px;
  color: #fef3c7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.wok-arena-box.perfect-glow {
  border-color: #fb923c;
  box-shadow: inset 0 0 18px rgba(249, 115, 22, 0.35);
}

.wok-arena-box.overheat {
  border-color: #fb7185;
  background: linear-gradient(180deg, #450a0a 0%, #260808 100%);
}

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

.wok-dish-badge {
  display: flex;
  align-items: center;
  gap: 7px;
}

.wok-svg-mini {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.wok-dish-badge strong {
  font-size: 12.5px;
  color: #fde68a;
}

.wok-dish-sub {
  font-size: 10px;
  color: #fed7aa;
}

.last-roll-pill {
  background: #451a03;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10.5px;
  white-space: nowrap;
}

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

.wok-cell {
  border: 1.4px solid #574135;
  border-radius: 7px;
  padding: 5px 2px;
  text-align: center;
  background: #332219;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

.wok-cell b { font-size: 11px; }
.wok-cell span { font-size: 9px; color: #d6d3d1; }

.wok-cell.z-gold {
  background: #422006;
  border-color: #fbbf24;
  color: #fde047;
}

.wok-cell.z-perf {
  background: #7c2d12;
  border-color: #fb923c;
  color: #ffedd5;
}

.wok-cell.z-bust {
  background: #4c0519;
  border-color: #f43f5e;
  color: #fecdd3;
}

.wok-cell.current {
  transform: translateY(-2px);
  border-width: 2px;
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.75);
}

.wok-pointer {
  margin-top: 2px;
  background: #fde047;
  color: #1c1917;
  font-size: 9.5px;
  font-weight: 900;
  border-radius: 4px;
  padding: 0 4px;
}

.wok-primary-row, .wok-gears-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.wok-btn {
  flex: 1;
  min-width: 120px;
  border-radius: 7px;
  border: 1.5px solid #ffffff;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.wok-btn.blazing {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-color: #fca5a5;
}

.wok-btn.simmer {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: #1c1917;
  border-color: #fde68a;
}

.wok-btn.plate.gold {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  border-color: #bbf7d0;
}

.wok-btn.plate.perfect {
  background: linear-gradient(90deg, #fde047 0%, #fb923c 100%);
  color: #1c1917;
  border-color: #ffffff;
}

.wok-btn.plate.low {
  background: #44403c;
  color: #f5f5f4;
  border-color: #a8a29e;
}

.wok-btn.bust {
  background: #e11d48;
  color: #ffffff;
}

.wok-gear-btn {
  border: 1.2px solid #fcd34d;
  background: #451a03;
  color: #fef3c7;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  cursor: pointer;
}

.wok-gear-btn.ice {
  background: #0369a1;
  border-color: #7dd3fc;
  color: #f0f9ff;
}

.wok-ai-watch {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fde68a;
  padding: 6px;
}

/* ---------------- Right Hand Stack & Action Dock ---------------- */
.hand-box {
  flex: 1;
  min-height: 0;
  background: var(--linen);
  border: 1.8px solid var(--border-ink);
  border-radius: 10px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}

.hand-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
}

.hand-head small {
  font-size: 9.5px;
  color: var(--muted);
}

.hand-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.empty-hand-card {
  border: 1.5px dashed #a8a29e;
  border-radius: 8px;
  padding: 16px 10px;
  text-align: center;
  font-size: 11px;
  color: #57534e;
}

.action-dock {
  background: #fffbeb;
  border: 1.8px solid #b45309;
  border-radius: 9px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.action-dock.highlight {
  background: #fef08a;
  border-color: #e11d48;
}

.dock-label {
  font-size: 10px;
  font-weight: 800;
  color: #451a03;
}

.dock-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dock-btn {
  flex: 1;
  border: 1.3px solid #292524;
  background: #ffffff;
  color: #1c1917;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.dock-btn.primary {
  background: #1c1917;
  color: #fde047;
}

.dock-btn.accent {
  background: #ea580c;
  color: #ffffff;
}

.dock-btn.subtle {
  background: #e7e5e4;
  color: #44403c;
}

.dock-btn.full {
  width: 100%;
}

/* ---------------- Modals & Print-and-Play Trilogy Funnel ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 7, 0.76);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 900;
}

.modal-sheet {
  width: 100%;
  max-width: 780px;
  max-height: 94vh;
  overflow-y: auto;
  background: #fffcf5;
  border: 2.5px solid #292524;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #e7e5e4;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  color: #1c1917;
}

.icon-close {
  border: 1.2px solid #a8a29e;
  background: #ffffff;
  color: #1c1917;
  border-radius: 7px;
  width: 28px;
  height: 28px;
  font-weight: 800;
  cursor: pointer;
}

.icon-close.light {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.rules-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rule-step-card {
  background: #ffffff;
  border: 1.4px solid #d6d3d1;
  border-radius: 9px;
  padding: 8px 10px;
}

.rule-step-card b {
  font-size: 12.5px;
  color: #b45309;
}

.rule-step-card p {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.42;
  color: #292524;
}

.modal-foot-bar {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.zoom-card-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 12px;
  align-items: start;
}

.zoom-card-notes p {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.45;
}

/* Victory Banner + Trilogy Upsell */
.victory-sheet {
  padding: 12px 14px;
}

.victory-banner {
  background: linear-gradient(135deg, #291a12 0%, #451a03 100%);
  color: #fef3c7;
  border-radius: 11px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.victory-head-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.victory-banner h2 {
  margin: 0;
  font-size: 18px;
  color: #fde047;
}

.victory-sub {
  margin: 3px 0 8px;
  font-size: 12px;
  color: #fed7aa;
}

.scorecard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.score-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
}

.score-pill b { font-size: 13.5px; color: #ffffff; }
.score-pill span { font-size: 11px; color: #fde68a; }

.rematch-row {
  display: flex;
  gap: 8px;
}

.rematch-btn {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  background: #22c55e;
  color: #ffffff;
}

.rematch-btn.alt {
  background: #fde68a;
  color: #451a03;
}

.trilogy-upsell-card {
  background: #fffbeb;
  border: 2px solid #d97706;
  border-radius: 11px;
  padding: 10px 12px;
}

.trilogy-headline {
  font-size: 13.5px;
  font-weight: 900;
  color: #78350f;
  line-height: 1.32;
}

.trilogy-sub {
  margin: 3px 0 8px;
  font-size: 11.5px;
  color: #57534e;
}

.trilogy-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.trilogy-item {
  background: #ffffff;
  border: 1.4px solid #d6d3d1;
  border-radius: 9px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.trilogy-thumb {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 160 / 110;
}

.trilogy-item strong {
  font-size: 11.5px;
  color: #1c1917;
}

.trilogy-item span {
  font-size: 9.8px;
  color: #57534e;
}

.sample-link {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  color: #0284c7;
  text-decoration: none;
}

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

.trilogy-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.cta-bundle-btn {
  flex: 2;
  min-width: 220px;
  display: inline-block;
  text-align: center;
  background: linear-gradient(90deg, #e11d48 0%, #ea580c 100%);
  color: #ffffff;
  text-decoration: none;
  border: none;
  font-weight: 900;
  font-size: 12.5px;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.35);
}

.cta-secondary-btn, .cta-tip-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 800;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1.4px solid #78350f;
  background: #ffffff;
  color: #78350f;
}

.cta-tip-btn {
  background: #fef3c7;
}

.funnel-supplies {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #fcd34d;
  font-size: 10.5px;
  color: #78350f;
}

.funnel-supplies a {
  color: #b45309;
  font-weight: 700;
}

/* ---------------- Mobile & Tablet Portrait Adaptation ---------------- */
@media (max-width: 900px) {
  #starChefApp {
    height: auto;
    min-height: 100vh;
  }
  .bistro-shell {
    height: auto;
    overflow: visible;
  }
  .bistro-topbar {
    flex-wrap: wrap;
  }
  .topbar-upsell-pill {
    order: 3;
    width: 100%;
    text-align: center;
  }
  .coach-text {
    white-space: normal;
  }
  .tabletop-grid {
    grid-template-columns: 1fr;
  }
  .rondel-board {
    order: 1;
  }
  .right-column {
    order: 2;
  }
  .left-column {
    order: 3;
  }
  .open-menu-grid, .trilogy-grid-3, .rules-grid-4, .zoom-card-body {
    grid-template-columns: 1fr;
  }
  .rondel-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .wok-gauge-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
