@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323:wght@400&display=swap');

/* ═══════════════ VARIABLES ═══════════════ */
:root {
  --grass:#5D8A3C; --grass-light:#7BBF50;
  --stone:#828282; --stone-dark:#5A5A5A;
  --dirt:#8B6043; --dirt-dark:#4a2e1a;
  --gold:#F5C400; --gold-dark:#C89A00;
  --diamond:#4DDCE4; --emerald:#17CC6A;
  --lava:#FF6600; --obsidian:#0D1117;
  --xp:#80FF20; --xp-dark:#50B010;
  --ui:rgba(0,0,0,0.80);
  --panel:rgba(0,0,0,0.65);
}

/* ═══════════════ RESET ═══════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Press Start 2P', monospace;
  background: var(--obsidian);
  color: #fff;
  overflow-x: hidden;
  image-rendering: pixelated;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ═══════════════ WORLD BACKGROUND ═══════════════ */
#worldBg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(to bottom,
    #0a1628 0%, #1a3a6b 22%, #2a5fa8 42%,
    #72b4ff 60%, #5D8A3C 60%, #5D8A3C 63%,
    #8B6043 63%, #4a2e1a 100%);
}
#stars { position: fixed; top: 0; left: 0; width: 100%; height: 42%; z-index: 1; pointer-events: none; }
.star { position: absolute; background: #fff; animation: twinkle 2s ease-in-out infinite; }
#clouds { position: fixed; top: 5%; left: 0; width: 100%; z-index: 1; pointer-events: none; }
.cloud { position: absolute; animation: cloudFloat linear infinite; }
#groundStrip {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px; z-index: 2;
  display: flex; overflow: hidden; pointer-events: none;
}
.gb { width: 64px; height: 64px; flex-shrink: 0; image-rendering: pixelated; }

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes cloudFloat { from { transform: translateX(-240px) } to { transform: translateX(110vw) } }
@keyframes twinkle { 0%,100% { opacity:.15 } 50% { opacity:1 } }
@keyframes popIn { 0% { transform:scale(.35) rotate(-8deg);opacity:0 } 65% { transform:scale(1.12) rotate(2deg);opacity:1 } 100% { transform:scale(1) rotate(0);opacity:1 } }
@keyframes slideUp { from { transform:translateY(20px);opacity:0 } to { transform:translateY(0);opacity:1 } }
@keyframes float { 0%,100% { transform:translateY(0) } 50% { transform:translateY(-7px) } }
@keyframes pulseGold { 0%,100% { box-shadow:0 0 5px var(--gold) } 50% { box-shadow:0 0 18px var(--gold),0 0 35px rgba(245,196,0,.3) } }
@keyframes xpRise { 0% { transform:translateY(0);opacity:1 } 100% { transform:translateY(-90px);opacity:0 } }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 40%{transform:translateX(7px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }
@keyframes lvlUp { 0%{transform:scale(.3);opacity:0} 60%{transform:scale(1.2);opacity:1} 100%{transform:scale(1);opacity:1} }

/* ═══════════════ LAYOUT ═══════════════ */
.page-wrap { position: relative; z-index: 10; }
.inner { max-width: 900px; margin: 0 auto; padding: 16px; }
.inner.narrow { max-width: 640px; }

/* ═══════════════ TOP NAV ═══════════════ */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0,0,0,.84);
  border-bottom: 3px solid var(--stone-dark);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.topnav-title { font-size: clamp(9px,2vw,13px); color: var(--gold); text-shadow: 2px 2px 0 #000; line-height: 1.6; }
.topnav-right { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nbtn {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  line-height: 1; padding: 9px 12px 7px;
  min-width: 80px; text-align: center;
  background: rgba(0,0,0,.5);
  border: 2px solid var(--stone-dark); color: #aaa;
  cursor: pointer; transition: all .12s; white-space: nowrap;
}
.nbtn:hover { border-color: var(--stone); color: #fff; }
.badge {
  font-size: 7px; line-height: 1; padding: 9px 12px 7px;
  min-width: 80px; text-align: center;
  background: rgba(245,196,0,.12);
  border: 2px solid var(--gold-dark); color: var(--gold);
}

/* ═══════════════ PARENT TAB NAV ═══════════════ */
.parentnav {
  display: flex; overflow-x: auto;
  background: rgba(0,0,0,.72);
  border-bottom: 3px solid var(--stone-dark);
  scrollbar-width: none;
}
.parentnav::-webkit-scrollbar { display: none; }
.pnbtn {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  line-height: 1;
  padding: 10px 14px 8px; background: none;
  border: none; border-bottom: 3px solid transparent;
  color: #666; cursor: pointer; white-space: nowrap;
  transition: all .12s; flex-shrink: 0;
}
.pnbtn:hover { color: #ccc; }
.pnbtn.active { color: var(--gold); border-bottom-color: var(--gold); }
.pnbtn .pn-icon { display: block; font-size: 14px; margin-bottom: 5px; text-align: center; }

/* ═══════════════ BOTTOM NAV (child) ═══════════════ */
.botnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 51;
  display: flex; background: rgba(0,0,0,.94);
  border-top: 3px solid var(--stone-dark);
  backdrop-filter: blur(8px);
}
.botnav-btn {
  flex: 1; font-family: 'Press Start 2P', monospace; font-size: 6px;
  padding: 10px 4px 8px; background: none; border: none;
  color: #555; cursor: pointer; transition: all .12s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.botnav-btn .bn-icon { font-size: 18px; display: block; }
.botnav-btn:hover { color: #aaa; }
.botnav-btn.active { color: var(--gold); }

/* ═══════════════ PAGE HEADER ═══════════════ */
.pg-header { text-align: center; padding: 18px 0 10px; animation: slideUp .35s ease; }
.pg-header h1 {
  font-size: clamp(12px,2.5vw,18px); color: var(--gold);
  text-shadow: 3px 3px 0 #000, 0 0 18px rgba(245,196,0,.4);
  letter-spacing: 2px; margin-bottom: 6px;
}
.pg-header p { font-size: 8px; color: var(--diamond); }

/* ═══════════════ SECTION CARD ═══════════════ */
.scard {
  background: var(--panel); border: 3px solid var(--stone-dark);
  padding: 18px; margin-bottom: 14px;
  animation: slideUp .3s ease; backdrop-filter: blur(4px);
}
.scard-title {
  font-size: 8px; color: var(--diamond);
  line-height: 1.6;
  margin-bottom: 14px; padding: 4px 0 10px;
  border-bottom: 2px solid var(--stone-dark);
  display: flex; align-items: center; gap: 8px;
}

/* ═══════════════ SECTION TITLE ═══════════════ */
.sec-title {
  font-size: 9px; color: var(--gold);
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.sec-title::after { content: ''; flex: 1; height: 2px; background: linear-gradient(to right,var(--stone-dark),transparent); }

/* ═══════════════ FORM ═══════════════ */
.frow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.flabel {
  font-size: 7px; color: #aaa; flex: 0 0 130px;
  line-height: 1.6;
}
.finput {
  /* Use VT323 for actual input text — Press Start 2P clips inside native inputs */
  font-family: 'VT323', monospace;
  font-size: 17px;
  line-height: 1;
  background: var(--stone-dark);
  border: 2px solid var(--stone);
  color: #fff;
  padding: 0 12px;
  height: 42px;
  flex: 1;
  min-width: 140px;
  -webkit-appearance: none;
  appearance: none;
}
.finput:focus { outline: none; border-color: var(--gold); }
.finput::placeholder { color: #666; font-size: 15px; }
.finput option { background: #1a1a1a; font-family: 'VT323', monospace; }
select.finput { cursor: pointer; }
textarea.finput {
  font-family: 'VT323', monospace; font-size: 17px;
  line-height: 1.5; resize: vertical; min-height: 90px;
  padding: 10px 12px; height: auto;
}

/* ═══════════════ BUTTONS ═══════════════ */
.btn { font-family: 'Press Start 2P', monospace; cursor: pointer; transition: all .1s; }
.btn-green {
  font-size: 8px; width: 100%; padding: 13px;
  background: var(--grass); border: 3px solid var(--grass-light);
  border-bottom-color: #3a5a20; border-right-color: #3a5a20;
  color: #fff; text-shadow: 1px 1px 0 #000;
}
.btn-green:hover { background: var(--grass-light); transform: translateY(-1px); }
.btn-green:active { transform: translateY(1px); }
.btn-red {
  font-size: 8px; width: 100%; padding: 12px;
  background: #700; border: 3px solid #a00;
  border-bottom-color: #400; border-right-color: #400;
  color: #fff; text-shadow: 1px 1px 0 #000;
}
.btn-red:hover { background: #900; }
.btn-ghost {
  font-size: 8px; width: 100%; padding: 11px;
  background: rgba(0,0,0,.4); border: 3px solid var(--stone-dark); color: #aaa;
}
.btn-ghost:hover { border-color: var(--stone); color: #fff; }
.btn-xp {
  font-size: 7px; padding: 9px 12px;
  background: rgba(128,255,32,.1); border: 2px solid var(--xp-dark);
  color: var(--xp); width: 100%; margin-top: 8px;
}
.btn-xp:hover { background: rgba(128,255,32,.2); }
.btn-del {
  font-size: 6px; padding: 4px 7px;
  background: #4a0a0a; border: 2px solid #8a1a1a; color: #f88;
}
.btn-del:hover { background: #6a1a1a; }

/* ═══════════════ ITEM LIST ═══════════════ */
.ilist { list-style: none; }
.ilist li {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px; font-family: 'VT323', monospace; color: #ccc;
}
.ilist li:last-child { border-bottom: none; }
.iname { flex: 1; }
.ixp { color: var(--xp); min-width: 65px; text-align: right; font-size: 13px; }

/* ═══════════════ SKIN PICKER ═══════════════ */
.skin-row { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.skin-swatch {
  width: 36px; height: 36px; border: 3px solid var(--stone-dark);
  cursor: pointer; transition: all .1s;
}
.skin-swatch:hover, .skin-swatch.sel { border-color: var(--gold); transform: scale(1.1); }

/* ═══════════════ DASHBOARD TILES ═══════════════ */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 12px; margin-bottom: 16px; }
.dash-tile {
  background: var(--panel); border: 3px solid var(--stone-dark);
  padding: 18px; text-align: center; cursor: pointer; transition: all .15s; text-decoration: none; display: block;
}
.dash-tile:hover { border-color: var(--gold); transform: translateY(-4px); }
.dtile-icon { font-size: 32px; display: block; margin-bottom: 10px; animation: float 3s ease-in-out infinite; }
.dtile-title { font-size: 8px; color: var(--gold); margin-bottom: 6px; }
.dtile-desc { font-size: 13px; color: #888; font-family: 'VT323', monospace; line-height: 1.4; }
.dash-stat { background: var(--panel); border: 3px solid var(--stone-dark); padding: 14px; text-align: center; }
.ds-val { font-size: 18px; color: var(--diamond); text-shadow: 2px 2px 0 #000; display: block; margin-bottom: 4px; }
.ds-lbl { font-size: 6px; color: #666; }

/* ═══════════════ PLAYER CARD ═══════════════ */
.pcard {
  background: var(--ui); border: 4px solid var(--stone);
  border-bottom-color: var(--stone-dark); border-right-color: var(--stone-dark);
  padding: 14px; margin: 12px 0;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: center; backdrop-filter: blur(4px);
}
.avatar-wrap { width: 56px; height: 56px; cursor: pointer; transition: transform .12s; flex-shrink: 0; }
.avatar-wrap:hover { transform: scale(1.1); }
.avatar-wrap canvas { display: block; image-rendering: pixelated; }
.pinfo { min-width: 0; }
.pname { font-size: 10px; color: var(--gold); text-shadow: 2px 2px 0 #000; margin-bottom: 7px; }
.hearts { display: flex; gap: 2px; margin-bottom: 6px; flex-wrap: wrap; }
.hrt { font-size: 11px; filter: drop-shadow(1px 1px 0 #800); }
.xpbar-wrap { height: 16px; background: var(--stone-dark); border: 2px solid var(--stone); margin-bottom: 4px; overflow: hidden; }
.xpbar {
  height: 100%; background: linear-gradient(to right,var(--xp-dark),var(--xp));
  transition: width .6s cubic-bezier(.34,1.56,.64,1); position: relative;
}
.xpbar::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg,transparent 0,transparent 12px,rgba(255,255,255,.08) 12px,rgba(255,255,255,.08) 14px);
}
.xpbar-txt { font-size: 6px; color: #aaa; text-align: right; margin-top: 2px; }
.lvlbadge {
  display: flex; flex-direction: column; align-items: center;
  background: var(--stone-dark); border: 3px solid var(--gold);
  padding: 8px 12px; min-width: 58px; flex-shrink: 0;
}
.lvlnum { font-size: 20px; color: var(--gold); text-shadow: 2px 2px 0 #000; line-height: 1; }
.lvllbl { font-size: 6px; color: #aaa; margin-top: 4px; }

/* ═══════════════ STATS ROW ═══════════════ */
.statsrow { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 10px 0; }
.sblock { background: rgba(0,0,0,.6); border: 2px solid var(--stone-dark); padding: 10px 8px; text-align: center; }
.sval { font-size: 13px; color: var(--diamond); text-shadow: 2px 2px 0 #000; display: block; }
.slbl { font-size: 6px; color: #666; margin-top: 3px; }

/* ═══════════════ STREAK ═══════════════ */
.streak-bar {
  background: rgba(0,0,0,.6); border: 3px solid var(--stone-dark);
  padding: 14px 16px; margin: 10px 0;
  display: flex; align-items: flex-start; gap: 16px;
}
.sflamecol { flex-shrink: 0; font-size: 28px; animation: float 2s ease-in-out infinite; padding-top: 2px; }
.sinfo { flex: 1; }
.slabel { font-size: 6px; color: #888; letter-spacing: 1px; margin-bottom: 5px; }
.scount { font-size: 16px; color: var(--lava); text-shadow: 2px 2px 0 #800; margin-bottom: 10px; }
.sdays { display: flex; gap: 8px; flex-wrap: wrap; }
.sday { width: 30px; height: 30px; border: 2px solid var(--stone-dark); display: flex; align-items: center; justify-content: center; font-size: 7px; background: rgba(0,0,0,.3); flex-shrink: 0; }
.sday.done { border-color: var(--lava); background: rgba(255,102,0,.18); }
.sday.today { border-color: var(--gold); animation: pulseGold 2s ease-in-out infinite; }

/* ═══════════════ BIOME TABS ═══════════════ */
.biometabs { display: flex; margin: 14px 0 0; border-bottom: 4px solid var(--stone-dark); overflow-x: auto; scrollbar-width: none; }
.biometabs::-webkit-scrollbar { display: none; }
.btab {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  line-height: 1;
  padding: 10px 13px 8px; border: none; cursor: pointer;
  white-space: nowrap; border-top: 3px solid transparent;
  background: rgba(0,0,0,.4); color: #666; transition: all .12s; flex-shrink: 0;
}
.btab:hover { background: rgba(255,255,255,.07); color: #bbb; }
.btab.active { color: #fff; border-top-color: var(--gold); background: rgba(0,0,0,.75); }
.btab .bicon { display: block; font-size: 16px; margin-bottom: 3px; text-align: center; }

/* ═══════════════ QUEST AREA ═══════════════ */
.questarea { background: rgba(0,0,0,.62); border: 4px solid var(--stone); border-top: none; padding: 16px; backdrop-filter: blur(4px); }
.bheader { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--stone-dark); }
.btitle { font-size: 10px; color: var(--diamond); text-shadow: 2px 2px 0 #000; }
.bdesc { font-size: 15px; color: #888; font-family: 'VT323', monospace; margin-top: 3px; }
.qgrid { display: grid; gap: 10px; }
.qcard {
  background: rgba(0,0,0,.5); border: 3px solid var(--stone-dark);
  padding: 13px; cursor: pointer; transition: all .12s;
  display: grid; grid-template-columns: 44px 1fr auto;
  align-items: center; gap: 12px;
}
.qcard:hover:not(.qdone) { border-color: var(--gold); background: rgba(245,196,0,.07); transform: translateX(4px); }
.qcard.qdone { border-color: var(--emerald); background: rgba(23,204,106,.07); opacity: .72; }
.qiblock { width: 40px; height: 40px; border: 2px solid rgba(255,255,255,.14); border-right-color: rgba(0,0,0,.4); border-bottom-color: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.qname { font-size: 8px; margin-bottom: 4px; }
.qdesc { font-size: 14px; color: #aaa; font-family: 'VT323', monospace; margin-bottom: 5px; line-height: 1.3; }
.qtags { display: flex; gap: 4px; flex-wrap: wrap; }
.qtag { font-size: 6px; padding: 2px 5px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #aaa; }
.qreward { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 70px; }
.xppill { font-size: 7px; padding: 4px 7px; background: rgba(128,255,32,.12); border: 2px solid var(--xp-dark); color: var(--xp); white-space: nowrap; }

/* ═══════════════ REWARDS ═══════════════ */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill,minmax(148px,1fr)); gap: 10px; }
.rcard {
  background: rgba(0,0,0,.62); border: 3px solid var(--stone-dark);
  padding: 14px 10px; text-align: center; cursor: pointer;
  transition: all .18s; position: relative; overflow: hidden;
}
.rcard:hover:not(.rlocked):not(.rclaimed) { border-color: var(--gold); transform: translateY(-4px); box-shadow: 0 8px 0 rgba(0,0,0,.5); }
.rcard.rlocked { opacity: .4; cursor: not-allowed; }
.rcard.rclaimed { border-color: var(--emerald); }
.ricon { font-size: 28px; margin-bottom: 8px; display: block; animation: float 3s ease-in-out infinite; }
.rname { font-size: 7px; margin-bottom: 5px; }
.rdesc { font-size: 13px; color: #888; font-family: 'VT323', monospace; margin-bottom: 8px; line-height: 1.3; }
.rcost { font-size: 7px; color: var(--gold); padding: 3px 6px; border: 2px solid var(--gold-dark); background: rgba(245,196,0,.1); display: inline-block; }
.rclaimed-badge { position: absolute; top: 0; left: 0; right: 0; background: var(--emerald); padding: 3px; font-size: 6px; color: #fff; text-align: center; }

/* ═══════════════ MODALS ═══════════════ */
.overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 16px; }
.overlay.off { display: none; }
.mbox { background: var(--stone-dark); border: 4px solid var(--stone); border-bottom-color: #333; border-right-color: #333; max-width: 400px; width: 100%; animation: popIn .3s ease; max-height: 88vh; overflow-y: auto; }
.mhead { background: rgba(0,0,0,.5); padding: 14px 16px; border-bottom: 3px solid var(--stone); display: flex; align-items: center; justify-content: space-between; }
.mtitle { font-size: 9px; color: var(--gold); }
.mclose { font-family: 'Press Start 2P', monospace; font-size: 8px; background: #500; border: 2px solid #900; color: #fff; padding: 4px 8px; cursor: pointer; }
.mclose:hover { background: #700; }
.mbody { padding: 18px; }
.mqicon { font-size: 38px; text-align: center; margin-bottom: 10px; }
.mqname { font-size: 9px; text-align: center; margin-bottom: 6px; }
.mqdesc { font-size: 15px; color: #aaa; font-family: 'VT323', monospace; text-align: center; margin-bottom: 12px; line-height: 1.4; }
.mxp { text-align: center; font-size: 8px; color: var(--xp); padding: 10px; border: 2px solid var(--xp-dark); background: rgba(128,255,32,.07); margin-bottom: 12px; }
.mxp span { font-size: 20px; display: block; margin-bottom: 3px; }
.cklist { list-style: none; margin-bottom: 12px; }
.cklist li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13px; font-family: 'VT323', monospace; color: #ccc; cursor: pointer; }
.cklist li:hover { color: #fff; }
.ckbox { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; border: 2px solid var(--stone); display: flex; align-items: center; justify-content: center; font-size: 10px; background: rgba(0,0,0,.3); color: var(--emerald); }

/* ═══════════════ PIN / PASSCODE ═══════════════ */
.pin-box{background:rgba(0,0,0,.85);border:4px solid var(--stone);padding:24px 20px;max-width:340px;width:100%;text-align:center;animation:popIn .35s ease;backdrop-filter:blur(8px);}
.pin-title{font-size:9px;color:var(--gold);margin-bottom:6px;}
.pin-sub{font-size:14px;color:#888;font-family:'VT323',monospace;margin-bottom:18px;line-height:1.4;}
.pin-dots{display:flex;gap:14px;justify-content:center;margin-bottom:14px;}
.pdot{width:20px;height:20px;border:2px solid var(--stone);background:rgba(0,0,0,.4);transition:all .15s;}
.pdot.on{background:var(--gold);border-color:var(--gold-dark);box-shadow:0 0 10px var(--gold);}
.pin-err{font-size:7px;color:#f44;min-height:14px;margin-bottom:10px;}
.pin-kp{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:12px;}
.pkey{font-family:'Press Start 2P',monospace;font-size:11px;height:44px;padding:0;background:var(--stone-dark);border:3px solid var(--stone);border-bottom-color:#333;border-right-color:#333;color:#fff;cursor:pointer;}
.pkey:hover{background:var(--stone);}
.pkey:active{transform:translateY(1px);}
.pkey.del{background:#5a1a1a;border-color:#8a2a2a;}
.pin-back{font-size:7px;color:#666;cursor:pointer;padding:6px;border:none;background:none;font-family:'Press Start 2P',monospace;}
.pin-back:hover{color:#aaa;}
/* inline passcode inside modal — same key sizing */
.pdots-row{display:flex;gap:13px;justify-content:center;margin:12px 0 8px;}
.pd2{width:17px;height:17px;border:2px solid var(--stone);background:rgba(0,0,0,.4);transition:all .12s;}
.pd2.on{background:var(--gold);border-color:var(--gold-dark);}
.perr{font-size:7px;color:#f44;min-height:14px;text-align:center;margin-bottom:8px;}
.pkp{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:10px;}
.pky{font-family:'Press Start 2P',monospace;font-size:11px;height:44px;padding:0;background:var(--stone-dark);border:3px solid var(--stone);border-bottom-color:#333;border-right-color:#333;color:#fff;cursor:pointer;}
.pky:hover{background:var(--stone);}
.pky:active{transform:translateY(1px);}
.pky.del{background:#5a1a1a;border-color:#8a2a2a;}

/* ═══════════════ TOASTS & NOTIF ═══════════════ */
.xpfloat { position: fixed; font-family: 'Press Start 2P', monospace; font-size: 9px; color: var(--xp); text-shadow: 2px 2px 0 #000; pointer-events: none; z-index: 999; animation: xpRise 1.5s ease-out forwards; }
.lvltoast { position: fixed; top: 16%; left: 50%; transform: translateX(-50%); z-index: 300; pointer-events: none; }
.lvltoast.off { display: none; }
.lti { background: rgba(0,0,0,.97); border: 4px solid var(--gold); padding: 22px 32px; animation: lvlUp .4s ease; text-align: center; }
.ltt { font-size: 9px; color: var(--gold); margin-bottom: 6px; }
.ltn { font-size: 30px; color: var(--gold); text-shadow: 4px 4px 0 #000; margin: 6px 0; }
.notif { position: fixed; bottom: 74px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.97); border: 3px solid var(--stone); font-family: 'Press Start 2P', monospace; font-size: 7px; padding: 10px 14px; z-index: 300; pointer-events: none; max-width: 88vw; text-align: center; line-height: 1.6; }
.notif.off { display: none; }
.notif.ok { border-color: var(--emerald); color: var(--emerald); }
.notif.warn { border-color: var(--gold); color: var(--gold); }
.notif.err { border-color: #f44; color: #f44; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media(max-width:500px) {
  .pcard { grid-template-columns: auto 1fr; }
  .lvlbadge { display: none; }
  .rgrid { grid-template-columns: repeat(2,1fr); }
  .qcard { grid-template-columns: 36px 1fr auto; gap: 8px; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .flabel { flex: 0 0 100px; }
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--stone-dark); }
::-webkit-scrollbar-thumb { background: var(--stone); }
