/* Cube Isle theme. Colours come from each island (biome.hud); pixel font for titles only. */
:root {
  --font: 'Rubik', system-ui, sans-serif;
  --title-font: 'Press Start 2P', 'Rubik', monospace;
  --radius: 14px;
  --page: #ffd29c;
}

body { background: var(--page); }

/* The pixel font is wide, so titles get smaller sizes and room to breathe. */
.brand { font-size: 11px; line-height: 1.6; }
.title { font-size: 22px; line-height: 1.45; }
.result-title { font-size: 17px; line-height: 1.5; }
.problem, .topic-sign { font-family: var(--font); }

.key, .topic, .big-button, .ghost-button, .toggle, .lang { border-radius: 10px; }
.answer { border-radius: 10px; border-style: solid; }

/* Scrollable island dock. Keep it to one row so the island stays visible behind it. */
.isles {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: max-content;
  max-width: calc(100% - 425px);
  display: flex;
  gap: 4px;
  padding: 5px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #ffffff78 transparent;
  border: 1px solid #ffffff54;
  border-radius: 15px;
  background: #15201dbd;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px #100d204c;
  z-index: 1;
}
.isles:empty, body:has(.hud[data-screen='sheet']) .isles { display: none; }
.isle {
  display: grid;
  justify-items: center;
  gap: 4px;
  flex: 0 0 64px;
  padding: 7px 3px;
  border-radius: 9px;
  background: #ffffff0d;
  color: #fbfff8;
  text-decoration: none;
  transition: background-color 160ms ease;
}
.isle:hover { background: #ffffff2b; }
.isle:focus-visible { outline: 2px solid white; outline-offset: -2px; }
.isle.active { background: var(--accent); color: var(--accent-ink); }
.isle-icon { width: 32px; height: 32px; image-rendering: pixelated; }
.isle-name { font-size: 11px; font-weight: 800; white-space: nowrap; }

@media (max-width: 859px) {
  .title { font-size: 18px; }
  .isles { left: 50%; top: 64px; bottom: auto; max-width: calc(100% - 20px); transform: translateX(-50%); }
  .isle { flex-basis: 44px; height: 44px; padding: 0; align-content: center; }
  .isle-icon { width: 28px; height: 28px; }
  .isle-name { display: none; }
}

@media (max-width: 480px) {
  .brand { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) { .isle { transition: none; } }
