/* EvrenselKO Power Up Store (store.html). Builds on styles.css: same variables, buttons, inputs, tabs, tables, FAQ. */

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Grids, fields and cards set their own display: keep [hidden] winning. */
.store [hidden],
.store-dialog [hidden] { display: none !important; }

.store { flex: 1; padding-bottom: clamp(72px, 10vw, 112px); }

/* ---- Hero ------------------------------------------------------------------------ */

.store-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 92px 0 18px; /* the fixed nav is 68px */
	background:
		radial-gradient(900px 300px at 50% 140%, rgba(231, 181, 94, 0.12), transparent 60%),
		radial-gradient(600px 300px at 8% 0%, rgba(224, 82, 74, 0.1), transparent 60%),
		radial-gradient(600px 300px at 92% 0%, rgba(74, 146, 255, 0.1), transparent 60%),
		linear-gradient(180deg, #05070c 0%, var(--bg) 100%);
}
/* Slim bar: title on the left, balance (or Log in) on the right. */
.store-hero__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
}
.store-hero__head { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.store-hero__head h1 {
	font: 700 clamp(26px, 3.2vw, 36px)/1.1 var(--display);
	letter-spacing: 0.01em;
	background: linear-gradient(180deg, #fff 0%, #e6e1d6 55%, #9c968a 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.store-hero__lead { max-width: 420px; color: var(--muted); font-size: 14.5px; }

/* Balance bar, its loading state and the logged-out bar share the glass look of .auth__card. */
.store-wallet {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 20px;
	padding: 10px 14px;
	border-radius: 14px;
	border: 1px solid rgba(231, 181, 94, 0.28);
	background:
		radial-gradient(420px 200px at 100% 0%, rgba(231, 181, 94, 0.12), transparent 70%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: var(--shadow), 0 0 0 1px rgba(231, 181, 94, 0.06);
	min-width: 0;
}
.store-wallet:focus { outline: none; }
.store-hero__inner > .store-wallet { margin-left: auto; } /* stays on the right when the bar wraps */
.store-wallet--loading { min-height: 48px; min-width: 220px; justify-content: center; }
.store-wallet--loading .loader { width: 24px; height: 24px; border-width: 2px; }
.store-wallet__amount { display: flex; align-items: center; gap: 8px; min-width: 0; }
.store-wallet__coin { width: 28px; height: 28px; flex: none; color: var(--gold); filter: drop-shadow(0 0 10px rgba(231, 181, 94, 0.45)); }
.store-balance {
	font: 700 clamp(22px, 3vw, 30px)/1 var(--display);
	font-variant-numeric: tabular-nums;
	background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	overflow-wrap: anywhere;
}
.store-wallet__unit { font: 600 15px/1 var(--display); color: var(--gold); }
.store-wallet__meta { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.store-wallet__who { color: var(--muted); font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.store-wallet__who b { color: var(--text); font-weight: 600; }
.store-premium {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: var(--gold-hi);
	background: rgba(231, 181, 94, 0.1);
	border: 1px solid rgba(231, 181, 94, 0.35);
}
.store-premium::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
/* One line per character whose clan has Clan Premium. */
.store-clan-premium { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; justify-items: start; }
.store-clan-premium li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: #ffb3ad;
	background: rgba(163, 35, 42, 0.14);
	border: 1px solid rgba(163, 35, 42, 0.5);
	overflow-wrap: anywhere;
}
.store-clan-premium li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #a3232a; box-shadow: 0 0 8px #a3232a; }
.store-wallet__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Login dialog */
.store-login__lead { margin: -8px 0 16px; color: var(--muted); font-size: 14.5px; }
.store-login__note { margin-top: 16px; color: var(--faint); font-size: 14px; }
.store-login__note a { color: var(--gold); }

/* ---- Sections ---------------------------------------------------------------------- */

.store-section { padding-top: clamp(48px, 7vw, 80px); }
.store-section--shop { padding-top: 18px; }
.store-section--steps { padding-top: 32px; }
.store-section__head { display: grid; gap: 10px; justify-items: center; text-align: center; margin-bottom: 28px; }
.store-section__lead { color: var(--muted); }
.store-h2 { font: 600 clamp(24px, 3.6vw, 34px)/1.15 var(--display); }

/* How it works */
.store-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.store-steps li {
	position: relative;
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 18px 20px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--surface);
}
.store-steps li + li::before {
	content: "";
	position: absolute;
	left: -17px;
	top: 50%;
	width: 9px;
	height: 9px;
	border-top: 1.6px solid var(--gold);
	border-right: 1.6px solid var(--gold);
	transform: translateY(-50%) rotate(45deg);
	opacity: 0.7;
}
.store-steps__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	color: var(--gold);
	background: rgba(231, 181, 94, 0.1);
	border: 1px solid rgba(231, 181, 94, 0.22);
}
.store-steps__icon svg { width: 22px; height: 22px; }
.store-steps h3 { font: 600 16px/1.3 var(--body); }
.store-steps p { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---- Shop ------------------------------------------------------------------------------ */

.store-bar { display: flex; margin-bottom: 20px; }
.store-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.store-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; padding: 4px; margin: -4px; }
.chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 16px 0 13px;
	border-radius: 999px;
	border: 1px solid var(--line-strong);
	background: var(--surface);
	color: var(--muted);
	font: 600 13.5px/1 var(--body);
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.chip:hover { color: var(--text); border-color: rgba(231, 181, 94, 0.45); }
.chip[aria-pressed="true"] { color: #1b1206; border-color: transparent; background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); }
/* Category colour dot (--dot is set per chip by store.js from a fixed palette). */
.chip::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--gold)); box-shadow: 0 0 6px var(--dot, var(--gold)); }
.chip[aria-pressed="true"]::before { box-shadow: 0 0 0 1.5px rgba(27, 18, 6, 0.75); }
.chip__count {
	min-width: 20px;
	padding: 2px 6px;
	border-radius: 999px;
	font: 700 11.5px/1.2 var(--body);
	text-align: center;
	color: var(--text);
	background: rgba(255, 255, 255, 0.08);
	font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip__count { color: #1b1206; background: rgba(27, 18, 6, 0.18); }
.store-search { position: relative; flex: 0 1 280px; min-width: 0; }
.store-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; color: var(--faint); pointer-events: none; }
.store-search .input { padding-left: 42px; }

.store-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	gap: 16px;
}

/* Featured strip ("Home Page" in the game PUS): larger cards above the toolbar. */
.store-featured { margin-bottom: 22px; }
.store-featured__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	font: 600 18px/1.2 var(--display);
	color: var(--gold-hi);
}
.store-featured__title::after { content: ""; flex: 1; max-width: 160px; height: 1px; background: linear-gradient(90deg, rgba(231, 181, 94, 0.6), transparent); }
.store-featured__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
	gap: 14px;
}
.store-card--featured { border-color: rgba(231, 181, 94, 0.5); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 10px 36px -16px rgba(231, 181, 94, 0.45); }
.store-card--featured .store-slot { width: 64px; height: 64px; }
.store-card--featured .store-slot svg { width: 34px; height: 34px; }
.store-card--featured .store-card__name { font-size: 17px; }
.store-card--featured .store-card__desc { -webkit-line-clamp: 2; line-clamp: 2; }
@media (min-width: 1100px) {
	.store-featured__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Premium tiers (premium category): one card per tier, then the Compare table. The accent per tier code is a
   fixed value here, never the colour from the database. */
.store-tiers { display: grid; gap: 14px; margin-bottom: 28px; }
.store-tiers__lead { color: var(--muted); font-size: 14.5px; }
.store-tiers__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 16px;
}
.store-tier {
	--accent: #e7b55e;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
	padding: 20px 18px 18px;
	border-radius: var(--radius);
	border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
	background:
		radial-gradient(320px 160px at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
		linear-gradient(180deg, #111622, #0b0f17);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), 0 10px 40px -14px color-mix(in srgb, var(--accent) 45%, transparent);
	text-align: center;
}
.store-tier--bronze { --accent: #cd7f32; }
.store-tier--gold { --accent: #e7b55e; }
.store-tier--platinum { --accent: #e5e4e2; }
.store-tier--clan { --accent: #a3232a; }
.store-tier img { width: 64px; height: 64px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6)); }
.store-tier__name { font: 600 19px/1.2 var(--display); color: var(--gold-hi); overflow-wrap: anywhere; }
.store-tier--clan .store-tier__name { color: #ffb3ad; }
.store-tier__days { color: var(--text); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.store-tier__perks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; width: 100%; text-align: left; font-size: 14px; color: var(--muted); }
.store-tier__perks li { position: relative; padding-left: 18px; line-height: 1.45; }
.store-tier__perks li::before { content: ""; position: absolute; left: 3px; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.store-tier__buy { display: grid; gap: 8px; width: 100%; margin-top: auto; padding-top: 10px; }
.store-tier .store-card__ingame { width: 100%; }
.store-tiers__compare-title { margin-top: 8px; font: 600 18px/1.2 var(--display); color: var(--gold-hi); }

/* Compare table (premium-compare.js; the guide has the same block in guide.css). */
.premium-compare-block { display: grid; gap: 10px; }
.premium-compare-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.premium-compare { min-width: 560px; }
.premium-compare tbody tr:first-child:not(:hover) { background: none; }
.premium-compare thead th { text-align: center; white-space: nowrap; vertical-align: bottom; }
.premium-compare__tier img { display: block; width: 28px; height: 28px; margin: 0 auto 6px; }
.premium-compare tbody th { padding: 12px 16px; text-align: left; font: 500 14px/1.35 var(--body); letter-spacing: 0; text-transform: none; color: var(--text); border-bottom: 1px solid rgba(255, 255, 255, 0.045); }
.premium-compare tbody tr:last-child th { border-bottom: 0; }
.premium-compare td.num { text-align: center; white-space: nowrap; }
.premium-compare__note { color: var(--muted); font-size: 13.5px; }

/* Dark framed panel like the in-game PUS. No overflow clip: the tooltip sits above the card (the ribbon has its own frame). */
.store-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	padding: 0 18px 18px;
	border-radius: var(--radius);
	border: 1px solid rgba(231, 181, 94, 0.16);
	background: linear-gradient(180deg, #111622, #0b0f17);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.store-card:hover,
.store-card:focus-within { z-index: 3; transform: translateY(-4px); border-color: rgba(231, 181, 94, 0.45); box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(231, 181, 94, 0.14); }
.store-card--premium {
	border-color: rgba(231, 181, 94, 0.55);
	background:
		radial-gradient(320px 160px at 0% 0%, rgba(231, 181, 94, 0.14), transparent 70%),
		linear-gradient(180deg, rgba(231, 181, 94, 0.07), rgba(255, 255, 255, 0.015));
	box-shadow: 0 0 0 1px rgba(231, 181, 94, 0.25), 0 10px 40px -12px rgba(231, 181, 94, 0.45);
}
.store-card--premium:hover,
.store-card--premium:focus-within { border-color: rgba(246, 213, 138, 0.8); box-shadow: 0 0 0 1px rgba(231, 181, 94, 0.4), 0 16px 48px -12px rgba(231, 181, 94, 0.6); }

/* Gold header strip with the name on a darker band, like the game PUS. Bleeds to the card edges. */
.store-card__head {
	min-width: 0;
	margin: 0 -18px 2px;
	padding: 10px 18px;
	border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
	border-bottom: 1px solid rgba(231, 181, 94, 0.45);
	background: linear-gradient(180deg, #2b2213, #15110a);
	box-shadow: inset 0 2px 0 rgba(246, 213, 138, 0.55), inset 0 -8px 16px rgba(0, 0, 0, 0.35);
}
.store-card--badged .store-card__head { padding-right: 52px; }
/* Slot (with the stack badge) next to the category and description. */
.store-card__body { display: flex; gap: 12px; align-items: center; min-width: 0; }
.store-card__art { position: relative; flex: none; display: block; }
.store-card__info { display: grid; gap: 4px; min-width: 0; }
.store-slot__count {
	position: absolute;
	right: -3px;
	bottom: -3px;
	padding: 1px 5px;
	border-radius: 4px;
	font: 700 11px/1.2 var(--body);
	color: #fff;
	background: rgba(0, 0, 0, 0.85);
	border: 1px solid rgba(231, 181, 94, 0.6);
	text-shadow: 0 1px 0 #000;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

/* Inventory slot: dark square with a gold edge, the 45x45 game icon (or the SVG glyph) in the middle. */
.store-slot {
	flex: none;
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border-radius: 4px;
	border: 1px solid rgba(231, 181, 94, 0.5);
	background: radial-gradient(circle at 50% 40%, #1d2230, #07090e 75%);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85), inset 0 0 12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.6);
	color: var(--gold);
	transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.store-slot img { display: block; width: 45px; height: 45px; image-rendering: auto; }
.store-slot svg { width: 28px; height: 28px; }
.store-card:hover .store-slot { border-color: rgba(246, 213, 138, 0.85); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85), inset 0 0 12px rgba(0, 0, 0, 0.8), 0 0 16px rgba(231, 181, 94, 0.35); }
.store-card--premium .store-slot { color: var(--gold-hi); border-color: rgba(246, 213, 138, 0.85); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85), inset 0 0 12px rgba(231, 181, 94, 0.18), 0 0 14px rgba(231, 181, 94, 0.3); }

.store-card__tag { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.store-card__tag::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--gold)); box-shadow: 0 0 6px var(--dot, var(--gold)); }
.store-card__name {
	font: 600 15px/1.25 var(--body);
	color: var(--gold-hi);
	text-shadow: 0 1px 0 #000;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}
.store-card__desc {
	min-height: 1.5em;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	overflow: hidden;
}
/* "Quantity" / "Price" lines, as in the game, above the Buy button. */
.store-card__stats { display: grid; gap: 4px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.store-card__stats div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; font-size: 13.5px; }
.store-card__stats dt { color: var(--muted); }
.store-card__stats dd { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.store-card__stats dd b { font-weight: 700; font-size: 1.15em; color: var(--gold-hi); }
.store-card > .btn { margin-top: 4px; }
.store-card__ingame {
	margin: auto 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--line);
	font-size: 12.5px;
	letter-spacing: 0.02em;
	text-align: center;
	color: var(--muted);
}
.store-card__stats + .store-card__ingame { margin-top: 6px; padding-top: 0; border-top: 0; }
.kc-tag {
	padding: 3px 7px;
	border-radius: 4px;
	font: 700 10px/1.2 var(--body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #1b1206;
	background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
}

/* In-game style item tooltip, above the card. Stays inside the card's width, so it never leaves the viewport. */
.store-tip {
	position: absolute;
	left: 10px;
	bottom: calc(100% + 8px);
	z-index: 4;
	width: min(260px, calc(100% - 20px));
	display: grid;
	gap: 4px;
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid rgba(231, 181, 94, 0.55);
	background: rgba(6, 8, 13, 0.97);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), 0 14px 32px -10px rgba(0, 0, 0, 0.9);
	font-size: 13px;
	line-height: 1.45;
	color: var(--muted);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}
.store-tip::after {
	content: "";
	position: absolute;
	left: 22px;
	top: 100%;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 1px solid rgba(231, 181, 94, 0.55);
	border-bottom: 1px solid rgba(231, 181, 94, 0.55);
	background: rgb(6, 8, 13);
	transform: rotate(45deg);
}
.store-card:focus-within .store-tip { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: hover) {
	.store-card:hover .store-tip { opacity: 1; visibility: visible; transform: none; transition-delay: 0.12s, 0.12s, 0s; }
}
.store-tip__name { font: 700 14px/1.3 var(--body); color: var(--gold-hi); overflow-wrap: anywhere; }
.store-tip__cat { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.store-tip__qty { color: var(--text); }
.store-tip__desc { overflow-wrap: anywhere; }
.store-tip__price { color: var(--gold); font-weight: 600; }

/* Diagonal corner ribbon (also used on the best-value pack). */
.store-card__frame {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
}
.store-card__ribbon {
	position: absolute;
	top: 20px;
	right: -38px;
	z-index: 1;
	width: 140px;
	padding: 5px 0;
	transform: rotate(45deg);
	text-align: center;
	font: 700 10px/1.2 var(--body);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text);
	background: rgba(255, 255, 255, 0.14);
	box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.6);
	pointer-events: none;
}
.store-card__ribbon--new { color: #052414; background: var(--ok); }
.store-card__ribbon--hot { color: #fff; background: linear-gradient(180deg, #ff6a5f, #b8302a); }
.store-card__ribbon--best { color: #1b1206; background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); }

/* Loading placeholders */
.store-card.is-skeleton {
	min-height: 250px;
	border-color: var(--line);
	background: linear-gradient(100deg, rgba(255, 255, 255, 0.03) 30%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.03) 70%) 0 0 / 300% 100%;
	animation: shimmer 1.4s ease-in-out infinite;
}
.store-card.is-skeleton:hover { transform: none; box-shadow: none; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.store-empty { display: grid; justify-items: center; gap: 14px; padding: 40px 16px; text-align: center; color: var(--muted); }

/* ---- Orders ------------------------------------------------------------------------------ */

.store-orders__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.store-table {
	margin-top: 18px;
	overflow-x: auto;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}
.store-table caption { padding: 14px 16px 4px; text-align: left; font: 600 15px/1.3 var(--body); color: var(--text); }
.store-table .table tbody tr:first-child { background: none; }
.store-table .table td { white-space: nowrap; }
.store-table .table td.who { white-space: normal; min-width: 120px; }
.store-table__note { color: var(--muted); text-align: center; white-space: normal !important; }

.order-status { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid; }
.order-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.order-status--pending { color: #f3c46b; border-color: rgba(243, 196, 107, 0.4); background: rgba(243, 196, 107, 0.08); }
.order-status--ok { color: var(--ok); border-color: rgba(76, 208, 138, 0.4); background: rgba(76, 208, 138, 0.08); }
.order-status--bad { color: #ff9d94; border-color: rgba(224, 82, 74, 0.45); background: rgba(224, 82, 74, 0.08); }
.order-status--muted,
.order-status--neutral { color: var(--muted); border-color: var(--line-strong); background: var(--surface); }

/* ---- Knight Cash packs ------------------------------------------------------------------------ */

.pack-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
	gap: 16px;
}
.pack {
	position: relative;
	overflow: hidden;
	display: grid;
	gap: 6px;
	justify-items: center;
	align-content: start;
	padding: 26px 20px 20px;
	text-align: center;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pack:hover,
.pack:focus-within { transform: translateY(-4px); border-color: rgba(231, 181, 94, 0.45); box-shadow: 0 18px 44px -22px rgba(231, 181, 94, 0.45); }
.pack--best { border-color: rgba(231, 181, 94, 0.55); box-shadow: 0 0 0 1px rgba(231, 181, 94, 0.2), 0 10px 40px -14px rgba(231, 181, 94, 0.45); }
.pack__label { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.pack__kc { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pack__kc svg { width: 28px; height: 28px; color: var(--gold); }
.pack__kc b { font: 700 32px/1 var(--display); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.pack__kc span { font: 600 15px/1 var(--display); color: var(--gold); }
.pack__bonus { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ok); background: rgba(76, 208, 138, 0.1); border: 1px solid rgba(76, 208, 138, 0.3); }
.pack__total { color: var(--faint); font-size: 13px; }
.pack__price { margin: 6px 0 8px; font: 700 20px/1.2 var(--body); color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- Dialogs ------------------------------------------------------------------------------ */

.store-dialog {
	width: min(460px, 100vw - 24px);
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	overflow: auto;
	padding: 24px clamp(18px, 5vw, 28px);
	border-radius: 20px;
	border: 1px solid var(--line-strong);
	background:
		radial-gradient(400px 200px at 100% 0%, rgba(231, 181, 94, 0.08), transparent 70%),
		linear-gradient(180deg, #121723, #0b0f18);
	color: var(--text);
	box-shadow: var(--shadow), 0 0 0 1px rgba(231, 181, 94, 0.06);
}
.store-dialog[open] { animation: dialog-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1); }
.store-dialog::backdrop { background: rgba(3, 5, 9, 0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

.store-dialog__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--muted);
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
}
.store-dialog__close:hover { color: var(--text); border-color: var(--line-strong); }
.store-dialog__close svg { width: 18px; height: 18px; }
.store-dialog__title { margin: 2px 48px 18px 0; font: 600 24px/1.2 var(--display); }

.dlg-item { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.dlg-item__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: var(--gold); background: rgba(231, 181, 94, 0.1); border: 1px solid rgba(231, 181, 94, 0.25); }
.dlg-item__icon svg { width: 26px; height: 26px; }
.dlg-item > div { display: grid; gap: 2px; min-width: 0; }
.dlg-item b { font-weight: 600; overflow-wrap: anywhere; }
.dlg-item span { color: var(--gold-hi); font-size: 14px; font-weight: 600; }

.dlg-sum { display: grid; gap: 8px; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.dlg-sum div { display: flex; justify-content: space-between; gap: 12px; }
.dlg-sum dt { color: var(--muted); font-size: 14px; }
.dlg-sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.dlg-sum dd b { color: var(--gold-hi); font-size: 18px; }
.dlg-sum .is-short { color: #ff9d94; }
.dlg-short { color: #ff9d94; font-size: 14px; }
.dlg-short a { color: var(--gold); font-weight: 600; }

.input.store-select,
.input.store-select:focus {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 42px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23e7b55e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px 8px;
}
.store-select:disabled { opacity: 0.55; cursor: not-allowed; }
.store-select option { background: #0b0f18; color: var(--text); }

.stepper {
	justify-self: start;
	display: inline-flex;
	border-radius: 12px;
	border: 1px solid var(--line-strong);
	background: rgba(0, 0, 0, 0.35);
	overflow: hidden;
}
.stepper button {
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	color: var(--text);
	font: 600 20px/1 var(--body);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.stepper button:hover { color: var(--gold-hi); background: rgba(231, 181, 94, 0.1); }
.stepper input {
	width: 56px;
	height: 44px;
	border: 0;
	border-inline: 1px solid var(--line);
	background: transparent;
	color: var(--text);
	text-align: center;
	font: 600 16px/1 var(--body);
	-moz-appearance: textfield;
	appearance: textfield;
}
.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* The stepper clips overflow: draw its focus ring inside. */
.stepper :focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: 0; }
.stepper input:focus { outline: none; background: rgba(231, 181, 94, 0.08); }

.alert--warn { color: #fbe3b5; background: rgba(243, 196, 107, 0.08); border-color: rgba(243, 196, 107, 0.38); }

.demo-ribbon {
	margin: 0 48px 16px 0;
	padding: 9px 12px;
	border-radius: 10px;
	text-align: center;
	font: 800 12.5px/1.3 var(--body);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #1b1206;
	background: repeating-linear-gradient(-45deg, #f6c65b 0 12px, #e5a536 12px 24px);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), 0 8px 24px -12px rgba(243, 196, 107, 0.7);
}
.demo-ribbon + .store-dialog__title { margin-right: 0; }

/* ---- Toasts ------------------------------------------------------------------------------ */

.toasts {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 120; /* above the nav (50) and the grain (100) */
	display: grid;
	gap: 10px;
	pointer-events: none;
}
.toast {
	pointer-events: auto;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 14px 10px 14px 16px;
	border-radius: 14px;
	border: 1px solid var(--line-strong);
	border-left: 3px solid var(--ok);
	background: rgba(13, 17, 26, 0.97);
	box-shadow: var(--shadow);
	font-size: 14.5px;
	line-height: 1.5;
	animation: toast-in 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast--error { border-left-color: var(--karus); }
.toast--info { border-left-color: var(--gold); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
.toast__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast__close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.toast__close:hover { color: var(--text); background: var(--surface-2); }
.toast__close svg { width: 16px; height: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---- Responsive ------------------------------------------------------------------------------ */

@media (max-width: 860px) {
	.store-hero__inner { flex-direction: column; align-items: stretch; }
	.store-hero__head { justify-items: center; text-align: center; }
	.store-hero__lead { margin-inline: auto; }
	.store-hero__inner > .store-wallet { margin-left: 0; justify-content: center; text-align: center; }
	.store-wallet__meta { justify-items: center; }
	.store-wallet__actions { justify-content: center; }
}

@media (max-width: 640px) {
	.store-hero__lead { display: none; }
	.store-steps { grid-template-columns: 1fr; gap: 10px; }
	.store-steps li + li::before { display: none; }
	.store-toolbar { flex-direction: column; align-items: stretch; min-width: 0; max-width: 100%; }
	/* max-width keeps the sideways-scrolling chip row (and the search under it) at the screen width
	   instead of the row's full content width, which widened the whole page on phones. */
	.store-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
	.store-chips::-webkit-scrollbar { display: none; }
	.store-search { flex: none; }
}

@media (max-width: 560px) {
	.store-hero { padding: 84px 0 14px; }
	.store-wallet__actions { width: 100%; }
	.store-wallet__actions .btn { flex: 1 1 auto; justify-content: center; }
	.btn.btn--small { height: 40px; }
	/* No tooltip on small screens. */
	.store-tip { display: none; }

	/* Compact 2-column cards: icon, name, quantity, price, Buy. */
	.store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.store-card { gap: 6px; padding: 0 10px 10px; }
	.store-card__head { margin: 0 -10px 2px; padding: 8px 10px; }
	.store-card--badged .store-card__head { padding-right: 34px; }
	.store-card__name { font-size: 13.5px; }
	.store-card__body { gap: 8px; }
	.store-card__desc { display: none; }
	.store-card__tag { font-size: 10px; letter-spacing: 0.06em; }
	.store-slot { width: 48px; height: 48px; }
	.store-card__stats { padding-top: 6px; gap: 2px; }
	.store-card__stats div { font-size: 12.5px; }
	.store-card .btn.btn--small { height: 36px; }
	.store-card__ribbon { top: 12px; right: -32px; width: 110px; padding: 4px 0; font-size: 9px; }
	.store-card.is-skeleton { min-height: 180px; }

	/* Featured: one row that scrolls sideways. The padding keeps focus rings visible. min-width 0 stops
	   the row from growing to its content width (and widening the page) inside its grid/flex parents. */
	.store-featured { min-width: 0; max-width: 100%; }
	.store-featured__grid {
		min-width: 0;
		max-width: 100%;
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(150px, 46%);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		padding: 4px;
		margin: -4px;
		scrollbar-width: none;
	}
	.store-featured__grid::-webkit-scrollbar { display: none; }
	.store-featured__grid > .store-card { scroll-snap-align: start; }
	.store-card--featured .store-slot { width: 56px; height: 56px; }
	.store-card--featured .store-card__name { font-size: 14.5px; }

	/* Packs two per row. */
	.pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.pack { padding: 18px 10px 12px; }
	.pack__kc svg { width: 22px; height: 22px; }
	.pack__kc b { font-size: 24px; }
	.pack__price { font-size: 17px; }
}

@media (min-width: 561px) {
	.toasts { left: auto; width: min(420px, 100vw - 32px); }
}

@media (prefers-reduced-motion: reduce) {
	.store-card:hover,
	.store-card:focus-within,
	.pack:hover,
	.pack:focus-within,
	.store-tip { transform: none; }
	.store-tip { transition: none; }
	.store-featured__grid { scroll-behavior: auto; }
	.store-card.is-skeleton,
	.store-dialog[open],
	.toast { animation: none; }
}
