/* ============================================================
   AquaBit — dashboard interface
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-soft) #081827;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #081827;
  border: 1px solid #16304b;
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #35b8d2, #1c7c95);
  border: 2px solid #081827;
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6ce6ff, #2b9bc4);
}

*::-webkit-scrollbar-corner {
  background: #081827;
}

:root {
  --bg: #081222;
  --bg-2: #0b1a2e;
  --panel: #0f2439;
  --panel-2: #0c1d30;
  --panel-line: #1e3f61;
  --panel-line-soft: #16304b;
  --cyan: #4fd8f0;
  --cyan-soft: #1c7c95;
  --text: #d3e4f4;
  --muted: #7d99b3;
  --gold: #ffc94a;
  --green: #57d97e;
  --pink: #ff7aa8;
  --red: #ff6b6b;
  --radius: 12px;
}

html, body {
  height: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, #12294a 0%, transparent 60%),
    linear-gradient(180deg, #081222 0%, #061020 100%);
  color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

img { image-rendering: pixelated; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.app {
  height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
}

/* ================= HEADER ================= */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid #0f2740;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand-icon {
  width: 42px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(79, 216, 240, .55));
}
.brand-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 15px;
  letter-spacing: .5px;
  color: #dff4ff;
  text-shadow: 0 0 14px rgba(79, 216, 240, .55);
}
.brand-accent { color: var(--cyan); }
.brand-dots {
  color: var(--cyan);
  font-size: 10px;
  opacity: .8;
  transform: translateY(-8px);
}

.tank-pill {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 10px;
  border: 1px solid #2a5d86;
  background: linear-gradient(180deg, #103050 0%, #0b2138 100%);
  color: #cdeaf8;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: .5px;
  box-shadow: inset 0 0 18px rgba(79, 216, 240, .12), 0 0 12px rgba(0, 0, 0, .4);
  transition: .2s;
}
.tank-pill:hover { border-color: var(--cyan); box-shadow: inset 0 0 22px rgba(79, 216, 240, .22); }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid #2a5d86;
  background: linear-gradient(180deg, #103050 0%, #0b2138 100%);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
}
.chip.gold { color: var(--gold); }
.chip.food { color: #ffcf8a; }
.chip.gem { color: #8fd8ff; }
.chip-icon { width: 16px; height: 16px; display: block; image-rendering: pixelated; }
.coin {
  display: inline-block;
  width: 11px;
  height: 11px;
  background: url("assets/outros/moeda.png") center / contain no-repeat;
  image-rendering: pixelated;
  vertical-align: -1px;
  margin-right: 3px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid #2a5d86;
  background: linear-gradient(180deg, #103050 0%, #0b2138 100%);
  color: #a9d6ec;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: .2s;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ================= DASHBOARD ================= */
.dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 12px;
  min-height: 0;
  overflow-y: auto;
}

.dashboard.is-freeform {
  position: relative;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  isolation: isolate;
}

.dashboard-toolbar {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard.is-freeform .dashboard-toolbar {
  position: absolute;
  z-index: 100;
  top: 0;
  right: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.layout-message {
  display: none;
}

.layout-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-actions .layout-actions { margin-left: 4px; }

.dashboard-window-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  pointer-events: auto;
}

.dashboard-minimized-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-minimized-dock[hidden] { display: none; }
.minimized-window,
.reopen-window {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #285a7e;
  border-radius: 8px;
  background: #0b2138;
  color: #b7d9ec;
  font-size: 11px;
}

.minimized-window:hover,
.reopen-window:hover { border-color: var(--cyan); color: var(--cyan); }

.dashboard-window-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #285a7e;
  border-radius: 10px;
  background: #0a1a2c;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}

.dashboard-window-menu[hidden] { display: none; }

.dashboard-widget {
  --widget-span: 3;
  position: relative;
  min-width: 0;
  min-height: 0;
}

.dashboard.is-freeform .dashboard-widget {
  position: absolute;
  left: var(--window-x);
  top: var(--window-y);
  width: var(--window-width);
  height: var(--window-height);
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  transition: none;
}

.dashboard.is-freeform .dashboard-widget::-webkit-scrollbar { display: none; }

@media (min-width: 861px) {
  .dashboard.is-freeform .dashboard-widget[data-widget="overview"] { min-width: 300px; min-height: 216px; }
  .dashboard.is-freeform .dashboard-widget[data-widget="fish"] { min-width: 360px; min-height: 204px; }
  .dashboard.is-freeform .dashboard-widget[data-widget="water"] { min-width: 288px; min-height: 252px; }
  .dashboard.is-freeform .dashboard-widget[data-widget="tank"] { min-width: 336px; min-height: 360px; overflow: hidden; }
  .dashboard.is-freeform .dashboard-widget[data-widget="tasks"] { min-width: 288px; min-height: 216px; }
  .dashboard.is-freeform .dashboard-widget[data-widget="decor"] { min-width: 288px; min-height: 216px; }
  .dashboard.is-freeform .dashboard-widget[data-widget="background"] { min-width: 336px; min-height: 240px; }
  .dashboard.is-freeform .dashboard-widget[data-widget="light"] {
    min-width: 312px;
    min-height: 120px;
    max-width: 420px;
    max-height: 144px;
  }
  .dashboard-widget[data-widget="tank"] { gap: 0; }
  .dashboard-widget[data-widget="tank"] .tank-shell { justify-content: flex-start; }
  .dashboard-widget[data-widget="tank"] .tank { min-height: 0; max-height: none; }
  .dashboard.is-freeform .tank-base { margin: 0; }
}

.dashboard-widget.panel.grow {
  flex: initial;
  display: flex;
  flex-direction: column;
}

.dashboard-widget[data-widget="tank"] { grid-column: 1 / span 6; grid-row: 2 / span 4; }
.dashboard-widget[data-widget="tasks"] { grid-column: 7 / span 3; grid-row: 2; }
.dashboard-widget[data-widget="water"] { grid-column: 10 / span 3; grid-row: 2; }
.dashboard-widget[data-widget="fish"] { grid-column: 7 / span 6; grid-row: 3; }
.dashboard-widget[data-widget="overview"] { grid-column: 7 / span 3; grid-row: 4; }
.dashboard-widget[data-widget="background"] { grid-column: 10 / span 3; grid-row: 4; }
.dashboard-widget[data-widget="light"] { grid-column: 7 / span 3; grid-row: 5; }
.dashboard-widget[data-widget="decor"] { grid-column: 10 / span 3; grid-row: 5; }

@media (min-width: 1081px) {
  .dashboard-widget[data-widget="fish"] .fish-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    align-content: start;
    flex: 1;
  }
}

.widget-grip {
  position: absolute;
  z-index: 20;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: #0b2138;
  color: var(--cyan);
  font-size: 18px;
  line-height: 1;
  cursor: grab;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transition: opacity .16s, border-color .16s, background .16s;
}

.widget-resize {
  position: absolute;
  z-index: 20;
  border: 0;
  padding: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
}

.widget-resize[data-resize-edge="n"],
.widget-resize[data-resize-edge="s"] {
  left: 20px;
  right: 20px;
  height: 14px;
  cursor: ns-resize;
}
.widget-resize[data-resize-edge="n"] { top: 0; }
.widget-resize[data-resize-edge="s"] { bottom: 0; }
.widget-resize[data-resize-edge="e"],
.widget-resize[data-resize-edge="w"] {
  top: 20px;
  bottom: 20px;
  width: 14px;
  cursor: ew-resize;
}
.widget-resize[data-resize-edge="e"] { right: 0; }
.widget-resize[data-resize-edge="w"] { left: 0; }
.widget-resize[data-resize-edge="ne"],
.widget-resize[data-resize-edge="se"],
.widget-resize[data-resize-edge="sw"],
.widget-resize[data-resize-edge="nw"] {
  width: 20px;
  height: 20px;
  background: transparent;
}
.widget-resize[data-resize-edge="ne"] { top: 0; right: 0; cursor: nesw-resize; }
.widget-resize[data-resize-edge="se"] { bottom: 0; right: 0; cursor: nwse-resize; }
.widget-resize[data-resize-edge="sw"] { bottom: 0; left: 0; cursor: nesw-resize; }
.widget-resize[data-resize-edge="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.widget-resize:hover,
.widget-resize:focus-visible { opacity: 1; background-color: var(--cyan); outline: none; }
.widget-resize[data-resize-edge="ne"]:hover,
.widget-resize[data-resize-edge="se"]:hover,
.widget-resize[data-resize-edge="sw"]:hover,
.widget-resize[data-resize-edge="nw"]:hover,
.widget-resize[data-resize-edge="ne"]:focus-visible,
.widget-resize[data-resize-edge="se"]:focus-visible,
.widget-resize[data-resize-edge="sw"]:focus-visible,
.widget-resize[data-resize-edge="nw"]:focus-visible { background: transparent; }

.dashboard.editing .widget-resize[data-resize-edge="n"],
.dashboard.editing .widget-resize[data-resize-edge="s"] {
  background: linear-gradient(180deg, transparent, rgba(79, 216, 240, .42), transparent);
}
.dashboard.editing .widget-resize[data-resize-edge="e"],
.dashboard.editing .widget-resize[data-resize-edge="w"] {
  background: linear-gradient(90deg, transparent, rgba(79, 216, 240, .42), transparent);
}

.widget-window-controls {
  position: absolute;
  z-index: 20;
  top: 8px;
  right: 44px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
}

.widget-window-action {
  width: 26px;
  height: 26px;
  border: 1px solid var(--panel-line);
  border-radius: 7px;
  background: #0b2138;
  color: #b7d9ec;
  font: 700 16px/1 "Nunito", sans-serif;
}

.widget-window-action:hover,
.widget-window-action:focus-visible { border-color: var(--cyan); color: var(--cyan); outline: none; }
.widget-window-action.is-close:hover { border-color: #ff7777; color: #ff7777; }

.dashboard.editing .widget-grip {
  opacity: 1;
  pointer-events: auto;
}

.dashboard.editing .widget-resize {
  opacity: .7;
  pointer-events: auto;
}

.dashboard.editing .widget-window-controls { opacity: 1; pointer-events: auto; }
.dashboard.editing .dashboard-widget.panel .panel-head { padding-right: 108px; }
.dashboard.editing .widget-grip:hover,
.widget-grip:focus-visible { border-color: var(--cyan); background: #12304b; }
.widget-grip:active { cursor: grabbing; }
.dashboard-widget.is-dragging {
  z-index: 40;
  opacity: .92;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55), 0 0 0 2px rgba(79, 216, 240, .8);
  cursor: grabbing;
}
.dashboard-widget.is-dragging * { pointer-events: none; }
.dashboard-widget.is-dragging .widget-grip { pointer-events: auto; }
.dashboard-widget.is-resizing { outline: 2px solid var(--cyan); outline-offset: -2px; }
.dashboard.editing .dashboard-widget { outline: 1px dashed rgba(79, 216, 240, .3); outline-offset: -3px; }
.dashboard.editing .dashboard-widget.drop-target { outline: 2px solid var(--cyan); outline-offset: -2px; }
.dashboard.is-customized {
  grid-template-rows: auto;
  grid-auto-rows: minmax(210px, auto);
  grid-auto-flow: row;
}

.dashboard.is-customized .dashboard-widget {
  grid-area: auto;
  grid-column: span var(--widget-span, 3);
  grid-row: span var(--widget-rows, 1);
}

.col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.col-left { grid-area: left; overflow-y: auto; padding-right: 2px; }
.col-center { grid-area: center; min-width: 0; }
.col-right { grid-area: right; overflow-y: auto; padding-right: 2px; }

/* ---------- PANELS ---------- */
.panel {
  background: linear-gradient(180deg, #10253c 0%, #0b1b2e 100%);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(120, 200, 255, .05), 0 6px 18px rgba(0, 0, 0, .25);
}
.panel.grow {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* painéis desativados por flag (ex.: decorações) somem de verdade,
   mesmo com display:flex acima */
.panel[hidden] { display: none !important; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.panel-icon { font-size: 15px; }
.panel-head h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: .3px;
  color: #bfe8ff;
  text-shadow: 0 0 10px rgba(79, 216, 240, .35);
}
.panel-count {
  margin-left: auto;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--muted);
}
.panel-head.clickable { cursor: pointer; }
.panel-head.clickable:hover h2 { color: var(--cyan); }
.panel-head .panel-chevron {
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  margin-left: 2px;
}
.panel-head.clickable:hover .panel-chevron { color: var(--cyan); }
.panel-badge {
  margin-left: auto;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 4px 7px;
  border-radius: 20px;
  border: 1px solid rgba(87, 217, 126, .5);
  background: rgba(87, 217, 126, .12);
  color: var(--green);
  white-space: nowrap;
}
.panel-badge.warn {
  border-color: rgba(255, 206, 107, .5);
  background: rgba(255, 206, 107, .12);
  color: var(--gold);
}
.panel-badge.bad {
  border-color: rgba(255, 128, 128, .5);
  background: rgba(255, 128, 128, .14);
  color: #ff9b9b;
}

/* level */
.level-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: #cfe3f2;
  margin-bottom: 8px;
}
.level-line .star { color: var(--gold); }
.level-line b { color: #fff; }

.progress {
  height: 12px;
  border-radius: 4px;
  background: #081827;
  border: 1px solid #24506f;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #35c6e6, #6ce6ff);
  box-shadow: 0 0 10px rgba(79, 216, 240, .55);
  transition: width .5s ease;
}
.progress-label {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.summary-card {
  background: rgba(15, 35, 54, 0.9);
  border: 1px solid rgba(79, 216, 240, 0.3);
  border-radius: 10px;
  padding: 8px 7px;
  text-align: center;
}

.summary-card .summary-label {
  display: block;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 5px;
}

.summary-card .summary-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #edf7ff;
}

.summary-card .summary-value.good { color: var(--green); }
.summary-card .summary-value.warn { color: var(--gold); }
.summary-card .summary-value.alert { color: var(--red); }
.summary-card .summary-value.info { color: var(--cyan); }

/* ---------- FISH LIST ---------- */
.fish-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
}
.fish-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #1a3a58;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  transition: .18s;
}
.fish-item:hover { border-color: #2f6f95; transform: translateX(2px); }
.fish-item img { width: 38px; height: auto; flex-shrink: 0; }
.fish-item .fi-body { min-width: 0; flex: 1; }
.fish-item .fi-name {
  font-size: 13px;
  font-weight: 700;
  color: #dcecf9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fish-item .fi-mood {
  font-size: 11px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.fish-item .fi-mood.sad { color: var(--red); }
.fish-item .fi-mood.ok { color: var(--gold); }
.empty-row {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 14px 6px;
  line-height: 1.5;
}

/* ---------- WATER PARAMS ---------- */
.params { display: flex; flex-direction: column; gap: 11px; }
.param {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 7px;
  row-gap: 5px;
  align-items: center;
  font-size: 12px;
}
.param-icon { font-size: 13px; }
.param-label { color: #c3d8e9; }
.param-value { font-weight: 700; color: #e6f6ff; font-size: 12px; }
.param-bar {
  grid-column: 2 / -1;
  height: 7px;
  border-radius: 4px;
  background: #081827;
  border: 1px solid #1e4560;
  overflow: hidden;
}
.param-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #35c6e6, #6ce6ff);
  transition: width .5s ease, background .4s;
}
.param-fill.green { background: linear-gradient(90deg, #3fbf63, #6ef29b); }
.param-fill.warn { background: linear-gradient(90deg, #e0a13a, #ffce6b); }
.param-fill.bad { background: linear-gradient(90deg, #d64545, #ff8080); }

/* ---------- TANK ---------- */
.tank-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.tank {
  position: relative;
  flex: 1;
  min-height: 260px;
  max-height: 620px;
  border-radius: 8px;
  border: 4px solid #1d5c80;
  overflow: hidden;
  background: #06263f;
  box-shadow:
    0 0 0 2px #08192b,
    0 0 0 5px #123a56,
    0 0 26px rgba(56, 175, 224, .28),
    inset 0 0 60px rgba(0, 0, 0, .35);
}
.tank::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  border: 3px solid rgba(126, 232, 255, .45);
  box-shadow: inset 0 0 26px rgba(0, 30, 55, .85), inset 0 0 0 1px rgba(0, 0, 0, .45);
  pointer-events: none;
  z-index: 20;
}

.water {
  position: absolute;
  inset: 0;
  background: var(--tank-bg, linear-gradient(180deg, #1f7fb5 0%, #0d4c7c 45%, #072f52 100%));
  overflow: hidden;
  transition: background .8s ease, filter .8s ease;
}
.water.dirty {
  filter: saturate(.55) brightness(.82);
}
.water::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 10%;
  background: linear-gradient(180deg, rgba(190, 245, 255, .38) 0%, rgba(190, 245, 255, .06) 55%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.water.dirty::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(88, 96, 42, .35) 0%, rgba(48, 58, 22, .55) 100%);
  pointer-events: none;
  z-index: 12;
}

.rays {
  position: absolute;
  inset: -20% -10% 0 -10%;
  background:
    linear-gradient(103deg, transparent 12%, rgba(180, 235, 255, .18) 14%, transparent 16%),
    linear-gradient(100deg, transparent 30%, rgba(180, 235, 255, .13) 32%, transparent 34%),
    linear-gradient(97deg, transparent 48%, rgba(180, 235, 255, .16) 50%, transparent 53%),
    linear-gradient(104deg, transparent 64%, rgba(180, 235, 255, .12) 66%, transparent 69%),
    linear-gradient(99deg, transparent 78%, rgba(180, 235, 255, .10) 80%, transparent 82%);
  animation: raySway 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes raySway { from { transform: translateX(-12px); } to { transform: translateX(14px); } }

/* ---------- UV lamp ---------- */
.uv-lamp {
  position: absolute;
  top: 7px;
  left: 16%;
  width: 68%;
  height: 7px;
  border-radius: 4px;
  z-index: 14;
  pointer-events: none;
  opacity: 0;
  background: rgb(var(--light-rgb, 90 170 255) / .95);
  box-shadow:
    0 0 18px 5px rgb(var(--light-rgb, 90 170 255) / .75),
    0 0 42px 14px rgb(var(--light-rgb, 90 170 255) / .35);
  transition: opacity .8s ease, background .6s ease;
}
.tank.lit .uv-lamp { opacity: .9; }

.bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 9; }
.bubble {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(200, 240, 255, .55);
  background: rgba(180, 235, 255, .12);
  animation: bubbleUp linear forwards;
}
@keyframes bubbleUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-320px) translateX(12px); opacity: 0; }
}

.murk {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 11;
  opacity: 0;
  transition: opacity 1s ease;
  background:
    radial-gradient(circle at 20% 70%, rgba(120, 120, 60, .35), transparent 55%),
    radial-gradient(circle at 75% 40%, rgba(90, 110, 45, .3), transparent 60%);
}
.murk-dot {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(190, 190, 120, .8);
  border-radius: 50%;
}

.sand {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16%;
  background:
    linear-gradient(180deg, #f0d59a 0%, #e0bd7c 30%, #cfa963 70%, #b8924f 100%);
  z-index: 5;
  box-shadow: inset 0 3px 0 rgba(255, 246, 214, .55), inset 0 -6px 14px rgba(90, 60, 20, .35);
  pointer-events: none;
}
.sand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(150, 110, 50, .55) 1px, transparent 1.6px),
    radial-gradient(rgba(255, 246, 214, .6) 1px, transparent 1.6px);
  background-size: 9px 9px, 13px 13px;
  background-position: 0 0, 5px 4px;
  opacity: .75;
}
/* quando o fundo é uma imagem, a areia já vem nela */
.tank.bg-photo .sand { display: none; }

.glass {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .16) 0%, transparent 26%, transparent 78%, rgba(255, 255, 255, .06) 100%);
}

.tank-base {
  height: 16px;
  margin: 0 -6px;
  border-radius: 0;
  background: linear-gradient(180deg, #123a55 0%, #0a2437 100%);
  border: 1px solid #1e5478;
  border-bottom: 0;
  border-top: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
}

/* fish layers */
.fish-layer, .decor-layer, .food-layer, .coin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.decor-layer { z-index: 3; }
.decor-layer.front { z-index: 9; }
/* a camada de peixes não cria contexto próprio: cada peixe leva seu
   próprio z-index, então trocar de plano não exige mover o nó no DOM */
.fish-layer { z-index: auto; }
.food-layer { z-index: 8; }
.coin-layer { z-index: 10; }


.fish {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  left: 0;
  bottom: 30%;
  z-index: var(--z, 2);
  transition-property: left, bottom, width;
  transition-duration: 4.5s;
  transition-timing-function: ease-in-out;
  will-change: left, bottom;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45));
}
.fish.interaction-open { z-index: 24; }
.fish.back  { width: calc(clamp(34px, 8.5%, 52px) * var(--s, 1)); }
.fish.mid   { width: calc(clamp(44px, 11.5%, 70px) * var(--s, 1)); }
.fish.front { width: calc(clamp(56px, 14.5%, 92px) * var(--s, 1)); }
.fish.adult.back  { width: calc(clamp(39px, 9.8%, 60px) * var(--s, 1)); }
.fish.adult.mid   { width: calc(clamp(50px, 13.2%, 82px) * var(--s, 1)); }
.fish.adult.front { width: calc(clamp(64px, 16.7%, 106px) * var(--s, 1)); }

.fish img {
  display: block;
  width: 100%;
  height: auto;
  animation: fishBob 3.2s ease-in-out infinite;
  transform-origin: center;
  transition: filter .9s ease, opacity .9s ease;
}
@keyframes fishBob {
  0%, 100% { transform: scaleX(var(--fx, 1)) translateY(0); }
  50%      { transform: scaleX(var(--fx, 1)) translateY(-5px); }
}

.fish.back  img { filter: brightness(.7) saturate(.82); opacity: .92; }
.fish.mid   img { filter: brightness(.86); }
.fish.front img { filter: brightness(1.04); }

.fish-emote {
  position: absolute;
  z-index: 1;
  top: -54px;
  left: 50%;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  background-repeat: no-repeat;
  background-size: 144px 48px;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
  animation: fishEmoteFrames .54s steps(3) infinite, fishEmotePop 2.4s ease-out forwards;
}
.fish-dice-emote {
  position: absolute;
  z-index: 6;
  top: -57px;
  left: 50%;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  background-repeat: no-repeat;
  background-size: 288px 48px;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
  animation: fishDicePop 2.9s ease-out forwards;
}
.fish-dice-emote.rolling {
  animation: fishDiceRoll 1.05s steps(5, end), fishDicePop 2.9s ease-out forwards;
}
@keyframes fishDiceRoll {
  from { background-position: 0 0; }
  to { background-position: -240px 0; }
}
@keyframes fishDicePop {
  0% { opacity: 0; transform: translateY(7px) scale(.7); }
  10%, 80% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-5px) scale(.9); }
}
.fish-interaction-menu {
  position: absolute;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: min(224px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid #347ba0;
  border-radius: 10px;
  background: linear-gradient(180deg, #123550, #081c2e);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .55), 0 0 12px rgba(79, 216, 240, .22);
}
.fish-interaction-action {
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid #24506f;
  border-radius: 7px;
  background: #0c263d;
  color: #d3eaf7;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.fish-interaction-action:hover:not(:disabled),
.fish-interaction-action:focus-visible {
  border-color: var(--cyan);
  color: #fff;
  outline: none;
}
.fish-interaction-action:disabled {
  opacity: .48;
  cursor: not-allowed;
}
.fish-trick img { animation: fishTrick .8s ease-in-out; }
.fish-special-pose img { animation: fishSpecialPose 1.25s ease-in-out; }
.fish-cuddled::after {
  content: "♥";
  position: absolute;
  z-index: 2;
  top: -19px;
  left: 50%;
  color: #ff83b7;
  font-size: 21px;
  text-shadow: 0 0 9px rgba(255, 131, 183, .8);
  pointer-events: none;
  animation: fishHeart 1.1s ease-out forwards;
}
.fish-playing img { animation: fishPlay 1.1s ease-in-out; }
.fish-resting img { animation: fishRest 1.1s ease-in-out infinite alternate; }
.fish.back.fish-hiding img { opacity: .68; filter: brightness(.58) saturate(.72); }
.fish-visitor {
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6));
}
.fish-visitor.arriving { animation: fishVisitor 6.3s ease-in-out forwards; }
.fish-found-shell {
  position: absolute;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 222, 160, .8);
  border-radius: 50%;
  background: rgba(15, 47, 67, .82);
  box-shadow: 0 0 15px rgba(255, 218, 147, .65);
  font-size: 23px;
  pointer-events: auto;
  animation: foundShell 1s ease-in-out infinite alternate;
}
.fish-found-shell:hover { transform: scale(1.12); }
@keyframes fishTrick {
  0%, 100% { transform: scaleX(var(--fx, 1)) rotate(0) translateY(0); }
  35% { transform: scaleX(var(--fx, 1)) rotate(180deg) translateY(-12px); }
  70% { transform: scaleX(var(--fx, 1)) rotate(360deg) translateY(-4px); }
}
@keyframes fishSpecialPose {
  0%, 100% { transform: scaleX(var(--fx, 1)) rotate(0) scale(1); }
  25% { transform: scaleX(var(--fx, 1)) rotate(180deg) scale(1.12); }
  50% { transform: scaleX(var(--fx, 1)) rotate(360deg) scale(1.2); }
  75% { transform: scaleX(var(--fx, 1)) rotate(540deg) scale(1.08); }
}
@keyframes fishHeart {
  from { opacity: 0; transform: translate(-50%, 8px) scale(.6); }
  20%, 65% { opacity: 1; }
  to { opacity: 0; transform: translate(-50%, -25px) scale(1.15); }
}
@keyframes fishPlay {
  0%, 100% { transform: scaleX(var(--fx, 1)) translateY(0); }
  30% { transform: scaleX(var(--fx, 1)) rotate(-12deg) translateY(-8px); }
  65% { transform: scaleX(var(--fx, 1)) rotate(12deg) translateY(-3px); }
}
@keyframes fishRest {
  from { transform: scaleX(var(--fx, 1)) translateY(0); opacity: .78; }
  to { transform: scaleX(var(--fx, 1)) translateY(2px); opacity: .95; }
}
@keyframes fishVisitor {
  0% { opacity: 0; transform: translateX(0); }
  12%, 82% { opacity: .95; }
  100% { opacity: 0; transform: translateX(120vw); }
}
@keyframes foundShell {
  from { transform: translateY(0) scale(.95); }
  to { transform: translateY(-5px) scale(1.08); }
}
@keyframes fishEmoteFrames {
  from { background-position: 0 0; }
  to { background-position: -144px 0; }
}
@keyframes fishEmotePop {
  0% { opacity: 0; transform: translateY(7px) scale(.7); }
  12%, 78% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-5px) scale(.9); }
}

/* águas-vivas: deriva suave */
.fish.float img { animation-name: jellyBob; animation-duration: 5.4s; }
@keyframes jellyBob {
  0%, 100% { transform: scaleX(var(--fx, 1)) translateY(0) rotate(-2deg); }
  50%      { transform: scaleX(var(--fx, 1)) translateY(-8px) rotate(2deg); }
}

/* decor sprites */
.decor-plant {
  position: absolute;
  bottom: 8%;
  image-rendering: pixelated;
  transform-origin: bottom center;
  animation: plantSway 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes plantSway {
  0%, 100% { transform: translateX(-50%) rotate(-2deg) scaleY(1); }
  50% { transform: translateX(-50%) rotate(2deg) scaleY(1.04); }
}
.decor-item {
  position: absolute;
  bottom: 10%;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4));
}
.decor-placed {
  transform: translateX(-50%);
  pointer-events: none;
  cursor: default;
  touch-action: none;
}
.decor-edit-mode .decor-placed {
  pointer-events: auto;
  cursor: grab;
}
.decor-edit-mode .decor-placed.is-dragging { cursor: grabbing; }
.decor-remove {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -6px;
  display: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: #d94a5b;
  color: #fff;
  font: 700 16px/18px Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}
.decor-edit-mode .decor-remove { display: block; }
.decor-remove:hover { background: #f06a77; }
.decor-diver {
  position: absolute;
  height: 68px;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35));
  animation: diverDrift 4.8s ease-in-out infinite;
}
.decor-diver img {
  display: block;
  image-rendering: pixelated;
}
@keyframes diverDrift {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}
.decor-placement-active { cursor: crosshair; }
.decor-placement-preview {
  z-index: 13;
  opacity: .8;
  outline: 1px dashed rgba(255, 255, 255, .8);
  pointer-events: none;
}
.decor-placement-hint {
  margin: 0 0 8px;
  color: #8fb5ca;
  font-size: 9px;
  line-height: 1.45;
}
.decor-edit-toggle {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 6px;
  font-size: 7px;
}
.decor-edit-toggle[aria-pressed="true"] {
  border-color: #56d8f0;
  color: #a7efff;
  background: linear-gradient(180deg, #123f56 0%, #0b2637 100%);
}

/* food + coins */
.food-bit {
  position: absolute;
  width: 14px; height: 14px;
  background: url("assets/outros/comida.png") center / contain no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 4px rgba(255, 206, 107, .6));
  animation: foodFall 2.4s linear forwards;
}
@keyframes foodFall {
  0% { transform: translateY(0); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(180px); opacity: 0; }
}

.coin-float {
  position: absolute;
  width: 28px; height: 28px;
  background: url("assets/outros/moeda.png") center / contain no-repeat;
  image-rendering: pixelated;
  pointer-events: auto;
  cursor: pointer;
  animation: coinBob 1.6s ease-in-out infinite, coinIn .35s ease-out;
  filter: drop-shadow(0 0 7px rgba(255, 201, 74, .8));
}
.coin-float.coin-targeted {
  filter: drop-shadow(0 0 10px rgba(255, 236, 150, .95));
}
.coin-float.coin-targeted::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(255, 238, 164, .65);
  border-radius: 50%;
  animation: coinTargetPulse .9s ease-out infinite;
}
@keyframes coinBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes coinIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes coinTargetPulse {
  from { transform: scale(.65); opacity: .8; }
  to { transform: scale(1.35); opacity: 0; }
}

/* cleaning sparkle */
.sparkle {
  position: absolute;
  font-size: 14px;
  pointer-events: none;
  animation: sparkleAnim 1.1s ease-out forwards;
  z-index: 13;
}
@keyframes sparkleAnim {
  0% { transform: scale(0) rotate(0); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: scale(1.4) rotate(160deg); opacity: 0; }
}

/* tank action buttons */
.tank-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0;
}
.tank-console {
  position: relative;
  margin-top: -1px;
  padding: 8px;
  border: 1px solid #1e5478;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #123a55 0%, #0a2437 100%);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .28);
}
.tank-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid #24506f;
  background: linear-gradient(180deg, #12304b 0%, #0b2033 100%);
  color: #cfe6f5;
  transition: .18s;
}
.tank-btn span { font-size: 17px; }
.tank-btn small {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  letter-spacing: .3px;
}
.tank-btn:hover {
  border-color: var(--cyan);
  color: #eafcff;
  box-shadow: 0 0 16px rgba(79, 216, 240, .3);
  transform: translateY(-2px);
}
.tank-btn:active { transform: translateY(0); }

.tank-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--muted);
}
.tank-footer .dot { opacity: .6; }
.tank-warn { color: var(--gold); font-weight: 700; }
.tank-warn.crit { color: #ff9b9b; }

/* ---------- TASKS ---------- */
.tasks { display: flex; flex-direction: column; gap: 9px; }
.task {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 9px;
  border: 1px solid #1a3a58;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  font-size: 12.5px;
  color: #c3d8e9;
}
.task-check {
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 2px solid #3d6f92;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
  color: transparent;
}
.task.done .task-check {
  border-color: var(--green);
  background: rgba(87, 217, 126, .18);
  color: var(--green);
}
.task.done .task-text { color: var(--muted); text-decoration: line-through; }
.task-text { flex: 1; }

/* ---------- DECOR SHOP ---------- */
.deco-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  overflow-y: auto;
  min-height: 0;
  align-content: start;
  padding-right: 2px;
}
.deco-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 3px 5px;
  border-radius: 9px;
  border: 1px solid #1a3a58;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  transition: .16s;
  position: relative;
  min-width: 0;
}
.deco-tile:hover { border-color: #2f7fa5; transform: translateY(-1px); }
.deco-tile.selected {
  border-color: #56d8f0;
  box-shadow: 0 0 0 1px rgba(86, 216, 240, .28), 0 0 12px rgba(86, 216, 240, .18);
}
.dt-thumb { display: grid; place-items: center; height: 26px; }
.dt-thumb img { width: 24px; height: auto; }
.dt-name {
  font-size: 8px;
  line-height: 1.15;
  color: #b9d3e5;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dt-price {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 3px;
}
.dt-owned {
  position: absolute;
  top: 2px; right: 3px;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: var(--green);
}
.dt-action {
  font-family: 'Press Start 2P', monospace;
  font-size: 5px;
  line-height: 1.4;
  color: #7fbad0;
  text-align: center;
}
.deco-thumb {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: radial-gradient(circle at 40% 30%, #16324c, #0a1a2b);
  border: 1px solid #1e4560;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 20px;
}
.deco-thumb img { width: 26px; height: auto; }
.deco-info { flex: 1; min-width: 0; }

/* ---------- BACKGROUNDS ---------- */
.bg-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bg-opt {
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  border: 2px solid #1e4560;
  overflow: hidden;
  position: relative;
  transition: .18s;
}
.bg-opt.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(79, 216, 240, .55);
}
.bg-opt.locked { opacity: .55; }
.bg-opt .bg-preview { position: absolute; inset: 0; }
.bg-opt .bg-price {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(4, 12, 22, .78);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  padding: 2px 0;
}
.bg-opt .bg-name {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #eaf9ff;
  text-shadow: 0 1px 3px #000;
  text-align: center;
  padding: 4px;
  line-height: 1.5;
  pointer-events: none;
}

/* ---------- LUZ UV (painel) ---------- */
.light-dots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  justify-items: center;
}
.light-dot {
  width: 100%;
  max-width: 34px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid #1e4560;
  background: radial-gradient(circle at 35% 30%, rgb(var(--dot) / 1), rgb(var(--dot) / .55));
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .45);
  transition: .18s;
  position: relative;
}
.light-dot:hover { transform: translateY(-2px); border-color: #4f8fb4; }
.light-dot.selected {
  border-color: #eafcff;
  box-shadow: 0 0 12px 2px rgb(var(--dot) / .85), inset 0 -2px 4px rgba(0, 0, 0, .35);
}
.light-dot.locked { opacity: .35; }
.light-dot.locked::after {
  content: "🔒";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
}
.light-hint {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}

/* ================= OVERLAY ================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 9, 18, .78);
  backdrop-filter: blur(6px);
  display: none;
  z-index: 80;
  padding: 24px;
}
.overlay.open { display: flex; align-items: center; justify-content: center; }
.overlay-sheet {
  width: min(760px, 100%);
  max-height: 86dvh;
  background: linear-gradient(180deg, #10253c 0%, #0a1a2b 100%);
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.overlay-head {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #1a3a58;
}
.overlay-head h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #bfe8ff;
}
.close-btn {
  margin-left: auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid #24506f;
  color: #9ec4dc;
  font-size: 13px;
  transition: .18s;
}
.close-btn:hover { border-color: var(--red); color: var(--red); }
.overlay-body {
  padding: 16px 18px 22px;
  overflow-y: auto;
}
.overlay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.card {
  border: 1px solid #1a3a58;
  border-radius: 10px;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  padding: 12px;
  text-align: center;
  transition: .18s;
  cursor: pointer;
}
.card:hover { border-color: #2f6f95; transform: translateY(-2px); }
.card img { width: 54px; height: auto; margin-bottom: 6px; }
.card .c-name { font-size: 13px; font-weight: 700; }
.card .c-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.card.out { opacity: .6; border-style: dashed; }
.card.out:hover { opacity: 1; }
.fish-card-toggle { width: 100%; margin-top: 10px; white-space: normal; font-size: 9px; }

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #8ec9e4;
  margin: 18px 0 10px;
  letter-spacing: .3px;
}
.section-title:first-child { margin-top: 0; }

.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid #1a3a58;
  border-radius: 10px;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  margin-bottom: 10px;
}
.row-item img { width: 40px; }
.row-item .ri-body { flex: 1; min-width: 0; }
.row-item .ri-name { font-size: 13px; font-weight: 700; }
.row-item .ri-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ri-price { color: var(--gold); font-size: 12px; font-weight: 800; }
.egg-info-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--cyan);
}
.egg-info-btn:hover { border-color: var(--cyan); background: rgba(79, 216, 240, .12); }

.egg-info-card { width: min(460px, 100%); }
.egg-odds-list { display: grid; gap: 8px; }
.egg-odds-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #1a3a58;
  border-radius: 10px;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
}
.egg-odds-sprite {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(79, 216, 240, .08);
}
.egg-odds-sprite img { max-width: 38px; max-height: 38px; object-fit: contain; }
.egg-odds-name { font-size: 13px; font-weight: 700; }
.egg-odds-chance {
  color: var(--gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  white-space: nowrap;
}
.egg-odds-note { margin-top: 12px; color: var(--muted); font-size: 11px; text-align: center; }

/* ---------- MELHORIAS DO AQUÁRIO ---------- */
.upg-row { align-items: center; }
.lvl-tag {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--cyan);
  margin-left: 6px;
  white-space: nowrap;
}
.lvl-pips { display: flex; gap: 4px; margin-top: 7px; }
.lvl-pips i {
  width: 9px; height: 9px;
  border-radius: 2px;
  background: #081827;
  border: 1px solid #2a5d86;
}
.lvl-pips i.on {
  background: linear-gradient(180deg, #5fe1ff, #2b9bc4);
  border-color: #7fe8ff;
  box-shadow: 0 0 8px rgba(79, 216, 240, .65);
}
.ri-max {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--green);
  white-space: nowrap;
}
.btn[disabled] { opacity: .45; pointer-events: none; }

.color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.color-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 4px 7px;
  border-radius: 10px;
  border: 1px solid #1a3a58;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  transition: .18s;
  min-width: 0;
}
.color-opt:hover { border-color: #2f6f95; transform: translateY(-2px); }
.color-opt.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(79, 216, 240, .35);
}
.color-opt.locked { opacity: .62; }
.color-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgb(var(--dot) / 1);
  box-shadow: 0 0 12px rgb(var(--dot) / .8), inset 0 -2px 4px rgba(0, 0, 0, .35);
}
.color-name { font-size: 10px; font-weight: 700; color: #d7eaf8; }
.color-sub {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: var(--green);
}
.color-price {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 2px;
}
.color-hint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.color-hint b { color: #e6f6ff; }

.achiev-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid #1a3a58;
  border-radius: 10px;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  margin-bottom: 10px;
}
.achiev-item.locked { opacity: .5; }
.achiev-icon { font-size: 22px; width: 30px; text-align: center; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #1a3a58;
  border-radius: 10px;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  margin-bottom: 10px;
  font-size: 13px;
}
.btn {
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid #2a5d86;
  background: linear-gradient(180deg, #12304b 0%, #0b2033 100%);
  color: #d3e8f7;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  letter-spacing: .3px;
  transition: .18s;
}
.btn:hover { border-color: var(--cyan); color: #eafcff; }
.btn.primary {
  border-color: #2f9ec2;
  background: linear-gradient(180deg, #1d7ea8 0%, #12557a 100%);
  color: #f2feff;
}
.btn.danger {
  border-color: #a33b3b;
  background: linear-gradient(180deg, #8b2b2b 0%, #5a1717 100%);
  color: #ffe3e3;
}

/* ================= MODALS ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 9, 18, .8);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 90;
}
.modal.open { display: flex; }
.modal-card {
  width: min(430px, 100%);
  max-height: 88dvh;
  background: linear-gradient(180deg, #10253c 0%, #0a1a2b 100%);
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65);
}
.modal-card.small { width: min(360px, 100%); }
.modal-head {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid #1a3a58;
}
.modal-head h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #bfe8ff;
}
.modal-body { padding: 16px; overflow-y: auto; }
.modal-body.center { text-align: center; }
.modal-text { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }

.type-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid #24506f;
  background: linear-gradient(180deg, #0e2136 0%, #0a1a2b 100%);
  transition: .18s;
}
.type-btn:hover { transform: translateY(-2px); box-shadow: 0 0 18px rgba(79, 216, 240, .25); }
.type-btn.salt:hover { border-color: #4fb6d8; }
.type-btn.fresh:hover { border-color: #57d97e; }
.type-icon { font-size: 26px; }
.type-btn b { display: block; font-size: 13px; color: #e2f2ff; }
.type-btn small { font-size: 11.5px; color: var(--muted); }

.fm-sprite {
  height: 120px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 60%, rgba(41, 130, 170, .35), rgba(6, 22, 38, .2) 70%);
  border: 1px solid #17374f;
  border-radius: 10px;
  margin-bottom: 12px;
}
.fm-sprite img { width: 86px; height: auto; animation: idleFloat 3s ease-in-out infinite; }
@keyframes idleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.fm-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.fm-species { font-size: 13px; font-weight: 700; color: #cfe3f2; width: 100%; text-align: center; }
.fm-name-edit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.fm-name-edit label { color: var(--muted); font-size: 11px; font-weight: 700; }
.fm-name-edit input {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #24506f;
  border-radius: 8px;
  outline: none;
  background: #081827;
  color: var(--text);
  font: 700 12px 'Nunito', system-ui, sans-serif;
}
.fm-name-edit input:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(79, 216, 240, .16); }
.fm-name-edit .btn { padding: 8px 10px; white-space: nowrap; }
.tag {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(79, 216, 240, .14);
  border: 1px solid #2a6d8c;
  color: #9fe6f8;
}
.tag.rarity { background: rgba(255, 201, 74, .14); border-color: #7a5c1c; color: var(--gold); }

.fm-stats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.fm-row {
  display: grid;
  grid-template-columns: 88px 1fr 42px;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.fm-row .bar {
  height: 9px;
  border-radius: 5px;
  background: #081827;
  border: 1px solid #1e4560;
  overflow: hidden;
}
.fm-row .fill { height: 100%; width: 50%; background: linear-gradient(90deg, #e0a13a, #ffce6b); transition: width .4s; }
.fm-row .fill.pink { background: linear-gradient(90deg, #d9538a, #ff9cc2); }
.fm-row .fill.cyan { background: linear-gradient(90deg, #2aa8c9, #74e6ff); }
.fm-row .fill.gold { background: linear-gradient(90deg, #c9971d, #ffdb73); }
.fm-row .fill.bond { background: linear-gradient(90deg, #b9439f, #ff9fca); }
.fm-row b { text-align: right; font-size: 11px; color: #cfe3f2; }
.fm-row.fm-bond-row { grid-template-columns: 88px minmax(40px, 1fr) 118px; }
.fm-friendship {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #1e4560;
  border-radius: 8px;
  background: rgba(8, 24, 39, .65);
  color: #a9c5d8;
  font-size: 11px;
}
.fm-friendship b {
  min-width: 0;
  color: #cfe3f2;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-actions { display: flex; flex-direction: column; gap: 9px; }
.fm-offline {
  font-size: 11.5px;
  color: #ffd39a;
  background: rgba(255, 176, 74, .09);
  border: 1px solid rgba(255, 176, 74, .35);
  border-radius: 9px;
  padding: 9px 11px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.fm-offline b { color: #ffe6bf; }
.fm-stats.off .fm-row { opacity: .55; }
.fm-stats.off .fm-friendship { opacity: .55; }
.btn.ghost { background: none; border-color: #24425c; color: #9ec4dc; }

.hatch-stage {
  height: 110px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
#hatchEgg {
  width: 56px;
  height: auto;
  display: block;
  image-rendering: pixelated;
  animation: eggShake .55s ease-in-out infinite;
}
#hatchEgg.cracking { animation-duration: .16s; filter: drop-shadow(0 0 10px #ffd76b); }
@keyframes eggShake { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.hatch-stage #hatchImg { width: 76px; height: auto; display: none; animation: popIn .45s ease-out; }
@keyframes popIn { from { transform: scale(0); } 70% { transform: scale(1.15); } to { transform: scale(1); } }

.game-hud {
  display: flex;
  justify-content: space-between;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #9fd8ee;
  margin-bottom: 12px;
}
.game-area {
  height: 230px;
  border-radius: 10px;
  border: 1px solid #1e4560;
  background: radial-gradient(circle at 50% 120%, #1c6d94, #072a44 70%);
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.game-bubble {
  position: absolute;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.9), rgba(79,216,240,.55) 55%, rgba(20,90,120,.7));
  border: 1px solid rgba(200, 245, 255, .6);
  display: grid;
  place-items: center;
  color: #06384f;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  animation: bubbleBob 2s ease-in-out infinite;
}
.game-bubble .coin-lg { width: 20px; height: 20px; margin: 0; }
@keyframes bubbleBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---- peixe faminto ---- */
.hearts { color: #ff7a93; letter-spacing: 1px; }
.feed-area {
  touch-action: none;
  cursor: crosshair;
  background: linear-gradient(180deg, #0a3f5e 0%, #0c5478 55%, #14688c 100%);
}
.feed-area::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16px;
  background: linear-gradient(180deg, rgba(230, 198, 138, .9), rgba(186, 146, 84, .95));
  border-top: 1px solid rgba(255, 242, 205, .35);
  pointer-events: none;
  z-index: 1;
}
.hearts .lost { color: rgba(255, 255, 255, .22); }
.feed-fish {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .45));
}
.feed-fish img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  transform: scaleX(var(--fx, 1));
  animation: feedBob 1.4s ease-in-out infinite;
}
@keyframes feedBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.feed-pellet {
  position: absolute;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #f2a63a 60%, #b26c12 100%);
  box-shadow: 0 0 7px rgba(255, 190, 90, .65);
  z-index: 2;
}
.feed-pellet.gold {
  width: 17px; height: 17px;
  background: radial-gradient(circle at 35% 30%, #fffbd0, #ffd257 55%, #c98a06 100%);
  box-shadow: 0 0 12px rgba(255, 215, 90, .95);
}
.feed-pop {
  position: absolute;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #ffe9a8;
  pointer-events: none;
  z-index: 4;
  animation: feedPop .7s ease-out forwards;
}
@keyframes feedPop {
  from { opacity: 1; transform: translate(-50%, 0) scale(.7); }
  to { opacity: 0; transform: translate(-50%, -26px) scale(1.1); }
}
.feed-area.feed-shake { animation: feedShake .28s ease-in-out; }
@keyframes feedShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.toast {
  position: fixed;
  left: 50%;
  top: 76px;
  transform: translate(-50%, -12px);
  background: rgba(6, 18, 30, .96);
  border: 1px solid var(--cyan);
  color: #dbf7ff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 9px;
  box-shadow: 0 0 22px rgba(79, 216, 240, .35);
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 120;
  max-width: 82vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 860px) {
  .toast { top: auto; bottom: 20px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1240px) {
  .dashboard { gap: 12px; padding: 12px; }
  .brand-text { font-size: 13px; }
}

/* tablet landscape */
@media (max-width: 1080px) and (min-width: 861px) {
  .dashboard {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: auto repeat(5, minmax(180px, auto));
  }
  .dashboard-widget[data-widget="overview"] { grid-column: 1 / span 2; grid-row: 2; }
  .dashboard-widget[data-widget="fish"] { grid-column: 1 / span 2; grid-row: 3; }
  .dashboard-widget[data-widget="water"] { grid-column: 1 / span 2; grid-row: 4; }
  .dashboard-widget[data-widget="tank"] { grid-column: 3 / span 4; grid-row: 2 / span 3; }
  .dashboard-widget[data-widget="tasks"] { grid-column: 1 / span 2; grid-row: 5; }
  .dashboard-widget[data-widget="background"] { grid-column: 3 / span 2; grid-row: 5; }
  .dashboard-widget[data-widget="light"] { grid-column: 5 / span 2; grid-row: 5; }
  .dashboard-widget[data-widget="decor"] { grid-column: 3 / span 2; grid-row: 6; }
  .dashboard.is-customized { grid-template-rows: auto; }
  .dashboard.is-customized .dashboard-widget { grid-column: span var(--widget-span, 2); }
}

@media (min-width: 861px) {
  .dashboard-widget.is-window-closed,
  .dashboard-widget.is-window-minimized { display: none !important; }
}

/* mobile & small tablet */
@media (max-width: 860px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; grid-template-rows: auto auto auto; }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    background: rgba(8, 18, 34, .96);
    backdrop-filter: blur(10px);
  }
  .brand-text { font-size: 11px; }
  .brand-icon { width: 34px; }
  .brand-dots { display: none; }
  .top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 32px;
    gap: 6px;
    width: 100%;
    margin-left: 0;
  }
  .top-actions .chip { justify-content: center; min-width: 0; }
  .chip { padding: 6px 9px; font-size: 9px; }
  .chip-icon { font-size: 12px; }
  .icon-btn { width: 32px; height: 32px; font-size: 14px; }

  .dashboard {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-auto-rows: auto;
    gap: 12px;
    padding: 12px;
    overflow: visible;
  }
  .dashboard-toolbar,
  .widget-grip,
  .widget-resize,
  .widget-window-controls,
  .dashboard-window-tools,
  .top-actions .layout-actions { display: none !important; }
  .dashboard.editing .dashboard-widget { outline: none; }
  .dashboard.editing .dashboard-widget.panel .panel-head { padding-right: 0; }
  .dashboard-widget[data-widget="tank"] { grid-area: auto; grid-column: 1; grid-row: 1; min-height: 0; }
  .dashboard-widget[data-widget="overview"] { grid-column: 1; grid-row: 2; }
  .dashboard-widget[data-widget="fish"] { grid-column: 1; grid-row: 3; }
  .dashboard-widget[data-widget="water"] { grid-column: 1; grid-row: 4; }
  .dashboard-widget[data-widget="tasks"] { grid-column: 1; grid-row: 5; }
  .dashboard-widget[data-widget="background"] { grid-column: 1; grid-row: 6; }
  .dashboard-widget[data-widget="light"] { grid-column: 1; grid-row: 7; }
  .dashboard-widget[data-widget="decor"] { grid-column: 1; grid-row: 8; }
  .dashboard.is-customized { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-auto-rows: auto; }
  .dashboard.is-customized .dashboard-widget { grid-area: auto; grid-column: 1; grid-row: auto; }
  .dashboard.is-customized .dashboard-widget[data-widget="tank"] { grid-row: 1; }
  .dashboard.is-customized .dashboard-widget[data-widget="overview"] { grid-row: 2; }
  .dashboard.is-customized .dashboard-widget[data-widget="fish"] { grid-row: 3; }
  .dashboard.is-customized .dashboard-widget[data-widget="water"] { grid-row: 4; }
  .dashboard.is-customized .dashboard-widget[data-widget="tasks"] { grid-row: 5; }
  .dashboard.is-customized .dashboard-widget[data-widget="background"] { grid-row: 6; }
  .dashboard.is-customized .dashboard-widget[data-widget="light"] { grid-row: 7; }
  .dashboard.is-customized .dashboard-widget[data-widget="decor"] { grid-row: 8; }
  .dashboard.is-freeform {
    position: static;
    display: grid;
    overflow: visible;
    isolation: auto;
  }
  .dashboard.is-freeform .dashboard-toolbar { position: static; min-height: 0; padding: 0; }
  .dashboard.is-freeform .dashboard-widget {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    grid-area: auto;
    grid-column: 1;
    grid-row: auto;
    overflow: visible;
    min-width: 0;
    min-height: 0;
  }
  .dashboard.is-freeform .dashboard-widget[data-widget="tank"] { overflow: visible; }

  .tank { min-height: 0; aspect-ratio: 4 / 3.1; }
  .tank-shell { flex: none; }
  .tank-actions { display: flex; flex-wrap: wrap; gap: 7px; }
  .tank-btn { flex: 1 1 30%; min-width: 0; flex-direction: row; gap: 6px; padding: 9px 6px; }
  .tank-btn small { font-size: 7px; }

  .overlay { padding: 0; align-items: flex-end; }
  .overlay-sheet {
    width: 100%;
    max-height: 88dvh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }
  .overlay-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 9px; }
  .color-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toast { bottom: 20px; }
  .fm-sprite { height: 100px; }
  .fm-sprite img { width: 70px; }
}

@media (max-width: 420px) {
  .brand-text { font-size: 10px; }
  .topbar { gap: 6px; padding: 7px 9px; }
  .top-actions { gap: 5px; }
  .chip { padding: 5px 4px; font-size: 7px; }
  .chip-icon { width: 13px; height: 13px; }
  .panel { padding: 10px 11px; }
  .panel-head h2 { font-size: 9px; }
  .tank-btn small { font-size: 6px; }
  .bg-opt .bg-name { font-size: 6px; }
}
