/* ==========================================================================
   GYT UI — Design System
   Biblioteca única de tokens + primitives + components para todo o PWA.
   Incluir UMA vez em cada página via head.php.
   ========================================================================== */

@layer reset, tokens, base, components, utilities;

/* ==========================================================================
   RESET moderno
   ========================================================================== */
@layer reset {
	*, *::before, *::after { box-sizing: border-box; }
	* { margin: 0; }
	html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; }
	body { line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
	img, picture, video, canvas, svg { display: block; max-width: 100%; }
	input, button, textarea, select { font: inherit; color: inherit; }
	p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
	button { background: none; border: 0; cursor: pointer; }
	a { color: inherit; text-decoration: none; }
}

/* ==========================================================================
   TOKENS
   ========================================================================== */
@layer tokens {
	:root {
		/* cores — neutros */
		--c-ink:     #0a0a12;
		--c-ink-80: #1e1e28;
		--c-ink-60: #3e4353;
		--c-ink-40: #6b7280;  /* AA 4.6:1 em branco */
		--c-ink-20: #dce0e8;
		--c-ink-10: #eef0f4;
		--c-ink-5:  #f8f9fb;

		/* cores — marca */
		--c-brand:       #d8db00;
		--c-brand-dark:  #b8bb00;
		--c-brand-light: #f4fa9e;

		/* cor sobre fundo --c-ink (inverte em dark mode) */
		--c-on-ink: #ffffff;

		/* cores — semânticas */
		--c-accent:  #ff3366;
		--c-success: #16a34a;
		--c-warning: #f59e0b;
		--c-danger:  #dc2626;
		--c-info:    #2563eb;

		/* superfícies */
		--s-surface:  #ffffff;
		--s-elevated: #ffffff;
		--s-sunken:   #f8f9fb;
		--s-overlay:  rgba(10,10,18,0.6);
		--s-border:          rgba(10,10,18,0.08);
		--s-border-strong:   rgba(10,10,18,0.14);

		/* espaço — escala 4/8 */
		--sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
		--sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
		--sp-9: 96px;

		/* radius */
		--r-xs: 6px;  --r-sm: 8px;  --r-md: 14px;
		--r-lg: 20px; --r-xl: 28px; --r-pill: 9999px;

		/* elevação */
		--e-1: 0 1px 2px rgba(10,10,18,0.06);
		--e-2: 0 4px 12px -4px rgba(10,10,18,0.08), 0 2px 4px rgba(10,10,18,0.04);
		--e-3: 0 12px 32px -12px rgba(10,10,18,0.15), 0 4px 12px -4px rgba(10,10,18,0.08);
		--e-4: 0 24px 60px -20px rgba(10,10,18,0.2), 0 8px 20px -8px rgba(10,10,18,0.1);
		--e-focus: 0 0 0 4px rgba(10,10,18,0.08);

		/* tipografia */
		--f-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
		--f-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
		--f-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

		--fs-xs:  12px;  --fs-sm: 14px;  --fs-md: 16px;
		--fs-lg:  18px;  --fs-xl: 20px;
		--fs-2xl: 24px;  --fs-3xl: 32px; --fs-4xl: 44px;
		--fs-hero: clamp(40px, 7vw, 72px);
		--fs-display: clamp(48px, 9vw, 96px);

		--lh-tight: 1.1;
		--lh-snug: 1.25;
		--lh-normal: 1.5;
		--lh-relaxed: 1.65;

		/* motion */
		--ease-out:    cubic-bezier(0.2, 0.8, 0.2, 1);
		--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
		--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
		--t-fast: 150ms;
		--t-base: 250ms;
		--t-slow: 400ms;

		/* layout */
		--container:   1240px;
		--container-sm: 640px;
		--header-h:     56px;
		--tabbar-h:     64px;
		--safe-top:     env(safe-area-inset-top, 0px);
		--safe-bottom:  env(safe-area-inset-bottom, 0px);

		/* z-index */
		--z-base:     1;
		--z-sticky:   20;
		--z-header:   50;
		--z-dropdown: 100;
		--z-sheet:    200;
		--z-modal:    300;
		--z-toast:    400;
	}

	[data-theme="dark"] {
		--c-on-ink: #0a0a12;  /* dark mode: --c-ink é claro, então texto sobre ele precisa ser escuro */
		--c-ink:    #f0f2f7;
		--c-ink-80: #d8dde8;
		--c-ink-60: #b8c0d2;  /* era #a0a7b8 — elevado para WCAG AA em superfície escura */
		--c-ink-40: #9aa5be;  /* era #7a8298 — elevado para WCAG AA em superfície escura */
		--c-ink-20: #2e3242;
		--c-ink-10: #1e2130;
		--c-ink-5:  #111520;
		--s-surface:  #0d0f1a;  /* ligeiramente elevado do pitch-black */
		--s-elevated: #171a28;  /* mais contraste sobre surface */
		--s-sunken:   #090b14;
		--s-border:          rgba(255,255,255,0.12);  /* era 0.08 — mais visível */
		--s-border-strong:   rgba(255,255,255,0.20);  /* era 0.14 */
	}
}

/* ==========================================================================
   BASE
   ========================================================================== */
@layer base {
	body {
		font-family: var(--f-sans);
		font-size: var(--fs-md);
		line-height: var(--lh-normal);
		color: var(--c-ink);
		background: var(--s-surface);
		-webkit-tap-highlight-color: transparent;
	}

	/* foco visível universal */
	:focus-visible {
		outline: 2px solid var(--c-ink);
		outline-offset: 2px;
		border-radius: var(--r-xs);
	}

	::selection { background: var(--c-brand); color: var(--c-ink); }

	/* respeita reduced-motion */
	@media (prefers-reduced-motion: reduce) {
		*, *::before, *::after {
			animation-duration: 0.01ms !important;
			animation-iteration-count: 1 !important;
			transition-duration: 0.01ms !important;
			scroll-behavior: auto !important;
		}
	}
}

/* ==========================================================================
   COMPONENTES
   ========================================================================== */
@layer components {

	/* ---------- CONTAINER ---------- */
	.gyt-container {
		width: 100%;
		max-width: var(--container);
		margin: 0 auto;
		padding: 0 var(--sp-4);
	}
	@media (min-width: 768px) {
		.gyt-container { padding: 0 var(--sp-6); }
	}

	/* ---------- TYPOGRAPHY ---------- */
	.gyt-display { font-family: var(--f-display); font-weight: 400; font-size: var(--fs-display); line-height: 0.98; letter-spacing: -0.03em; }
	.gyt-h1 { font-family: var(--f-display); font-weight: 400; font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: -0.03em; }
	.gyt-h2 { font-family: var(--f-display); font-weight: 400; font-size: var(--fs-4xl); line-height: var(--lh-tight); letter-spacing: -0.025em; }
	.gyt-h3 { font-family: var(--f-sans); font-weight: 700; font-size: var(--fs-2xl); line-height: var(--lh-snug); letter-spacing: -0.015em; }
	.gyt-h4 { font-family: var(--f-sans); font-weight: 600; font-size: var(--fs-xl); line-height: var(--lh-snug); }
	.gyt-kicker {
		display: inline-block;
		font-family: var(--f-mono);
		font-size: var(--fs-xs);
		letter-spacing: 0.14em;
		text-transform: uppercase;
		color: var(--c-ink-40);
		font-weight: 500;
	}
	.gyt-lead { font-size: var(--fs-lg); color: var(--c-ink-60); line-height: var(--lh-relaxed); }
	.gyt-muted { color: var(--c-ink-40); }
	.gyt-em-grad {
		font-style: italic;
		background: linear-gradient(90deg, var(--c-ink), var(--c-ink-60));
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
	}

	/* ---------- BUTTON ---------- */
	.btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: var(--sp-2);
		min-height: 44px;
		padding: 12px 20px;
		border-radius: var(--r-md);
		font-family: var(--f-sans);
		font-size: var(--fs-sm);
		font-weight: 600;
		line-height: 1;
		letter-spacing: 0.01em;
		cursor: pointer;
		transition: transform var(--t-fast) var(--ease-out),
					box-shadow var(--t-fast) var(--ease-out),
					background var(--t-fast) var(--ease-out),
					color var(--t-fast) var(--ease-out),
					border-color var(--t-fast) var(--ease-out);
		position: relative;
		overflow: hidden;
		user-select: none;
		white-space: nowrap;
	}
	.btn:focus-visible { box-shadow: var(--e-focus); outline: none; }
	.btn:active { transform: scale(0.98); }
	.btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

	.btn--primary {
		background: var(--c-ink);
		color: var(--c-on-ink);
	}
	.btn--primary::before {
		content: '';
		position: absolute; inset: 0;
		background: linear-gradient(90deg, var(--c-brand), var(--c-brand-dark));
		transform: translateY(100%);
		transition: transform var(--t-base) var(--ease-out);
	}
	.btn--primary > * { position: relative; z-index: 1; }
	.btn--primary:hover::before { transform: translateY(0); }
	/* hover: brand bg amarelo — texto deve ser sempre escuro para contraste */
	.btn--primary:hover { color: #0a0a12; box-shadow: 0 10px 24px -8px rgba(216,219,0,0.45); }

	.btn--ghost {
		background: transparent;
		color: var(--c-ink);
		border: 1.5px solid var(--s-border);
	}
	.btn--ghost:hover { background: var(--c-ink-5); border-color: var(--c-ink); }

	.btn--danger { background: var(--c-danger); color: #fff; }
	.btn--danger:hover { background: #b91c1c; box-shadow: 0 10px 24px -8px rgba(220,38,38,0.4); }

	.btn--lg { min-height: 56px; padding: 18px 28px; font-size: var(--fs-md); border-radius: var(--r-md); }
	.btn--sm { min-height: 36px; padding: 8px 14px; font-size: var(--fs-xs); }
	.btn--pill { border-radius: var(--r-pill); }
	.btn--block { width: 100%; }
	.btn--icon { padding: 0; width: 44px; }
	.btn--icon.btn--lg { width: 56px; }

	.btn__spinner {
		width: 18px; height: 18px;
		border: 2.5px solid rgba(255,255,255,0.3);
		border-top-color: currentColor;
		border-radius: 50%;
		animation: gyt-spin 0.7s linear infinite;
	}
	@keyframes gyt-spin { to { transform: rotate(360deg); } }

	/* ---------- INPUT ---------- */
	.input-field {
		display: flex;
		flex-direction: column;
		gap: var(--sp-2);
	}
	.input-field__label {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		font-size: var(--fs-xs);
		font-weight: 600;
		color: var(--c-ink);
		letter-spacing: 0.01em;
	}
	.input-field__label-hint { font-weight: 400; color: var(--c-ink-40); font-size: var(--fs-xs); }
	.input-wrap {
		position: relative;
		display: flex;
		align-items: center;
	}
	.input-wrap__icon {
		position: absolute;
		left: 16px;
		font-size: 16px;
		color: var(--c-ink-40);
		pointer-events: none;
		transition: color var(--t-fast) var(--ease-out);
	}
	.input {
		width: 100%;
		min-height: 52px;
		padding: 14px 16px;
		border: 1.5px solid var(--s-border);
		border-radius: var(--r-md);
		background: var(--s-surface);
		color: var(--c-ink);
		font-size: var(--fs-md); /* >=16 evita zoom iOS */
		line-height: 1.4;
		transition: border-color var(--t-fast) var(--ease-out),
					box-shadow var(--t-fast) var(--ease-out);
	}
	.input::placeholder { color: var(--c-ink-40); }
	.input:hover { border-color: var(--s-border-strong); }
	.input:focus { outline: none; border-color: var(--c-ink); box-shadow: var(--e-focus); }
	.input-wrap__icon + .input { padding-left: 46px; }
	.input-wrap:focus-within .input-wrap__icon { color: var(--c-ink); }

	.input--valid { border-color: var(--c-success); padding-right: 44px;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2316a34a'%3E%3Cpath d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
		background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
	}
	.input--invalid { border-color: var(--c-danger); }
	.input-field__error {
		font-size: var(--fs-xs);
		color: var(--c-danger);
		font-weight: 500;
		display: none;
	}
	.input--invalid ~ .input-field__error,
	.input-wrap:has(.input--invalid) ~ .input-field__error { display: block; }

	.input-toggle {
		position: absolute;
		right: 10px;
		width: 40px; height: 40px;
		display: grid;
		place-items: center;
		border-radius: var(--r-sm);
		color: var(--c-ink-40);
		transition: all var(--t-fast) var(--ease-out);
	}
	.input-toggle:hover { background: var(--c-ink-5); color: var(--c-ink); }

	/* ---------- CARD ---------- */
	.card {
		background: var(--s-elevated);
		border-radius: var(--r-lg);
		border: 1px solid var(--s-border);
		overflow: hidden;
		transition: transform var(--t-base) var(--ease-out),
					box-shadow var(--t-base) var(--ease-out),
					border-color var(--t-base) var(--ease-out);
	}
	.card--interactive { cursor: pointer; }
	.card--interactive:hover {
		transform: translateY(-4px);
		box-shadow: var(--e-3);
		border-color: var(--s-border-strong);
	}
	.card__media {
		position: relative;
		aspect-ratio: 4 / 5;
		overflow: hidden;
		background: var(--c-ink-10);
	}
	.card__media > img {
		width: 100%; height: 100%;
		object-fit: cover;
		transition: transform var(--t-slow) var(--ease-out);
	}
	.card--interactive:hover .card__media > img { transform: scale(1.05); }
	.card__body { padding: var(--sp-4); }
	.card__meta {
		font-family: var(--f-mono);
		font-size: var(--fs-xs);
		letter-spacing: 0.06em;
		color: var(--c-ink-60);
		text-transform: uppercase;
		margin-bottom: var(--sp-2);
	}
	.card__title {
		font-family: var(--f-display);
		font-size: var(--fs-2xl);
		font-weight: 400;
		line-height: var(--lh-snug);
		letter-spacing: -0.02em;
		margin-bottom: var(--sp-1);
	}
	.card__sub {
		font-size: var(--fs-sm);
		color: var(--c-ink-60);
	}

	/* ---------- TAG / CHIP ---------- */
	.tag {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 4px 10px;
		border-radius: var(--r-pill);
		font-size: var(--fs-xs);
		font-weight: 600;
		background: var(--c-ink-5);
		color: var(--c-ink-80);
		border: 1px solid var(--s-border);
	}
	.tag--brand   { background: var(--c-brand-light); color: var(--c-ink); border-color: transparent; }
	.tag--danger  { background: #fee2e2; color: var(--c-danger); border-color: transparent; }
	.tag--success { background: #dcfce7; color: #166534; border-color: transparent; }
	.tag--live::before {
		content: '';
		width: 6px; height: 6px;
		border-radius: 50%;
		background: var(--c-danger);
		animation: gyt-pulse 1.5s ease-in-out infinite;
	}
	@keyframes gyt-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

	/* ---------- BADGE numérico ---------- */
	.badge-num {
		display: inline-grid;
		place-items: center;
		min-width: 20px; height: 20px;
		padding: 0 6px;
		border-radius: var(--r-pill);
		background: var(--c-accent);
		color: #fff;
		font-size: 11px;
		font-weight: 700;
	}

	/* ---------- DIVIDER ---------- */
	.divider { height: 1px; background: var(--s-border); border: 0; }
	.divider--text {
		display: flex; align-items: center; gap: var(--sp-4);
		color: var(--c-ink-40);
		font-family: var(--f-mono);
		font-size: var(--fs-xs);
		text-transform: uppercase;
		letter-spacing: 0.1em;
	}
	.divider--text::before, .divider--text::after {
		content: ''; flex: 1; height: 1px; background: var(--s-border);
	}

	/* ---------- SKELETON ---------- */
	.skeleton {
		background: linear-gradient(90deg, var(--c-ink-10) 0%, var(--c-ink-5) 50%, var(--c-ink-10) 100%);
		background-size: 200% 100%;
		animation: gyt-shimmer 1.4s linear infinite;
		border-radius: var(--r-sm);
		display: block;
	}
	.skeleton--text { height: 14px; width: 100%; margin-bottom: 8px; }
	.skeleton--img  { aspect-ratio: 4/5; width: 100%; border-radius: var(--r-lg); }
	.skeleton--circle { border-radius: 50%; aspect-ratio: 1; }
	@keyframes gyt-shimmer { to { background-position: -200% 0; } }

	/* ---------- TOAST ---------- */
	.toast-stack {
		position: fixed;
		top: calc(var(--safe-top) + var(--sp-4));
		right: var(--sp-4); left: var(--sp-4);
		display: flex; flex-direction: column; gap: var(--sp-2);
		z-index: var(--z-toast);
		pointer-events: none;
	}
	@media (min-width: 640px) {
		.toast-stack { left: auto; width: 360px; }
	}
	.toast {
		pointer-events: auto;
		display: flex; align-items: flex-start; gap: var(--sp-3);
		padding: 14px 16px;
		background: var(--c-ink);
		color: var(--c-on-ink);
		border-radius: var(--r-md);
		box-shadow: var(--e-3);
		font-size: var(--fs-sm);
		line-height: 1.4;
		animation: gyt-toast-in 300ms var(--ease-spring);
	}
	.toast--success { background: var(--c-success); }
	.toast--danger  { background: var(--c-danger); }
	.toast--warning { background: var(--c-warning); color: var(--c-ink); }
	.toast__icon { font-size: 18px; margin-top: 1px; }
	.toast__body { flex: 1; }
	.toast__close {
		color: inherit; opacity: 0.7;
		width: 28px; height: 28px;
		display: grid; place-items: center;
		border-radius: var(--r-sm);
	}
	[data-theme="dark"] .toast__close { opacity: 0.9; }
	.toast__close:hover { opacity: 1; background: rgba(255,255,255,0.1); }
	@keyframes gyt-toast-in {
		from { opacity: 0; transform: translateY(-12px) scale(0.96); }
		to   { opacity: 1; transform: translateY(0) scale(1); }
	}
	.toast.is-leaving { animation: gyt-toast-out 200ms var(--ease-out) forwards; }
	@keyframes gyt-toast-out {
		to { opacity: 0; transform: translateY(-12px) scale(0.96); }
	}

	/* ---------- SHEET (bottom) ---------- */
	.sheet-backdrop {
		position: fixed; inset: 0;
		background: var(--s-overlay);
		opacity: 0;
		z-index: var(--z-sheet);
		transition: opacity var(--t-base) var(--ease-out);
	}
	.sheet-backdrop.is-open { opacity: 1; }
	.sheet {
		position: fixed;
		left: 0; right: 0; bottom: 0;
		max-height: 92vh;
		background: var(--s-elevated);
		border-radius: var(--r-xl) var(--r-xl) 0 0;
		padding: var(--sp-5) var(--sp-4) calc(var(--sp-5) + var(--safe-bottom));
		z-index: var(--z-sheet);
		transform: translateY(100%);
		transition: transform var(--t-slow) var(--ease-spring);
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.sheet.is-open { transform: translateY(0); }
	.sheet__handle {
		width: 44px; height: 4px;
		background: var(--c-ink-20);
		border-radius: 2px;
		margin: -4px auto var(--sp-4);
	}
	.sheet__title { font-family: var(--f-display); font-size: var(--fs-3xl); margin-bottom: var(--sp-3); }

	/* ---------- EMPTY STATE ---------- */
	.empty {
		text-align: center;
		padding: var(--sp-8) var(--sp-4);
		max-width: 420px;
		margin: 0 auto;
	}
	.empty__icon {
		width: 72px; height: 72px;
		border-radius: 20px;
		background: var(--c-ink-5);
		display: grid; place-items: center;
		margin: 0 auto var(--sp-4);
		font-size: 28px;
		color: var(--c-ink-60);
	}
	.empty__title { font-family: var(--f-display); font-size: var(--fs-3xl); margin-bottom: var(--sp-2); }
	.empty__desc  { color: var(--c-ink-60); margin-bottom: var(--sp-5); }

	/* ---------- STEPPER ---------- */
	.stepper {
		display: flex;
		gap: var(--sp-2);
		margin: var(--sp-5) 0;
	}
	.stepper__item {
		flex: 1;
		display: flex; align-items: center; gap: 8px;
		padding: 12px;
		border-radius: var(--r-sm);
		background: var(--c-ink-5);
		border: 1px solid var(--s-border);
		font-family: var(--f-mono);
		font-size: 11px;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: var(--c-ink-60);
		font-weight: 600;
	}
	.stepper__item[aria-current="step"] {
		background: var(--c-ink);
		color: var(--c-brand);
		border-color: var(--c-ink);
	}
	.stepper__item[data-done="true"] {
		background: var(--c-brand-light);
		color: var(--c-ink);
		border-color: transparent;
	}
	.stepper__num { opacity: 0.5; font-variant-numeric: tabular-nums; }
	.stepper__item[aria-current="step"] .stepper__num { opacity: 1; }
	[data-theme="dark"] .stepper__num { opacity: 0.75; }  /* dark: mais visível */
	@media (max-width: 479px) {
		.stepper__item span:not(.stepper__num) { display: none; }
		.stepper__item { justify-content: center; }
	}

	/* ---------- COUNTDOWN ---------- */
	.countdown {
		display: inline-flex;
		gap: var(--sp-2);
		font-family: var(--f-mono);
		font-variant-numeric: tabular-nums;
	}
	.countdown__unit {
		min-width: 44px;
		padding: 6px 10px;
		background: var(--c-ink);
		color: var(--c-brand);
		border-radius: var(--r-sm);
		text-align: center;
		font-weight: 600;
		font-size: var(--fs-sm);
	}

	/* ---------- HEADER APP ---------- */
	.app-bar {
		position: sticky;
		top: 0;
		z-index: var(--z-header);
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--sp-3);
		height: calc(var(--header-h) + var(--safe-top));
		padding: var(--safe-top) var(--sp-4) 0;
		background: color-mix(in srgb, var(--s-surface) 85%, transparent);
		backdrop-filter: saturate(180%) blur(12px);
		-webkit-backdrop-filter: saturate(180%) blur(12px);
		border-bottom: 1px solid var(--s-border);
	}

	/* ---------- TAB BAR (mobile) ---------- */
	.tab-bar {
		position: fixed;
		left: 0; right: 0; bottom: 0;
		z-index: var(--z-header);
		display: none;
		grid-auto-flow: column;
		grid-auto-columns: 1fr;
		height: calc(var(--tabbar-h) + var(--safe-bottom));
		padding-bottom: var(--safe-bottom);
		background: color-mix(in srgb, var(--s-surface) 92%, transparent);
		backdrop-filter: saturate(180%) blur(14px);
		-webkit-backdrop-filter: saturate(180%) blur(14px);
		border-top: 1px solid var(--s-border);
	}
	.tab-bar__item {
		display: flex; flex-direction: column;
		align-items: center; justify-content: center;
		gap: 2px;
		color: var(--c-ink-40);
		font-size: 10px;
		font-weight: 600;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		transition: color var(--t-fast) var(--ease-out);
	}
	.tab-bar__item i { font-size: 20px; }
	.tab-bar__item[aria-current="page"] { color: var(--c-ink); }
	.tab-bar__item:hover { color: var(--c-ink); }
	@media (max-width: 1023px) {
		.tab-bar { display: grid; }
	}

	/* ---------- APP RAIL (desktop) ---------- */
	.app-rail {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: var(--z-header);
		display: none;
		width: 92px;
		padding: calc(var(--safe-top) + var(--sp-4)) var(--sp-3) var(--sp-4);
		background: color-mix(in srgb, var(--s-surface) 94%, transparent);
		border-right: 1px solid var(--s-border);
		backdrop-filter: saturate(180%) blur(14px);
		-webkit-backdrop-filter: saturate(180%) blur(14px);
	}
	.app-rail__brand {
		display: grid;
		place-items: center;
		gap: 6px;
		margin-bottom: var(--sp-5);
		font-family: var(--f-mono);
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.06em;
		color: var(--c-ink);
	}
	.app-rail__nav {
		display: grid;
		gap: var(--sp-2);
	}
	.app-rail__item,
	.app-rail__mini {
		display: grid;
		place-items: center;
		gap: 6px;
		min-height: 62px;
		padding: 8px 6px;
		border-radius: var(--r-sm);
		color: var(--c-ink-40);
		font-size: 10px;
		font-weight: 700;
		letter-spacing: 0.05em;
		text-transform: uppercase;
		transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
	}
	.app-rail__item i,
	.app-rail__mini i { font-size: 20px; }
	.app-rail__item:hover,
	.app-rail__mini:hover,
	.app-rail__item[aria-current="page"],
	.app-rail__mini.is-active {
		background: var(--c-ink);
		color: var(--c-on-ink);
	}
	.app-rail__mini {
		position: absolute;
		left: var(--sp-3);
		right: var(--sp-3);
		bottom: calc(var(--safe-bottom) + var(--sp-4));
	}
	@media (min-width: 1024px) {
		body.with-tabbar { padding-left: 92px; }
		.app-rail { display: block; }
	}

	/* ---------- LOGO MARK ---------- */
	.logo-mark {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		font-family: var(--f-display);
		font-size: 26px;
		letter-spacing: -0.02em;
		color: var(--c-ink);
	}
	.logo-mark__g {
		width: 36px; height: 36px;
		border-radius: 10px;
		background: var(--c-ink);
		color: var(--c-brand);
		display: grid; place-items: center;
		font-family: var(--f-mono);
		font-size: 15px;
		font-weight: 600;
	}

	/* ---------- ICON BUTTON ---------- */
	.icon-btn {
		display: inline-grid;
		place-items: center;
		min-width: 44px;
		min-height: 44px;
		border-radius: var(--r-pill);
		color: var(--c-ink-60);
		transition: background var(--t-fast) var(--ease-out),
					color var(--t-fast) var(--ease-out);
		flex-shrink: 0;
	}
	.icon-btn:hover { background: var(--c-ink-10); color: var(--c-ink); }
	.icon-btn:focus-visible { outline: none; box-shadow: var(--e-focus); }
	.icon-btn i { font-size: 18px; }

	/* ---------- DARK MODE TOGGLE ---------- */
	.dark-toggle {
		display: inline-grid;
		place-items: center;
		min-width: 44px;
		min-height: 44px;
		border-radius: var(--r-pill);
		color: var(--c-ink-60);
		transition: background var(--t-fast) var(--ease-out),
					color var(--t-fast) var(--ease-out);
	}
	.dark-toggle:hover  { background: var(--c-ink-10); color: var(--c-ink); }
	.dark-toggle:focus-visible { outline: none; box-shadow: var(--e-focus); }
	/* ícone: sol visível no light, lua visível no dark */
	.dark-toggle .dt-moon { display: none; }
	[data-theme="dark"] .dark-toggle .dt-sun  { display: none; }
	[data-theme="dark"] .dark-toggle .dt-moon { display: inline; }

	/* ---------- QTY STEPPER ---------- */
	.qty-stepper {
		display: inline-flex;
		align-items: center;
		gap: 2px;
		background: var(--c-ink-5);
		border-radius: var(--r-pill);
		padding: 2px;
	}
	.qty-stepper__btn {
		width: 44px;
		height: 44px;
		border-radius: 50%;
		background: var(--s-surface);
		display: grid;
		place-items: center;
		font-weight: 700;
		font-size: 18px;
		color: var(--c-ink);
		transition: background var(--t-fast) var(--ease-out),
					color var(--t-fast) var(--ease-out);
		touch-action: manipulation; /* evita 300ms delay no iOS */
		-webkit-tap-highlight-color: transparent;
	}
	.qty-stepper__btn:hover  { background: var(--c-ink); color: var(--c-on-ink); }
	.qty-stepper__btn:active { transform: scale(0.94); }
	.qty-stepper__btn:disabled { opacity: 0.3; cursor: not-allowed; }
	.qty-stepper__num {
		min-width: 36px;
		text-align: center;
		font-weight: 700;
		font-size: var(--fs-md);
		font-variant-numeric: tabular-nums;
	}

	/* ---------- EVENTO CARD — slot de preço ---------- */
	.evt-card__price {
		font-family: var(--f-mono);
		font-size: var(--fs-xs);
		font-weight: 700;
		color: var(--c-ink);
		letter-spacing: 0.02em;
		margin-top: var(--sp-2);
	}
	.evt-card__price--free { color: var(--c-success); }

	/* ---------- LINK MUDO ---------- */
	.link-underline {
		color: var(--c-ink);
		text-decoration: underline;
		text-underline-offset: 3px;
		text-decoration-thickness: 1px;
		text-decoration-color: var(--c-ink-20);
		transition: text-decoration-color var(--t-fast) var(--ease-out);
	}
	.link-underline:hover { text-decoration-color: var(--c-ink); }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
/* Regras fora de layer (prioridade natural) */
@media (max-width: 1023px) {
	body.with-tabbar {
		padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px) !important;
	}
}

@layer utilities {
	.u-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;
	}
	.u-hidden    { display: none !important; }
	.u-visible-sm { display: none; }
	.u-visible-md { display: none; }
	@media (min-width: 640px)  { .u-hidden-sm { display: none !important; } .u-visible-sm { display: inline-flex; } }
	@media (min-width: 1024px) { .u-hidden-md { display: none !important; } .u-visible-md { display: inline-flex; } }

	.u-flex   { display: flex; }
	.u-grid   { display: grid; }
	.u-gap-1  { gap: var(--sp-1); } .u-gap-2 { gap: var(--sp-2); } .u-gap-3 { gap: var(--sp-3); }
	.u-gap-4  { gap: var(--sp-4); } .u-gap-5 { gap: var(--sp-5); } .u-gap-6 { gap: var(--sp-6); }
	.u-center { display: grid; place-items: center; }
	.u-stack  { display: flex; flex-direction: column; }
	.u-stack-4 { display: flex; flex-direction: column; gap: var(--sp-4); }

	.u-mt-1 { margin-top: var(--sp-1); } .u-mt-2 { margin-top: var(--sp-2); }
	.u-mt-3 { margin-top: var(--sp-3); } .u-mt-4 { margin-top: var(--sp-4); }
	.u-mt-5 { margin-top: var(--sp-5); } .u-mt-6 { margin-top: var(--sp-6); }
	.u-mb-1 { margin-bottom: var(--sp-1); } .u-mb-2 { margin-bottom: var(--sp-2); }
	.u-mb-3 { margin-bottom: var(--sp-3); } .u-mb-4 { margin-bottom: var(--sp-4); }
	.u-mb-5 { margin-bottom: var(--sp-5); } .u-mb-6 { margin-bottom: var(--sp-6); }

	.u-text-center { text-align: center; }
	.u-text-right  { text-align: right; }
	.u-bold { font-weight: 700; }
	.u-mono { font-family: var(--f-mono); }

	.u-safe-top    { padding-top: var(--safe-top); }
	.u-safe-bottom { padding-bottom: var(--safe-bottom); }
}
