/* GROKCHI — clean dark look, close to x.com.
   Black background, 1px borders, white text, one accent (brand main) from views/partials/head.ejs.
   Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64. Monospace only inside the ASCII pet art. */
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JBM'; src: url('/fonts/JetBrainsMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JBM'; src: url('/fonts/JetBrainsMono-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --bg: #000; --card: #0a0a0b; --raise: #16181c; --hover: #1d1f23; --line: #2f3336; --line2: #3e4144;
  --text: #e7e9ea; --muted: #71767b; --muted2: #8b9096;
  --red: #f4212e; --pink: #f91880; --yellow: #ffd400; --blue: #1d9bf0; --purple: #a970ff; --cyan: #5ed3f3;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --pill: 9999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JBM', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --nav-h: 60px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img.px, .px img { image-rendering: pixelated; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
p a, li a, dd a, .lnk { color: var(--main); }
:focus-visible { outline: 2px solid var(--main); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-weight: 700; margin: 0 0 var(--s3); letter-spacing: -0.015em; color: #fff; }
h1 { font-size: 32px; line-height: 1.15; } h2 { font-size: 20px; line-height: 1.25; } h3 { font-size: 15px; line-height: 1.35; }
p { margin: 0 0 var(--s3); }
ul, ol { margin: 0 0 var(--s3); padding-left: 20px; } li { margin: 0 0 var(--s2); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s4) 0; }
code { font-family: var(--mono); font-size: 13px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--s5); }
.muted { color: var(--muted); } .main { color: var(--main); } .acc { color: var(--text); font-weight: 600; } .red { color: var(--red); }
.mono { font-family: var(--mono); font-size: 13px; }
.small { font-size: 13px; }
.hide { display: none !important; }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s2); }

/* ── top nav ── */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(0,0,0,.78); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: var(--s6); height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: #000; display: inline-grid; place-items: center; flex: none; overflow: hidden; box-shadow: inset 0 0 0 1px #2f3336; }
.mark img { display: block; width: 100%; height: 100%; }
.mark svg { display: block; }
.links { display: flex; gap: var(--s1); }
.links a { color: var(--muted2); font-weight: 500; padding: 8px 12px; border-radius: var(--pill); }
.links a:hover { color: #fff; background: var(--raise); text-decoration: none; }
.links a.on { color: #fff; }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }
.who { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; font-size: 14px; color: #fff; padding: 3px 14px 3px 3px; border: 1px solid var(--line); border-radius: var(--pill); max-width: 200px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.who:hover { background: var(--raise); text-decoration: none; }
.who .av { width: 28px; height: 28px; font-size: 13px; }
.demo-strip { border-bottom: 1px solid var(--line); background: #070707; color: var(--muted); font-size: 12px; }
.demo-strip .wrap { height: 32px; display: flex; align-items: center; gap: var(--s2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--main); display: inline-block; flex: none; }
.dot.y { background: var(--yellow); } .dot.r { background: var(--red); }

/* phone tab bar */
.tabbar { display: none; }
@media (max-width: 760px) {
  .wrap { padding: 0 var(--s4); }
  .links { display: none; }
  .nav .wrap { gap: var(--s3); }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(0,0,0,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 500; padding: 4px 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: #fff; }
  .tabbar svg { width: 22px; height: 22px; }
  body { padding-bottom: 72px; }
  h1 { font-size: 26px; }
}

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 40px; padding: 0 20px;
  font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1; white-space: nowrap;
  color: #0b0b0b; background: var(--main); border: 1px solid transparent; border-radius: var(--pill);
  cursor: pointer; text-decoration: none !important; transition: background-color .15s, border-color .15s, filter .15s;
}
.btn:hover { filter: brightness(.92); }
.btn.y { background: #eff3f4; color: #0f1419; }
.btn.y:hover { background: #d7dbdc; filter: none; }
.btn.w, .btn.p, .btn.c { background: transparent; color: #fff; border-color: #536471; }
.btn.w:hover, .btn.p:hover, .btn.c:hover { background: rgba(239,243,244,.1); filter: none; }
.btn.r { background: transparent; color: var(--red); border-color: rgba(244,33,46,.5); }
.btn.r:hover { background: rgba(244,33,46,.1); filter: none; }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 26px; font-size: 16px; }
.btn[disabled], .btn.off { opacity: .45; cursor: not-allowed; filter: none; }
.btn.icon { width: 36px; height: 36px; padding: 0; background: transparent; color: #fff; border-color: transparent; }
.btn.icon:hover { background: var(--hover); }
.btn img { border-radius: 4px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  font-family: var(--sans); font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  height: 40px; padding: 0 12px; max-width: 100%; transition: border-color .15s, box-shadow .15s;
}
textarea { font-family: var(--mono); font-size: 13px; width: 100%; height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--main); box-shadow: 0 0 0 3px color-mix(in srgb, var(--main) 22%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); }
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted2); margin: var(--s3) 0 6px; }

/* ── cards ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin: 0 0 var(--s5); }
.card > .hd { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); min-height: 57px; }
.card > .hd h2, .card > .hd h3 { margin: 0; font-size: 17px; }
.card > .hd .eyebrow { margin: 0; }
.card > .hd .aside { margin-left: auto; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.card > .bd { padding: var(--s5); }
.card > .bd.flush { padding: 0; }
.card > .bd > :last-child { margin-bottom: 0; }
.section { margin: var(--s7) 0; }
.section-hd { display: flex; align-items: flex-end; gap: var(--s4); margin: 0 0 var(--s4); flex-wrap: wrap; }
.section-hd h2 { margin: 0; font-size: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--pill); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted2); white-space: nowrap; }
.pill.ok { color: var(--main); border-color: color-mix(in srgb, var(--main) 40%, transparent); background: color-mix(in srgb, var(--main) 8%, transparent); }
.pill.warn { color: var(--yellow); border-color: rgba(255,212,0,.35); background: rgba(255,212,0,.06); }
.pill.bad { color: var(--red); border-color: rgba(244,33,46,.4); background: rgba(244,33,46,.08); }
.cmd { font-family: var(--mono); font-size: 13px; background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; display: inline-block; color: #fff; overflow-wrap: anywhere; }

/* ── the pet art frame ── */
.petart {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r);
  background: radial-gradient(120% 90% at 50% 0%, #1c1f24 0%, #121417 70%); border: 1px solid #23272b;
  container-type: size; display: grid; place-items: center; overflow: hidden;
}
.petart pre {
  margin: 0; color: #f2f4f5; font-family: var(--mono); font-weight: 700; line-height: 1.15; white-space: pre;
  font-size: min(calc(78cqw / (var(--cols) * 0.6)), calc(74cqh / (var(--rows) * 1.15)), 38px);
}
.petart.skin pre { color: var(--skin); text-shadow: 0 0 10px color-mix(in srgb, var(--skin) 45%, transparent); }
.petart.skin.rainbow pre { color: #ff6b6b; animation: rainbow 4s linear infinite; text-shadow: none; }
@keyframes rainbow { 0% { color:#ff6b6b } 16% { color:#ffa94d } 33% { color:#ffd43b } 50% { color:#69db7c } 66% { color:#4dabf7 } 83% { color:#b197fc } 100% { color:#ff6b6b } }
.petart.fainted pre { opacity: .4; }
.anim pre { animation: bob 2.4s ease-in-out infinite; }
.petart.skin.rainbow.anim pre { animation: bob 2.4s ease-in-out infinite, rainbow 4s linear infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3%); } }
@media (prefers-reduced-motion: reduce) { .anim pre, .petart.skin.rainbow pre, .live-dot { animation: none !important; } }
.zzz { position: absolute; right: 12px; top: 10px; font-size: 12px; font-weight: 600; color: var(--muted2); }

/* ── hero ── */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s7); align-items: center; padding: var(--s8) 0 var(--s7); }
.hero h1 { font-size: 56px; line-height: 1.03; letter-spacing: -0.035em; margin: var(--s4) 0; }
.hero h1 .main { color: var(--main); }
.hero .lead { font-size: 19px; color: var(--muted2); max-width: 520px; margin: 0 0 var(--s5); }
.hero .lead b { color: #fff; font-weight: 600; }
.stats { display: flex; gap: var(--s6); margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); flex-wrap: wrap; }
.stats b { display: block; font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--muted); }
.feature { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: var(--s4); color: var(--text); }
.feature:hover { text-decoration: none; border-color: var(--line2); }
.feature .petart { aspect-ratio: 5 / 4; }
.feature .cap { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s1) 0; }
.feature .cap b { color: #fff; font-size: 16px; display: block; }
.feature .cap .muted { font-size: 14px; }
.feature .meters { padding: var(--s4) var(--s1) var(--s1); }
.live-dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: var(--s6); padding: var(--s6) 0 var(--s4); }
  .hero h1 { font-size: 40px; }
  .hero .lead { font-size: 17px; }
  .stats { gap: var(--s5); }
}

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.steps.two { grid-template-columns: repeat(2, 1fr); }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.step .num { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; margin-bottom: var(--s4); }
.step h3 { font-size: 16px; margin-bottom: var(--s3); }
.step p { color: var(--muted2); font-size: 14px; margin: var(--s3) 0 0; }
.step .chips { margin: 0; }
.step .icons { display: flex; gap: var(--s2); }

/* ── grids ── */
.pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4); }
.two > *, .steps > *, .petgrid > *, .pets > *, .items > *, .hero > * { min-width: 0; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s3); color: var(--text); transition: border-color .15s, background-color .15s; }
.tile:hover { text-decoration: none; border-color: var(--line2); background: #0e0f11; }
.tile .info { padding: var(--s3) var(--s1) var(--s1); }
.tile .nm { font-weight: 700; color: #fff; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .meters { margin-top: var(--s3); }
.two { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s5); align-items: start; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
@media (max-width: 900px) { .steps, .two { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .pets { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .tile { padding: var(--s2); border-radius: var(--r); }
  .tile .info { padding: var(--s2) 2px 2px; }
  .tile .nm { font-size: 14px; }
  .tile .sub { font-size: 12px; }
}

/* tabs: underline style like x.com */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin: 0 0 var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 14px 16px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: #fff; background: rgba(231,233,234,.04); text-decoration: none; }
.tabs a.on { color: #fff; font-weight: 700; }
.tabs a.on::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 4px; border-radius: 4px; background: var(--main); }
/* chips: shop categories */
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; margin: 0 0 var(--s5); }
.chips a, .chips span { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: var(--pill); border: 1px solid var(--line); color: var(--muted2); font-size: 14px; font-weight: 500; }
.chips a:hover { color: #fff; border-color: var(--line2); text-decoration: none; }
.chips a.on { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.chips span { font-family: var(--mono); font-size: 13px; color: #fff; height: 30px; }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s4); margin-top: var(--s6); color: var(--muted); font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: var(--s6) var(--s4); border: 1px dashed var(--line); border-radius: var(--r-lg); }

/* ── meters (thin bars) ── */
.meters { display: grid; gap: var(--s2); }
.meter { display: grid; grid-template-columns: 64px 1fr 32px; gap: var(--s3); align-items: center; font-size: 13px; }
.meter .lab { color: var(--muted2); }
.meter .val { text-align: right; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: #202327; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--main)); }
.meters.mini { grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); }
.meters.mini .meter { grid-template-columns: 1fr auto; grid-template-areas: 'lab val' 'bar bar'; gap: 4px var(--s2); font-size: 11px; }
.meters.mini .meter .lab { grid-area: lab; } .meters.mini .meter .val { grid-area: val; } .meters.mini .meter .bar { grid-area: bar; height: 4px; }
.meters.mini .meter .val { font-weight: 500; color: var(--muted2); }

/* ── tables ── */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 10px var(--s4); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 12px var(--s4); border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: rgba(231,233,234,.03); }
table.list th.num, table.list td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list td .row { flex-wrap: nowrap; gap: var(--s2); }
.rank { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; width: 40px; }
.rank.top { color: #fff; }
.pn { display: flex; align-items: center; gap: var(--s3); min-width: 0; color: var(--text); }
.pn:hover { text-decoration: none; }
.pn b { color: #fff; }
.pn:hover b { text-decoration: underline; }
.scroll { overflow-x: auto; }
.status-paid { color: var(--main); } .status-pending { color: var(--yellow); } .status-expired { color: var(--muted); } .status-refunded { color: var(--cyan); }

/* avatars */
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 700; color: #000; font-size: 16px; background: var(--c, var(--main)); object-fit: cover; }
.av.sm { width: 32px; height: 32px; font-size: 13px; }
.av.lg { width: 64px; height: 64px; font-size: 24px; }

/* ── live feed (timeline) ── */
.feed, .hist { list-style: none; margin: 0; padding: 0; }
.feed li, .hist li { display: flex; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); margin: 0; }
.feed li:last-child, .hist li:last-child { border-bottom: 0; }
.feed li:hover { background: rgba(231,233,234,.03); }
.feed .tx, .hist .tx { min-width: 0; flex: 1; }
.feed .meta, .hist .meta { display: flex; gap: 4px; align-items: baseline; font-size: 14px; min-width: 0; white-space: nowrap; overflow: hidden; }
.feed .meta b { color: #fff; }
.feed .meta .muted, .hist .meta .muted { overflow: hidden; text-overflow: ellipsis; }
.feed .body, .hist .body { font-size: 14px; color: var(--text); overflow-wrap: anywhere; margin-top: 2px; }
.feed li.none, .hist li.none { color: var(--muted); display: block; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: var(--pill); color: var(--muted2); border: 1px solid var(--line); vertical-align: 1px; margin-right: 4px; text-transform: lowercase; }
.tag.feed, .tag.buy { color: var(--yellow); border-color: rgba(255,212,0,.3); }
.tag.play { color: #ff6aa9; border-color: rgba(249,24,128,.35); }
.tag.hatch { color: var(--main); border-color: color-mix(in srgb, var(--main) 35%, transparent); }
.tag.use, .tag.revive { color: var(--cyan); border-color: rgba(94,211,243,.3); }
.tag.wear, .tag.rename { color: #c4a1ff; border-color: rgba(169,112,255,.35); }

/* ── item icons on small rounded tiles ── */
.ico { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: var(--r); background: #15171a; border: 1px solid #25282c; }
.ico img { width: 32px; height: 32px; image-rendering: pixelated; display: block; }
.ico.lg { width: 80px; height: 80px; border-radius: var(--r-lg); }
.ico.lg img { width: 64px; height: 64px; }
.ico.sm { width: 40px; height: 40px; border-radius: 10px; }
.ico.md { width: 64px; height: 64px; border-radius: 14px; }
.ico.md img { width: 48px; height: 48px; }

/* ── shop ── */
.notice { display: flex; gap: var(--s3); align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); margin: 0 0 var(--s3); background: var(--card); font-size: 14px; color: var(--muted2); }
.notice .dot { margin-top: 8px; }
.notice b { color: #fff; font-weight: 600; }
.banner { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); font-size: 14px; background: var(--card); }
.banner.ok { border-color: color-mix(in srgb, var(--main) 35%, transparent); }
.banner.wait { border-color: rgba(255,212,0,.35); color: #f5e6a3; background: rgba(255,212,0,.04); }
.banner.info { border-color: rgba(94,211,243,.35); }
.banner.bad { border-color: rgba(244,33,46,.45); color: #ffb3b8; background: rgba(244,33,46,.06); }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); transition: border-color .15s; }
.item:hover { border-color: var(--line2); }
.item .top { display: flex; gap: var(--s4); align-items: center; }
.item .nm { font-weight: 700; color: #fff; font-size: 16px; line-height: 1.3; margin-bottom: 6px; }
.item .desc { color: var(--muted2); font-size: 14px; flex: 1; }
.item .eff { display: block; color: var(--text); margin-top: 6px; font-size: 13px; }
.item .art { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.2; color: var(--muted2); background: #111315; border-radius: var(--r-sm); padding: var(--s2) var(--s3); overflow-x: auto; }
.item .foot-row { display: flex; align-items: center; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); min-height: 49px; }
.item .price { font-weight: 700; color: #fff; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item .price small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 2px; }
.item .usd { color: var(--muted); font-size: 13px; white-space: nowrap; }
.owned { font-size: 13px; font-weight: 600; color: var(--main); display: inline-flex; align-items: center; gap: 6px; }
.have { font-size: 13px; color: var(--muted); margin-top: -8px; }
.rar { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--pill); font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--muted2); background: #1d1f22; border: 1px solid #2a2d31; text-transform: capitalize; }
.rar.uncommon { color: #6cc3ff; background: rgba(29,155,240,.1); border-color: rgba(29,155,240,.3); }
.rar.rare { color: var(--yellow); background: rgba(255,212,0,.08); border-color: rgba(255,212,0,.28); }
.rar.epic { color: #c4a1ff; background: rgba(169,112,255,.1); border-color: rgba(169,112,255,.32); }
.rar.legendary { color: #ff7ab8; background: rgba(249,24,128,.1); border-color: rgba(249,24,128,.32); }

/* checkout panel */
.checkout { position: fixed; inset: 0; background: rgba(91,112,131,.32); z-index: 50; display: grid; place-items: center; padding: var(--s4); }
.checkout .modal { width: min(520px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: #000; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 64px rgba(0,0,0,.6); }
.checkout .modal > .hd { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s5); background: rgba(0,0,0,.92); border-bottom: 1px solid var(--line); }
.checkout .modal > .hd h2 { margin: 0; font-size: 17px; }
.checkout .modal > .bd { padding: var(--s5); }
.co-steps { display: flex; gap: var(--s2); margin: 0 0 var(--s5); padding: 0; list-style: none; }
.co-steps li { flex: 1; margin: 0; font-size: 12px; color: var(--muted); padding-top: var(--s2); border-top: 3px solid var(--line); }
.co-steps li.on { color: #fff; border-color: var(--main); font-weight: 600; }
.co-steps li.done { color: var(--muted2); border-color: color-mix(in srgb, var(--main) 45%, transparent); }
.co-item { display: flex; align-items: center; gap: var(--s4); margin: 0 0 var(--s4); }
.co-item h3 { margin: 0 0 2px; font-size: 18px; }
.co-amount { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.co-amount small { font-size: 15px; color: var(--muted2); font-weight: 600; margin-left: 4px; }
.co-block { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); margin: 0 0 var(--s4); }
.co-block h3 { font-size: 14px; margin-bottom: var(--s2); }
.co-block p { font-size: 14px; }
.copy { display: flex; gap: var(--s2); align-items: center; margin: 6px 0 var(--s3); }
.copy code { font-family: var(--mono); font-size: 12.5px; background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; overflow-wrap: anywhere; flex: 1; min-width: 0; color: #fff; }
.qr { background: #fff; padding: 10px; border-radius: var(--r); width: 220px; max-width: 100%; display: block; margin: var(--s3) auto; image-rendering: pixelated; }
.center { text-align: center; }
.success { text-align: center; padding: var(--s4) 0; }
.success .ok-ic { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--main) 15%, transparent); color: var(--main); display: grid; place-items: center; margin: 0 auto var(--s4); }
.success .row { justify-content: center; }

/* ── pet page ── */
.petgrid { display: grid; grid-template-columns: 400px 1fr; gap: var(--s5); align-items: start; margin-top: var(--s6); }
.petgrid .petart { aspect-ratio: 1 / 1; }
.pet-hd { margin-bottom: var(--s5); }
.pet-hd h1 { margin: 0 0 4px; font-size: 32px; overflow-wrap: anywhere; }
.pet-hd .meta { color: var(--muted); font-size: 15px; }
.pet-hd .meta a { color: var(--muted2); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.slot { background: #111315; border: 1px dashed var(--line); border-radius: var(--r); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.slot.has { border-style: solid; border-color: var(--line2); background: #15171a; }
.slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.slot span { font-size: 11px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 120px 1fr; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--text); }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s5); }
.mood { display: flex; justify-content: center; margin-top: var(--s4); }
@media (max-width: 900px) { .petgrid { grid-template-columns: 1fr; margin-top: var(--s5); } .petgrid .petart { aspect-ratio: 4 / 3; } }
@media (max-width: 520px) { .kv { grid-template-columns: 96px 1fr; } .pet-hd h1 { font-size: 28px; } }

/* ── inventory ── */
.inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.inv .cell { background: #0e0f11; border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5) var(--s3) var(--s3); text-align: center; position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.inv .cell.eq { border-color: color-mix(in srgb, var(--main) 55%, transparent); }
.inv .cell.eq::before { content: 'Worn'; position: absolute; top: 8px; left: 10px; font-size: 11px; font-weight: 600; color: var(--main); }
.inv .cell .q { position: absolute; top: 8px; right: 10px; font-size: 12px; font-weight: 600; color: var(--muted2); }
.inv .cell .n { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.3; min-height: 34px; display: flex; align-items: center; }
.inv .cell input { width: 100%; height: 34px; font-size: 13px; }
.inv .cell .btn { width: 100%; }
.msg { min-height: 22px; font-size: 14px; color: var(--muted2); margin: var(--s3) 0 0; }
.msg:empty { min-height: 0; margin: 0; }
.msg.bad { color: #ff6b74; } .msg.ok { color: var(--main); }
#walletlist:empty { display: none; }

/* profile */
.profile { display: flex; align-items: center; gap: var(--s4); }
.profile h1 { margin: 0; font-size: 22px; }
.profile .muted { font-size: 14px; }
.mypet { display: grid; grid-template-columns: 220px 1fr; gap: var(--s5); align-items: center; }
.mypet h2 { margin-bottom: 4px; }
.mypet .meters { margin: var(--s4) 0; }
@media (max-width: 560px) { .mypet { grid-template-columns: 1fr; } }
.opt { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); margin: 0 0 var(--s3); }
.opt h3 { margin-bottom: 4px; }
.opt p { color: var(--muted2); font-size: 14px; }
.auth { max-width: 440px; margin: var(--s7) auto; }
.auth .card > .bd { padding: var(--s6); }
.auth h1 { font-size: 28px; }
.divider { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; white-space: nowrap; margin: var(--s5) 0 var(--s2); }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.full { width: 100%; }

/* ── docs ── */
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s7); margin-top: var(--s6); align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.toc a { color: var(--muted2); font-size: 14px; padding: 6px 12px; border-radius: var(--r-sm); }
.toc a:hover { color: #fff; background: var(--raise); text-decoration: none; }
.doc { max-width: 760px; }
.doc > section { padding: 0 0 var(--s6); margin: 0 0 var(--s6); border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 16px); }
.doc > section:last-child { border-bottom: 0; }
.doc h1 { font-size: 40px; letter-spacing: -0.03em; }
.doc h2 { font-size: 22px; margin-bottom: var(--s4); }
.doc h3 { margin-top: var(--s5); }
.doc p, .doc li { color: #c9cdd0; }
.doc b { color: #fff; font-weight: 600; }
.doc .lead { font-size: 17px; color: var(--muted2); }
.docs .k { font-family: var(--mono); font-size: 13px; color: #fff; background: var(--raise); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.faq dt { color: #fff; font-weight: 600; margin-top: var(--s4); }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 4px 0 0; color: #c9cdd0; }
.addr { overflow-wrap: anywhere; }
@media (max-width: 900px) { .docs { grid-template-columns: minmax(0, 1fr); gap: var(--s4); } .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--s2); } .toc a { border: 1px solid var(--line); border-radius: var(--pill); padding: 4px 12px; font-size: 13px; } .doc h1 { font-size: 32px; } }

/* ── admin ── */
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.admin-grid .card { margin: 0; }
.statcard p { margin: 0 0 var(--s2); color: var(--muted2); font-size: 14px; }
.statcard .big { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.02em; margin: 0 0 var(--s2); }
.form-grid { display: flex; flex-wrap: wrap; gap: 0 var(--s3); align-items: flex-end; }
.form-grid > div { max-width: 100%; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

/* ── 404 ── */
.lost { max-width: 440px; margin: var(--s8) auto; text-align: center; }
.lost .petart { max-width: 280px; margin: 0 auto var(--s5); }
.lost h1 { font-size: 28px; }

/* ── footer ── */
.foot { border-top: 1px solid var(--line); margin-top: var(--s8); padding: var(--s7) 0 var(--s6); color: var(--muted); font-size: 14px; }
.foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s5); }
.foot h3 { color: #fff; font-size: 14px; margin-bottom: var(--s3); }
.foot .cols a { color: var(--muted2); display: block; margin: 0 0 var(--s2); }
.foot .cols a:hover { color: #fff; }
.foot .cols p a { display: inline; }
.foot .fine { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; max-width: 860px; }
.foot .copy-line { font-size: 13px; margin: var(--s2) 0 0; }
@media (max-width: 760px) { .foot { margin-top: var(--s7); } .foot .cols { grid-template-columns: 1fr 1fr; } .foot .cols > div:first-child { grid-column: 1 / -1; } }
.foot .cols a.brand { color: #fff; display: inline-flex; margin: 0; }
@media (max-width: 760px) {
  .chips.scroll-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--s4)); margin-right: calc(-1 * var(--s4)); padding: 0 var(--s4); }
  .chips.scroll-row::-webkit-scrollbar { display: none; }
  .chips.scroll-row a { flex: none; }
}
.profile > div { flex: 1; min-width: 0; }
.profile h1, .profile .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile form { flex: none; }
@media (max-width: 520px) { .profile { gap: var(--s3); } .profile .av.lg { width: 48px; height: 48px; font-size: 18px; } .profile h1 { font-size: 18px; } }
.profile .spacer { display: none; }
