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

:root {
  --bg:        #0d0f14;
  --surface:   #161a22;
  --surface2:  #1e2433;
  --border:    #2a3042;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --radius:    8px;

  /* class colors */
  --c-penicillin:   #3b82f6;
  --c-cephalosporin:#14b8a6;
  --c-carbapenem:   #a855f7;
  --c-mrsa:         #ef4444;
  --c-atypical:     #f97316;
  --c-fluoroquinolone: #eab308;
  --c-anaerobe:     #a16207;
  --c-uti:          #22c55e;
  --c-antifungal:   #ec4899;

  --timer-h: 6px;
  --shelf-tile-w: 120px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Screens ── */
.screen { display: none; flex-direction: column; height: 100%; }
.screen.active { display: flex; }

/* ── START SCREEN ── */
#start-screen {
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: radial-gradient(ellipse at center, #1a1f2e 0%, var(--bg) 70%);
}

.logo { text-align: center; }
.logo h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--c-cephalosporin), var(--c-penicillin));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo p { color: var(--muted); font-size: 1.1rem; margin-top: 8px; }

.mode-cards { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; max-width: 760px; }

.mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 220px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  text-align: center;
}
.mode-card:hover {
  border-color: var(--c-cephalosporin);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(20,184,166,0.15);
}
.mode-card .icon { font-size: 2.2rem; margin-bottom: 12px; }
.mode-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.mode-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

.progress-bar-wrap { width: 480px; max-width: 90vw; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.mini-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.mini-bar-fill { height: 100%; background: linear-gradient(90deg, var(--c-cephalosporin), var(--c-penicillin)); border-radius: 3px; transition: width 0.4s; }

/* ── GAME SCREEN ── */
#game-screen { flex-direction: column; overflow: hidden; }

/* Timer bar */
#timer-bar-wrap {
  height: var(--timer-h);
  background: var(--border);
  flex-shrink: 0;
  position: relative;
}
#timer-bar {
  height: 100%;
  background: var(--c-cephalosporin);
  width: 100%;
  transition: width 0.5s linear, background 0.5s;
}
#timer-bar.warn { background: var(--c-fluoroquinolone); }
#timer-bar.danger { background: var(--c-mrsa); }

/* Top strip */
#game-top {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

/* Case panel */
#case-panel {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}
#case-panel .case-mode {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-cephalosporin);
  margin-bottom: 4px;
}
#case-panel .case-summary {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 8px;
}
#case-panel .case-task {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-atypical);
}
#case-panel .constraints-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.constraint-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  font-weight: 600;
}

/* Vitals panel */
#vitals-panel {
  width: 170px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vital-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}
.vital-label { color: var(--muted); font-size: 0.72rem; }
.vital-value { font-weight: 700; font-family: 'Courier New', monospace; }
.vital-value.abnormal { color: var(--c-mrsa); }
.vital-value.borderline { color: var(--c-fluoroquinolone); }
.vital-value.normal { color: var(--c-uti); }

/* Pulse animation */
@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 0.8; }
  50%      { transform: scale(1.6); opacity: 1; }
}
.pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--c-mrsa);
  border-radius: 50%;
  animation: pulse-dot 0.9s ease-in-out infinite;
  margin-left: 4px;
}
.spo2-dot { background: var(--c-penicillin); }

/* Bug strip */
#bug-strip {
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
#bug-strip .strip-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.bug-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s;
  cursor: default;
}
.bug-tag.lit {
  animation: bug-lit 0.6s ease forwards;
}
@keyframes bug-lit {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  50%  { box-shadow: 0 0 16px 4px currentColor; }
  100% { box-shadow: 0 0 8px 2px currentColor; border-color: currentColor; }
}

/* Main area */
#main-area {
  display: flex;
  flex: 1;
  gap: 0;
  overflow: hidden;
}

/* Shelf */
#shelf-area {
  width: 340px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 10px;
  background: var(--surface);
}
#shelf-area::-webkit-scrollbar { width: 4px; }
#shelf-area::-webkit-scrollbar-track { background: transparent; }
#shelf-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.shelf-class-group { margin-bottom: 12px; }
.shelf-class-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 2px 6px;
  margin-bottom: 6px;
}
.shelf-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drug-tile {
  width: 110px;
  background: var(--surface2);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: grab;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, opacity 0.3s;
  user-select: none;
  position: relative;
}
.drug-tile:active { cursor: grabbing; transform: scale(0.96); }
.drug-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

.drug-tile .tile-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.drug-tile .tile-class {
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 3px;
}
.drug-tile .tile-color-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
}

.drug-tile.dragging { opacity: 0.4; transform: scale(0.92); }
.drug-tile.too-broad::after {
  content: 'TOO BROAD';
  position: absolute;
  top: 2px; right: 2px;
  font-size: 0.5rem;
  font-weight: 800;
  background: rgba(234,179,8,0.2);
  color: var(--c-fluoroquinolone);
  padding: 1px 4px;
  border-radius: 3px;
}
.drug-tile.reserved::after {
  content: 'RESERVE';
  position: absolute;
  top: 2px; right: 2px;
  font-size: 0.5rem;
  font-weight: 800;
  background: rgba(168,85,247,0.2);
  color: var(--c-carbapenem);
  padding: 1px 4px;
  border-radius: 3px;
}
.drug-tile.warning-qt::after {
  content: '⚠ QT';
  position: absolute;
  top: 2px; right: 2px;
  font-size: 0.52rem;
  font-weight: 800;
  background: rgba(239,68,68,0.2);
  color: var(--c-mrsa);
  padding: 1px 4px;
  border-radius: 3px;
}
.drug-tile.flash-correct {
  animation: flash-correct 0.7s ease;
}
.drug-tile.flash-warning {
  animation: flash-warning 0.7s ease;
}
@keyframes flash-correct {
  0%,100% { box-shadow: none; }
  40%      { box-shadow: 0 0 18px 4px var(--c-uti); }
}
@keyframes flash-warning {
  0%,100% { box-shadow: none; }
  40%      { box-shadow: 0 0 18px 4px var(--c-mrsa); }
}

/* Loadout */
#loadout-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#loadout-drop-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#loadout-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: 10px;
  min-height: 80px;
  color: var(--muted);
  font-size: 0.85rem;
  transition: border-color 0.2s;
  padding: 20px;
  text-align: center;
}
#loadout-empty.drag-over {
  border-color: var(--c-cephalosporin);
  background: rgba(20,184,166,0.05);
}

.loadout-slot {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  position: relative;
  transition: border-color 0.2s;
}
.loadout-slot .slot-drug-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.slot-color-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.slot-remove {
  position: absolute;
  top: 10px; right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.slot-remove:hover { color: var(--c-mrsa); background: rgba(239,68,68,0.1); }

.slot-controls {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* Dial */
.dial-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dial-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: 82px;
  user-select: none;
}
.dial-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 7px 0;
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1;
  transition: color 0.1s, background 0.1s;
}
.dial-btn:not(:disabled):hover { color: var(--text); background: var(--border); }
.dial-btn:disabled { cursor: default; }
.dial-value {
  padding: 4px 6px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  text-align: center;
  min-width: 80px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: default;
  transition: color 0.1s;
}
.dial-value.dial-flash {
  color: var(--c-cephalosporin);
}

/* Route toggle */
.route-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  height: 32px;
}
.route-btn {
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.route-btn.active {
  background: var(--border);
  color: var(--text);
}

/* Duration row */
#duration-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
#duration-row .dur-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

/* Submit */
#submit-btn {
  background: linear-gradient(135deg, var(--c-cephalosporin), #0d9488);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 4px;
}
#submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
#submit-btn:active { transform: translateY(0); }

/* Culture Drop banner */
#culture-banner {
  display: none;
  background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(59,130,246,0.15));
  border: 1px solid rgba(168,85,247,0.4);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 14px;
}
#culture-banner.visible { display: block; }
.culture-banner-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-carbapenem);
  margin-bottom: 6px;
}
.culture-banner-organism {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.susc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.susc-chip {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.susc-chip.S { background: rgba(34,197,94,0.15); color: #86efac; }
.susc-chip.R { background: rgba(239,68,68,0.15); color: #fca5a5; }
.susc-chip.I { background: rgba(234,179,8,0.15); color: #fde047; }

/* ── FEEDBACK SCREEN ── */
#feedback-screen {
  overflow-y: auto;
  padding: 24px;
  background: var(--bg);
}
#feedback-screen::-webkit-scrollbar { width: 6px; }
#feedback-screen::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.fb-header h2 { font-size: 1.5rem; font-weight: 800; }
.fb-overall {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 20px;
}
.fb-overall.pass { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.fb-overall.partial { background: rgba(234,179,8,0.15); color: #fde047; border: 1px solid rgba(234,179,8,0.3); }
.fb-overall.fail { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }

.fb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 640px) { .fb-grid { grid-template-columns: 1fr; } }

.fb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.fb-card h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}
.fb-regimen-item {
  font-size: 0.88rem;
  font-family: 'Courier New', monospace;
  margin-bottom: 4px;
  color: var(--text);
}

/* Score bars */
.score-axis {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.axis-name {
  font-size: 0.78rem;
  width: 110px;
  flex-shrink: 0;
  color: var(--text);
}
.axis-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.axis-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.axis-score {
  font-size: 0.78rem;
  font-weight: 700;
  width: 36px;
  text-align: right;
  font-family: 'Courier New', monospace;
}

.fb-teaching {
  background: linear-gradient(135deg, rgba(20,184,166,0.08), rgba(59,130,246,0.08));
  border: 1px solid rgba(20,184,166,0.2);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.fb-teaching h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-cephalosporin);
  margin-bottom: 8px;
}
.fb-teaching p { font-size: 0.88rem; line-height: 1.6; color: var(--text); }

.fb-pitfall-list {
  list-style: none;
  margin-top: 6px;
}
.fb-pitfall-list li {
  font-size: 0.82rem;
  color: #fca5a5;
  padding: 3px 0;
  display: flex;
  gap: 6px;
}
.fb-pitfall-list li::before { content: '⚠'; flex-shrink: 0; }

.fb-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.fb-btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}
.fb-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.fb-btn-primary {
  background: linear-gradient(135deg, var(--c-cephalosporin), #0d9488);
  color: white;
}
.fb-btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ── Color helpers ── */
.clr-blue     { color: var(--c-penicillin) !important; }
.clr-teal     { color: var(--c-cephalosporin) !important; }
.clr-purple   { color: var(--c-carbapenem) !important; }
.clr-red      { color: var(--c-mrsa) !important; }
.clr-orange   { color: var(--c-atypical) !important; }
.clr-yellow   { color: var(--c-fluoroquinolone) !important; }
.clr-brown    { color: var(--c-anaerobe) !important; }
.clr-green    { color: var(--c-uti) !important; }

.bg-blue     { background: var(--c-penicillin) !important; }
.bg-teal     { background: var(--c-cephalosporin) !important; }
.bg-purple   { background: var(--c-carbapenem) !important; }
.bg-red      { background: var(--c-mrsa) !important; }
.bg-orange   { background: var(--c-atypical) !important; }
.bg-yellow   { background: var(--c-fluoroquinolone) !important; }
.bg-brown    { background: var(--c-anaerobe) !important; }
.bg-green    { background: var(--c-uti) !important; }

/* bug tag bg variants */
.bug-bg-blue   { background: rgba(59,130,246,0.18); border-color: rgba(59,130,246,0.4); color: #93c5fd; }
.bug-bg-teal   { background: rgba(20,184,166,0.18); border-color: rgba(20,184,166,0.4); color: #5eead4; }
.bug-bg-purple { background: rgba(168,85,247,0.18); border-color: rgba(168,85,247,0.4); color: #d8b4fe; }
.bug-bg-red    { background: rgba(239,68,68,0.18);  border-color: rgba(239,68,68,0.4);  color: #fca5a5; }
.bug-bg-orange { background: rgba(249,115,22,0.18); border-color: rgba(249,115,22,0.4); color: #fdba74; }
.bug-bg-yellow { background: rgba(234,179,8,0.18);  border-color: rgba(234,179,8,0.4);  color: #fde047; }
.bug-bg-brown  { background: rgba(161,98,7,0.25);   border-color: rgba(161,98,7,0.5);   color: #fde68a; }
.bug-bg-green  { background: rgba(34,197,94,0.18);  border-color: rgba(34,197,94,0.4);  color: #86efac; }
.bug-bg-teal-purple {
  background: linear-gradient(90deg, rgba(20,184,166,0.18), rgba(168,85,247,0.18));
  border-color: rgba(168,85,247,0.4);
  color: #d8b4fe;
}

/* drug tile border by class */
.drug-tile.class-blue   { border-color: rgba(59,130,246,0.3); }
.drug-tile.class-teal   { border-color: rgba(20,184,166,0.3); }
.drug-tile.class-purple { border-color: rgba(168,85,247,0.3); }
.drug-tile.class-red    { border-color: rgba(239,68,68,0.3); }
.drug-tile.class-orange { border-color: rgba(249,115,22,0.3); }
.drug-tile.class-yellow { border-color: rgba(234,179,8,0.3); }
.drug-tile.class-brown  { border-color: rgba(161,98,7,0.5); }
.drug-tile.class-green  { border-color: rgba(34,197,94,0.3); }

.drug-tile:hover.class-blue   { border-color: var(--c-penicillin); }
.drug-tile:hover.class-teal   { border-color: var(--c-cephalosporin); }
.drug-tile:hover.class-purple { border-color: var(--c-carbapenem); }
.drug-tile:hover.class-red    { border-color: var(--c-mrsa); }
.drug-tile:hover.class-orange { border-color: var(--c-atypical); }
.drug-tile:hover.class-yellow { border-color: var(--c-fluoroquinolone); }
.drug-tile:hover.class-brown  { border-color: var(--c-anaerobe); }
.drug-tile:hover.class-green  { border-color: var(--c-uti); }

/* legend */
#color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.legend-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  color: var(--muted);
}
.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Drag ghost */
#drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  background: var(--surface2);
  border: 2px solid var(--c-cephalosporin);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  opacity: 0.9;
  display: none;
  white-space: nowrap;
}

/* Tooltip */
.tile-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0a0c12;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  z-index: 100;
  min-width: 160px;
  max-width: 220px;
  white-space: normal;
  line-height: 1.4;
}
.drug-tile:hover .tile-tooltip { display: block; }

/* Scrollbar styling */
#loadout-area::-webkit-scrollbar { width: 4px; }
#loadout-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Notifications ── */
#notif-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}
.notif {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--text);
  animation: notif-in 0.3s ease;
  max-width: 280px;
}
.notif.success { border-color: rgba(34,197,94,0.4); color: #86efac; }
.notif.warn    { border-color: rgba(234,179,8,0.4); color: #fde047; }
.notif.error   { border-color: rgba(239,68,68,0.4); color: #fca5a5; }
@keyframes notif-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Responsive tweaks ── */
@media (max-width: 780px) {
  #shelf-area { width: 100%; max-height: 220px; border-right: none; border-bottom: 1px solid var(--border); }
  #main-area  { flex-direction: column; }
  #vitals-panel { display: none; }
  body { overflow: auto; }
}
