/* =============================================================================
   Pet Scroll Panel — framed Level/Growth XP + scroll accordion below the pet.
   Replaces the old .inv-pet-hub__bars-strip + .inv-hub-scroll-row. Reuses the
   data IDs pet-hub.js already fills (#inv-hub-st-lxp-fill / -txt, #inv-hub-st-
   exp-fill / -txt, #inv-hub-bars-petname / -petsub).

   Stage (a): frame + header + two XP columns + glow toggles. Accordion internals
   (rarity selector + scroll detail) and the shared info popover are scaffolded
   here and wired in stage (b).

   Assets: assets/images/pet-hub/scroll/
   ---------------------------------------------------------------------------
   Rarity scale is universal (1=Common … 6=Mythical); scroll art is per TYPE
   (exp = blue paw, growth = purple leaf), never per rarity.
   ========================================================================== */

:root {
	--sp-lxp:        #38bdf8;   /* Level XP accent (cyan)   */
	--sp-lxp-soft:   #7dd3fc;
	--sp-growth:     #a855f7;   /* Growth accent (purple)   */
	--sp-growth-soft:#c084fc;
	--sp-gold:       #e7b84e;
	--sp-gold-soft:  #fcd97a;
	--sp-ink:        #04060f;
	--sp-ink-2:      #0a1326;
}

/* Hide the legacy scroll row/pickers — pet-hub.js still references them, so they
   stay in the DOM but must never surface now that the panel owns scrolls. */
#inv-hub-scroll-row,
#inv-hub-exp-scroll-picker,
#inv-hub-growth-scroll-picker { display: none !important; }

/* Retire the old floating Pet Status panel — the new stats view replaces it. Kept
   in the DOM (hidden) because pet-hub.js fills its #inv-hub-st-* IDs + affix rows
   that the stats view reads. */
.inv-pet-hub__stat-panel { display: none !important; }

/* The scroll panel (bottom bar) must sit above the centre Play door (z-index 15).
   Per Enes: this area's background should not be black — transparent, no blur,
   so the game scene shows through behind the framed panel. */
.inv-pet-hub__bottom-bar {
	z-index: 30;
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	border-top: none;
}

/* Desktop "Back to Site": drop it from the nav and use the top-left back button
   everywhere, like mobile. */
.inv-pet-hub__back-btn { display: flex; }
.inv-pet-hub__sec-btn--exit { display: none; }

/* Kill accidental double-tap / pinch zoom across the pet hub (tapping buttons
   was zooming the screen). Scrolling/panning still works. */
.inv-pet-hub { touch-action: pan-x pan-y; }

/* ── Panel shell ─────────────────────────────────────────────────────────── */
.inv-sp {
	position: relative;
	z-index: 30;                     /* above the centre Play door (z-index 15) */
	width: 100%;
	max-width: calc(100vw - 56px);   /* matches the top nav (secondary-wrap) cap; JS pins it exactly */
	margin: 2px auto 4px;
	box-sizing: border-box;
	font-family: Rajdhani, sans-serif;
	color: #e7e3d2;
	/* Ornate gold frame via the finished 9-slice. Thinner border-width = smaller
	   frame; `fill` paints the sprite's own navy interior across the content box
	   so there's no second mismatched navy rectangle — content sits centred. */
	border: clamp(9px, 1.6vw, 22px) solid transparent;
	border-image: url(../images/pet-hub/scroll/frame-9slice.png) 120 fill stretch;
	padding: clamp(1px, .3vw, 5px) clamp(3px, .6vw, 9px) clamp(2px, .4vw, 7px);
	box-shadow: 0 18px 50px rgba(0,0,0,.55);
}

/* ── Header: pet name + stage/level ──────────────────────────────────────── */
.inv-sp__head { position: relative; z-index: 4; display: flex; align-items: baseline;
	flex-wrap: wrap; gap: 2px 8px; padding: 0 2px 4px; }
.inv-sp__petname {
	font-weight: 800; font-size: clamp(.95rem, 1.9vw, 1.3rem);
	letter-spacing: .06em; text-transform: uppercase; line-height: 1;
	color: #fdf4d9; text-shadow: 0 0 14px rgba(231,184,78,.3);
}
.inv-sp__petsub {
	font-size: clamp(.56rem, 1.2vw, .7rem);
	font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #9aa0b8;
}

/* Pet LEVEL badge — gold + prominent so it never reads as "Level XP". */
.inv-sp__lvl {
	display: inline-flex; align-items: baseline; gap: 3px; flex-shrink: 0;
	padding: 2px 9px; border-radius: 8px; font-family: Rajdhani, sans-serif;
	background: linear-gradient(180deg, #fde68a, #e7b84e); color: #241803;
	box-shadow: 0 0 10px rgba(231,184,78,.45), inset 0 0 0 1px rgba(255,255,255,.35);
}
.inv-sp__lvl[hidden] { display: none; }
.inv-sp__lvl-k { font-size: .58rem; font-weight: 800; letter-spacing: .08em; opacity: .75; }
.inv-sp__lvl-n { font-size: clamp(.95rem, 1.8vw, 1.15rem); font-weight: 900; line-height: 1; }

/* minimize button (collapses the XP columns to a compact version) */
.inv-sp__min {
	margin-left: auto; align-self: center; flex-shrink: 0;
	width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 7px; cursor: pointer; color: #cdd4e8;
	background: rgba(255,255,255,.06); border: 1px solid rgba(231,184,78,.35);
	-webkit-tap-highlight-color: transparent;
	transition: background .14s, border-color .14s, color .14s;
}
.inv-sp__min:hover { background: rgba(231,184,78,.16); border-color: var(--sp-gold); color: #fff; }
.inv-sp__min-ico { position: relative; width: 12px; height: 12px; display: inline-block; }
.inv-sp__min-ico::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
	transform: translateY(-50%); background: currentColor; border-radius: 2px; }
.inv-sp__min-ico::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
	transform: translateX(-50%) scaleY(0); background: currentColor; border-radius: 2px; transition: transform .15s; }
.inv-sp.is-min .inv-sp__min-ico::after { transform: translateX(-50%) scaleY(1); }  /* becomes "+" when minimized */

/* minimized: compact XP rows — drop subtitles + toggles, shrink icon/padding/bar */
.inv-sp.is-min .inv-sp__col { padding: 5px 10px; }
.inv-sp.is-min .inv-sp__col-sub,
.inv-sp.is-min .inv-sp__toggle { display: none; }
.inv-sp.is-min .inv-sp__col-icon { width: clamp(20px, 4.5vw, 30px); height: clamp(20px, 4.5vw, 30px); }
.inv-sp.is-min .inv-sp__col-head { gap: 7px; }
.inv-sp.is-min .inv-sp__bar { height: 6px; margin-top: 4px; }

/* ── Two XP columns ──────────────────────────────────────────────────────── */
.inv-sp__cols {
	position: relative; z-index: 4;
	display: grid; grid-template-columns: 1fr 1fr; gap: clamp(5px, 1.4vw, 10px);
}

.inv-sp__col {
	position: relative;
	padding: clamp(4px, 1.2vw, 7px) clamp(7px, 2vw, 13px) clamp(4px, 1.1vw, 6px);
	border-radius: 11px;
	background: linear-gradient(180deg, rgba(10,16,38,.9), rgba(6,10,26,.92));
	box-shadow: inset 0 0 0 1.5px var(--col), 0 0 18px -2px var(--col-glow),
	            inset 0 0 24px -8px var(--col-glow);
}
.inv-sp__col--lxp    { --col: rgba(56,189,248,.8);  --col-glow: rgba(56,189,248,.5); }
.inv-sp__col--growth { --col: rgba(168,85,247,.8);  --col-glow: rgba(168,85,247,.5); }

.inv-sp__col-head { display: flex; align-items: center; gap: clamp(5px, 1.6vw, 9px); }
.inv-sp__col-icon {
	width: clamp(24px, 6vw, 44px); height: clamp(24px, 6vw, 44px);
	object-fit: contain; flex-shrink: 0;
	filter: drop-shadow(0 0 8px var(--col-glow));
}
.inv-sp__col-meta { flex: 1; min-width: 0; }
.inv-sp__col-title { display: flex; align-items: center; gap: 5px; }
.inv-sp__col-label {
	font-weight: 800; font-size: clamp(.64rem, 1.8vw, .92rem); letter-spacing: .03em;
	text-transform: uppercase; line-height: 1.05;
}
.inv-sp__col--lxp    .inv-sp__col-label { color: #bfe9ff; }
.inv-sp__col--growth .inv-sp__col-label { color: #e4ccff; }
.inv-sp__col-sub {
	display: block; margin-top: 2px; font-size: clamp(.54rem, 1vw, .66rem);
	font-weight: 600; letter-spacing: .04em; color: #8b93ad; text-transform: none;
}
.inv-sp__col-val {
	font-weight: 800; font-size: clamp(.78rem, 2.3vw, 1.25rem); letter-spacing: .02em;
	white-space: nowrap; flex-shrink: 0;
}
.inv-sp__col--lxp    .inv-sp__col-val { color: #e7f6ff; }
.inv-sp__col--growth .inv-sp__col-val { color: #fbe9a7; }

/* progress bar */
.inv-sp__bar {
	height: 8px; margin: 5px 0 0; border-radius: 6px;
	background: rgba(255,255,255,.07);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
	overflow: hidden;
}
.inv-sp__bar-fill {
	height: 100%; width: 0%; border-radius: 6px;
	transition: width .9s cubic-bezier(.22,1,.36,1);
}
.inv-sp__col--lxp .inv-sp__bar-fill {
	background: linear-gradient(90deg, #0ea5e9, #67e8f9);
	box-shadow: 0 0 10px rgba(56,189,248,.7);
}
.inv-sp__col--growth .inv-sp__bar-fill {
	background: linear-gradient(90deg, #7c3aed, #c084fc);
	box-shadow: 0 0 10px rgba(168,85,247,.7);
}

/* ── Info (i) button — identical everywhere ──────────────────────────────── */
.inv-sp__info {
	flex-shrink: 0; width: 18px; height: 18px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; cursor: pointer;
	font-family: Rajdhani, sans-serif; font-weight: 800; font-size: .72rem; line-height: 1;
	color: #cbd3ea; background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.28);
	transition: background .14s, border-color .14s, color .14s;
}
.inv-sp__info::before { content: "i"; font-style: italic; }
.inv-sp__info:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); color: #fff; }
.inv-sp__info.is-active { background: var(--sp-gold); border-color: var(--sp-gold-soft); color: #241803; }

/* ── "Tap to view" glow toggle ───────────────────────────────────────────── */
.inv-sp__toggle {
	position: relative; display: flex; align-items: center; gap: clamp(5px, 1.5vw, 8px); width: 100%;
	margin: 5px 0 0; padding: clamp(4px, 1vw, 5px) clamp(7px, 1.8vw, 11px); cursor: pointer;
	border-radius: 10px; border: 1px solid var(--col);
	background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
	font-family: Rajdhani, sans-serif; font-weight: 700; letter-spacing: .03em;
	color: #e9edfb; -webkit-tap-highlight-color: transparent;
	transition: background .15s, border-color .15s, box-shadow .15s;
	overflow: hidden;
}
.inv-sp__toggle::after {   /* the glow behind the button Vivian liked */
	content: ""; position: absolute; inset: 0; border-radius: 11px; opacity: .55;
	background: radial-gradient(120% 140% at 14% 50%, var(--col-glow) 0%, transparent 60%);
	pointer-events: none; transition: opacity .15s;
}
.inv-sp__toggle:hover { border-color: var(--col-glow); box-shadow: 0 0 18px -4px var(--col-glow); }
.inv-sp__toggle:hover::after { opacity: .85; }
.inv-sp__toggle-plus {
	position: relative; z-index: 1; flex-shrink: 0;
	width: clamp(18px, 4.5vw, 22px); height: clamp(18px, 4.5vw, 22px); display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; font-size: clamp(.9rem, 2.6vw, 1.05rem); font-weight: 700; line-height: 1;
	color: #fff; background: var(--col); box-shadow: 0 0 12px var(--col-glow);
}
.inv-sp__toggle-label { position: relative; z-index: 1; flex: 1; text-align: left; font-size: clamp(.66rem, 2vw, .8rem); line-height: 1.15; }
.inv-sp__toggle-chev  { position: relative; z-index: 1; font-size: 1rem; opacity: .85; transition: transform .2s; }
.inv-sp__toggle[aria-expanded="true"] .inv-sp__toggle-chev { transform: rotate(180deg); }

/* ── Accordion (scaffold — populated in stage b) ─────────────────────────── */
.inv-sp__acc {
	position: relative; z-index: 4; margin-top: 10px;
	border-radius: 12px; padding: 10px 11px;
	background: linear-gradient(180deg, rgba(8,12,28,.92), rgba(5,8,22,.95));
	box-shadow: inset 0 0 0 1px rgba(231,184,78,.18);
}
.inv-sp__acc[hidden] { display: none; }

/* ── Shared fixed info popover (one spot, identical everywhere) ──────────── */
.inv-sp__infobox {
	position: relative; z-index: 5; margin-top: 12px;
	border-radius: 12px; padding: 11px 14px 11px 40px;
	background: rgba(6,9,22,.96);
	box-shadow: inset 0 0 0 1px rgba(231,184,78,.3);
	font-family: Inter, sans-serif; font-size: .78rem; line-height: 1.5; color: #c6cbe0;
}
.inv-sp__infobox::before {
	content: "i"; font-family: Rajdhani, sans-serif; font-style: italic; font-weight: 800;
	position: absolute; left: 12px; top: 11px; width: 18px; height: 18px;
	display: flex; align-items: center; justify-content: center; border-radius: 50%;
	font-size: .72rem; color: #241803; background: var(--sp-gold);
}
.inv-sp__infobox[hidden] { display: none; }

/* =============================================================================
   Stage (b): accordion internals
   ========================================================================== */
.inv-sp__acc { animation: inv-sp-acc-in .22s ease; }
@keyframes inv-sp-acc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* header: scroll icon + title + description */
.inv-sp-acc__head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.inv-sp-acc__icon { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0;
	filter: drop-shadow(0 0 8px rgba(0,0,0,.5)); }
.inv-sp-acc__title { font-weight: 800; font-size: clamp(.9rem, 1.7vw, 1.15rem);
	letter-spacing: .05em; text-transform: uppercase; line-height: 1; }
.inv-sp-acc__title--exp    { color: #bfe9ff; }
.inv-sp-acc__title--growth { color: #e4ccff; }
.inv-sp-acc__desc { margin-top: 3px; font-family: Inter, sans-serif; font-size: .74rem;
	color: #8b93ad; font-weight: 500; }

/* visible close affordance (besides the toggle) */
.inv-sp-acc__close {
	margin-left: auto; align-self: flex-start; flex-shrink: 0;
	display: inline-flex; align-items: center; gap: 7px;
	padding: 7px 13px; border-radius: 9px; cursor: pointer;
	font-family: Rajdhani, sans-serif; font-weight: 700; font-size: .72rem;
	letter-spacing: .09em; text-transform: uppercase; color: #dbe0f0;
	background: rgba(255,255,255,.05); border: 1px solid rgba(231,184,78,.4);
	-webkit-tap-highlight-color: transparent;
	transition: background .14s, border-color .14s, color .14s, transform .1s;
}
.inv-sp-acc__close:hover  { background: rgba(231,184,78,.16); border-color: var(--sp-gold); color: #fff; }
.inv-sp-acc__close:active { transform: scale(.95); }
.inv-sp-acc__close-x { position: relative; width: 12px; height: 12px; flex-shrink: 0; }
.inv-sp-acc__close-x::before,
.inv-sp-acc__close-x::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 2px;
	background: currentColor; border-radius: 2px;
}
.inv-sp-acc__close-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.inv-sp-acc__close-x::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* rarity selector — 6 tiles, scroll on narrow, equal grid when it fits */
.inv-sp-acc__rarities {
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(72px, 1fr);
	gap: 6px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin;
}
@media (min-width: 620px) { .inv-sp-acc__rarities { grid-auto-flow: unset; grid-template-columns: repeat(6, 1fr); overflow: visible; } }

.inv-sp-rar {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 7px 5px 6px; cursor: pointer; border-radius: 10px;
	background: rgba(255,255,255,.03);
	border: 1px solid rgba(255,255,255,.08);
	transition: border-color .14s, background .14s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}
.inv-sp-rar:hover { background: rgba(255,255,255,.06); }
.inv-sp-rar:active { transform: scale(.96); }
.inv-sp-rar__ico { width: 28px; height: 28px; object-fit: contain; }
.inv-sp-rar__label { font-weight: 700; font-size: .64rem; letter-spacing: .03em; color: #aeb6cc; }
.inv-sp-rar__count {
	position: absolute; top: 5px; right: 6px; padding: 0 5px; border-radius: 7px;
	font-size: .58rem; font-weight: 800; color: #0a0e1a; background: #e7e3d2; line-height: 1.5;
}
.inv-sp-rar.is-empty  { opacity: .6; }
.inv-sp-rar.is-locked { opacity: .4; cursor: default; }
.inv-sp-rar__lock {
	position: absolute; top: 6px; right: 6px; width: 13px; height: 11px; border-radius: 2px;
	background: #9aa0b8; box-shadow: 0 -4px 0 -1px transparent, inset 0 0 0 10px #9aa0b8;
}
.inv-sp-rar__lock::before {
	content: ""; position: absolute; left: 50%; top: -5px; transform: translateX(-50%);
	width: 8px; height: 8px; border: 2px solid #9aa0b8; border-bottom: none;
	border-radius: 5px 5px 0 0;
}

/* selected tile glow + colour + caret pointing to the detail card */
.inv-sp-rar.is-selected { background: rgba(255,255,255,.07); }
.inv-sp-rar--common.is-selected    { border-color: #c7cdd6; box-shadow: 0 0 14px -3px #c7cdd6; }
.inv-sp-rar--uncommon.is-selected  { border-color: #4ade80; box-shadow: 0 0 14px -3px #4ade80; }
.inv-sp-rar--rare.is-selected      { border-color: #3b82f6; box-shadow: 0 0 14px -3px #3b82f6; }
.inv-sp-rar--epic.is-selected      { border-color: #a855f7; box-shadow: 0 0 14px -3px #a855f7; }
.inv-sp-rar--legendary.is-selected { border-color: #f59e0b; box-shadow: 0 0 14px -3px #f59e0b; }
.inv-sp-rar--mythical.is-selected  { border-color: #f43f5e; box-shadow: 0 0 14px -3px #f43f5e; }
.inv-sp-rar--common.is-selected    .inv-sp-rar__label { color: #e7edf5; }
.inv-sp-rar--uncommon.is-selected  .inv-sp-rar__label { color: #a7f3c6; }
.inv-sp-rar--rare.is-selected      .inv-sp-rar__label { color: #bcd4ff; }
.inv-sp-rar--epic.is-selected      .inv-sp-rar__label { color: #e0c8ff; }
.inv-sp-rar--legendary.is-selected .inv-sp-rar__label { color: #ffe3a3; }
.inv-sp-rar--mythical.is-selected  .inv-sp-rar__label { color: #ffc2d0; }
.inv-sp-rar.is-selected::after {
	content: ""; position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
	border: 7px solid transparent; border-top-color: currentColor; color: inherit; opacity: .9;
}
/* explicit "this one is selected" check badge (not on locked tiles) */
.inv-sp-rar.is-selected:not(.is-locked)::before {
	content: "\2713"; position: absolute; top: 3px; left: 4px; z-index: 3;
	width: 15px; height: 15px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-family: Rajdhani, sans-serif; font-size: 10px; font-weight: 900; line-height: 1;
	color: #0a0e1a; background: var(--sp-gold); box-shadow: 0 0 6px rgba(231,184,78,.6);
}

/* detail card */
.inv-sp-acc__detail { margin-top: 10px; }
.inv-sp-det {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	padding: 9px 12px; border-radius: 12px;
	background: linear-gradient(180deg, rgba(14,20,44,.85), rgba(7,11,26,.9));
	box-shadow: inset 0 0 0 1px rgba(231,184,78,.22);
}
.inv-sp-det__art { position: relative; flex-shrink: 0; width: clamp(62px, 10vw, 86px); }
.inv-sp-det__art img { width: 100%; height: auto; display: block;
	filter: drop-shadow(0 0 12px rgba(56,189,248,.35)); }
.inv-sp-det--growth .inv-sp-det__art img { filter: drop-shadow(0 0 12px rgba(168,85,247,.4)); }
.inv-sp-det__art img.is-locked { filter: grayscale(1) brightness(.6); }
.inv-sp-det__count {
	position: absolute; left: 4px; bottom: 2px; padding: 1px 8px; border-radius: 8px;
	font-weight: 800; font-size: .72rem; color: #e7f0ff; background: rgba(4,6,15,.9);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.inv-sp-det__lock {
	position: absolute; right: 8px; top: 8px; width: 18px; height: 15px; border-radius: 3px;
	background: #9aa0b8;
}
.inv-sp-det__lock::before { content: ""; position: absolute; left: 50%; top: -7px; transform: translateX(-50%);
	width: 11px; height: 11px; border: 2.5px solid #9aa0b8; border-bottom: none; border-radius: 6px 6px 0 0; }
.inv-sp-det__body { flex: 1; min-width: 130px; }
.inv-sp-det__name { font-weight: 800; font-size: clamp(.85rem, 1.7vw, 1.1rem);
	letter-spacing: .03em; color: #f3f6ff; }
.inv-sp-det__chip {
	display: inline-block; margin: 4px 0; padding: 2px 11px; border-radius: 20px;
	font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff;
}
.inv-sp-det__chip--common    { background: linear-gradient(180deg,#9aa2b2,#6b7384); }
.inv-sp-det__chip--uncommon  { background: linear-gradient(180deg,#34d399,#15803d); }
.inv-sp-det__chip--rare      { background: linear-gradient(180deg,#60a5fa,#1d4ed8); }
.inv-sp-det__chip--epic      { background: linear-gradient(180deg,#c084fc,#7c3aed); }
.inv-sp-det__chip--legendary { background: linear-gradient(180deg,#fbbf24,#d97706); color: #2a1a02; }
.inv-sp-det__chip--mythical  { background: linear-gradient(180deg,#fb7185,#be123c); }
.inv-sp-det__xp { font-weight: 800; font-size: clamp(.95rem, 2vw, 1.3rem); color: #fff; }
.inv-sp-det__meta { display: flex; align-items: baseline; flex-wrap: nowrap; gap: 0 8px; margin-top: 2px; min-width: 0; }
.inv-sp-det__sub { font-family: Inter, sans-serif; font-size: clamp(.54rem, 1.3vw, .68rem); color: #8b93ad;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.inv-sp-det__own { position: relative; flex-shrink: 0; font-family: Inter, sans-serif;
	font-size: clamp(.54rem, 1.3vw, .68rem); color: #9aa0b8; padding-left: 10px; white-space: nowrap; }
.inv-sp-det__own::before { content: "|"; position: absolute; left: 0; color: #4b5563; }
.inv-sp-det__own strong { color: #e7e3d2; font-weight: 800; }
.inv-sp-det__soon { margin-top: 5px; font-weight: 700; letter-spacing: .04em; color: #9aa0b8; }
.inv-sp-det__info { align-self: flex-start; }

.inv-sp-det__use {
	flex-shrink: 0; min-width: clamp(84px, 14vw, 132px); padding: 9px 16px;
	border: none; border-radius: 10px; cursor: pointer;
	font-family: Rajdhani, sans-serif; font-weight: 800; font-size: .95rem; letter-spacing: .06em;
	text-transform: uppercase; color: #06121f; transition: filter .15s, transform .1s;
}
.inv-sp-det__use--exp    { background: linear-gradient(180deg,#67e8f9,#0ea5e9); box-shadow: 0 6px 18px -6px #38bdf8; }
.inv-sp-det__use--growth { background: linear-gradient(180deg,#c084fc,#7c3aed); color: #fff; box-shadow: 0 6px 18px -6px #a855f7; }
.inv-sp-det__use:hover:not(:disabled) { filter: brightness(1.08); }
.inv-sp-det__use:active:not(:disabled) { transform: scale(.96); }
.inv-sp-det__use:disabled { opacity: .4; cursor: not-allowed; }

/* Result shown ON the Use button (no floating alert). */
.inv-sp-det__use.is-done {
	background: linear-gradient(180deg,#86efac,#16a34a) !important; color: #052e12 !important;
	box-shadow: 0 6px 18px -6px #22c55e, 0 0 0 1px rgba(34,197,94,.55);
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	animation: inv-sp-use-pop .62s ease both;
}
.inv-sp-det__use.is-fail {
	background: linear-gradient(180deg,#fca5a5,#dc2626) !important; color: #2a0606 !important;
	box-shadow: 0 6px 18px -6px #ef4444; animation: inv-sp-use-shake .4s ease both;
}
.inv-sp-use__check {
	width: 7px; height: 12px; border: solid currentColor; border-width: 0 3px 3px 0;
	transform: rotate(45deg); margin: -3px 2px 2px 0; animation: inv-sp-use-check .42s .12s ease both;
}
/* goes, comes back, settles */
@keyframes inv-sp-use-pop {
	0% { transform: scale(.9); }  28% { transform: scale(1.13); }
	48% { transform: scale(.97); } 70% { transform: scale(1.05); } 100% { transform: scale(1); }
}
@keyframes inv-sp-use-check { 0% { transform: rotate(45deg) scale(0); } 60% { transform: rotate(45deg) scale(1.3); } 100% { transform: rotate(45deg) scale(1); } }
@keyframes inv-sp-use-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
/* inline (non-floating) error note under the scroll detail */
.inv-sp-det__note {
	flex-basis: 100%; width: 100%; margin-top: 6px; text-align: center;
	font-family: Rajdhani, sans-serif; font-weight: 700; font-size: .78rem; color: #fecaca;
}
/* XP gain glow pulse as the bar fills */
.inv-sp__bar-fill.is-gain { animation: inv-sp-bar-gain .9s ease; }
@keyframes inv-sp-bar-gain { 0% { filter: brightness(2); } 100% { filter: brightness(1); } }
@media (prefers-reduced-motion: reduce) {
	.inv-sp-det__use.is-done, .inv-sp-det__use.is-fail, .inv-sp-use__check, .inv-sp__bar-fill.is-gain { animation: none; }
}

/* =============================================================================
   Move the floating Tutorial + Report-a-bug buttons up into the header so they
   stop covering the pet / scroll panel. Hub-only (this file loads only on the
   pet hub); loads after pet-hub.css so these win over the bottom-right floats.
   ========================================================================== */
/* Dock Tutorial + Report-a-bug INLINE in the top bar (no longer floating). JS
   moves them into .inv-pet-hub__topbar-right, next to the coins. */
body.page-template-page-pet-hub .inv-wiz-reopen-btn,
body.page-template-page-pet-hub .inv-bugbtn {
	position: static !important; inset: auto !important; margin: 0; z-index: auto;
}
.inv-pet-hub__topbar-right .inv-wiz-reopen-btn {
	flex-direction: row; align-items: center; gap: 4px;
	padding: 0; border: none; background: none; box-shadow: none;
}
.inv-pet-hub__topbar-right .inv-wiz-reopen-btn__q {
	width: 20px; height: 20px; font-size: .72rem; box-shadow: none; border-color: rgba(245,158,11,.4);
}
.inv-pet-hub__topbar-right .inv-wiz-reopen-btn__label { display: inline; font-size: .5rem; }
.inv-pet-hub__topbar-right .inv-bugbtn .inv-bugbtn__label { font-size: .6rem; }

/* Train stat picker: icon + per-stat colour (same norm as the stats view). */
.inv-hub-pqa__stat { display: inline-flex; align-items: center; gap: 6px; }
.inv-hub-pqa__stat-ico { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.inv-hub-pqa__stat--atk  { color: #f87171; border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.12); }
.inv-hub-pqa__stat--def  { color: #60a5fa; border-color: rgba(96,165,250,.5);  background: rgba(96,165,250,.12); }
.inv-hub-pqa__stat--mgc  { color: #c084fc; border-color: rgba(192,132,252,.5); background: rgba(192,132,252,.12); }
.inv-hub-pqa__stat--mdef { color: #a78bfa; border-color: rgba(167,139,250,.5); background: rgba(167,139,250,.12); }

/* Train stat picker centres on the dock (moved out of the right-aligned Train button). */
.inv-hub-pqa { position: relative; }

/* Feed / Train notice — gamer INLINE result card below the dock (not a floating toast). */
.inv-feed-notice {
	display: flex; align-items: center; gap: 11px;
	/* floats just ABOVE the Feed/Train dock, out of flow (no column height, no clip) */
	position: absolute; bottom: calc(100% + 8px); left: 0; right: 0;
	margin: 0 auto; width: max-content; min-width: 220px; max-width: min(360px, 90vw);
	padding: 9px 16px 9px 13px; border-radius: 12px;
	font-family: Rajdhani, sans-serif; z-index: 60; overflow: hidden; pointer-events: none;
	background: linear-gradient(180deg, rgba(17,21,36,.97), rgba(8,10,20,.98));
	border: 1px solid rgba(255,255,255,.07);
	box-shadow: 0 7px 22px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
}
.inv-feed-notice[hidden] { display: none; }
/* left accent bar per state */
.inv-feed-notice::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.inv-feed-notice.is-ok::before   { background: linear-gradient(180deg, #4ade80, #16a34a); box-shadow: 0 0 10px rgba(74,222,128,.75); }
.inv-feed-notice.is-wait::before { background: linear-gradient(180deg, #c084fc, #7c3aed); box-shadow: 0 0 10px rgba(168,85,247,.75); }
.inv-feed-notice.is-ok   { box-shadow: 0 7px 22px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(74,222,128,.42), 0 0 20px rgba(74,222,128,.2); }
.inv-feed-notice.is-wait { box-shadow: 0 7px 22px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(168,85,247,.42), 0 0 20px rgba(168,85,247,.2); }
.inv-feed-notice__icon { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 7px rgba(0,0,0,.5)); }
.inv-feed-notice.is-ok   .inv-feed-notice__icon { filter: drop-shadow(0 0 8px rgba(74,222,128,.55)); }
.inv-feed-notice.is-wait .inv-feed-notice__icon { filter: drop-shadow(0 0 8px rgba(168,85,247,.5)); }
.inv-feed-notice__txt { min-width: 0; }
.inv-feed-notice__title { font-weight: 800; font-size: .96rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
.inv-feed-notice.is-ok   .inv-feed-notice__title { color: #a7f3c6; text-shadow: 0 0 10px rgba(74,222,128,.45); }
.inv-feed-notice.is-wait .inv-feed-notice__title { color: #d8b4fe; text-shadow: 0 0 10px rgba(168,85,247,.4); }
.inv-feed-notice__sub { margin-top: 1px; font-family: Inter, sans-serif; font-size: .74rem; font-weight: 600; color: #c6cbe0;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* diagonal shine that sweeps across on reveal */
.inv-feed-notice__shine { position: absolute; top: 0; bottom: 0; left: 0; width: 55%; pointer-events: none;
	background: linear-gradient(105deg, transparent 18%, rgba(255,255,255,.26) 50%, transparent 82%);
	transform: translateX(-200%) skewX(-18deg); }
/* gamer slam-in: drop + overshoot + quick recoil shake, with shine sweep and an icon pop */
.inv-feed-notice.is-pop { animation: inv-feed-slam .52s cubic-bezier(.18,1.4,.4,1); }
.inv-feed-notice.is-pop .inv-feed-notice__shine { animation: inv-feed-shine .72s ease-out .08s; }
.inv-feed-notice.is-pop .inv-feed-notice__icon { animation: inv-feed-icon .62s cubic-bezier(.2,1.6,.4,1); }
@keyframes inv-feed-slam {
	0%   { opacity: 0; transform: translateY(-15px) scale(.82); }
	45%  { opacity: 1; transform: translateY(0) scale(1.05); }
	62%  { transform: translateX(-3px) scale(1.01); }
	78%  { transform: translateX(3px) scale(1); }
	100% { transform: none; }
}
@keyframes inv-feed-shine { 0% { transform: translateX(-200%) skewX(-18deg); } 100% { transform: translateX(340%) skewX(-18deg); } }
@keyframes inv-feed-icon { 0% { transform: scale(0) rotate(-30deg); } 55% { transform: scale(1.35) rotate(12deg); } 76% { transform: scale(.95) rotate(-4deg); } 100% { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) {
	.inv-feed-notice.is-pop,
	.inv-feed-notice.is-pop .inv-feed-notice__icon,
	.inv-feed-notice.is-pop .inv-feed-notice__shine { animation: none; }
	.inv-feed-notice__shine { display: none; }
}

/* =============================================================================
   Blacksmith marker — on DESKTOP, stack it vertically (icon above, label below)
   like the PLAY door, sitting over the forge fire instead of the top-left pill.
   Mobile keeps the original inline pill. Loads after pet-hub.css so it wins.
   (left/bottom below are tunable to centre it exactly on the fire.)
   ========================================================================== */
@media (min-width: 768px) {
	.inv-hub-forge-hotspot__label {
		top: auto; bottom: 18%; left: 72%; transform: translate(-50%, 0);
		display: flex; flex-direction: column; align-items: center; gap: 7px;
		background: none; border: none; border-radius: 0; padding: 0;
		font-size: .95rem; letter-spacing: .3em; text-shadow: none;
	}
	.inv-hub-forge-hotspot__icon {
		width: 52px; height: 52px;
		animation: inv-bs-breathe 2.8s ease-in-out infinite alternate;
	}
	/* identical chip to the PLAY door label: same bg, border, blur and glow */
	.inv-hub-forge-hotspot__text {
		font-weight: 900; color: #fde68a; padding: 3px 12px 2px; border-radius: 4px;
		background: #0a0600a6; border: 1px solid rgba(245,158,11,.5);
		-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
		text-shadow: 0 0 6px #fff, 0 0 14px rgba(245,158,11,1), 0 0 28px rgba(245,158,11,.5);
		transition: background .15s, border-color .2s, text-shadow .2s;
	}
	/* same hover as the PLAY door: brighter glow + border, icon lights up */
	.inv-hub-forge-hotspot:hover .inv-hub-forge-hotspot__text {
		border-color: #fde68acc;
		text-shadow: 0 0 8px #fff, 0 0 20px rgba(253,230,138,1), 0 0 40px rgba(245,158,11,.8);
	}
	.inv-hub-forge-hotspot:hover .inv-hub-forge-hotspot__icon {
		animation: none;
		filter: drop-shadow(0 0 10px rgba(253,230,138,1)) drop-shadow(0 0 28px rgba(245,158,11,.8));
	}
}
@keyframes inv-bs-breathe {
	0%   { filter: drop-shadow(0 0 9px rgba(245,158,11,.6))  drop-shadow(0 0 18px rgba(251,146,60,.3)); }
	100% { filter: drop-shadow(0 0 15px rgba(245,158,11,.9)) drop-shadow(0 0 30px rgba(251,146,60,.5)); }
}
@media (prefers-reduced-motion: reduce) { .inv-hub-forge-hotspot__icon { animation: none; } }
/* Why the Use button is closed. Owning none and owning plenty you cannot spend
   here are different things, and the panel used to show both as a 0. */
.inv-sp-det__block{grid-column:1/-1;margin-top:8px;padding:7px 10px;border-radius:8px;
	border:1px solid rgba(245,158,11,.3);background:rgba(245,158,11,.08);
	color:#fcd9a0;font-size:.72rem;line-height:1.45}
