/* =========================================================
   Fenice Profile Card — Single Fixed Card + Glow Border
   Color & Typography System: Maisan3D
   - Accent: #5fb2ff (hover #4ea8ff) | Mint: #00d2a8
   - Dark:   bg #0a0a0f | surface #13131a | hover #1e1e2a | border #2a2a3a | text #f0f0f5 | muted #9898b0
   - Light:  bg #f4f6f9 | surface #ffffff | hover #f0f1f3 | border #e2e4e8 | text #1a1a2e | muted #525968
   - Fonts:  Exo 2 (heading) + Nunito (body) + JetBrains Mono (code/meta)
   ========================================================= */
@property --beam-angle {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}

:root {
	--font-heading: "Exo 2", ui-sans-serif, system-ui, sans-serif;
	--font-body: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

	/* Maisan3D Accent */
	--accent: #5fb2ff;
	--accent-hover: #4ea8ff;
	--accent-rgb: 95, 178, 255;

	/* Spacing (4pt scale) */
	--s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;

	/* Radius */
	--r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-full: 999px;

	/* Motion */
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-in: cubic-bezier(0.55, 0, 1, 0.45);
	--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--d-fast: 150ms; --d-base: 220ms; --d-slow: 360ms;
}

/* Dark Mode (Default) — Maisan3D Dark */
:root,
[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0a0a0f;
	--surface: #13131a;
	--surface-2: #191924;
	--surface-hover: #1e1e2a;
	--border: #2a2a3a;
	--border-strong: #3a3a4f;
	--text: #f0f0f5;
	--text-muted: #9898b0;
	--accent-text: #5fb2ff;
	--accent-fg: #08121f;
	--success: #00d2a8;
	--error: #ff6b6b;
	--warning: #feca57;
	--card-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.9);
	--grid-line: rgba(95, 178, 255, 0.045);
	--glow-opacity: 0.22;
	--beam-opacity: 0.95;
	--beam-halo: 0.36;
	--spot: rgba(95, 178, 255, 0.11);
}

/* Light Mode — Maisan3D Light */
[data-theme="light"] {
	color-scheme: light;
	--bg: #f4f6f9;
	--surface: #ffffff;
	--surface-2: #f8f9fa;
	--surface-hover: #f0f1f3;
	--border: #e2e4e8;
	--border-strong: #cbd2dc;
	--text: #1a1a2e;
	--text-muted: #525968;
	--accent-text: #1565c0;
	--accent-fg: #08121f;
	--success: #00b894;
	--error: #e74c3c;
	--warning: #f39c12;
	--card-shadow: 0 24px 56px -24px rgba(26, 26, 46, 0.18);
	--grid-line: rgba(26, 26, 46, 0.04);
	--glow-opacity: 0.18;
	--beam-opacity: 0.72;
	--beam-halo: 0.22;
	--spot: rgba(95, 178, 255, 0.09);
}

/* =========================================================
   Base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100dvh;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: background-color var(--d-slow) var(--ease-out), color var(--d-base) var(--ease-out);
	overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, p, blockquote { margin: 0; }
svg { flex-shrink: 0; }
[data-icon] { display: inline-grid; place-items: center; }
[hidden] { display: none !important; }

::selection { background: var(--accent); color: var(--accent-fg); }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

.mono { font-family: var(--font-mono); font-size: 0.8125rem; }

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

.skip-link {
	position: fixed; left: var(--s-4); top: var(--s-4); z-index: 1000;
	padding: var(--s-2) var(--s-4); border-radius: var(--r-full);
	background: var(--accent); color: var(--accent-fg); font-weight: 700;
	transform: translateY(-220%); transition: transform var(--d-base) var(--ease-out);
}
.skip-link:focus { transform: none; }

/* =========================================================
   Subtle Maisan3D Backdrop
   ========================================================= */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.glow {
	position: absolute; width: 520px; height: 520px; border-radius: 50%;
	background: radial-gradient(circle, rgba(var(--accent-rgb), 0.9) 0%, transparent 68%);
	filter: blur(85px); opacity: var(--glow-opacity);
}
.glow--a { top: -180px; left: -120px; }
.glow--b { bottom: -200px; right: -140px; opacity: calc(var(--glow-opacity) * 0.75); }
.grid-mesh {
	position: absolute; inset: 0;
	background-image:
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 40px 40px;
	mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 30%, transparent 100%);
	-webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 30%, transparent 100%);
}

/* =========================================================
   Stage & Fixed Single Card + Animated Border Light
   ========================================================= */
.stage {
	position: relative; z-index: 10;
	min-height: 100dvh;
	width: 100%;
	display: flex; align-items: center; justify-content: center;
	perspective: 1100px;
	padding: calc(var(--s-4) + env(safe-area-inset-top)) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom));
}

.card-shell {
	--rx: 0deg; --ry: 0deg;
	position: relative;
	width: 100%;
	max-width: 422px;
	height: min(720px, calc(100dvh - 32px));
	padding: 1.5px;
	border-radius: calc(var(--r-xl) + 1.5px);
	background: var(--border);
	box-shadow: var(--card-shadow);
	opacity: 0;
	transform: translateY(12px) scale(0.985);
	transform-style: preserve-3d;
	will-change: transform;
	transition: opacity 320ms var(--ease-out), transform 260ms var(--ease-out);
}
.is-ready .card-shell { opacity: 1; transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.card-shell.is-tilting { transition: opacity 320ms var(--ease-out), transform 90ms linear; }

/* Animated rotating Maisan3D neon border beam */
.card-beam {
	position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none;
}
.card-beam::before {
	content: "";
	position: absolute; inset: 0; border-radius: inherit;
	background: conic-gradient(
		from var(--beam-angle),
		transparent 0deg,
		transparent 225deg,
		rgba(var(--accent-rgb), 0.25) 265deg,
		#5fb2ff 305deg,
		#00d2a8 335deg,
		rgba(var(--accent-rgb), 0.3) 352deg,
		transparent 360deg
	);
	opacity: var(--beam-opacity);
	animation: beam-rotate 5.5s linear infinite;
}
/* Outer ambient bloom that breathes with the border light */
.card-shell::after {
	content: "";
	position: absolute; inset: -6px; z-index: -1; border-radius: calc(var(--r-xl) + 8px);
	background: conic-gradient(
		from var(--beam-angle),
		transparent 0deg,
		transparent 240deg,
		rgba(var(--accent-rgb), 0.75) 305deg,
		rgba(0, 210, 168, 0.55) 335deg,
		transparent 360deg
	);
	filter: blur(22px);
	opacity: var(--beam-halo);
	pointer-events: none;
	animation: beam-rotate 5.5s linear infinite;
}

@keyframes beam-rotate {
	from { --beam-angle: 0deg; }
	to { --beam-angle: 360deg; }
}

.card {
	--mx: 50%; --my: 20%;
	position: relative; z-index: 2;
	width: 100%; height: 100%;
	display: flex; flex-direction: column;
	background: var(--surface);
	border-radius: var(--r-xl);
	overflow: hidden;
	isolation: isolate;
	transition: background-color var(--d-slow) var(--ease-out);
}

/* Interactive cursor light sheen inside the card */
.card::before {
	content: "";
	position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background: radial-gradient(360px circle at var(--mx) var(--my), var(--spot), transparent 60%);
	opacity: 0;
	transition: opacity 320ms var(--ease-out);
}
@media (hover: hover) {
	.card:hover::before { opacity: 1; }
}
.card[data-view="stories"] { background: #0a0a0f; }
.card[data-view="stories"]::before { opacity: 0; }

/* =========================================================
   In-Card Views & Distinct Eye-Catching Transitions
   ========================================================= */
.view {
	position: relative; z-index: 1;
	flex: 1; height: 100%; min-height: 0;
	display: flex; flex-direction: column;
	padding: var(--s-5);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
}
.view::-webkit-scrollbar { display: none; }
.view--story { padding: 0; overflow: hidden; color: #fff; background: #0a0a0f; }
.view--chat { overflow: hidden; }

/* Per-view signature entrance animations */
.view.anim-home { animation: anim-home 340ms var(--ease-out) both; }
.view.anim-flip { animation: anim-flip 400ms var(--ease-out) both; }
.view.anim-blur-rise { animation: anim-blur-rise 420ms var(--ease-out) both; }
.view.anim-pop { animation: anim-pop 420ms var(--ease-spring) both; }
.view.anim-drawer { animation: anim-drawer 360ms var(--ease-out) both; }
.view.anim-zoom { animation: anim-zoom 380ms var(--ease-out) both; }

@keyframes anim-home {
	from { opacity: 0; transform: scale(0.95) translate3d(-12px, 0, 0); }
	to { opacity: 1; transform: none; }
}
@keyframes anim-flip {
	from { opacity: 0; transform: perspective(900px) rotateY(-8deg) translate3d(24px, 0, 0) scale(0.96); }
	to { opacity: 1; transform: none; }
}
@keyframes anim-blur-rise {
	from { opacity: 0; filter: blur(6px); transform: translate3d(0, 22px, 0) scale(0.97); }
	to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes anim-pop {
	from { opacity: 0; transform: scale(0.88) translate3d(0, 14px, 0); }
	to { opacity: 1; transform: none; }
}
@keyframes anim-drawer {
	from { opacity: 0; transform: translate3d(0, 28px, 0); }
	to { opacity: 1; transform: none; }
}
@keyframes anim-zoom {
	from { opacity: 0; transform: scale(0.86); }
	to { opacity: 1; transform: none; }
}

/* Staggered child entrances inside sub-views */
.view.is-active .info-item,
.view.is-active .mini-panel,
.view.is-active .thread-item,
.view.is-active .project-card {
	animation: item-rise 360ms var(--ease-out) both;
	animation-delay: calc(var(--stagger, 0) * 45ms + 60ms);
}
@keyframes item-rise {
	from { opacity: 0; transform: translate3d(0, 12px, 0); }
	to { opacity: 1; transform: none; }
}

/* =========================================================
   Card Top Bar (Heart + Music + Share + Theme)
   ========================================================= */
.card-bar {
	display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
	min-height: 40px;
}
.card-bar__actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }

/* Heart Reaction Button (replaces fenice.online) */
.heart-btn {
	position: relative;
	display: inline-flex; align-items: center; gap: 7px;
	height: 40px; padding: 0 13px 0 11px;
	border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border);
	color: var(--text);
	transition: background-color var(--d-fast), border-color var(--d-fast), color var(--d-fast), transform var(--d-fast) var(--ease-spring);
}
.heart-btn:hover { background: var(--surface-hover); border-color: rgba(255, 107, 139, 0.5); color: #ff6b8b; }
.heart-btn:active { transform: scale(0.92); }
.heart-btn.is-liked {
	background: rgba(255, 107, 139, 0.14);
	border-color: rgba(255, 107, 139, 0.42);
	color: #ff6b8b;
}
.heart-btn.is-pop .heart-btn__icon { animation: heart-pop 380ms var(--ease-spring); }
.heart-btn__count { font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes heart-pop { 0% { transform: scale(1); } 40% { transform: scale(1.38); } 100% { transform: scale(1); } }

.heart-burst { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.heart-particle {
	position: absolute; left: 18px; top: 14px;
	color: #ff6b8b; pointer-events: none;
	animation: particle-fly 680ms var(--ease-out) forwards;
}
@keyframes particle-fly {
	0% { opacity: 1; transform: translate(0, 0) scale(0.6) rotate(0deg); }
	100% { opacity: 0; transform: translate(var(--tx, 0px), var(--ty, -38px)) scale(1.1) rotate(var(--rot, 18deg)); }
}

/* Mini Music Player Pill (displays song title + spinning disc + EQ) */
.music-pill {
	position: relative;
	display: inline-flex; align-items: center; gap: 7px;
	height: 40px; max-width: 175px; padding: 0 11px 0 9px;
	border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border);
	color: var(--text);
	transition: background-color var(--d-fast), border-color var(--d-fast), color var(--d-fast), transform var(--d-fast) var(--ease-out);
}
.music-pill:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent-text); }
.music-pill:active { transform: scale(0.95); }
.music-pill.is-playing {
	background: rgba(var(--accent-rgb), 0.14);
	border-color: rgba(var(--accent-rgb), 0.5);
	color: var(--accent-text);
}
.music-pill__disc { flex-shrink: 0; }
.music-pill.is-playing .music-pill__disc { animation: spin 3.2s linear infinite; }
.music-pill__track {
	max-width: 112px;
	font-size: 0.78rem; font-weight: 700; line-height: 1.2;
}
/* Auto Back-and-Forth Marquee (only animates when text overflows) */
.marquee-box {
	display: block; overflow: hidden; white-space: nowrap; min-width: 0;
}
.marquee-box.is-overflow {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
}
.marquee-text {
	display: inline-block; white-space: nowrap;
}
.marquee-box.is-overflow .marquee-text {
	padding: 0 6px;
	animation: marquee-bounce var(--marquee-dur, 7s) ease-in-out infinite;
	will-change: transform;
}
@keyframes marquee-bounce {
	0%, 16% { transform: translateX(0); }
	50%, 66% { transform: translateX(var(--marquee-dist, 0px)); }
	100% { transform: translateX(0); }
}
.music-eq {
	display: none; align-items: flex-end; gap: 1.5px; height: 10px; flex-shrink: 0;
}
.music-pill.is-playing .music-eq { display: inline-flex; }
.music-eq i {
	display: block; width: 2px; height: 3px; border-radius: 2px; background: currentColor;
}
.music-pill.is-playing .music-eq i {
	background: var(--accent);
	animation: eq-bar 0.7s ease-in-out infinite alternate;
}
.music-pill.is-playing .music-eq i:nth-child(2) { animation-delay: 0.2s; animation-duration: 0.55s; }
.music-pill.is-playing .music-eq i:nth-child(3) { animation-delay: 0.4s; animation-duration: 0.8s; }
@keyframes eq-bar { from { height: 2px; } to { height: 10px; } }

/* Live Discord / Spotify Pill */
.live-pill {
	display: inline-flex; align-items: center; gap: 7px;
	max-width: 100%; margin-top: var(--s-2);
	padding: 5px 12px 5px 10px;
	border-radius: var(--r-full);
	background: var(--surface-2); border: 1px solid var(--border);
	font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
}
.live-pill__dot {
	position: relative; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
	background: var(--text-muted);
}
.live-pill[data-state="online"] .live-pill__dot { background: var(--success); }
.live-pill[data-state="online"] .live-pill__dot::after,
.live-pill[data-state="spotify"] .live-pill__dot::after {
	content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit;
	animation: ping 2s var(--ease-out) infinite;
}
.live-pill[data-state="spotify"] .live-pill__dot { background: #1DB954; }
.live-pill[data-state="idle"] .live-pill__dot { background: var(--warning); }
.live-pill[data-state="dnd"] .live-pill__dot { background: var(--error); }
.live-pill__text { flex: 1; min-width: 0; max-width: 280px; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.5); opacity: 0; } }

/* Icon Buttons */
.icon-btn {
	display: inline-grid; place-items: center;
	width: 40px; height: 40px; border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
	transition: background-color var(--d-fast), border-color var(--d-fast), color var(--d-fast), transform var(--d-fast) var(--ease-out);
}
.icon-btn:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent-text); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn--sm { width: 38px; height: 38px; }
.icon-btn--glass { background: rgba(10, 10, 15, 0.45); border-color: rgba(255, 255, 255, 0.16); color: #fff; backdrop-filter: blur(8px); }
.icon-btn--glass:hover { background: rgba(10, 10, 15, 0.7); border-color: rgba(255, 255, 255, 0.35); color: #fff; }

.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle > span { position: absolute; display: grid; place-items: center; transition: transform var(--d-slow) var(--ease-spring), opacity var(--d-base) var(--ease-out); }
[data-theme="dark"] .theme-toggle__sun { transform: translateY(0) rotate(0); opacity: 1; }
[data-theme="dark"] .theme-toggle__moon { transform: translateY(130%) rotate(-90deg); opacity: 0; }
[data-theme="light"] .theme-toggle__sun { transform: translateY(-130%) rotate(90deg); opacity: 0; }
[data-theme="light"] .theme-toggle__moon { transform: translateY(0) rotate(0); opacity: 1; }

/* =========================================================
   Hero Profile (Home View)
   ========================================================= */
.hero {
	display: flex; flex-direction: column; align-items: center; text-align: center;
	margin-top: var(--s-2);
}

.avatar {
	position: relative; width: 84px; height: 84px; border-radius: 50%;
	margin-bottom: var(--s-2);
	transition: transform var(--d-base) var(--ease-spring);
}
.avatar:hover { transform: scale(1.05); }
.avatar:active { transform: scale(0.96); }
.avatar:focus-visible { outline-offset: 6px; border-radius: 50%; }

.avatar__ring {
	position: absolute; inset: -5px; border-radius: 50%;
	background: var(--border-strong);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}
.avatar.has-story .avatar__ring {
	background: conic-gradient(from 0deg, #5fb2ff, #3b82f6, #00d2a8, #5fb2ff);
	animation: spin 5s linear infinite;
}
.avatar.seen .avatar__ring { background: var(--border-strong); animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.avatar__frame {
	position: absolute; inset: 3px; border-radius: 50%; overflow: hidden;
	background: var(--surface-2); border: 3px solid var(--surface);
}
.avatar__frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--d-slow) var(--ease-out); }
.avatar__frame.loaded img { opacity: 1; }

.avatar__story-pill {
	position: absolute; right: -2px; bottom: 2px;
	display: inline-grid; place-items: center;
	min-width: 26px; height: 26px; padding: 0 7px;
	border-radius: var(--r-full);
	background: var(--accent); color: var(--accent-fg);
	border: 3px solid var(--surface);
	font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
}

.hero__name {
	font-family: var(--font-heading); font-weight: 800;
	font-size: 1.875rem; line-height: 1.15; letter-spacing: -0.03em;
	text-wrap: balance;
}
.hero__meta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-2);
	margin-top: 6px; font-weight: 600; color: var(--text-muted); font-size: 0.9375rem;
}
.hero__handle { color: var(--accent-text); }
.meta-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }

.hero__bio {
	margin-top: var(--s-2);
	font-size: 0.875rem; line-height: 1.5; color: var(--text-muted);
	max-width: 36ch; text-wrap: pretty;
}

/* =========================================================
   Home Actions (Clean 1-row main actions + subtle quick links)
   ========================================================= */
.home-actions {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2);
	margin-top: var(--s-3);
}

.btn {
	position: relative;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 44px; padding: 0 var(--s-3);
	border-radius: var(--r-md);
	font-weight: 700; font-size: 0.875rem; white-space: nowrap;
	transition: background-color var(--d-fast), border-color var(--d-fast), color var(--d-fast), transform var(--d-fast) var(--ease-out), box-shadow var(--d-base);
}

.quick-links {
	display: flex; align-items: center; justify-content: center; gap: var(--s-3);
	margin-top: var(--s-2);
}
.quick-link {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 4px 8px; border-radius: var(--r-sm);
	font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
	transition: color var(--d-fast), background-color var(--d-fast);
}
.quick-link:hover { color: var(--accent-text); background: rgba(var(--accent-rgb), 0.1); }
.btn:active { transform: scale(0.96); }
.btn--full { width: 100%; }

.btn--primary {
	background: var(--accent); color: var(--accent-fg);
	box-shadow: 0 8px 22px -10px rgba(var(--accent-rgb), 0.75);
}
.btn--primary:hover { background: var(--accent-hover); box-shadow: 0 10px 28px -8px rgba(var(--accent-rgb), 0.9); transform: translateY(-1px); }

.btn--surface {
	background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.btn--surface:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.45); transform: translateY(-1px); }

.chat-dot {
	position: absolute; top: 7px; right: 7px;
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--error); border: 2px solid var(--accent);
}

/* =========================================================
   Social Dock inside Home Card
   ========================================================= */
.social-block {
	margin-top: var(--s-3);
	padding-top: var(--s-3);
	border-top: 1px solid var(--border);
}
.social-block__head {
	display: flex; align-items: center; justify-content: space-between;
	margin-bottom: var(--s-3);
}
.section-label {
	font-family: var(--font-heading); font-size: 0.75rem; font-weight: 700;
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
}
.section-meta { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.social-dock {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2);
}

.social-chip {
	--brand: var(--accent);
	display: flex; align-items: center; gap: var(--s-2);
	width: 100%; min-width: 0; min-height: 43px; padding: 6px 10px;
	border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border);
	text-align: left;
	transition: background-color var(--d-fast), border-color var(--d-fast), transform var(--d-fast) var(--ease-out);
}
.social-chip:hover {
	background: var(--surface-hover);
	border-color: color-mix(in srgb, var(--brand) 50%, var(--border));
	transform: translateY(-2px);
}
.social-chip:active { transform: scale(0.97); }
.social-chip__icon {
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-sm); flex-shrink: 0;
	color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent);
}
.social-chip__name {
	font-size: 0.875rem; font-weight: 700; line-height: 1.2;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* =========================================================
   Seasonal Whisper (Subtle bottom bar inside card)
   ========================================================= */
.card-foot {
	margin-top: auto;
	padding-top: var(--s-4);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.card-foot__meta {
	display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--s-2);
	font-size: 0.75rem; color: var(--text-muted);
}

.season-whisper {
	width: 100%;
	display: flex; align-items: center; gap: var(--s-2);
	min-height: 36px; padding: 5px 10px 5px 5px;
	border-radius: var(--r-full);
	background: var(--surface-2);
	border: 1px solid var(--border);
	text-align: left;
	transition: background-color var(--d-fast), border-color var(--d-fast), transform var(--d-fast);
}
.season-whisper:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.45); }
.season-whisper:active { transform: scale(0.985); }
.season-whisper__badge {
	display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
	padding: 3px 9px; border-radius: var(--r-full);
	background: rgba(var(--accent-rgb), 0.14); color: var(--accent-text);
	font-family: var(--font-heading); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
}
.season-whisper__msg {
	flex: 1; min-width: 0;
	font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
	transition: opacity var(--d-base) var(--ease-out);
}

/* =========================================================
   Sub-views Header & Scroll Area
   ========================================================= */
.sub-bar {
	display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
	padding-bottom: var(--s-4);
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.back-btn {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 40px; padding: 0 12px 0 8px;
	border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border);
	font-size: 0.875rem; font-weight: 700; color: var(--text);
	transition: background-color var(--d-fast), border-color var(--d-fast), color var(--d-fast), transform var(--d-fast);
}
.back-btn:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent-text); }
.back-btn:active { transform: scale(0.96); }

.sub-bar__tag {
	color: var(--accent-text); font-size: 0.75rem; letter-spacing: 0.08em;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%;
}

.sub-head {
	display: flex; align-items: center; gap: var(--s-3);
	margin: var(--s-4) 0;
	flex-shrink: 0;
}
.sub-head__icon {
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); flex-shrink: 0;
	background: rgba(var(--accent-rgb), 0.14); color: var(--accent-text);
}
.sub-head__title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.sub-head__desc { font-size: 0.875rem; color: var(--text-muted); }

.sub-scroll {
	flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none;
	padding-bottom: var(--s-1);
}
.sub-scroll::-webkit-scrollbar { display: none; }

/* =========================================================
   VIEW 2: Info List
   ========================================================= */
.info-list { display: flex; flex-direction: column; gap: var(--s-2); }
.info-item {
	display: flex; align-items: stretch; gap: var(--s-1);
	border-radius: var(--r-lg);
	background: var(--surface-2); border: 1px solid var(--border);
	transition: border-color var(--d-fast), background-color var(--d-fast);
}
.info-item:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.45); }
.info-item__main {
	flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-3);
	min-height: 62px; padding: var(--s-3); text-align: left;
}
.info-item__icon {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-md); flex-shrink: 0;
	background: rgba(var(--accent-rgb), 0.12); color: var(--accent-text);
}
.info-item__text { display: flex; flex-direction: column; min-width: 0; }
.info-item__label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.info-item__value { font-weight: 700; font-size: 0.9375rem; line-height: 1.35; overflow-wrap: anywhere; }
.info-item__copy { align-self: center; margin-right: var(--s-2); background: transparent; border-color: transparent; color: var(--text-muted); }
.info-item__copy:hover { background: var(--surface); color: var(--accent-text); }
.info-item.is-hidden .info-item__value { filter: blur(5px); user-select: none; }
.info-item.is-hidden .info-item__main { cursor: default; }
.info-item__lock {
	display: inline-flex; align-items: center; gap: 4px;
	margin-right: var(--s-3); align-self: center;
	font-size: 0.75rem; font-weight: 600; color: var(--text-muted); white-space: nowrap;
}

/* =========================================================
   VIEW 3: About Stack
   ========================================================= */
.about-stack { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-4); }

.mini-panel {
	padding: var(--s-4);
	border-radius: var(--r-lg);
	background: var(--surface-2);
	border: 1px solid var(--border);
	display: flex; flex-direction: column; gap: var(--s-3);
}
.mini-panel__head { display: flex; align-items: center; justify-content: space-between; }
.muted-icon { color: var(--text-muted); display: grid; }

.clock {
	display: flex; align-items: baseline; gap: 4px;
	font-size: 2.25rem; font-weight: 600; line-height: 1; letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums; color: var(--text);
}
.clock__sec { font-size: 0.9375rem; color: var(--accent-text); letter-spacing: 0; }
.clock__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: 0.875rem; color: var(--text-muted); text-transform: capitalize; }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.22); }
.now-list { display: flex; flex-direction: column; gap: var(--s-3); }
.now-item { display: flex; align-items: center; gap: var(--s-3); }
.now-item__icon {
	display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0;
	background: rgba(var(--accent-rgb), 0.12); color: var(--accent-text);
}
.now-item__text { display: flex; flex-direction: column; min-width: 0; }
.now-item__label { font-size: 0.75rem; color: var(--text-muted); }
.now-item__value { font-size: 0.9375rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
	display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px;
	border-radius: var(--r-full);
	background: var(--surface); border: 1px solid var(--border);
	font-size: 0.8125rem; font-weight: 600; color: var(--text-muted);
}

.mini-panel--quote {
	background: linear-gradient(155deg, rgba(var(--accent-rgb), 0.12) 0%, var(--surface-2) 70%);
	border-color: rgba(var(--accent-rgb), 0.25);
}
.quote-mark { color: var(--accent-text); display: grid; }
.quote p { font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.quote__by { margin-top: var(--s-2); color: var(--text-muted); }
.quote__by::before { content: "— "; }

/* =========================================================
   VIEW 4: Social Detail
   ========================================================= */
.social-detail {
	flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; gap: var(--s-4);
	padding: var(--s-6) var(--s-2) var(--s-2);
}
.social-detail__badge {
	--brand: var(--accent);
	display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px;
	color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, transparent);
	border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent);
}
.social-detail__title { font-family: var(--font-heading); font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.social-detail__body { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.6; max-width: 34ch; }

.url-field {
	width: 100%; display: flex; align-items: center; gap: var(--s-2);
	padding: 6px 6px 6px 14px; border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border);
}
.url-field__text { flex: 1; min-width: 0; text-align: left; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-field .icon-btn { background: transparent; border-color: transparent; }
.url-field .icon-btn:hover { background: var(--surface-hover); }

.social-detail__actions { width: 100%; margin-top: auto; padding-top: var(--s-2); }

/* =========================================================
   VIEW 5: Direct Chat (Visitor Private + Admin Inbox)
   ========================================================= */
.chat-bar-right { display: flex; align-items: center; gap: var(--s-2); }
.chat-role-pill {
	padding: 4px 10px; border-radius: var(--r-full);
	background: rgba(var(--accent-rgb), 0.14); color: var(--accent-text);
	font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
}
.view--chat.is-admin .chat-role-pill { background: rgba(0, 210, 168, 0.18); color: var(--success); }
.view--chat .i-logout { display: none; }
.view--chat.is-admin .i-logout { display: inline-grid; }
.view--chat.is-admin .i-shield { display: none; }

/* Admin Auth */
.chat-auth {
	flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; gap: var(--s-3); padding: var(--s-4);
}
.chat-auth__icon {
	display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
	background: rgba(var(--accent-rgb), 0.14); color: var(--accent-text);
}
.chat-auth__title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; }
.chat-auth__desc { font-size: 0.875rem; color: var(--text-muted); max-width: 30ch; }
.chat-auth__form { width: 100%; display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-2); }
.chat-auth__err { font-size: 0.8125rem; color: var(--error); font-weight: 600; text-align: left; }
.chat-auth__btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }

/* Admin Inbox */
.chat-inbox { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-4); }
.chat-inbox__head { display: flex; align-items: center; justify-content: space-between; }
.thread-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: var(--s-2); }
.thread-list::-webkit-scrollbar { display: none; }

.thread-item {
	display: flex; align-items: center; gap: var(--s-2);
	border-radius: var(--r-lg);
	background: var(--surface-2); border: 1px solid var(--border);
	transition: background-color var(--d-fast), border-color var(--d-fast);
}
.thread-item:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.45); }
.thread-item__main {
	flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-3);
	padding: 12px; text-align: left;
}
.thread-item__avatar {
	width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
	display: grid; place-items: center;
	background: rgba(var(--accent-rgb), 0.16); color: var(--accent-text);
	font-family: var(--font-heading); font-weight: 800; font-size: 0.9375rem;
}
.thread-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-item__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.thread-item__name { font-weight: 700; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item__time { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }
.thread-item__preview { font-size: 0.8125rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item__unread {
	min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full);
	background: var(--accent); color: var(--accent-fg);
	font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
	display: inline-grid; place-items: center; flex-shrink: 0;
}
.thread-item__del { margin-right: 6px; background: transparent; border-color: transparent; color: var(--text-muted); }
.thread-item__del:hover { color: var(--error); background: rgba(255, 107, 107, 0.12); border-color: transparent; }

/* Conversation Thread */
.chat-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: var(--s-3); gap: var(--s-3); }
.chat-peer {
	display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
	padding: 10px 12px; border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border);
	flex-shrink: 0;
}
.chat-peer__info { display: flex; flex-direction: column; min-width: 0; }
.chat-peer__info strong { font-size: 0.9375rem; font-weight: 700; line-height: 1.25; }
.chat-peer__sub { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip-btn {
	padding: 6px 10px; border-radius: var(--r-full); flex-shrink: 0;
	background: var(--surface); border: 1px solid var(--border);
	font-size: 0.75rem; font-weight: 700; color: var(--accent-text);
	transition: background-color var(--d-fast), border-color var(--d-fast);
}
.chip-btn:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.5); }

.chat-messages {
	flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none;
	display: flex; flex-direction: column; gap: var(--s-2);
	padding: 4px 2px;
}
.chat-messages::-webkit-scrollbar { display: none; }

.msg {
	max-width: 84%; display: flex; flex-direction: column; gap: 3px;
	animation: msg-pop 240ms var(--ease-spring) both;
}
.msg--me { align-self: flex-end; align-items: flex-end; }
.msg--them { align-self: flex-start; align-items: flex-start; }

.msg__bubble {
	padding: 10px 13px; border-radius: 16px;
	font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere;
}
.msg--me .msg__bubble {
	background: var(--accent); color: var(--accent-fg); font-weight: 600;
	border-bottom-right-radius: 4px;
}
.msg--them .msg__bubble {
	background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
	border-bottom-left-radius: 4px;
}
.msg__meta { font-size: 0.7rem; color: var(--text-muted); padding: 0 4px; }

@keyframes msg-pop {
	from { opacity: 0; transform: translateY(8px) scale(0.95); }
	to { opacity: 1; transform: none; }
}

.chat-composer {
	display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0;
	padding-top: var(--s-2); border-top: 1px solid var(--border);
}
.chat-input {
	flex: 1; min-width: 0; height: 44px; padding: 0 14px;
	border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border);
	font-size: 0.9375rem; color: var(--text);
	transition: border-color var(--d-fast), background-color var(--d-fast);
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.send-btn {
	display: inline-grid; place-items: center;
	width: 44px; height: 44px; border-radius: var(--r-md); flex-shrink: 0;
	background: var(--accent); color: var(--accent-fg);
	transition: background-color var(--d-fast), transform var(--d-fast);
}
.send-btn:hover { background: var(--accent-hover); }
.send-btn:active { transform: scale(0.94); }

/* =========================================================
   VIEW 6: Projects Showcase
   ========================================================= */
.project-list { display: flex; flex-direction: column; gap: var(--s-3); }
.project-card {
	display: flex; flex-direction: column; gap: var(--s-2);
	padding: var(--s-4); border-radius: var(--r-lg);
	background: var(--surface-2); border: 1px solid var(--border);
	transition: background-color var(--d-fast), border-color var(--d-fast), transform var(--d-fast) var(--ease-out);
}
.project-card:hover { background: var(--surface-hover); border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-2px); }
.project-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.project-card__name { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 800; color: var(--text); }
.project-card__badge {
	padding: 2px 8px; border-radius: var(--r-full);
	background: rgba(var(--accent-rgb), 0.14); color: var(--accent-text);
	font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; flex-shrink: 0;
}
.project-card__desc { font-size: 0.85rem; line-height: 1.5; color: var(--text-muted); }
.project-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: 2px; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card__tag {
	padding: 2px 8px; border-radius: var(--r-full);
	background: var(--surface); border: 1px solid var(--border);
	font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
}
.project-card__arrow { color: var(--accent-text); flex-shrink: 0; transition: transform var(--d-fast); }
.project-card:hover .project-card__arrow { transform: translate(2px, -2px); }

/* =========================================================
   VIEW 7: Buy Me a Coffee (VietQR)
   ========================================================= */
.coffee-wrap {
	display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
	padding-top: var(--s-4);
}
.coffee-qr-box {
	padding: 12px; border-radius: var(--r-lg);
	background: #ffffff;
	border: 1px solid var(--border);
	box-shadow: 0 12px 30px -14px rgba(var(--accent-rgb), 0.35);
}
.coffee-qr-img { width: 204px; height: 204px; object-fit: contain; border-radius: var(--r-sm); }

.coffee-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
.amount-chip {
	height: 36px; border-radius: var(--r-md);
	background: var(--surface-2); border: 1px solid var(--border);
	font-size: 0.8125rem; font-weight: 700; color: var(--text-muted);
	transition: background-color var(--d-fast), border-color var(--d-fast), color var(--d-fast);
}
.amount-chip:hover { background: var(--surface-hover); color: var(--text); }
.amount-chip.is-active {
	background: rgba(var(--accent-rgb), 0.16);
	border-color: var(--accent);
	color: var(--accent-text);
}

.coffee-bank {
	width: 100%; padding: var(--s-3) var(--s-4); border-radius: var(--r-lg);
	background: var(--surface-2); border: 1px solid var(--border);
	display: flex; flex-direction: column; gap: 8px;
}
.coffee-bank__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); font-size: 0.85rem; }
.coffee-bank__label { color: var(--text-muted); font-weight: 600; }
.coffee-bank__acc { display: inline-flex; align-items: center; gap: 6px; }
.coffee-bank__acc .icon-btn { width: 32px; height: 32px; border-radius: var(--r-sm); }
.coffee-note { font-size: 0.8125rem; color: var(--text-muted); text-align: center; line-height: 1.5; max-width: 34ch; }

/* =========================================================
   VIEW 8: Stories Viewer (Inside Fixed Card)
   ========================================================= */
.story__progress {
	position: absolute; z-index: 4; top: var(--s-3); left: var(--s-3); right: var(--s-3);
	display: flex; gap: 4px;
}
.story__bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.story__bar > i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.story__bar.is-done > i { transform: scaleX(1); }

.story__head {
	position: absolute; z-index: 4; left: 0; right: 0; top: 0;
	display: flex; align-items: center; gap: var(--s-2);
	padding: 24px var(--s-3) 36px;
	background: linear-gradient(180deg, rgba(10, 10, 15, 0.78), transparent);
}
.story__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); flex-shrink: 0; }
.story__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.story__who strong { font-size: 0.9375rem; font-weight: 700; }
.story__time { font-size: 0.75rem; color: rgba(240, 240, 245, 0.78); }
.story__pin {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 4px 8px; border-radius: var(--r-full);
	background: rgba(var(--accent-rgb), 0.25); color: #fff;
	font-size: 0.75rem; font-weight: 700;
}
.view--story .i-play { display: none; }
.view--story.is-paused .i-play { display: inline-grid; }
.view--story.is-paused .i-pause { display: none; }

.story__stage { position: relative; flex: 1; height: 100%; min-height: 0; display: grid; place-items: center; user-select: none; }
.story__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story__media--contain { object-fit: contain; background: #000; }
.story__caption {
	position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
	padding: 56px var(--s-5) 44px;
	background: linear-gradient(0deg, rgba(10, 10, 15, 0.88), transparent);
	font-size: 0.9375rem; line-height: 1.55; color: #f0f0f5;
}
.story__text {
	position: absolute; inset: 0; display: grid; place-items: center;
	padding: 88px var(--s-6) 64px;
	font-family: var(--font-heading); font-size: 1.375rem; font-weight: 700; line-height: 1.4;
	text-align: center; text-wrap: balance; color: #f0f0f5;
	background:
		radial-gradient(90% 60% at 85% 15%, rgba(var(--accent-rgb), 0.35), transparent 60%),
		radial-gradient(80% 60% at 15% 85%, rgba(0, 210, 168, 0.22), transparent 60%),
		linear-gradient(165deg, #13131f 0%, #0a0a0f 100%);
}

.story__nav {
	position: absolute; z-index: 3; top: 50%; translate: 0 -50%;
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	background: rgba(10, 10, 15, 0.45); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff;
	backdrop-filter: blur(8px);
	transition: background-color var(--d-fast), opacity var(--d-fast);
}
.story__nav:hover { background: rgba(10, 10, 15, 0.72); }
.story__nav:disabled { opacity: 0; pointer-events: none; }
.story__nav--prev { left: var(--s-3); }
.story__nav--next { right: var(--s-3); }
.story__counter {
	position: absolute; z-index: 4; bottom: var(--s-3); left: 50%; translate: -50% 0;
	font-size: 0.75rem; color: rgba(240, 240, 245, 0.72);
}

/* =========================================================
   Empty & Skeleton
   ========================================================= */
.empty {
	display: grid; place-items: center; gap: var(--s-2);
	padding: var(--s-8) var(--s-4); border-radius: var(--r-lg);
	border: 1px dashed var(--border-strong); color: var(--text-muted); text-align: center;
}
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-hover) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton.loaded { animation: none; background: var(--surface-2); }
.skeleton-text { display: inline-block; min-width: 6ch; border-radius: 6px; background: var(--surface-hover); color: transparent; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* =========================================================
   Toast
   ========================================================= */
.toast-region {
	position: fixed; z-index: 1000; left: 50%; bottom: calc(var(--s-5) + env(safe-area-inset-bottom));
	translate: -50% 0; pointer-events: none;
}
.toast {
	display: inline-flex; align-items: center; gap: var(--s-2);
	padding: 10px 18px 10px 14px; border-radius: var(--r-full);
	background: var(--text); color: var(--surface);
	font-weight: 700; font-size: 0.875rem;
	box-shadow: 0 14px 36px -12px rgba(0, 0, 0, 0.45);
	animation: toast-in var(--d-slow) var(--ease-spring) both;
}
.toast.is-leaving { animation: toast-out var(--d-base) var(--ease-in) both; }
.toast svg { color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.96); } }

/* =========================================================
   Small Mobile Tweaks
   ========================================================= */
@media (max-width: 420px) {
	.stage { padding: calc(var(--s-3) + env(safe-area-inset-top)) var(--s-3) calc(var(--s-3) + env(safe-area-inset-bottom)); }
	.card-shell { height: min(720px, calc(100dvh - 24px)); border-radius: 21.5px; }
	.card { border-radius: 20px; }
	.view { padding: var(--s-4); }
	.btn { padding: 0 8px; font-size: 0.8125rem; gap: 5px; }
}

/* =========================================================
   Reduced Motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
	.card-shell { opacity: 1; transform: none; }
}
