:root {
    color-scheme: light;
    --bg: #f6f7ff;
    --bg-strong: #ffffff;
    --surface: #ffffff;
    --surface-2: #eef1ff;
    --text: #111827;
    --muted: #65708a;
    --border: #dfe4f7;
    --primary: #1e3a8a;
    --primary-strong: #172554;
    --primary-soft: #dbe7ff;
    --pink: #ec4899;
    --pink-soft: #fde7f3;
    --indigo: #8b5cf6;
    --indigo-soft: #eee7ff;
    --ink: #111416;
    --danger: #d94b4b;
    --shadow: 0 24px 80px rgba(27, 31, 34, .12);
    --shadow-soft: 0 14px 36px rgba(27, 31, 34, .08);
    --radius: 8px;
    --radius-lg: 22px;
    --topbar: 70px;
    --bottom-nav: 74px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
    color-scheme: light;
    --bg: #f4f5f7;
    --bg-strong: #ffffff;
    --surface: #ffffff;
    --surface-2: #fafbff;
    --text: #1f2230;
    --muted: #6f7480;
    --border: #e3e5ec;
    --primary: #673de6;
    --primary-strong: #5d35df;
    --primary-soft: #f1ecff;
    --pink: #e54f7d;
    --pink-soft: #fff0f5;
    --indigo: #315ae8;
    --indigo-soft: #edf2ff;
    --ink: #12141d;
    --danger: #d84343;
    --shadow: 0 18px 52px rgba(35, 38, 52, .08);
    --shadow-soft: 0 8px 26px rgba(35, 38, 52, .06);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

.grecaptcha-badge {
    visibility: hidden !important;
}

.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;
}

.profile-top h1 {
    display: flex;
    align-items: center;
}

.verified-badge {
    margin-left: .35rem;
}

h1 .verified-badge {
    font-size: .7em;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100%;
    margin: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft), transparent 25%), transparent 420px), var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: var(--topbar);
    padding: 0 clamp(16px, 4vw, 42px);
    border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 25%);
    background: color-mix(in srgb, var(--bg-strong), transparent 10%);
    backdrop-filter: blur(18px);
}

.brand,
.top-actions,
.profile-top,
.message-meta,
.section-head,
.hero-actions,
.trust-row,
.share-grid,
.message-actions,
.profile-link-row {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark,
.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    color: #fff;
    font-weight: 850;
}

.avatar {
    overflow: hidden;
    border-radius: 999px;
    background: var(--primary-soft);
}

.brand-mark img,
.logo-avatar img {
    width: 78%;
    height: 78%;
    display: block;
    object-fit: contain;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar.large {
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
}

.avatar.jumbo {
    width: 84px;
    height: 84px;
    font-size: 2rem;
}

.top-actions {
    gap: 10px;
    margin-left: auto;
}

.top-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 18px;
    margin-right: auto;
}

.top-menu .top-menu-link {
    min-height: 40px;
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: .88rem;
}

.top-menu .top-menu-link.active {
    border: 0;
    background: transparent;
    color: var(--primary-strong);
}

.install-prompt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 4px 5px 4px 12px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface), transparent 8%);
    box-shadow: var(--shadow-soft);
}

.install-prompt[hidden] {
    display: none !important;
}

.install-suggestion {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
    white-space: nowrap;
}

.install-suggestion i {
    color: var(--primary-strong);
    font-size: .92rem;
}

.install-prompt[data-install-ready="true"] {
    border-color: color-mix(in srgb, var(--primary), transparent 58%);
    background: color-mix(in srgb, var(--primary-soft), var(--surface) 54%);
}

.install-prompt[data-install-ready="true"] .install-suggestion {
    color: var(--text);
}

.install-app-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: .86rem;
    font-weight: 850;
    white-space: nowrap;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary), transparent 72%);
    transition: transform .18s ease, filter .18s ease, background .18s ease, box-shadow .18s ease;
}

.install-app-button i {
    font-size: .86rem;
}

.install-label-short {
    display: none;
}

.mobile-only {
    display: none;
}

.icon-button.mobile-only {
    display: none;
}

.mobile-public-menu {
    position: fixed;
    inset: 0;
    z-index: 41;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}

.mobile-public-menu[hidden] {
    display: block !important;
    visibility: hidden;
}

.mobile-public-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-public-menu-backdrop {
    display: none;
}

.mobile-public-panel {
    position: absolute;
    top: var(--topbar);
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: color-mix(in srgb, var(--bg-strong), transparent 2%);
    box-shadow: var(--shadow);
    pointer-events: auto;
    overflow: hidden;
    transform: translateX(100%);
    opacity: 0;
    transition: transform .24s ease, opacity .24s ease;
}

.mobile-public-menu.is-open .mobile-public-panel {
    transform: translateX(0);
    opacity: 1;
}

.mobile-public-home-entry {
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    font-size: 1.02rem;
    font-weight: 820;
}

.mobile-public-home-entry.active {
    color: var(--primary-strong);
}

.mobile-public-menu-links {
    display: grid;
    align-content: start;
    padding: 0 14px;
}

.mobile-public-menu-links a {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 2px;
    border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 22%);
    font-size: 1.03rem;
    font-weight: 820;
}

.mobile-public-menu-links a.active {
    color: var(--primary-strong);
}

.mobile-public-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid color-mix(in srgb, var(--border), transparent 14%);
}

.mobile-login-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.06rem;
    font-weight: 850;
}

.mobile-login-link.active {
    color: var(--primary-strong);
}

.mobile-menu-theme-toggle {
    width: 42px;
    height: 42px;
}

.icon-button.mobile-only i {
    transition: transform .2s ease;
}

.icon-button.mobile-only[aria-expanded="true"] i {
    transform: rotate(90deg);
}

.app-main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(10px, 1vw, 20px) 0;
    outline: none;
}

.flash-stack {
    position: fixed;
    top: calc(var(--topbar) + 12px);
    right: 16px;
    z-index: 40;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100% - 32px));
}

.toast {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    transition: opacity .18s ease, transform .18s ease;
}

.toast-warning {
    border-left-color: var(--indigo);
}

.primary-button,
.secondary-button,
.small-button,
.ghost-link,
.share-button,
.icon-pill,
.message-actions button,
.rules-link {
    min-height: 44px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.primary-button,
.small-button {
    padding: 0 20px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--primary), transparent 68%);
}

.primary-button:hover,
.small-button:hover,
.share-button:hover,
.secondary-button:hover,
.message-actions button:hover,
.icon-pill:hover {
    transform: translateY(-1px);
}

.secondary-button,
.ghost-link,
.rules-link {
    padding: 0 18px;
    border-color: var(--border);
    background: color-mix(in srgb, var(--surface), transparent 8%);
    color: var(--text);
}

.secondary-button.small {
    min-height: 38px;
    padding: 0 14px;
    font-size: .92rem;
}

.danger-button {
    border-color: color-mix(in srgb, var(--danger), transparent 45%) !important;
    background: var(--danger) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--danger), transparent 72%);
}

.danger-button.ghost-danger {
    background: color-mix(in srgb, var(--danger), transparent 88%) !important;
    color: var(--danger) !important;
    box-shadow: none;
}

.full {
    width: 100%;
}

.icon-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
}


/* Unified interaction feedback for touch, mouse, and keyboard users. */

:where( .primary-button, .secondary-button, .small-button, .ghost-link, .icon-button, .install-app-button, .rules-link, .profile-link-tool, .owner-link-tool, .message-card-link, .message-step-button, .story-theme-button, .share-story-icon-button, .share-mode-toggle, .share-card-actions button, .bottom-nav a) {
    transition: transform .14s ease, box-shadow .18s ease, filter .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
    transform: translateZ(0);
}

@media (hover: hover) {
     :where( .primary-button, .secondary-button, .small-button, .ghost-link, .icon-button, .install-app-button, .rules-link, .profile-link-tool, .owner-link-tool, .message-card-link, .message-step-button, .story-theme-button, .share-story-icon-button, .share-mode-toggle, .share-card-actions button, .bottom-nav a):hover {
        filter: brightness(1.06);
    }
}

:where( .primary-button, .secondary-button, .small-button, .ghost-link, .icon-button, .install-app-button, .rules-link, .profile-link-tool, .owner-link-tool, .message-card-link, .message-step-button, .story-theme-button, .share-story-icon-button, .share-mode-toggle, .share-card-actions button, .bottom-nav a):focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary), transparent 25%);
    outline-offset: 2px;
}

:where( .primary-button, .secondary-button, .small-button, .ghost-link, .icon-button, .install-app-button, .rules-link, .profile-link-tool, .owner-link-tool, .message-card-link, .message-step-button, .story-theme-button, .share-story-icon-button, .share-mode-toggle, .share-card-actions button, .bottom-nav a):active {
    transform: translateY(1px) scale(.97);
}

.nav-icon,
.success-mark,
.empty-mark {
    display: inline-block;
    position: relative;
}

.theme-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.theme-toggle .theme-icon {
    grid-area: 1 / 1;
}

.theme-toggle .theme-icon-moon {
    display: none !important;
}

html[data-theme="dark"] .theme-toggle .theme-icon-sun {
    display: none !important;
}

html[data-theme="dark"] .theme-toggle .theme-icon-moon {
    display: inline-block !important;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .72fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: center;
    min-height: calc(100vh - var(--topbar) - var(--bottom-nav) - 80px);
}

.hero-copy h1,
.auth-copy h1,
.profile-panel h1,
.section-head h1,
.error-page h1,
.public-profile h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: .96;
    letter-spacing: 0;
}

.section-head h1,
.profile-panel h1,
.public-profile h1 {
    font-size: clamp(1rem, 3vw, 2rem);
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary-strong);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-text,
.auth-copy p,
.profile-prompt,
.empty-state p,
.error-page p {
    max-width: 640px;
    color: var(--muted);
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
}

.hero-actions {
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.trust-row {
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.trust-row span {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: .92rem;
}

.trust-row strong {
    color: var(--text);
}

.phone-preview,
.auth-card,
.profile-panel,
.settings-card,
.composer-card,
.success-panel,
.rules-card,
.message-card,
.empty-state,
.error-page {
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface), transparent 0%);
    box-shadow: var(--shadow);
}

.phone-preview {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 30px;
    min-height: 560px;
    align-content: start;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}

.preview-header strong,
.preview-header span {
    display: block;
}

.preview-header span,
.preview-card span {
    color: var(--muted);
    font-size: .9rem;
}

.message-composer-preview,
.preview-card {
    border-radius: var(--radius-lg);
    padding: 22px;
}

.message-composer-preview {
    min-height: 190px;
    background: var(--surface-2);
}

.message-composer-preview p {
    margin: 0 0 28px;
    font-size: 1.3rem;
    font-weight: 850;
}

.preview-lines {
    display: grid;
    gap: 10px;
}

.preview-lines span {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted), transparent 72%);
}

.preview-lines span:nth-child(2) {
    width: 78%;
}

.preview-lines span:nth-child(3) {
    width: 54%;
}

.preview-card {
    display: grid;
    gap: 4px;
    background: var(--primary-soft);
}

.preview-card.pink {
    background: var(--pink-soft);
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 44px;
}

.feature-strip article {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface), transparent 8%);
}

.feature-strip h2 {
    margin: 10px 0 8px;
    font-size: 1.05rem;
}

.feature-strip p {
    margin: 0;
    color: var(--muted);
}

.feature-dot {
    display: block;
    width: 34px;
    height: 6px;
    border-radius: 999px;
}

.blue-dot {
    background: var(--primary);
}

.pink-dot {
    background: var(--pink);
}

.indigo-dot {
    background: var(--indigo);
}

.auth-wrap {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(320px, 430px);
    gap: clamp(24px, 5vw, 72px);
    align-items: center;
}

.auth-card,
.settings-card,
.composer-card {
    display: grid;
    gap: 18px;
    padding: clamp(18px, 4vw, 28px);
    border-radius: var(--radius-lg);
}

.settings-card-head {
    display: grid;
    gap: 3px;
}

.settings-card-head h2,
.settings-card-head p {
    margin: 0;
}

.settings-card-head h2 {
    font-size: 1.15rem;
}

.settings-card-head p {
    color: var(--muted);
    font-weight: 750;
}

.unified-settings-card {
    gap: 0;
}

.settings-section-form {
    display: grid;
    gap: 18px;
    margin: 0;
}

.input-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.input-action-row button {
    min-width: 104px;
}

button:disabled {
    cursor: not-allowed;
    opacity: .52;
    transform: none !important;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-strong);
    color: var(--text);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input {
    min-height: 52px;
    padding: 0 14px;
}

select {
    min-height: 52px;
    padding: 0 42px 0 14px;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    transform: translateY(-50%);
    transition: color .18s ease, background .18s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--text);
    background: color-mix(in srgb, var(--surface), transparent 8%);
}

textarea {
    resize: vertical;
    min-height: 180px;
    padding: 14px;
    font-weight: 400;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary), transparent 82%);
}

.field-error,
.form-error {
    color: var(--danger);
}

.field-feedback {
    min-height: 1.35em;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 800;
}

.field-feedback.good {
    color: var(--primary);
}

.field-feedback.bad {
    color: var(--ink);
}

.otp-box {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2), transparent 32%);
}

.otp-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.otp-resend {
    min-height: 38px;
}

.reset-flow-card {
    position: relative;
    --reset-step-ms: 210ms;
    transition: opacity var(--reset-step-ms) cubic-bezier(.22, .61, .36, 1), transform var(--reset-step-ms) cubic-bezier(.22, .61, .36, 1);
}

.reset-flow-card.is-transitioning {
    opacity: .84;
    transform: translateY(2px) scale(.996);
    pointer-events: none;
}

.reset-step {
    display: grid;
    gap: 16px;
    animation: pageEnter calc(var(--reset-step-ms) + 40ms) cubic-bezier(.22, .61, .36, 1) both;
}

@media (max-width: 620px) {
    .reset-flow-card {
        --reset-step-ms: 150ms;
    }
    .reset-flow-card.is-transitioning {
        opacity: .9;
        transform: translateY(1px);
    }
}

.form-error {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--danger), transparent 55%);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--danger), transparent 90%);
    font-weight: 800;
}

.fine-print {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.fine-print a,
.section-head a,
.rules-link {
    color: var(--primary-strong);
}

.dashboard,
.messages-page,
.settings-page,
.rules-page,
.legal-page,
.contact-page,
.public-profile {
    display: grid;
    gap: 22px;
}

.legal-card h2 {
    margin: 28px 0 12px;
    color: var(--ink);
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    line-height: 1.2;
    font-weight: 860;
}

.legal-card p {
    margin: 0 0 14px;
    color: var(--muted);
    font-weight: 700;
}

.legal-card ul {
    margin: 0 0 20px;
    padding-left: 20px;
    color: var(--muted);
    font-weight: 700;
}

.legal-card>p:first-of-type {
    margin-bottom: 20px;
    color: var(--text);
    font-size: clamp(1.05rem, 1.6vw, 1.18rem);
    font-weight: 780;
}

.contact-page .contact-card {
    max-width: 700px;
}

.auth-wrap .auth-card+.auth-card {
    margin-top: 14px;
}

.profile-panel {
    padding: clamp(18px, 4vw, 30px);
    border-radius: var(--radius-lg);
}

.profile-panel.public {
    box-shadow: var(--shadow-soft);
}

.profile-top {
    gap: 16px;
}

.muted {
    margin: 3px 0 0;
    color: var(--muted);
}

.profile-link-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 22px;
}

.profile-link-field {
    min-height: 46px;
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-strong);
    overflow: hidden;
}

.profile-link-row input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.profile-link-tools {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    border-left: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    background: transparent;
}

.profile-link-tool {
    width: 36px;
    min-height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    transition: background .18s ease, color .18s ease;
}

.profile-link-tool+.profile-link-tool {
    border-left: 1px solid color-mix(in srgb, var(--border), transparent 20%);
}

.profile-link-tool:hover {
    background: color-mix(in srgb, var(--primary-soft), transparent 10%);
    color: var(--primary-strong);
}

.profile-link-tool:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary), transparent 30%);
    outline-offset: 1px;
}

.profile-link-tool i {
    font-size: 1rem;
}

.icon-pill {
    padding: 0 16px;
    border-color: var(--border);
    background: var(--surface-2);
    color: var(--text);
}

.icon-pill.icon-only {
    width: 46px;
    min-width: 46px;
    padding: 0;
    font-size: 1rem;
}

.share-grid {
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.share-button {
    padding: 0 16px;
    border: 0;
    background: var(--ink);
    color: var(--bg-strong);
}

.share-button.whatsapp {
    background: linear-gradient(90deg, var(--primary), var(--pink));
    color: #fff;
}

.owner-profile-card {
    max-width: 660px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 34px);
    display: grid;
    gap: 18px;
    border-radius: 26px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    background: linear-gradient(160deg, color-mix(in srgb, var(--surface), transparent 6%), color-mix(in srgb, var(--surface-2), transparent 10%)), radial-gradient(circle at 20% -8%, color-mix(in srgb, var(--primary), transparent 78%), transparent 46%), radial-gradient(circle at 90% -20%, color-mix(in srgb, var(--pink), transparent 84%), transparent 45%);
    box-shadow: var(--shadow);
}

.owner-profile-summary {
    display: grid;
    gap: 14px;
}

.owner-profile-summary .profile-prompt {
    max-width: 560px;
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.14rem);
}

.owner-action-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.45;
}

.owner-link-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.owner-link-field {
    min-height: 46px;
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-strong);
    overflow: hidden;
}

.owner-link-row input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-weight: 400;
    color: var(--muted);
}

.owner-link-tools {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    border-left: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    background: transparent;
}

.owner-link-tool {
    width: 36px;
    min-height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    transition: background .18s ease, color .18s ease;
}

.owner-link-tool+.owner-link-tool {
    border-left: 1px solid color-mix(in srgb, var(--border), transparent 20%);
}

.owner-link-tool:hover {
    background: color-mix(in srgb, var(--primary-soft), transparent 10%);
    color: var(--primary-strong);
}

.owner-link-tool:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary), transparent 30%);
    outline-offset: 1px;
}

.owner-link-tool i {
    font-size: 1rem;
}

@media (min-width: 841px) {
    body.route-own-profile .app-main {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .public-profile-owner {
        width: 100%;
        min-height: calc(100dvh - var(--topbar) - var(--bottom-nav) - 24px);
        display: grid;
        align-content: center;
    }
    .public-profile-owner .owner-profile-card {
        margin-block: auto;
    }
}

.owner-action-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg-strong), transparent 5%);
}

.owner-action {
    width: 100%;
    min-height: 62px;
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: center;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 10%);
    border-radius: 16px;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    text-align: left;
    letter-spacing: 0;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.owner-action:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary), var(--border) 45%);
    background: color-mix(in srgb, var(--surface), transparent 30%);
}

.owner-action-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface), transparent 20%);
    color: var(--text);
    font-weight: 900;
    font-size: 1.08rem;
}

.owner-view {
    background: transparent;
}

.owner-share {
    background: transparent;
}

.share-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    overflow: hidden;
    overscroll-behavior: none;
    color: #fff;
    background: linear-gradient(145deg, #f9d84b 0%, #f28d35 38%, #ef2e73 100%);
    isolation: isolate;
    cursor: pointer;
}

.share-popup {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    height: min(900px, calc(100vh - 40px));
    height: min(900px, calc(100dvh - 40px));
    min-height: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    gap: clamp(12px, 2.8vh, 28px);
    cursor: default;
}

.share-story-top {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 12px;
}

.share-story-icon-button,
.share-mode-toggle {
    min-height: 48px;
    border: 2px solid currentColor;
    background: transparent;
    color: currentColor;
    font-weight: 900;
}

.share-story-icon-button {
    width: 52px;
    display: grid;
    place-items: center;
    border: 0;
    font-size: 2.2rem;
}

.share-mode-toggle {
    justify-self: center;
    min-width: 118px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 1rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.share-card-stage {
    width: 100%;
    display: grid;
    place-items: center;
}

.share-card-canvas {
    width: min(520px, calc(100vw - 48px), max(320px, calc(100vh - 246px)));
    width: min(520px, calc(100vw - 48px), max(320px, calc(100dvh - 246px)));
    max-width: 100%;
    aspect-ratio: 1;
    display: block;
    border-radius: 36px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .16);
}

.share-card-actions {
    width: auto;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.share-card-actions button {
    width: 72px;
    min-height: 58px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    font: inherit;
    transition: background .18s ease, color .18s ease;
}

.share-card-actions button+button {
    border-left: 1px solid color-mix(in srgb, currentColor, transparent 55%);
}

.share-card-actions button:hover {
    background: color-mix(in srgb, currentColor, transparent 85%);
}

.share-card-actions i {
    font-size: 1.5rem;
}

.share-popup-backdrop[data-share-mode="emoji"] {
    color: #222;
    background: #fff;
}

.share-emoji-wall {
    display: none;
    position: absolute;
    inset: -90px -70px;
    z-index: 0;
    white-space: pre;
    font-size: 92px;
    line-height: 1.7;
    letter-spacing: 72px;
    transform: rotate(-12deg);
    pointer-events: none;
}

.share-popup-backdrop[data-share-mode="emoji"] .share-emoji-wall {
    display: block;
}

.share-emoji-sheet {
    position: absolute;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 5;
    width: min(700px, calc(100% - 20px));
    max-height: min(620px, 78vh);
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 14px;
    padding: 18px 20px 24px;
    border-radius: 34px;
    background: color-mix(in srgb, #3f3e38, transparent 4%);
    color: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .34);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
    cursor: default;
}

.share-emoji-grabber {
    justify-self: center;
    width: 76px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
}

.share-emoji-search {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 0 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .86);
    font-size: 1.2rem;
}

.share-emoji-search input {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    box-shadow: none;
}

.share-emoji-search input::placeholder {
    color: rgba(255, 255, 255, .78);
}

.share-emoji-sheet p {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 900;
}

.share-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
}

.share-emoji-option {
    min-height: 62px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 16px;
    background: transparent;
    font-size: clamp(2rem, 6vw, 3.1rem);
    line-height: 1;
    transition: transform .16s ease, background .16s ease;
}

.share-emoji-option:hover,
.share-emoji-option:focus-visible {
    background: rgba(255, 255, 255, .12);
    transform: scale(1.06);
}

.no-scroll {
    overflow: hidden;
}

.logout-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 63;
    display: grid;
    place-items: center;
    padding: 20px;
    background: color-mix(in srgb, #0d1317, transparent 30%);
    backdrop-filter: blur(4px);
}

.logout-popup {
    width: min(420px, 100%);
    padding: 22px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--primary), transparent 60%);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface), transparent 2%), color-mix(in srgb, var(--surface-2), transparent 8%)), radial-gradient(circle at 15% -20%, color-mix(in srgb, var(--primary), transparent 72%), transparent 44%);
    box-shadow: var(--shadow);
    cursor: default;
}

.logout-popup h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.15rem, 2.6vw, 1.45rem);
    line-height: 1.25;
}

.logout-popup p {
    margin: 10px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.logout-popup-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.logout-popup-actions .primary-button,
.logout-popup-actions .secondary-button {
    min-height: 40px;
    min-width: 82px;
}

.rules-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 62;
    display: grid;
    place-items: center;
    padding: 20px;
    background: color-mix(in srgb, #0d1317, transparent 28%);
    backdrop-filter: blur(4px);
}

.rules-popup {
    width: min(620px, 100%);
    border-radius: 26px;
    border: 1px solid color-mix(in srgb, var(--primary), transparent 62%);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface), transparent 2%), color-mix(in srgb, var(--surface-2), transparent 8%)), radial-gradient(circle at 20% -15%, color-mix(in srgb, var(--primary), transparent 68%), transparent 42%), radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--pink), transparent 76%), transparent 38%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.rules-popup-header,
.rules-popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 35%);
}

.rules-popup-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.7rem;
    letter-spacing: 0;
}

.rules-popup-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface-2), var(--primary-soft) 35%);
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.rules-popup-close:focus-visible,
.share-popup-close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary), transparent 45%);
    outline-offset: 3px;
}

.rules-popup-body {
    padding: 20px;
}

.rules-popup-body p {
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    font-weight: 700;
}

.rules-popup-body ul {
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 9px;
    list-style: none;
}

.rules-popup-body li {
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 12px 14px 12px 44px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 28%);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-strong), transparent 8%);
    color: var(--text);
    font-weight: 760;
}

.rules-popup-body li::before {
    content: "!";
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--pink-soft);
    color: var(--pink);
    font-size: .78rem;
    font-weight: 950;
}

.rules-popup-footer {
    border-top: 1px solid color-mix(in srgb, var(--border), transparent 35%);
    border-bottom: 0;
    justify-content: flex-end;
}

.fingerprint-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 64;
    display: grid;
    place-items: center;
    padding: 20px;
    background: color-mix(in srgb, #0d1317, transparent 26%);
    backdrop-filter: blur(4px);
}

.fingerprint-popup {
    width: min(920px, 100%);
    max-height: min(88vh, 860px);
    border: 1px solid color-mix(in srgb, var(--primary), transparent 60%);
    border-radius: 24px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface), transparent 2%), color-mix(in srgb, var(--surface-2), transparent 8%)), radial-gradient(circle at 20% -12%, color-mix(in srgb, var(--primary), transparent 72%), transparent 44%);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.fingerprint-popup-header,
.fingerprint-popup-footer {
    padding: 18px 20px;
    border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 34%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fingerprint-popup-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.18rem, 2.3vw, 1.5rem);
}

.fingerprint-popup-body {
    padding: 16px 20px 20px;
    overflow: auto;
    display: grid;
    gap: 14px;
}

.fingerprint-popup-muted {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
}

.fingerprint-popup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 10px;
}

.fingerprint-popup-grid article {
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 20%);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface), transparent 8%);
}

.fingerprint-popup-grid article span,
.fingerprint-popup-grid article strong {
    display: block;
}

.fingerprint-popup-grid article span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fingerprint-popup-grid article strong {
    margin-top: 4px;
    font-size: 1.05rem;
    line-height: 1.2;
}

.fingerprint-popup-last-seen {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.fingerprint-popup-section {
    display: grid;
    gap: 8px;
}

.fingerprint-popup-section h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.02rem;
}

.fingerprint-popup-list {
    display: grid;
    gap: 8px;
}

.fingerprint-popup-record {
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface), transparent 6%);
    display: grid;
    gap: 6px;
}

.fingerprint-popup-record div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fingerprint-popup-record strong {
    color: var(--text);
}

.fingerprint-popup-record span,
.fingerprint-popup-record p {
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 740;
}

.fingerprint-popup-hashes {
    font-family: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;
    letter-spacing: .01em;
}

.fingerprint-popup-footer {
    border-top: 1px solid color-mix(in srgb, var(--border), transparent 34%);
    border-bottom: 0;
    justify-content: flex-end;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-grid article {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.stat-grid strong {
    display: block;
}

.stat-grid span {
    display: flex;
}

.stat-grid strong {
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    line-height: 1;
}

.stat-grid span {
    margin-top: 6px;
    color: var(--muted);
    font-weight: 750;
}

.god-avatar {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--pink));
}

.god-page {
    display: grid;
    gap: 18px;
}

.god-overview-subnav {
    position: sticky;
    top: calc(var(--topbar) + 10px);
    z-index: 18;
    display: none;
    align-items: center;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-strong), transparent 12%);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
    scrollbar-width: thin;
}

.god-overview-subnav a {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 20%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface), transparent 10%);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 860;
    letter-spacing: .02em;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.god-overview-subnav a:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary), transparent 35%);
    color: var(--primary-strong);
}

.god-overview-subnav a.active {
    border-color: color-mix(in srgb, var(--primary), transparent 28%);
    background: var(--primary-soft);
    color: var(--primary-strong);
}

[data-overview-section] {
    scroll-margin-top: calc(var(--topbar) + 24px);
}

.god-filter-bar,
.god-tabs,
.god-metric-band,
.god-chip-list {
    display: flex;
    align-items: center;
}

.god-filter-bar {
    gap: 10px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 24%);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface), transparent 8%);
    box-shadow: var(--shadow-soft);
}

.god-filter-bar label {
    min-width: min(100%, 220px);
    flex: 1 1 220px;
}

.god-filter-bar button,
.god-filter-bar a {
    flex: 0 0 auto;
}

.god-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.god-metric-band {
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 8px;
}

.god-kpi-card {
    min-height: 96px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 10%);
    border-radius: 12px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--surface), #fff 2%) 0%, color-mix(in srgb, var(--surface-2), transparent 8%) 100%);
    box-shadow: 0 10px 24px color-mix(in srgb, #000, transparent 80%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.god-stat-grid .god-kpi-card {
    min-height: 84px;
    padding-block: 10px;
}

.god-metric-band .god-kpi-card {
    width: max-content;
    min-width: max-content;
    flex: 0 0 auto;
}

.god-kpi-icon {
    margin-top: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--primary), transparent 44%);
    background: color-mix(in srgb, var(--primary-soft), transparent 24%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--primary);
    font-size: .98rem;
}

.god-kpi-icon i {
    display: block;
    width: 1em;
    line-height: 1;
    text-align: center;
}

.god-kpi-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.god-kpi-label {
    margin-top: 0;
    min-width: 0;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 760;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.god-kpi-card strong {
    margin-top: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
    flex: 0 0 auto;
}

.god-metric-band .god-kpi-row {
    width: auto;
    min-width: max-content;
}

.god-metric-band .god-kpi-label {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.god-metric-band .god-kpi-card strong {
    font-size: 1.24rem;
}

.god-table td span:not(.god-badge),
.god-table th span:not(.god-badge) {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.god-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.god-grid>.god-card {
    height: 100%;
}

.god-card {
    border: 1px solid color-mix(in srgb, var(--border), transparent 12%);
    background: color-mix(in srgb, var(--surface), transparent 3%);
    box-shadow: var(--shadow-soft);
}

.god-chip-list {
    gap: 9px;
    flex-wrap: wrap;
}

.god-chip-list>span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.god-chip-list strong {
    font-size: .94rem;
}

.god-tabs {
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 22%);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface), transparent 8%);
    width: fit-content;
}

.god-tabs a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: var(--radius);
    color: var(--muted);
    font-weight: 850;
}

.god-tabs a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary), transparent 72%);
}

.god-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.god-table {
    min-width: 760px;
}

.god-wide-table {
    min-width: 1040px;
}

.god-table th,
.god-table td {
    width: auto;
    padding: 12px 14px 12px 0;
}

.god-table th {
    color: var(--muted);
    font-size: .76rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.god-table td {
    color: var(--text);
    white-space: normal;
    overflow-wrap: anywhere;
}

.god-table code {
    display: inline-flex;
    max-width: 190px;
    padding: 4px 7px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 25%);
    border-radius: 6px;
    background: color-mix(in srgb, var(--surface-2), transparent 12%);
    color: var(--primary-strong);
    font-size: .82rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
}

.god-hash-pill-button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    line-height: 1;
}

.god-hash-pill-button code {
    cursor: pointer;
}

.god-hash-pill-button:focus-visible code {
    outline: 3px solid color-mix(in srgb, var(--primary), transparent 45%);
    outline-offset: 2px;
}

.god-truncate {
    max-width: 360px;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

.god-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 22%);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: .74rem;
    font-weight: 900;
    line-height: 1;
    text-transform: capitalize;
    white-space: nowrap;
}

.god-table td .god-badge,
.god-table th .god-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.god-badge-visible,
.god-badge-allowed,
.god-badge-active,
.god-badge-login-success,
.god-badge-verified {
    border-color: color-mix(in srgb, var(--primary), transparent 42%);
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.traffic-range-tabs {
    width: auto;
}

.traffic-hero-grid,
.traffic-audience-grid {
    display: grid;
    gap: 16px;
}

.traffic-hero-grid {
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, .75fr);
    align-items: stretch;
}

.traffic-audience-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.traffic-chart-card,
.traffic-insight-card {
    min-height: 100%;
}

.traffic-delta {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-inline: 6px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 900;
}

.traffic-delta.positive {
    background: color-mix(in srgb, #21c07a, transparent 84%);
    color: #21c07a;
}

.traffic-delta.negative {
    background: color-mix(in srgb, var(--pink), transparent 84%);
    color: var(--pink);
}

.traffic-chart-wrap {
    position: relative;
    min-height: 292px;
}

.traffic-area-chart {
    display: block;
    width: 100%;
    height: auto;
    color: var(--primary);
}

.traffic-grid-lines line {
    stroke: color-mix(in srgb, var(--border), transparent 18%);
    stroke-width: 1;
}

.traffic-chart-area {
    fill: url(#trafficAreaFill);
}

.traffic-chart-line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
    filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--primary), transparent 70%));
}

.traffic-chart-dots circle {
    fill: color-mix(in srgb, var(--surface), #fff 8%);
    stroke: currentColor;
    stroke-width: 3;
}

.traffic-chart-labels text {
    fill: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.traffic-empty-state {
    position: absolute;
    inset: 44px 16px 46px;
    display: grid;
    place-items: center;
    border: 1px dashed color-mix(in srgb, var(--border), transparent 8%);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-2), transparent 12%);
    color: var(--muted);
    font-weight: 850;
    text-align: center;
}

.traffic-radial-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.traffic-radial {
    position: relative;
    aspect-ratio: 1;
    min-height: 132px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    border-radius: 50%;
    background: radial-gradient(circle at center, var(--surface) 0 56%, transparent 57%), conic-gradient(var(--primary) var(--value), color-mix(in srgb, var(--border), transparent 34%) 0);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border), transparent 16%);
}

.traffic-radial strong {
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1;
}

.traffic-radial span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.traffic-mini-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.traffic-mini-list span {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 22%);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    font-weight: 850;
}

.traffic-mini-list i {
    color: var(--primary);
}

.traffic-bar-list {
    display: grid;
    gap: 10px;
}

.traffic-bar-list.compact {
    gap: 8px;
}

.traffic-bar-row {
    position: relative;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow: hidden;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 20%);
    border-radius: 12px;
    background: var(--surface-2);
}

.traffic-bar-row::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--share, 0%);
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary), transparent 72%), transparent);
}

.traffic-bar-row>div,
.traffic-bar-row>b {
    position: relative;
    z-index: 1;
}

.traffic-bar-row strong,
.traffic-bar-row span {
    display: block;
}

.traffic-bar-row strong {
    color: var(--text);
    font-size: .94rem;
    line-height: 1.2;
}

.traffic-bar-row span {
    margin-top: 3px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.traffic-bar-row b {
    flex: 0 0 auto;
    font-size: 1rem;
}

.traffic-table {
    min-width: 640px;
}

.god-badge-reported,
.god-badge-blocked,
.god-badge-deleted,
.god-badge-invalid-credentials,
.god-badge-otp-invalid,
.god-badge-otp-expired,
.god-badge-rate-limited,
.god-badge-expired,
.god-badge-revoked {
    border-color: color-mix(in srgb, var(--danger), transparent 42%);
    background: color-mix(in srgb, var(--danger), transparent 86%);
    color: var(--danger);
}

.god-badge-suspended {
    border-color: color-mix(in srgb, var(--indigo), transparent 42%);
    background: color-mix(in srgb, var(--indigo), transparent 86%);
    color: var(--indigo);
}

.god-user-row-muted {
    opacity: .82;
}

.god-user-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 172px;
}

.god-user-actions form {
    margin: 0;
}

.god-user-action-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: .78rem;
}

.pagination-gap {
    min-width: 28px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    font-weight: 900;
}

.god-resend-card {
    padding-top: 0;
    background: transparent;
    box-shadow: none;
}

.section-head {
    justify-content: space-between;
    gap: 14px;
}

.section-head .eyebrow {
    margin-bottom: 4px;
}

.message-list {
    display: grid;
    gap: 14px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px auto 0;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 30%);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface), transparent 10%);
    box-shadow: var(--shadow-soft);
}

.pagination a {
    min-width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--muted);
    font-size: .94rem;
    font-weight: 900;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.pagination a:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary), transparent 45%);
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.pagination a.active {
    border-color: color-mix(in srgb, var(--primary), transparent 35%);
    background: linear-gradient(135deg, var(--primary), var(--pink));
    color: #fff;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary), transparent 72%);
}

.message-list.compact {
    grid-template-columns: repeat(3, 1fr);
}

.message-card {
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

.message-card p {
    margin: 0;
    color: var(--text);
    font-size: 1.04rem;
    overflow-wrap: anywhere;
}

.message-card>span,
.message-meta {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 750;
}

.message-card>span {
    display: inline-block;
    margin-top: 14px;
}

.message-meta {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.message-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.message-actions button,
.message-actions a {
    min-height: 38px;
    padding: 0 12px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: .9rem;
    font-weight: 850;
}

.message-actions button {
    border-color: var(--border);
    background: var(--surface-2);
    color: var(--text);
}

.message-actions a {
    border: 1px solid var(--primary);
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.message-card-link {
    display: block;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.message-card-link:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary), transparent 45%);
    box-shadow: var(--shadow);
}

.message-card.unread {
    border-color: color-mix(in srgb, var(--primary), transparent 42%);
    background: color-mix(in srgb, var(--primary-soft), var(--surface) 84%);
}

.message-card.read {
    opacity: .92;
}

.inline-form {
    margin: 0;
}

.message-detail {
    display: grid;
    gap: 14px;
    width: min(640px, 100%);
    margin: 0 auto;
}

.detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.message-stepper {
    width: min(430px, 100%);
    margin: -2px auto 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

.message-step-slot {
    min-height: 42px;
    display: flex;
    justify-content: flex-start;
}

.message-step-slot-center {
    justify-content: center;
}

.message-step-slot-next {
    justify-content: flex-end;
}

.story-theme-actions {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface), transparent 4%);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.message-step-button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface), transparent 4%);
    color: var(--text);
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.message-step-button:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary), transparent 35%);
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.story-theme-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    transition: background .18s ease, color .18s ease;
}

.story-theme-button+.story-theme-button {
    border-left: 1px solid color-mix(in srgb, var(--border), transparent 8%);
}

.story-theme-button:hover {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.story-theme-button i {
    font-size: .95rem;
}

.story-palette-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .34);
    background: var(--story-palette-preview, linear-gradient(145deg, #f1ecff 0%, #ffffff 48%, #edf2ff 100%));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2);
}

.story-message-shell {
    display: grid;
    place-items: center;
    padding: 0;
    background: transparent;
}

.story-message-card {
    --story-card-text: #20222b;
    --story-card-muted: rgba(111, 116, 128, .88);
    width: min(430px, 100%);
    min-height: min(660px, calc(100vh - 235px));
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: clamp(24px, 5vw, 34px);
    border-radius: 30px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .98), rgba(241, 236, 255, .94) 58%, rgba(237, 242, 255, .9) 150%), radial-gradient(circle at 20% 0%, rgba(103, 61, 230, .12), transparent 36%);
    color: #20222b;
    box-shadow: 0 26px 70px rgba(35, 38, 52, .12);
    text-align: left;
    border: 0;
}

button.story-message-card {
    cursor: zoom-in;
    font: inherit;
}

.story-kicker,
.story-message-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--story-card-muted);
    font-size: .82rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.story-message-card p {
    align-self: center;
    margin: 0;
    color: var(--story-card-text);
    font-size: clamp(1.95rem, 5vw, 3.1rem);
    font-weight: 900;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.story-message-card.story-text-medium p {
    font-size: clamp(1.55rem, 4vw, 2.7rem);
}

.story-message-card.story-text-long p {
    font-size: clamp(1.12rem, 3vw, 1.85rem);
    line-height: 1.16;
}

.story-footer-brand {
    display: flex;
    align-items: center;
}

.story-footer-brand img {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
    margin-right: .35rem;
}

.story-fullscreen-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vw, 34px);
    background: rgba(2, 6, 23, .9);
    cursor: zoom-out;
}

.story-fullscreen-card {
    width: min(1220px, 100%);
    min-height: calc(100dvh - clamp(24px, 6vw, 68px));
    cursor: default;
}

.story-fullscreen-card p {
    max-width: 980px;
    font-size: clamp(2.1rem, 3vw, 4rem);
    line-height: 1.05;
}

.story-fullscreen-card.story-text-medium p {
    font-size: clamp(1.9rem, 2.55vw, 3.25rem);
}

.story-fullscreen-card.story-text-long p {
    font-size: clamp(1.35rem, 1.75vw, 2.35rem);
    line-height: 1.18;
}

@media (min-width: 621px) {
    .message-detail {
        width: min(980px, 100%);
    }
    .story-message-card {
        width: min(880px, 100%);
        min-height: min(540px, calc(100vh - 230px));
        padding: clamp(34px, 4vw, 56px);
    }
    .story-message-card p {
        max-width: 760px;
        font-size: clamp(2rem, 3.1vw, 3.25rem);
        line-height: 1.04;
    }
    .story-message-card.story-text-medium p {
        font-size: clamp(1.75rem, 2.45vw, 2.55rem);
        line-height: 1.08;
    }
    .story-message-card.story-text-long p {
        font-size: clamp(1.35rem, 1.7vw, 2rem);
        line-height: 1.18;
    }
    .message-stepper {
        width: min(880px, 100%);
    }
}

.empty-state,
.error-page,
.success-panel {
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: clamp(24px, 5vw, 36px);
    border-radius: var(--radius-lg);
}

.success-panel img {
    width: 100px;
}

.success-panel p {
    display: grid;
    gap: 20px;
}

.empty-mark {
    width: 42px;
    height: 42px;
    border: 2px solid var(--primary);
    border-radius: 12px;
    background: linear-gradient(90deg, transparent 45%, var(--primary) 45% 55%, transparent 55%), linear-gradient(transparent 45%, var(--primary) 45% 55%, transparent 55%), var(--primary-soft);
}

.success-mark {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
}

.success-mark::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 12px;
    width: 18px;
    height: 10px;
    border-left: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(-45deg);
}

.profile-prompt {
    margin: 20px 0 0;
}

.composer-card small {
    color: var(--muted);
    font-weight: 700;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.segmented legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    font-weight: 850;
}

.segmented label {
    position: relative;
    display: block;
}

.segmented input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.segmented span {
    display: grid;
    place-items: center;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    font-weight: 850;
}

.segmented input:checked+span {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.rules-grid {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(320px, 1fr);
    gap: 16px;
}

.rules-card {
    border-radius: var(--radius-lg);
    padding: clamp(18px, 4vw, 28px);
}

.rules-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
    color: var(--muted);
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    width: 58%;
    color: var(--text);
}

td {
    color: var(--muted);
    font-weight: 750;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(var(--nav-count, 4), minmax(0, 1fr));
    gap: 4px;
    width: min(calc((var(--nav-count, 4) * 112px) + 16px), calc(100% - 24px));
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: color-mix(in srgb, var(--surface), transparent 4%);
    box-shadow: var(--shadow);
    transform: translateX(-50%);
    backdrop-filter: blur(18px);
}

.bottom-nav a {
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 52px;
    border-radius: 20px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    position: relative;
}

.bottom-nav a.active {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.nav-icon {
    width: 20px;
    height: 20px;
}

.nav-fa-icon {
    display: inline-block;
    font-size: 17px;
    line-height: 1;
}

.bottom-nav .nav-icon {
    display: none;
}

.home-icon {
    border: 2px solid currentColor;
    border-radius: 6px 6px 4px 4px;
    transform: rotate(45deg) scale(.78);
}

.inbox-icon {
    border: 2px solid currentColor;
    border-radius: 6px;
}

.inbox-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 8px;
    border-top: 2px solid currentColor;
}

.nav-badge {
    position: absolute;
    top: 6px;
    right: 16px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: .62rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface), transparent 6%);
}

.settings-icon {
    border: 2px solid currentColor;
    border-radius: 50%;
}

.settings-icon::after {
    content: "";
    position: absolute;
    inset: 5px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.rules-icon {
    border: 2px solid currentColor;
    border-radius: 5px;
}

.rules-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: 5px;
    box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
    border-top: 2px solid currentColor;
}

.logout-icon {
    border: 2px solid currentColor;
    border-radius: 5px;
}

.logout-icon::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 7px;
    width: 9px;
    border-top: 2px solid currentColor;
}

.logout-icon::after {
    content: "";
    position: absolute;
    right: 3px;
    top: 4px;
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

.plus-icon::before,
.plus-icon::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    top: 9px;
    border-top: 2px solid currentColor;
}

.plus-icon::after {
    transform: rotate(90deg);
}

.user-icon {
    border: 2px solid currentColor;
    border-radius: 50%;
}

.user-icon::after {
    content: "";
    position: absolute;
    left: -3px;
    right: -3px;
    bottom: -9px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
}

.page-enter {
    animation: pageEnter .22s ease both;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (min-width: 841px) and (max-width: 1080px) {
    .install-prompt {
        min-height: 40px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .install-suggestion {
        display: none;
    }
    .install-app-button {
        min-height: 40px;
        padding: 0 12px;
    }
    .install-label-full {
        display: none;
    }
    .install-label-short {
        display: inline;
    }
}

@media (max-width: 840px) {
    .desktop-only {
        display: none;
    }
    .mobile-only {
        display: grid;
    }
    .icon-button.mobile-only {
        display: grid;
    }
    .hero-grid,
    .auth-wrap,
    .rules-grid {
        grid-template-columns: 1fr;
    }
    .hero-grid {
        min-height: 0;
    }
    .phone-preview {
        min-height: auto;
        border-radius: var(--radius-lg);
    }
    .feature-strip,
    .message-list.compact {
        grid-template-columns: 1fr;
    }
    .public-profile-owner {
        min-height: calc(100dvh - var(--topbar) - var(--bottom-nav) - 24px);
        display: grid;
        align-content: center;
    }
    .public-profile-owner .owner-profile-card {
        margin-block: auto;
    }
}

@media (min-width: 841px) {
    .mobile-public-menu {
        display: none !important;
    }
    .bottom-nav .nav-badge {
        top: 7px;
        left: calc(50% + 10px);
        right: auto;
        transform: translateX(-50%);
    }
    /* Keep the desktop landing above-the-fold without sacrificing readability. */
    body.route-home .app-main {
        padding-top: clamp(16px, 2.2vw, 28px);
        padding-bottom: 10px;
    }
    body.route-home .hero-grid {
        gap: clamp(22px, 3vw, 48px);
        min-height: calc(100dvh - var(--topbar) - var(--bottom-nav) - 44px);
    }
    body.route-home .hero-copy h1 {
        font-size: clamp(2.25rem, 5.25vw, 5rem);
    }
    body.route-home .hero-actions {
        margin-top: 20px;
    }
    body.route-home .phone-preview {
        min-height: 0;
        padding: 16px;
        gap: 12px;
    }
    body.route-home .message-composer-preview,
    body.route-home .preview-card {
        padding: 18px;
    }
    body.route-home .message-composer-preview {
        min-height: 164px;
    }
    body.route-home .message-composer-preview p {
        margin-bottom: 22px;
        font-size: 1.16rem;
    }
}

@media (max-width: 620px) {
    body.route-god .app-main {
        width: min(100% - 18px, 1120px);
        padding-top: 14px;
        padding-bottom: 8px;
    }
    body.route-god .topbar {
        padding-inline: 10px;
    }
    body.route-god .topbar .icon-button {
        width: 34px;
        height: 34px;
    }
    body.route-god .top-actions .avatar {
        width: 32px;
        height: 32px;
    }
    body.route-god .god-page {
        gap: 12px;
    }
    body.route-god .section-head {
        gap: 8px;
    }
    body.route-god .section-head .eyebrow {
        margin-bottom: 4px;
        font-size: .62rem;
    }
    body.route-god .section-head h1 {
        font-size: clamp(1.3rem, 6vw, 1.65rem);
        line-height: 1.08;
    }
    body.route-god .god-overview-subnav {
        display: flex;
        top: calc(var(--topbar) + 8px);
        gap: 6px;
        padding: 6px;
        border-radius: 14px;
    }
    body.route-god .god-overview-subnav a {
        min-height: 30px;
        padding: 0 10px;
        font-size: .7rem;
    }
    body.route-god [data-overview-section] {
        scroll-margin-top: calc(var(--topbar) + 64px);
    }
    body.route-god .settings-card.god-card {
        gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }
    body.route-god .settings-card-head {
        gap: 2px;
    }
    body.route-god .settings-card-head h2 {
        font-size: 1rem;
    }
    body.route-god .settings-card-head p {
        font-size: .82rem;
        line-height: 1.35;
    }
    body.route-god .god-filter-bar {
        gap: 8px;
        padding: 10px;
        border-radius: 14px;
    }
    body.route-god .god-filter-bar label {
        min-width: 0;
        width: 100%;
        flex: 0 1 auto;
    }
    body.route-god .god-filter-bar input,
    body.route-god .god-filter-bar select {
        min-height: 44px;
        font-size: .9rem;
    }
    body.route-god .god-filter-bar button,
    body.route-god .god-filter-bar a {
        min-height: 40px;
    }
    body.route-god .god-tabs {
        gap: 6px;
        padding: 5px;
        border-radius: 14px;
    }
    body.route-god .god-tabs a {
        min-height: 34px;
        padding: 0 10px;
        font-size: .86rem;
    }
    body.route-god .god-kpi-card {
        min-height: 82px;
        padding: 10px;
        gap: 10px;
    }
    body.route-god .god-kpi-icon {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        font-size: .84rem;
    }
    body.route-god .god-kpi-label {
        font-size: .74rem;
    }
    body.route-god .god-stat-grid .god-kpi-card strong {
        font-size: clamp(1.25rem, 6vw, 1.75rem);
    }
    body.route-god .god-metric-band {
        gap: 8px;
        padding-bottom: 4px;
    }
    body.route-god .god-metric-band .god-kpi-card {
        width: max-content;
        min-width: max-content;
        min-height: 70px;
    }
    body.route-god .god-metric-band .god-kpi-card strong {
        font-size: 1.02rem;
    }
    body.route-god .god-chip-list {
        gap: 6px;
    }
    body.route-god .god-chip-list>span {
        gap: 6px;
        padding: 6px 8px;
    }
    body.route-god .god-chip-list strong {
        font-size: .86rem;
    }
    body.route-god .god-table th,
    body.route-god .god-table td {
        padding: 9px 10px 9px 0;
    }
    body.route-god .god-table th {
        font-size: .67rem;
        letter-spacing: .05em;
    }
    body.route-god .god-table td {
        font-size: .84rem;
    }
    body.route-god .god-table code {
        max-width: 150px;
        font-size: .74rem;
    }
    body.route-god .god-badge {
        min-height: 22px;
        padding: 0 7px;
        font-size: .66rem;
    }
    body.route-god .god-truncate {
        max-width: 220px;
    }
    body.route-god .pagination {
        margin-top: 12px;
        padding: 6px;
        border-radius: 14px;
        gap: 6px;
    }
    body.route-god .pagination a {
        min-width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: .84rem;
    }
    body.route-god .bottom-nav {
        width: calc(100% - 10px);
        border-radius: 16px;
        gap: 2px;
        padding: 5px;
    }
    body.route-god .bottom-nav a {
        min-height: 42px;
        border-radius: 12px;
    }
    body.route-god .bottom-nav .nav-fa-icon {
        font-size: 15px;
    }
    .app-main {
        width: min(100% - 24px, 1120px);
        padding-top: 22px;
    }
    .topbar {
        padding-inline: 14px;
    }
    .topbar .icon-button {
        width: 38px;
        height: 38px;
    }
    .topbar .theme-toggle {
        width: 34px;
        height: 34px;
    }
    .install-prompt {
        min-height: 38px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .install-app-button {
        min-height: 38px;
        padding: 0 12px;
    }
    .install-label-full {
        display: none;
    }
    .install-label-short {
        display: inline;
    }
    .top-actions .avatar {
        width: 34px;
        height: 34px;
    }
    .topbar .icon-button i,
    .topbar .theme-toggle .theme-icon {
        font-size: .92rem;
    }
    .hero-copy h1,
    .auth-copy h1 {
        font-size: clamp(2.45rem, 13vw, 4.4rem);
    }
    .hero-actions,
    .share-grid {
        align-items: stretch;
        flex-direction: column;
    }
    .stat-grid {
        grid-template-columns: 1fr;
    }
    .god-stat-grid,
    .god-grid,
    .traffic-hero-grid,
    .traffic-audience-grid {
        grid-template-columns: 1fr;
    }
    .god-filter-bar {
        align-items: stretch;
        flex-direction: column;
        border-radius: 18px;
    }
    .god-filter-bar button,
    .god-filter-bar a {
        width: 100%;
    }
    .god-tabs {
        width: 100%;
    }
    .god-tabs a {
        flex: 1 1 0;
    }
    .traffic-chart-wrap {
        min-height: 220px;
    }
    .traffic-radial-row {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }
    .profile-top {
        align-items: flex-start;
    }
    .avatar.jumbo {
        width: 70px;
        height: 70px;
    }
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .message-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    .message-actions button,
    .message-actions a {
        width: 100%;
    }
    .detail-toolbar {
        gap: 8px;
    }
    .detail-toolbar .secondary-button,
    .detail-toolbar .primary-button {
        min-height: 40px;
        padding-inline: 12px;
    }
    .message-step-button {
        width: 40px;
        height: 40px;
    }
    .message-detail {
        width: min(420px, 100%);
        min-height: calc(100dvh - var(--topbar) - var(--bottom-nav) - 30px);
        align-content: center;
        gap: 10px;
    }
    .message-detail .story-message-shell .story-message-card {
        width: min(360px, 100%);
        min-height: min(500px, calc(100dvh - 320px));
        gap: 12px;
        padding: clamp(16px, 4.5vw, 22px);
        border-radius: 24px;
    }
    .message-detail .story-message-shell .story-kicker,
    .message-detail .story-message-shell .story-message-footer {
        gap: 8px;
        font-size: .68rem;
        letter-spacing: .03em;
    }
    .message-detail .story-message-shell .story-message-card p {
        font-size: clamp(1.5rem, 8vw, 2.3rem);
        line-height: 1.08;
    }
    .message-detail .story-message-shell .story-message-card.story-text-medium p {
        font-size: clamp(1.25rem, 6.5vw, 1.9rem);
    }
    .message-detail .story-message-shell .story-message-card.story-text-long p {
        font-size: clamp(1rem, 5.3vw, 1.35rem);
        line-height: 1.2;
    }
    .message-detail .story-message-shell .story-footer-brand img {
        width: 20px;
        height: 20px;
    }
    .message-detail .message-stepper {
        width: min(334px, 100%);
        gap: 6px;
    }
    .message-detail .message-step-slot {
        min-height: 34px;
    }
    .message-detail .story-theme-actions {
        border-radius: 14px;
    }
    .message-detail .story-theme-button,
    .message-detail .message-step-button {
        width: 34px;
        height: 34px;
    }
    .message-detail .story-theme-button i,
    .message-detail .message-step-button i {
        font-size: .8rem;
    }
    .message-detail .story-palette-swatch {
        width: 16px;
        height: 16px;
    }
    .story-fullscreen-backdrop {
        padding: 0;
    }
    .story-fullscreen-card {
        width: 100%;
        min-height: 100dvh;
        border-radius: 0;
        padding: clamp(24px, 5vw, 34px);
    }
    .story-fullscreen-card p,
    .story-fullscreen-card.story-text-medium p,
    .story-fullscreen-card.story-text-long p {
        max-width: none;
    }
    .bottom-nav {
        border-radius: 22px;
        width: calc(100% - 14px);
        grid-template-columns: repeat(var(--nav-count, 4), minmax(0, 1fr));
    }
    .bottom-nav a {
        min-height: 50px;
    }
    .bottom-nav a>span:not(.nav-badge) {
        display: none;
    }
    .bottom-nav .nav-fa-icon {
        font-size: 17px;
    }
    .share-popup-backdrop {
        padding-inline: 14px;
    }
    .share-popup {
        height: auto;
        min-height: 100%;
    }
    .share-card-canvas {
        width: min(560px, calc(100vw - 28px), 58vh);
        width: min(560px, calc(100vw - 28px), 58dvh);
    }
    .share-card-actions {
        width: auto;
    }
    .share-card-actions button {
        width: min(32vw, 92px);
        min-height: 54px;
    }
    .owner-action-list {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .owner-link-row {
        grid-template-columns: 1fr;
    }
    .input-action-row {
        grid-template-columns: 1fr;
    }
    .input-action-row button {
        width: 100%;
    }
    .owner-action {
        min-height: 58px;
    }
}

@media (max-width: 360px) {
    body.route-god .app-main {
        width: min(100% - 14px, 1120px);
        padding-top: 10px;
        padding-bottom: 6px;
    }
    body.route-god .topbar {
        padding-inline: 8px;
    }
    body.route-god .topbar .icon-button {
        width: 30px;
        height: 30px;
    }
    body.route-god .top-actions .avatar {
        width: 28px;
        height: 28px;
    }
    body.route-god .god-page {
        gap: 10px;
    }
    body.route-god .section-head {
        gap: 6px;
    }
    body.route-god .section-head .eyebrow {
        font-size: .58rem;
    }
    body.route-god .section-head h1 {
        font-size: 1.2rem;
    }
    body.route-god .god-overview-subnav {
        top: calc(var(--topbar) + 6px);
        gap: 4px;
        padding: 5px;
        border-radius: 12px;
    }
    body.route-god .god-overview-subnav a {
        min-height: 28px;
        padding: 0 8px;
        font-size: .64rem;
    }
    body.route-god [data-overview-section] {
        scroll-margin-top: calc(var(--topbar) + 60px);
    }
    body.route-god .settings-card.god-card {
        gap: 10px;
        padding: 10px;
        border-radius: 14px;
    }
    body.route-god .settings-card-head h2 {
        font-size: .92rem;
    }
    body.route-god .settings-card-head p {
        font-size: .76rem;
    }
    body.route-god .god-filter-bar {
        gap: 7px;
        padding: 8px;
        border-radius: 12px;
    }
    body.route-god .god-filter-bar input,
    body.route-god .god-filter-bar select {
        min-height: 40px;
        font-size: .84rem;
    }
    body.route-god .god-filter-bar button,
    body.route-god .god-filter-bar a {
        min-height: 36px;
        font-size: .8rem;
    }
    body.route-god .god-tabs {
        padding: 4px;
        border-radius: 12px;
    }
    body.route-god .god-tabs a {
        min-height: 30px;
        padding: 0 8px;
        font-size: .78rem;
    }
    body.route-god .god-kpi-card {
        min-height: 70px;
        padding: 8px;
        gap: 8px;
    }
    body.route-god .god-kpi-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
        font-size: .78rem;
    }
    body.route-god .god-kpi-label {
        font-size: .68rem;
    }
    body.route-god .god-stat-grid .god-kpi-card strong {
        font-size: 1.2rem;
    }
    body.route-god .god-metric-band {
        gap: 6px;
    }
    body.route-god .god-metric-band .god-kpi-card {
        width: max-content;
        min-width: max-content;
        min-height: 64px;
    }
    body.route-god .god-metric-band .god-kpi-card strong {
        font-size: .94rem;
    }
    body.route-god .god-chip-list>span {
        gap: 5px;
        padding: 5px 7px;
    }
    body.route-god .god-chip-list strong {
        font-size: .8rem;
    }
    body.route-god .god-table th,
    body.route-god .god-table td {
        padding: 7px 8px 7px 0;
    }
    body.route-god .god-table th {
        font-size: .61rem;
    }
    body.route-god .god-table td {
        font-size: .74rem;
    }
    body.route-god .god-table code {
        max-width: 120px;
        padding: 3px 6px;
        font-size: .66rem;
    }
    body.route-god .god-badge {
        min-height: 20px;
        padding: 0 6px;
        font-size: .6rem;
    }
    body.route-god .god-truncate {
        max-width: 170px;
    }
    body.route-god .pagination {
        margin-top: 10px;
        gap: 4px;
        padding: 5px;
    }
    body.route-god .pagination a {
        min-width: 30px;
        height: 30px;
        border-radius: 8px;
        font-size: .72rem;
    }
    body.route-god .bottom-nav {
        width: calc(100% - 8px);
        border-radius: 14px;
        padding: 4px;
        gap: 1px;
    }
    body.route-god .bottom-nav a {
        min-height: 38px;
        border-radius: 10px;
    }
    body.route-god .bottom-nav .nav-fa-icon {
        font-size: 14px;
    }
     :root {
        --bottom-nav: 60px;
    }
    html {
        font-size: 80%;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    .app-main {
        width: min(100% - 18px, 1120px);
        padding-top: 16px;
    }
    .topbar .icon-button {
        width: 34px;
        height: 34px;
    }
    .topbar .theme-toggle {
        width: 30px;
        height: 30px;
    }
    .install-app-button {
        min-height: 34px;
        padding: 0 10px;
    }
    .top-actions .avatar {
        width: 30px;
        height: 30px;
    }
    .topbar .icon-button i,
    .topbar .theme-toggle .theme-icon {
        font-size: .84rem;
    }
    .message-detail {
        width: min(332px, 100%);
        min-height: calc(100dvh - var(--topbar) - var(--bottom-nav) - 24px);
        align-content: center;
        gap: 8px;
    }
    .message-detail .story-message-shell .story-message-card {
        width: min(320px, 100%);
        min-height: min(430px, calc(100dvh - 340px));
        gap: 10px;
        padding: 14px;
        border-radius: 20px;
    }
    .message-detail .story-message-shell .story-kicker,
    .message-detail .story-message-shell .story-message-footer {
        font-size: .58rem;
        letter-spacing: .02em;
    }
    .message-detail .story-message-shell .story-message-card p {
        font-size: clamp(1.2rem, 7vw, 1.65rem);
    }
    .message-detail .story-message-shell .story-message-card.story-text-medium p {
        font-size: clamp(1rem, 5.8vw, 1.35rem);
    }
    .message-detail .story-message-shell .story-message-card.story-text-long p {
        font-size: .9rem;
        line-height: 1.22;
    }
    .message-detail .story-message-shell .story-footer-brand img {
        width: 16px;
        height: 16px;
    }
    .message-detail .message-stepper {
        width: min(292px, 100%);
        gap: 5px;
    }
    .message-detail .message-step-slot {
        min-height: 30px;
    }
    .message-detail .story-theme-actions {
        border-radius: 12px;
    }
    .message-detail .story-theme-button,
    .message-detail .message-step-button {
        width: 28px;
        height: 28px;
    }
    .message-detail .story-theme-button i,
    .message-detail .message-step-button i {
        font-size: .68rem;
    }
    .message-detail .story-palette-swatch {
        width: 13px;
        height: 13px;
    }
    .auth-wrap {
        gap: 12px;
    }
    .auth-copy {
        display: grid;
        gap: 6px;
    }
    .auth-wrap .auth-copy h1 {
        font-size: clamp(1.45rem, 8vw, 1.95rem);
        line-height: 1.04;
    }
    .auth-wrap .auth-copy p {
        font-size: .82rem;
        line-height: 1.35;
    }
    .dashboard,
    .messages-page,
    .settings-page,
    .rules-page,
    .legal-page,
    .contact-page,
    .public-profile {
        gap: 16px;
    }
    .hero-copy h1,
    .auth-copy h1 {
        font-size: clamp(1.9rem, 10vw, 2.8rem);
    }
    .section-head h1,
    .profile-panel h1,
    .public-profile h1 {
        font-size: clamp(1.35rem, 6.6vw, 1.65rem);
        line-height: 1.08;
    }
    .section-head h2 {
        font-size: clamp(1.05rem, 5.2vw, 1.26rem);
    }
    .eyebrow {
        margin-bottom: 6px;
        font-size: .62rem;
        letter-spacing: .06em;
    }
    .hero-text,
    .auth-copy p,
    .profile-prompt,
    .empty-state p,
    .error-page p,
    .owner-action-note,
    .message-card p,
    .legal-card p,
    .legal-card ul,
    .rules-card ul {
        font-size: .9rem;
    }
    .message-card>span,
    .message-meta,
    .pagination a,
    .field-feedback,
    .bottom-nav a {
        font-size: .72rem;
    }
    .profile-panel,
    .settings-card,
    .composer-card,
    .rules-card,
    .message-card,
    .owner-profile-card {
        padding: 14px;
        border-radius: 18px;
    }
    .auth-card {
        gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }
    .auth-card label,
    .auth-card .primary-a,
    .auth-card .fine-print {
        font-size: .82rem;
    }
    .auth-card .primary-button {
        min-height: 40px;
    }
    .profile-top {
        gap: 12px;
    }
    .avatar.jumbo {
        width: 58px;
        height: 58px;
    }
    .settings-card-head h2 {
        font-size: 1.02rem;
    }
    .settings-card-head p,
    .owner-action,
    .composer-card small {
        font-size: .82rem;
    }
    input,
    select,
    textarea,
    button {
        font-size: .9rem;
    }
    input,
    select {
        min-height: 46px;
        padding: 0 12px;
    }
    textarea {
        min-height: 140px;
        padding: 12px;
    }
    .bottom-nav {
        width: calc(100% - 12px);
        bottom: max(6px, env(safe-area-inset-bottom));
        padding: 6px;
        gap: 2px;
        border-radius: 18px;
        grid-template-columns: repeat(var(--nav-count, 4), minmax(0, 1fr));
    }
    .bottom-nav a {
        min-height: 42px;
        gap: 0;
        border-radius: 14px;
    }
    .bottom-nav .nav-fa-icon {
        display: inline-block;
        font-size: 16px;
    }
    .nav-badge {
        top: 4px;
        left: calc(50% + 8px);
        right: auto;
        min-width: 15px;
        height: 15px;
        padding: 0 4px;
        font-size: .54rem;
        transform: translateX(-50%);
    }
}

.primary-a {
    color: var(--primary);
    font-weight: 600;
}

.primary-a:hover,
.primary-a:active {
    color: var(--ink);
}


/* God panel visual layer: Hostinger-like color and inner surfaces without changing the shell */

html[data-theme="light"] body.route-god,
html[data-theme="dark"] body.route-god,
body.route-god {
    --bg: #f4f5f7;
    --bg-strong: #ffffff;
    --surface: #ffffff;
    --surface-2: #fafbff;
    --text: #1f2230;
    --muted: #6f7480;
    --border: #e3e5ec;
    --primary: #673de6;
    --primary-strong: #5d35df;
    --primary-soft: #f1ecff;
    --pink: #e54f7d;
    --pink-soft: #fff0f5;
    --indigo: #315ae8;
    --indigo-soft: #edf2ff;
    --ink: #12141d;
    --danger: #d84343;
    --shadow: 0 18px 52px rgba(35, 38, 52, .08);
    --shadow-soft: 0 8px 26px rgba(35, 38, 52, .06);
    --radius: 8px;
    --radius-lg: 16px;
    color-scheme: light;
    background: #f4f5f7;
    color: var(--text);
}

body.route-god {
    background: #f4f5f7 !important;
}

body.route-god::before,
body.route-god::after {
    display: none !important;
}

body.route-god .app-shell {
    background: #f4f5f7;
}

body.route-god .topbar {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .96);
    box-shadow: none;
    backdrop-filter: blur(12px);
}

body.route-god .brand-mark {
    background: var(--primary-soft);
    box-shadow: none;
    border-radius: 100%;
}

body.route-god .brand-mark img {
    filter: none;
}

body.route-god .topbar .icon-button,
body.route-god .top-actions .avatar {
    border: 1px solid var(--border);
    background: #fff;
    color: #333746;
    box-shadow: none;
}

body.route-god .god-avatar {
    color: var(--primary-strong);
    background: var(--primary-soft);
}

body.route-god .app-main {
    width: min(100% - 44px, 1360px);
    padding-top: 30px;
    padding-bottom: calc(var(--bottom-nav) + 30px);
    background: transparent;
}

body.route-god .god-page {
    gap: 18px;
}

body.route-god .section-head {
    align-items: end;
    gap: 16px;
    margin: 0;
}

body.route-god .section-head .eyebrow {
    margin-bottom: 4px;
    color: #6f7480;
    font-size: .82rem;
    font-weight: 780;
    letter-spacing: 0;
    text-transform: none;
}

body.route-god .section-head h1 {
    color: #20222b;
    font-size: clamp(2rem, 4vw, 2.65rem);
    line-height: 1.06;
    letter-spacing: 0;
}

body.route-god .section-head p {
    max-width: 780px;
    color: #6f7480;
    font-size: .96rem;
}

body.route-god .god-tabs,
body.route-god .god-overview-subnav,
body.route-god .god-filter-bar,
body.route-god .pagination {
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: none;
}

body.route-god .god-tabs {
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
}

body.route-god .god-tabs a {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #5f6470;
    font-weight: 820;
}

body.route-god .god-tabs a.active,
body.route-god .god-tabs a:hover {
    border-color: #d8ccff;
    background: var(--primary-soft);
    color: var(--primary-strong);
    box-shadow: none;
}

body.route-god .god-overview-subnav {
    top: calc(var(--topbar) + 12px);
    z-index: 18;
    display: flex;
    gap: 4px;
    padding: 7px;
    border-radius: 12px;
}

body.route-god .god-overview-subnav a {
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #5f6470;
    font-size: .84rem;
    font-weight: 840;
    letter-spacing: 0;
}

body.route-god .god-overview-subnav a.active,
body.route-god .god-overview-subnav a:hover {
    border-color: transparent;
    background: var(--primary-soft);
    color: var(--primary-strong);
    transform: none;
}

body.route-god .god-card,
body.route-god .settings-card,
body.route-god .settings-card.god-card,
body.route-god .god-kpi-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 34, 48, .04);
}

body.route-god .settings-card,
body.route-god .settings-card.god-card,
body.route-god .god-card {
    padding: 18px;
}

body.route-god .settings-card-head {
    gap: 6px;
    margin-bottom: 16px;
}

body.route-god .settings-card-head h2 {
    color: #20222b;
    font-size: 1.05rem;
    font-weight: 880;
    letter-spacing: 0;
}

body.route-god .settings-card-head p {
    color: #6f7480;
    font-size: .9rem;
}

body.route-god .god-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

body.route-god .god-kpi-card {
    min-height: 112px;
    padding: 18px 20px;
    gap: 14px;
}

body.route-god .god-kpi-icon {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-strong);
}

body.route-god .god-kpi-label {
    color: #6f7480;
    font-size: .86rem;
    font-weight: 780;
}

body.route-god .god-kpi-card strong {
    color: #20222b;
    font-size: clamp(1.6rem, 2.5vw, 2.3rem);
    font-weight: 900;
    letter-spacing: 0;
}

body.route-god .god-metric-band {
    gap: 14px;
}

body.route-god .god-metric-band .god-kpi-card {
    min-width: 228px;
}

body.route-god .traffic-hero-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .85fr);
    gap: 18px;
}

body.route-god .traffic-chart-wrap {
    min-height: 332px;
}

body.route-god .traffic-area-chart {
    color: var(--primary);
}

body.route-god .traffic-chart-line {
    filter: none;
}

body.route-god .traffic-chart-dots circle {
    fill: #fff;
}

body.route-god .traffic-grid-lines line {
    stroke: #eceef3;
}

body.route-god .traffic-chart-labels text {
    fill: #858b98;
    font-weight: 760;
}

body.route-god .traffic-radial {
    background: radial-gradient(circle at center, #fff 0 57%, transparent 58%), conic-gradient(var(--primary) var(--value), #eef0f4 0);
    box-shadow: inset 0 0 0 1px #eceef3;
}

body.route-god .traffic-delta.positive {
    background: #e8f7f0;
    color: #118761;
}

body.route-god .traffic-delta.negative {
    background: #fff0f4;
    color: #c7365d;
}

body.route-god .traffic-mini-list span,
body.route-god .traffic-bar-row,
body.route-god .god-chip-list>span {
    border-color: var(--border);
    border-radius: 10px;
    background: #fafbff;
}

body.route-god .traffic-bar-row::before {
    background: linear-gradient(90deg, rgba(103, 61, 230, .18), rgba(103, 61, 230, 0));
}

body.route-god .traffic-bar-row span,
body.route-god .traffic-radial span,
body.route-god .god-table td span:not(.god-badge),
body.route-god .god-table th span:not(.god-badge) {
    color: #6f7480;
}

body.route-god .god-table-wrap {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

body.route-god .god-table {
    border-collapse: collapse;
}

body.route-god .god-table th,
body.route-god .god-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f4;
}

body.route-god .god-table tr:last-child td {
    border-bottom: 0;
}

body.route-god .god-table th {
    background: #fafbfc;
    color: #7b818d;
    font-size: .73rem;
    letter-spacing: .04em;
}

body.route-god .god-table td {
    color: #252836;
    font-weight: 720;
}

body.route-god .god-table code {
    border-color: #e6e8ef;
    background: #f7f8fb;
    color: var(--primary-strong);
}

body.route-god .god-badge {
    border-color: #e3e5ec;
    background: #f7f8fb;
    color: #4f5562;
}

body.route-god .god-badge-visible,
body.route-god .god-badge-allowed,
body.route-god .god-badge-active,
body.route-god .god-badge-login-success,
body.route-god .god-badge-verified {
    border-color: #d8ccff;
    background: var(--primary-soft);
    color: var(--primary-strong);
}

body.route-god .god-live-filter-results {
    display: grid;
    gap: 18px;
    transition: opacity .16s ease, transform .16s ease;
}

body.route-god .god-live-filter-results.is-updating {
    opacity: .58;
    pointer-events: none;
    transform: translateY(2px);
}

body.route-god .god-live-filter-results.is-entering {
    opacity: 0;
    transform: translateY(4px);
}

body.route-god input,
body.route-god select,
body.route-god textarea {
    border-color: var(--border);
    background: #fff;
    color: var(--text);
    box-shadow: none;
}

body.route-god input:focus,
body.route-god select:focus,
body.route-god textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(103, 61, 230, .12);
}

body.route-god .primary-button {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: none;
}

body.route-god .secondary-button,
body.route-god .ghost-link,
body.route-god .pagination a,
body.route-god .pagination-gap {
    border-color: var(--border);
    background: #fff;
    color: #4f5562;
}

body.route-god .secondary-button:hover,
body.route-god .ghost-link:hover,
body.route-god .pagination a:hover {
    border-color: #d8ccff;
    background: var(--primary-soft);
    color: var(--primary-strong);
}

body.route-god .bottom-nav {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 34px rgba(31, 34, 48, .12);
}

body.route-god .bottom-nav a {
    color: #6f7480;
}

body.route-god .bottom-nav a.active {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

@media (max-width: 900px) {
    body.route-god .god-stat-grid,
    body.route-god .god-grid,
    body.route-god .traffic-hero-grid,
    body.route-god .traffic-audience-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    body.route-god .app-main {
        width: min(100% - 18px, 1120px);
        padding-top: 16px;
        padding-bottom: calc(var(--bottom-nav) + 14px);
    }
    body.route-god .section-head {
        align-items: start;
    }
    body.route-god .section-head h1 {
        font-size: 1.65rem;
    }
    body.route-god .god-kpi-card {
        min-height: 88px;
        padding: 12px;
    }
    body.route-god .god-metric-band {
        display: grid;
        grid-template-columns: 1fr;
        overflow: visible;
    }
    body.route-god .god-metric-band .god-kpi-card {
        width: 100%;
        min-width: 0;
    }
}
