:root {
  color-scheme: dark;
  --bg-top: #050d15;
  --bg-bottom: #02060b;
  --panel: rgba(7, 18, 29, 0.82);
  --panel-strong: rgba(8, 20, 32, 0.92);
  --panel-soft: rgba(10, 24, 38, 0.7);
  --panel-line: rgba(173, 225, 255, 0.12);
  --panel-line-strong: rgba(173, 225, 255, 0.2);
  --ink: #e8f7ff;
  --muted: #89aabd;
  --brand: #7de0f8;
  --brand-strong: #38bddf;
  --coral: #ff9871;
  --gold: #ffd979;
  --seafoam: #92e1c4;
  --danger: #ff8498;
  --lcd-bg-top: #bdf7ea;
  --lcd-bg-bottom: #7edccf;
  --lcd-line: rgba(15, 84, 88, 0.28);
  --lcd-ink: #0d5f62;
  --lcd-ink-strong: #0a474d;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% 16%, rgba(69, 150, 209, 0.12), transparent 18%),
    radial-gradient(circle at 78% 78%, rgba(40, 90, 132, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body {
  user-select: none;
}

button,
input {
  font: inherit;
}

input {
  color: var(--ink);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 4px;
}

.app-shell,
.tank-page {
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
}

.tank-page {
  display: block;
}

.aquarium-card {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
}

.tank-stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  height: min(100dvh, calc(100vw * 9 / 16));
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  touch-action: none;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(6, 28, 46, 0.96), rgba(3, 10, 18, 0.98));
  box-shadow: none;
}

#tankCanvas,
#grimeCanvas,
#glassCanvas,
.tank-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tank-overlay {
  pointer-events: none;
}

.tank-display,
.tank-sidebar,
.tank-bottom-dock,
.edit-decor-tray,
.fish-inspector,
.store-overlay,
.hardware-accel-overlay,
.tank-nav-button,
.daily-bonus-bell {
  pointer-events: auto;
}

.edit-quick-ref {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 5;
  pointer-events: none;
}

.edit-quick-ref[hidden] {
  display: none !important;
}

.edit-quick-ref-card {
  display: grid;
  gap: 8px;
  min-width: 248px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(7, 19, 30, 0.56);
  border: 1px solid rgba(188, 225, 246, 0.2);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.3;
}

.edit-quick-ref-card strong {
  display: inline-block;
  min-width: 94px;
  color: #f6fbff;
}

.tank-display {
  position: absolute;
  top: 8px;
  left: 8px;
  width: min(292px, 23vw);
  padding: 5px;
  border-radius: 0;
  border: 4px solid rgba(8, 12, 16, 0.96);
  background: linear-gradient(180deg, rgba(221, 255, 246, 0.92), rgba(140, 224, 208, 0.9));
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-family: "Consolas", "Courier New", monospace;
  color: var(--lcd-ink-strong);
  z-index: 4;
}

.display-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, var(--lcd-bg-top), var(--lcd-bg-bottom));
  border: 1px solid rgba(10, 71, 77, 0.22);
}

.display-cell {
  display: grid;
  gap: 3px;
  padding: 8px 8px 6px;
  min-height: 58px;
  border-left: 1px solid rgba(10, 71, 77, 0.26);
}

.display-cell:first-child {
  border-left: 0;
}

.display-label {
  font-size: 0.6rem;
  color: rgba(10, 71, 77, 0.76);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.display-cell strong {
  color: var(--lcd-ink-strong);
  font-size: 1.28rem;
  line-height: 1;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}

.tab-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: stretch;
  padding: 0 0 0 0;
  margin-bottom: -1px;
  pointer-events: auto;
}

.tab-button,
.icon-button,
.buy-button,
.small-button,
.background-card button,
.dock-button {
  border: 0;
  cursor: pointer;
  transition:
    transform var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.tab-button:hover,
.icon-button:hover,
.buy-button:hover,
.small-button:hover,
.background-card button:hover,
.dock-button:hover {
  transform: translateY(-1px);
}

.tab-button {
  flex: 1 1 0;
  min-width: 0;
  padding: 13px 16px 12px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, rgba(7, 20, 31, 0.7), rgba(5, 15, 25, 0.9));
  color: rgba(232, 247, 255, 0.74);
  font-weight: 800;
  box-shadow:
    inset 0 0 0 1px rgba(173, 225, 255, 0.12),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

.tab-button.active {
  background: linear-gradient(180deg, rgba(11, 28, 44, 0.98), rgba(8, 22, 35, 0.98));
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px rgba(173, 225, 255, 0.18),
    0 10px 26px rgba(0, 0, 0, 0.22);
}

.tank-sidebar {
  position: absolute;
  top: 112px;
  left: 0;
  width: min(380px, 29vw);
  bottom: 94px;
  display: flex;
  flex-direction: column;
  transition: transform 240ms ease;
  z-index: 3;
  overflow: visible;
}

.tank-sidebar.is-collapsed {
  transform: translateX(calc(-100% - 8px));
}

.tank-panel-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  margin-right: -8px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(6, 18, 30, 0.92), rgba(8, 22, 36, 0.98));
  border: 1px solid var(--panel-line-strong);
  border-left: 0;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  scrollbar-gutter: stable;
}

.tank-panel-shell::-webkit-scrollbar {
  width: 10px;
}

.tank-panel-shell::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.tank-panel-shell::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.sidebar-toggle {
  position: absolute;
  top: calc(50% - 68px);
  right: -48px;
  width: 42px;
  height: 136px;
  border-radius: 0 18px 18px 0;
  border: 1px solid var(--panel-line-strong);
  border-left: 0;
  background: linear-gradient(180deg, rgba(9, 24, 38, 0.96), rgba(6, 18, 29, 0.86));
  color: var(--ink);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: var(--shadow);
  white-space: normal;
  line-height: 1;
  text-align: center;
  display: grid;
  place-items: center;
  padding: 10px 6px;
}

.tab-panel {
  display: none;
  gap: 12px;
  padding: 16px 16px 18px;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.tab-panel>#fishList,
.tab-panel>#decorWorkspace,
.tab-panel>#fishShop,
.tab-panel>#decorShop {
  flex: 0 0 auto;
  margin-top: 0;
}

.tab-panel[data-panel="fish"]>.panel-heading.with-action,
.tab-panel[data-panel="decor"]>.panel-heading.with-action {
  position: sticky;
  top: -16px;
  z-index: 5;
  align-self: start;
  height: auto;
  min-height: 0;
  margin: -16px -16px 4px;
  padding: 16px 16px 12px;
  background: linear-gradient(180deg, rgba(10, 24, 38, 0.98), rgba(9, 23, 36, 0.92));
  border-bottom: 1px solid rgba(173, 225, 255, 0.08);
}

.panel-heading,
.with-action,
.footer-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.panel-heading-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.collapsible-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.collapsible-toggle.is-disabled,
.collapsible-toggle:disabled {
  opacity: 0.45;
  cursor: default;
}

.collapsible-title {
  font-size: 1rem;
  font-weight: 800;
}

.collapsible-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.collapsible-icon {
  flex-shrink: 0;
}

.collapsible-section [data-collapsible-body] {
  margin-top: 12px;
}

.collapsible-section [data-collapsible-body][hidden] {
  display: none !important;
}

.collapsible-section[data-collapsible-section="decorTankShell"] {
  display: none !important;
}

.collapsible-section[data-collapsible-section="decorBackgrounds"],
.collapsible-section[data-collapsible-section="decorFilter"],
.collapsible-section[data-collapsible-section="decorGravel"],
.collapsible-section[data-collapsible-section="decorCustomGravel"] {
  display: none !important;
}

.daily-bonus-bell,
.tank-nav-button {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
  border: 0;
  color: #f6fbff;
}

.daily-bonus-bell {
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.35rem;
  background: rgba(7, 20, 31, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.tank-nav-button {
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 20px;
  font-size: 2rem;
  line-height: 1;
  background: rgba(7, 20, 31, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  opacity: 0.2;
  transition:
    opacity var(--transition),
    transform var(--transition),
    background var(--transition);
}

.tank-nav-button:hover,
.tank-nav-button:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.tank-nav-button-left {
  left: 18px;
}

.tank-nav-button-right {
  right: 18px;
}

.panel-heading p,
.fish-meta,
.empty-state,
.mini-note,
.rule-list,
.event-feed,
.summary-card p,
.shop-meta {
  color: var(--muted);
}

.tank-overlay-hints {
  position: absolute;
  top: 86px;
  left: 8px;
  right: auto;
  bottom: auto;
  display: flex;
  justify-content: flex-start;
  width: min(420px, calc(100% - 16px));
  max-width: min(420px, calc(100% - 16px));
  transform: none;
  z-index: 5;
}

.tank-stage.has-edit-decor-tray .tank-overlay-hints {
  top: 86px;
}

.placement-hint {
  width: 100%;
  min-height: 24px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(7, 19, 30, 0.76);
  border: 1px solid var(--panel-line);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.edit-decor-tray {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 86px;
  z-index: 9;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(72, 92, 114, 0.045), rgba(48, 65, 83, 0.035));
  border: 1px solid rgba(188, 225, 246, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.012),
    0 12px 24px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(3px);
}

.edit-decor-tray[hidden] {
  display: none !important;
}

.edit-fish-tray-context-menu {
  position: absolute;
  z-index: 12;
  min-width: 188px;
  max-width: min(240px, calc(100vw - 32px));
}

.edit-fish-tray-context-menu[hidden] {
  display: none !important;
}

.edit-fish-tray-context-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(123, 223, 248, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(10, 25, 38, 0.96), rgba(7, 18, 29, 0.94));
  border: 1px solid rgba(188, 225, 246, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
}

.edit-fish-tray-context-copy {
  display: grid;
  gap: 2px;
}

.edit-fish-tray-context-copy strong {
  color: #f4fbff;
  font-size: 0.88rem;
  line-height: 1.2;
}

.edit-fish-tray-context-copy span {
  color: rgba(216, 241, 255, 0.78);
  font-size: 0.76rem;
  line-height: 1.2;
}

.edit-fish-tray-context-action {
  min-height: 38px;
  border: 1px solid rgba(188, 225, 246, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f4fbff;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.edit-fish-tray-context-action:hover,
.edit-fish-tray-context-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(188, 225, 246, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.edit-fish-tray-context-action.warn {
  border-color: rgba(255, 164, 130, 0.24);
  background: linear-gradient(180deg, rgba(112, 42, 28, 0.96), rgba(90, 31, 21, 0.94));
}

.edit-fish-tray-context-action.warn:hover,
.edit-fish-tray-context-action.warn:focus-visible {
  border-color: rgba(255, 184, 157, 0.36);
  background: linear-gradient(180deg, rgba(126, 48, 32, 0.98), rgba(101, 35, 24, 0.96));
}

.edit-fish-tray-context-action:disabled {
  cursor: default;
  opacity: 0.58;
}

.edit-decor-tray-scroller {
  min-width: 0;
  display: flex;
  gap: 11px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 6px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(188, 225, 246, 0.34) transparent;
}

.edit-decor-tray-scroller::-webkit-scrollbar {
  height: 8px;
}

.edit-decor-tray-scroller::-webkit-scrollbar-track {
  background: transparent;
}

.edit-decor-tray-scroller::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(188, 225, 246, 0.3);
}

.edit-decor-tray-arrow {
  width: 52px;
  height: 92px;
  border-radius: 28px;
  border: 1px solid rgba(188, 225, 246, 0.16);
  background: linear-gradient(180deg, rgba(10, 24, 37, 0.26), rgba(7, 18, 29, 0.24));
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 12px 26px rgba(0, 0, 0, 0.16);
}

.edit-decor-tile {
  position: relative;
  min-width: 92px;
  max-width: 92px;
  height: 92px;
  padding: 0;
  border: 0;
  background: transparent;
  flex: 0 0 auto;
  cursor: pointer;
}

.edit-decor-tile::before {
  content: attr(data-decor-name);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(7, 19, 30, 0.86);
  border: 1px solid rgba(188, 225, 246, 0.22);
  color: #f3fbff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.edit-decor-tile:hover::before,
.edit-decor-tile:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.edit-decor-tile-surface {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(188, 225, 246, 0.14);
  background:
    radial-gradient(circle at 50% 14%, rgba(188, 225, 246, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(88, 109, 131, 0.64), rgba(70, 89, 109, 0.52));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -18px 28px rgba(18, 29, 43, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.edit-decor-tile:hover .edit-decor-tile-surface,
.edit-decor-tile:focus-visible .edit-decor-tile-surface {
  transform: translateY(-1px);
}

.edit-decor-tray.has-context-menu .edit-decor-tile::before {
  opacity: 0;
}

.edit-decor-tile.is-context-open .edit-decor-tile-surface {
  border-color: rgba(123, 223, 248, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(123, 223, 248, 0.16),
    inset 0 -18px 28px rgba(18, 29, 43, 0.14),
    0 0 0 3px rgba(123, 223, 248, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.edit-decor-tile.is-active .edit-decor-tile-surface {
  border-color: rgba(255, 217, 121, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 217, 121, 0.18),
    inset 0 -18px 28px rgba(18, 29, 43, 0.14),
    0 0 0 3px rgba(255, 217, 121, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.edit-decor-tile-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.18));
}

.edit-decor-tile-count {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: #d8f1ff;
  font-size: 0.95rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(8, 12, 16, 0.6);
}

.edit-decor-tile:disabled,
.edit-decor-tile.is-disabled {
  cursor: default;
  opacity: 0.5;
}

.inventory-tray-tile-surface {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 12%, color-mix(in srgb, var(--tray-accent, rgba(188, 225, 246, 0.28)) 32%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(88, 109, 131, 0.64), rgba(70, 89, 109, 0.52));
}

.inventory-tray-thumb {
  position: static;
  width: 52px;
  height: 52px;
  transform: none;
  left: auto;
  top: auto;
}

.inventory-tray-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.18));
}

.inventory-tray-label {
  max-width: 100%;
  color: #f3fbff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

.inventory-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(188, 225, 246, 0.12);
  background: linear-gradient(180deg, rgba(17, 31, 45, 0.42), rgba(12, 22, 33, 0.4));
}

.inventory-card-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  padding: 6px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 44%),
    linear-gradient(180deg, rgba(158, 220, 255, 0.18), rgba(78, 126, 156, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.utility-confirm-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(188, 225, 246, 0.12);
  background: linear-gradient(180deg, rgba(17, 31, 45, 0.42), rgba(12, 22, 33, 0.4));
}

.utility-confirm-copy {
  display: grid;
  gap: 8px;
  max-width: 42ch;
}

.utility-confirm-copy strong {
  color: #f3fbff;
  font-size: 1.04rem;
}

.utility-confirm-copy .fish-meta {
  line-height: 1.55;
}

.utility-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.edit-decor-tray-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.edit-decor-tray-empty {
  padding: 16px 8px;
}

.tool-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  pointer-events: none;
  z-index: 8;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.28));
  font-size: 2.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-cursor::before,
.tool-cursor::after {
  content: none;
  display: none;
}

.tank-bottom-dock {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 999px;
  background: rgba(5, 17, 27, 0.84);
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.dock-button {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: linear-gradient(180deg, rgba(19, 42, 60, 0.94), rgba(10, 24, 37, 0.92));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dock-button.edit-shortcut-control {
  display: none;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.dock-button.debug {
  background: linear-gradient(180deg, rgba(255, 220, 92, 0.98), rgba(231, 177, 38, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(122, 83, 8, 0.24),
    0 4px 10px rgba(164, 116, 14, 0.18);
}

.dock-button.is-active {
  box-shadow:
    inset 0 0 0 2px rgba(255, 217, 121, 0.62),
    0 0 0 3px rgba(255, 217, 121, 0.14),
    0 0 18px rgba(255, 217, 121, 0.24);
}

.dock-button:disabled,
.buy-button:disabled,
.small-button:disabled,
.background-card button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.fish-inspector {
  position: absolute;
  top: 118px;
  right: 24px;
  width: min(330px, 29vw);
}

.fish-inspector[hidden] {
  display: none;
}

.fish-inspector-card,
.info-card,
.summary-card,
.fish-card,
.mini-card,
.shop-card,
.background-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.fish-inspector-card,
.info-card,
.summary-card,
.fish-card,
.mini-card,
.shop-card {
  padding: 16px;
  border-radius: 20px;
}

.fish-inspector-card {
  background: linear-gradient(180deg, rgba(10, 24, 38, 0.94), rgba(7, 18, 29, 0.94));
}

.fish-inspector-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.fish-inspector-header h2 {
  margin-bottom: 0;
}

.inspector-species {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.close-inspector {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.icon-button {
  min-width: 52px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 217, 121, 0.18), rgba(255, 255, 255, 0.05));
  color: var(--ink);
  font-weight: 800;
}

.icon-button.icon-only {
  min-width: 48px;
  padding: 10px 12px;
  font-size: 1.2rem;
  line-height: 1;
}

.icon-button.is-active {
  box-shadow:
    inset 0 0 0 2px rgba(125, 224, 248, 0.34),
    0 0 0 6px rgba(125, 224, 248, 0.08);
}

.inspector-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.inspector-field span {
  color: var(--muted);
  font-size: 0.84rem;
}

.inspector-field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.inspector-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.inspector-stat {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.inspector-stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.fish-inspector-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.summary-grid {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  color: var(--ink);
  font-size: 1rem;
}

.rule-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}

.event-feed,
.card-stack,
.mini-card-stack,
.shop-drawer {
  display: grid;
  gap: 12px;
}

.event-line {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-drawer {
  align-content: start;
}

.shop-drawer.is-open {
  margin-bottom: 0;
}

.store-overlay {
  position: absolute;
  inset: 0;
  z-index: 14;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(4, 10, 16, 0.56);
}

.store-overlay[hidden] {
  display: none !important;
}

.hardware-accel-overlay {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(125, 224, 248, 0.12), transparent 42%),
    rgba(3, 8, 14, 0.82);
  backdrop-filter: blur(10px);
}

.hardware-accel-overlay[hidden] {
  display: none !important;
}

.tutorial-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 28px;
  pointer-events: auto;
}

.tutorial-overlay[hidden] {
  display: none !important;
}

.tutorial-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 224, 248, 0.12), transparent 42%),
    rgba(3, 8, 14, 0.48);
  backdrop-filter: blur(4px);
}

.tutorial-overlay.is-focus-step::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 224, 248, 0.08), transparent 42%),
    rgba(3, 8, 14, 0.18);
  backdrop-filter: none;
}

.tutorial-panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 24px));
  display: grid;
  gap: 18px;
  padding: 24px 24px 22px;
  border-radius: 24px;
  border: 1px solid rgba(173, 225, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(8, 21, 34, 0.98), rgba(5, 14, 23, 0.96));
  box-shadow:
    0 28px 68px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tutorial-copy {
  display: grid;
  gap: 10px;
}

.tutorial-kicker {
  margin: 0;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tutorial-copy h2,
.tutorial-copy p {
  margin: 0;
}

.tutorial-copy p {
  color: rgba(232, 247, 255, 0.9);
  line-height: 1.6;
}

.tutorial-actions {
  display: flex;
  justify-content: center;
}

.tutorial-actions .small-button {
  min-width: 140px;
}

.tutorial-arrow {
  position: absolute;
  width: 92px;
  height: 92px;
  z-index: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
  animation: tutorial-arrow-blink 1s ease-in-out infinite;
}

.tutorial-arrow::before,
.tutorial-arrow::after {
  content: "";
  position: absolute;
}

.tutorial-arrow.is-left::before,
.tutorial-arrow.is-right::before {
  top: 50%;
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: #ff3131;
  transform: translateY(-50%);
}

.tutorial-arrow.is-up::before,
.tutorial-arrow.is-down::before {
  left: 50%;
  width: 8px;
  height: 46px;
  border-radius: 999px;
  background: #ff3131;
  transform: translateX(-50%);
}

.tutorial-arrow.is-left::before {
  right: 16px;
}

.tutorial-arrow.is-right::before {
  left: 16px;
}

.tutorial-arrow.is-up::before {
  bottom: 16px;
}

.tutorial-arrow.is-down::before {
  top: 16px;
}

.tutorial-arrow.is-left::after {
  top: 50%;
  left: 10px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-right: 26px solid #ff3131;
  transform: translateY(-50%);
}

.tutorial-arrow.is-right::after {
  top: 50%;
  right: 10px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 26px solid #ff3131;
  transform: translateY(-50%);
}

.tutorial-arrow.is-up::after {
  left: 50%;
  top: 10px;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 26px solid #ff3131;
  transform: translateX(-50%);
}

.tutorial-arrow.is-down::after {
  left: 50%;
  bottom: 10px;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 26px solid #ff3131;
  transform: translateX(-50%);
}

@keyframes tutorial-arrow-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.28;
  }
}

.hardware-accel-panel {
  width: min(720px, calc(100vw - 48px));
  max-height: min(82vh, 760px);
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(173, 225, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(8, 21, 34, 0.98), rgba(5, 14, 23, 0.96));
  box-shadow:
    0 28px 68px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: auto;
}

.hardware-accel-copy {
  display: grid;
  gap: 10px;
}

.hardware-accel-copy h2 {
  margin-bottom: 0;
}

.hardware-accel-copy p {
  margin-bottom: 0;
  color: rgba(232, 247, 255, 0.88);
  line-height: 1.5;
}

.hardware-accel-subtitle {
  color: var(--brand);
  font-weight: 700;
}

.hardware-accel-browser-list {
  display: grid;
  gap: 12px;
}

.hardware-accel-browser {
  border: 1px solid rgba(173, 225, 255, 0.14);
  border-radius: 16px;
  background: rgba(9, 23, 36, 0.72);
  overflow: hidden;
}

.hardware-accel-browser summary {
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: #f3fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hardware-accel-browser summary::-webkit-details-marker {
  display: none;
}

.hardware-accel-browser summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.15rem;
  line-height: 1;
}

.hardware-accel-browser[open] summary::after {
  content: "-";
}

.hardware-accel-browser ol {
  margin: 0;
  padding: 0 20px 16px 34px;
  color: rgba(232, 247, 255, 0.86);
  line-height: 1.55;
}

.hardware-accel-browser li + li {
  margin-top: 6px;
}

.hardware-accel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.hardware-accel-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(232, 247, 255, 0.86);
}

.hardware-accel-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-strong);
}

.store-panel {
  width: min(860px, calc(100vw - 120px));
  max-width: 100%;
  max-height: min(78vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10, 24, 38, 0.98), rgba(7, 18, 29, 0.98));
  border: 1px solid rgba(173, 225, 255, 0.12);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(16px);
}

.store-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.store-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.store-coin-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 217, 121, 0.16);
  border: 1px solid rgba(255, 217, 121, 0.22);
  color: var(--gold);
  font-weight: 800;
  white-space: nowrap;
}

.store-panel-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.store-tab-button {
  min-width: 110px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.store-tab-button.is-active {
  background: linear-gradient(135deg, rgba(125, 224, 248, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(125, 224, 248, 0.2),
    0 0 0 4px rgba(125, 224, 248, 0.06);
}

.store-close-button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  background: linear-gradient(180deg, rgba(122, 22, 22, 0.96), rgba(88, 15, 15, 0.96));
  color: #fff;
  border: 1px solid rgba(255, 160, 160, 0.2);
}

.store-panel-body {
  min-height: 0;
  overflow: hidden;
}

.store-drawer {
  align-content: start;
  max-height: 100%;
  overflow: auto;
  padding-right: 4px;
}

.settings-panel {
  width: min(720px, calc(100vw - 120px));
  max-width: 100%;
  max-height: min(78vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(10, 24, 38, 0.98), rgba(7, 18, 29, 0.98));
  border: 1px solid rgba(173, 225, 255, 0.12);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(16px);
}

.settings-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.settings-panel-copy {
  display: grid;
  gap: 8px;
}

.settings-panel-copy h2,
.settings-section h3 {
  margin-bottom: 0;
}

.settings-panel-copy p,
.settings-section-note {
  margin-bottom: 0;
  color: rgba(232, 247, 255, 0.76);
  line-height: 1.5;
}

.settings-kicker {
  margin: 0;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.settings-panel-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.settings-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(6, 18, 29, 0.56);
  border: 1px solid rgba(173, 225, 255, 0.1);
}

.settings-toggle-copy {
  display: grid;
  gap: 5px;
}

.settings-toggle-label {
  font-weight: 800;
  color: #f3fbff;
}

.settings-toggle-note {
  color: rgba(232, 247, 255, 0.7);
  font-size: 0.92rem;
  line-height: 1.45;
}

.settings-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--brand-strong);
}

.shop-note-card {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fish-card,
.mini-card,
.shop-card {
  display: grid;
  gap: 12px;
}

.fish-card {
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: start;
}

.shop-card {
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
}

.mini-card {
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: start;
}

.shop-card> :last-child {
  grid-column: 2;
  justify-self: start;
}

.mini-card>div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.fish-thumb,
.shop-thumb,
.decor-thumb,
.background-thumb,
.scene-thumb {
  width: 100%;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 44%),
    linear-gradient(180deg, rgba(158, 220, 255, 0.18), rgba(78, 126, 156, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fish-thumb {
  width: 90px;
  height: 74px;
  object-fit: contain;
  padding: 8px;
}

.shop-thumb {
  width: 96px;
  height: 84px;
  object-fit: contain;
  padding: 8px;
}

.decor-thumb {
  width: 82px;
  height: 82px;
  object-fit: contain;
  padding: 6px;
}

.fish-meta,
.shop-meta {
  display: grid;
  gap: 4px;
}

.fish-card-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.shop-card-main {
  min-width: 0;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 4px;
}

.shop-toolbar-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem;
}

.shop-toolbar-count {
  white-space: nowrap;
}

.shop-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.shop-search-control,
.shop-sort-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.shop-search-input,
.shop-sort-select {
  min-width: 132px;
  padding: 8px 34px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: rgba(8, 20, 32, 0.82);
  color: var(--ink);
  font: inherit;
}

.shop-search-input {
  min-width: min(280px, 48vw);
  padding-right: 12px;
}

.shop-theme-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 168, 92, 0.28);
  background: rgba(138, 64, 20, 0.18);
  color: #ffd6aa;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shop-stat-list {
  display: grid;
  gap: 6px;
}

.shop-stat-row {
  display: grid;
  grid-template-columns: minmax(118px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  color: var(--ink);
}

.shop-stat-label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.shop-stat-value {
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fish-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.fish-card-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.fish-species {
  color: var(--muted);
  font-size: 0.98rem;
}

.fish-status-line {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.fish-trait-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fish-trait {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.2;
}

.fish-health-note {
  line-height: 1.45;
}

.fish-actions,
.mini-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fish-card-actions {
  grid-column: 1 / -1;
  justify-content: space-between;
  align-items: center;
  padding-top: 2px;
}

.fish-card-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.stack-section {
  align-content: start;
}

.stack-section .card-stack {
  align-content: start;
}

.mini-card-actions {
  grid-column: 1 / -1;
  justify-self: stretch;
  align-self: start;
  align-items: center;
  justify-content: flex-end;
}

.size-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.size-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.small-button.icon {
  min-width: 40px;
  padding: 10px 12px;
  line-height: 1;
}

.small-button.icon-only {
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.1rem;
  line-height: 1;
}

.price-tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 217, 121, 0.16);
  color: var(--gold);
  font-weight: 800;
}

.compact-heading {
  margin-bottom: 10px;
}

.compact-heading h3 {
  margin-bottom: 4px;
}

.compact-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.equipment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.equipment-heading p {
  flex: 1 1 auto;
}

.equipment-panel {
  width: min(860px, calc(100vw - 120px));
}

.tank-management-card,
.tank-summary-grid {
  display: grid;
  gap: 0;
}

.tank-name-summary-row {
  align-items: flex-start;
}

.tank-name-display,
.tank-name-editor {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.tank-name-input {
  min-width: 184px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.tank-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.shop-section {
  display: grid;
  gap: 14px;
}

.shop-section + .shop-section {
  margin-top: 24px;
}

.shop-section-heading {
  display: grid;
  gap: 4px;
}

.shop-section-heading h3 {
  margin-bottom: 0;
}

.shop-section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.shop-section-cards {
  display: grid;
  gap: 14px;
}

.shop-card-actions {
  align-self: stretch;
  align-content: start;
}

.shop-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-disclaimer {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: italic;
}

.info-card-disclaimer .overview-disclaimer {
  margin: 0;
}

.info-card-disclaimer {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.info-card-disclaimer .small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.buy-button,
.small-button,
.background-card button {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  color: #04131e;
  font-weight: 800;
}

.small-button.alt {
  background: linear-gradient(135deg, rgba(255, 217, 121, 0.25), rgba(255, 255, 255, 0.08));
  color: var(--ink);
}

.small-button.warn {
  background: linear-gradient(135deg, rgba(255, 132, 152, 0.26), rgba(255, 255, 255, 0.08));
  color: var(--ink);
}

.hearts {
  display: flex;
  flex-wrap: wrap;
  row-gap: 2px;
  gap: 4px;
  font-size: 1.35rem;
}

.heart {
  line-height: 1;
  color: rgba(255, 255, 255, 0.16);
}

.heart.full {
  color: var(--danger);
}

.heart.half {
  background: linear-gradient(90deg, var(--danger) 50%, rgba(255, 255, 255, 0.16) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.decor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.full-span {
  grid-column: 1 / -1;
}

.background-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

#filterAssetList,
#equipmentFilterList {
  grid-template-columns: repeat(auto-fill, minmax(170px, 170px));
  justify-content: start;
}

#filterAssetList .background-card,
#equipmentFilterList .background-card {
  align-content: start;
}

.background-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.background-card.is-selected {
  box-shadow: inset 0 0 0 2px rgba(125, 224, 248, 0.28);
}

.custom-gravel-status {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 217, 121, 0.1);
  border: 1px solid rgba(255, 217, 121, 0.16);
  color: #ffe8a6;
  font-size: 0.88rem;
  line-height: 1.35;
}

.custom-gravel-panel-shell {
  display: grid;
  gap: 14px;
}

.custom-gravel-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.custom-gravel-toggle {
  min-width: 106px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  font-weight: 700;
}

.custom-gravel-toggle span {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-gravel-toggle strong {
  font-size: 1rem;
}

.custom-gravel-toggle.is-active {
  background: linear-gradient(180deg, rgba(47, 128, 255, 0.28), rgba(24, 214, 255, 0.18));
  border-color: rgba(125, 224, 248, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(47, 128, 255, 0.12);
}

.custom-gravel-layer-list {
  display: grid;
  gap: 12px;
}

.custom-gravel-layer-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-gravel-layer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.custom-gravel-layer-swatch {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.4), transparent 24%),
    linear-gradient(135deg, var(--swatch), color-mix(in srgb, var(--swatch) 72%, black 28%));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.custom-gravel-choice-summary {
  display: grid;
  gap: 6px;
}

.custom-gravel-choice-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.custom-gravel-choice-summary strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.custom-gravel-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-gravel-color-swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.46), transparent 22%),
    linear-gradient(135deg, var(--swatch), color-mix(in srgb, var(--swatch) 74%, black 26%));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.16);
}

.custom-gravel-color-swatch:hover,
.custom-gravel-color-swatch:focus-visible {
  transform: translateY(-1px);
}

.custom-gravel-color-swatch.is-selected {
  border-color: rgba(125, 224, 248, 0.62);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.3),
    0 0 0 2px rgba(125, 224, 248, 0.18),
    0 10px 20px rgba(0, 0, 0, 0.24);
}

.background-thumb {
  width: 100%;
  height: 92px;
  object-fit: cover;
  padding: 0;
}

.background-custom-preview,
.background-fill-preview {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.28), transparent 24%),
    var(--background-preview-fill, linear-gradient(180deg, #32b6e6, #0d84b4));
}

.background-shop-thumb {
  width: 96px;
  height: 84px;
  object-fit: cover;
  padding: 0;
}

.background-color-panel-shell {
  display: grid;
  gap: 12px;
}

.background-solid-toggle-row {
  cursor: pointer;
}

.background-solid-toggle-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.background-solid-toggle-preview {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.background-mode-preview {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.background-solid-color-card {
  gap: 16px;
}

.background-gradient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.background-gradient-color-group {
  display: grid;
  gap: 12px;
}

.gravel-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.gravel-slot {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
}

.gravel-slot.is-active {
  border-color: rgba(125, 224, 248, 0.52);
  box-shadow:
    inset 0 0 0 1px rgba(125, 224, 248, 0.22),
    0 0 0 1px rgba(125, 224, 248, 0.12);
}

.gravel-slot-label {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gravel-slot-preview {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.06)),
    linear-gradient(135deg, var(--swatch), color-mix(in srgb, var(--swatch) 70%, black 30%));
}

.gravel-slot-value {
  font-size: 0.88rem;
  font-weight: 800;
}

.gravel-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gravel-swatch {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 26% 24%, rgba(255, 255, 255, 0.38), transparent 26%),
    linear-gradient(135deg, var(--swatch), color-mix(in srgb, var(--swatch) 74%, black 26%));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.gravel-swatch.is-selected {
  border-color: rgba(125, 224, 248, 0.56);
  box-shadow:
    inset 0 0 0 2px rgba(125, 224, 248, 0.18),
    0 0 0 2px rgba(125, 224, 248, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.28);
}*/

.scene-thumb {
  width: 100%;
  height: 92px;
  object-fit: contain;
  padding: 8px;
}

#filterAssetList .scene-thumb,
#equipmentFilterList .scene-thumb {
  width: min(100%, 112px);
  height: 136px;
  justify-self: center;
  padding: 10px 8px;
}

.meal-track {
  display: grid;
  gap: 6px;
}

.meal-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.meal-line-label {
  font-weight: 700;
  color: var(--ink);
}

.meal-line-status {
  color: var(--ink);
  font-size: 1.05rem;
}

.toast {
  position: fixed;
  left: 12px;
  top: 86px;
  bottom: auto;
  max-width: min(420px, calc(100vw - 24px));
  transform: translateY(12px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(6, 18, 29, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

@media (max-width: 1100px) {
  .tank-display {
    width: min(280px, 42vw);
  }

  .tank-sidebar {
    width: min(360px, 40vw);
  }

  .fish-inspector {
    width: min(320px, 34vw);
  }
}

@media (max-width: 860px) {
  .dock-button.edit-shortcut-control:not([hidden]) {
    display: grid;
  }

  .aquarium-card {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
  }

  .tank-stage {
    border-radius: 0;
  }

  .tank-display {
    top: 8px;
    left: 8px;
    width: min(260px, calc(100% - 16px));
  }

  .edit-quick-ref {
    top: 90px;
    right: 14px;
    left: auto;
  }

  .edit-quick-ref-card {
    min-width: 0;
    max-width: min(280px, calc(100vw - 28px));
    gap: 6px;
    padding: 10px 12px;
    font-size: 0.86rem;
  }

  .edit-quick-ref-card strong {
    min-width: 88px;
  }

  .summary-grid,
  .decor-grid,
  .meal-track,
  .inspector-stats {
    grid-template-columns: 1fr;
  }

  .tank-sidebar {
    top: 98px;
    left: 0;
    width: min(360px, calc(100% - 60px));
    bottom: 88px;
  }

  .tank-sidebar.is-collapsed {
    transform: translateX(calc(-100% - 8px));
  }

  .tank-overlay-hints {
    top: 86px;
    left: 8px;
    right: auto;
    bottom: auto;
    width: min(360px, calc(100% - 16px));
    max-width: min(360px, calc(100% - 16px));
    transform: none;
  }

  .tank-stage.has-edit-decor-tray .tank-overlay-hints {
    top: 86px;
  }

  .edit-decor-tray {
    left: 14px;
    right: 14px;
    bottom: 76px;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
    padding: 8px 9px;
  }

  .edit-decor-tray-arrow {
    width: 34px;
    height: 72px;
    border-radius: 20px;
  }

  .edit-decor-tile {
    min-width: 72px;
    max-width: 72px;
    height: 72px;
  }

  .edit-decor-tile-surface {
    border-radius: 22px;
  }

  .edit-decor-tile-count {
    right: 10px;
    bottom: 8px;
    font-size: 0.92rem;
  }

  .edit-decor-tile::before {
    font-size: 0.74rem;
    padding: 5px 8px;
  }

  .tank-bottom-dock {
    bottom: 14px;
  }

  .fish-inspector {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 92px;
    width: auto;
  }

  .hardware-accel-overlay {
    padding: 16px;
  }

  .hardware-accel-panel {
    width: min(100%, calc(100vw - 24px));
    max-height: min(84vh, 760px);
    padding: 18px;
    gap: 14px;
  }

  .settings-panel {
    width: min(100%, calc(100vw - 24px));
    max-height: min(84vh, 760px);
    padding: 18px;
    gap: 14px;
  }

  .settings-panel-header,
  .settings-toggle-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .settings-panel-header {
    display: grid;
  }

  .settings-toggle-row {
    justify-items: start;
  }

  .hardware-accel-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .utility-confirm-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .utility-confirm-actions .small-button {
    width: 100%;
  }

  .hardware-accel-actions .small-button {
    width: 100%;
  }

  .fish-card,
  .mini-card {
    grid-template-columns: 1fr;
  }

  .shop-toolbar,
  .equipment-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-toolbar-controls {
    margin-left: 0;
    justify-content: stretch;
  }

  .shop-search-control,
  .shop-sort-control {
    justify-content: space-between;
  }

  .shop-search-input,
  .shop-sort-select {
    min-width: 0;
    width: 100%;
  }

  .fish-thumb,
  .shop-thumb,
  .decor-thumb {
    width: 100%;
    height: auto;
    max-height: 110px;
  }
}

@media (max-width: 767px), (max-width: 932px) and (max-height: 500px) and (orientation: landscape) {
  .store-overlay,
  .hardware-accel-overlay,
  .tutorial-overlay {
    position: fixed;
    inset: 0;
    padding: 12px;
  }

  .store-panel,
  .settings-panel,
  .hardware-accel-panel,
  .tutorial-panel {
    width: min(100%, calc(100vw - 24px));
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 16px;
    gap: 12px;
    border-radius: 20px;
  }

  .store-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .settings-panel-copy {
    min-width: 0;
  }

  .settings-panel-header .store-close-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .store-panel-actions {
    width: 100%;
    justify-content: space-between;
  }

  .store-panel-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    width: 100%;
    gap: 8px;
  }

  .store-tab-button {
    min-width: 0;
    padding: 10px 12px;
  }

  .store-drawer,
  .settings-panel-body,
  .hardware-accel-panel {
    padding-right: 0;
  }

  .tutorial-overlay {
    padding: 12px;
  }

  .tutorial-actions {
    justify-content: stretch;
  }

  .tutorial-actions .small-button {
    width: 100%;
  }

  .background-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }
}

@media (max-width: 767px) and (orientation: portrait) {
  :root {
    --phone-stage-width: calc(100vw - 16px);
    --phone-stage-height: calc((100vw - 16px) * 9 / 16);
    --phone-dock-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    --phone-dock-clearance: calc(env(safe-area-inset-bottom, 0px) + 82px);
    --phone-tray-clearance: calc(env(safe-area-inset-bottom, 0px) + 164px);
  }

  .aquarium-card {
    display: block;
  }

  .tank-stage {
    width: var(--phone-stage-width);
    height: var(--phone-stage-height);
    max-height: none;
    margin: 8px auto 0;
  }

  .tank-display {
    top: 6px;
    left: 6px;
    right: 48px;
    width: auto;
    max-width: none;
    padding: 3px;
  }

  .display-cell {
    min-height: 38px;
    padding: 4px 5px 4px;
  }

  .display-label {
    font-size: 0.42rem;
  }

  .display-cell strong {
    font-size: 0.82rem;
  }

  .daily-bonus-bell {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }

  .tank-nav-button {
    bottom: 12px;
    width: 38px;
    height: 38px;
    border-radius: 16px;
    font-size: 1.45rem;
  }

  .tank-nav-button-left {
    left: 10px;
  }

  .tank-nav-button-right {
    right: 10px;
  }

  .edit-quick-ref {
    display: none !important;
  }

  .tank-sidebar,
  .tank-sidebar.is-collapsed {
    position: fixed;
    left: 8px;
    right: 8px;
    top: calc(var(--phone-stage-height) + 18px);
    bottom: var(--phone-dock-clearance);
    width: auto;
    transform: none !important;
    z-index: 10;
  }

  .tank-stage.has-edit-decor-tray .tank-sidebar {
    bottom: var(--phone-tray-clearance);
  }

  .sidebar-toggle {
    display: none;
  }

  .tab-buttons {
    gap: 6px;
  }

  .tab-button {
    padding: 11px 8px 10px;
    font-size: 0.72rem;
  }

  .tank-panel-shell {
    padding-right: 4px;
    margin-right: -4px;
    border-left: 1px solid var(--panel-line-strong);
    border-radius: 20px;
  }

  .tab-panel {
    gap: 10px;
    padding: 14px 14px 16px;
  }

  .tab-panel[data-panel="fish"] > .panel-heading.with-action,
  .tab-panel[data-panel="decor"] > .panel-heading.with-action {
    top: -14px;
    margin: -14px -14px 4px;
    padding: 14px 14px 10px;
  }

  .panel-heading,
  .with-action,
  .footer-heading,
  .panel-heading-actions {
    flex-wrap: wrap;
  }

  .edit-decor-tray {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: var(--phone-dock-clearance);
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 6px;
    padding: 7px 8px;
    z-index: 12;
  }

  .edit-decor-tray-arrow {
    width: 30px;
    height: 60px;
    border-radius: 18px;
    font-size: 1.25rem;
  }

  .edit-decor-tile {
    min-width: 68px;
    max-width: 68px;
    height: 68px;
  }

  .edit-decor-tile-surface {
    border-radius: 20px;
  }

  .tank-bottom-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: env(safe-area-inset-bottom, 0px);
    transform: none;
    justify-content: center;
    gap: 5px;
    padding: 4px 6px calc(env(safe-area-inset-bottom, 0px) + 4px);
    border-radius: 16px 16px 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 12;
    scrollbar-width: thin;
  }

  .dock-button {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    font-size: 0.98rem;
  }

  .fish-inspector {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: var(--phone-dock-clearance);
    width: auto;
    z-index: 13;
  }

  .fish-inspector-card {
    max-height: min(42dvh, 320px);
    overflow: auto;
  }
}

@media (max-width: 932px) and (max-height: 500px) and (orientation: landscape) {
  .dock-button.edit-shortcut-control:not([hidden]) {
    display: grid;
  }

  .tank-sidebar,
  .fish-inspector,
  .store-panel,
  .settings-panel,
  .hardware-accel-panel,
  .tutorial-panel {
    font-size: 0.76rem;
  }

  .tank-display {
    top: 4px;
    left: 4px;
    width: min(154px, 24vw);
    padding: 2px;
  }

  .display-cell {
    min-height: 30px;
    padding: 3px 4px 2px;
  }

  .display-label {
    font-size: 0.34rem;
    letter-spacing: 0.05em;
  }

  .display-cell strong {
    font-size: 0.7rem;
  }

  .edit-quick-ref {
    top: 54px;
    right: 8px;
  }

  .edit-quick-ref-card {
    min-width: 0;
    max-width: 168px;
    gap: 4px;
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .edit-quick-ref-card strong {
    min-width: 0;
    margin-right: 6px;
  }

  .daily-bonus-bell {
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    font-size: 0.86rem;
  }

  .tank-sidebar {
    top: 48px;
    width: min(244px, 36vw);
    bottom: 34px;
  }

  .sidebar-toggle {
    right: -26px;
    width: 26px;
    height: 72px;
    font-size: 1rem;
  }

  .tab-buttons {
    gap: 2px;
  }

  .tab-button {
    padding: 8px 5px 7px;
    font-size: 0.62rem;
  }

  .tank-panel-shell {
    padding-right: 2px;
    margin-right: -2px;
  }

  .tab-panel {
    gap: 8px;
    padding: 8px 8px 10px;
    font-size: 0.64rem;
  }

  .tab-panel[data-panel="fish"] > .panel-heading.with-action,
  .tab-panel[data-panel="decor"] > .panel-heading.with-action {
    top: -8px;
    margin: -8px -8px 4px;
    padding: 8px 8px 6px;
  }

  .panel-heading h2 {
    font-size: 0.76rem;
    margin-bottom: 2px;
  }

  .panel-heading p,
  .settings-panel-copy p,
  .settings-section-note {
    font-size: 0.56rem;
    line-height: 1.3;
  }

  .tab-panel .info-card h3,
  .compact-heading h3,
  .shop-section-heading h3 {
    font-size: 0.72rem;
    margin-bottom: 2px;
  }

  .compact-heading p,
  .shop-section-heading p,
  .overview-disclaimer {
    font-size: 0.56rem;
    line-height: 1.25;
  }

  .summary-row {
    gap: 10px;
    padding: 6px 0;
  }

  .summary-row span {
    font-size: 0.6rem;
    line-height: 1.2;
  }

  .summary-row strong {
    font-size: 0.78rem;
    line-height: 1.1;
  }

  .tank-name-display,
  .tank-name-editor,
  .tank-action-row,
  .fish-actions,
  .mini-card-actions,
  .fish-card-button-row {
    gap: 6px;
  }

  .tank-name-input {
    min-width: 120px;
    padding: 6px 8px;
    font-size: 0.68rem;
    border-radius: 10px;
  }

  .collapsible-toggle {
    gap: 8px;
    padding: 0;
  }

  .collapsible-title {
    font-size: 0.72rem;
  }

  .collapsible-section [data-collapsible-body] {
    margin-top: 8px;
  }

  .settings-panel-copy h2,
  .settings-section h3,
  .tutorial-copy h2,
  .hardware-accel-copy h2 {
    font-size: 0.98rem;
  }

  .settings-kicker,
  .tutorial-kicker,
  .inspector-species {
    font-size: 0.62rem;
  }

  .info-card,
  .summary-card,
  .fish-card,
  .mini-card,
  .shop-card,
  .background-card,
  .fish-inspector-card,
  .settings-section {
    padding: 10px;
    border-radius: 14px;
  }

  .rule-list,
  .event-feed,
  .shop-meta,
  .fish-meta,
  .fish-status-line,
  .fish-health-note,
  .event-line,
  .empty-state {
    font-size: 0.6rem;
    line-height: 1.3;
  }

  .fish-species {
    font-size: 0.76rem;
  }

  .fish-trait,
  .size-badge,
  .price-tag {
    padding: 5px 8px;
    font-size: 0.66rem;
  }

  .small-button,
  .background-card button {
    padding: 7px 10px;
    font-size: 0.68rem;
  }

  .small-button.icon {
    min-width: 30px;
    padding: 7px 9px;
  }

  .small-button.icon-only,
  .icon-button.icon-only {
    min-width: 30px;
    width: 30px;
    height: 30px;
    font-size: 0.86rem;
  }

  #toggleFishShop.icon-button.icon-only,
  #toggleDecorShop.icon-button.icon-only {
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .store-panel,
  .settings-panel,
  .hardware-accel-panel,
  .tutorial-panel {
    padding: 10px;
    gap: 8px;
    border-radius: 16px;
  }

  .store-panel-tabs {
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  }

  .store-tab-button {
    padding: 7px 6px;
    font-size: 0.66rem;
  }

  .store-coin-counter {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .store-close-button {
    width: 32px;
    height: 32px;
    font-size: 1.05rem;
  }

  .shop-card,
  .fish-card,
  .mini-card {
    gap: 8px;
  }

  .shop-card {
    grid-template-columns: 56px minmax(0, 1fr) max-content;
    align-items: center;
  }

  .fish-card {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .mini-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .fish-thumb {
    width: 66px;
    height: 52px;
    padding: 5px;
    border-radius: 14px;
  }

  .shop-thumb {
    width: 56px;
    height: 48px;
    padding: 4px;
    border-radius: 12px;
  }

  .decor-thumb {
    width: 62px;
    height: 62px;
    padding: 4px;
    border-radius: 14px;
  }

  .tank-overlay-hints {
    top: 48px;
    width: min(250px, calc(100% - 12px));
    max-width: min(250px, calc(100% - 12px));
  }

  .tank-stage.has-edit-decor-tray .tank-overlay-hints {
    top: 48px;
  }

  .edit-decor-tray {
    left: 0;
    right: 0;
    bottom: 34px;
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 14px 14px 0 0;
  }

  .edit-decor-tray-arrow {
    width: 22px;
    height: 40px;
    border-radius: 12px;
    font-size: 0.92rem;
  }

  .edit-decor-tile {
    min-width: 48px;
    max-width: 48px;
    height: 48px;
  }

  .edit-decor-tile-surface {
    border-radius: 14px;
  }

  .tank-bottom-dock {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    justify-content: center;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 14px 14px 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .dock-button {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    font-size: 0.86rem;
  }

  .shop-card-main {
    display: grid;
    gap: 4px;
  }

  .shop-card > :last-child {
    grid-column: 3;
    justify-self: end;
    align-self: center;
  }

  .shop-card-actions {
    justify-items: end;
    align-content: center;
    gap: 4px;
    min-width: max-content;
  }

  .shop-button-row {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .tank-nav-button {
    bottom: 32px;
    width: 28px;
    height: 28px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .tank-nav-button-left {
    left: 4px;
  }

  .tank-nav-button-right {
    right: 4px;
  }

  .fish-inspector {
    top: 50px;
    right: 4px;
    left: auto;
    bottom: 34px;
    width: min(218px, 32vw);
  }

  .fish-inspector-card {
    max-height: 100%;
    overflow: auto;
  }
}
