/* ==========================================================================
   store.css — shared styles: coin store, game overlay, home page buttons
   Look: dark background, gold accents, card grid
   ========================================================================== */

:root {
	--ink: #0a0512;
	--ink-2: #140b23;
	--card: #1c1130;
	--card-2: #241645;
	--line: rgba(255, 255, 255, .10);
	--line-2: rgba(255, 255, 255, .18);
	--gold: #f1c730;
	--gold-2: #ffb020;
	--gold-deep: #8a5a00;
	--text: #f4f0ff;
	--muted: #a89ec6;
	--ok: #35d07f;
	--danger: #ff5d6c;
	--radius: 16px;
	--shadow: 0 18px 44px rgba(0, 0, 0, .45);
}

/* Shared page background */
body.store-body,
body.game-body {
	background: var(--ink);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	margin: 0;
}

body.store-body a {
	color: inherit;
	text-decoration: none;
}

/* -------------------------------------------------------------- NAVBAR ---- */
.store-nav {
	position: sticky;
	top: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 12px 22px;
	background: rgba(10, 5, 18, .86);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}

.store-nav .brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-size: 15px;
}

.store-nav .brand img {
	width: 34px;
	height: 34px;
	object-fit: contain;
}

.store-nav .brand small {
	display: block;
	font-weight: 500;
	font-size: 11px;
	color: var(--muted);
	letter-spacing: .12em;
}

.store-nav .nav-links {
	display: flex;
	align-items: center;
	gap: 18px;
	font-size: 14px;
	color: var(--muted);
}

.store-nav .nav-links a:hover {
	color: var(--gold);
}

/* 导航与页脚里的链接统一外观（landing-body 没有 body.store-body 的 a 规则，
   否则标题会被浏览器画成蓝紫色带下划线） */
.store-nav a,
.landing-foot a,
.store-foot a,
.back-home {
	text-decoration: none;
}

.store-nav a {
	color: inherit;
}

.store-nav .brand {
	color: var(--text);
}

.wallet {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	background: linear-gradient(180deg, rgba(241, 199, 48, .16), rgba(241, 199, 48, .05));
	border: 1px solid rgba(241, 199, 48, .35);
	color: var(--gold);
	font-family: inherit;
	font-weight: 700;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

button.wallet:hover {
	background: linear-gradient(180deg, rgba(241, 199, 48, .28), rgba(241, 199, 48, .1));
	border-color: rgba(241, 199, 48, .6);
}

/* Privacy link that used to sit next to the balance */
.nav-privacy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
}

.nav-privacy:hover {
	color: var(--gold);
	border-color: rgba(241, 199, 48, .5);
	background: rgba(241, 199, 48, .08);
}

.nav-privacy svg {
	width: 15px;
	height: 15px;
	flex: none;
}

/* ------------------------------------------------ NAVBAR ACCOUNT ------- */
.nav-account-slot {
	display: inline-flex;
	align-items: center;
}

.nav-account {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 13px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	background: rgba(255, 255, 255, .05);
	color: var(--text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.nav-account svg {
	width: 15px;
	height: 15px;
	flex: none;
}

.nav-account-in:hover {
	color: var(--gold);
	border-color: rgba(241, 199, 48, .55);
	background: rgba(241, 199, 48, .10);
}

.nav-account-on {
	color: var(--gold);
	border-color: rgba(241, 199, 48, .45);
	background: linear-gradient(180deg, rgba(241, 199, 48, .16), rgba(241, 199, 48, .05));
}

.nav-account-on:hover {
	border-color: rgba(241, 199, 48, .75);
}

.auth-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: none;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 800;
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe27a, var(--gold-2));
}

.auth-avatar-lg {
	width: 64px;
	height: 64px;
	margin: 2px auto 14px;
	font-size: 26px;
	box-shadow: 0 10px 24px rgba(241, 199, 48, .28);
}

.auth-avatar-empty {
	color: var(--muted);
	background: rgba(255, 255, 255, .08);
	box-shadow: none;
}

.auth-avatar-empty svg {
	width: 32px;
	height: 32px;
}

.na-email {
	max-width: 148px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Email input inside the sign-in dialog */
.auth-field {
	display: block;
	text-align: left;
	margin: 4px 0 0;
}

.auth-field > span {
	display: block;
	margin-bottom: 7px;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--muted);
}

.auth-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid var(--line-2);
	background: rgba(0, 0, 0, .38);
	color: #fff;
	font-family: inherit;
	font-size: 16px; /* 16px+ stops iOS from zooming on focus */
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-field input::placeholder {
	color: rgba(168, 158, 198, .55);
}

.auth-field input:focus {
	border-color: rgba(241, 199, 48, .75);
	box-shadow: 0 0 0 3px rgba(241, 199, 48, .16);
}

.auth-field input.is-invalid {
	border-color: var(--danger);
	box-shadow: 0 0 0 3px rgba(255, 93, 108, .16);
}

.auth-error {
	min-height: 18px;
	margin: 8px 0 14px;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	color: var(--danger);
}

.nav-links a.is-current {
	color: var(--gold);
}

.wallet .coin {
	width: 18px;
	height: 18px;
	flex: none;
}

/* "Play" button inside the hero */
.hero-play {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-top: 20px;
	padding: 13px 26px;
	border: 0;
	border-radius: 999px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: .03em;
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe680, var(--gold-2));
	box-shadow: 0 14px 30px rgba(241, 199, 48, .36);
	cursor: pointer;
	transition: transform .15s ease, filter .15s ease;
}

.hero-play:hover {
	transform: translateY(-2px);
	filter: brightness(1.06);
}

.hero-play svg {
	width: 19px;
	height: 19px;
}

/* Game entry button in the navbar */
.nav-play {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 15px;
	border: 0;
	border-radius: 999px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .02em;
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe27a, var(--gold-2));
	box-shadow: 0 8px 20px rgba(241, 199, 48, .28);
	cursor: pointer;
}

.nav-play:hover {
	filter: brightness(1.06);
}

.nav-play svg {
	width: 14px;
	height: 14px;
}

/* -------------------------------------------------------------- LAYOUT ---- */
.store-wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 18px;
}

.store-hero {
	position: relative;
	overflow: hidden;
	margin: 26px 0 8px;
	padding: 30px 26px;
	border-radius: 22px;
	border: 1px solid var(--line);
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(241, 199, 48, .20), transparent 55%),
		linear-gradient(160deg, var(--card-2), var(--ink-2));
	box-shadow: var(--shadow);
}

.store-hero h1 {
	margin: 0 0 8px;
	font-size: 30px;
	line-height: 1.2;
	letter-spacing: -.01em;
}

.store-hero h1 em {
	font-style: normal;
	color: var(--gold);
}

.store-hero p {
	margin: 0;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.65;
	max-width: 62ch;
}

.store-hero .hero-chips {
	margin-top: 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	background: rgba(255, 255, 255, .04);
	font-size: 13px;
	color: var(--text);
}

.chip b {
	color: var(--gold);
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 34px 0 16px;
}

.section-head h2 {
	margin: 0;
	font-size: 20px;
	letter-spacing: .01em;
}

.section-head span {
	color: var(--muted);
	font-size: 13px;
}

/* --------------------------------------------------------- PRODUCT GRID ---- */
.product-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 22px 16px 18px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: linear-gradient(180deg, var(--card-2), var(--card));
	color: var(--text);
	cursor: pointer;
	transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
	-webkit-tap-highlight-color: transparent;
}

.product-card:hover,
.product-card:focus-visible {
	transform: translateY(-4px);
	border-color: rgba(241, 199, 48, .55);
	box-shadow: 0 16px 34px rgba(0, 0, 0, .48), 0 0 0 1px rgba(241, 199, 48, .18) inset;
	outline: none;
}

.product-card.is-featured {
	border-color: rgba(241, 199, 48, .5);
	background:
		radial-gradient(120% 100% at 50% 0%, rgba(241, 199, 48, .16), transparent 60%),
		linear-gradient(180deg, var(--card-2), var(--card));
}

.product-card .tag {
	position: absolute;
	top: -11px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .1em;
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe27a, var(--gold-2));
	box-shadow: 0 6px 16px rgba(241, 199, 48, .35);
}

.product-card .coin-big {
	width: 66px;
	height: 66px;
	margin-bottom: 10px;
	filter: drop-shadow(0 8px 14px rgba(241, 199, 48, .28));
}

.product-card .coins {
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -.01em;
	font-variant-numeric: tabular-nums;
}

.product-card .coins-sub {
	margin-top: 4px;
	min-height: 18px;
	font-size: 12px;
	color: var(--ok);
	font-weight: 700;
}

.product-card .product-name {
	margin-top: 8px;
	font-size: 12px;
	color: var(--muted);
	letter-spacing: .06em;
	text-transform: uppercase;
}

.product-card .price {
	margin-top: 14px;
	width: 100%;
	padding: 11px 0;
	border-radius: 11px;
	font-size: 16px;
	font-weight: 800;
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe27a, var(--gold-2));
	box-shadow: 0 8px 20px rgba(241, 199, 48, .28);
}

.product-card .price small {
	display: block;
	margin-top: 1px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	opacity: .72;
}

/* ------------------------------------------------------ PAYMENT ROW ---- */
.pay-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 16px 18px;
	margin-top: 16px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, .03);
}

.pay-row .pay-label {
	font-size: 13px;
	color: var(--muted);
	margin-right: 4px;
}

.pay-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border-radius: 11px;
	border: 1px solid var(--line-2);
	background: rgba(255, 255, 255, .04);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.pay-pill.is-on {
	border-color: rgba(241, 199, 48, .7);
	background: rgba(241, 199, 48, .12);
	color: var(--gold);
}

/* -------------------------------------------------------- INFO CARDS ---- */
.info-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 40px;
}

.info-card {
	padding: 18px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, .03);
	font-size: 14px;
	color: var(--muted);
	line-height: 1.7;
}

.info-card b {
	display: block;
	margin-bottom: 6px;
	color: var(--text);
	font-size: 15px;
}

.info-card .step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-right: 8px;
	border-radius: 50%;
	background: rgba(241, 199, 48, .16);
	color: var(--gold);
	font-size: 12px;
	font-weight: 800;
}

.download-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin-bottom: 46px;
}

.download-row img {
	width: 150px;
	border-radius: 10px;
	border: 1px solid var(--line);
}

.store-foot {
	padding: 26px 18px 44px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 13px;
	text-align: center;
	line-height: 1.9;
}

.store-foot a {
	color: var(--gold);
}

/* ============================================== MODALS (CONFIRM) ======== */
.modal-mask {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(4, 2, 9, .74);
	backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .18s ease, visibility .18s ease;
}

.modal-mask.is-open {
	opacity: 1;
	visibility: visible;
}

.modal-box {
	position: relative;
	width: 100%;
	max-width: 400px;
	max-height: 92vh;
	overflow: auto;
	padding: 26px 22px 22px;
	border-radius: 20px;
	border: 1px solid var(--line-2);
	background: linear-gradient(180deg, var(--card-2), var(--ink-2));
	box-shadow: var(--shadow);
	transform: translateY(14px) scale(.97);
	transition: transform .2s cubic-bezier(.2, .9, .3, 1.2);
	text-align: center;
}

.modal-mask.is-open .modal-box {
	transform: translateY(0) scale(1);
}

.modal-box .x-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .07);
	color: var(--muted);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
}

.modal-box .x-close:hover {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

.modal-box h3 {
	margin: 0 0 6px;
	font-size: 19px;
}

.modal-box .sub {
	margin: 0 0 18px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.6;
}

.modal-box .coin-big {
	width: 78px;
	height: 78px;
	margin: 4px auto 10px;
	filter: drop-shadow(0 10px 18px rgba(241, 199, 48, .3));
}

.summary {
	margin: 18px 0;
	border-radius: 14px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, .04);
	overflow: hidden;
	text-align: left;
	font-size: 14px;
}

.summary .row-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 15px;
	border-bottom: 1px solid var(--line);
}

.summary .row-line:last-child {
	border-bottom: 0;
}

.summary .row-line span {
	color: var(--muted);
}

.summary .row-line b {
	font-variant-numeric: tabular-nums;
}

.summary .row-line.total {
	background: rgba(241, 199, 48, .08);
	font-size: 16px;
}

.summary .row-line.total b {
	color: var(--gold);
	font-size: 20px;
}

.summary .row-line .gain {
	color: var(--ok);
}

.btn-gold,
.btn-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px 18px;
	border-radius: 13px;
	border: 0;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	font-family: inherit;
}

.btn-gold {
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe27a, var(--gold-2));
	box-shadow: 0 12px 26px rgba(241, 199, 48, .3);
}

.btn-gold:hover {
	filter: brightness(1.06);
}

.btn-gold[disabled] {
	opacity: .6;
	cursor: default;
}

.btn-ghost {
	margin-top: 10px;
	color: var(--muted);
	background: transparent;
	border: 1px solid var(--line-2);
	font-size: 14px;
	font-weight: 600;
}

.btn-ghost:hover {
	color: #fff;
	border-color: var(--line-2);
	background: rgba(255, 255, 255, .05);
}

.modal-note {
	margin: 14px 0 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.6;
}

/* Processing */
.spinner {
	width: 54px;
	height: 54px;
	margin: 12px auto 16px;
	border-radius: 50%;
	border: 4px solid rgba(241, 199, 48, .2);
	border-top-color: var(--gold);
	animation: spin .8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Success tick */
.tick {
	width: 74px;
	height: 74px;
	margin: 6px auto 14px;
	border-radius: 50%;
	background: rgba(53, 208, 127, .14);
	border: 2px solid rgba(53, 208, 127, .5);
	display: flex;
	align-items: center;
	justify-content: center;
}

.tick svg {
	width: 38px;
	height: 38px;
	stroke: var(--ok);
	stroke-width: 3.2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: draw .42s .1s ease forwards;
}

@keyframes draw {
	to {
		stroke-dashoffset: 0;
	}
}

.fail-icon {
	width: 74px;
	height: 74px;
	margin: 6px auto 14px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	font-weight: 800;
	color: var(--danger);
	background: rgba(255, 93, 108, .12);
	border: 2px solid rgba(255, 93, 108, .45);
}

/* Reward toast: floats above the dialog so it does not cover it */
.reward-pop {
	position: fixed;
	left: 50%;
	top: 12vh;
	z-index: 300;
	transform: translate(-50%, 0);
	padding: 12px 22px;
	border-radius: 999px;
	font-size: 18px;
	font-weight: 800;
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe27a, var(--gold-2));
	box-shadow: 0 16px 34px rgba(0, 0, 0, .4);
	pointer-events: none;
	animation: floatUp 1.5s ease forwards;
}

@keyframes floatUp {
	0% { opacity: 0; transform: translate(-50%, 14px) scale(.9); }
	22% { opacity: 1; transform: translate(-50%, 0) scale(1); }
	75% { opacity: 1; }
	100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}

/* ========================================== HOME BUTTONS + GAME OVERLAY == */
.home-cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
	margin: 6px auto 22px;
	padding: 0 16px;
	max-width: 720px;
}

.cta-btn {
	position: relative;
	flex: 1 1 240px;
	max-width: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 17px 24px;
	border: 0;
	border-radius: 999px;
	font-family: inherit;
	font-size: 19px;
	font-weight: 800;
	letter-spacing: .04em;
	cursor: pointer;
	transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
	-webkit-tap-highlight-color: transparent;
}

.cta-btn svg {
	width: 24px;
	height: 24px;
	flex: none;
}

.cta-btn:hover {
	transform: translateY(-3px);
}

.cta-btn:active {
	transform: translateY(0) scale(.985);
}

/* Play - gold primary button with a pulsing ring */
.cta-play {
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe680, var(--gold-2));
	box-shadow: 0 14px 30px rgba(241, 199, 48, .38), 0 0 0 0 rgba(241, 199, 48, .55);
	animation: ctaPulse 2.4s ease-out infinite;
}

@keyframes ctaPulse {
	0% { box-shadow: 0 14px 30px rgba(241, 199, 48, .38), 0 0 0 0 rgba(241, 199, 48, .55); }
	70% { box-shadow: 0 14px 30px rgba(241, 199, 48, .38), 0 0 0 18px rgba(241, 199, 48, 0); }
	100% { box-shadow: 0 14px 30px rgba(241, 199, 48, .38), 0 0 0 0 rgba(241, 199, 48, 0); }
}

/* Recharge - outlined secondary button with a badge */
.cta-recharge {
	color: var(--gold);
	background: rgba(12, 6, 22, .66);
	border: 2px solid rgba(241, 199, 48, .6);
	box-shadow: 0 12px 26px rgba(0, 0, 0, .35);
	backdrop-filter: blur(4px);
}

.cta-recharge .badge-off {
	position: absolute;
	top: -10px;
	right: 10px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .06em;
	color: #2a1a00;
	background: linear-gradient(180deg, #ffe27a, var(--gold-2));
	box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}


/* =========================================== GAME ENTRY PAGE (8.png) ==== */
body.landing-body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background:
		radial-gradient(90% 60% at 50% 0%, #241645 0%, transparent 65%),
		#140b23;
	overflow-x: hidden;
}

.landing-nav {
	position: relative;
	flex: none;
}

/* Artwork area: always fills the viewport height. 8.png is scaled with cover, so
      on narrow screens the sides crop while the logo and button stay visible. */
.landing {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	min-height: 66vh;
	overflow: hidden;
	background: #2a1140;
}

.landing-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 42%; /* nudge up so the logo and grass both stay in frame */
	user-select: none;
	pointer-events: none;
}

/* Slight darkening at the bottom so the translucent button stays readable */
.landing::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 30%;
	background: linear-gradient(180deg, rgba(20, 6, 40, 0) 0%, rgba(20, 6, 40, .26) 55%, rgba(20, 6, 40, .46) 100%);
	pointer-events: none;
}

/* Translucent "Start game" button below the logo */
.landing-start {
	position: absolute;
	left: 50%;
	top: 78%;
	z-index: 2;
	transform: translate(-50%, -50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-width: 360px;
	padding: 16px 56px;
	border: 2px solid rgba(255, 255, 255, .78);
	border-radius: 999px;
	color: #fff;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: .1em;
	text-shadow: 0 2px 10px rgba(40, 10, 0, .7);
	background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, .10));
	backdrop-filter: blur(5px) saturate(1.25);
	-webkit-backdrop-filter: blur(5px) saturate(1.25);
	box-shadow: 0 14px 34px rgba(20, 0, 40, .35), 0 0 0 5px rgba(255, 255, 255, .10);
	cursor: pointer;
	transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
	-webkit-tap-highlight-color: transparent;
	animation: startPulse 2.6s ease-out infinite;
}

@keyframes startPulse {
	0% { box-shadow: 0 16px 38px rgba(20, 0, 40, .30), 0 0 0 0 rgba(255, 255, 255, .45); }
	70% { box-shadow: 0 16px 38px rgba(20, 0, 40, .30), 0 0 0 20px rgba(255, 255, 255, 0); }
	100% { box-shadow: 0 16px 38px rgba(20, 0, 40, .30), 0 0 0 0 rgba(255, 255, 255, 0); }
}

.landing-start:hover {
	transform: translate(-50%, -50%) scale(1.045);
	background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .16));
}

.landing-start:active {
	transform: translate(-50%, -50%) scale(.985);
}

.landing-start svg {
	width: 26px;
	height: 26px;
	flex: none;
}

/* Footer */
.landing-foot {
	flex: none;
	padding: 14px 18px 20px;
	background: #140b23;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 12px;
	text-align: center;
	line-height: 1.9;
}

.landing-foot a {
	color: var(--gold);
}

/* Filler for narrow screens only; desktop artwork already fills the height */
.landing-fill {
	display: none;
}

/* Loading overlay shown while entering the game */
.loading-mask {
	position: fixed;
	inset: 0;
	z-index: 500;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(60% 50% at 50% 40%, #2a1140, #0a0512 70%);
	opacity: 0;
	visibility: hidden;
	transition: opacity .22s ease, visibility .22s ease;
}

.loading-mask.is-open {
	opacity: 1;
	visibility: visible;
}

.loading-inner {
	text-align: center;
	padding: 0 20px;
}

.loading-coin {
	width: 74px;
	height: 74px;
	margin: 0 auto 18px;
	animation: coinSpin 1.6s linear infinite;
	filter: drop-shadow(0 10px 20px rgba(241, 199, 48, .35));
}

.loading-coin svg {
	width: 100%;
	height: 100%;
}

@keyframes coinSpin {
	0% { transform: rotateY(0deg); }
	100% { transform: rotateY(360deg); }
}

.loading-text {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: .06em;
	color: #fff;
}

.loading-bar {
	width: min(260px, 70vw);
	height: 6px;
	margin: 16px auto 12px;
	border-radius: 999px;
	overflow: hidden;
	background: rgba(255, 255, 255, .12);
}

.loading-bar i {
	display: block;
	width: 40%;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
	animation: barRun 1.2s ease-in-out infinite;
}

@keyframes barRun {
	0% { transform: translateX(-110%); }
	100% { transform: translateX(280%); }
}

.loading-hint {
	font-size: 12px;
	color: var(--muted);
}

@media (max-width: 600px) {
	/* 手机上主图不再"整幅铺开"：竖版截图按原比例排下来有 800 多 px 高，
	   加上导航和页脚必须滚动才能看到"Start game"。这里改成和桌面同一套
	   "铺满 + 裁切"，让导航 + 主图 + 按钮 + 页脚正好一屏。 */
	.landing {
		flex: 1 1 auto;
		min-height: 52vh;
		background: #2a1140;
	}
	.landing-bg {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		/* 焦点偏上：留下顶部的目标/步数栏，裁掉底部草地那一段 */
		object-position: center 14%;
		-webkit-mask-image: none;
		mask-image: none;
	}
	.landing::after {
		height: 46%;
		background: linear-gradient(180deg, rgba(20, 6, 40, 0) 0%, rgba(20, 6, 40, .18) 55%, rgba(20, 6, 40, .42) 100%);
	}
	.landing-start {
		top: 80%;
		gap: 9px;
		padding: 13px 26px;
		font-size: 16px;
		min-width: min(240px, 62vw);
	}
	.landing-start svg {
		width: 19px;
		height: 19px;
	}
	/* 主图自己撑满剩余空间，这个填充块在手机上不再需要 */
	.landing-fill {
		display: none;
	}
	.landing-foot {
		font-size: 11px;
	}
}

/* file:// warning banner on the home page */
.proto-warn {
	padding: 11px 16px;
	text-align: center;
	font-size: 13px;
	line-height: 1.7;
	color: #ffe9a8;
	background: rgba(241, 199, 48, .14);
	border-bottom: 1px solid rgba(241, 199, 48, .4);
}

.proto-warn b {
	display: block;
	margin-bottom: 2px;
	color: var(--gold);
	letter-spacing: .04em;
}

.proto-warn code {
	padding: 2px 6px;
	border-radius: 5px;
	background: rgba(0, 0, 0, .35);
	font-size: 12px;
	color: #fff;
}

/* ============================================ LEGAL PAGES (privacy/terms) ====
   正文在 privacy.html / service_declare.html 里（自包含样式），这里只做外壳：
   浅色卡片 + 跟随内容高度（static/js/legal-embed.js），手机上不会出现
   "页面里再套一个小滚动框"的情况。 */
.legal-shell {
	max-width: 900px;
	padding-bottom: 34px;
}

.legal-shell .page-title {
	margin: 28px 0 6px;
	font-size: 30px;
	line-height: 1.2;
	letter-spacing: -.01em;
}

.legal-shell .page-sub {
	margin: 0 0 18px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.6;
}

.legal-card {
	overflow: hidden;
	border-radius: 20px;
	border: 1px solid var(--line-2);
	background: #f7f9fc;
	box-shadow: var(--shadow);
}

.legal-card iframe {
	display: block;
	width: 100%;
	min-height: 72vh;
	border: 0;
	background: #f7f9fc;
}

/* 页脚里公司信息的第二行（地址 / 邮箱） */
.store-foot .foot-contact {
	max-width: 74ch;
	margin: 2px auto 0;
	font-size: 12px;
	opacity: .85;
	overflow-wrap: break-word;
}

/* ------------------------------------------------ SERVICE PAGE CARDS ---- */
.service-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	margin: 18px 0 8px;
}

.service-card {
	padding: 20px 20px 18px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: linear-gradient(160deg, var(--card), var(--ink-2));
}

.service-card b {
	display: block;
	margin-bottom: 6px;
	font-size: 15px;
	color: var(--text);
}

.service-card p {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.7;
}

.service-card a {
	color: var(--gold);
	word-break: break-all;
}

.faq {
	margin: 14px 0 0;
}

.faq details {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(255, 255, 255, .03);
	padding: 14px 18px;
	margin-bottom: 10px;
}

.faq summary {
	cursor: pointer;
	font-weight: 700;
	font-size: 15px;
	color: var(--text);
}

.faq details[open] summary {
	color: var(--gold);
	margin-bottom: 8px;
}

.faq p {
	margin: 8px 0 0;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.72;
}

@media (max-width: 600px) {
	.legal-shell .page-title {
		font-size: 22px;
	}
	.legal-card {
		border-radius: 14px;
	}
	.legal-card iframe {
		min-height: 78vh;
	}
}

/* ------------------------------------------------------------ RESPONSIVE ---- */

@media (max-width: 860px) {
	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.info-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.store-nav {
		padding: 10px 14px;
		gap: 8px 10px;
	}
	.store-nav .brand {
		font-size: 14px;
	}
	.store-nav .brand img {
		width: 30px;
		height: 30px;
	}
	/* 手机上导航按钮的文案不许换行，否则 "PLAY GAME" / "Sign in" 会被折成两行 */
	.store-nav .nav-links {
		gap: 8px;
		font-size: 13px;
		width: 100%;
		justify-content: space-between;
	}
	.store-nav .nav-links a,
	.store-nav .nav-play,
	.store-nav .wallet,
	.store-nav .nav-account {
		white-space: nowrap;
	}
	.store-nav .nav-play {
		padding: 7px 12px;
		font-size: 12px;
	}
	.store-nav .wallet {
		padding: 7px 11px;
		font-size: 13px;
	}
	.nav-privacy {
		padding: 7px 10px;
	}
	/* Narrow screens: keep only the shield icon so the navbar stays on one line */
	.nav-privacy .np-text {
		display: none;
	}
	/* Once signed in show only the avatar, hiding the email to save space */
	.na-email {
		display: none;
	}
	.nav-account {
		padding: 7px 10px;
	}
	.hero-play {
		width: 100%;
		justify-content: center;
	}
	.store-hero {
		padding: 22px 18px;
	}
	.store-hero h1 {
		font-size: 23px;
	}
	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.product-card {
		padding: 18px 10px 14px;
	}
	.product-card .coin-big {
		width: 52px;
		height: 52px;
	}
	.product-card .coins {
		font-size: 17px;
	}
	.product-card .price {
		font-size: 14px;
	}
	.cta-btn {
		flex: 1 1 100%;
		max-width: none;
		font-size: 17px;
		padding: 15px 18px;
	}
	.home-cta {
		gap: 12px;
		/* On narrow screens the artwork is taller; lift the buttons a little */
		margin-top: -14vh;
	}
	.download-row img {
		width: 128px;
	}
}
