@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/static/fonts/Inter-upright.var.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/RobotoCondensed-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/RobotoCondensed-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/RobotoCondensed-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/static/fonts/RobotoCondensed-Bold.ttf') format('truetype');
}

:root {
    --font-ui: 'Inter', sans-serif;
    --font-label: 'Roboto Condensed', sans-serif;
}

.visually-hidden {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

/* The signed-out poster shell no longer ships Bootstrap. Keep the small utility subset
   used by the teaser source/modal local to that shell so the main surfaces stay unchanged. */
.app-shell-body--landing-chrome-suppressed .d-flex,
.landing-teaser-workspace-body .d-flex {
    display: flex !important;
}

.app-shell-body--landing-chrome-suppressed .d-grid,
.landing-teaser-workspace-body .d-grid {
    display: grid !important;
}

.app-shell-body--landing-chrome-suppressed .align-items-center,
.landing-teaser-workspace-body .align-items-center {
    align-items: center !important;
}

.app-shell-body--landing-chrome-suppressed .justify-content-between,
.landing-teaser-workspace-body .justify-content-between {
    justify-content: space-between !important;
}

.app-shell-body--landing-chrome-suppressed .flex-grow-1,
.landing-teaser-workspace-body .flex-grow-1 {
    flex-grow: 1 !important;
}

.app-shell-body--landing-chrome-suppressed .text-center,
.landing-teaser-workspace-body .text-center {
    text-align: center !important;
}

.app-shell-body--landing-chrome-suppressed .text-truncate,
.landing-teaser-workspace-body .text-truncate {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.app-shell-body--landing-chrome-suppressed .position-relative,
.landing-teaser-workspace-body .position-relative {
    position: relative !important;
}

.app-shell-body--landing-chrome-suppressed .mx-1,
.landing-teaser-workspace-body .mx-1 {
    margin-left: 0.25rem !important;
    margin-right: 0.25rem !important;
}

.app-shell-body--landing-chrome-suppressed .mb-1,
.landing-teaser-workspace-body .mb-1 {
    margin-bottom: 0.25rem !important;
}

.app-shell-body--landing-chrome-suppressed .mb-2,
.landing-teaser-workspace-body .mb-2 {
    margin-bottom: 0.5rem !important;
}

.app-shell-body--landing-chrome-suppressed .mb-3,
.landing-teaser-workspace-body .mb-3 {
    margin-bottom: 1rem !important;
}

.app-shell-body--landing-chrome-suppressed .mb-4,
.landing-teaser-workspace-body .mb-4 {
    margin-bottom: 1.5rem !important;
}

.app-shell-body {
    font-family: var(--font-ui);
    font-synthesis: none;
    min-height: 100vh;
}

.app-shell-topbar {
    background:
        radial-gradient(900px 360px at 12% -30%, color-mix(in srgb, var(--accent, #43dfe7) 11%, transparent), transparent 60%),
        radial-gradient(900px 360px at 88% -20%, color-mix(in srgb, var(--accent-warm, #ffb366) 10%, transparent), transparent 62%),
        var(--surface, #2a282d);
    border-bottom: 1px solid var(--border-subtle, rgba(236, 236, 247, 0.12));
    position: sticky;
    top: 0;
    z-index: 40;
}

.app-shell-topbar__inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 auto;
    max-width: none;
    padding: 0.9rem clamp(0.85rem, 1.5vw, 1.25rem);
    width: 100%;
}

.app-shell-topbar__tools {
    align-items: center;
    display: inline-flex;
    gap: 0.8rem;
    margin-left: auto;
    min-height: 2.5rem;
    min-width: 0;
}

.app-shell-topbar__page-slot {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    min-width: 0;
}

.app-shell-topbar__page-slot[hidden],
.app-shell-auth[hidden],
.app-shell-sidebar-toggle[hidden] {
    display: none !important;
}

.app-shell-sidebar-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-subtle, rgba(236, 236, 247, 0.12));
    border-radius: 7px;
    color: var(--text-secondary, #ececf7);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.15rem;
    justify-content: center;
    padding: 0;
    transition:
        background-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1),
        border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1),
        color 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
    width: 2.15rem;
}

.app-shell-sidebar-toggle:hover,
.app-shell-sidebar-toggle:focus-visible,
.app-shell-sidebar-toggle.is-sidebar-open {
    background: rgba(67, 223, 231, 0.14);
    border-color: color-mix(in srgb, var(--accent, #43dfe7) 38%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
    color: var(--text-primary, #f5f4ee);
}

.app-shell-sidebar-toggle:focus-visible {
    outline: 2px solid var(--focus-ring, rgba(67, 223, 231, 0.55));
    outline-offset: 2px;
}

.app-shell-sidebar-toggle__icon {
    background: currentColor;
    display: block;
    height: 1.18rem;
    mask: url('/static/menu-svgrepo-com.svg') center / contain no-repeat;
    -webkit-mask: url('/static/menu-svgrepo-com.svg') center / contain no-repeat;
    width: 1.18rem;
}

:root[data-bs-theme="light"] .app-shell-sidebar-toggle {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(25, 25, 32, 0.72);
}

:root[data-bs-theme="light"] .app-shell-sidebar-toggle:hover,
:root[data-bs-theme="light"] .app-shell-sidebar-toggle:focus-visible,
:root[data-bs-theme="light"] .app-shell-sidebar-toggle.is-sidebar-open {
    background: rgba(67, 223, 231, 0.16);
    color: rgba(25, 25, 32, 0.92);
}

.app-shell-brand {
    color: var(--text-primary, #f5f4ee);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(1rem, 0.92rem + 0.45vw, 1.18rem);
    font-weight: 600;
    letter-spacing: 0;
    text-decoration: none;
    transition: color 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.app-shell-brand:hover {
    color: color-mix(in srgb, var(--accent, #43dfe7) 78%, var(--text-primary, #f5f4ee));
}

.app-shell-brand:focus-visible {
    outline: 2px solid var(--focus-ring, rgba(67, 223, 231, 0.55));
    outline-offset: 2px;
}

.app-shell-main {
    padding-top: 0.35rem;
}

/* Shared page-header primitives for the active collections routes. */
.page-breadcrumb {
    color: var(--text-secondary, #ececf7);
    font-size: var(--fz-12, 0.75rem);
    font-weight: 400;
    margin-bottom: var(--space-xs, 0.5rem);
    opacity: 0.7;
}

.page-breadcrumb .breadcrumb-icon {
    display: inline-block;
    font-size: 1em;
    line-height: 1;
    margin-right: 0.25rem;
    vertical-align: -0.2em;
}

.page-breadcrumb a {
    color: var(--text-secondary, #ececf7);
    text-decoration: none;
    text-underline-offset: 3px;
    transition:
        color 160ms cubic-bezier(0.4, 0.0, 0.2, 1),
        text-decoration-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.page-breadcrumb a:hover {
    color: var(--text-primary, #f5f4ee);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--text-primary, #f5f4ee) 40%, transparent);
}

.page-breadcrumb .breadcrumb-separator {
    margin: 0 var(--space-xs, 0.5rem);
    opacity: 0.5;
}

.page-title-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: var(--space-xs, 0.5rem);
    justify-content: flex-end;
}

.page-history-actions {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    gap: var(--space-xs, 0.5rem);
    justify-content: flex-end;
}

.page-history-actions:empty {
    display: none;
}

.chord-settings-wrap {
    align-items: center;
    display: inline-flex;
    gap: var(--space-xs, 0.5rem);
    position: relative;
}

.app-shell-topbar__page-slot .chord-settings-wrap {
    gap: 0.45rem;
}

.chord-settings-wrap .page-history-actions {
    margin-left: 0;
    margin-right: 2em;
}

.page-title-row .primary-button,
#share-collection-btn,
#undo-redo-wrap .primary-button,
#undo-redo-wrap #undo-history-btn,
#undo-redo-wrap #redo-history-btn,
.page-title-row .lock-button,
.page-title-row #help-toggle,
.page-title-row #chord-settings-toggle,
.app-shell-topbar__page-slot .lock-button,
.app-shell-topbar__page-slot #help-toggle,
.app-shell-topbar__page-slot #chord-settings-toggle {
    align-items: center;
    background: transparent;
    border: 1px solid var(--border-subtle, rgba(236, 236, 247, 0.12));
    border-radius: var(--radius-component, 8px);
    box-shadow: none;
    color: var(--text-primary, #f5f4ee);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--font-inter, 'Inter', system-ui, sans-serif);
    font-size: var(--fz-14, 0.875rem);
    font-weight: 500;
    gap: var(--space-xs, 0.5rem);
    height: auto;
    justify-content: center;
    line-height: 1;
    min-height: 2.2em;
    padding: var(--space-s, 0.75rem) var(--space-m, 1rem);
    transition:
        background 160ms cubic-bezier(0.4, 0.0, 0.2, 1),
        border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1),
        color 160ms cubic-bezier(0.4, 0.0, 0.2, 1),
        transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

#share-collection-btn,
#undo-redo-wrap .primary-button,
#undo-redo-wrap #undo-history-btn,
#undo-redo-wrap #redo-history-btn,
.page-title-row .lock-button,
.page-title-row #help-toggle,
.page-title-row #chord-settings-toggle,
.app-shell-topbar__page-slot .lock-button,
.app-shell-topbar__page-slot #help-toggle,
.app-shell-topbar__page-slot #chord-settings-toggle {
    min-height: 2.45rem;
    min-width: 2.45rem;
    padding: var(--space-s, 0.75rem);
}

#share-collection-btn,
#undo-redo-wrap .primary-button {
    padding-inline: var(--space-s, 0.75rem);
}

.page-title-row .primary-button:hover,
.page-title-row .primary-button:focus-visible,
#share-collection-btn:hover,
#share-collection-btn:focus-visible,
#undo-redo-wrap .primary-button:hover,
#undo-redo-wrap .primary-button:focus-visible,
#undo-redo-wrap #undo-history-btn:hover,
#undo-redo-wrap #undo-history-btn:focus-visible,
#undo-redo-wrap #redo-history-btn:hover,
#undo-redo-wrap #redo-history-btn:focus-visible,
.page-title-row .lock-button:hover,
.page-title-row .lock-button:focus-visible,
.page-title-row #help-toggle:hover,
.page-title-row #help-toggle:focus-visible,
.page-title-row #chord-settings-toggle:hover,
.page-title-row #chord-settings-toggle:focus-visible,
.app-shell-topbar__page-slot .lock-button:hover,
.app-shell-topbar__page-slot .lock-button:focus-visible,
.app-shell-topbar__page-slot #help-toggle:hover,
.app-shell-topbar__page-slot #help-toggle:focus-visible,
.app-shell-topbar__page-slot #chord-settings-toggle:hover,
.app-shell-topbar__page-slot #chord-settings-toggle:focus-visible {
    background: color-mix(in srgb, var(--accent-soft, rgba(67, 223, 231, 0.16)) 30%, transparent);
    border-color: color-mix(
        in srgb,
        var(--border-subtle, rgba(236, 236, 247, 0.12)) 150%,
        transparent
    );
    transform: translateY(-1px);
}

.page-title-row .primary-button:focus-visible,
#share-collection-btn:focus-visible,
#undo-redo-wrap .primary-button:focus-visible,
#undo-redo-wrap #undo-history-btn:focus-visible,
#undo-redo-wrap #redo-history-btn:focus-visible,
.page-title-row .lock-button:focus-visible,
.page-title-row #help-toggle:focus-visible,
.page-title-row #chord-settings-toggle:focus-visible,
.app-shell-topbar__page-slot .lock-button:focus-visible,
.app-shell-topbar__page-slot #help-toggle:focus-visible,
.app-shell-topbar__page-slot #chord-settings-toggle:focus-visible {
    outline: 2px solid var(--focus-ring, rgba(67, 223, 231, 0.55));
    outline-offset: 2px;
}

.page-title-row .primary-button:disabled,
#share-collection-btn:disabled,
#undo-redo-wrap .primary-button:disabled,
#undo-redo-wrap #undo-history-btn:disabled,
#undo-redo-wrap #redo-history-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    transform: none;
}

.page-title-row .primary-button .material-icons-outlined,
#share-collection-btn .material-icons-outlined,
#undo-redo-wrap .primary-button .material-icons-outlined,
#undo-redo-wrap #undo-history-btn .material-icons-outlined,
#undo-redo-wrap #redo-history-btn .material-icons-outlined,
.page-title-row .lock-button .material-icons-outlined,
.page-title-row #help-toggle .material-icons-outlined,
.page-title-row #chord-settings-toggle .material-icons-outlined,
.app-shell-topbar__page-slot .lock-button .material-icons-outlined,
.app-shell-topbar__page-slot #help-toggle .material-icons-outlined,
.app-shell-topbar__page-slot #chord-settings-toggle .material-icons-outlined {
    color: currentColor;
    font-size: 1.25em;
    opacity: 0.85;
    transition: color 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

#share-collection-btn .material-icons-outlined,
#undo-redo-wrap .primary-button .material-icons-outlined,
#undo-redo-wrap #undo-history-btn .material-icons-outlined,
#undo-redo-wrap #redo-history-btn .material-icons-outlined {
    font-size: 1.2em;
}

:root[data-bs-theme="light"] .page-title-row .primary-button,
:root[data-bs-theme="light"] #share-collection-btn,
:root[data-bs-theme="light"] #undo-redo-wrap .primary-button,
:root[data-bs-theme="light"] #undo-redo-wrap #undo-history-btn,
:root[data-bs-theme="light"] #undo-redo-wrap #redo-history-btn,
:root[data-bs-theme="light"] .page-title-row .lock-button,
:root[data-bs-theme="light"] .page-title-row #help-toggle,
:root[data-bs-theme="light"] .page-title-row #chord-settings-toggle,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot .lock-button,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot #help-toggle,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot #chord-settings-toggle {
    border-color: rgba(0, 0, 0, 0.15);
    color: #2f2f2f;
}

:root[data-bs-theme="light"] .page-title-row .primary-button:hover,
:root[data-bs-theme="light"] .page-title-row .primary-button:focus-visible,
:root[data-bs-theme="light"] #share-collection-btn:hover,
:root[data-bs-theme="light"] #share-collection-btn:focus-visible,
:root[data-bs-theme="light"] #undo-redo-wrap .primary-button:hover,
:root[data-bs-theme="light"] #undo-redo-wrap .primary-button:focus-visible,
:root[data-bs-theme="light"] #undo-redo-wrap #undo-history-btn:hover,
:root[data-bs-theme="light"] #undo-redo-wrap #undo-history-btn:focus-visible,
:root[data-bs-theme="light"] #undo-redo-wrap #redo-history-btn:hover,
:root[data-bs-theme="light"] #undo-redo-wrap #redo-history-btn:focus-visible,
:root[data-bs-theme="light"] .page-title-row .lock-button:hover,
:root[data-bs-theme="light"] .page-title-row .lock-button:focus-visible,
:root[data-bs-theme="light"] .page-title-row #help-toggle:hover,
:root[data-bs-theme="light"] .page-title-row #help-toggle:focus-visible,
:root[data-bs-theme="light"] .page-title-row #chord-settings-toggle:hover,
:root[data-bs-theme="light"] .page-title-row #chord-settings-toggle:focus-visible,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot .lock-button:hover,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot .lock-button:focus-visible,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot #help-toggle:hover,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot #help-toggle:focus-visible,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot #chord-settings-toggle:hover,
:root[data-bs-theme="light"] .app-shell-topbar__page-slot #chord-settings-toggle:focus-visible {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.25);
}

.app-shell-auth {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated, #2a282d) 88%, transparent);
    border: 1px solid var(--border-subtle, rgba(236, 236, 247, 0.12));
    border-radius: 999px;
    color: var(--text-primary, #f5f4ee);
    display: inline-flex;
    gap: 0.9rem;
    max-width: min(100%, 34rem);
    padding: 0.5rem 0.65rem 0.5rem 0.95rem;
}

.app-shell-auth--compact {
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
}

.app-shell-auth__actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.app-shell-auth[data-auth-state="signed-out"] {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    padding: 0;
}

.app-shell-auth[data-auth-state="signed-out"] .app-shell-auth__actions {
    margin-left: auto;
}

.app-shell-auth__summary {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.app-shell-auth__summary[hidden] {
    display: none !important;
}

.app-shell-auth__status-dot {
    background: color-mix(in srgb, #7cf0b1 78%, var(--text-primary, #f5f4ee));
    border-radius: 999px;
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, #7cf0b1 22%, transparent);
    display: inline-block;
    flex-shrink: 0;
    height: 0.72rem;
    width: 0.72rem;
}

.app-shell-auth__eyebrow {
    color: color-mix(in srgb, var(--accent, #43dfe7) 60%, var(--text-primary, #f5f4ee));
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.app-shell-auth__label {
    color: var(--text-primary, #f5f4ee);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell-auth__button {
    align-items: center;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 150%, transparent);
    border-radius: var(--radius-component, 10px);
    color: var(--text-primary, #f5f4ee);
    cursor: pointer;
    display: inline-flex;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    gap: 0.45rem;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0.72rem 1.1rem;
    transition: background 160ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.app-shell-auth__button:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent-soft, rgba(67, 223, 231, 0.16)) 42%, transparent);
    border-color: color-mix(in srgb, var(--accent, #43dfe7) 38%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
    transform: translateY(-1px);
}

.app-shell-auth__button:focus-visible {
    outline: 2px solid var(--focus-ring, rgba(67, 223, 231, 0.55));
    outline-offset: 2px;
}

.app-shell-auth__button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.app-shell-auth__button--primary {
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent-warm, #ffb366) 82%, #26161d) 0%,
            color-mix(in srgb, var(--accent, #43dfe7) 34%, #25192b) 100%);
    border-color: color-mix(in srgb, var(--accent-warm, #ffb366) 44%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: var(--text-primary, #f5f4ee);
}

.app-shell-auth__button--primary:hover:not(:disabled) {
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent-warm, #ffb366) 88%, #2b1820) 0%,
            color-mix(in srgb, var(--accent, #43dfe7) 40%, #261b31) 100%);
    border-color: color-mix(in srgb, var(--accent-warm, #ffb366) 58%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.app-shell-auth__button--topbar-primary {
    background: color-mix(in srgb, var(--surface-elevated, #2a282d) 90%, rgba(255, 255, 255, 0.05));
    border-color: color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 150%, transparent);
    border-radius: 999px;
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    min-height: 2.45rem;
    padding: 0.68rem 1rem;
}

.app-shell-auth__button--topbar-primary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent-soft, rgba(67, 223, 231, 0.16)) 40%, var(--surface-elevated, #2a282d));
    border-color: color-mix(in srgb, var(--accent, #43dfe7) 34%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.app-shell-auth[data-auth-state="authenticated"] .app-shell-auth__eyebrow {
    color: color-mix(in srgb, #7cf0b1 62%, var(--text-primary, #f5f4ee));
}

.app-shell-auth[data-auth-state="signed-out"] .app-shell-auth__eyebrow {
    color: color-mix(in srgb, var(--accent-warm, #ffb366) 78%, var(--text-primary, #f5f4ee));
}

.chord-settings-action[data-auth-secondary-action] {
    align-items: flex-start;
    gap: 0.7rem;
}

.chord-settings-action[data-auth-secondary-action] .material-icons-outlined {
    margin-top: 0.08rem;
}

.app-shell-auth-menu-button {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.app-shell-auth-menu-button__label {
    color: var(--text-primary, #f5f4ee);
    display: block;
    font: inherit;
}

.app-shell-auth-menu-button__summary {
    align-items: center;
    color: color-mix(in srgb, var(--text-secondary, #b9b6c9) 88%, var(--text-primary, #f5f4ee));
    display: inline-flex;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    gap: 0.42rem;
    line-height: 1.2;
    min-width: 0;
}

.app-shell-auth-menu-button__summary[hidden] {
    display: none !important;
}

.chord-settings-action[data-auth-secondary-action] .app-shell-auth-menu-button {
    align-items: center;
    column-gap: 0.75rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
}

.chord-settings-action[data-auth-secondary-action] .app-shell-auth-menu-button__summary {
    justify-self: end;
    max-width: 100%;
    white-space: nowrap;
}

.app-shell-auth-menu-button__status-dot {
    background: color-mix(in srgb, #7cf0b1 78%, var(--text-primary, #f5f4ee));
    border-radius: 999px;
    box-shadow: 0 0 0 0.14rem color-mix(in srgb, #7cf0b1 20%, transparent);
    flex-shrink: 0;
    height: 0.44rem;
    width: 0.44rem;
}

.app-shell-auth-menu-button__status-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell-auth-gate[hidden] {
    display: none !important;
}

.app-shell-auth-gate {
    margin: 0 auto;
    max-width: min(100%, 1600px);
    padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.75rem) 0;
}

.app-shell-auth-gate__card {
    background:
        radial-gradient(960px 360px at 8% -20%, color-mix(in srgb, var(--accent, #43dfe7) 11%, transparent), transparent 62%),
        radial-gradient(960px 360px at 92% -16%, color-mix(in srgb, var(--accent-warm, #ffb366) 12%, transparent), transparent 60%),
        linear-gradient(135deg,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 92%, #1d1720) 0%,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 84%, #21152b) 48%,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 86%, #2a1a24) 100%),
        var(--surface-elevated, #2a282d);
    border: 1px solid var(--border-subtle, rgba(236, 236, 247, 0.12));
    border-radius: 1.2rem;
    box-shadow: var(--shadow-modal, 0 12px 40px rgba(0, 0, 0, 0.35));
    color: var(--text-primary, #f5f4ee);
    isolation: isolate;
    overflow: hidden;
    min-height: min(70vh, 40rem);
    padding: clamp(1.35rem, 2.8vw, 2.5rem);
    position: relative;
}

.app-shell-auth-gate__card::before {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent-soft, rgba(67, 223, 231, 0.16)) 55%, transparent), transparent 68%),
        radial-gradient(540px 180px at 14% 0%, color-mix(in srgb, var(--accent, #43dfe7) 14%, transparent), transparent 62%),
        radial-gradient(540px 180px at 86% 0%, color-mix(in srgb, var(--accent-warm, #ffb366) 14%, transparent), transparent 62%);
    content: '';
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.app-shell-auth-gate__card > * {
    position: relative;
    z-index: 1;
}

.app-shell-auth-gate__hero {
    display: grid;
    gap: clamp(1.6rem, 3vw, 2.6rem);
    min-height: 100%;
}

.app-shell-auth-gate__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    max-width: 48rem;
    min-width: 0;
    padding: clamp(0.25rem, 0.8vw, 0.5rem) 0 0;
    text-align: center;
}

@keyframes app-shell-gate-wash-in {
    0% {
        opacity: 0.52;
    }

    100% {
        opacity: 0;
    }
}

.app-shell-auth-gate__eyebrow {
    color: color-mix(in srgb, var(--accent, #43dfe7) 65%, var(--text-primary, #f5f4ee));
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
}

.app-shell-auth-gate__title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(2.2rem, 1.7rem + 2.05vw, 3.9rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 0.94;
    margin: 0 0 0.9rem;
    max-width: 11ch;
}

.app-shell-auth-gate__copy {
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 78%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.62;
    margin: 0 0 0.85rem;
    max-width: 46ch;
}

.app-shell-auth-gate__meta {
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 62%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0 0 1.25rem;
    max-width: 42ch;
}

.app-shell-auth-gate__meta[hidden] {
    display: none !important;
}

.app-shell-auth-gate__actions {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.app-shell-auth-gate__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.app-shell-auth-gate__chip {
    background: color-mix(in srgb, rgba(255, 255, 255, 0.06) 90%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 140%, transparent);
    border-radius: 999px;
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 80%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.77rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    padding: 0.5rem 0.78rem;
}

.app-shell-auth-gate__preview {
    display: block;
    position: relative;
}

.app-shell-auth-gate__preview-stage {
    margin: 0 auto;
    max-width: 64rem;
    position: relative;
}

.app-shell-auth-gate__preview-kicker {
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 58%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1;
    margin: 0 0 0.9rem;
    text-align: center;
    text-transform: uppercase;
}

.app-shell-auth-gate__preview-showcase {
    align-items: stretch;
    display: grid;
    gap: clamp(1rem, 1.8vw, 1.35rem);
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.82fr);
}

.app-shell-auth-gate__diagram-shell {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        linear-gradient(160deg,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 90%, #120f16) 0%,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 82%, #1d1330) 100%);
    border: 1px solid color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 135%, transparent);
    border-radius: 1.4rem;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    min-width: 0;
    padding: clamp(0.95rem, 1.7vw, 1.25rem);
    position: relative;
}

.app-shell-auth-gate__diagram-card {
    --chord-edit-scale: 1;
    --diagram-u: 0.68rem;
    align-items: flex-start;
    aspect-ratio: 0.72;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)),
        linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated, #2a282d) 88%, #181018), color-mix(in srgb, var(--surface-elevated, #2a282d) 80%, #261739));
    border: 1px solid color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 155%, transparent);
    border-radius: 1.1rem;
    box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    padding: 0.8rem 0.6rem 2.65rem;
    position: relative;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
    transform: translateY(0);
}

.app-shell-auth-gate__diagram-card[data-teaser-active="true"],
.app-shell-auth-gate__diagram-card:hover,
.app-shell-auth-gate__diagram-card:focus-visible {
    border-color: color-mix(in srgb, var(--accent, #43dfe7) 35%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
    box-shadow:
        0 24px 42px rgba(0, 0, 0, 0.28),
        0 0 0 1px color-mix(in srgb, var(--accent, #43dfe7) 18%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-0.24rem);
    z-index: 1;
}

.app-shell-auth-gate__diagram-card:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent, #43dfe7) 54%, transparent);
    outline-offset: 2px;
}

.app-shell-auth-gate__diagram-wall {
    display: grid;
    gap: clamp(0.8rem, 1.35vw, 1rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    pointer-events: auto;
}

.app-shell-auth-gate__diagram-card .chord-shape-input {
    display: none;
}

.app-shell-auth-gate__diagram-card .chord-diagram {
    margin: 0 auto;
    transform: scale(1.42);
    transform-origin: top center;
}

.app-shell-auth-gate__diagram-meta {
    display: grid;
    gap: 0.16rem;
    inset: auto 0.8rem 0.8rem;
    position: absolute;
}

.app-shell-auth-gate__diagram-name,
.app-shell-auth-gate__diagram-group {
    margin: 0;
}

.app-shell-auth-gate__diagram-name {
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 92%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.app-shell-auth-gate__diagram-group {
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 56%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.app-shell-auth-gate__preview-orb {
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--accent, #43dfe7) 28%, transparent), transparent 42%),
        radial-gradient(circle at 70% 36%, color-mix(in srgb, var(--accent-warm, #ffb366) 34%, transparent), transparent 48%),
        radial-gradient(circle at 50% 70%, color-mix(in srgb, rgba(255, 255, 255, 0.16) 65%, transparent), transparent 58%);
    border-radius: 50%;
    filter: blur(36px);
    inset: auto 14% 6% auto;
    opacity: 0.72;
    position: absolute;
    width: clamp(16rem, 30vw, 22rem);
}

.app-shell-auth-gate__preview-card {
    backdrop-filter: blur(16px);
    background:
        linear-gradient(180deg,
            color-mix(in srgb, rgba(255, 255, 255, 0.09) 90%, transparent) 0%,
            color-mix(in srgb, var(--surface-elevated, #2a282d) 92%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 150%, transparent);
    border-radius: 1.25rem;
    box-shadow:
        0 20px 42px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.9rem;
    min-width: 0;
    padding: clamp(1rem, 1.75vw, 1.35rem);
    pointer-events: auto;
    position: relative;
    width: 100%;
}

.app-shell-auth-gate__preview-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.app-shell-auth-gate__preview-badge {
    background: color-mix(in srgb, var(--accent-soft, rgba(67, 223, 231, 0.16)) 44%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent, #43dfe7) 24%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
    border-radius: 999px;
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 86%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 0.45rem 0.7rem;
    text-transform: uppercase;
}

.app-shell-auth-gate__preview-panel {
    background:
        linear-gradient(180deg,
            color-mix(in srgb, rgba(255, 255, 255, 0.08) 92%, transparent),
            color-mix(in srgb, rgba(255, 255, 255, 0.02) 80%, transparent));
    border: 1px solid color-mix(in srgb, rgba(255, 255, 255, 0.18) 90%, transparent);
    border-radius: 1rem;
    padding: 0.95rem 0.95rem 1rem;
}

.app-shell-auth-gate__preview-eyebrow {
    color: color-mix(in srgb, var(--accent-warm, #ffb366) 75%, var(--text-primary, #f5f4ee));
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
}

.app-shell-auth-gate__preview-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin: 0 0 0.45rem;
}

.app-shell-auth-gate__preview-copy {
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 76%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.92rem;
    line-height: 1.58;
    margin: 0;
}

.app-shell-auth-gate__preview-hint {
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 68%, transparent);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
}

.app-shell-auth-gate__preview-list {
    display: grid;
    gap: 0.72rem;
}

.app-shell-auth-gate__preview-item {
    align-items: flex-start;
    color: color-mix(in srgb, var(--text-primary, #f5f4ee) 82%, transparent);
    display: grid;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.84rem;
    gap: 0.55rem;
    grid-template-columns: auto 1fr;
    line-height: 1.5;
}

.app-shell-auth-gate__preview-dot {
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent-warm, #ffb366) 88%, transparent),
            color-mix(in srgb, var(--accent, #43dfe7) 76%, transparent));
    border-radius: 999px;
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--accent-soft, rgba(67, 223, 231, 0.16)) 60%, transparent);
    height: 0.55rem;
    margin-top: 0.42rem;
    width: 0.55rem;
}

.app-shell-issue[hidden] {
    display: none !important;
}

.app-shell-issue {
    margin: 0 auto;
    max-width: min(100%, 1600px);
    padding: 0.85rem clamp(1rem, 2vw, 1.75rem) 0;
}

.app-shell-issue__inner {
    align-items: center;
    background: color-mix(in srgb, var(--surface-elevated, #2a282d) 92%, transparent);
    border: 1px solid color-mix(in srgb, #ff8f70 42%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
    border-radius: 1rem;
    box-shadow: var(--shadow-modal, 0 12px 40px rgba(0, 0, 0, 0.18));
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.9rem 1rem;
}

.app-shell-issue[data-issue-level="warning"] .app-shell-issue__inner {
    border-color: color-mix(in srgb, var(--accent-warm, #ffb366) 55%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
}

.app-shell-issue[data-issue-level="error"] .app-shell-issue__inner {
    border-color: color-mix(in srgb, #ff8f70 55%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
}

.app-shell-issue__copy {
    min-width: 0;
}

.app-shell-issue__eyebrow {
    color: color-mix(in srgb, #ffb38a 82%, var(--text-primary, #f5f4ee));
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 0.2rem;
    text-transform: uppercase;
}

.app-shell-issue[data-issue-level="warning"] .app-shell-issue__eyebrow {
    color: color-mix(in srgb, var(--accent-warm, #ffb366) 85%, var(--text-primary, #f5f4ee));
}

.app-shell-issue__message {
    color: var(--text-primary, #f5f4ee);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0;
}

.app-shell-issue__dismiss {
    align-items: center;
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 150%, transparent);
    border-radius: 999px;
    color: var(--text-primary, #f5f4ee);
    cursor: pointer;
    display: inline-flex;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.5rem 0.9rem;
    transition: background 160ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.app-shell-issue__dismiss:hover {
    background: color-mix(in srgb, rgba(255, 179, 138, 0.18) 42%, transparent);
    border-color: color-mix(in srgb, #ffb38a 42%, var(--border-subtle, rgba(236, 236, 247, 0.12)));
}

.app-shell-issue__dismiss:focus-visible {
    outline: 2px solid var(--focus-ring, rgba(67, 223, 231, 0.55));
    outline-offset: 2px;
}

.app-shell-body[data-cloud-auth="true"][data-auth-state="loading"] .app-shell-main,
.app-shell-body[data-cloud-auth="true"][data-auth-state="signed-out"]:not([data-page-surface-visible="true"]) .app-shell-main,
.app-shell-body[data-cloud-auth="true"][data-auth-state="storage-pending"]:not([data-page-surface-visible="true"]) .app-shell-main {
    display: none;
}

.app-shell-body--landing-chrome-suppressed[data-cloud-auth="true"][data-auth-state="loading"] .app-shell-main,
.app-shell-body--landing-chrome-suppressed[data-cloud-auth="true"][data-auth-state="signed-out"] .app-shell-main,
.app-shell-body--landing-chrome-suppressed[data-cloud-auth="true"][data-auth-state="storage-pending"] .app-shell-main {
    display: block;
}

.app-shell-body[data-cloud-auth="true"][data-auth-state="loading"] .app-shell-auth {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.app-shell-body[data-cloud-auth="true"][data-auth-state="loading"] .app-shell-topbar__tools {
    opacity: 0;
    pointer-events: none;
}

.app-shell-topbar__tools,
.app-shell-main,
.app-shell-auth-gate {
    filter: none;
    opacity: 1;
    transform: none;
    transform-origin: center top;
}

.app-shell-surface-enter {
    will-change: opacity, transform, filter;
}

.app-shell-auth-gate.app-shell-surface-enter .app-shell-auth-gate__card::before {
    animation: app-shell-gate-wash-in 260ms cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

.app-shell-body[data-cloud-auth="true"][data-auth-state="signed-out"] .app-shell-auth-gate__card,
.app-shell-body[data-cloud-auth="true"][data-auth-state="storage-pending"] .app-shell-auth-gate__card {
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.18),
        0 0 0 1px color-mix(in srgb, var(--accent, #43dfe7) 8%, transparent);
}

@media (max-width: 980px) {
    .app-shell-auth-gate__title {
        max-width: 10ch;
    }

    .app-shell-auth-gate__preview-showcase {
        grid-template-columns: 1fr;
    }

    .app-shell-auth-gate__preview-card {
        max-width: 100%;
    }

    .app-shell-auth-gate__diagram-shell {
        max-width: 34rem;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .app-shell-auth-gate {
        padding-top: 1rem;
    }

    .app-shell-auth-gate__card {
        min-height: auto;
        padding: 1.15rem;
    }

    .app-shell-auth-gate__title {
        font-size: clamp(1.7rem, 1.45rem + 1.4vw, 2.2rem);
        max-width: 11ch;
    }

    .app-shell-auth-gate__preview-orb {
        inset: auto auto -4% 8%;
        width: 12rem;
    }

    .app-shell-auth-gate__diagram-card {
        --diagram-u: 0.52rem;
        padding: 0.65rem 0.5rem 2.3rem;
    }

    .app-shell-auth-gate__actions {
        align-items: stretch;
    }

    .app-shell-auth-gate__chips {
        gap: 0.45rem;
        justify-content: center;
    }

    .app-shell-auth-gate__preview-kicker {
        margin-bottom: 0.75rem;
    }

    .app-shell-auth-gate__diagram-shell,
    .app-shell-auth-gate__preview-card {
        border-radius: 1.1rem;
    }

    .app-shell-auth-gate__preview-title {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell-topbar__tools,
    .app-shell-main,
    .app-shell-auth-gate {
        filter: none;
        opacity: 1;
        transform: none;
        will-change: auto;
    }

    .app-shell-auth-gate.app-shell-surface-enter .app-shell-auth-gate__card::before {
        animation: none;
    }
}

.app-settings-wrap {
    align-items: center;
    display: inline-flex;
    gap: var(--space-xs, 0.5rem);
    position: relative;
}

.app-settings-toggle {
    align-items: center;
    background: transparent;
    border: 1px solid var(--border-subtle, rgba(236, 236, 247, 0.12));
    border-radius: var(--radius-component, 8px);
    color: var(--text-primary, #f5f4ee);
    cursor: pointer;
    display: inline-flex;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: var(--fz-14, 0.875rem);
    font-weight: 500;
    gap: var(--space-xs, 0.5rem);
    justify-content: center;
    min-height: 2.2em;
    padding: var(--space-s, 0.75rem) var(--space-m, 1rem);
    transition: all 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.app-settings-toggle:hover {
    background: color-mix(in srgb, var(--accent-soft, rgba(67, 223, 231, 0.16)) 30%, transparent);
    border-color: color-mix(in srgb, var(--border-subtle, rgba(236, 236, 247, 0.12)) 150%, transparent);
    transform: translateY(-1px);
}

.app-settings-toggle:focus-visible {
    outline: 2px solid var(--focus-ring, rgba(67, 223, 231, 0.55));
    outline-offset: 2px;
}

.app-settings-toggle .material-icons-outlined {
    font-size: 1.25em;
    opacity: 0.85;
}

.app-settings-menu {
    background: var(--surface-elevated, #2a282d);
    border: 1px solid var(--border-subtle, rgba(236, 236, 247, 0.12));
    border-radius: var(--radius-card, 12px);
    box-shadow: var(--shadow-modal, 0 12px 40px rgba(0, 0, 0, 0.35));
    color: var(--text-primary, #f5f4ee);
    max-inline-size: min(22rem, calc(100vw - 16px));
    min-width: 14rem;
    opacity: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-m, 1rem);
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% + var(--space-xs, 0.5rem));
    transform: translateY(-4px);
    transition: opacity 160ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 32;
}

.app-settings-menu--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.app-settings-row {
    align-items: center;
    display: grid;
    grid-template-columns: 1fr;
}

.app-settings-label {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: var(--fz-14, 0.875rem);
    font-weight: 500;
    gap: var(--space-xs, 0.5rem);
    margin: 0;
}

.app-settings-label input[type="checkbox"] {
    cursor: pointer;
    height: 1.1em;
    margin: 0;
    width: 1.1em;
}

@media print {
    .app-shell-topbar {
        display: none !important;
    }

    .app-shell-auth-gate {
        display: none !important;
    }
}

@media (max-width: 760px) {
    .app-shell-topbar__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .app-shell-topbar__tools {
        justify-content: space-between;
        width: 100%;
    }

    .app-shell-auth {
        border-radius: 1rem;
        width: 100%;
    }

    .app-shell-auth__label {
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .app-shell-topbar__tools {
        align-items: stretch;
        flex-direction: column;
    }

    .app-shell-topbar__page-slot {
        justify-content: flex-end;
        width: 100%;
    }

    .app-shell-auth {
        align-items: stretch;
        flex-direction: column;
    }

    .app-shell-auth__actions {
        width: 100%;
    }

    .app-shell-auth__button {
        width: 100%;
    }

    .app-shell-issue__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .app-shell-issue__dismiss {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__inner {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.55rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-brand {
        flex: 0 1 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__tools {
        align-items: center;
        flex: 1 1 auto;
        flex-direction: row;
        gap: 0.4rem;
        justify-content: flex-end;
        min-width: 0;
        width: auto;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-auth {
        flex: 0 1 auto;
        gap: 0.4rem;
        max-width: min(100%, 13rem);
        min-width: 0;
        padding: 0.34rem 0.5rem;
        width: auto;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-auth__summary {
        gap: 0.02rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-auth__eyebrow {
        display: none;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-auth__label {
        font-size: 0.78rem;
        max-width: 100%;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot {
        flex: 0 1 auto;
        flex-wrap: nowrap;
        gap: 0.35rem;
        min-width: 0;
        overflow: hidden;
        width: auto;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot .chord-settings-wrap {
        gap: 0.3rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot .page-history-actions {
        gap: 0.3rem;
        margin-right: 0;
    }

    .app-shell-body[data-workspace-layout-route="true"] #share-collection-btn,
    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap .primary-button,
    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap #undo-history-btn,
    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap #redo-history-btn,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot .lock-button,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot #help-toggle,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot #chord-settings-toggle {
        min-height: 2.2rem;
        min-width: 2.2rem;
        padding: 0.58rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-auth-menu-button__summary {
        font-size: 0.66rem;
        gap: 0.3rem;
    }
}

@media (max-width: 560px) {
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__tools {
        align-items: center;
        flex-direction: row;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot {
        justify-content: flex-end;
        width: auto;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-auth {
        align-items: center;
        flex-direction: row;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-auth__actions {
        width: auto;
    }
}

@media (max-width: 700px) {
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 2800;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__inner {
        padding: 0.44rem 0.68rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-brand {
        font-size: 0.98rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar button,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar a {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .app-shell-body[data-workspace-layout-route="true"] .app-shell-sidebar-toggle {
        height: 2.5rem;
        min-height: 2.5rem;
        min-width: 2.5rem;
        width: 2.5rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] #share-collection-btn,
    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap .primary-button,
    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap #undo-history-btn,
    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap #redo-history-btn,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot .lock-button,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot #help-toggle,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot #chord-settings-toggle {
        min-height: 2.5rem;
        min-width: 2.5rem;
        padding: 0.5rem;
        border-color: transparent;
        box-shadow: none;
        touch-action: manipulation;
    }

    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap #undo-history-btn,
    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap #redo-history-btn,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot .lock-button {
        border-radius: 0.7rem;
        min-height: 2.5rem;
        min-width: 2.5rem;
        padding: 0.5rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] #share-collection-btn {
        margin-right: 0.95rem;
    }

    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap #undo-history-btn .material-icons-outlined,
    .app-shell-body[data-workspace-layout-route="true"] #undo-redo-wrap #redo-history-btn .material-icons-outlined,
    .app-shell-body[data-workspace-layout-route="true"] .app-shell-topbar__page-slot .lock-button .material-icons-outlined {
        font-size: 1.05rem;
    }
}
