/*
  Portal Time — Game HUD UI
  Shared stylesheet for all screens (mobile-first, APK/WebView friendly)
*/

:root{
  --hud-text: rgba(255,255,255,.92);
  --hud-dim: rgba(255,255,255,.72);
  --hud-dimmer: rgba(255,255,255,.58);

  --hud-border: rgba(255,255,255,.16);
  --hud-border2: rgba(255,255,255,.22);

  --hud-blue1: #58a7ff;
  --hud-purple1: #b07bff;
}

html, body{ height:100%; }
body{ background:#0b0b0f; }

/* =========================================================
   CENTER (Notifications) — Game cards
   ========================================================= */

.pt-note-card{
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.30));
  box-shadow: 0 18px 55px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
  overflow: hidden;
  margin-bottom: 12px;
}

.pt-note-card.is-unread{
  border-color: rgba(88,167,255,.35);
  box-shadow: 0 0 0 2px rgba(88,167,255,.18), 0 18px 55px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06);
}

.pt-note-head{
  display:flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px 10px 12px;
}

.pt-note-ico{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.pt-note-main{ min-width:0; flex: 1 1 auto; }

.pt-note-title{
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255,255,255,.96);
  line-height: 1.15;
  display:flex;
  align-items:center;
  gap: 8px;
}

.pt-note-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(88,167,255,.95);
  box-shadow: 0 0 0 3px rgba(88,167,255,.22), 0 0 18px rgba(88,167,255,.25);
  flex: 0 0 auto;
}

.pt-note-meta{
  margin-top: 4px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items:center;
  color: rgba(255,255,255,.68);
  font-size: 12px;
}

.pt-note-time{
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
}

.pt-note-type{
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.pt-note-actions{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

/* =========================================================
   CHRONOSPHERE — Stage 14 layout (stable)
   Fixes: scattered buttons, huge sword icon, disappearing epoch card.
   ========================================================= */

.chrono-hub{ max-width: 980px; margin: 0 auto; }
.chrono-stage{ position:relative; padding: 18px 12px 10px; text-align:center; }

.chrono-side{
  position:absolute;
  left: 8px;
  top: 18px;
  width: 86px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index: 3;
}
.chrono-epoch-mini{
  width: 86px;
  height: 86px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
  overflow:hidden;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.chrono-epoch-mini img{ width:100%; height:100%; object-fit: cover; display:block; filter: saturate(1.05) contrast(1.02); }
.chrono-epoch-mini.active{ border-color: rgba(45,226,255,.22); box-shadow: 0 0 0 1px rgba(45,226,255,.12) inset; }
.chrono-epoch-mini:hover{ transform: translateY(-2px); border-color: rgba(45,226,255,.28); }
@media (max-width: 900px){ .chrono-side{ display:none; } }

.chrono-sphere-wrap{ position:relative; display:flex; justify-content:center; align-items:center; padding: 8px 0 22px; }
.chrono-sphere-wrap__portal{ position:absolute; inset:-30px -30px -30px -30px; pointer-events:none; opacity:.55; }
.chrono-sphere-wrap__portal img{ width:100%; height:100%; object-fit:contain; display:block; filter: drop-shadow(0 22px 50px rgba(0,0,0,.55)); }

.chrono-sphere{
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(45,226,255,.90), rgba(8,12,24,.92) 72%);
  border: 2px solid rgba(255,255,255,.10);
  box-shadow: 0 0 40px rgba(45,226,255,.28), inset 0 0 42px rgba(0,0,0,.65);
  position:relative;
  overflow:hidden;
  animation: chronoPulse 4.2s ease-in-out infinite;
}
.chrono-sphere::after{
  content:"";
  position:absolute;
  inset:-20%;
  background: radial-gradient(circle at 70% 70%, rgba(176,123,255,.35), transparent 62%);
  mix-blend-mode: screen;
  opacity:.85;
}
@keyframes chronoPulse{
  0%{ transform: scale(1); }
  50%{ transform: scale(1.035); }
  100%{ transform: scale(1); }
}

.chrono-core-indicator{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  width: 86px;
  height: 86px;
  opacity: .18;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.55));
  pointer-events:none;
  z-index: 2;
}
.chrono-core-indicator img{ width:100%; height:100%; object-fit:contain; display:block; }

.chrono-wheel{ position:absolute; width: 560px; height: 320px; pointer-events:none; }
.chrono-wheel-btn{
  pointer-events:auto;
  position:absolute;
  width: 132px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  color: rgba(255,255,255,.92);
  padding: 10px 10px;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  backdrop-filter: blur(6px);
  transition: transform .12s ease, border-color .12s ease;
}
.chrono-wheel-btn:hover{ transform: translateY(-2px); border-color: rgba(45,226,255,.28); }
.chrono-wheel-btn .i{ font-size: 18px; line-height:1; }
.chrono-wheel-btn .t{ font-size: 12px; font-weight: 900; letter-spacing:.2px; }

#btnExploreEpoch{ left: 12px; top: 146px; }
#btnChooseEpoch{ left: 152px; top: 232px; }
#btnChronoTimers{ right: 152px; top: 232px; }
#btnChronoRewards{ right: 12px; top: 146px; }

.chrono-card{
  box-sizing: border-box;
  width: min(100%, 860px);
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  padding: 14px 16px;
}
.epoch-name{ font-size: 18px; font-weight: 900; }
.epoch-desc{ color: rgba(255,255,255,.78); font-size: 13px; margin-top: 6px; }

.chrono-dots{ display:flex; justify-content:center; gap:8px; margin-top:18px; }
.chrono-dots .dot{ width:10px; height:10px; border-radius:50%; background:rgba(255,255,255,.2); transition:.3s; cursor:pointer; }
.chrono-dots .dot.active{ background:#00f0ff; box-shadow:0 0 10px rgba(0,240,255,.9); }

.pt-timer-row,.pt-drop-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  padding:10px 12px;
}
.pt-timer-row span,.pt-drop-row span{ color: rgba(255,255,255,.78); font-size: 13px; }
.pt-timer-row b,.pt-drop-row b{ font-weight: 900; }

@media (max-width: 700px){
  .chrono-wheel{ width: 380px; height: 260px; }
  .chrono-wheel-btn{ width: 114px; }
  #btnExploreEpoch{ left: 0; top: 126px; }
  #btnChooseEpoch{ left: 102px; top: 198px; }
  #btnChronoTimers{ right: 102px; top: 198px; }
  #btnChronoRewards{ right: 0; top: 126px; }
}

/* Mini text card used across chronosphere */
.pt-mini{
  background: linear-gradient(180deg, rgba(20,27,47,.9), rgba(14,20,36,.92));
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:16px;
  box-shadow: inset 0 0 30px rgba(0,0,0,.6);
}
.pt-mini .t{ font-weight:900; font-size:14px; margin-bottom:8px; color: rgba(0,240,255,.95); }
.pt-mini .d{ font-size:13px; color:rgba(255,255,255,.75); line-height:1.5; }


.pt-note-check{
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(25,135,84,.14);
  border: 1px solid rgba(25,135,84,.30);
  color: rgba(255,255,255,.92);
  font-weight: 900;
}

.pt-note-media{
  padding: 0 12px 10px 12px;
}
.pt-note-media img{
  width: 100%;
  display:block;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  max-height: 403px;
  object-fit: cover;
}

.pt-note-body{
  padding: 0 12px 12px 12px;
}

/* Safety: if admin inserts images inside body_html, clamp them too */
.pt-note-body img{
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  max-height: 403px;
  object-fit: cover;
  display: block;
  margin: 10px auto;
}

.pt-note-text{
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255,255,255,.80);
}

.pt-note-more{
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.90);
  font-size: 12px;
  font-weight: 800;
}
.pt-note-more:hover{ background: rgba(255,255,255,.08); }

@media (max-width: 576px){
  .pt-note-head{ flex-wrap: wrap; }
  .pt-note-title{ white-space: normal; }
  .pt-note-actions{ flex-direction: row; align-items:center; width: 100%; justify-content: flex-end; }
  .pt-note-check{ width: 28px; height: 28px; border-radius: 10px; }
  .pt-note-media img{ max-height: 240px; }
}

/* Fullscreen "client" wrapper */
.portal-game{
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  color: var(--hud-text);
  background:
    radial-gradient(1200px 700px at 20% 20%, rgba(88,167,255,.16), transparent 60%),
    radial-gradient(900px 650px at 80% 25%, rgba(176,123,255,.14), transparent 60%),
    radial-gradient(1000px 800px at 50% 120%, rgba(0,255,200,.08), transparent 55%),
    linear-gradient(180deg, #0b0b10 0%, #0a0a0f 100%);
}

.portal-game::before{
  content:"";
  position:absolute; inset:0;
  background-image: var(--pt-bg, none);
  background-size: cover;
  background-position: center;
  opacity: .22;
  filter: saturate(1.05) contrast(1.05);
  pointer-events:none;
}

.portal-game::after{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(700px 350px at 50% 10%, rgba(255,255,255,.12), transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,.00), rgba(0,0,0,.58));
  pointer-events:none;
}

/* safe padding for fixed top/bottom HUD */
.pt-screen{
  position: relative;
  z-index: 2;
  padding-top: calc(72px + env(safe-area-inset-top));
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

/* ===== Top HUD ===== */
.hud-top{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: calc(10px + env(safe-area-inset-top)) 10px 10px 10px;
  pointer-events: none;
}

.hud-top .hud-row{
  pointer-events: auto;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content: space-between;
}

.hud-box{
  border: 1px solid var(--hud-border);
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.28));
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
}

.hud-left{ display:flex; align-items:center; gap:10px; padding: 10px 12px; min-width: 220px; }
.hud-avatar{
  width:44px; height:44px;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid var(--hud-border2);
  background: rgba(255,255,255,.06);
  flex:0 0 auto;
}
.hud-avatar img{ width:100%; height:100%; object-fit: cover; }

.hud-avatar--xp{position:relative;border-radius:50%;padding:3px;width:52px;height:52px;overflow:visible;background:conic-gradient(rgba(88,167,255,.96) 0deg,var(--xp-accent, rgba(176,123,255,.92)) var(--xp-deg,0deg),rgba(255,255,255,.12) var(--xp-deg,0deg),rgba(255,255,255,.12) 360deg);box-shadow:0 8px 26px rgba(0,0,0,.35)}
.hud-avatar--xp::after{content:"";position:absolute;inset:3px;border-radius:50%;background:rgba(7,10,18,.9);z-index:0}
.hud-avatar--xp img{position:relative;z-index:1;border-radius:50%;width:100%;height:100%;display:block;border:2px solid rgba(255,255,255,.16);object-fit:cover;object-position:center}
.hud-btn--compact .hud-btn-ico{font-size:16px;line-height:1}
.hud-btn--compact .hud-btn-txt{display:inline}
@media (max-width: 680px){
  .hud-top .hud-row{align-items:flex-start;gap:8px}
  .hud-left{padding:8px 10px;gap:8px}
  .hud-avatar--xp{width:48px;height:48px}
  .hud-name .rank,.hud-name .xpmeta{display:none}
  .hud-name .nick{max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hud-right{padding:8px 10px;gap:6px;flex-wrap:wrap;justify-content:flex-end}
  .hud-btn{padding:8px 9px;min-height:38px;min-width:38px;justify-content:center}
  .hud-btn--compact .hud-btn-txt,.hud-btn-topup{display:none}
  .hud-btn-logout{display:inline-flex}
}

.hud-name{ line-height:1.05; }
.hud-name .nick{ font-weight:900; letter-spacing:.2px; font-size: 14px; }
.hud-name .rank{ color: var(--hud-dim); font-size: 12px; }

.hud-center{
  display:flex; gap:10px; align-items:center;
  padding: 10px 12px;
  flex: 1 1 auto;
  justify-content: center;
  max-width: 740px;
}

.res-chip{
  display:flex; align-items:center; gap:8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  min-width: 120px;
}

.res-ico{
  width:26px; height:26px; border-radius: 9px;
  display:grid; place-items:center;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  font-size: 14px;
}

.res-val{ font-weight:900; }
.res-lbl{ font-size: 11px; color: var(--hud-dimmer); margin-top:-2px; }

.hud-right{ display:flex; align-items:center; gap:10px; padding: 10px 12px; }
.hud-btn{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  padding: 8px 10px;
  background: rgba(0,0,0,.28);
  color: var(--hud-text);
  font-weight: 900;
  text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
}
.hud-btn:hover{ background: rgba(255,255,255,.06); color: var(--hud-text); }
.hud-btn.active{
  background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(45,226,255,.18));
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 40px rgba(0,0,0,.35);
}

/* Notification badge */
.hud-bell{ position: relative; padding-right: 14px; }
.hud-badge{
  position:absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,.96);
  background: rgba(220,53,69,.95);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 22px rgba(0,0,0,.45);
}

@media (max-width: 991px){
  .hud-center{ display:none; }
  .hud-left{ min-width: 0; }
}

/* ===== Main window ===== */
.portal-panel{ max-width: 1200px; margin: 0 auto; padding: 14px; }

.panel-window{
  border-radius: 18px;
  border: 1px solid var(--hud-border);
  background: linear-gradient(180deg, rgba(10,10,14,.78), rgba(12,12,16,.58));
  box-shadow: 0 25px 80px rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  overflow:hidden;
  position: relative;
}

/* Frame overlays were removed (too "gold" for the new sci-fi look).
   Keep classes for backward compatibility, but do not draw PNG frames. */
.panel-window.frame-gold::after,
.panel-window.frame-bronze::after{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  opacity:0;
  mix-blend-mode:normal;
}
.panel-window.frame-gold::after{ background-image:none; }
.panel-window.frame-bronze::after{ background-image:none; }

.panel-window.frame-gold::before,
.panel-window.frame-bronze::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 0 55px rgba(88,167,255,.10);
}

/* ===== Epoch themes (lightweight; no heavy assets required) ===== */
body[data-epoch="sand"] .portal-game{
  background:
    radial-gradient(1200px 700px at 20% 20%, rgba(255, 208, 120, .10), transparent 60%),
    radial-gradient(900px 650px at 80% 25%, rgba(176,123,255,.12), transparent 60%),
    linear-gradient(180deg, #0b0b10 0%, #0a0a0f 100%);
}

body[data-epoch="ice"] .portal-game{
  background:
    radial-gradient(1200px 700px at 20% 20%, rgba(120, 210, 255, .18), transparent 60%),
    radial-gradient(900px 650px at 80% 25%, rgba(140, 180, 255, .14), transparent 60%),
    linear-gradient(180deg, #070b12 0%, #05070d 100%);
}

body[data-epoch="storm"] .portal-game{
  background:
    radial-gradient(1200px 700px at 20% 20%, rgba(176,123,255,.18), transparent 60%),
    radial-gradient(900px 650px at 80% 25%, rgba(88,167,255,.14), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(255, 90, 90, .08), transparent 60%),
    linear-gradient(180deg, #0b0812 0%, #09060f 100%);
}

/* ===== Quests UI ===== */
.pt-quest{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  padding: 12px;
}
.pt-bar{
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.30);
  overflow: hidden;
}
.pt-bar__fill{
  height: 100%;
  width: 0;
  background:
    linear-gradient(90deg, rgba(88,167,255,.95), rgba(176,123,255,.92));
}


.panel-header{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.panel-title{ font-weight: 900; letter-spacing: .8px; text-transform: uppercase; font-size: 15px; }
.panel-sub{ font-size: 12px; color: var(--hud-dim); }
.panel-body{ padding: 14px; }

/* ===== Common chips / buttons ===== */
.badge-game{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  color: rgba(255,255,255,.90);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.small-chip{
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  padding: 6px 10px;
  color: rgba(255,255,255,.86);
  font-weight: 900;
  font-size: 12px;
}

/* Arena search progress (instead of big digits) */
.pt-searchbar{
  width: min(360px, 92vw);
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}
.pt-searchbar__fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,255,180,.85), rgba(120,235,255,.75), rgba(255,210,90,.75));
  transition: width .25s ease;
}

.btn-game{
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  font-weight: 900 !important;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.96) !important;
  background:
    radial-gradient(160px 70px at 20% 25%, rgba(255,255,255,.16), transparent 60%),
    linear-gradient(90deg, var(--hud-blue1), var(--hud-purple1)) !important;
  box-shadow: 0 18px 55px rgba(88,167,255,.26), 0 18px 55px rgba(176,123,255,.22);
  filter: saturate(1.12);
}
.btn-game:active{ transform: translateY(1px); }
.btn-game:hover{ filter: brightness(1.06) saturate(1.2); }

.btn-game-outline{
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  font-weight: 900 !important;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.92) !important;
  background:
    radial-gradient(140px 60px at 20% 25%, rgba(255,255,255,.10), transparent 60%),
    rgba(0,0,0,.18) !important;
  box-shadow: 0 12px 44px rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
}
.btn-game-outline:hover{ filter: brightness(1.06); }
.btn-game-outline:active{ transform: translateY(1px); }

/* ===== Game modal (animated, rounded, readable) ===== */
.pt-game-modal{
  border-radius: 22px !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  background:
    radial-gradient(420px 240px at 25% 15%, rgba(120,235,255,.16), transparent 55%),
    radial-gradient(420px 240px at 80% 10%, rgba(176,123,255,.14), transparent 60%),
    rgba(12,14,26,.92) !important;
  color: rgba(255,255,255,.92) !important;
  box-shadow: 0 35px 120px rgba(0,0,0,.72);
  overflow: hidden;
}
.pt-game-modal__head{
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.00));
}
.pt-game-modal__body{
  padding: 14px 16px !important;
}
.pt-game-modal__foot{
  border-top: 1px solid rgba(255,255,255,.10) !important;
  background: rgba(0,0,0,.12);
}
.pt-game-modal-dialog{
  transform: translateY(6px) scale(.98);
}
.modal.show .pt-game-modal-dialog{
  animation: ptModalPop .16s ease-out;
}
@keyframes ptModalPop{
  0%{ transform: translateY(10px) scale(.96); opacity:.0; }
  100%{ transform: translateY(0) scale(1); opacity:1; }
}

/* Top-up button (make it clearly "primary") */
.hud-btn-topup{
  border-color: rgba(255,255,255,.22) !important;
  background:
    radial-gradient(90px 40px at 25% 25%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(90deg, rgba(88,167,255,.95), rgba(176,123,255,.92)) !important;
  box-shadow: 0 14px 40px rgba(88,167,255,.22), 0 14px 40px rgba(176,123,255,.18);
}
.hud-btn-topup:hover{ filter: brightness(1.05) saturate(1.2); }

/* ===== Bottom nav ===== */
.hud-bottom{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) 10px;
}

.bottom-bar{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--hud-border);
  background: linear-gradient(180deg, rgba(0,0,0,.64), rgba(0,0,0,.34));
  box-shadow: 0 25px 80px rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  max-width: 1200px;
  margin: 0 auto;
}

.nav-btn{
  flex: 1 1 0;
  text-decoration:none;
  color: rgba(255,255,255,.90);
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 6px;
  padding: 6px 4px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.nav-btn:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color: rgba(255,255,255,.95);
}

.nav-ico{
  position:relative;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(16px 16px at 30% 30%, rgba(255,255,255,.12), transparent 60%),
    rgba(255,255,255,.05);
  display:grid;
  place-items:center;
  font-size: 18px;
}

.nav-lbl{
  font-size: 11px;
  color: rgba(255,255,255,.70);
  font-weight: 900;
  letter-spacing: .2px;
}

.nav-badge{
  position:absolute;
  top:-5px;
  right:-4px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#ff6b8e,#ff3d71);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  font-size:10px;
  font-weight:900;
  box-shadow:0 6px 16px rgba(255,61,113,.32);
  z-index:2;
}

#invList .inv-slot.is-new{
  position:relative;
  border-color:rgba(255,214,102,.34);
  box-shadow:0 0 0 1px rgba(255,214,102,.14),0 10px 28px rgba(255,214,102,.12), inset 0 0 22px rgba(255,255,255,.06);
  animation:ptInvNewPulse 2.1s ease-in-out infinite;
}
#invList .inv-slot.is-new::after{
  content:"NEW";
  position:absolute;
  top:8px;
  right:8px;
  min-width:30px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:linear-gradient(180deg,#ffd76b,#ffb347);
  color:#1b1200;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 18px rgba(255,179,71,.28);
}
@keyframes ptInvNewPulse{
  0%,100%{ transform:translateY(0); box-shadow:0 0 0 1px rgba(255,214,102,.12),0 10px 24px rgba(255,214,102,.08), inset 0 0 18px rgba(255,255,255,.04); }
  50%{ transform:translateY(-2px); box-shadow:0 0 0 1px rgba(255,214,102,.22),0 16px 36px rgba(255,214,102,.16), inset 0 0 24px rgba(255,255,255,.08); }
}

.nav-btn.is-active .nav-ico{
  border-color: rgba(255,255,255,.22);
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(88,167,255,.28), transparent 60%),
    radial-gradient(18px 18px at 70% 70%, rgba(176,123,255,.22), transparent 60%),
    rgba(255,255,255,.06);
  box-shadow: 0 12px 30px rgba(88,167,255,.16), 0 12px 30px rgba(176,123,255,.12);
}

.nav-btn.is-active .nav-lbl{ color: rgba(255,255,255,.90); }

/* Mobile: bottom nav becomes swipeable (too many buttons for one row) */
@media (max-width: 520px){
  .bottom-bar{
    justify-content:flex-start;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .bottom-bar::-webkit-scrollbar{ display:none; }
  .nav-btn{
    flex: 0 0 auto;
    width: 74px;
    scroll-snap-align: center;
  }
  .nav-ico{ width:42px; height:42px; border-radius: 16px; font-size: 17px; }
  .nav-lbl{ font-size: 10px; }
}

/* Extra mobile polish (APK/webview friendly) */
@media (max-width: 480px){
  .btn-game,
  .btn-game-outline{
    padding: 10px 12px !important;
    border-radius: 13px !important;
    font-size: 13px;
  }
  .small-chip{ padding: 5px 9px; font-size: 11px; }
  .panel-title{ font-size: 15px; }
  .panel-sub{ font-size: 12px; }
  .pt-hero .content{ min-height: 240px; }
  .offcanvas.offcanvas-end{ width: min(360px, 92vw); }
}

/* Battle screen: no extra safe paddings from global layout */
body.battle-page .pt-screen{ padding-top: 0 !important; padding-bottom: 0 !important; }

/* ===== Utility ===== */
.pt-muted{ color: var(--hud-dim) !important; }
.pt-muted-2{ color: var(--hud-dimmer) !important; }

/* ===== Settings page ===== */
.pt-tabs{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.pt-tabs .nav-link{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:#fff;
  border-radius:14px;
  padding:.55rem .8rem;
  font-weight:900;
  letter-spacing:.3px;
}
.pt-tabs .nav-link.active{
  background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border-color:rgba(255,255,255,.18);
}
.pt-setting-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.pt-setting-row .lbl{ font-weight:900; }
.pt-setting-row .hint{ color:rgba(255,255,255,.65); font-size:12px; margin-top:2px; }
.pt-setting-row .ctrl{ min-width:240px; display:flex; justify-content:flex-end; gap:10px; align-items:center; flex-wrap:wrap; }
.pt-kbd{ font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:12px; padding:.1rem .35rem; border-radius:10px; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06); }
.pt-divider{ height:1px; background:rgba(255,255,255,.08); margin:12px 0; }

/* ===== Screen layouts ===== */
.pt-grid{ display:grid; grid-template-columns: 1.05fr .95fr; gap: 14px; }
@media (max-width: 991px){ .pt-grid{ grid-template-columns: 1fr; } }

.pt-grid-shop{ display:grid; grid-template-columns: 1.25fr .75fr; gap: 14px; }
@media (max-width: 991px){ .pt-grid-shop{ grid-template-columns: 1fr; } }

/* ===== Portal / Arena cards ===== */
.pt-hero{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(0,0,0,.30), rgba(255,255,255,.03));
  overflow:hidden;
  position: relative;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.pt-hero .bg{ position:absolute; inset:0; background-image: var(--pt-hero-bg, none); background-size: cover; background-position:center; opacity:.22; }
.pt-hero .shade{ position:absolute; inset:0; background:
  radial-gradient(900px 280px at 50% 10%, rgba(88,167,255,.18), transparent 65%),
  linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.78)); }
.pt-hero .content{ position:relative; padding: 14px; min-height: 280px; display:flex; flex-direction:column; justify-content: space-between; }

.pt-mini{ border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.26); padding: 12px; }
.pt-mini .t{ font-weight: 900; letter-spacing:.3px; }
.pt-mini .d{ color: var(--hud-dim); font-size: 12px; margin-top: 4px; }

.pt-list{ border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.26); overflow:hidden; }
.pt-list-head{ padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.10); display:flex; align-items:center; justify-content: space-between; }
.pt-list-body{ padding: 12px; }

.pt-row{ display:flex; align-items:center; justify-content: space-between; gap:10px; padding: 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.25); margin-bottom: 10px; }
.pt-dot{ width:10px; height:10px; border-radius: 999px; background: rgba(25,135,84,.95); box-shadow: 0 0 0 5px rgba(25,135,84,.12); }

.pt-cool{ border-radius: 14px; border: 1px solid rgba(255,193,7,.22); background: rgba(255,193,7,.12); padding: 10px 12px; color: rgba(255,255,255,.86); }

/* ===== Shop ===== */
.pt-filter{ display:flex; gap:10px; flex-wrap: wrap; align-items:center; justify-content: space-between; padding: 10px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.26); }
.pt-filter .hint{ color: var(--hud-dim); font-size: 12px; }
.pt-seg{ display:flex; gap:8px; flex-wrap: wrap; align-items:center; }
.pt-seg-btn{
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.86);
  padding: 6px 10px;
  font-weight: 900;
  font-size: 12px;
  cursor:pointer;
}
.pt-seg-btn:hover{ background: rgba(255,255,255,.06); }
.pt-seg-btn.is-active{
  border-color: rgba(255,255,255,.22);
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(88,167,255,.22), transparent 60%),
    radial-gradient(18px 18px at 70% 70%, rgba(176,123,255,.18), transparent 60%),
    rgba(255,255,255,.06);
}

.pt-shop-grid{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (max-width: 560px){ .pt-shop-grid{ grid-template-columns: 1fr; } }

.pt-item{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(0,0,0,.30), rgba(255,255,255,.03));
  overflow:hidden;
  position: relative;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.pt-item::before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(260px 120px at 20% 20%, rgba(88,167,255,.12), transparent 60%),
    radial-gradient(260px 120px at 80% 30%, rgba(176,123,255,.10), transparent 60%);
  pointer-events:none;
}
.pt-item-inner{ position:relative; padding: 12px; display:flex; flex-direction:column; gap: 10px; }
.pt-item-top{ display:flex; justify-content: space-between; gap: 10px; align-items:flex-start; }
.pt-item-name{ font-weight: 900; letter-spacing: .2px; line-height: 1.1; }
.pt-item-type{ color: var(--hud-dim); font-size: 12px; margin-top: 3px; }
.pt-price{ flex:0 0 auto; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); padding: 6px 10px; background: rgba(0,0,0,.28); font-weight: 900; white-space: nowrap; }
.pt-desc{ color: rgba(255,255,255,.80); font-size: 12px; line-height: 1.35; border-radius: 12px; border: 1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.25); padding: 8px 10px; }
.pt-desc code{ color: rgba(255,255,255,.78); font-size: 12px; }
.pt-actions{ display:flex; justify-content: space-between; align-items:center; gap: 10px; flex-wrap: wrap; }

/* ===== Side panel ===== */
.pt-side{ border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.26); overflow:hidden; }
.pt-side-head{ padding: 12px; border-bottom: 1px solid rgba(255,255,255,.10); display:flex; align-items:center; justify-content: space-between; }
.pt-side-title{ font-weight: 900; letter-spacing: .6px; text-transform: uppercase; font-size: 13px; }
.pt-side-body{ padding: 12px; }

.pt-inv{ display:flex; align-items:center; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.22); margin-bottom: 10px; }
.pt-inv-name{ font-weight: 900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pt-inv-meta{ color: var(--hud-dim); font-size: 12px; margin-top: 2px; }
.pt-inv-count{ border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.22); padding: 6px 10px; font-weight: 900; }

/* ===== Item icons + rarity (48x48) ===== */
.item-icon{
  width:48px; height:48px;
  border-radius: 16px;
  position: relative;
  flex: 0 0 auto;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.14);
  overflow:hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
}
.item-icon img{ width:100%; height:100%; object-fit: cover; display:block; }
.item-icon::after{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.18), transparent 60%);
  pointer-events:none;
}

/* rarity overlay as PNG frame */
.item-icon.r-common{ background-image:url('/assets/ui/rarity/rarity_common.png'); background-size:100% 100%; background-repeat:no-repeat; }
.item-icon.r-rare{ background-image:url('/assets/ui/rarity/rarity_rare.png'); background-size:100% 100%; background-repeat:no-repeat; }
.item-icon.r-epic{ background-image:url('/assets/ui/rarity/rarity_epic.png'); background-size:100% 100%; background-repeat:no-repeat; }
.item-icon.r-legendary{ background-image:url('/assets/ui/rarity/rarity_legendary.png'); background-size:100% 100%; background-repeat:no-repeat; }

/* ===== Chronosphere screen (fits game panels) ===== */
.chrono-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:420px;}
.chrono-sphere{width:min(46vmin,420px);aspect-ratio:1/1;border-radius:999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.25), rgba(255,255,255,0) 40%),
    radial-gradient(circle at 50% 50%, rgba(45,226,255,.25), rgba(124,58,237,.15) 55%, rgba(0,0,0,.35) 78%),
    conic-gradient(from 0deg, rgba(45,226,255,.35), rgba(124,58,237,.28), rgba(214,178,94,.18), rgba(45,226,255,.35));
  filter:saturate(1.15) contrast(1.05);
  box-shadow:0 0 0 1px rgba(45,226,255,.18), 0 30px 120px rgba(0,0,0,.75), 0 0 80px rgba(45,226,255,.18);
  animation:chronoSpin 18s linear infinite;
  position:relative;
}
.chrono-sphere::before{content:"";position:absolute;inset:14px;border-radius:999px;border:1px solid rgba(234,242,255,.18);
  box-shadow:inset 0 0 60px rgba(45,226,255,.10);
}
.chrono-sphere::after{content:"";position:absolute;inset:-18px;border-radius:999px;
  background:radial-gradient(circle, rgba(45,226,255,.18), rgba(45,226,255,0) 55%),
             radial-gradient(circle, rgba(124,58,237,.16), rgba(124,58,237,0) 60%);
  filter:blur(2px);
}
@keyframes chronoSpin{to{transform:rotate(360deg)}}

.chrono-card{
  position:absolute;left:50%;bottom:26px;transform:translateX(-50%);
  width:min(760px, 92vw);
  border-radius:18px;
  padding:14px 16px;
  background:rgba(0,0,0,.38);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 20px 60px rgba(0,0,0,.55);
}
.epoch-name{font-size:20px;font-weight:900;letter-spacing:.2px}
.epoch-desc{color:rgba(234,242,255,.72);margin-top:2px}

/* ===== Chronosphere cockpit controls (Stage 9.x) ===== */
.chrono-core-indicator{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  z-index:3;
}
.chrono-core-indicator img{
  width:84px;
  height:84px;
  max-width:32%;
  max-height:32%;
  object-fit:contain;
  opacity:.22;
  filter:drop-shadow(0 10px 24px rgba(0,0,0,.35));
}

/* Portal gif inside sphere */
.chrono-sphere-wrap{position:relative;display:flex;align-items:center;justify-content:center;}
.chrono-sphere-wrap__portal{
  position:absolute;
  left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:min(46vmin,420px);
  aspect-ratio:1/1;
  border-radius:999px;
  overflow:hidden;
  z-index:1;
  opacity:.38;
  filter:saturate(1.2) contrast(1.05);
  pointer-events:none;
}
.chrono-portal-gif{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Semi-orbit button wheel around sphere */
.chrono-wheel{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width: min(68vmin, 560px);
  height: min(68vmin, 560px);
  pointer-events:none;
  z-index:4;
}
.chrono-wheel .chrono-wheel__btn{
  pointer-events:auto;
  position:absolute;
  min-width: 132px;
}
.chrono-wheel .chrono-wheel__btn.btn-a{ left:50%; top:-10px; transform:translateX(-50%); }
.chrono-wheel .chrono-wheel__btn.btn-b{ right:-6px; top:18%; transform:translateY(-50%); }
.chrono-wheel .chrono-wheel__btn.btn-c{ right:-10px; bottom:18%; transform:translateY(50%); }
.chrono-wheel .chrono-wheel__btn.btn-d{ left:50%; bottom:-10px; transform:translateX(-50%); }
.chrono-wheel .chrono-wheel__btn.btn-e{ left:-10px; bottom:18%; transform:translateY(50%); }
.chrono-wheel .chrono-wheel__btn.btn-f{ left:-6px; top:18%; transform:translateY(-50%); }

/* Left mini epoch list */
.chrono-epoch-mini-list{
  position:absolute;
  left:14px;
  top:14px;
  bottom:14px;
  width: 118px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:auto;
  padding:8px;
  border-radius:18px;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  z-index:6;
}
.chrono-epoch-mini{
  cursor:pointer;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  padding:8px;
  text-align:center;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.chrono-epoch-mini:hover{ transform: translateY(-1px); border-color: rgba(45,226,255,.22); }
.chrono-epoch-mini.active{
  border-color: rgba(45,226,255,.30);
  background: rgba(45,226,255,.08);
}
.chrono-epoch-mini img{
  width: 54px;
  height: 54px;
  object-fit: contain;
  display:block;
  margin: 0 auto 6px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}
.chrono-epoch-mini .t{
  font-size:11px;
  font-weight:900;
  line-height:1.1;
  color: rgba(255,255,255,.90);
}

/* Card bounds: keep inside stage */
.chrono-card{
  box-sizing:border-box;
}

/* Mobile: collapse mini list + wheel to stacked buttons */
@media (max-width: 576px){
  .chrono-epoch-mini-list{ position:relative; left:auto; top:auto; bottom:auto; width:100%; max-width:92vw; flex-direction:row; overflow:auto; }
  .chrono-wheel{ position:relative; left:auto; top:auto; transform:none; width:100%; height:auto; display:grid; grid-template-columns: 1fr; gap:10px; margin-top: 12px; }
  .chrono-wheel .chrono-wheel__btn{ position:relative; left:auto; right:auto; top:auto; bottom:auto; transform:none; width:100%; min-width:unset; }
  .chrono-core-indicator img{ width:64px; height:64px; }
}



.chrono-dots{position:absolute;left:50%;top:18px;transform:translateX(-50%);
  display:flex;gap:8px;align-items:center;justify-content:center;
}
.chrono-dots .dot{width:9px;height:9px;border-radius:999px;background:rgba(234,242,255,.25);border:1px solid rgba(234,242,255,.20)}
.chrono-dots .dot.active{background:rgba(45,226,255,.85);box-shadow:0 0 18px rgba(45,226,255,.35)}

@media (max-width: 576px){
  .chrono-stage{
    min-height: auto;
    padding: 10px 0 6px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }
  .chrono-sphere{ width: min(72vw, 320px); }
  .chrono-card{
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 92vw;
  }
  /* Buttons should not run out of screen */
  .chrono-card .btn{ width: 100%; }
}


/* ===== Battle Chat (FAB + Drawer) ===== */
.chat-fab{
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 2000;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(88,167,255,.22), transparent 60%),
    radial-gradient(18px 18px at 70% 70%, rgba(176,123,255,.18), transparent 60%),
    rgba(0,0,0,.45);
  color: rgba(255,255,255,.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 55px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.battle-page .chat-fab{ bottom: calc(18px + env(safe-area-inset-bottom)); }
.chat-fab:active{ transform: translateY(1px); }
.chat-fab__badge{
  position:absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(220,53,69,.85);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  display:none;
  align-items:center;
  justify-content:center;
}

.chat-drawer{
  position: fixed;
  z-index: 2100;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  height: min(58svh, 520px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(180deg, rgba(10,10,14,.86), rgba(12,12,16,.66));
  box-shadow: 0 25px 90px rgba(0,0,0,.65);
  backdrop-filter: blur(10px);
  transform: translateY(120%);
  transition: transform .18s ease;
  display:flex;
  flex-direction: column;
  overflow:hidden;
}
.chat-drawer.open{ transform: translateY(0); }

.chat-drawer__head{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.chat-drawer__box{
  flex: 1 1 auto;
  padding: 10px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat-drawer__send{
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  display:flex;
  gap: 10px;
  align-items:center;
}
.chat-drawer__send input.form-control{
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
}
.chat-drawer__send input.form-control::placeholder{ color: rgba(255,255,255,.55); }

.chat-msg{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  padding: 8px 10px;
  margin-bottom: 10px;
}
.chat-meta{
  display:flex;
  align-items:baseline;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
}
.chat-body{
  margin-top: 4px;
  color: rgba(255,255,255,.90);
  font-size: 13px;
  line-height: 1.35;
  word-wrap: break-word;
}
.chat-time{ color: rgba(255,255,255,.52); font-size: 11px; }

@media (min-width: 992px){
  .chat-fab{ right: 20px; bottom: 20px; }
  .chat-drawer{
    top: 86px;
    bottom: 20px;
    left: auto;
    right: 20px;
    width: 380px;
    height: auto;
    transform: translateX(110%);
    border-radius: 18px;
  }
  .chat-drawer.open{ transform: translateX(0); }
}

/* prevent body scroll jump when drawer open */
.battle-page{ overscroll-behavior: none; }


/* ===== Inventory grid ===== */
.inv-grid{
  display:grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

/* Operation 4: Inventory slots grid (15 slots) */
.inv-slots{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px){
  .inv-slots{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.inv-slot{
  position:relative;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  border-radius: 16px;
  padding: 10px;
  min-height: 96px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  color: rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.inv-slot.is-item{
  width:100%;
  border:1px solid rgba(255,255,255,.12);
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.inv-slot.is-item:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.05);
  box-shadow: 0 14px 40px rgba(0,0,0,.32);
}

.inv-slot__icon{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 8px;
}
.inv-slot__icon img{ width: 100%; height: 100%; object-fit: contain; display:block; }

.inv-slot__t{
  font-weight: 800;
  font-size: 11px;
  line-height: 1.15;
  color: rgba(255,255,255,.92);
}
.inv-slot__q{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255,255,255,.80);
}

.inv-slot.is-locked{
  background: rgba(0,0,0,.30);
  border-color: rgba(255,255,255,.08);
}
.inv-slot__lock{ font-size: 20px; opacity: .9; margin-bottom: 6px; }

.inv-slot.is-empty{
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.10);
}
.inv-slot__empty{ font-size: 22px; opacity: .5; margin-bottom: 6px; }

/* Stage 6 hotfix: some legacy list styles may force inventory back into a line */
.pt-list-body .inv-grid{ display:grid !important; }
.pt-list-body .inv-item{ display:flex !important; width:100% !important; }
.inv-item{
  width:100%;
  text-align:left;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  border-radius: 16px;
  padding: 10px;
  display:flex;
  gap:10px;
  align-items:center;
  color: rgba(255,255,255,.92);
}
.inv-item:hover{ background: rgba(255,255,255,.06); }
.inv-icon{
  width:48px; height:48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  overflow:hidden;
  flex: 0 0 auto;
}
.inv-icon img{ width:100%; height:100%; object-fit:cover; display:block; }
.inv-meta{ display:flex; flex-direction:column; min-width:0; }
.inv-title{ font-weight:800; font-size: 13px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.inv-sub{ font-size: 12px; color: rgba(255,255,255,.70); margin-top: 2px; }

@media (max-width: 520px){
  .inv-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .inv-icon{ width:44px; height:44px; border-radius: 14px; }
}

/* ===== News cards (Center) ===== */
.pt-note-badge{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0,255,180,.10);
  border: 1px solid rgba(0,255,180,.22);
  color: rgba(234,255,248,.92);
}

/* ===== Inventory: force grid layout (prevent legacy list overrides) ===== */
#invList .inv-grid{ display:grid !important; gap: 10px !important; }
#invList .inv-item{ display:flex !important; width:100% !important; text-align:left !important; }

/* ===== Chronosphere epoch card shimmer (makes epoch art feel alive) ===== */
.chrono-card{
  position: relative;
  overflow: hidden;
}
.chrono-card::after{
  content:"";
  position:absolute;
  inset:-30%;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.10), transparent 55%),
              radial-gradient(circle at 80% 60%, rgba(0,220,255,.10), transparent 55%),
              linear-gradient(120deg, transparent 0%, rgba(255,255,255,.10) 40%, transparent 65%);
  mix-blend-mode: overlay;
  opacity:.55;
  animation: ptEpochShimmer 6.5s ease-in-out infinite;
  pointer-events:none;
}
@keyframes ptEpochShimmer{
  0%{ transform: translate3d(-6%, -2%, 0) rotate(-2deg); opacity:.35; }
  50%{ transform: translate3d(6%, 2%, 0) rotate(2deg); opacity:.70; }
  100%{ transform: translate3d(-6%, -2%, 0) rotate(-2deg); opacity:.35; }
}

/* ===== Season quests ===== */
.pt-quest{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  margin-bottom: 10px;
}
.pt-quest__top{ display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.pt-quest__t{ font-weight: 900; letter-spacing:.2px; }
.pt-quest__r{ font-size: 12px; color: rgba(255,255,255,.78); }
.pt-quest__bar{ height: 10px; border-radius: 999px; overflow:hidden; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); margin-top: 8px; }
.pt-quest__fill{ height:100%; width: 0; background: linear-gradient(90deg, rgba(0,255,180,.85), rgba(120,235,255,.75)); }
.pt-news-card .pt-note-type{ opacity:.85; }


/* Stage 7: online dot */
.pt-dot-online{
  position:absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,255,180,.95);
  box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 0 14px rgba(0,255,180,.45);
}
.item-icon{ position:relative; }


/* HUD resource icons + plus */
.res-chip{position:relative;}
.res-chip .res-ico img{width:22px;height:22px;display:block;filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));}
.res-chip .res-plus{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:22px;height:22px;border-radius:999px;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:16px;line-height:1;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);}
.res-chip.res-click{cursor:pointer;}
.res-chip.res-click:active{transform:scale(.99);}

/* ===== Stage 3 · My Character cabinet ===== */
.pt-character-tabs{
  display:flex; gap:8px; flex-wrap:wrap;
}
.pt-character-tabs .nav-link{
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.26);
  color: rgba(255,255,255,.86);
  font-weight: 900;
  padding: 8px 14px;
}
.pt-character-tabs .nav-link.active{
  color:#fff;
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(88,167,255,.22), transparent 60%),
    radial-gradient(18px 18px at 70% 70%, rgba(176,123,255,.18), transparent 60%),
    rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.20);
}
.pt-char-grid{ display:grid; grid-template-columns: 1.2fr .8fr; gap:14px; }
@media (max-width: 991px){ .pt-char-grid{ grid-template-columns: 1fr; } }

.pt-char-stage{
  position:relative; overflow:hidden; border-radius:22px;
  border:1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(0,0,0,.34), rgba(0,0,0,.58));
  min-height: 520px;
}
.pt-char-stage__backdrop{
  position:absolute; inset:0;
  background:
    radial-gradient(520px 220px at 50% 12%, rgba(45,226,255,.16), transparent 58%),
    radial-gradient(340px 180px at 80% 22%, rgba(214,178,94,.12), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.22));
}
.pt-char-stage__content{ position:relative; z-index:1; padding:16px; display:flex; flex-direction:column; gap:16px; }
.pt-char-stage__top{ display:flex; justify-content:space-between; gap:10px; align-items:flex-start; flex-wrap:wrap; }
.pt-char-stage__name{ font-size: 28px; font-weight: 900; line-height:1; }
.pt-char-stage__sub{ color: var(--hud-dim); font-size: 13px; margin-top:4px; }
.pt-char-power{ border-radius:999px; border:1px solid rgba(255,255,255,.14); background:rgba(0,0,0,.28); padding:8px 12px; font-weight:900; }
.pt-char-stage__hero{ display:grid; grid-template-columns: 300px 1fr; gap:18px; align-items:start; }
@media (max-width: 991px){ .pt-char-stage__hero{ grid-template-columns: 1fr; } }
.pt-char-portrait{
  position:relative;
  width:min(100%, 360px);
  aspect-ratio: 0.76 / 1;
  min-height: 400px;
  border-radius:28px;
  margin-inline:auto;
  padding:14px;
  border:1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(140px 120px at 18% 14%, rgba(45,226,255,.16), transparent 62%),
    radial-gradient(170px 160px at 82% 18%, rgba(214,178,94,.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.16)),
    rgba(255,255,255,.04);
  box-shadow: 0 18px 40px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.06);
  overflow:hidden;
}
.pt-char-portrait::before,
.pt-char-portrait::after{
  content:"";
  position:absolute;
  inset:10px;
  border-radius:22px;
  pointer-events:none;
}
.pt-char-portrait::before{
  border:1px solid rgba(214,178,94,.24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.pt-char-portrait::after{
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,.12), transparent 32%, transparent 68%, rgba(0,0,0,.18));
  mix-blend-mode: screen;
  opacity:.45;
}
.pt-char-portrait img{ position:relative; z-index:1; width:100%; height:100%; object-fit: contain !important; object-position:center bottom; display:block; filter: drop-shadow(0 18px 28px rgba(0,0,0,.34)); }

@media (max-width: 991px){
  .pt-char-portrait{ width:min(100%, 330px); min-height: 350px; }
}
.pt-char-summary{
  border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18));
  padding:16px;
  min-height: 100%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.pt-char-summary__title{ font-size: 24px; font-weight: 900; }
.pt-char-summary__descr{ color: rgba(255,255,255,.78); line-height:1.45; margin-top:8px; }
.pt-stat-chips{ display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.small-chip.is-boost{ border-color: rgba(45,226,255,.25); background: rgba(45,226,255,.10); }
.pt-char-counters{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:10px; }
@media (max-width: 560px){ .pt-char-counters{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pt-counter-card{ border-radius:16px; border:1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.26); padding:12px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.pt-counter-card span{ color: var(--hud-dim); font-size:12px; }
.pt-counter-card b{ font-size:18px; }
.pt-currency-stack{ display:flex; flex-direction:column; gap:8px; }
.pt-currency-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; border-radius:12px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); padding:8px 10px; }
.pt-service-active-list{ display:flex; flex-direction:column; gap:8px; }
.pt-service-active-item{ border-radius:12px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); padding:8px 10px; }

.pt-skin-grid{ display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px; }
@media (max-width: 1200px){ .pt-skin-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px){ .pt-skin-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pt-skin-card{
  border-radius:18px; border:1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.28);
  padding:10px; color:rgba(255,255,255,.92); text-align:left;
  transition: transform .12s ease, border-color .12s ease, opacity .12s ease;
}
.pt-skin-card:hover{ transform: translateY(-2px); border-color: rgba(45,226,255,.22); }
.pt-skin-card.is-active{ border-color: rgba(45,226,255,.38); box-shadow: 0 0 0 1px rgba(45,226,255,.18) inset; }
.pt-skin-card.is-locked{ opacity: .72; }
.pt-skin-card.is-locked img{ filter: grayscale(1) saturate(.65) brightness(.78); }
.pt-skin-card__frame{ width:100%; aspect-ratio: 0.76 / 1; border-radius:20px; display:flex; align-items:center; justify-content:center; background: rgba(255,255,255,.03); overflow:hidden; }
/* IMPORTANT: collection cards also carry .item-icon which may set fixed square sizes.
   Override it so the frame stays full-width portrait, not a tiny square. */
.pt-skin-card__frame.item-icon{ width:100% !important; height:auto !important; }
.pt-skin-card__frame img{ width:100%; height:100%; object-fit: contain !important; object-position:center bottom; }
.pt-skin-card__body{ margin-top:10px; }
.pt-skin-card__name{ font-weight:900; line-height:1.15; }
.pt-skin-card__meta{ color: var(--hud-dim); font-size:12px; margin-top:4px; }

.pt-skin-detail-card{ border-radius:18px; border:1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.22); padding:12px; }
.pt-skin-detail-card__top{ display:flex; align-items:center; gap:12px; }
.pt-skin-detail-card__icon{ width:86px; height:86px; border-radius:22px; }
.pt-skin-detail-card__title{ font-size:20px; font-weight:900; }
.pt-skin-detail-card__sub{ color: var(--hud-dim); font-size:12px; margin-top:4px; }
.pt-skin-stats{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:8px; }
.pt-skin-stat{ display:flex; justify-content:space-between; gap:10px; border-radius:12px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); padding:8px 10px; }
.pt-skin-stat span{ color: var(--hud-dim); font-size:12px; }

.pt-chest-grid{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; }
@media (max-width: 860px){ .pt-chest-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px){ .pt-chest-grid{ grid-template-columns: 1fr; } }
.pt-chest-card{ border-radius:18px; border:1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.26); padding:12px; text-align:center; color:#fff; }
.pt-chest-card__img{ width:100%; aspect-ratio:1 / 1; display:flex; align-items:center; justify-content:center; }
.pt-chest-card__img img{ max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(0,0,0,.35)); }
.pt-chest-card__name{ font-weight:900; margin-top:4px; }
.pt-chest-card__meta{ color: var(--hud-dim); font-size:12px; margin-top:3px; }

.pt-workshop-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px){ .pt-workshop-grid{ grid-template-columns: 1fr; } }

.pt-service-grid{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
@media (max-width: 860px){ .pt-service-grid{ grid-template-columns: 1fr; } }
.pt-service-card{ position:relative; border-radius:18px; border:1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.28); padding:14px; overflow:hidden; }
.pt-service-card::before{ content:""; position:absolute; inset:-2px; pointer-events:none; opacity:.7; }
.pt-service-card.rarity-rare::before{ background: radial-gradient(240px 110px at 20% 10%, rgba(45,226,255,.12), transparent 58%); }
.pt-service-card.rarity-epic::before{ background: radial-gradient(240px 110px at 20% 10%, rgba(124,58,237,.16), transparent 58%); }
.pt-service-card.rarity-legendary::before{ background: radial-gradient(240px 110px at 20% 10%, rgba(214,178,94,.18), transparent 58%); }
.pt-service-card__top,.pt-service-card__foot{ position:relative; z-index:1; display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.pt-service-card__icon{ font-size:28px; }
.pt-service-card__title{ font-size:18px; font-weight:900; }
.pt-service-card__sub{ color: var(--hud-dim); font-size:12px; margin-top:2px; }
.pt-service-card__foot{ align-items:center; margin-top:12px; }
.pt-service-active{ position:relative; z-index:1; margin-top:10px; color: rgba(255,255,255,.82); font-size:12px; }

.pt-help-accordion .accordion-button:not(.collapsed){ box-shadow:none; background: rgba(255,255,255,.06); }
.pt-help-accordion .accordion-button:focus{ box-shadow:none; }

/* ===== FX: Orb burst (Stage 9.1) ===== */
.pt-orb-burst{
  position: fixed;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2147482000;
  transform: translate(-50%, -50%);
}
.pt-orb{
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.85), var(--orb, #2DE2FF) 55%, rgba(0,0,0,0) 72%);
  box-shadow: 0 0 18px rgba(45,226,255,.35);
  transform: translate(0,0) scale(.9);
  animation: ptOrbFly var(--d, 720ms) ease-out forwards;
}
@keyframes ptOrbFly{
  0%   { transform: translate(0,0) scale(.9); opacity: .95; }
  70%  { opacity: .85; }
  100% { transform: translate(var(--dx, 80px), var(--dy, -60px)) scale(.15); opacity: 0; }
}


/* ===== Stage 10: Character level bar (skins.php) ===== */
.pt-levelbar{margin-top:10px;max-width:420px}
.pt-levelbar__top{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:rgba(255,255,255,.82)}
.pt-levelbar__meta{color:rgba(255,255,255,.58)}
.pt-levelbar__bar{margin-top:6px;height:8px;border-radius:999px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.12);overflow:hidden}
.pt-levelbar__bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg, rgba(45,226,255,.95), rgba(176,123,255,.80))}

/* ===== Stage 14.1: Mobile skins carousel (tap-to-select, swipe) ===== */
@media (max-width: 700px){
  .pt-skin-grid{
    display:flex;
    flex-wrap:nowrap;
    gap:12px;
    overflow-x:auto;
    padding-bottom:6px;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
  }
  .pt-skin-grid::-webkit-scrollbar{ height:6px; }
  .pt-skin-grid::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.12); border-radius:999px; }
  .pt-skin-card{ flex:0 0 78%; scroll-snap-align:center; }
}

@media (hover: none){
  .pt-skin-card:hover{ transform:none !important; }
}

/* Stage 35 mobile HUD fit */
@media (max-width: 680px){
  .hud-top{padding:8px 8px 0}
  .hud-shell{grid-template-columns:minmax(0,1fr);gap:8px}
  .hud-left,.hud-right{width:100%;min-width:0}
  .hud-right{justify-content:space-between}
  .hud-name{min-width:0}
  .hud-name .nick{max-width:120px}
}


/* ===== Inventory final overlay cycle 2026-03-30 ===== */
.inventory-page #invList{position:relative;min-height:420px}
.inventory-page #invList.is-loading .inv-slots:not(.inv-slots--skeleton){opacity:.35;pointer-events:none;filter:blur(.6px)}
.inventory-page .inv-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.inventory-page .inv-slots--skeleton .inv-slot{min-height:148px}
.inventory-page .inv-slot.is-skeleton{background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.025));border:1px solid rgba(255,255,255,.08);animation:ptInvPulse 1.15s ease-in-out infinite alternate}
.inventory-page .inv-slot.is-skeleton .inv-slot__icon,.inventory-page .inv-slot.is-skeleton .inv-slot__t,.inventory-page .inv-slot.is-skeleton .inv-slot__q{background:rgba(255,255,255,.08);color:transparent;border-radius:12px}
.inventory-page .inv-slot.is-skeleton .inv-slot__icon{min-height:58px}
.inventory-page .inv-slot.is-skeleton .inv-slot__t{height:14px;width:74%;margin:6px auto 0}
.inventory-page .inv-slot.is-skeleton .inv-slot__q{height:12px;width:46%;margin:6px auto 0}
.inventory-page .inv-loader{position:absolute;inset:0;display:none;align-items:center;justify-content:center;gap:12px;z-index:5;border-radius:22px;background:linear-gradient(180deg,rgba(8,14,28,.76),rgba(6,10,20,.58));backdrop-filter:blur(4px)}
.inventory-page .inv-loader.is-show{display:flex}
.inventory-page .inv-loader__spinner{width:42px;height:42px;border-radius:999px;border:3px solid rgba(255,255,255,.12);border-top-color:rgba(105,220,255,.96);box-shadow:0 0 24px rgba(90,205,255,.2);animation:ptInvSpin .9s linear infinite}
.inventory-page .inv-loader__text{font-weight:900;letter-spacing:.02em;color:rgba(235,248,255,.94)}
.inventory-page .inv-slot{min-height:148px;justify-content:flex-start;padding:14px 10px 12px;gap:8px}
.inventory-page .inv-slot__icon{width:68px;height:68px;margin-bottom:0;border-radius:16px}
.inventory-page .inv-slot__t{font-size:12px;min-height:28px;display:flex;align-items:center;justify-content:center;text-align:center}
.inventory-page .inv-slot__q{margin-top:auto;font-size:12px}
.inventory-page #boostFilters,.inventory-page #bagFilters{position:relative;z-index:2}
.inventory-page .hud-btn.active{box-shadow:0 0 0 1px rgba(118,214,255,.18),0 0 22px rgba(118,214,255,.10)}
@keyframes ptInvSpin{to{transform:rotate(360deg)}}
@keyframes ptInvPulse{from{opacity:.42}to{opacity:.86}}
@media (max-width: 860px){.inventory-page .inv-slots{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.inventory-page .inv-slot{min-height:136px;padding:12px 8px 10px}.inventory-page .inv-slot__icon{width:60px;height:60px}}
@media (max-width: 560px){.inventory-page .inv-slots{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.inventory-page .inv-slot{min-height:126px;padding:10px 6px 9px;border-radius:16px}.inventory-page .inv-slot__icon{width:54px;height:54px;border-radius:14px}.inventory-page .inv-slot__t{font-size:11px;min-height:24px}.inventory-page .inv-slot__q{font-size:11px}.inventory-page .inv-loader__text{font-size:12px}}

/* 2026-03-30 mobile restore overlay: inventory should never flash legacy list before slot grid */
.inventory-page #invList > :not(.inv-loader):not(.inv-slots--skeleton){display:none}
.inventory-page.inventory-ready #invList > :not(.inv-loader):not(.inv-slots--skeleton){display:initial}
.inventory-page.inventory-ready #invList > .inv-slots:not(.inv-slots--skeleton){display:grid}
.inventory-page #invList.is-loading > .inv-slots:not(.inv-slots--skeleton){display:none !important}
.inventory-page #bagFilters,.inventory-page #boostFilters{min-height:44px}
.inventory-page .panel-window{overflow:hidden}
@media (max-width: 640px){
  .inventory-page .panel-header{gap:10px}
  .inventory-page .panel-title{font-size:1.05rem}
  .inventory-page .pt-list-head{align-items:flex-start}
  .inventory-page .pt-list-head .badge-game{font-size:12px}
}


.inventory-page .inv-slot.is-locked{opacity:.92}
.inventory-page .inv-slot.is-next-lock{cursor:pointer;background:linear-gradient(180deg,rgba(20,38,76,.96),rgba(10,18,36,.98));border:1px solid rgba(108,196,255,.34);box-shadow:0 0 0 1px rgba(108,196,255,.10) inset,0 14px 28px rgba(0,0,0,.24)}
.inventory-page .inv-slot.is-next-lock:hover{transform:translateY(-2px);box-shadow:0 0 0 1px rgba(108,196,255,.14) inset,0 18px 36px rgba(0,0,0,.28),0 0 22px rgba(108,196,255,.12)}
.inventory-page .inv-slot.is-next-lock .inv-slot__lock{font-size:26px;color:#89d7ff}
.inventory-page .inv-slot.is-future-lock{background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.018));border-style:dashed;opacity:.66}
.inventory-page .inv-slot.is-future-lock .inv-slot__lock{font-size:22px;opacity:.88}
.inventory-page .inv-slot.is-next-lock[disabled]{opacity:.7;pointer-events:none;filter:saturate(.8)}
.inventory-page .inv-slot [data-have]{display:block}
.boss-craft-card__descr{display:block;margin-top:6px;line-height:1.42;font-size:.8rem;color:rgba(255,255,255,.72)!important}
.boss-craft-card__state{display:block;margin-top:10px;padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);font-size:.74rem;font-weight:900;color:rgba(255,255,255,.82)!important}
.boss-craft-card.is-ready .boss-craft-card__state{background:rgba(16,185,129,.14);border-color:rgba(16,185,129,.32);color:#d7fff1!important}
.boss-craft-card.is-missing .boss-craft-card__state{background:rgba(245,158,11,.10);border-color:rgba(245,158,11,.24);color:#ffe7bc!important}
.boss-craft-card__recipe [data-cost]{position:relative;padding-left:18px}
.boss-craft-card__recipe [data-cost]::before{content:'•';position:absolute;left:4px;top:0;color:rgba(255,255,255,.36)}
.boss-craft-card__recipe [data-cost].is-ready{color:#cffff1!important}
.boss-craft-card__recipe [data-cost].is-ready::before{color:#34d399}
.boss-craft-card__recipe [data-cost].is-missing{color:#ffd8a8!important}
.boss-craft-card__recipe [data-cost].is-missing::before{color:#fb923c}
