:root {
  --bg-0: #0a0a0a;
  --bg-1: #101010;
  --bg-2: #171717;
  --window: #111111;
  --window-soft: #181818;
  --panel: #121212;
  --line: #4d4d4d;
  --line-soft: #2b2b2b;
  --text: #f2f2f2;
  --muted: #bdbdbd;
  --accent: #d9d9d9;
  --accent-2: #9f9f9f;
  --max: 920px;
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  font-size: 93.75%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-0);
}

.bg-photo {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2.2s ease;
  z-index: 0;
}

.bg-photo.is-active {
  opacity: 1;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: none;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: none;
}

.wrap,
.site-footer {
  position: relative;
  z-index: 2;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 14px 16px;
}

.explorer-window {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--window);
  box-shadow: 0 20px 60px rgba(6, 3, 12, 0.65);
}

.explorer-window.floating {
  position: fixed;
  margin: 0;
  z-index: 15;
}

.window-bar {
  min-height: 42px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  background: #1a1a1a;
  cursor: grab;
  touch-action: none;
}

.window-bar.dragging {
  cursor: grabbing;
}

body.window-dragging {
  user-select: none;
}

.window-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.dot {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  width: 9px;
  height: 9px;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.dot:hover,
.dot:focus-visible {
  transform: scale(1.14);
  filter: brightness(1.08);
}

.pfp-flood {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.pfp-flood.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.pfp-flood.is-visible {
  opacity: 1;
  visibility: visible;
}

.pfp-flood-item {
  position: absolute;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  animation: flood-pop 0.42s ease forwards;
}

@keyframes flood-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.78);
}

.game-modal.is-hidden {
  display: none;
}

.game-card {
  width: min(390px, 100%);
  border: 1px solid #383838;
  border-radius: 3px;
  background: #111111;
  padding: 14px;
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.game-head h2 {
  margin: 0;
  font-size: 1rem;
}

.game-close {
  width: 28px;
  height: 28px;
  border: 1px solid #444;
  border-radius: 2px;
  background: #1d1d1d;
  color: #efefef;
  cursor: pointer;
}

.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #e8e8e8;
  margin-bottom: 8px;
}

.game-hud p {
  margin: 0;
  font-size: 0.84rem;
}

.balance-reset {
  margin-left: 8px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #4a4a4a;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #3a3a3a 0%, #1f1f1f 78%);
  color: #dddddd;
  font-size: 0.9rem;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.balance-reset:hover,
.balance-reset:focus-visible {
  border-color: #686868;
  background: radial-gradient(circle at 35% 30%, #4a4a4a 0%, #2a2a2a 78%);
}

.balance-reset:active {
  transform: scale(0.94);
}

.balance-reset iconify-icon {
  font-size: 0.98rem;
}

.mines-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.mines-controls label {
  display: grid;
  gap: 4px;
  font-size: 0.76rem;
  color: #d9d9d9;
}

.mines-controls input {
  width: 100%;
  min-height: 30px;
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  background: #191919;
  color: #f2f2f2;
  padding: 0 8px;
  font: inherit;
}

.mines-controls input:focus {
  outline: none;
  border-color: #5aa4f1;
}

.mines-action {
  align-self: end;
  min-height: 30px;
  border: 1px solid #2f6a4f;
  border-radius: 2px;
  background: #173225;
  color: #dcffe8;
  font: inherit;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
}

.mines-action:hover,
.mines-action:focus-visible {
  border-color: #40a36f;
  background: #1f4432;
}

#gameState {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #d4d4d4;
  min-height: 18px;
}

.game-stage {
  position: relative;
}

.mines-overlay {
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2;
}

.mines-overlay.show {
  opacity: 1;
  transform: scale(1);
}

.mines-overlay.win {
  background: rgba(23, 50, 37, 0.72);
  border: 1px solid #3fa36f;
  color: #d4ffe8;
}

.mines-overlay.lose {
  background: rgba(72, 22, 22, 0.72);
  border: 1px solid #b34444;
  color: #ffd7d7;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 2px solid #353535;
  border-radius: 2px;
  background: #0f0f0f;
}

.mine-tile {
  aspect-ratio: 1 / 1;
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  background: linear-gradient(180deg, #2a2a2a, #202020);
  color: #eaeaea;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.mine-tile:hover:enabled {
  transform: translateY(-1px);
  border-color: #5b8fe0;
}

.mine-tile:disabled {
  cursor: default;
}

.mine-tile.safe {
  background: linear-gradient(180deg, #2f6a4f, #224d3a);
  border-color: #3fa36f;
  color: #8ce7ff;
}

.mine-tile.mine {
  background: linear-gradient(180deg, #7a2a2a, #5f1f1f);
  border-color: #b34444;
  color: #ffd7d7;
}

.mine-tile.pop {
  animation: tile-pop 0.18s ease;
}

.mine-tile.hidden-ended {
  opacity: 0.7;
}

@keyframes tile-pop {
  from {
    transform: scale(0.9);
    opacity: 0.6;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.dot.red {
  background: #ff5f57;
}

.dot.yellow {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.window-title {
  margin: 0;
  font-size: 0.84rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: #e8e8e8;
  letter-spacing: 0.02em;
  text-align: left;
}

.workspace {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 520px;
}

.sidebar {
  border-right: 1px solid var(--line-soft);
  background: #131313;
  padding: 12px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 2px;
  border: 1px solid var(--line-soft);
  background: #181818;
}

.sidebar-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: #c7c7c7;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.profile-card h1 {
  margin: 3px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f0f0f0;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  animation: avatar-spin 8s linear infinite;
  cursor: pointer;
}

.avatar:hover {
  animation-play-state: paused;
}

.avatar.fast-spin {
  animation-duration: 1.2s;
}

@keyframes avatar-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.sidebar-meta {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 12px 0 14px;
}

.places {
  display: grid;
  gap: 8px;
}

.places .nav-folder-btn {
  display: inline-flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  color: #e4e4e4;
  font: inherit;
  background: transparent;
  padding: 7px 8px;
  border-radius: 2px;
  border: 1px solid #3057b7;
  background: #18243f;
  text-align: left;
  cursor: pointer;
}

.places .nav-folder-btn:hover,
.places .nav-folder-btn:focus-visible,
.places .nav-folder-btn.active {
  border-color: #4a7df0;
  background: #203058;
}

.main-pane {
  background: #111111;
  padding: 12px;
}

.toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.toolbar-nav {
  display: inline-flex;
  gap: 5px;
}

.nav-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 2px;
  border: 1px solid #2f6a4f;
  background: #173225;
  color: #dcffe8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-icon-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.nav-icon-btn:not(:disabled):hover,
.nav-icon-btn:not(:disabled):focus-visible {
  border-color: #40a36f;
  background: #1f4432;
}

.pathbar {
  min-height: 32px;
  flex: 1 1 280px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: #1a1a1a;
  color: #ededed;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pathbar .crumb {
  padding: 3px 7px;
  border-radius: 1px;
}

.pathbar .crumb.current {
  background: #2a2a2a;
  color: #ffffff;
}

.pathbar iconify-icon {
  color: #989898;
  font-size: 0.92rem;
}

.info-file {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: #171717;
  padding: 10px;
  margin-bottom: 10px;
}

.explorer-view.is-hidden {
  display: none;
}

.root-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.folder-tile {
  min-height: 92px;
  border-radius: 2px;
  border: 1px solid var(--line-soft);
  background: #2f2411;
  color: #efefef;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.folder-tile iconify-icon {
  font-size: 1.4rem;
  color: #ffc76a;
}

.folder-tile span {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.74rem;
}

.folder-tile:hover,
.folder-tile:focus-visible {
  transform: translateY(-2px);
  border-color: #d89a35;
}

.file-name {
  margin: 0;
  color: #e3e3e3;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.info-file p {
  margin: 8px 0 0;
  line-height: 1.45;
  color: var(--muted);
}

.folder {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: #161616;
  padding: 10px;
}

.folder + .folder {
  margin-top: 10px;
}

.folder-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #efefef;
  margin-bottom: 8px;
}

.folder-head h2 {
  font-size: 0.95rem;
  margin: 0;
}

.file-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.file-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.file-card {
  min-height: 80px;
  border-radius: 2px;
  border: 1px solid var(--line-soft);
  background: #2f1428;
  text-decoration: none;
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.file-card iconify-icon {
  font-size: 1.35rem;
  color: #ffa7dd;
}

.file-card span {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  text-align: center;
}

.file-card:hover,
.file-card:focus-visible {
  transform: translateY(-2px);
  border-color: #e06db9;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 22px;
  color: #bdbdbd;
  font-size: 0.84rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.show {
    transition: none;
    transform: none;
    filter: none;
    opacity: 1;
  }

  .avatar {
    animation: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(2px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

@media (max-width: 980px) {
  .window-bar,
  .window-bar.dragging {
    cursor: default;
    touch-action: auto;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .file-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.game-section.is-hidden {
  display: none;
}

.roulette-controls {
  display: grid;
  grid-template-columns: 1fr repeat(6, auto);
  gap: 8px;
  margin-bottom: 8px;
}

.roulette-controls label {
  display: grid;
  gap: 4px;
  font-size: 0.76rem;
  color: #d9d9d9;
}

.roulette-controls input {
  width: 100%;
  min-height: 30px;
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  background: #191919;
  color: #f2f2f2;
  padding: 0 8px;
  font: inherit;
}

.roulette-controls input:focus {
  outline: none;
  border-color: #5aa4f1;
}

.dice-controls {
  display: grid;
  grid-template-columns: 1fr repeat(6, auto);
  gap: 8px;
  margin-bottom: 8px;
}

.dice-controls label {
  display: grid;
  gap: 4px;
  font-size: 0.76rem;
  color: #d9d9d9;
}

.dice-controls input {
  width: 100%;
  min-height: 30px;
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  background: #191919;
  color: #f2f2f2;
  padding: 0 8px;
  font: inherit;
}

.dice-controls input:focus {
  outline: none;
  border-color: #5aa4f1;
}

.roulette-pick {
  align-self: end;
  min-height: 30px;
  border: 2px solid #3a3a3a;
  border-radius: 2px;
  background: #1a1a1a;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  padding: 0 8px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.18s ease;
  font-size: 0.75rem;
}

.roulette-pick:hover,
.roulette-pick:focus-visible {
  transform: translateY(-1px);
  border-color: #5a7f9e;
}

.roulette-pick.selected {
  background: #4a7df0;
  border-color: #6ab7ff;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(106, 183, 255, 0.4);
}

.dice-pick {
  align-self: end;
  min-height: 30px;
  border: 2px solid #3a3a3a;
  border-radius: 2px;
  background: #1a1a1a;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  padding: 0 8px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.18s ease;
  font-size: 0.75rem;
}

.dice-pick:hover,
.dice-pick:focus-visible {
  transform: translateY(-1px);
  border-color: #686868;
}

.dice-pick.selected {
  background: #3a3a3a;
  border-color: #8a8a8a;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(180, 180, 180, 0.28);
}

.dice-range {
  font-size: 0.65rem;
  padding: 0 6px;
}

#diceState {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #d4d4d4;
  min-height: 18px;
}

.dice-display {
  width: 180px;
  height: 180px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border: 2px solid #4a4a4a;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.dice-face {
  font-size: 6rem;
  animation: none;
  transition: transform 0.1s ease;
}

.dice-face.rolling {
  animation: dice-roll 0.1s infinite;
}

@keyframes dice-roll {
  0%, 100% { transform: rotateX(0deg) rotateY(0deg); }
  25% { transform: rotateX(10deg) rotateY(10deg); }
  50% { transform: rotateX(20deg) rotateY(-10deg); }
  75% { transform: rotateX(-10deg) rotateY(20deg); }
}

.dice-action {
  width: 100%;
  min-height: 36px;
  border: 1px solid #4b4b4b;
  border-radius: 2px;
  background: #1a1a1a;
  color: #e2e2e2;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.18s ease;
  font-size: 0.9rem;
}

.dice-action:not(:disabled):hover,
.dice-action:not(:disabled):focus-visible {
  border-color: #6c6c6c;
  background: #242424;
}

.dice-action:disabled {
  opacity: 0.6;
  cursor: default;
}

.dice-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2;
}

.dice-overlay.show {
  opacity: 1;
  transform: scale(1);
}

.dice-overlay.win {
  background: rgba(30, 180, 100, 0.72);
  border: 1px solid #3fc876;
  color: #d4ffe8;
}

.dice-overlay.lose {
  background: rgba(120, 30, 30, 0.72);
  border: 1px solid #d84444;
  color: #ffd7d7;
}

.crash-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2;
}

.crash-overlay.show {
  opacity: 1;
  transform: scale(1);
}

.crash-overlay.win {
  background: rgba(30, 180, 100, 0.72);
  border: 1px solid #3fc876;
  color: #d4ffe8;
}

.crash-overlay.lose {
  background: rgba(120, 30, 30, 0.72);
  border: 1px solid #d84444;
  color: #ffd7d7;
}

.crash-display {
  position: relative;
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, #1a1a1a 0%, #141414 100%);
  border: 1px solid #333;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.crash-graph {
  position: absolute;
  inset: 0;
  border-radius: 2px;
}

.crash-multiplier {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, #6ec86e, #7cd97c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: 1;
}

.crash-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.crash-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.crash-controls input {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  color: var(--text);
  padding: 4px 8px;
  border-radius: var(--radius);
  width: 80px;
  font-size: 0.85rem;
}

.crash-controls input:focus {
  outline: none;
  border-color: var(--line);
  background: var(--window-soft);
}

.crash-action {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.015em;
  transition: all 0.12s ease;
}

.crash-action:hover:not(:disabled) {
  background: linear-gradient(135deg, #242424 0%, #181818 100%);
  border-color: var(--line);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.crash-action:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.crash-action:disabled {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 680px) {
  .wrap {
    padding: 10px 10px 12px;
  }

  .window-bar {
    grid-template-columns: 1fr auto;
    padding: 5px 8px;
  }

  .window-title {
    font-size: 0.8rem;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .toolbar-nav {
    align-self: flex-start;
  }

  .pathbar {
    flex: 1 1 100%;
    width: 100%;
  }

  .sidebar,
  .main-pane {
    padding: 10px;
  }

  .game-modal {
    padding: 10px;
  }

  .game-card {
    width: min(96vw, 360px);
    padding: 10px;
  }

  .game-hud {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .mines-controls {
    grid-template-columns: 1fr;
  }

  .mines-action {
    min-height: 34px;
  }

  .file-grid,
  .file-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .root-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  html {
    font-size: 90%;
  }

  .wrap {
    padding: 8px;
  }

  .window-title {
    font-size: 0.74rem;
  }

  .window-actions {
    gap: 6px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  .toolbar {
    gap: 6px;
  }

  .nav-icon-btn {
    width: 28px;
    height: 28px;
  }

  .pathbar {
    min-height: 30px;
    font-size: 0.72rem;
  }

  .profile-card {
    padding: 8px;
  }

  .profile-card h1 {
    font-size: 1.12rem;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .game-modal {
    padding: 8px;
  }

  .game-card {
    width: 100%;
    padding: 8px;
    border-radius: 2px;
  }

  .game-head h2 {
    font-size: 0.9rem;
  }

  .game-hud p {
    font-size: 0.78rem;
  }

  .file-grid,
  .file-grid.two-up {
    grid-template-columns: 1fr;
  }

  .root-grid {
    grid-template-columns: 1fr;
  }
}
