* {
    font-family: Roboto, sans-serif;
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e2e8f0;
    line-height: 1.5;
}

.chameleon-navbar {
    box-shadow: 0 1px 2px rgba(60,64,67,.3),0 2px 6px 2px rgba(60,64,67,.15);
    z-index: 100;
    background-color: #fff;
    color: #000;
    display: grid;
    border-bottom: 1px solid #e6ebf2;
}

.chameleon-navbar__container {
    align-items: center;
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.chameleon-navbar__heading {
    font-family: Google Sans;
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 24px;
    margin: 10px 14px 12px;
}

.chameleon-navbar__logo {
    width: 74px;
    margin-left: 0;
}

.chameleon-navbar__site-row,
.chameleon-navbar__tool-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding: 0 18px;
}

.chameleon-navbar__site-row {
    min-height: 58px;
}

.chameleon-navbar__tool-row {
    min-height: 58px;
    border-top: 1px solid #edf1f6;
    background: #f8fafc;
    align-items: center;
    gap: 0;
    padding: 0 16px;
}

.chameleon-navbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #15171c;
    text-decoration: none;
}

.chameleon-navbar__brand-name {
    font-family: Google Sans, Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.chameleon-navbar__site-nav,
.chameleon-navbar__tool-group {
    display: inline-flex;
    align-items: center;
}

.chameleon-navbar__site-nav {
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.chameleon-navbar__tool-row {
    justify-content: space-evenly;
}

.chameleon-navbar__tool-group {
    gap: 8px;
}

.chameleon-navbar__support-tools {
    margin-left: auto;
}

/* ── Toolbar sections (label + items stacked vertically) ─── */

.toolbar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
}

.toolbar-section__label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8fa5be;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

.toolbar-section__items {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-section-sep {
    width: 1px;
    height: 32px;
    background: #dde6f0;
    flex-shrink: 0;
    margin: 0 2px;
}

.toolbar-section__mode-btn {
    padding: 5px 7px;
}

.toolbar-section__icon-btn {
    padding: 5px 8px;
}

.chameleon-navbar__site-link,
.chameleon-navbar__tool-button,
.chameleon-navbar__icon-button {
    min-height: 34px;
    border-radius: 7px;
    color: #20242a;
    text-decoration: none;
    font-family: Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    cursor: pointer;
}

.chameleon-navbar__site-link {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid transparent;
}

.chameleon-navbar__site-link:hover,
.chameleon-navbar__site-link--active {
    border-color: #d4dce8;
    background: #111923;
    color: #fff;
}

.chameleon-navbar__tool-button,
.chameleon-navbar__icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid #d4dce8;
    background: #fff;
}

.chameleon-navbar__tool-button:hover,
.chameleon-navbar__icon-button:hover {
    border-color: #8fa0b5;
    background: #f1f5f9;
}

.chameleon-navbar__icon-button img {
    width: 22px;
    height: 22px;
    display: block;
}

.chameleon-navbar__menu-tab {
    font-family: Roboto;
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    line-height: 28px;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 56px;
    cursor: pointer;
    display: block;
    padding: 0 16px;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border-bottom: 2px solid transparent;
    -webkit-transition: border .2s;
    transition: border .2s;
    margin: 0 2px;
}

.chameleon-navbar__menu-tab--active {
    border-bottom: 2px solid #1a73e8;
    color: #1a73e8;
}

.chameleon-navbar__menu-link {
    color: inherit;
    text-decoration: none;
}

.chameleon-navbar__menu-link:hover .chameleon-navbar__menu-tab {
    border-bottom-color: #1a73e8;
    color: #1a73e8;
}

/* //! Added this */
.chameleon-navbar__examples {
    position: relative;
}

.examples-dropdown {
    position: absolute;
    top: 100%;   /* just below the toggle */
    left: 0;
    background: white;
    border: 1px solid #d6dee7;
    border-radius: 8px;
    padding: 8px;
    list-style: none;
    z-index: 1000;

    /* Reset inherited styles from parent */
    font-family: initial;
    font-style: normal;
    font-weight: normal;
    font-size: 14px;
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    margin: 0;
    min-width: 360px;
    max-width: min(440px, calc(100vw - 24px));
    max-height: min(70vh, 620px);
    overflow-y: auto;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.examples-dropdown[hidden] {
    display: none;
}

.examples-dropdown--panel {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: none;
    height: 100%;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.examples-dropdown li {
    margin: 0;
    padding: 0;
}

.examples-dropdown__search-item {
    position: sticky;
    top: -8px;
    z-index: 1;
    padding: 4px 0 8px;
    background: #fff;
}

.examples-dropdown__search {
    box-sizing: border-box;
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid #d6dee7;
    border-radius: 6px;
    color: #14233a;
    font: 600 13px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.examples-dropdown__search:focus {
    border-color: #2c7a92;
    outline: 2px solid rgba(44, 122, 146, 0.18);
}

.examples-dropdown__button {
    width: 100%;
    padding: 9px 10px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    color: #111;
    display: grid;
    gap: 4px;
}

.examples-dropdown__button:hover {
    background: #f1f6f8;
}

.examples-dropdown__button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.examples-dropdown__button[data-loading="true"] .examples-dropdown__meta::after {
    content: " · loading";
    color: #2c7a92;
}

.examples-dropdown__button--preferred {
    font-weight: 700;
}

.examples-dropdown__status {
    padding: 7px 10px;
    color: #5f6368;
    white-space: nowrap;
}

.examples-dropdown__title {
    color: #16243a;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.examples-dropdown__scope-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #e8f0f8;
    border: 1px solid #b0c4da;
    color: #4a6080;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    vertical-align: middle;
    white-space: nowrap;
    pointer-events: none;
}

.examples-dropdown__byline {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #7a9ab0;
    margin-top: 1px;
    letter-spacing: 0.01em;
    pointer-events: none;
}

.examples-dropdown__rename-input {
    width: 100%;
    padding: 1px 4px;
    border: 1.5px solid #2c7a92;
    border-radius: 4px;
    font: 800 inherit/1.25 inherit;
    color: #16243a;
    background: #f0f8fb;
    outline: none;
}

.examples-dropdown__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #5a687a;
    font-size: 11px;
    font-weight: 600;
}

.examples-dropdown__status-badge {
    font: 700 10px/1.4 system-ui, sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.examples-dropdown__meta--labeled   .examples-dropdown__status-badge { color: #2a8a50; }
.examples-dropdown__meta--partial   .examples-dropdown__status-badge { color: #b07800; }
.examples-dropdown__meta--raw       .examples-dropdown__status-badge { color: #8a9bb5; }

.examples-dropdown__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.examples-dropdown__tag {
    padding: 3px 7px;
    border-radius: 999px;
    background: #e8f3f1;
    color: #236b79;
    font-size: 11px;
    font-weight: 800;
}

/* ── Library item action buttons ───────────────────────────────────────────── */

.examples-dropdown__item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px 4px 10px;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.12s;
}

.examples-dropdown li:hover .examples-dropdown__item-actions {
    opacity: 1;
}

.examples-dropdown__action-btn {
    padding: 2px 8px;
    border-radius: 5px;
    border: 1px solid #d0dbe6;
    background: #fff;
    font: 700 11px/1.5 system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.examples-dropdown__action-btn--label {
    color: #2a6a80;
}

.examples-dropdown__action-btn--label:hover {
    background: #e8f4f8;
    border-color: #2c7a92;
}

.examples-dropdown__action-btn--preview {
    color: #2a6a80;
    font-size: 10px;
    min-width: 26px;
}

.examples-dropdown__action-btn--preview:hover {
    background: #e8f4f8;
    border-color: #2c7a92;
}

.examples-dropdown__action-btn--preview.is-playing {
    background: #2c7a92;
    border-color: #2c7a92;
    color: #fff;
}

.examples-dropdown__action-btn--star {
    color: #a08a30;
    border-color: transparent;
    background: transparent;
    font-size: 13px;
    padding: 2px 5px;
}

.examples-dropdown__action-btn--star:hover {
    background: #fdf8e8;
    border-color: #c8a820;
}

.examples-dropdown__action-btn--star.is-starred {
    color: #c8a820;
}

.examples-dropdown__action-btn--delete {
    color: #8a5a5a;
}

.examples-dropdown__action-btn--delete:hover {
    background: #fdf0f0;
    border-color: #c0392b;
    color: #c0392b;
}

.examples-dropdown__action-btn--delete.is-confirming {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
    padding: 2px 10px;
}

.examples-dropdown__action-btn--publish {
    color: #2a6a50;
    border-color: #a0c8b0;
}

.examples-dropdown__action-btn--publish:hover {
    background: #e8f6ee;
    border-color: #2a6a50;
    color: #1a5040;
}

.examples-dropdown__action-btn--publish.is-shared {
    background: #2a6a50;
    border-color: #2a6a50;
    color: #fff;
    cursor: default;
}

/* ── Library groups ────────────────────────────────────────────────────────── */

.library-group-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.library-group-chip {
    padding: 2px 9px;
    border-radius: 999px;
    border: 1.5px solid var(--group-color, #4a8fa8);
    background: #fff;
    color: var(--group-color, #4a8fa8);
    font: 700 11px/1.5 system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.12s;
}

.library-group-chip.is-active {
    background: var(--group-color, #4a8fa8);
    color: #fff;
}

.library-groups-manage-btn {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #d0dbe6;
    background: #fff;
    color: #5a7a90;
    font: 700 11px/1.4 system-ui, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s;
    margin-left: auto;
}

.library-groups-manage-btn:hover {
    background: #edf4f8;
}

.library-groups-panel {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #d0dbe6;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
    padding: 10px 10px 8px;
    min-width: 220px;
    max-width: 290px;
    max-height: 340px;
    overflow-y: auto;
}

.lib-groups-list {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lib-groups-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 4px;
    border-radius: 5px;
}

.lib-groups-item__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lib-groups-item__name {
    flex: 1;
    font: 600 12px/1.3 system-ui, sans-serif;
    color: #2a3a4a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lib-groups-item__del {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: #9aabb8;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, color 0.1s;
}

.lib-groups-item__del:hover {
    background: #fdf0f0;
    color: #c0392b;
}

.lib-groups-create {
    display: flex;
    gap: 5px;
    align-items: center;
}

.lib-groups-create__name {
    flex: 1;
    min-width: 0;
    padding: 4px 8px;
    border: 1px solid #d0dbe6;
    border-radius: 5px;
    font: 600 12px/1.3 system-ui, sans-serif;
    color: #2a3a4a;
    outline: none;
}

.lib-groups-create__name:focus {
    border-color: #2c7a92;
}

.lib-groups-create__color {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: 1px solid #d0dbe6;
    padding: 1px;
    cursor: pointer;
    flex-shrink: 0;
}

.lib-groups-create__btn {
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid #2c7a92;
    background: #2c7a92;
    color: #fff;
    font: 700 12px/1.3 system-ui, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s;
}

.lib-groups-create__btn:hover {
    background: #1a5570;
}

/* Per-item group dots */

.lib-group-dots {
    display: flex;
    gap: 3px;
    padding: 2px 10px 0;
}

.lib-group-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Group action button */

.examples-dropdown__action-btn--group {
    color: #4a8fa8;
    font-size: 13px;
    padding: 2px 5px;
}

.examples-dropdown__action-btn--group:hover {
    background: #e8f4f8;
    border-color: #2c7a92;
}

/* Group popover */

.lib-group-popover {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #d0dbe6;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.16);
    padding: 5px;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lib-group-popover__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    background: transparent;
    text-align: left;
    font: 600 12px/1.3 system-ui, sans-serif;
    color: #2a3a4a;
    cursor: pointer;
    transition: background 0.1s;
}

.lib-group-popover__item:hover {
    background: #f0f6fa;
}

.lib-group-popover__item.is-member {
    background: #e8f4f8;
}

.lib-group-popover__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Import queue overlay ──────────────────────────────────────────────────── */

.lib-import-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #d0dbe6;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.12);
    /* above the sound list (a flex item with z-index 1000); stays inside the panel */
    z-index: 1010;
    display: flex;
    flex-direction: column;
    max-height: 55%;
}

.lib-import-overlay[hidden] {
    display: none;
}

.lib-import-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px 5px;
    border-bottom: 1px solid #e8eff5;
    flex-shrink: 0;
}

.lib-import-overlay__title {
    font: 700 12px/1.4 system-ui, sans-serif;
    color: #2c6080;
    letter-spacing: 0.01em;
}

.lib-import-overlay__close {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #8a9bb5;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lib-import-overlay__close:hover {
    background: #f0f4f8;
    color: #16243a;
}

.lib-import-overlay .lib-import-queue {
    margin: 0;
    padding: 6px 8px;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ── Library import queue ──────────────────────────────────────────────────── */

.lib-import-section {
    padding: 8px 8px 0;
}

.lib-import-btn {
    width: 100%;
    padding: 7px 12px;
    background: #f4f8fb;
    border: 1.5px dashed #b0c4d8;
    border-radius: 7px;
    color: #2c6080;
    font: 700 12px/1.4 system-ui, sans-serif;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background 0.15s, border-color 0.15s;
}

.lib-import-btn:hover {
    background: #e6f0f8;
    border-color: #2c7a92;
    color: #1a5570;
}

/* Compact variant used in the library panel header */
.lib-import-btn--header {
    padding: 4px 10px;
    background: #f0f6fb;
    border: 1px solid #b8d0e4;
    border-radius: 6px;
    color: #1a4a70;
    font: 700 11px/1.4 system-ui, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.12s, border-color 0.12s;
}

.lib-import-btn--header:hover {
    background: #ddeaf6;
    border-color: #2c7a92;
    color: #1a5570;
}

.lib-import-group-select {
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid #c4d0dc;
    background: #f5f8fc;
    color: #3a5070;
    cursor: pointer;
    max-width: 120px;
    font-family: inherit;
}

.lib-import-queue {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.lib-import-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    padding: 7px 10px;
    background: #f8fbfd;
    border: 1px solid #dde8f0;
    border-radius: 6px;
    font-size: 12px;
    transition: opacity 0.35s ease;
}

.lib-import-item--done {
    opacity: 0;
}

.lib-import-item__name {
    grid-column: 1;
    grid-row: 1;
    font-weight: 700;
    color: #16243a;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lib-import-item__status {
    grid-column: 2;
    grid-row: 1;
    font-size: 11px;
    font-weight: 700;
    color: #5a8aaa;
    white-space: nowrap;
}

.lib-import-item[data-state="done"] .lib-import-item__status {
    color: #2a8a50;
}

.lib-import-item[data-state="error"] .lib-import-item__status {
    color: #c0392b;
}

.lib-import-item__bar {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 3px;
    background: #dde8f0;
    border-radius: 2px;
    overflow: hidden;
}

.lib-import-item__fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2c7a92, #48b09a);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.lib-import-item[data-state="done"] .lib-import-item__fill {
    background: #2a8a50;
}

.lib-import-item[data-state="exists"] .lib-import-item__status {
    color: #a07820;
}

.lib-import-item[data-state="exists"] .lib-import-item__fill {
    background: #c8a820;
    width: 100% !important;
    opacity: 0.4;
}

.lib-import-item__message {
    grid-column: 1 / -1;
    margin-top: 2px;
    color: #a3301f;
    font-size: 11.5px;
    line-height: 1.35;
    white-space: normal;
}

.lib-import-item__reimport {
    grid-column: 1 / -1;
    margin-top: 3px;
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid #c8a820;
    background: #fdf8e8;
    color: #7a5a00;
    font: 700 11px/1.4 system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.12s;
}

.lib-import-item__reimport:hover {
    background: #f5ecc0;
}

.lib-import-item[data-state="error"] .lib-import-item__fill {
    background: #c0392b;
    width: 100% !important;
}

/* ── Floating import chip (bottom-left, shown while files are importing) ───── */

.lib-import-chip {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 10000;
    padding: 7px 14px;
    border-radius: 20px;
    background: #1a3a5c;
    color: #c8d4e4;
    border: 1px solid #3a6a9a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    white-space: nowrap;
    animation: lib-chip-in 0.18s ease;
}

.lib-import-chip:hover {
    background: #243f5e;
    color: #e8f0fa;
}

@keyframes lib-chip-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* hide chip when the library panel is open (overlay is visible inside it) */
#libraryPanel:not(.is-collapsed) ~ * .lib-import-chip,
body:has(#libraryPanel:not(.is-collapsed)) .lib-import-chip {
    display: none;
}

/* ── Library panel fixed header area ──────────────────────────────────────── */

.library-panel-fixed {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ── Library summary strip (health + quota combined) ───────────────────────── */

.library-summary-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px;
    background: #f4f8fb;
    border-bottom: 1px solid #e8eff5;
    flex-wrap: wrap;
    min-height: 28px;
}

.library-summary-strip__stats {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}

.lib-stat-plain {
    font: 600 11px/1.4 system-ui, sans-serif;
    color: #6a8090;
    letter-spacing: 0.01em;
    white-space: nowrap;
    padding: 0 3px;
}

.lib-stat-sep {
    color: #b0bcc8;
    font-size: 11px;
    font-weight: 400;
    user-select: none;
}

.lib-stat-chip {
    font: 600 11px/1.4 system-ui, sans-serif;
    color: #3a5a78;
    background: #edf3f9;
    border: 1px solid #c4d6e4;
    border-radius: 10px;
    padding: 1px 8px;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.lib-stat-chip:hover {
    background: #d6e8f4;
    border-color: #8ab4d0;
    color: #1a3a5c;
}

.lib-stat-chip.is-active {
    background: #1a3a5c;
    border-color: #1a3a5c;
    color: #fff;
}

.library-summary-strip__quota {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.library-summary-strip__quota[hidden] { display: none; }

.library-summary-strip__quota-label {
    font: 600 10px/1 system-ui, sans-serif;
    color: #8a9bb5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.library-summary-strip__quota-track {
    width: 48px;
    height: 4px;
    background: #dde8f0;
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.library-summary-strip__quota-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.library-summary-strip__quota-fill--ok     { background: #4a8fa8; }
.library-summary-strip__quota-fill--warn   { background: #c8a820; }
.library-summary-strip__quota-fill--danger { background: #c0392b; }

.library-summary-strip__quota-nums {
    font: 600 11px/1.4 system-ui, sans-serif;
    color: #6a8090;
    white-space: nowrap;
}

/* ── Library explore row (Sound Map / Find Moments) ───────────────────────── */

.library-explore-row {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    border-bottom: 1px solid #edf1f6;
}

.library-explore-btn {
    flex: 1;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid #c8d8e8;
    background: transparent;
    color: #4a7a94;
    font: 600 11px/1.4 system-ui, sans-serif;
    cursor: pointer;
    text-align: center;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.library-explore-btn:hover {
    background: #e4f0f8;
    color: #2a5a74;
    border-color: #9abccc;
}

.library-explore-btn.is-active {
    background: #4a7a94;
    color: #fff;
    border-color: #4a7a94;
}

/* ── Library source filter ─────────────────────────────────────────────────── */

.library-source-filter {
    display: flex;
    gap: 2px;
    padding: 5px 8px;
    background: #f8fbfd;
    border-bottom: 1px solid #edf1f6;
}

.library-source-btn {
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid transparent;
    background: transparent;
    color: #5a7a90;
    font: 700 11px/1.4 system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.library-source-btn:hover {
    background: #edf4f8;
    color: #1a5070;
}

.library-source-btn.is-active {
    background: #1a5070;
    border-color: #1a5070;
    color: #fff;
}

/* ── Scope indicator — left border on list items ───────────────────────────── */

.examples-dropdown li[data-scope="private"] {
    border-left: 3px solid #4a8fa8;
    padding-left: 0;
}

.examples-dropdown li[data-scope="public"] {
    border-left: 3px solid transparent;
    padding-left: 0;
}

/* Private items: always show action buttons, not only on hover */
.examples-dropdown li[data-scope="private"] .examples-dropdown__item-actions {
    opacity: 1;
}

/* ── Library toolbar (groups + sort combined) ──────────────────────────────── */

.library-toolbar {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #edf1f6;
    background: #fafcfd;
}

/* Group chips row — only visible when groups are active */
.library-toolbar .library-group-chips:not([hidden]) {
    padding: 4px 8px 0;
    border-bottom: 1px solid #edf1f6;
}

/* Sort bar + Groups button in a single row */
.library-toolbar__row {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 4px;
}

/* ── Library sort bar ──────────────────────────────────────────────────────── */

.library-sort-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.library-sort-btn {
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid transparent;
    background: transparent;
    color: #5a7a90;
    font: 700 11px/1.4 system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.library-sort-btn:hover {
    background: #edf4f8;
    color: #1a5070;
}

.library-sort-btn.is-active {
    background: #e0eef5;
    border-color: #a8ccd8;
    color: #1a5070;
}

/* ── Library filter chips ──────────────────────────────────────────────────── */

.library-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 8px;
    border-bottom: 1px solid #edf1f6;
}

.library-filter-chip {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1.5px solid #c8dae6;
    background: #fff;
    color: #3a6070;
    font: 700 11px/1.4 system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.library-filter-chip:hover {
    background: #e8f3f8;
    border-color: #2c7a92;
}

.library-filter-chip.is-active {
    background: #2c7a92;
    border-color: #2c7a92;
    color: #fff;
}

.rec-circle-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background-color: #e53935;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 2px;
    transition: background 0.2s, transform 0.1s, border-radius 0.2s, width 0.2s;
}

.rec-circle-btn:active {
    transform: scale(0.96);
}

.rec-circle-btn.is-recording {
    background-color: #c62828;
    border-radius: 8px;
    width: 56px;
}

#recTimer {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 860px) {
    .chameleon-navbar__site-row,
    .chameleon-navbar__tool-row {
        flex-wrap: wrap;
        gap: 10px;
        padding: 8px 12px;
    }

    .chameleon-navbar__site-row,
    .chameleon-navbar__tool-row {
        min-height: 0;
    }

    .chameleon-navbar__site-nav,
    .chameleon-navbar__tool-group {
        flex-wrap: wrap;
    }

    .chameleon-navbar__support-tools {
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .chameleon-navbar__brand-name {
        font-size: 16px;
    }

    .chameleon-navbar__logo {
        width: 62px;
    }

    .chameleon-navbar__site-nav,
    .chameleon-navbar__tool-row,
    .chameleon-navbar__tool-group {
        width: 100%;
    }

    .chameleon-navbar__site-link,
    .chameleon-navbar__tool-button,
    .chameleon-navbar__icon-button {
        flex: 1 1 auto;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    #svgCanvas,
    #svgCanvas * {
        visibility: visible;
    }

    #svgCanvas {
        display: block;
        margin: 0 auto;
    }
}

/* ─── Help Modal ─────────────────────────────────────────────────────────── */
:root {
    --help-bg:       #ffffff;
    --help-bg-alt:   #f5f8fc;
    --help-border:   #dce6f0;
    --help-navy:     #1a3a5c;
    --help-teal:     #4a8fa8;
    --help-muted:    #6a7e92;
    --help-text:     #172132;
    --help-kbd-bg:   #eef3f8;
    --help-code-bg:  #eef6fa;
    --help-card-border: #c8d8e8;
}

[data-theme="dark"] {
    --help-bg:       #141b26;
    --help-bg-alt:   #1c2433;
    --help-border:   #2a3a50;
    --help-navy:     #c0d4e8;
    --help-teal:     #5ab0ca;
    --help-muted:    #7a90a8;
    --help-text:     #d0dcea;
    --help-kbd-bg:   #1e2a3a;
    --help-code-bg:  #162030;
    --help-card-border: #2c3e52;
}

.help-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(10, 20, 40, 0.65);
    padding: 0;
}

.help-modal[hidden] { display: none; }

.help-modal__dialog {
    position: relative;
    background: var(--help-bg);
    width: 92vw;
    max-width: 1100px;
    height: 92vh;
    margin: 4vh auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-modal__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--help-border);
    background: var(--help-bg-alt);
    flex-shrink: 0;
}

.help-modal__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--help-navy);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.help-modal__search-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.help-modal__search {
    width: 100%;
    padding: 6px 30px 6px 30px;
    border: 1px solid var(--help-border);
    border-radius: 6px;
    background: var(--help-bg);
    color: var(--help-text);
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.help-modal__search:focus {
    border-color: var(--help-teal);
    box-shadow: 0 0 0 2px rgba(74,143,168,0.18);
}

.help-modal__search-icon {
    position: absolute;
    left: 9px;
    color: var(--help-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.help-modal__search-clear {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: var(--help-muted);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    padding: 1px 5px;
    transition: color 0.12s;
}

.help-modal__search-clear:hover { color: var(--help-navy); }

.help-modal__close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 1px solid var(--help-border);
    border-radius: 6px;
    background: var(--help-bg);
    color: var(--help-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.12s, background 0.12s;
    line-height: 1;
}

.help-modal__close:hover {
    color: var(--help-navy);
    background: var(--help-border);
}

.help-modal__body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.help-sidebar {
    width: 196px;
    flex-shrink: 0;
    border-right: 1px solid var(--help-border);
    background: var(--help-bg-alt);
    overflow-y: auto;
    padding: 14px 0;
}

.help-sidebar__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-sidebar__list li a {
    display: block;
    padding: 7px 16px;
    font-size: 12px;
    color: var(--help-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.help-sidebar__list li a:hover {
    color: var(--help-navy);
    background: rgba(74,143,168,0.06);
}

.help-sidebar__list li a.active {
    color: var(--help-teal);
    border-left-color: var(--help-teal);
    background: rgba(74,143,168,0.09);
    font-weight: 600;
}

/* Main content */
.help-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px 36px 48px;
    scroll-behavior: smooth;
}

.help-section {
    margin-bottom: 48px;
}

.help-section__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--help-navy);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--help-teal);
}

.help-section__subtitle {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--help-teal);
    margin: 20px 0 7px;
}

.help-section p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--help-text);
    margin: 0 0 10px;
}

.help-section a {
    color: var(--help-teal);
    text-decoration: none;
}

.help-section a:hover { text-decoration: underline; }

.help-section ul,
.help-section ol {
    padding-left: 20px;
    margin: 0 0 10px;
}

.help-section li {
    font-size: 13px;
    line-height: 1.65;
    color: var(--help-text);
    margin-bottom: 4px;
}

.help-section code {
    font-family: "Courier New", monospace;
    font-size: 12px;
    background: var(--help-code-bg);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--help-navy);
}

/* Tip box */
.help-tip {
    display: block;
    padding: 10px 14px;
    background: var(--help-code-bg);
    border: 1px solid var(--help-border);
    border-left: 3px solid var(--help-teal);
    border-radius: 6px;
    margin: 12px 0;
    font-size: 12px;
    color: var(--help-text);
    line-height: 1.6;
}

/* Feature cards */
.help-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 9px;
    margin-top: 12px;
}

.help-feature-card {
    padding: 11px 13px;
    border: 1px solid var(--help-card-border);
    border-left: 3px solid var(--help-teal);
    border-radius: 6px;
    background: var(--help-bg-alt);
}

.help-feature-card__name {
    font-size: 12px;
    font-weight: 700;
    color: var(--help-navy);
    margin-bottom: 2px;
}

.help-feature-card__technical {
    font-size: 10px;
    font-family: "Courier New", monospace;
    color: var(--help-muted);
    margin-bottom: 5px;
}

.help-feature-card__desc {
    font-size: 11px;
    line-height: 1.5;
    color: var(--help-muted);
}

/* Keyboard shortcuts table */
.help-shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
}

.help-shortcuts-table tr:nth-child(even) {
    background: var(--help-bg-alt);
}

.help-shortcuts-table td {
    padding: 7px 12px;
    font-size: 12px;
    color: var(--help-text);
    border-bottom: 1px solid var(--help-border);
    vertical-align: middle;
}

.help-shortcuts-table td:first-child {
    width: 110px;
    white-space: nowrap;
}

kbd {
    display: inline-block;
    padding: 2px 7px;
    background: var(--help-kbd-bg);
    border: 1px solid var(--help-border);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-size: 11px;
    font-family: "Courier New", monospace;
    color: var(--help-navy);
}

.help-no-results {
    padding: 24px;
    text-align: center;
    color: var(--help-muted);
    font-size: 13px;
    font-style: italic;
}

.chameleon-navbar__info-area {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-right: 14px;
}

.chameleon-navbar__info-area a:hover {
    color: #1a73e8;
}

.chameleon-navbar__info-area-tooltip {
    margin: 0 4px;
}

:hover > .chameleon-navbar__info-area-tooltip-text {
    visibility: visible;
  }

.chameleon-navbar__info-area-tooltip-text {
    min-width: 130px;
    visibility: hidden;
    line-height: normal;
    text-align: center;
    padding: 3px 6px;
    top: calc(100% + 2px);
    position: absolute;
    z-index: 100;
    font-size: .75rem;
    font-family: Google Sans;
    font-weight: 400;
    border-radius: .25rem;
    background-color: #2d3748;
    color: #fff;
    opacity: .9;
    text-transform: none;
    right: 0;
}



.chameleon-navbar__info-area-tab {
    position: relative;
    font-size: 0;
    align-items: center;
    flex-direction: column;
    display: flex;
}

.chameleon-navbar__info-area-tab-about {
    padding: .25rem;
}

.chameleon-navbar__info-area-link {
    font-family: Roboto;
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    line-height: 28px;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    position: relative;
    padding: .25rem;
    display: inline-block;
    border-radius: 9999px;
    color: inherit;
    text-decoration: inherit;
}

.chameleon-navbar__info-area-tab-i {
    font-size: 24px;
    vertical-align: middle;
    cursor: pointer;
    font-family: "Material Icons Outlined";
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    display: inline-block;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    /* -moz-font-feature-settings: "liga"; */
    -moz-osx-font-smoothing: grayscale;    
}

/* ── Sonification armed state on the play button ────────────────────────── */

/* Make the play/stop button circular when used as sonification play */
#playStopButtonHeader {
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    overflow: visible;
}

#playStopButtonHeader img {
    position: relative;
    z-index: 1;
}

.play-armed-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: visible;
}

/* ── Mode button pressed state ───────────────────────────── */

.toolbar-section__mode-btn[aria-pressed="true"] {
    background: #4a7a94;
    color: #fff;
    border-color: #4a7a94;
}

/* ── Dark mode: toolbar sections ─────────────────────────── */

[data-theme="dark"] .chameleon-navbar__tool-row {
    border-top-color: #1e2535;
    background: #141922;
}

[data-theme="dark"] .toolbar-section__label {
    color: #3d5268;
}

[data-theme="dark"] .toolbar-section-sep {
    background: #1e2a3a;
}

[data-theme="dark"] .toolbar-section__mode-btn[aria-pressed="true"] {
    background: #2a5a78;
    color: #c8dff0;
    border-color: #2a5a78;
}

/* ─── Contact / Feedback Form ─────────────────────────────────── */
.contact-dialog {
    max-width: 500px;
    height: auto;
    max-height: 90vh;
}

.contact-form-body {
    padding: 24px 28px 28px;
    overflow-y: auto;
}

.contact-form__intro {
    font-size: 13px;
    color: var(--help-muted);
    margin: 0 0 20px;
    line-height: 1.55;
}

.contact-form__row {
    margin-bottom: 14px;
}

.contact-form__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--help-teal);
    margin-bottom: 5px;
}

.contact-form__input {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--help-border);
    border-radius: 6px;
    background: var(--help-bg);
    color: var(--help-text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-form__input:focus {
    border-color: var(--help-teal);
    box-shadow: 0 0 0 2px rgba(74,143,168,0.18);
}

.contact-form__input::placeholder { color: var(--help-muted); opacity: 0.7; }

.contact-form__textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.55;
}

.contact-form__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 6px;
}

.contact-form__error {
    font-size: 12px;
    color: #c0392b;
    flex: 1;
}

.contact-form__submit {
    padding: 8px 22px;
    background: var(--help-teal);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.contact-form__submit:hover { background: var(--help-navy); }
.contact-form__submit:disabled { opacity: 0.55; cursor: wait; }

.contact-form__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
    text-align: center;
}

.contact-form__success p {
    font-size: 14px;
    color: var(--help-text);
    margin: 0;
}

/* ── Experiments navbar dropdown (shared: main app + showcase pages) ── */

.navbar-dropdown {
    position: relative;
}

.navbar-dropdown__trigger {
    gap: 5px;
}

.navbar-dropdown__caret {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.navbar-dropdown--open .navbar-dropdown__caret,
.navbar-dropdown:focus-within .navbar-dropdown__caret {
    transform: rotate(180deg);
}

.navbar-dropdown__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    margin: 0;
    padding: 8px 6px 6px;
    list-style: none;
    border: 1px solid #d4dce8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(28, 34, 41, 0.1);
    z-index: 200;
}

.navbar-dropdown:hover .navbar-dropdown__menu,
.navbar-dropdown--open .navbar-dropdown__menu {
    display: block;
}

.navbar-dropdown__item {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #20242a;
    font-size: 13px;
    font-weight: 600;
    font-family: Roboto, sans-serif;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.navbar-dropdown__item:hover {
    background: #f0f4f8;
    color: #20242a;
}

.navbar-dropdown__item[aria-current="page"] {
    background: #111923;
    color: #fff;
}

/* button reset so it looks identical to <a> site-links */
button.chameleon-navbar__site-link {
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    margin: 0;
    padding: 0 12px;
}

button.chameleon-navbar__site-link.chameleon-navbar__site-link--active,
button.chameleon-navbar__site-link:hover {
    background: #111923;
    color: #fff;
    border-color: #d4dce8;
}

/* ── Language dropdown ── */

.nav-lang-trigger {
    min-width: 52px;
    gap: 4px;
    justify-content: center;
}

.nav-lang-menu {
    min-width: 0;
    width: fit-content;
    right: 0;
    left: auto;
}

.nav-lang-menu .navbar-dropdown__item {
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: none;
    border: none;
}

.navbar-dropdown__item[aria-pressed="true"] {
    background: #111923;
    color: #fff;
}

.navbar-dropdown__item:disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.nav-lang-soon {
    display: inline-block;
    margin-left: 7px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #e8edf3;
    color: #8fa5be;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.chameleon-navbar__site-row-end {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
