/* ════════════════════════════════════════════════════════════════════════════ */
/* ── modals.css — Modal system, tiers, pricing, QR, toast, legal, badges ───── */
/* ════════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════════ */
/* ── TIER BADGES (Pro coin / Max prismatic) ────────────────────────────────── */
/* ════════════════════════════════════════════════════════════════════════════ */
.rail-tier-badge.tier-pro,
.mobile-tier-badge.tier-pro {
	background:
		radial-gradient(circle at 32% 28%, rgba(255,255,255,0.95) 0%, rgba(255,244,200,0.65) 12%, rgba(245,208,96,0.0) 34%),
		radial-gradient(circle at 70% 75%, rgba(120,82,12,0.55) 0%, rgba(120,82,12,0.0) 45%),
		linear-gradient(150deg, #FBE38B 0%, #F2C84B 26%, #D49A18 58%, #9C6B0C 100%);
	box-shadow:
		inset 0 1px 2px rgba(255,255,255,0.85),
		inset 0 -2px 3px rgba(90,60,6,0.65),
		inset 0 0 0 2px rgba(150,104,18,0.55),
		0 2px 5px rgba(90,60,6,0.45);
}
.rail-tier-badge.tier-pro svg,
.mobile-tier-badge.tier-pro svg { filter: drop-shadow(0 1px 0.5px rgba(255,255,255,0.45)); }

.rail-tier-badge.tier-max,
.mobile-tier-badge.tier-max {
	background: conic-gradient(from 0deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #c77dff, #ff6b6b);
	color: #FFFFFF;
	text-shadow: 0 1px 4px rgba(0,0,0,0.55);
	animation: sulata-aurora 4s linear infinite, sulata-glow 3s ease-in-out infinite alternate;
}

.rail-tier-badge.tier-max::after {
	content: '\2736';
	position: absolute; bottom: -4px; right: -4px; width: 15px; height: 15px; border-radius: 50%;
	background: var(--text-primary); border: 1.5px solid rgba(255,255,255,0.6);
	display: flex; align-items: center; justify-content: center;
	font-size: 0.5rem; line-height: 15px; text-align: center; color: #F5D060;
	text-shadow: none; pointer-events: none; z-index: 3;
}
.mobile-tier-badge.tier-max::after {
	content: '\2736';
	position: absolute; bottom: -3px; right: -3px; width: 13px; height: 13px; border-radius: 50%;
	background: var(--text-primary); border: 1.5px solid rgba(255,255,255,0.6);
	display: flex; align-items: center; justify-content: center;
	font-size: 0.46rem; line-height: 13px; text-align: center; color: #F5D060;
	text-shadow: none; pointer-events: none; z-index: 3;
}

.rail-tier-badge.tier-max svg,
.mobile-tier-badge.tier-max svg {
	color: #FFFFFF; fill: #FFFFFF;
	filter: drop-shadow(0 1.5px 2px rgba(0,0,0,0.65)) !important;
}

@keyframes sulata-aurora {
	from { filter: hue-rotate(0deg) brightness(1.05); }
	to   { filter: hue-rotate(360deg) brightness(1.05); }
}
@keyframes sulata-glow {
	from { box-shadow: 0 0 0 2px rgba(255,255,255,0.55), 0 0 8px 2px rgba(109,203,119,0.55), 0 0 18px 4px rgba(77,150,255,0.35); }
	to   { box-shadow: 0 0 0 2px rgba(255,255,255,0.75), 0 0 14px 5px rgba(199,125,255,0.65), 0 0 28px 8px rgba(255,107,107,0.35); }
}

/* ════════════════════════════════════════════════════════════════════════════ */
/* ── MODALS ──────────────────────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════════════════════════ */
.modal {
	position: fixed;
	inset: 0;
	z-index: var(--z-modal);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.modal-overlay { position: absolute; inset: 0; background: var(--modal-backdrop); backdrop-filter: blur(3px); }

.modal-box {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	width: 100%;
	max-width: 460px;
	max-height: 88vh;
	overflow-y: auto;
	box-shadow: var(--shadow-lg);
	z-index: 1;
}
.modal-box-sm { max-width: 360px; }
.modal-box-pro { max-width: 580px; }
.modal-box-landing { max-width: 1020px; max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-box-landing .modal-body { flex: 1; overflow-y: auto; padding: 34px 42px 30px; }

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 26px 18px;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	background: var(--surface);
	z-index: 2;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.3px; }

.modal-close {
	background: transparent; border: none; font-size: 1.5rem; cursor: pointer;
	color: var(--text-muted); line-height: 1; padding: 4px 8px; border-radius: var(--radius-sm);
	transition: var(--transition); min-width: 36px; min-height: 36px;
}
.modal-close:hover { background: var(--border); color: var(--text-primary); }

.modal-body { padding: 22px 26px; }
.modal-body-scroll { max-height: 68vh; overflow-y: auto; }

.modal-footer {
	padding: 18px 26px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	border-top: 1px solid var(--border);
}

.settings-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--text-primary); }
.settings-divider { height: 1px; background: var(--border); margin: 22px 0; }

/* ── About modal ───────────────────────────────────────────────────────────── */
.about-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.about-hero-icon { font-size: 2.6rem; flex-shrink: 0; }
.about-product-name { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); margin-bottom: 3px; letter-spacing: -0.3px; }
.about-tagline { font-size: 0.86rem; color: var(--text-secondary); font-style: italic; }
.about-body-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; }
.about-body-text strong { color: var(--text-primary); }
.about-action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.about-footer-note { font-size: 0.78rem; color: var(--text-muted); text-align: center; line-height: 1.6; }

/* ── Upgrade modal status banner ───────────────────────────────────────────── */
.upgrade-plan-status {
	display: flex; align-items: center; gap: 10px;
	background: var(--accent-soft);
	border: 1.5px solid var(--accent);
	border-radius: var(--radius-md);
	padding: 13px 18px; margin-bottom: 22px;
	font-size: 0.95rem; font-weight: 700; color: var(--text-primary); line-height: 1.5;
}
.upgrade-plan-status-icon { font-size: 1.1rem; color: var(--pro-gold); flex-shrink: 0; }
html.night-mode .upgrade-plan-status-icon { color: var(--accent); }

/* ── Landing Hero ──────────────────────────────────────────────────────────── */
.landing-hero { text-align: center; padding: 8px 0 30px; }
.landing-hero-icon { font-size: 3.2rem; display: block; margin-bottom: 14px; }
.landing-hero-headline { font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.7rem); font-weight: 800; color: var(--text-primary); letter-spacing: -0.6px; line-height: 1.15; margin-bottom: 10px; }
.landing-hero-tagline { font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.15rem); color: var(--text-secondary); font-style: italic; margin-bottom: 18px; }
.landing-hero-body { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.8; max-width: 650px; margin: 0 auto 24px; }
.landing-hero-body strong { color: var(--text-primary); }

.landing-value-props { display: flex; align-items: stretch; justify-content: center; gap: 12px; flex-wrap: wrap; }
.landing-value-pill {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	flex: 1 1 0; min-width: 150px; min-height: 108px;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-md); padding: 16px; font-size: 0.84rem; font-weight: 700;
	color: var(--text-primary); text-align: center; box-shadow: var(--shadow-xs);
}
.landing-value-pill span[aria-hidden] { font-size: 1.4rem; }
.landing-value-pill .landing-value-sub { font-size: 0.72rem; font-weight: 500; color: var(--text-secondary); }

/* ── QR Demo ───────────────────────────────────────────────────────────────── */
.qr-demo { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 26px 22px 20px; margin: 10px 0 30px; }
.qr-demo-row { display: flex; align-items: stretch; justify-content: center; gap: 14px; flex-wrap: nowrap; }
.qr-demo-device { flex: 1 1 0; min-width: 0; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; }
.qr-demo-device-label { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); }
.qr-demo-lock { color: var(--accent-hover); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); animation: qr-demo-lock-glow 2.4s ease-in-out infinite alternate; }
@keyframes qr-demo-lock-glow { from { box-shadow: 0 0 0 0 rgba(224,178,48,0.0); } to { box-shadow: 0 0 12px 3px rgba(224,178,48,0.5); } }
.qr-demo-square { display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); gap: 3px; width: 56px; height: 56px; padding: 5px; background: var(--surface); border: 2px solid var(--accent-hover); border-radius: 6px; animation: qr-demo-square-pulse 2s ease-in-out infinite; }
.qr-demo-square-cell { background: var(--text-primary); border-radius: 1px; }
.qr-demo-square-cell:nth-child(2),.qr-demo-square-cell:nth-child(4),.qr-demo-square-cell:nth-child(6),.qr-demo-square-cell:nth-child(8) { background: transparent; }
@keyframes qr-demo-square-pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.06); } }
.qr-demo-chips { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.qr-demo-chip { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--text-primary); background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px 10px; animation: qr-demo-chip-highlight 3s ease-in-out infinite; }
.qr-demo-chip:nth-child(1) { animation-delay: 0s; }
.qr-demo-chip:nth-child(2) { animation-delay: 0.5s; }
.qr-demo-chip:nth-child(3) { animation-delay: 1s; }
@keyframes qr-demo-chip-highlight { 0%,60%,100% { background: var(--accent-soft); } 20%,40% { background: var(--accent); border-color: var(--accent-hover); color: var(--accent-contrast); } }
.qr-demo-relay { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 86px; padding: 0 4px; }
.qr-demo-track { position: relative; width: 72px; height: 3px; background: var(--border); border-radius: 3px; overflow: visible; }
.qr-demo-dot { position: absolute; top: 50%; left: 0; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--accent-hover); animation: qr-demo-dot-travel 2.6s ease-in-out infinite; }
@keyframes qr-demo-dot-travel { 0% { left: 0; opacity: 0.2; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 9px); opacity: 0.2; } }
.qr-demo-cloud { color: var(--text-muted); display: inline-flex; }
.qr-demo-cloud-label { font-size: 0.66rem; font-weight: 600; color: var(--text-muted); text-align: center; line-height: 1.3; }
.qr-demo-check { color: var(--success-dark); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--success-soft); }
.qr-demo-receive-note { font-size: 0.74rem; color: var(--text-secondary); line-height: 1.4; }
.qr-demo-caption { font-size: 0.8rem; color: var(--text-secondary); text-align: center; line-height: 1.6; margin-top: 18px; max-width: 630px; margin-left: auto; margin-right: auto; }

/* ── Why grid ──────────────────────────────────────────────────────────────── */
.why-section { margin: 10px 0 30px; }
.why-heading { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); font-weight: 800; color: var(--text-primary); text-align: center; margin-bottom: 20px; letter-spacing: -0.4px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.why-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.why-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.why-card-icon { font-size: 1.7rem; line-height: 1; }
.why-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.why-card-body { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.65; }

/* ── Pricing Table ─────────────────────────────────────────────────────────── */
.pricing-table { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.pricing-col { display: flex; flex-direction: column; border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; position: relative; background: var(--surface); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.pricing-col:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pricing-col-featured { border-color: var(--accent-hover); box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm); }
.pricing-col-featured:hover { box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.pricing-col-max { border-color: #C3B1E1; }
html.night-mode .pricing-col-max { border-color: #6B5A8A; }
.pricing-col-featured-badge { background: var(--accent); color: var(--accent-contrast); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; text-align: center; padding: 5px 0; }
.pricing-col-header { padding: 22px 20px 16px; border-bottom: 1px solid var(--border); background: var(--bg); }
.pricing-tier-name { font-size: 0.95rem; font-weight: 800; color: var(--text-primary); margin-bottom: 5px; letter-spacing: -0.2px; }
.pricing-tier-price { font-size: 1.9rem; font-weight: 800; color: var(--text-primary); letter-spacing: -1px; line-height: 1; margin-bottom: 5px; }
.pricing-tier-desc { font-size: 0.74rem; color: var(--text-secondary); line-height: 1.4; }
.pricing-feature-list { list-style: none; padding: 16px 20px; flex: 1; }
.pricing-feature-item { font-size: 0.82rem; color: var(--text-secondary); padding: 6px 0 6px 22px; position: relative; line-height: 1.45; }
.pricing-feature-item::before { position: absolute; left: 0; top: 6px; font-size: 0.8rem; line-height: 1.45; }
.pricing-feature-yes { color: var(--text-primary); }
.pricing-feature-yes::before { content: '✓'; color: var(--success-dark); font-weight: 700; }
.pricing-feature-no { opacity: 0.45; }
.pricing-feature-no::before { content: '—'; color: var(--text-muted); }
.pricing-cta-area { padding: 16px 20px 20px; margin-top: auto; }
.pricing-cta-btn { display: block; width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; font-family: var(--font); font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; transition: var(--transition); border: none; }
.pricing-cta-btn-pro { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-xs); }
.pricing-cta-btn-pro:hover { background: var(--accent-hover); color: var(--accent-contrast); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pricing-cta-btn-max { background: linear-gradient(135deg, #C3B1E1 0%, #A7C7E7 50%, #A8D5B5 100%); color: #2C2C2C; box-shadow: var(--shadow-xs); }
.pricing-cta-btn-max:hover { filter: brightness(0.94); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pricing-cta-btn-disabled { cursor: default; pointer-events: none; opacity: 0.55; filter: grayscale(0.4); }
.pricing-current-plan { text-align: center; font-size: 0.8rem; color: var(--text-secondary); padding: 9px 0; font-style: italic; }
.pricing-current-plan-active { font-style: normal; font-weight: 800; color: var(--pro-gold); background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: var(--radius-sm); }
html.night-mode .pricing-current-plan-active { color: var(--accent); }
.pricing-cta-note { text-align: center; font-size: 0.7rem; color: var(--text-muted); margin-top: 7px; line-height: 1.4; }
.pricing-clarify-note { text-align: center; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 18px; padding: 0 8px; }
.pricing-clarify-note strong { color: var(--text-primary); }
.pricing-license-section { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 20px; }
.pricing-license-heading { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.pricing-license-row { display: flex; flex-direction: row; gap: 10px; align-items: center; }
.pricing-license-input { flex: 1; min-width: 0; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; font-family: var(--font); background: var(--surface); color: var(--text-primary); transition: var(--transition); outline: none; letter-spacing: 0.03em; }
.pricing-license-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pricing-license-input::placeholder { color: var(--text-muted); letter-spacing: normal; }
.pricing-activate-btn { flex-shrink: 0; width: auto; margin-top: 0; padding: 11px 22px; white-space: nowrap; }

.pro-modal-guarantee {
	display: flex; align-items: center; gap: 10px;
	font-size: 0.82rem; color: var(--text-secondary);
	background: var(--bg); border: 1px solid var(--border);
	border-radius: var(--radius-sm); padding: 12px 15px; margin-bottom: 18px; line-height: 1.5;
}
.pro-modal-buy-link { color: var(--pro-gold); font-weight: 600; text-decoration: none; transition: color 0.15s ease; }
.pro-modal-buy-link:hover { color: var(--accent-hover); text-decoration: underline; }
html.night-mode .pro-modal-buy-link { color: var(--accent); }

.modal-compliance-footer {
	display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
	padding: 16px 0 4px; border-top: 1px solid var(--border);
	font-size: 0.76rem; color: var(--text-muted);
}
.compliance-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: color 0.15s ease; cursor: pointer; }
.compliance-link:hover { color: var(--text-primary); text-decoration: underline; }
.compliance-sep { opacity: 0.4; user-select: none; }

/* ── FAQ / Privacy / ToS ───────────────────────────────────────────────────── */
.faq-item { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-question { font-size: 0.93rem; font-weight: 700; color: var(--text-primary); margin-bottom: 9px; line-height: 1.4; }
.faq-answer { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: 6px; }
.faq-answer:last-child { margin-bottom: 0; }
.faq-answer strong { color: var(--text-primary); }
.faq-list { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.75; padding-left: 22px; margin-top: 4px; }
.faq-list li { margin-bottom: 5px; }
.faq-list li strong { color: var(--text-primary); }
.faq-code { font-family: var(--font-mono); font-size: 0.84em; background: var(--accent-soft); color: var(--text-primary); padding: 1px 6px; border-radius: var(--radius-xs); border: 1px solid var(--border); }

.privacy-effective { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 18px; opacity: 0.85; }
.privacy-section, .tos-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.privacy-section:last-child, .tos-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.privacy-heading, .tos-heading { font-size: 0.93rem; font-weight: 700; color: var(--text-primary); margin-bottom: 9px; }
.privacy-body, .tos-body { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: 6px; }
.privacy-body:last-child, .tos-body:last-child { margin-bottom: 0; }
.privacy-body strong, .tos-body strong { color: var(--text-primary); }
.privacy-list { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.75; padding-left: 22px; margin-top: 6px; margin-bottom: 6px; }
.privacy-list li { margin-bottom: 5px; }
.privacy-list li strong { color: var(--text-primary); }

/* ── Injected modal fast-render ────────────────────────────────────────────── */
.modal-injecting { opacity: 0; pointer-events: none; }
.modal-injecting .modal-box { transform: translateY(8px) scale(0.99); }
.modal-revealing .modal-box { transform: translateY(0) scale(1); transition: transform 0.16s cubic-bezier(0.4, 0, 0.2, 1); }

/* ════════════════════════════════════════════════════════════════════════════ */
/* ── QR Modal ──────────────────────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════════════════════════ */
.qr-instructions { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 18px; }
.qr-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 26px 0; font-size: 0.9rem; color: var(--text-secondary); }
.qr-spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent-hover); border-radius: 50%; animation: qr-spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes qr-spin { to { transform: rotate(360deg); } }
.qr-result { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0; }
.qr-image { width: 250px; height: 250px; border-radius: var(--radius-md); border: 3px solid var(--border); display: block; image-rendering: pixelated; image-rendering: crisp-edges; background: #fff; }
.qr-token-text { font-family: var(--font-mono); font-size: 0.92rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.08em; background: var(--accent-soft); padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); word-break: break-all; text-align: center; }
.qr-triplet-text { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.06em; background: var(--accent-soft); padding: 11px 18px; border-radius: var(--radius-sm); border: 2px solid var(--accent-hover); word-break: break-all; text-align: center; margin-top: 4px; }
.qr-triplet-label { font-size: 0.75rem; color: var(--text-secondary); text-align: center; margin-top: 2px; }
.qr-expire-note {
	font-size: 0.78rem; color: var(--text-secondary); text-align: center;
	background: var(--success-soft); border-radius: var(--radius-sm); padding: 8px 14px; line-height: 1.5;
}

.token-input-row { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.token-word-input { flex: 1; min-width: 0; padding: 12px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: var(--font-mono); background: var(--bg); color: var(--text-primary); text-align: center; text-transform: lowercase; transition: var(--transition); outline: none; letter-spacing: 0.04em; }
.token-word-input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.token-word-input::placeholder { color: var(--text-muted); letter-spacing: normal; }
.token-hyphen { font-size: 1.3rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0; line-height: 1; user-select: none; }

#qr-modal .modal-body { max-height: 75vh; overflow-y: auto; }

/* ════════════════════════════════════════════════════════════════════════════ */
/* ── Toast ─────────────────────────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════════════════════════ */
.toast {
	position: fixed;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	left: 50%;
	transform: translateX(-50%);
	background: var(--text-primary);
	color: var(--bg);
	padding: 13px 24px;
	border-radius: var(--radius-md);
	font-size: 0.88rem;
	font-weight: 500;
	z-index: var(--z-toast);
	box-shadow: var(--shadow-lg);
	transition: opacity 0.3s ease;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: calc(100vw - 32px);
}
.toast.success { background: var(--success-dark); color: #fff; }
.toast.error   { background: var(--danger-dark); color: #fff; }
.toast.update  { background: var(--text-primary); color: var(--bg); }

.toast-action-btn {
	background: var(--accent); color: var(--accent-contrast); border: none;
	border-radius: var(--radius-sm); padding: 6px 13px; font-size: 0.82rem; font-weight: 700;
	cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: var(--transition);
}
.toast-action-btn:hover { background: var(--accent-hover); }
.toast-action-secondary-btn { background: transparent; color: currentColor; border: 1px solid rgba(255,255,255,0.4); }
.toast-action-secondary-btn:hover { background: rgba(255,255,255,0.12); }

/* ════════════════════════════════════════════════════════════════════════════ */
/* ── AFFILIATE CONSENT BANNER ──────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════════════════════════ */
.affiliate-consent-banner {
	position: fixed;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	left: 50%;
	transform: translateX(-50%);
	width: calc(100% - 32px);
	max-width: 520px;
	background: var(--surface);
	color: var(--text-primary);
	border: 1.5px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	padding: 16px 18px;
	z-index: calc(var(--z-toast) - 1);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.affiliate-consent-text { font-size: 0.86rem; line-height: 1.6; color: var(--text-secondary); }
.affiliate-consent-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.affiliate-consent-btn { padding: 9px 16px; border-radius: var(--radius-sm); font-size: 0.85rem; font-family: var(--font); font-weight: 700; cursor: pointer; transition: var(--transition); border: none; white-space: nowrap; }
.affiliate-consent-allow { background: var(--accent); color: var(--accent-contrast); }
.affiliate-consent-allow:hover { background: var(--accent-hover); }
.affiliate-consent-decline { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.affiliate-consent-decline:hover { background: var(--accent-soft); color: var(--text-primary); border-color: var(--accent); }

/* ════════════════════════════════════════════════════════════════════════════ */
/* ── RESPONSIVE — modals ───────────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
	.modal-box-landing { max-width: 92vw; }
	.why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
	.modal {
		padding: 12px;
		padding-left:  max(12px, env(safe-area-inset-left, 0px));
		padding-right: max(12px, env(safe-area-inset-right, 0px));
		padding-top:   max(12px, env(safe-area-inset-top, 0px));
		padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
	}

	.modal-box,
	.modal-box-sm,
	.modal-box-pro,
	.modal-box-landing {
		width: 100%;
		max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
	}

	.modal-box-landing { border-radius: var(--radius-md); display: flex; flex-direction: column; overflow: hidden; }
	.modal-box-landing .modal-body { padding: 20px 16px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }

	.modal-body { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
	.modal-footer { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }

	.pricing-table { grid-template-columns: 1fr; gap: 14px; }
	.why-grid { grid-template-columns: 1fr; }
	.landing-value-props { gap: 8px; }
	.landing-value-pill { min-width: calc(50% - 4px); min-height: 100px; padding: 14px; }

	.qr-demo { padding: 18px 14px 14px; }
	.qr-demo-row { flex-wrap: wrap; gap: 12px; }
	.qr-demo-device { flex: 1 1 100%; }
	.qr-demo-relay { flex: 1 1 100%; flex-direction: row; justify-content: center; gap: 10px; min-width: 0; padding: 4px 0; }
	.qr-demo-track { width: 50px; }

	.pricing-license-row { flex-direction: column; align-items: stretch; }
	.pricing-activate-btn { width: 100%; }

	.toast { white-space: normal; text-align: left; flex-wrap: wrap; justify-content: center; }

	.token-input-row { flex-wrap: nowrap; }
	.token-word-input { padding: 11px 6px; font-size: 0.88rem; }

	.about-action-row { flex-direction: column; }
	.about-action-row .btn { width: 100%; }

	.modal-compliance-footer { gap: 6px; }

	.affiliate-consent-banner { width: calc(100% - 20px); max-width: none; padding: 14px; }
	.affiliate-consent-actions { justify-content: stretch; }
	.affiliate-consent-btn { flex: 1 1 auto; text-align: center; }
}

/* ── Reduced motion for animated badges/demos ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.qr-demo-lock, .qr-demo-square, .qr-demo-chip, .qr-demo-dot { animation: none !important; }
	.qr-demo-dot { left: 50%; margin-left: -4.5px; opacity: 1; }
	.rail-tier-badge.tier-max, .mobile-tier-badge.tier-max { animation: none !important; }
	.why-card { transition: none !important; }
	.why-card:hover { transform: none !important; }
	.sidebar-overlay { transition: none !important; }
}