/* ==========================================================================
 * css/style.css — Honeyroast Cafe: Farm & Brew (Cozy Pastel Storybook)
 * Locked Palette: #E8D0AD, #D9A366, #A9673F, #FAF2D0, #FFF9EE, #5A3E36
 * Strict 9-Slice border-image (ZERO background-size: 100% 100% distortion!)
 * Strict overflow:visible on buttons with .notify-badge!
 * ========================================================================== */

:root {
  --sand: #E8D0AD;
  --honey: #D9A366;
  --caramel: #A9673F;
  --parchment: #FAF2D0;
  --cream: #FFF9EE;
  --paper: #FFFDF7;
  --cocoa: #5A3E36;
  --cocoa-deep: #3B251E;
  --cocoa-soft: #876351;
  --sage: #89A473;
  --sage-deep: #557341;
  --berry: #D96857;
  --gold-bright: #FDE047;
  --font-display: 'Segoe UI Rounded', 'Trebuchet MS', 'Yu Gothic UI', 'Malgun Gothic', 'Microsoft YaHei UI', system-ui, sans-serif;
  --font-body: 'Segoe UI', 'Yu Gothic UI', 'Malgun Gothic', 'Microsoft YaHei UI', system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--parchment);
  color: var(--cocoa);
  font-family: var(--font-body);
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.hidden {
  display: none !important;
}

img {
  user-select: none;
  -webkit-user-drag: none;
}

button, select, input {
  font-family: inherit;
}

/* --- 9-Slice Painted Game Chrome (Anti-Distortion Law) --- */
.btn-nine-primary {
  box-sizing: border-box;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 14px 22px 14px 22px;
  border-image: url('../assets/ui/btn_primary.png') 126 127 126 126 fill / 14px 22px 14px 22px / 0 stretch;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 0 rgba(90, 62, 54, 0.42));
  color: #241812;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(13px, 1.15vw, 16px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  line-height: 1.1;
  padding: 2px 8px;
}

.btn-nine-primary:disabled {
  opacity: 0.55;
  filter: grayscale(0.25) drop-shadow(0 2px 0 rgba(90, 62, 54, 0.25));
  cursor: not-allowed;
}

.frame-nine-panel {
  box-sizing: border-box;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 26px 40px 26px 42px;
  border-image: url('../assets/ui/frame_panel.png') 130 245 132 271 fill / 26px 40px 26px 42px / 0 stretch;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 10px 24px rgba(58, 38, 28, 0.30));
}

/* --- Tactile Wood & Cream Buttons --- */
.btn-wood, .btn-wood-sm {
  position: relative;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(180deg, #F5DFB9 0%, var(--sand) 100%);
  border: 2.5px solid var(--caramel);
  border-radius: 13px;
  color: var(--cocoa-deep);
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(169, 103, 63, 0.45);
  padding: 7px 12px;
  font-size: clamp(12px, 1vw, 14px);
  max-width: 100%;
}

.btn-wood-sm {
  padding: 5px 9px;
  border-radius: 11px;
  font-size: clamp(11px, 0.92vw, 13px);
}

.btn-wood-sm.primary-tint, .btn-wood-sm.active {
  background: linear-gradient(180deg, #A7CB8B 0%, var(--sage) 100%);
  border-color: var(--sage-deep);
  color: #1D3013;
  box-shadow: 0 3px 0 rgba(85, 115, 65, 0.45);
}

.btn-wood:disabled, .btn-wood-sm:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-wood > span, .btn-wood-sm > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Title Screen --- */
.title-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.title-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.title-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255, 249, 238, 0.22) 0%, rgba(90, 62, 54, 0.26) 100%);
  z-index: 1;
}

.title-top-bar {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-lang-select {
  padding: 6px 12px;
  border-radius: 11px;
  border: 2.5px solid var(--caramel);
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(90, 62, 54, 0.22);
}

.title-center-card {
  position: relative;
  z-index: 2;
  width: min(540px, 92vw);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.title-mascot-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-top: -6px;
}

.title-pip-img {
  height: clamp(74px, 11vh, 108px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(90, 62, 54, 0.25));
}

.title-cat-img {
  height: clamp(50px, 7.5vh, 72px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(90, 62, 54, 0.22));
}

.title-logo {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.1vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  color: var(--cocoa-deep);
  -webkit-text-stroke: 0;
  text-shadow: 0 2px 0 rgba(255, 249, 238, 0.95), 0 4px 10px rgba(90, 62, 54, 0.16);
}

.title-tagline {
  margin: 0 0 4px;
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 700;
  color: var(--cocoa);
}

.title-loading-wrap {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 4px 0;
}

.title-loading-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: var(--sand);
  border: 2px solid var(--caramel);
  overflow: hidden;
}

.title-loading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--honey) 0%, var(--sage) 100%);
  border-radius: 999px;
  transition: width 140ms ease-out;
}

.title-loading-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--cocoa-soft);
}

.title-play-btn {
  min-width: 210px;
  font-size: clamp(16px, 1.5vw, 20px);
  margin-top: 4px;
}

/* --- Main App Shell & Top HUD Bar --- */
.app-shell {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #F6E6C6 0%, var(--sand) 100%);
  overflow: hidden;
}

.top-hud {
  height: 58px;
  min-height: 54px;
  padding: 6px 12px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--parchment) 100%);
  border-bottom: 3px solid var(--caramel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  z-index: 25;
}

.hud-left, .hud-currencies, .hud-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid var(--honey);
  color: var(--cocoa);
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 700;
  white-space: nowrap;
}

.hud-pill.clickable {
  cursor: pointer;
}

.level-pill {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 3px 10px;
}

.xp-mini-track {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: var(--sand);
  overflow: hidden;
}

.xp-mini-fill {
  height: 100%;
  background: var(--sage);
  transition: width 200ms ease;
}

.hud-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-icon-sm {
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--cream);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.hud-weather-name {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 4 Live Cafe Style Modes Switcher */
.mode-switcher {
  display: inline-flex;
  background: var(--sand);
  border: 2px solid var(--caramel);
  border-radius: 12px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--cocoa);
  font-family: var(--font-display);
  font-size: clamp(10px, 0.82vw, 12px);
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 9px;
  cursor: pointer;
  max-width: none;
  flex-shrink: 0;
}

.mode-btn > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-btn.active {
  background: var(--caramel);
  color: var(--cream);
}

/* HUD Nav Buttons + Unclipped Red-Dot Badges */
.hud-nav-btn {
  position: relative;
  overflow: visible !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 11px;
  border: 2px solid var(--honey);
  background: var(--paper);
  color: var(--cocoa);
  font-family: var(--font-display);
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 600;
  cursor: pointer;
}

.hud-nav-btn.shop-highlight {
  background: linear-gradient(180deg, #FFF3C4 0%, #F4D084 100%);
  border-color: var(--caramel);
}

.hud-nav-btn.locked-preview {
  opacity: 0.62;
}

.hud-nav-btn .nav-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-nav-btn .btn-label, .hud-exit-btn .btn-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 82px;
}

.notify-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #E04F3E;
  border: 1.5px solid var(--cream);
  box-shadow: 0 2px 4px rgba(90, 62, 54, 0.35);
  z-index: 30;
  pointer-events: none;
  animation: dotPulse 1.6s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 4px rgba(90, 62, 54, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 2.5px rgba(224, 79, 62, 0.32), 0 2px 4px rgba(90, 62, 54, 0.35); }
}

.hud-sys-btn, .hud-exit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  border: 2px solid var(--caramel);
  background: var(--parchment);
  color: var(--cocoa);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.hud-exit-btn {
  background: #F7D8CE;
  border-color: #A85B4B;
  color: #5C261C;
}

.sys-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --- Non-Blocking FTUE Tutorial Banner --- */
.tutorial-banner {
  margin: 6px 10px 0;
  padding: 6px 12px;
  border-radius: 14px;
  background: linear-gradient(90deg, #FFF7DC 0%, var(--cream) 100%);
  border: 2.5px solid var(--caramel);
  box-shadow: 0 4px 12px rgba(90, 62, 54, 0.16);
  flex-shrink: 0;
  z-index: 20;
}

.ftue-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ftue-pip {
  width: 34px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.ftue-copy {
  flex: 1;
  min-width: 0;
}

.ftue-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--caramel);
}

.ftue-body {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--cocoa);
  white-space: normal;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ftue-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-skip-ftue {
  padding: 5px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--cocoa-soft);
  background: var(--paper);
  color: var(--cocoa-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.tutorial-banner.modal-suppressed {
  display: none !important;
}

.ftue-spotlight {
  box-shadow: 0 0 0 3px #F59E0B, 0 8px 20px rgba(217, 163, 102, 0.35) !important;
}

body.modal-active .ftue-spotlight {
  box-shadow: none !important;
}

/* --- 3-Column Simultaneous 16:9 Workbench (24% | 48% | 28%) --- */
.workspace-grid {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 8px 10px 10px;
  display: grid;
  grid-template-columns: 24fr 48fr 28fr;
  gap: 10px;
}

.rail-card {
  background: var(--cream);
  border: 3px solid var(--caramel);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(90, 62, 54, 0.14), inset 0 2px 0 var(--paper);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #F6E4C2 0%, var(--sand) 100%);
  border-bottom: 2px solid var(--honey);
  flex-shrink: 0;
}

.rail-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.rail-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.rail-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 700;
  color: var(--cocoa);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-help-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--caramel);
  background: var(--paper);
  color: var(--cocoa);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}

/* --- Left Rail: Coffee Farm --- */
.seed-strip {
  display: flex;
  gap: 5px;
  padding: 6px 8px;
  overflow-x: auto;
  background: var(--parchment);
  border-bottom: 1.5px solid var(--sand);
  flex-shrink: 0;
}

.seed-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 2px solid var(--sand);
  background: var(--paper);
  color: var(--cocoa);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.seed-pill.active {
  background: #E8F3DE;
  border-color: var(--sage-deep);
}

.bean-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(90, 62, 54, 0.45);
}

.farm-plot-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.farm-plot {
  position: relative;
  aspect-ratio: 1 / 0.86;
  background: url('../assets/ui/slot_tile.png') center / 100% 100% no-repeat;
  border: none;
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--cocoa);
  min-width: 0;
}

.farm-plot.is-ripe {
  filter: drop-shadow(0 0 6px rgba(137, 164, 115, 0.75));
}

.farm-plot.is-golden {
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.85));
}

.plot-crop-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.plot-label {
  font-size: 11px;
  font-weight: 700;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 249, 238, 0.88);
  padding: 1px 6px;
  border-radius: 999px;
}

.plot-bar {
  width: 76%;
  height: 6px;
  border-radius: 999px;
  background: rgba(90, 62, 54, 0.22);
  overflow: hidden;
}

.plot-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--honey), var(--sage));
}

.plot-corner-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.plot-water-badge {
  position: absolute;
  top: 5px;
  left: 6px;
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.farm-footer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 7px 8px;
  background: var(--parchment);
  border-top: 2px solid var(--sand);
  flex-shrink: 0;
}

.farm-footer-actions > #btn-unlock-plot {
  grid-column: 1 / -1;
}

/* --- Center Stage: Top 42% Diorama + Bottom 58% Workbench --- */
.center-stage {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.diorama-card {
  flex: 42 1 0;
  min-height: 155px;
  position: relative;
  border-radius: 18px;
  border: 3px solid var(--caramel);
  overflow: hidden;
  background: var(--parchment);
  box-shadow: 0 6px 16px rgba(90, 62, 54, 0.16);
}

.diorama-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.diorama-hud-chips {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.diorama-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 249, 238, 0.90);
  border: 1.5px solid var(--caramel);
  color: var(--cocoa);
  font-size: 11px;
  font-weight: 700;
}

.diorama-chip.fest-chip {
  cursor: pointer;
  background: rgba(255, 243, 196, 0.94);
}

.workbench-card {
  flex: 58 1 0;
  min-height: 0;
}

.workbench-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #F6E4C2 0%, var(--sand) 100%);
  border-bottom: 2px solid var(--honey);
  flex-shrink: 0;
}

.wb-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 12px;
  border: 2px solid var(--caramel);
  background: var(--paper);
  color: var(--cocoa);
  font-family: var(--font-display);
  font-size: clamp(12px, 1.05vw, 14px);
  font-weight: 700;
  cursor: pointer;
}

.wb-tab.active {
  background: var(--caramel);
  color: var(--cream);
}

.wb-tab-hint {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--parchment);
  border: 1.5px solid var(--honey);
  font-size: 11px;
  font-weight: 700;
  color: var(--cocoa-soft);
}

.station-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
}

.station-inner {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
}

/* --- Roastery Station --- */
.roaster-top-row, .roaster-gauge-header, .tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.roaster-section-label, .tray-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  color: var(--cocoa);
}

.batch-tag {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--parchment);
  border: 1px solid var(--honey);
  font-size: 11px;
}

.roaster-target-hint {
  font-size: 11px;
  color: var(--caramel);
  font-weight: 700;
}

.chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.chip-strip.compact {
  flex-wrap: wrap;
  overflow-x: visible;
  gap: 4px;
}

.bean-chip, .roasted-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 2px solid var(--sand);
  background: var(--paper);
  color: var(--cocoa);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.bean-chip.active, .roasted-pill.active {
  border-color: var(--sage-deep);
  background: #EAF4E1;
}

.bean-chip.low-stock {
  opacity: 0.6;
}

.roasted-pill.just-dumped {
  border-color: #D97706 !important;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.72), 0 2px 8px rgba(180, 83, 9, 0.35);
  animation: ingGlow 0.9s ease-in-out 3;
}

.brew-serve-alert {
  padding: 3px 8px;
  border-radius: 8px;
  background: #FEF3C7;
  border: 1.5px solid #D97706;
  color: #7C2D12;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}

.chip-count {
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--parchment);
  font-size: 10px;
}

.roast-badge, .roast-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: var(--cream);
  background: #8A5230;
}

.order-banner-sub .roast-tag {
  margin-right: 4px;
}

.zone-light .roast-badge, .roast-tag.zone-light { background: #C48A52; }
.zone-medium .roast-badge, .roast-tag.zone-medium { background: #8A5230; }
.zone-dark .roast-badge, .roast-tag.zone-dark { background: #4A2716; }
.zone-burnt .roast-badge, .roast-tag.zone-burnt { background: #1C120D; }

.roaster-gauge-card {
  background: var(--parchment);
  border: 2px solid var(--honey);
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.gauge-live-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--honey);
  font-size: 11px;
}

.gauge-live-pill.is-golden {
  background: var(--gold-bright);
  border-color: #B45309;
  color: #451A03;
}

.roaster-track-wrap {
  padding: 12px 0 4px;
}

.roaster-track {
  position: relative;
  height: 32px;
  border-radius: 999px;
  overflow: visible;
  border: 2.5px solid var(--cocoa);
  background: #E5CEAA;
}

.r-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(42, 20, 10, 0.9), 0 0 2px rgba(42, 20, 10, 0.85);
}

.r-seg > span {
  position: relative;
  z-index: 3;
}

.r-light { background: #C48A52; border-radius: 999px 0 0 999px; }
.r-medium { background: #8A5230; }
.r-dark { background: #4A2716; }
.r-burnt { background: #1C120D; border-radius: 0 999px 999px 0; }

.r-golden {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(254, 240, 138, 0.88) 0%, rgba(245, 158, 11, 0.86) 100%);
  border-left: 2px solid #FFF9EE;
  border-right: 2px solid #FFF9EE;
  opacity: 0.95;
  z-index: 2;
}

.roaster-target-star {
  position: absolute;
  top: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--cocoa);
  transform: translateX(-50%);
  z-index: 4;
}

.roaster-needle {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 9px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFE066 100%);
  border: 2.5px solid #1E0E08;
  border-radius: 5px;
  box-shadow: 0 0 0 2px #FFF9EE, 0 2px 8px rgba(0, 0, 0, 0.65);
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
}

.roaster-needle-cap {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  line-height: 1;
  color: #DC2626;
  text-shadow: 0 1px 0 #FFF9EE, 0 -1px 0 #FFF9EE, 1px 0 0 #FFF9EE, -1px 0 0 #FFF9EE;
  pointer-events: none;
}

.roaster-needle.is-golden {
  background: linear-gradient(180deg, #FEF9C3 0%, #FACC15 100%);
  box-shadow: 0 0 0 2px #FFF9EE, 0 0 14px #FDE047;
}

.roaster-needle.is-golden .roaster-needle-cap {
  color: #F59E0B;
}

.roaster-cta-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
  align-items: center;
}

/* --- Brew Bar Station --- */
.brew-order-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--parchment);
  border: 2px solid var(--honey);
}

.brew-order-banner.secret-mode {
  background: #F4ECFA;
  border-color: #B49CE0;
}

.order-drink-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.order-banner-copy {
  flex: 1;
  min-width: 0;
}

.order-banner-title {
  font-size: 12px;
  color: var(--cocoa);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-banner-sub {
  font-size: 11px;
  color: var(--cocoa-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brew-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 6px;
  min-width: 0;
  flex-shrink: 0;
}

.brew-roast-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1 1 100%;
  min-width: 0;
  overflow-x: visible;
}

.ing-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
  flex: 1;
  align-content: start;
}

@media (max-width: 1080px) {
  .ing-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.ing-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 3px;
  border-radius: 10px;
  border: 1.5px solid var(--sand);
  background: var(--paper);
  color: var(--cocoa);
  cursor: pointer;
  min-width: 0;
}

.ing-btn.next-glow {
  border-color: #D97706;
  background: #FFFbeb;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45);
  animation: ingGlow 1.1s ease-in-out infinite;
}

@keyframes ingGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.ing-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.ing-label {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.08;
  width: 100%;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kbd-tag {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 9px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--parchment);
  color: var(--caramel);
}

.brew-bottom-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.cup-and-micro {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cup-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 24px;
}

.cup-chip {
  padding: 2px 7px;
  border-radius: 999px;
  background: #EAF4E1;
  border: 1.5px solid var(--sage);
  font-size: 10px;
  font-weight: 700;
  color: var(--cocoa);
}

.cup-chip.cup-chip-removable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.15;
  transition: background-color 120ms ease, border-color 120ms ease, transform 100ms ease;
}

.cup-chip.cup-chip-removable:hover {
  background: #FDECE9;
  border-color: var(--berry);
  color: #7C2D12;
}

.cup-chip.cup-chip-removable:active {
  transform: scale(0.96);
}

.cup-chip-x {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.72;
  line-height: 1;
}

.cup-chip.cup-chip-removable:hover .cup-chip-x {
  opacity: 1;
  color: var(--berry);
}

.btn-clear-cup {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--berry);
  background: #FDECE9;
  color: var(--berry);
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}

.micro-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.micro-step-box {
  flex: 1 1 110px;
  padding: 4px 7px;
  border-radius: 9px;
  background: var(--parchment);
  border: 1.5px solid var(--honey);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.micro-step-box.is-next-step {
  border-color: #D97706;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.micro-step-box.pulse-react {
  animation: microReactPop 280ms ease-out;
}

@keyframes microReactPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.05); background: #FFF8DC; }
  100% { transform: scale(1); }
}

.micro-step-box.done {
  background: #E8F3DE;
  border-color: var(--sage-deep);
}

.micro-lbl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 3px;
}

.micro-lbl {
  display: -webkit-box;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.1;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.micro-live-val {
  font-size: 9.5px;
  font-weight: 800;
  color: #9A5016;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.micro-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(90, 62, 54, 0.24);
  border: 1.5px solid rgba(90, 62, 54, 0.44);
  overflow: hidden;
}

.daily-chip {
  position: relative;
  overflow: visible !important;
  background: linear-gradient(180deg, #FFF7DC 0%, #FDE68A 100%) !important;
  border-color: #B45309 !important;
  color: #5A3E36 !important;
}

.micro-sweet {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(250, 204, 21, 0.45);
  border-left: 1.5px solid #B45309;
  border-right: 1.5px solid #B45309;
  z-index: 2;
  pointer-events: none;
}

.micro-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  background: #FFF9EE;
  border: 2px solid var(--cocoa-deep);
  border-radius: 3px;
  transform: translateX(-50%);
  z-index: 3;
}

.micro-cursor.in-sweet {
  background: #FDE047;
  box-shadow: 0 0 6px #FACC15;
}

.micro-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #5F9E45, #84CC16);
  z-index: 1;
}

.micro-fill.in-sweet {
  filter: brightness(1.14);
}

.micro-fill.gold {
  background: linear-gradient(90deg, #D97706, #FACC15);
}

.serve-cta {
  min-width: 148px;
  width: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.serve-cta .kbd-inline {
  flex-shrink: 0;
  white-space: nowrap;
}

.serve-cta.warn-confirm {
  filter: brightness(1.06) saturate(1.25) drop-shadow(0 0 8px rgba(245, 158, 11, 0.7));
}

/* --- Right Rail: Hot Streak & Live Order Queue --- */
.combo-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFF0C2;
  border: 1.5px solid var(--caramel);
  font-size: 11px;
  font-weight: 800;
  color: var(--caramel);
}

.hot-streak-card {
  margin: 8px 8px 4px;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFF7DC 0%, var(--parchment) 100%);
  border: 2px solid var(--honey);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.hot-streak-card.rush-live {
  background: linear-gradient(180deg, #FEF08A 0%, #F6C863 100%);
  border-color: #B45309;
}

.streak-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.streak-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--cocoa-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.streak-pips {
  display: flex;
  gap: 4px;
}

.s-pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sand);
  border: 1.5px solid var(--caramel);
}

.s-pip.lit {
  background: #F59E0B;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
}

.streak-rush-bar-wrap {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(90, 62, 54, 0.2);
  overflow: hidden;
}

.streak-rush-fill {
  height: 100%;
  background: #B45309;
}

.btn-rush-ticket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--caramel);
  background: var(--paper);
  color: var(--cocoa);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-rush-ticket:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.order-queue-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-ticket {
  background: var(--paper);
  border: 2px solid var(--sand);
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}

.order-ticket.selected {
  border-color: var(--caramel);
  background: #FFFDF2;
  box-shadow: 0 4px 10px rgba(169, 103, 63, 0.18);
}

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

.ticket-portrait {
  width: 42px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--parchment);
  border: 1.5px solid var(--sand);
  flex-shrink: 0;
}

.ticket-info {
  flex: 1;
  min-width: 0;
}

.ticket-guest {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--cocoa);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-drink-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cocoa-deep);
}

.ticket-drink-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.ticket-drink-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-patience-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.ticket-patience-track {
  flex: 1 1 auto;
  min-width: 0;
  height: 7px;
  border-radius: 999px;
  background: var(--sand);
  overflow: hidden;
}

.ticket-patience-time {
  flex-shrink: 0;
  min-width: 30px;
  text-align: right;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--cocoa-soft);
  font-variant-numeric: tabular-nums;
}

.ticket-patience-time.patience-low {
  color: #B91C1C;
  animation: patPulse 0.9s ease-in-out infinite;
}

.order-ticket.patience-low {
  border-color: #DC2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.24);
}

@keyframes patPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.ticket-patience-fill {
  height: 100%;
  background: var(--sage);
  transition: width 160ms linear;
}

.ticket-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* --- Shared Utility Icons & Stamps & Toasts --- */
.inline-icon, .btn-icon-sm {
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex-shrink: 0;
}

.btn-icon-xs {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.kbd-inline, .kbd-mini {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 249, 238, 0.72);
  border: 1px solid rgba(90, 62, 54, 0.35);
  font-size: 10px;
  font-weight: 800;
}

.empty-hint {
  font-size: 11px;
  color: var(--cocoa-soft);
  font-style: italic;
}

.overlay-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 135;
  pointer-events: none;
}

#cutin-overlay-canvas {
  z-index: 140;
}

.verdict-stamp {
  position: fixed;
  z-index: 145;
  pointer-events: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 800;
  color: var(--cream);
  -webkit-text-stroke: 1.5px var(--cocoa-deep);
  paint-order: stroke fill;
  border: 3px solid var(--cocoa-deep);
  box-shadow: 0 6px 16px rgba(58, 38, 28, 0.30);
  white-space: nowrap;
}

.verdict-gold { background: linear-gradient(180deg, #FDE047 0%, #D99026 100%); }
.verdict-green { background: linear-gradient(180deg, #A3CF82 0%, #6D994E 100%); }
.verdict-berry { background: linear-gradient(180deg, #F29BB2 0%, #C85A78 100%); }
.verdict-dark { background: linear-gradient(180deg, #8A6653 0%, #4A2F24 100%); }

.toast-stack {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 160;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.cozy-toast {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--cream);
  border: 2.5px solid var(--caramel);
  color: var(--cocoa-deep);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(58, 38, 28, 0.25);
}

.cozy-toast.good {
  background: #EAF5E1;
  border-color: var(--sage-deep);
}

.cozy-toast.warn {
  background: #FFF0DC;
  border-color: #C46D3B;
}

/* --- Preview-Only [DEV F2] Debug Pill & Panel --- */
.dev-f2-pill {
  position: fixed;
  bottom: 8px;
  right: 8px;
  z-index: 170;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(90, 62, 54, 0.85);
  color: var(--cream);
  border: 1.5px solid var(--honey);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

#debug-panel {
  position: fixed;
  bottom: 36px;
  right: 10px;
  z-index: 170;
  width: 250px;
  padding: 10px;
  border-radius: 14px;
  background: var(--cream);
  border: 2.5px solid var(--caramel);
  box-shadow: 0 10px 26px rgba(58, 38, 28, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#debug-panel button {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1.5px solid var(--caramel);
  background: var(--parchment);
  color: var(--cocoa-deep);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

/* --- Season 2-4 Additions: Apiary, Bakery, Wholesale, Photo Mode, Pier & Rush --- */
.hud-nav-btn .btn-label {
  max-width: 96px;
}

.stock-alert-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #D96857;
  color: #FFF9EE;
  font-size: 10px;
  font-weight: 800;
  border: 1.5px solid #FFF9EE;
}

.apiary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 8px;
  background: linear-gradient(90deg, #FFF7DC 0%, #FAF2D0 100%);
  border-bottom: 1.5px solid var(--sand);
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
}

.apiary-info {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.compact-pill {
  padding: 2px 7px !important;
  font-size: 10.5px !important;
  border-radius: 999px !important;
}

.diorama-chip-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.diorama-chip.clickable-chip {
  cursor: pointer;
}

.diorama-chip.clickable-chip:hover {
  background: #FFF3C4;
}

.photo-mode-bar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 15;
  background: rgba(90, 62, 54, 0.72);
  padding: 6px 10px;
  border-radius: 999px;
}

.app-shell.photo-mode-active #top-hud,
.app-shell.photo-mode-active #farm-rail,
.app-shell.photo-mode-active #queue-rail,
.app-shell.photo-mode-active #workbench-card,
.app-shell.photo-mode-active #diorama-hud-chips,
.app-shell.photo-mode-active #tutorial-banner {
  display: none !important;
}

.app-shell.photo-mode-active .workspace-grid {
  grid-template-columns: 1fr;
  padding: 14px;
}

.app-shell.photo-mode-active .diorama-card {
  flex: 1 1 auto;
  height: calc(100vh - 28px);
}

.brew-artisan-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  overflow-x: visible;
  flex-shrink: 0;
}

.so-highlight {
  border-color: #D97706 !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.roast-tag.so-badge {
  background: #B45309;
  color: #FEF9C3;
}

.roast-tag.critic-badge {
  background: #7C3AED;
  color: #FFF9EE;
}

.roast-tag.vip-badge {
  background: #0F766E;
  color: #FFF9EE;
}

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

.bakery-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--paper);
  border: 1.5px solid var(--sand);
  font-size: 11px;
}

.bakery-card-meta {
  min-width: 0;
  flex: 1;
}

.bakery-card-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bakery-card-sub {
  font-size: 10px;
  color: var(--cocoa-soft);
}

.wholesale-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wholesale-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--parchment);
  border: 1.5px solid var(--honey);
  font-size: 11px;
}

.rush-mode-banner {
  margin: 6px 8px 0;
  padding: 6px 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, #FEF08A 0%, #FDE68A 100%);
  border: 2px solid #B45309;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #451A03;
  flex-shrink: 0;
}

/* --- Compact Desktop Viewport Guard (1280x720 / 1366x768) --- */
@media (max-width: 1480px) {
  .top-hud {
    padding: 4px 8px;
    gap: 4px;
  }

  .hud-left, .hud-currencies, .hud-nav {
    gap: 4px;
  }

  .hud-pill {
    padding: 3px 7px;
    font-size: 11px;
    gap: 3px;
  }

  .hud-weather-name {
    display: none;
  }

  .mode-btn {
    padding: 3px 6px;
    font-size: 10.5px;
  }

  .hud-nav-btn {
    padding: 4px 6px;
    gap: 3px;
    font-size: 11px;
  }

  .hud-nav-btn .nav-icon {
    width: 15px;
    height: 15px;
  }

  .hud-exit-btn {
    padding: 4px 7px;
    font-size: 11px;
  }
}

/* --- Responsive Stack for Narrow Windows (< 900px, Zero Window Size Lock!) --- */
@media (max-width: 900px) {
  html, body, .app-shell {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  .top-hud {
    height: auto;
    flex-wrap: wrap;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .diorama-card {
    height: 210px;
    flex: none;
  }

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