:root { --bg:#05060b; --panel:#0d1020; --line:#1d2340; --text:#e6e9ff; --muted:#8890b8; --acc:#7cf3d0; --acc2:#ff6fae; --good:#6ff0a0; --ok:#ffd36f; --bad:#ff6f7d; }
* { box-sizing: border-box; }
body { margin:0; background: radial-gradient(1200px 600px at 20% -10%, #14183a 0%, var(--bg) 60%); color:var(--text); font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; min-height:100vh; }
header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 28px 8px; flex-wrap:wrap; }
.brand { display:flex; align-items:center; gap:12px; }
.logo { font-size:34px; color:var(--acc); text-shadow:0 0 18px var(--acc); }
h1 { margin:0; font-size:24px; letter-spacing:.5px; }
header p { margin:0; color:var(--muted); font-size:13px; }
h2 { font-size:14px; text-transform:uppercase; letter-spacing:1.2px; color:var(--muted); margin:6px 0 10px; }
button { background:#161a33; color:var(--text); border:1px solid var(--line); border-radius:10px; padding:8px 12px; font:inherit; cursor:pointer; }
button:hover:not(:disabled) { border-color:var(--acc); }
button:disabled { opacity:.45; cursor:default; }
button.primary { background:linear-gradient(135deg,#1d6f63,#5b2d7a); border-color:transparent; }
nav { display:flex; gap:8px; flex-wrap:wrap; }
.status { margin:4px 28px 14px; color:var(--text); min-height:1.4em; }
.hint { margin:-6px 28px 14px; padding:8px 12px; border:1px solid var(--line); border-left:3px solid var(--acc); border-radius:10px; background:#0b0e1d; font-size:14px; }
.hint[hidden] { display:none; }
.layout { display:grid; grid-template-columns: 1fr 320px; gap:22px; padding:0 28px 28px; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }
#tanks { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:18px; }
/* Phones: keep two tanks per row so all four fit on screen and the gaps and
   card text stay free for scrolling (the canvases themselves capture touch). */
@media (max-width: 640px) {
  header { padding:12px 14px 6px; } .status, .hint { margin-left:14px; margin-right:14px; }
  .layout { padding:0 14px 20px; gap:16px; }
  #tanks { gap:10px; }
  .meta { padding:8px; gap:4px; } .name { font-size:14px; }
  .meta .small { font-size:12px; } .meta .row:nth-child(2) { flex-wrap:wrap; justify-content:flex-start; column-gap:8px; }
  .meta .species { display:none; }
  .row.buttons { gap:4px; } .row.buttons button { padding:6px 7px; font-size:12px; flex:1 1 auto; }
  .overlay { left:6px; top:6px; font-size:12px; right:6px; }
  .focus-inner { padding:12px; } #focus { padding:8px; }
}
.tank { background:var(--panel); border:1px solid var(--line); border-radius:16px; overflow:hidden; transition:border-color .2s, box-shadow .2s; }
.tank.picked, #focus.picked .focus-inner { border-color:var(--acc2); box-shadow:0 0 0 1px var(--acc2), 0 0 26px rgba(255,111,174,.25); }
.glass { position:relative; aspect-ratio:1; }
.glass canvas, .focus-left canvas { width:100%; height:100%; display:block; cursor: crosshair; touch-action:none; image-rendering:auto; }
.overlay { position:absolute; left:10px; top:10px; pointer-events:none; font-weight:600; text-shadow:0 1px 6px #000; }
.tank.empty .glass { background: repeating-linear-gradient(45deg,#0a0c18 0 10px,#0c0f1e 10px 20px); }
.tank.empty .overlay span { color:var(--muted); }
.meta { padding:10px 12px 12px; display:grid; gap:6px; }
.row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.row.buttons { justify-content:flex-start; flex-wrap:wrap; }
.name, #focus-name { background:transparent; border:0; border-bottom:1px dashed var(--line); color:var(--text); font-family:inherit; font-weight:600; font-size:16px; padding:2px 0; width:100%; }
.name:focus, #focus-name:focus { outline:none; border-bottom-color:var(--acc); }
.gen { color:var(--muted); font-size:12px; white-space:nowrap; }
.small { font-size:13px; }
.muted { color:var(--muted); }
.good { color:var(--good); } .ok { color:var(--ok); } .bad, .dead { color:var(--bad); }
aside { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:14px 16px; align-self:start; }
aside ol { padding-left:18px; margin:0 0 10px; } aside li { margin-bottom:6px; }
.shelf-item { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--line); }
.shelf-item .nm { flex:1; cursor:pointer; font-weight:600; } .shelf-item .nm:hover { color:var(--acc); }
.shelf-item button { padding:2px 8px; }
.shelf-item.picked .pick { color:var(--acc2); border-color:var(--acc2); }
.dot { width:12px; height:12px; border-radius:50%; box-shadow:0 0 10px currentColor; }
#focus { position:fixed; inset:0; background:rgba(2,3,8,.82); backdrop-filter: blur(4px); display:flex; align-items:center; justify-content:center; padding:20px; z-index:10; }
#focus[hidden] { display:none; }
.focus-inner { position:relative; background:var(--panel); border:1px solid var(--line); border-radius:18px; padding:18px; display:grid; grid-template-columns: minmax(0, 560px) 340px; gap:20px; max-width:960px; width:100%; max-height:96vh; overflow:auto; }
@media (max-width: 900px) { .focus-inner { grid-template-columns: 1fr; } }
.focus-left canvas { border-radius:12px; aspect-ratio:1; height:auto; }
.focus-right { display:flex; flex-direction:column; gap:10px; }
.banner { background:#1a2a2a; border:1px solid #275; border-radius:10px; padding:8px 10px; margin:0; }
.healbig { font-size:20px; margin:0; }
table td { padding:3px 10px 3px 0; } table td:first-child { color:var(--muted); }
.buttons { display:flex; gap:8px; flex-wrap:wrap; }
#share-url { width:100%; background:#090b16; border:1px solid var(--line); color:var(--acc); border-radius:8px; padding:8px; font: 12px ui-monospace, monospace; }
.x { position:absolute; right:10px; top:10px; padding:4px 9px; z-index:2; }
#toast .toast-action { margin-left:10px; padding:4px 12px; font-weight:600; color:var(--acc); border-color:var(--acc); }
#toast { position:fixed; bottom:22px; left:50%; transform:translateX(-50%); background:#1a1f3d; border:1px solid var(--acc); padding:10px 16px; border-radius:12px; z-index:20; }
