:root {
  --bg: #07080a;
  --ink: #e8e0d2;
  --mute: #8a8278;
  --line: rgba(232, 224, 210, 0.12);
  --glow: #c4f5c0;
  --hot: #e8c07a;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
}

.stage {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
}

.topbar, .dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 1.1rem;
  z-index: 2;
}
.topbar {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7,8,10,.92), transparent);
}
.dock {
  border-top: 1px solid var(--line);
  background: rgba(7,8,10,.96);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.mark {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.mark b { color: var(--glow); font-weight: 600; }

.vitals {
  display: flex;
  gap: 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--mute);
}
.vitals strong { color: var(--ink); font-weight: 500; }

.needs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0 1.1rem 0.45rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.needs span { display: flex; align-items: center; gap: 0.35rem; }
.needs i {
  display: block;
  width: 44px;
  height: 4px;
  background: rgba(232,224,210,0.12);
  border-radius: 2px;
  overflow: hidden;
}
.needs i::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--p, 20%);
  background: var(--glow);
}
.needs [data-k="hunger"] i::after { background: #e8c07a; }
.needs [data-k="warmth"] i::after { background: #50a0e6; }
.needs [data-k="hp"] i::after { background: #e07a7a; }
.needs [data-k="fear"] i::after { background: #c89be8; }
.skills [data-k] i::after { background: var(--glow); }
.pack {
  display: flex;
  gap: 0.85rem;
  padding: 0 1.1rem 0.45rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  flex-wrap: wrap;
}
.pack b { color: var(--ink); font-weight: 500; }
.needs i { position: relative; }
.needs i::after { position: absolute; left: 0; top: 0; }

.xp-bar {
  height: 3px;
  background: rgba(232, 224, 210, 0.08);
  z-index: 2;
}
.xp-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--glow);
  box-shadow: 0 0 12px rgba(196, 245, 192, 0.55);
  transition: width 0.6s ease;
}
.evolve-flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(196,245,192,.22), transparent 62%);
  animation: evolve-pop 1.4s ease-out forwards;
}
.evolve-flash span {
  font-family: var(--mono);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 1.4rem;
  color: var(--glow);
  text-shadow: 0 0 24px rgba(196,245,192,.8);
}
@keyframes evolve-pop {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

.field {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
#body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}
#body.is-panning { cursor: grabbing; }

.thoughts {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-height: 38%;
  overflow: auto;
  pointer-events: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(7,8,10,.9);
  mask-image: linear-gradient(to bottom, transparent, #000 18%);
}
.thoughts p { margin: 0.35rem 0 0; opacity: 0.55; }
.thoughts p:last-child { opacity: 1; color: var(--glow); }

.acts button {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.32rem 0.55rem;
  cursor: pointer;
  white-space: nowrap;
}
.acts button:hover {
  border-color: var(--glow);
  color: var(--glow);
}
.acts { display: flex; gap: 0.3rem; flex-wrap: nowrap; }
.speed {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.speed input[type="range"] {
  width: 120px;
  accent-color: var(--glow);
}
.speed span { color: var(--ink); min-width: 2.4rem; }
.zoom {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--mute);
}
.zoom button {
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1;
  width: 1.6rem;
  height: 1.6rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
}
.zoom button:hover { border-color: var(--glow); color: var(--glow); }
.zoom #zoom-fit { width: auto; padding: 0 0.55rem; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; }
.zoom span { color: var(--ink); min-width: 3.2rem; text-align: center; }

.hint {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 22rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-feel="hurt"] .mark b,
body[data-feel="lonely"] .mark b { color: #9bb4d4; }
body[data-feel="alive"] .mark b,
body[data-feel="warm"] .mark b { color: var(--glow); }
body[data-feel="wired"] .mark b,
body[data-feel="afraid"] .mark b { color: var(--hot); }

@media (max-width: 900px) {
  .dock { flex-wrap: wrap; }
  .hint { max-width: none; width: 100%; }
  .vitals { flex-wrap: wrap; gap: 0.45rem 0.9rem; }
  .thoughts { max-height: 32%; font-size: 0.78rem; }
}

/* ==========================================================================
   Stage 1 HUD restyle (visual only: glass panels, chips, bars, buttons).
   Layout/structure of the dock is intentionally unchanged.
   ========================================================================== */
:root {
  --bg: #06080b;
  --ink: #ece6da;
  --mute: #8f97a3;
  --line: rgba(236, 230, 218, 0.1);
  --glass: rgba(12, 16, 22, 0.62);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --glow: #b9f5b4;
  --hot: #f0c27a;
  --radius: 12px;
}
body {
  background: radial-gradient(120% 80% at 50% 0%, #0d131c 0%, var(--bg) 60%);
  -webkit-font-smoothing: antialiased;
}
.topbar {
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.88), rgba(10, 14, 20, 0.7));
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 1.1rem;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.2em;
}
.mark::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px var(--glow), 0 0 22px rgba(185, 245, 180, 0.45);
  animation: gloop-pulse 2.6s ease-in-out infinite;
}
body[data-feel="hurt"] .mark::before { background: #9bb4d4; box-shadow: 0 0 10px #9bb4d4; }
body[data-feel="afraid"] .mark::before { background: var(--hot); box-shadow: 0 0 12px var(--hot); }
@keyframes gloop-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.72); opacity: 0.7; }
}
.vitals { gap: 0.4rem; }
.vitals > span {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--glass-hi);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.vitals strong { color: var(--ink); font-weight: 600; }

.needs, .pack {
  background: rgba(10, 14, 20, 0.7);
  padding-top: 0.35rem;
}
.needs { gap: 0.5rem 1.1rem; }
.needs span { gap: 0.45rem; }
.needs i {
  width: 58px;
  height: 6px;
  border-radius: 999px;
  background: rgba(236, 230, 218, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.needs i::after {
  border-radius: 999px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px currentColor;
}
.needs [data-k="hunger"] i::after { background: linear-gradient(90deg, #c9964a, #f3cf85); color: rgba(243, 207, 133, 0.5); }
.needs [data-k="warmth"] i::after { background: linear-gradient(90deg, #3d7fc4, #7cc0f5); color: rgba(124, 192, 245, 0.5); }
.needs [data-k="hp"] i::after { background: linear-gradient(90deg, #c05252, #f09a8a); color: rgba(240, 154, 138, 0.5); }
.needs [data-k="fear"] i::after { background: linear-gradient(90deg, #8f68c8, #d0a8f5); color: rgba(208, 168, 245, 0.5); }
.skills [data-k] i::after { background: linear-gradient(90deg, #6fcf7a, var(--glow)); color: rgba(185, 245, 180, 0.45); }
.pack {
  gap: 0.35rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}
.pack span {
  padding: 0.16rem 0.5rem;
  border-radius: 7px;
  background: var(--glass-hi);
  border: 1px solid var(--line);
}
.pack b { color: var(--glow); font-weight: 600; }

.thoughts {
  z-index: 2;
  right: auto;
  width: min(560px, calc(100% - 2rem));
  padding: 0.55rem 0.9rem 0.7rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.66), rgba(10, 14, 20, 0.84));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  text-shadow: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), #000 18%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), #000 18%);
}
.thoughts:empty { display: none; }
.thoughts p { opacity: 0.82; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85); }
.thoughts p:last-child {
  opacity: 1;
  color: var(--glow);
  text-shadow: 0 0 14px rgba(185, 245, 180, 0.35);
}
.thoughts p:last-child::before { content: '› '; color: var(--mute); }

.dock {
  background: linear-gradient(0deg, rgba(8, 11, 16, 0.98), rgba(12, 16, 22, 0.92));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 0.55rem 1.1rem;
  scrollbar-width: thin;
}
.acts { gap: 0.35rem; }
.acts button, .zoom button {
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(236, 230, 218, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.08s, box-shadow 0.15s;
}
.acts button { padding: 0.42rem 0.7rem; }
.acts button:hover, .zoom button:hover {
  border-color: rgba(185, 245, 180, 0.6);
  color: var(--glow);
  background: linear-gradient(180deg, rgba(185, 245, 180, 0.14), rgba(185, 245, 180, 0.04));
  box-shadow: 0 0 0 3px rgba(185, 245, 180, 0.08), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.acts button:active, .zoom button:active { transform: translateY(1px) scale(0.98); }
.acts button:focus-visible, .zoom button:focus-visible, .speed input:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
}
.acts [data-torment="zap"]:hover, .acts [data-torment="storm"]:hover { border-color: rgba(170, 190, 255, 0.7); color: #c9d4ff; background: linear-gradient(180deg, rgba(150, 170, 255, 0.16), rgba(150, 170, 255, 0.04)); }
.acts [data-torment="wolf"]:hover, .acts [data-torment="trip"]:hover, .acts [data-torment="steal"]:hover { border-color: rgba(240, 150, 130, 0.65); color: #ffb8a8; background: linear-gradient(180deg, rgba(240, 120, 100, 0.14), rgba(240, 120, 100, 0.04)); }
.acts #act-reset { border-style: dashed; color: var(--mute); }
.acts #act-reset:hover { color: var(--hot); border-color: rgba(240, 194, 122, 0.6); background: rgba(240, 194, 122, 0.08); }
.speed input[type="range"] { accent-color: var(--glow); }
.speed span, .zoom span {
  padding: 0.14rem 0.45rem;
  border-radius: 6px;
  background: var(--glass-hi);
  text-align: center;
}
.hint { color: #a3abb6; }
.bolt-flash { z-index: 1; }

/* ==========================================================================
   Keyboard shortcuts overlay (js/keys.js) + no-WebGL / no-JS fallback
   (index.html #gl-fallback, <noscript>). Reuses the HUD variables above.
   ========================================================================== */
.gk-hint {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  z-index: 3;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1;
  color: var(--mute);
  background: var(--glass, rgba(12, 16, 22, 0.62));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.gk-hint:hover, .gk-hint:focus-visible { opacity: 1; color: var(--glow); border-color: rgba(185, 245, 180, 0.6); }
.gk-hint:focus-visible, .gk-close:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.acts button.gk-keyed, .zoom button.gk-keyed {
  border-color: rgba(185, 245, 180, 0.7);
  color: var(--glow);
  box-shadow: 0 0 0 3px rgba(185, 245, 180, 0.14);
}
.gk-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 6, 9, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: gk-fade 0.14s ease-out;
}
.gk-overlay[hidden] { display: none; }
@keyframes gk-fade { from { opacity: 0; } to { opacity: 1; } }
.gk-panel {
  width: min(560px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem 1.2rem 0.9rem;
  border-radius: var(--radius, 12px);
  background: linear-gradient(180deg, rgba(14, 19, 27, 0.96), rgba(8, 11, 16, 0.97));
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 var(--glass-hi, rgba(255, 255, 255, 0.06));
  color: var(--ink);
  font-family: var(--font);
  scrollbar-width: thin;
}
.gk-panel:focus { outline: none; }
.gk-panel header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.gk-panel h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--glow);
}
.gk-close {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.32rem 0.6rem;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(236, 230, 218, 0.12);
  cursor: pointer;
}
.gk-close:hover { color: var(--glow); border-color: rgba(185, 245, 180, 0.6); }
.gk-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1.4rem; }
.gk-body section { min-width: 0; }
.gk-body h3 {
  margin: 0.7rem 0 0.3rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.gk-body dl { margin: 0; }
.gk-body dl > div { display: flex; align-items: baseline; gap: 0.7rem; padding: 0.18rem 0; border-top: 1px solid var(--line); }
.gk-body dt { flex: 0 0 6.6rem; white-space: nowrap; }
.gk-body dd { margin: 0; font-size: 0.8rem; color: var(--ink); }
.gk-sep { color: var(--mute); font-family: var(--mono); font-size: 0.62rem; }
.gk-panel kbd {
  display: inline-block;
  min-width: 1.35rem;
  padding: 0.08rem 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-align: center;
  color: var(--glow);
  background: var(--glass-hi, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
}
.gk-foot { margin: 0.8rem 0 0; font-family: var(--mono); font-size: 0.6rem; color: var(--mute); }
@media (max-width: 560px) { .gk-body { grid-template-columns: 1fr; } }
html.no-webgl .gk-hint { display: none; }

.gl-fallback {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  overflow: auto;
  background: radial-gradient(120% 80% at 50% 0%, #0d131c 0%, #06080b 60%);
  color: #ece6da;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-family: var(--font);
}
.gl-fallback[hidden] { display: none !important; }
.gl-fallback-card {
  width: min(520px, 100%);
  padding: 1.5rem 1.6rem 1.3rem;
  border-radius: 12px;
  border-radius: var(--radius, 12px);
  background: linear-gradient(180deg, rgba(14, 19, 27, 0.92), rgba(8, 11, 16, 0.95));
  border: 1px solid rgba(236, 230, 218, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.gl-fallback-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8f97a3;
  color: var(--mute);
}
.gl-fallback-mark::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f0c27a;
  background: var(--hot);
  box-shadow: 0 0 10px var(--hot);
}
.gl-fallback h1 {
  margin: 0.8rem 0 0.6rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #b9f5b4;
  color: var(--glow);
}
.gl-fallback p { margin: 0 0 0.8rem; font-size: 0.92rem; line-height: 1.55; }
.gl-fallback ul { margin: 0; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.55; color: var(--mute); }
.gl-fallback li { margin: 0.2rem 0; }
.gl-fallback b { color: var(--ink); font-weight: 600; }
html.no-webgl .stage { visibility: hidden; }

/* ==========================================================================
   Quick-select hotbar (js/hotbar.js) + action toast (js/keys.js).
   Bottom-right of the field on wide screens (clear of the thoughts log),
   a right-hand column on medium widths, hidden on phones / touch.
   ========================================================================== */
.gk-hotbar {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: var(--radius, 12px);
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.45), rgba(10, 14, 20, 0.78));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.gk-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 3.05rem;
  height: 3.05rem;
  padding: 0.35rem 0.05rem 0.25rem;
  border-radius: 9px;
  font-family: var(--mono);
  color: var(--mute);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(236, 230, 218, 0.1);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.gk-slot svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gk-glyph { font-size: 0.9rem; line-height: 1; text-transform: uppercase; }
.gk-num {
  position: absolute;
  top: 0.16rem;
  left: 0.3rem;
  font-size: 0.55rem;
  line-height: 1;
  color: var(--mute);
  opacity: 1;
}
.gk-lbl {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.5rem;
  letter-spacing: 0;
  text-transform: uppercase;
}
.gk-slot:hover { color: var(--ink); border-color: rgba(185, 245, 180, 0.4); }
.gk-slot:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.gk-slot.is-active {
  color: var(--glow);
  border-color: rgba(185, 245, 180, 0.75);
  background: linear-gradient(180deg, rgba(185, 245, 180, 0.18), rgba(185, 245, 180, 0.05));
  box-shadow: 0 0 0 2px rgba(185, 245, 180, 0.12), 0 0 16px rgba(185, 245, 180, 0.18);
}
.gk-slot.is-active .gk-num { color: var(--glow); }
.gk-slot.gk-pulse { animation: gk-pulse 0.32s ease-out; }
@keyframes gk-pulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(185, 245, 180, 0.55); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); box-shadow: 0 0 0 10px rgba(185, 245, 180, 0); }
}
.gk-sep-v { width: 1px; margin: 0.35rem 0.1rem; background: var(--line); }
.gk-mute[aria-pressed="true"] { color: var(--hot); }
.gk-mute[hidden] { display: none; }

.gk-toast {
  position: absolute;
  top: 0.8rem;
  left: 50%;
  z-index: 4;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(10, 14, 20, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.gk-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.gk-toast[data-tone="confirm"] { color: var(--glow); border-color: rgba(185, 245, 180, 0.35); }
.gk-toast[data-tone="blocked"] { color: var(--hot); border-color: rgba(240, 194, 122, 0.35); }
html.no-webgl .gk-toast { top: auto; bottom: 1rem; }

@media (max-width: 1180px) {
  .gk-hotbar {
    top: 3rem;
    bottom: auto;
    right: 0.8rem;
    flex-direction: column;
    max-height: calc(100% - 4rem);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .gk-slot { width: 2.5rem; height: 2.3rem; padding-top: 0.2rem; }
  .gk-lbl { display: none; }
  .gk-sep-v { width: auto; height: 1px; margin: 0.1rem 0.35rem; }
}
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .gk-hotbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gk-slot, .gk-toast, .gk-hint { transition: none; }
  .gk-slot.gk-pulse { animation: gk-pulse-rm 0.3s linear; }
  .gk-toast, .gk-toast.is-on { transform: translate(-50%, 0); }
  .gk-overlay { animation: none; }
}
@keyframes gk-pulse-rm { 0% { background: rgba(185, 245, 180, 0.3); } 100% { background: transparent; } }
/* keys/hotbar: also honour the a11y panel's "reduce motion" switch (js/a11y.js) */
html.a11y-rm-on .gk-slot, html.a11y-rm-on .gk-toast, html.a11y-rm-on .gk-hint { transition: none; }
html.a11y-rm-on .gk-slot.gk-pulse { animation: gk-pulse-rm 0.3s linear; }
html.a11y-rm-on .gk-toast, html.a11y-rm-on .gk-toast.is-on { transform: translate(-50%, 0); }
html.a11y-rm-on .gk-overlay { animation: none; }
