/* TamaBonsai modern HUD + pixel art */
.bst-wrap {
  margin: 0 auto;
  max-width: 1120px;
  color: #1e322d;
  background:
    radial-gradient(circle at 9% 12%, rgba(116, 164, 138, 0.18), transparent 28%),
    radial-gradient(circle at 91% 87%, rgba(207, 154, 91, 0.17), transparent 31%),
    linear-gradient(135deg, #f6f2e9, #e9e2d3);
  border: 1px solid rgba(58, 94, 83, 0.2);
  border-radius: 28px;
  box-shadow: 0 22px 44px rgba(23, 32, 28, 0.18);
  padding: 1.1rem;
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.bst-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.8rem;
}

.bst-head-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.bst-head-btn-fs {
  margin-right: auto;
}

.bst-head-btn {
  padding: 0.62rem 0.9rem;
  font: 800 0.9rem/1 "Manrope", sans-serif;
  border-radius: 12px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bst-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.bst-sub {
  margin-top: 0.2rem;
  color: #4a635b;
  font-size: 0.86rem;
}

.bst-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.9rem 0 1rem;
}

.bst-chip {
  border: 1px solid rgba(54, 91, 80, 0.22);
  background: rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 0.38rem 0.74rem;
  font: 700 0.8rem/1 "Manrope", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.bst-chip-accent {
  background: rgba(223, 164, 96, 0.23);
  border-color: rgba(160, 100, 46, 0.42);
}

.bst-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.bst-column {
  display: grid;
  gap: 1rem;
}

.bst-card {
  border: 1px solid rgba(54, 91, 80, 0.22);
  border-radius: 20px;
  background: rgba(252, 248, 239, 0.84);
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.bst-scene-card {
  display: flex;
  flex-direction: column;
}

.bst-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.bst-card h2 {
  font: 700 1rem/1.2 "Manrope", sans-serif;
}

.bst-card-head span {
  font: 600 0.75rem/1.2 "Manrope", sans-serif;
  color: #4f695f;
}

.bst-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  color: #2d5648;
}

.bst-canvas {
  --season-bg: url("pixel/hiver.png");
  --season-overlay: rgba(120, 150, 190, 0.1);
  --season-border: rgba(170, 196, 221, 0.35);
  position: relative;
  height: auto;
  min-height: 260px;
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--season-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(var(--season-overlay), var(--season-overlay)),
    var(--season-bg);
  background-size: cover;
  background-position: center;
}

.bst-canvas[data-season="winter"] {
  --season-bg: url("pixel/hiver.png");
  --season-overlay: rgba(120, 170, 220, 0.2);
  --season-border: rgba(140, 182, 214, 0.45);
}

.bst-canvas[data-season="spring"] {
  --season-bg: url("pixel/printemps.png");
  --season-overlay: rgba(124, 195, 104, 0.14);
  --season-border: rgba(129, 187, 111, 0.45);
}

.bst-canvas[data-season="summer"] {
  --season-bg: url("pixel/ete.png");
  --season-overlay: rgba(235, 157, 81, 0.18);
  --season-border: rgba(224, 155, 90, 0.48);
}

.bst-canvas[data-season="autumn"] {
  --season-bg: url("pixel/automne.png");
  --season-overlay: rgba(170, 106, 66, 0.2);
  --season-border: rgba(181, 118, 80, 0.46);
}

.bst-pixel-stage {
  position: absolute;
  inset: 0;
}

.bst-pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  position: absolute;
}

.bst-cloud {
  position: absolute;
  top: 20px;
  left: 22px;
  width: 64px;
  height: 20px;
  border-radius: 12px;
  background: rgba(238, 246, 246, 0.75);
  box-shadow:
    14px -8px 0 0 rgba(238, 246, 246, 0.75),
    34px -3px 0 0 rgba(238, 246, 246, 0.72),
    44px 0 0 0 rgba(238, 246, 246, 0.7);
  animation: bst-cloud-drift 16s ease-in-out infinite;
  z-index: 1;
}

.bst-season-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.bst-season-layer.is-spring span {
  position: absolute;
  left: var(--x);
  top: -24px;
  width: 2px;
  height: 18px;
  border-radius: 2px;
  background: rgba(86, 140, 173, 0.68);
  animation: bst-rain var(--d) linear infinite;
  animation-delay: var(--delay);
}

.bst-season-layer.is-summer .bst-sun-glow,
.bst-season-layer.is-summer .bst-sun-core {
  position: absolute;
  right: 16px;
  top: 12px;
  border-radius: 999px;
}

.bst-season-layer.is-summer .bst-sun-glow {
  width: 44px;
  height: 44px;
  background: rgba(248, 214, 122, 0.35);
  animation: bst-pulse 2.4s ease-in-out infinite;
}

.bst-season-layer.is-summer .bst-sun-core {
  width: 20px;
  height: 20px;
  right: 28px;
  top: 24px;
  background: #f5c768;
  box-shadow: 0 0 0 3px rgba(248, 214, 122, 0.35);
}

.bst-season-layer.is-autumn span {
  position: absolute;
  left: var(--x);
  top: -14px;
  width: 8px;
  height: 8px;
  background: #c66b35;
  border-radius: 2px;
  transform: rotate(20deg);
  animation: bst-leaf var(--d) ease-in infinite;
  animation-delay: var(--delay);
}

.bst-season-layer.is-autumn span:nth-child(2n) {
  background: #d18a3b;
}

.bst-season-layer.is-autumn span:nth-child(3n) {
  background: #a94a2a;
}

.bst-season-layer.is-winter span {
  position: absolute;
  left: var(--x);
  top: -14px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(244, 251, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(173, 202, 230, 0.45);
  animation: bst-snow var(--d) linear infinite;
  animation-delay: var(--delay);
}

.bst-pixel-bonsai {
  width: 192px;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  animation: bst-bob 2s steps(2, end) infinite;
  filter: drop-shadow(0 8px 7px rgba(23, 14, 8, 0.35));
  z-index: 2;
}

.bst-pixel-bonsai.is-full {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: none;
  left: 0;
  bottom: 0;
  animation: none;
}

.bst-pixel-badge {
  position: absolute;
  left: 10px;
  bottom: 8px;
  right: 10px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.2;
  color: #f8ebdc;
  background: rgba(28, 18, 10, 0.58);
  border: 1px solid rgba(248, 235, 220, 0.28);
  z-index: 3;
}

.bst-gameover-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 4;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.12);
  font: 900 clamp(2.1rem, 9vw, 5rem) / 1 "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  color: #ff2b2b;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(0, 0, 0, 0.55);
}

.bst-canvas[data-tip="dry"] .bst-pixel-bonsai,
.bst-canvas[data-tip="weak"] .bst-pixel-bonsai {
  filter: drop-shadow(0 8px 7px rgba(23, 14, 8, 0.35)) saturate(0.72);
}

.bst-bars {
  display: grid;
  gap: 0.58rem;
}

.bst-bar {
  display: grid;
  grid-template-columns: 74px 1fr 70px;
  align-items: center;
  gap: 0.5rem;
}

.bst-bar label {
  font: 700 0.79rem/1 "Manrope", sans-serif;
  color: #2d5648;
}

.bst-meter {
  position: relative;
  height: 12px;
  background: rgba(47, 93, 80, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.bst-opt {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  border: 1px solid rgba(67, 170, 98, 0.9);
  background: rgba(124, 216, 137, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(46, 123, 72, 0.35),
    0 0 0 1px rgba(46, 123, 72, 0.15);
}

.bst-fill {
  position: relative;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #6fa8ff, #355fa8);
}

.bst-val {
  font: 700 0.72rem/1.2 "Manrope", sans-serif;
  text-align: right;
  color: #35584d;
}

.bst-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
}

.bst-action-group-title {
  margin: 0.55rem 0 0.4rem;
  font: 800 0.78rem/1 "Manrope", sans-serif;
  color: #2f5d50;
}

.bst-actions-special {
  margin-top: 0.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bst-actions button {
  border: 1px solid rgba(47, 93, 80, 0.35);
  background: linear-gradient(165deg, #fefbf4, #ece1cc);
  color: #26463c;
  border-radius: 12px;
  padding: 0.56rem 0.48rem;
  font: 700 0.76rem/1.2 "Manrope", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.bst-start {
  background: linear-gradient(165deg, #f1f9f2, #cae5ce) !important;
  border-color: rgba(45, 98, 77, 0.48) !important;
  color: #26463c !important;
}

.bst-actions button:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.bst-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bst-action-special.is-active {
  background: linear-gradient(165deg, #e8f7ea, #bde2c3) !important;
  border-color: rgba(41, 121, 67, 0.5) !important;
  color: #1f5b33 !important;
}

.bst-minigame {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(18, 18, 18, 0.55);
  backdrop-filter: blur(2px);
}

.bst-minigame[hidden] {
  display: none !important;
}

.bst-minigame-panel {
  width: min(760px, 100%);
  max-height: min(82vh, 720px);
  overflow: auto;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(54, 91, 80, 0.28);
  background: rgba(255, 251, 242, 0.96);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.bst-minigame-title {
  font-weight: 700;
  font-size: 0.8rem;
}

.bst-minigame-sub {
  margin-top: 3px;
  font-size: 0.72rem;
  color: #44675b;
}

.bst-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bst-node {
  border: 1px solid rgba(54, 91, 80, 0.3);
  border-radius: 10px;
  padding: 8px;
  text-align: left;
  font-size: 12px;
  color: #26463c;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.bst-node span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.85;
}

.bst-node.is-bad {
  border-color: rgba(166, 61, 64, 0.55);
}

.bst-node.is-good {
  border-color: rgba(47, 93, 80, 0.5);
}

.bst-node.is-cut {
  background: rgba(237, 208, 191, 0.86);
}

.bst-minigame-controls {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.bst-minigame-controls button,
.bst-select {
  border: 1px solid rgba(54, 91, 80, 0.34);
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 12px;
  background: #f8f2e7;
  color: #234339;
}

.bst-select {
  padding: 5px 8px;
  background-color: #f8f2e7;
  color: #234339;
  -webkit-appearance: none;
  appearance: none;
}

.bst-select option {
  background: #f8f2e7;
  color: #234339;
}

.bst-list,
.bst-log {
  list-style: none;
  display: grid;
  gap: 0.52rem;
}

.bst-list li,
.bst-log li {
  border: 1px solid rgba(54, 91, 80, 0.22);
  border-radius: 12px;
  padding: 0.56rem 0.62rem;
  background: rgba(255, 255, 255, 0.53);
}

.bst-list strong,
.bst-log time {
  display: block;
  font-size: 0.79rem;
  font-weight: 800;
  color: #2e5b4c;
}

.bst-list span,
.bst-log p {
  font-size: 0.78rem;
  color: #3f6257;
}

.bst-note a {
  color: #2f5d50;
}

.bst-wrap a {
  color: #1f6f4a;
  text-decoration-color: rgba(31, 111, 74, 0.5);
  text-underline-offset: 2px;
}

.bst-wrap a:hover {
  color: #2c8a5e;
  text-decoration-color: rgba(44, 138, 94, 0.75);
}


body.dark .bst-wrap {
  color: var(--card-text);
  background:
    radial-gradient(circle at 9% 12%, rgba(57, 201, 139, 0.12), transparent 30%),
    radial-gradient(circle at 91% 87%, rgba(58, 160, 116, 0.14), transparent 33%),
    linear-gradient(135deg, rgba(8, 40, 26, 0.97), rgba(6, 30, 20, 0.96));
  border-color: rgba(57, 201, 139, 0.35);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
}

body.dark .bst-sub,
body.dark .bst-card-head span,
body.dark .bst-toolbar,
body.dark .bst-action-group-title,
body.dark .bst-bar label,
body.dark .bst-val,
body.dark .bst-list span,
body.dark .bst-log p {
  color: #d6efe3;
}

body.dark .bst-card,
body.dark .bst-list li,
body.dark .bst-log li {
  background: rgba(10, 45, 29, 0.82);
  border-color: rgba(57, 201, 139, 0.3);
}

body.dark .bst-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(57, 201, 139, 0.4);
  color: #e9fff5;
}

body.dark .bst-chip-accent {
  background: rgba(57, 201, 139, 0.18);
  border-color: rgba(57, 201, 139, 0.48);
}

body.dark .bst-meter {
  background: rgba(255, 255, 255, 0.12);
}

body.dark .bst-opt {
  border-color: rgba(117, 228, 152, 0.95);
  background: rgba(75, 176, 104, 0.34);
}

body.dark .bst-fill {
  background: linear-gradient(90deg, #80b6ff, #4a74bf);
}

body.dark .bst-actions button,
body.dark .bst-minigame-controls button,
body.dark .bst-select {
  background: linear-gradient(165deg, #184c35, #103624);
  border-color: rgba(57, 201, 139, 0.42);
  color: #e8fff3;
}

body.dark .bst-select option {
  background: #123925;
  color: #e8fff3;
}

body.dark .bst-start {
  background: linear-gradient(165deg, #1d6f4e, #15583c) !important;
  border-color: rgba(101, 227, 170, 0.56) !important;
  color: #ecfff6 !important;
}

body.dark .bst-action-special.is-active {
  background: linear-gradient(165deg, #1a7f54, #166545) !important;
  border-color: rgba(101, 227, 170, 0.6) !important;
  color: #ecfff6 !important;
}

body.dark .bst-minigame {
  background: rgba(2, 10, 7, 0.72);
}

body.dark .bst-minigame-panel {
  background: rgba(8, 40, 26, 0.97);
  border-color: rgba(57, 201, 139, 0.42);
}

body.dark .bst-node {
  background: rgba(16, 56, 37, 0.95);
  border-color: rgba(57, 201, 139, 0.35);
  color: #e8fff3;
}

body.dark .bst-node.is-cut {
  background: rgba(87, 42, 42, 0.86);
}

body.dark .bst-pixel-badge {
  color: #e8fff3;
  background: rgba(2, 14, 9, 0.62);
  border-color: rgba(121, 228, 173, 0.38);
}

body.dark .bst-wrap a {
  color: #77e2ad;
  text-decoration-color: rgba(119, 226, 173, 0.55);
}

body.dark .bst-wrap a:hover {
  color: #a9f2cf;
  text-decoration-color: rgba(169, 242, 207, 0.78);
}

@keyframes bst-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-3px);
  }
}

@keyframes bst-drift {
  0% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(8px);
  }
  100% {
    transform: translateX(-5px);
  }
}

@keyframes bst-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes bst-cloud-drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(18px);
  }
}

@keyframes bst-rain {
  0% {
    transform: translateY(-6px);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(290px);
    opacity: 0;
  }
}

@keyframes bst-snow {
  0% {
    transform: translate3d(0, -4px, 0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate3d(8px, 292px, 0);
    opacity: 0.2;
  }
}

@keyframes bst-leaf {
  0% {
    transform: translate3d(0, -6px, 0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate3d(14px, 290px, 0) rotate(250deg);
    opacity: 0;
  }
}

.tamabonsai-shell {
  margin: 1.5rem auto 0;
  max-width: 1180px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#bonsai-tamagotchi {
  display: block;
}

@media (max-width: 980px) {
  .bst-layout {
    grid-template-columns: 1fr;
  }

  .bst-canvas {
    min-height: 300px;
  }

  .bst-bar {
    grid-template-columns: 70px 1fr 74px;
  }
}

@media (max-width: 820px) {
  .tamabonsai-shell {
    margin-top: 1rem;
    padding: 0;
    border-radius: 0;
  }

  .bst-wrap {
    padding: 0.75rem;
    border-radius: 16px;
  }

  .bst-headline {
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .bst-head-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .bst-head-btn {
    min-height: 38px;
    padding: 0.46rem 0.72rem;
    font-size: 0.82rem;
    border-radius: 10px;
  }

  .bst-topbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin: 0.55rem 0 0.8rem;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .bst-chip {
    min-height: 36px;
    justify-content: center;
    font-size: 0.74rem;
    padding: 0.3rem 0.5rem;
    flex: 0 0 auto;
  }

  .bst-chip .bst-select {
    min-height: 34px;
  }

  .bst-toolbar {
    gap: 0.4rem;
    font-size: 0.8rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .bst-toolbar > * {
    flex: 0 0 auto;
  }

  .bst-actions:not(.bst-actions-special) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bst-actions.bst-actions-special {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bst-actions button {
    min-height: 40px;
    font-size: 0.78rem;
    padding: 0.42rem 0.5rem;
    border-radius: 10px;
  }

  .bst-minigame {
    padding: 0.6rem;
  }

  .bst-minigame-panel {
    width: 100%;
    max-height: 90vh;
    padding: 0.75rem;
    border-radius: 12px;
  }

  .bst-grid {
    grid-template-columns: 1fr;
  }

  .bst-node {
    min-height: 50px;
    font-size: 12px;
  }

  .bst-minigame-controls button {
    min-height: 38px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .bst-wrap,
  .bst-card,
  .bst-card h2,
  .bst-chip,
  .bst-toolbar,
  .bst-action-group-title,
  .bst-actions button,
  .bst-bar label,
  .bst-val,
  .bst-list strong,
  .bst-log time,
  .bst-list span,
  .bst-log p {
    line-height: 1.05;
  }

  .tamabonsai-shell {
    margin-top: 0.7rem;
    padding: 0;
    border-radius: 0;
  }

  .bst-wrap {
    border-radius: 12px;
    padding: 0.55rem;
  }

  .bst-column {
    gap: 0.48rem;
  }

  .bst-card {
    border-radius: 14px;
    padding: 0.55rem;
  }

  .bst-card-head {
    margin-bottom: 0.28rem;
  }

  .bst-card h2 {
    font-size: 0.96rem;
  }

  .bst-headline {
    margin-bottom: 0.22rem;
    flex-direction: column;
    align-items: stretch;
  }

  .bst-actions {
    grid-template-columns: 1fr;
  }

  .bst-chip {
    font-size: 0.7rem;
    padding: 0.28rem 0.45rem;
  }

  .bst-head-actions {
    gap: 0.38rem;
    justify-content: stretch;
  }

  .bst-head-btn {
    min-height: 34px;
    padding: 0.4rem 0.58rem;
    font-size: 0.76rem;
    flex: 1 1 0;
  }

  .bst-topbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.32rem;
    overflow: visible;
    margin: 0.26rem 0 0.32rem;
  }

  .bst-chip {
    min-height: 34px;
    font-size: 0.68rem;
    padding: 0.22rem 0.35rem;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .bst-chip .bst-select {
    max-width: 100%;
    width: 100%;
    min-height: 30px;
    font-size: 0.72rem;
    padding: 0.2rem 0.35rem;
  }

  .bst-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 0.28rem;
    margin-bottom: 0.28rem;
    font-size: 0.73rem;
    overflow: visible;
  }

  .bst-toolbar > * {
    min-width: 0;
  }

  .bst-toolbar .bst-select {
    min-height: 30px;
    font-size: 0.78rem;
    padding: 0.2rem 0.35rem;
  }

  .bst-action-group-title {
    margin: 0.24rem 0 0.16rem;
    font-size: 0.74rem;
  }

  .bst-actions button {
    min-height: 34px;
    font-size: 0.72rem;
    padding: 0.32rem 0.38rem;
    border-radius: 9px;
  }

  .bst-actions:not(.bst-actions-special) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem;
  }

  .bst-actions.bst-actions-special {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem;
  }

  .bst-bar {
    grid-template-columns: 56px 1fr 58px;
    gap: 0.2rem;
  }

  .bst-bar label {
    font-size: 0.73rem;
  }

  .bst-val {
    font-size: 0.65rem;
  }

  .bst-canvas {
    min-height: 165px;
    max-height: 165px;
  }

  .bst-pixel-badge {
    font-size: 10px;
    padding: 3px 6px;
  }

  .bst-gameover-overlay {
    font-size: clamp(1.9rem, 16vw, 3.5rem);
  }
}

@media (max-width: 420px) {
  .bst-topbar,
  .bst-toolbar,
  .bst-actions:not(.bst-actions-special),
  .bst-actions.bst-actions-special {
    grid-template-columns: 1fr;
  }
}
