/* [VN/SEA] Dino Wilds - Gara. Dark navy grid, thin blue-grey borders, cyan/white text, amber accents. Local fonts only. */
:root {
  --bg: #0a1220; --bg2: #0d1728; --card: #0e192b; --line: #22324a; --line2: #2c3f5c;
  --text: #e8eef7; --muted: #8da0bb; --cyan: #5fd4ff; --amber: #f5b72e; --amber-ink: #1b1300;
  --cream: #fff7e0; --cream-ink: #5a3d00; --green: #22c55e; --orange: #f59e0b; --blue: #38bdf8; --red: #f87171;
  --radius: 10px; --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  --sans: "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 14px/1.45 var(--sans);
  background-color: var(--bg);
  background-image: linear-gradient(rgba(95,212,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(95,212,255,.035) 1px, transparent 1px);
  background-size: 32px 32px; padding-bottom: 96px;
}
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--amber-ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px;
  border-bottom: 1px solid var(--line); background: rgba(10,18,32,.92); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { display: block; border-radius: 8px; }
.brand-name { font-weight: 800; letter-spacing: .08em; }
.brand-tag { font: 11px var(--mono); color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.account { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.who { font-weight: 700; }
.who .mono { color: var(--muted); font-weight: 400; margin-left: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 8px 14px;
  border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: 600 13px var(--sans);
  text-decoration: none; cursor: pointer; }
.btn:hover:not([disabled]) { border-color: var(--cyan); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-amber { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.btn-amber:hover:not([disabled]) { filter: brightness(1.06); border-color: var(--amber); }
.btn-wide { width: 100%; }

main { max-width: 1560px; margin: 0 auto; padding: 18px 20px 0; }
.notice { background: var(--cream); color: var(--cream-ink); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 22px; }
.notice h1 { font-size: 14px; margin: 0 0 4px; color: #3c2a00; }
.notice p { margin: 0; font-size: 13px; }
.notice-list { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.notice .gate { margin-top: 8px; font-weight: 700; color: #8a4b00; }
.error { border: 1px solid var(--red); color: #ffd7d7; background: rgba(248,113,113,.08); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.login { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 28px; max-width: 640px; }
.login h2 { margin-top: 0; }

.section-title { font: 700 12px var(--sans); letter-spacing: .14em; color: var(--muted); margin: 6px 0 12px; display: flex; align-items: center; gap: 8px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  border: 1px solid var(--line2); color: var(--text); font: 600 11px var(--mono); letter-spacing: 0; }
section + section { margin-top: 26px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .cards { grid-template-columns: 1fr; } .brand-tag { display: none; } main { padding: 14px 12px 0; }
  .topbar { flex-wrap: wrap; padding: 8px 12px; } .account { width: 100%; justify-content: space-between; }
  .who { min-width: 0; overflow-wrap: anywhere; font-size: 13px; } .dock-item { padding: 8px 10px; }
}
.who, .species, .chip, .notice p, .empty, .state-note { overflow-wrap: anywhere; }
main, .card, .current .card { min-width: 0; max-width: 100%; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.art { background: #000; border-radius: 8px; aspect-ratio: 2.9 / 1; display: grid; place-items: center; align-content: center; gap: 4px; border: 1px solid #111a29; }
.art-initials { font: 800 34px var(--sans); letter-spacing: .08em; color: #2b3e5c; }
.art-note { font-size: 11px; color: #51627c; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.species { margin: 0; font-size: 16px; }
.sexgrowth { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dinoid { font-size: 12px; color: var(--muted); }
.dinoid .mono { color: var(--amber); }
.prime { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.prime-title { color: var(--muted); }
.prime.on .prime-title { color: #fb923c; }
.prime-sub { color: var(--muted); }
.stats { margin: 0; display: grid; gap: 6px; }
.stat { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; }
.stat dt { font-size: 11px; color: var(--muted); }
.stat dd { margin: 0; display: grid; grid-template-columns: 1fr 44px; align-items: center; gap: 8px; }
.bar { height: 6px; background: #17233a; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; }
.hp .bar i { background: var(--green); } .food .bar i { background: var(--orange); } .water .bar i { background: var(--blue); }
.pct { text-align: right; font: 600 11px var(--mono); }
.stored { margin: 0; font-size: 11px; color: var(--muted); }
.mutations h4 { margin: 4px 0 6px; font-size: 12px; }
.mut-group { margin-bottom: 6px; }
.mut-group h5 { margin: 0 0 4px; font: 700 10px var(--sans); letter-spacing: .1em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11px; border: 1px solid var(--line2); border-radius: 5px; padding: 3px 8px; background: var(--bg2); }
.none { font-size: 11px; color: var(--muted); }
.actions { margin-top: auto; display: grid; gap: 8px; }
.state-note { font-size: 12px; color: var(--amber); }

.current .card { max-width: 520px; }
.current .empty, .cards .empty { border: 1px dashed var(--line2); border-radius: var(--radius); padding: 22px; color: var(--muted); background: rgba(14,25,43,.6); }
.cards .empty { grid-column: 1 / -1; }
.skeleton { height: 280px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(90deg, #0e192b, #13213a, #0e192b); background-size: 200% 100%; animation: sk 1.4s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

.history { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); max-width: 760px; }
.history li { display: flex; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; }
.history li:first-child { border-top: 0; }
.history time { color: var(--muted); font-family: var(--mono); white-space: nowrap; }

.dock { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px;
  background: rgba(13,23,40,.95); border: 1px solid var(--line2); border-radius: 12px; z-index: 6; max-width: calc(100% - 24px); }
.dock-item { padding: 8px 14px; border-radius: 8px; color: var(--text); text-decoration: none; font: 600 13px var(--sans); white-space: nowrap; }
.dock-item:hover { background: #15233b; }
.dock-item.active { background: var(--amber); color: var(--amber-ink); }
.testmode { background: #b91c1c; color: #fff; font: 700 13px var(--sans); text-align: center; padding: 6px; letter-spacing: .04em; }
