:root,
html[data-theme="dark"] {
    color-scheme: dark;

    --bg-base: #040b18;
    --bg-elevated: #081326;
    --bg-surface: #0e1d36;
    --bg-surface-hover: #15294a;
    --bg-input: #060f1f;
    --header-bg: rgba(8, 19, 38, 0.88);
    --mobile-bar-bg: rgba(8, 19, 38, 0.96);

    --border-subtle: rgba(114, 174, 232, 0.16);
    --border-strong: rgba(114, 174, 232, 0.3);

    --text-primary: #f2f8ff;
    --text-secondary: #98b4d6;
    --text-muted: #627fa5;

    --accent: #02dde2;
    --accent-hover: #3aeaf0;
    --accent-deep: #0133b5;
    --accent-soft: rgba(2, 221, 226, 0.13);
    --accent-border: rgba(2, 221, 226, 0.36);
    --accent-text: #031526;

    --btn-primary-bg: linear-gradient(135deg, #02dde2 0%, #00b2d9 100%);
    --btn-primary-hover: linear-gradient(135deg, #32eaef 0%, #10c4ea 100%);
    --btn-primary-shadow: 0 6px 20px rgba(2, 221, 226, 0.22);

    --badge-bg: rgba(1, 51, 181, 0.28);
    --badge-border: rgba(2, 221, 226, 0.34);
    --badge-text: #6cf0f4;

    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);
    --danger-border: rgba(248, 113, 113, 0.45);
    --danger-text: #fecaca;

    --glow-primary: rgba(2, 221, 226, 0.12);
    --glow-secondary: rgba(1, 51, 181, 0.2);

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-pill: 9999px;

    --shadow-sm: 0 2px 6px rgba(2, 6, 18, 0.35);
    --shadow-md: 0 14px 36px rgba(2, 6, 18, 0.52);

    --container-max: 76rem;
    --header-height: 4.125rem;
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="light"] {
    color-scheme: light;

    --bg-base: #f2f7fc;
    --bg-elevated: #ffffff;
    --bg-surface: #ffffff;
    --bg-surface-hover: #e8f2fb;
    --bg-input: #f7fbff;
    --header-bg: rgba(255, 255, 255, 0.9);
    --mobile-bar-bg: rgba(255, 255, 255, 0.96);

    --border-subtle: rgba(4, 33, 68, 0.1);
    --border-strong: rgba(4, 33, 68, 0.2);

    --text-primary: #042144;
    --text-secondary: #3e587a;
    --text-muted: #6b84a4;

    --accent: #0066b8;
    --accent-hover: #0133b5;
    --accent-deep: #0133b5;
    --accent-soft: rgba(0, 136, 204, 0.1);
    --accent-border: rgba(0, 136, 204, 0.3);
    --accent-text: #ffffff;

    --btn-primary-bg: linear-gradient(135deg, #0088cc 0%, #0133b5 100%);
    --btn-primary-hover: linear-gradient(135deg, #0074b3 0%, #002894 100%);
    --btn-primary-shadow: 0 6px 18px rgba(1, 51, 181, 0.2);

    --badge-bg: rgba(2, 221, 226, 0.15);
    --badge-border: rgba(0, 136, 204, 0.3);
    --badge-text: #005b99;

    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.08);
    --danger-border: rgba(220, 38, 38, 0.32);
    --danger-text: #991b1b;

    --glow-primary: rgba(2, 221, 226, 0.1);
    --glow-secondary: rgba(1, 51, 181, 0.07);

    --shadow-sm: 0 2px 8px rgba(4, 33, 68, 0.06);
    --shadow-md: 0 14px 36px rgba(4, 33, 68, 0.1);
}

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

html {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 14% -8%, var(--glow-primary), transparent 44%),
        radial-gradient(circle at 88% 2%, var(--glow-secondary), transparent 40%),
        var(--bg-base);
    color: var(--text-primary);
    overflow-x: clip;
    transition: background-color 0.18s ease, color 0.18s ease;
}

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

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

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

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -4rem;
    z-index: 100;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0.75rem;
}

/* Brand & Logos */
.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.brand-lg {
    display: inline-flex;
}

.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    display: block;
    width: auto;
    height: 30px;
}

.brand-logo-auth .brand-logo {
    height: 44px;
    max-width: 100%;
}

.brand-logo-light {
    display: none;
}

html[data-theme="light"] .brand-logo-dark {
    display: none;
}

html[data-theme="light"] .brand-logo-light {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--accent-text);
    box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
}

.btn-ghost {
    background: var(--bg-surface);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-strong);
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* Circular Icon Buttons & Theme Toggle */
.icon-btn,
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    flex-shrink: 0;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover,
.theme-toggle:hover {
    background: var(--bg-surface-hover);
    border-color: var(--accent-border);
    color: var(--accent);
}

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

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

html[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

.auth-theme-bar {
    position: fixed;
    top: calc(1rem + env(safe-area-inset-top, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
    z-index: 30;
}

/* Top App Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: env(safe-area-inset-top, 0px);
    padding-inline: 1rem;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.app-header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    min-height: var(--header-height);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
}

.header-tabs {
    display: none;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: var(--radius-pill);
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
}

.header-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-pill);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-tab:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
}

.header-tab.is-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--accent-border);
}

.header-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.user-menu {
    position: relative;
    min-width: 0;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
    padding: 0.375rem 0.5rem 0.375rem 0.4375rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.user-pill:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-strong);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 700;
}

.user-name {
    display: none;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-chevron {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: min(17rem, calc(100vw - 2rem));
    padding: 0.875rem;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    z-index: 60;
}

.user-menu-panel[hidden] {
    display: none;
}

.user-menu-meta {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.user-menu-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.user-menu-email {
    margin-top: 0.125rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.user-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.user-menu-link:hover {
    background: var(--bg-surface-hover);
    border-color: var(--accent-border);
    color: var(--accent);
}

.user-menu-link.is-active {
    background: var(--accent-soft);
    border-color: var(--accent-border);
    color: var(--accent);
}

/* Main Workspace */
.app-main {
    padding: 1.25rem 1rem calc(5.75rem + env(safe-area-inset-bottom, 0px));
}

.app-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.phase-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-pill);
    background: var(--badge-bg);
    border: 1px solid var(--badge-border);
    color: var(--badge-text);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.workspace-title {
    margin: 0.625rem 0 0.375rem;
    font-size: clamp(1.375rem, 2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.workspace-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 44rem;
}

.placeholder-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
}

.surface-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.125rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease;
}

.surface-card:hover {
    border-color: var(--border-strong);
}

.placeholder-card-title {
    margin: 0 0 0.375rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.placeholder-card-text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Mobile Bottom Tab Bar (< 640px) */
.mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    padding: 0.375rem 0.75rem calc(0.375rem + env(safe-area-inset-bottom, 0px));
    background: var(--mobile-bar-bg);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-subtle);
}

.mobile-tabbar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 46px;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-tabbar-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: var(--radius-pill);
    background: currentColor;
    opacity: 0.45;
}

.mobile-tabbar-link.is-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.mobile-tabbar-link.is-active .mobile-tabbar-dot {
    opacity: 1;
}

/* Auth & Error Layout */
.auth-main {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: calc(4.5rem + env(safe-area-inset-top, 0px)) 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.auth-card {
    width: 100%;
    max-width: 26.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-md);
}

.auth-card-header {
    margin-bottom: 1.375rem;
}

.auth-title {
    margin: 0.875rem 0 0.375rem;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label-optional {
    color: var(--text-secondary);
    font-weight: 400;
}

.form-input {
    width: 100%;
    min-height: 44px;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:hover {
    border-color: var(--accent-border);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-input.is-invalid {
    border-color: var(--danger-border);
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--danger-soft);
}

.field-error {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--danger);
}

.form-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius-sm);
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    font-size: 0.875rem;
}

.auth-card-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--accent);
    font-weight: 600;
    padding: 0.25rem 0.125rem;
}

.auth-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.error-code {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-pill);
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    font-size: 0.8125rem;
    font-weight: 700;
}

.error-actions {
    margin-top: 1.25rem;
}

/* Tablet (>= 640px) */
@media (min-width: 640px) {
    .app-header {
        padding-inline: 1.5rem;
    }

    .brand-logo-header .brand-logo {
        height: 34px;
    }

    .brand-logo-auth .brand-logo {
        height: 48px;
    }

    .header-tabs {
        display: inline-flex;
    }

    .user-pill {
        gap: 0.5rem;
        padding: 0.375rem 0.75rem 0.375rem 0.4375rem;
    }

    .user-name {
        display: block;
        max-width: 7.5rem;
    }

    .mobile-tabbar {
        display: none;
    }

    .app-main {
        padding: 1.75rem 1.5rem 2.5rem;
    }

    .placeholder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-main {
        padding: 2rem 1rem;
    }

    .auth-card {
        padding: 2rem;
    }
}

/* Desktop (>= 960px) */
@media (min-width: 960px) {
    .app-header-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .brand {
        justify-self: start;
    }

    .brand-logo-header {
        margin-left: -3px;
    }

    .header-tabs {
        justify-self: center;
    }

    .header-user {
        justify-self: end;
    }

    .user-name {
        max-width: 11rem;
    }

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

/* Mobile PWA Install UI */
.user-menu-install-btn {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.user-menu-install-btn[hidden],
.pwa-install-banner[hidden],
.pwa-guide-panel[hidden] {
    display: none;
}

.pwa-install-banner {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 48;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    max-width: 30rem;
    margin-inline: auto;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--accent-border);
    box-shadow: var(--shadow-md);
}

body.is-landing-page .pwa-install-banner {
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.pwa-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
}

.pwa-banner-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
}

.pwa-banner-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

.pwa-banner-sub {
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.pwa-banner-btn {
    min-height: 44px;
    padding-inline: 0.75rem;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.pwa-banner-close,
.pwa-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.375rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pwa-banner-close:hover,
.pwa-dialog-close:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.pwa-dialog {
    width: min(26rem, calc(100vw - 1.5rem));
    max-height: calc(100dvh - 2rem);
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.pwa-dialog::backdrop {
    background: rgba(2, 8, 20, 0.72);
    backdrop-filter: blur(4px);
}

.pwa-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 0.75rem 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.pwa-dialog-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pwa-dialog-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
}

.pwa-guide-lead {
    margin: 0 0 0.875rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pwa-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pwa-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.pwa-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.0625rem;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
}

.pwa-step-text {
    min-width: 0;
}

.pwa-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-inline: 0.125rem;
    padding: 0.125rem 0.25rem;
    border-radius: 0.375rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--accent);
}

.pwa-ios-callout {
    margin-bottom: 1rem;
    padding: 0.875rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
}

.pwa-ios-callout-text {
    margin: 0 0 0.625rem;
    font-size: 0.84375rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.pwa-copy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

.pwa-copy-status {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
}

.pwa-dialog-footer {
    padding: 0.75rem 1.25rem 1.125rem;
    border-top: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
    [data-pwa-install-ui] {
        display: none !important;
    }
}

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