:root {
    --stb-deep: #142d22;
    --stb-forest: #1f4a37;
    --stb-moss: #78aa7b;
    --stb-sand: #eee5d1;
    --stb-gold: #d8c69b;
    --stb-ink: #183327;
    --stb-muted: #6d776f;
    --stb-white: #fffaf0;
}

.stb-app {
    max-width: 1180px;
    margin: 24px auto;
    padding: clamp(8px, 2vw, 16px);
    border-radius: clamp(22px, 4vw, 34px);
    font-family: Inter, Arial, sans-serif;
    background: linear-gradient(135deg, #fbf7ee, #efe5d1);
    color: var(--stb-ink);
    box-shadow: 0 24px 80px rgba(20, 45, 34, 0.12);
}

.stb-app[data-theme="dark"] {
    background: radial-gradient(circle at center, #244835 0%, #0c1a13 74%);
    color: #f8f0df;
}

.stb-shell {
    border: 1px solid rgba(216, 198, 155, 0.45);
    border-radius: clamp(18px, 4vw, 28px);
    padding: clamp(14px, 3vw, 22px);
    backdrop-filter: blur(12px);
}

.stb-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.stb-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stb-logo,
.stb-logo-mark {
    width: clamp(42px, 7vw, 52px);
    height: clamp(42px, 7vw, 52px);
    border-radius: 18px;
    object-fit: contain;
    flex: 0 0 auto;
}

.stb-logo-mark {
    display: grid;
    place-items: center;
    background: var(--stb-deep);
    color: var(--stb-gold);
    font-weight: 800;
    font-size: 24px;
}

.stb-eyebrow {
    margin: 0 0 4px;
    font-size: clamp(10px, 2vw, 11px);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--stb-muted);
}

.stb-app[data-theme="dark"] .stb-eyebrow {
    color: var(--stb-gold);
}

.stb-topbar h2 {
    margin: 0;
    font-size: clamp(24px, 5vw, 42px);
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.stb-intro,
.stb-subtle-text {
    margin: 7px 0 0;
    max-width: 520px;
    font-size: clamp(13px, 2.4vw, 15px);
    line-height: 1.55;
    color: var(--stb-muted);
}

.stb-app[data-theme="dark"] .stb-intro,
.stb-app[data-theme="dark"] .stb-subtle-text {
    color: rgba(248, 240, 223, 0.7);
}

.stb-top-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stb-access-banner {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: 18px;
    background: rgba(216, 198, 155, 0.22);
    color: inherit;
    font-size: 14px;
}

.stb-access-banner span {
    opacity: 0.72;
}

.stb-layout {
    display: grid;
    grid-template-columns: 280px minmax(280px, 1fr) 280px;
    gap: 16px;
}

.stb-panel,
.stb-stage {
    border-radius: clamp(20px, 4vw, 28px);
    background: rgba(255, 250, 240, 0.72);
    box-shadow: inset 0 0 0 1px rgba(216, 198, 155, 0.35);
}

.stb-app[data-theme="dark"] .stb-panel,
.stb-app[data-theme="dark"] .stb-stage {
    background: rgba(255,255,255,0.07);
}

.stb-panel {
    padding: clamp(14px, 3vw, 18px);
}

.stb-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stb-section-title span {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--stb-moss);
}

.stb-section-title p {
    margin: 0;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--stb-muted);
}

.stb-app[data-theme="dark"] .stb-section-title p {
    color: var(--stb-gold);
}

.stb-spaced {
    margin-top: 22px;
}

.stb-state-grid,
.stb-mode-list,
.stb-toggle-list,
.stb-after-grid,
.stb-survey-options {
    display: grid;
    gap: 9px;
}

.stb-state-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: 12px;
}

.stb-mode-list button,
.stb-toggle-list button,
.stb-after-grid button,
.stb-survey-options button,
.stb-state-grid button,
.stb-icon-button,
.stb-main-controls button,
.stb-survey button {
    border: 0;
    border-radius: 17px;
    padding: 12px 13px;
    cursor: pointer;
    font-weight: 650;
    color: var(--stb-ink);
    background: rgba(238, 229, 209, 0.92);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    font-size: clamp(13px, 2.2vw, 14px);
}

.stb-app[data-theme="dark"] button {
    color: #f8f0df;
    background: rgba(255,255,255,0.1);
}

.stb-mode-list button {
    text-align: left;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.stb-mode-list small {
    opacity: 0.58;
}

.stb-mode-list button[data-locked="1"] {
    opacity: 0.55;
    filter: grayscale(0.2);
}

.stb-main-controls .stb-primary,
.stb-survey .stb-primary {
    background: var(--stb-deep);
    color: var(--stb-white);
}

.stb-app[data-theme="dark"] .stb-main-controls .stb-primary,
.stb-app[data-theme="dark"] .stb-survey .stb-primary {
    background: var(--stb-gold);
    color: var(--stb-deep);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(20, 45, 34, 0.12);
}

button:focus {
    outline: 3px solid var(--stb-moss);
    outline-offset: 3px;
}

.stb-selected {
    background: var(--stb-moss) !important;
    color: #fff !important;
}

.stb-recommendation,
.stb-note,
.stb-save-status {
    margin-top: 13px;
    padding: 13px;
    border-radius: 17px;
    font-size: clamp(12px, 2.2vw, 14px);
    line-height: 1.55;
    color: var(--stb-muted);
    background: rgba(255,255,255,0.48);
}

.stb-app[data-theme="dark"] .stb-recommendation,
.stb-app[data-theme="dark"] .stb-note,
.stb-app[data-theme="dark"] .stb-save-status {
    color: rgba(248,240,223,0.72);
    background: rgba(0,0,0,0.18);
}

.stb-stage {
    min-height: 580px;
    padding: clamp(20px, 4vw, 28px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stb-orbit {
    width: min(315px, 64vw);
    height: min(315px, 64vw);
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    background: radial-gradient(circle, rgba(120,170,123,0.22), rgba(216,198,155,0.08) 52%, transparent 70%);
    position: relative;
}

.stb-breath-path {
    position: absolute;
    inset: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 4;
}

.stb-breath-path::before {
    content: "";
    position: absolute;
    transform: translate(-50%, -50%);
    opacity: 0.36;
}

.stb-path-circle::before {
    width: 236px;
    height: 236px;
    border: 1px solid rgba(216, 198, 155, 0.72);
    border-radius: 999px;
}

.stb-path-square::before {
    width: 210px;
    height: 210px;
    border: 1px solid rgba(216, 198, 155, 0.72);
    border-radius: 26px;
}

.stb-path-triangle::before {
    width: 224px;
    height: 204px;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    border: 1px solid transparent;
    background:
        linear-gradient(rgba(216,198,155,0.72), rgba(216,198,155,0.72)) top / 100% 1px no-repeat;
    opacity: 0.18;
}

.stb-breath-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    margin-left: -9px;
    margin-top: -9px;
    border-radius: 999px;
    background: #fffaf0;
    box-shadow: 0 0 0 6px rgba(216,198,155,0.22), 0 0 28px rgba(255,250,240,0.8);
    transition: transform 0.9s linear;
    z-index: 6;
}

.stb-app[data-theme="dark"] .stb-breath-dot {
    background: var(--stb-gold);
    box-shadow: 0 0 0 6px rgba(216,198,155,0.18), 0 0 32px rgba(216,198,155,0.72);
}

.stb-shape {
    width: min(175px, 38vw);
    height: min(175px, 38vw);
    transition: transform 1.25s ease-in-out;
    filter: drop-shadow(0 24px 50px rgba(31, 74, 55, 0.26));
}

.stb-circle {
    border-radius: 999px;
    background: radial-gradient(circle at 35% 30%, #b9d9b9, #78aa7b 48%, #1f4a37 100%);
}

.stb-square {
    border-radius: 34px;
    background: linear-gradient(145deg, #b9d9b9, #78aa7b 52%, #1f4a37);
}

.stb-triangle {
    width: 0;
    height: 0;
    background: transparent;
    border-left: min(105px, 23vw) solid transparent;
    border-right: min(105px, 23vw) solid transparent;
    border-bottom: min(182px, 40vw) solid #78aa7b;
    filter: drop-shadow(0 24px 50px rgba(31, 74, 55, 0.3));
}

.stb-phase {
    font-size: clamp(30px, 7vw, 56px);
    font-weight: 760;
    letter-spacing: -0.05em;
    line-height: 1.02;
    text-align: center;
}

.stb-countdown {
    font-size: clamp(48px, 12vw, 94px);
    font-weight: 860;
    line-height: 1;
    margin: 8px 0;
    font-variant-numeric: tabular-nums;
}

.stb-counter {
    font-size: clamp(16px, 3vw, 20px);
    opacity: 0.58;
    font-variant-numeric: tabular-nums;
}

.stb-progress {
    width: min(420px, 100%);
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(20, 45, 34, 0.12);
    margin: 24px 0 18px;
}

.stb-app[data-theme="dark"] .stb-progress {
    background: rgba(255,255,255,0.12);
}

.stb-progress div {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--stb-moss), var(--stb-gold));
    transition: width 0.3s ease;
}

.stb-main-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 11px;
}

.stb-survey {
    width: min(520px, 100%);
    margin-top: 24px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255,250,240,0.66);
    box-shadow: inset 0 0 0 1px rgba(216,198,155,0.3);
}

.stb-app[data-theme="dark"] .stb-survey {
    background: rgba(0,0,0,0.18);
}

.stb-survey h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.stb-survey p {
    margin: 0 0 14px;
    opacity: 0.7;
}

.stb-survey textarea {
    width: 100%;
    min-height: 80px;
    margin: 12px 0;
    border: 1px solid rgba(109,119,111,0.22);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.72);
    color: inherit;
}

.stb-eyes-closed .stb-left-panel,
.stb-eyes-closed .stb-right-panel,
.stb-eyes-closed .stb-progress,
.stb-eyes-closed .stb-counter,
.stb-eyes-closed .stb-intro,
.stb-eyes-closed .stb-access-banner {
    display: none;
}

.stb-eyes-closed .stb-layout {
    grid-template-columns: 1fr;
}

.stb-eyes-closed .stb-stage {
    min-height: 78vh;
}

.stb-eyes-closed .stb-phase {
    font-size: clamp(42px, 9vw, 88px);
}

.stb-eyes-closed .stb-countdown {
    font-size: clamp(72px, 14vw, 140px);
}

.stb-compact .stb-left-panel,
.stb-compact .stb-right-panel {
    display: none;
}

.stb-compact .stb-layout {
    grid-template-columns: 1fr;
}

.stb-admin-wrap .stb-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.stb-admin-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 14px;
    padding: 20px;
}

.stb-admin-card label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: 600;
}

.stb-admin-card input[type="url"],
.stb-admin-card input[type="text"],
.stb-admin-card input[type="number"],
.stb-admin-card select {
    width: 100%;
    max-width: 100%;
}

.stb-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.stb-shortcode-card {
    margin-top: 18px;
}

@media (max-width: 1100px) {
    .stb-layout,
    .stb-admin-wrap .stb-admin-grid {
        grid-template-columns: 1fr;
    }

    .stb-stage {
        order: -1;
        min-height: 520px;
    }

    .stb-left-panel,
    .stb-right-panel {
        display: grid;
        gap: 14px;
    }

    .stb-mode-list,
    .stb-toggle-list,
    .stb-after-grid,
    .stb-survey-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .stb-app {
        margin: 10px auto;
        border-radius: 22px;
    }

    .stb-shell {
        padding: 12px;
    }

    .stb-topbar {
        flex-direction: column;
    }

    .stb-brand {
        align-items: flex-start;
    }

    .stb-top-actions {
        width: 100%;
        justify-content: stretch;
    }

    .stb-top-actions button {
        flex: 1;
    }

    .stb-state-grid,
    .stb-mode-list,
    .stb-toggle-list,
    .stb-after-grid,
    .stb-survey-options {
        grid-template-columns: 1fr;
    }

    .stb-stage {
        min-height: 480px;
    }

    .stb-orbit {
        margin-bottom: 16px;
    }

    .stb-main-controls {
        width: 100%;
    }

    .stb-main-controls button {
        flex: 1 1 100%;
    }
}


/* v1.7.1 visibility and centered start refinements */
.stb-app[data-theme="light"] {
    background: linear-gradient(135deg, #fffaf0, #efe4cf);
    color: #142d22;
}

.stb-app[data-theme="light"] .stb-panel,
.stb-app[data-theme="light"] .stb-stage,
.stb-app[data-theme="light"] .stb-survey {
    background: rgba(255, 252, 246, 0.88);
    color: #142d22;
}

.stb-app[data-theme="light"] .stb-phase,
.stb-app[data-theme="light"] .stb-countdown,
.stb-app[data-theme="light"] .stb-counter,
.stb-app[data-theme="light"] h2,
.stb-app[data-theme="light"] h3 {
    color: #142d22;
}

.stb-app[data-theme="light"] .stb-intro,
.stb-app[data-theme="light"] .stb-subtle-text,
.stb-app[data-theme="light"] .stb-recommendation,
.stb-app[data-theme="light"] .stb-note,
.stb-app[data-theme="light"] .stb-save-status {
    color: #4f5f55;
}

.stb-app[data-theme="light"] button {
    color: #142d22;
    background: #eee4cf;
}

.stb-app[data-theme="light"] .stb-primary,
.stb-app[data-theme="light"] .stb-start-button {
    color: #fffaf0;
    background: #142d22;
}

.stb-app[data-theme="dark"] {
    background: radial-gradient(circle at center, #244835 0%, #07110c 78%);
    color: #fffaf0;
}

.stb-app[data-theme="dark"] .stb-panel,
.stb-app[data-theme="dark"] .stb-stage,
.stb-app[data-theme="dark"] .stb-survey {
    background: rgba(255, 255, 255, 0.075);
    color: #fffaf0;
}

.stb-app[data-theme="dark"] .stb-phase,
.stb-app[data-theme="dark"] .stb-countdown,
.stb-app[data-theme="dark"] .stb-counter,
.stb-app[data-theme="dark"] h2,
.stb-app[data-theme="dark"] h3 {
    color: #fffaf0;
}

.stb-app[data-theme="dark"] .stb-intro,
.stb-app[data-theme="dark"] .stb-subtle-text,
.stb-app[data-theme="dark"] .stb-recommendation,
.stb-app[data-theme="dark"] .stb-note,
.stb-app[data-theme="dark"] .stb-save-status {
    color: rgba(255, 250, 240, 0.78);
}

.stb-app[data-theme="dark"] button {
    color: #fffaf0;
    background: rgba(255, 255, 255, 0.12);
}

.stb-app[data-theme="dark"] .stb-primary,
.stb-app[data-theme="dark"] .stb-start-button {
    color: #142d22;
    background: #d8c69b;
}

.stb-start-row {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 8px 0 12px;
}

.stb-start-button {
    min-width: min(260px, 86vw);
    min-height: 62px;
    padding: 18px 34px !important;
    border-radius: 999px !important;
    font-size: clamp(18px, 4vw, 24px) !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em;
    box-shadow: 0 16px 42px rgba(20, 45, 34, 0.22);
}

.stb-secondary-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 11px;
    width: 100%;
}

.stb-secondary-controls button {
    min-width: 110px;
}

.stb-app[data-theme="light"] .stb-progress {
    background: rgba(20, 45, 34, 0.15);
}

.stb-app[data-theme="dark"] .stb-progress {
    background: rgba(255, 250, 240, 0.16);
}

.stb-app[data-theme="light"] .stb-progress div {
    background: linear-gradient(90deg, #1f4a37, #78aa7b);
}

.stb-app[data-theme="dark"] .stb-progress div {
    background: linear-gradient(90deg, #78aa7b, #d8c69b);
}

.stb-app[data-theme="light"] .stb-path-circle::before,
.stb-app[data-theme="light"] .stb-path-square::before {
    border-color: rgba(20, 45, 34, 0.55);
}

.stb-app[data-theme="dark"] .stb-path-circle::before,
.stb-app[data-theme="dark"] .stb-path-square::before {
    border-color: rgba(216, 198, 155, 0.82);
}

.stb-app[data-theme="light"] .stb-breath-dot {
    background: #142d22;
    box-shadow: 0 0 0 6px rgba(31, 74, 55, 0.16), 0 0 26px rgba(31, 74, 55, 0.38);
}

.stb-app[data-theme="dark"] .stb-breath-dot {
    background: #d8c69b;
    box-shadow: 0 0 0 6px rgba(216,198,155,0.18), 0 0 32px rgba(216,198,155,0.72);
}

.stb-app[data-theme="light"] .stb-circle {
    background: radial-gradient(circle at 35% 30%, #d7ead5, #78aa7b 48%, #1f4a37 100%);
}

.stb-app[data-theme="dark"] .stb-circle {
    background: radial-gradient(circle at 35% 30%, #d7ead5, #78aa7b 42%, #143326 100%);
}

.stb-app[data-theme="light"] .stb-square {
    background: linear-gradient(145deg, #d7ead5, #78aa7b 52%, #1f4a37);
}

.stb-app[data-theme="dark"] .stb-square {
    background: linear-gradient(145deg, #d7ead5, #78aa7b 48%, #143326);
}

.stb-app[data-theme="light"] .stb-triangle {
    border-bottom-color: #1f4a37;
}

.stb-app[data-theme="dark"] .stb-triangle {
    border-bottom-color: #78aa7b;
}

@media (max-width: 680px) {
    .stb-start-button {
        width: 100%;
        min-height: 66px;
    }

    .stb-secondary-controls button {
        flex: 1 1 calc(50% - 8px);
    }
}


/* v1.8 practice stats */
.stb-practice-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stb-practice-stats div {
    min-height: 74px;
    padding: 13px;
    border-radius: 18px;
    background: rgba(255,255,255,0.48);
    box-shadow: inset 0 0 0 1px rgba(216, 198, 155, 0.26);
}

.stb-app[data-theme="dark"] .stb-practice-stats div {
    background: rgba(0,0,0,0.18);
    box-shadow: inset 0 0 0 1px rgba(216, 198, 155, 0.16);
}

.stb-practice-stats small {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--stb-muted);
}

.stb-app[data-theme="dark"] .stb-practice-stats small {
    color: rgba(255,250,240,0.62);
}

.stb-practice-stats strong {
    display: block;
    font-size: clamp(17px, 3vw, 22px);
    line-height: 1.1;
    color: inherit;
    word-break: break-word;
}

#stb-stat-effect {
    font-size: 15px;
    line-height: 1.25;
}

@media (max-width: 1100px) {
    .stb-practice-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .stb-practice-stats {
        grid-template-columns: 1fr 1fr;
    }
}


/* v1.8.1 stop button */
.stb-stop-button {
    background: rgba(120, 40, 40, 0.12) !important;
}

.stb-app[data-theme="dark"] .stb-stop-button {
    background: rgba(255, 120, 120, 0.14) !important;
}

.stb-stop-button:hover {
    box-shadow: 0 10px 30px rgba(120, 40, 40, 0.16);
}


/* v1.8.2 complete text visibility for light/dark modes */

/* LIGHT MODE: strong readable ink */
.stb-app[data-theme="light"],
.stb-app[data-theme="light"] *:not(button):not(input):not(textarea):not(select) {
    color: #142d22;
}

.stb-app[data-theme="light"] .stb-eyebrow,
.stb-app[data-theme="light"] .stb-section-title p,
.stb-app[data-theme="light"] .stb-intro,
.stb-app[data-theme="light"] .stb-subtle-text,
.stb-app[data-theme="light"] .stb-recommendation,
.stb-app[data-theme="light"] .stb-note,
.stb-app[data-theme="light"] .stb-save-status,
.stb-app[data-theme="light"] .stb-survey p,
.stb-app[data-theme="light"] .stb-practice-stats small,
.stb-app[data-theme="light"] .stb-access-banner span {
    color: #405247 !important;
}

.stb-app[data-theme="light"] .stb-panel,
.stb-app[data-theme="light"] .stb-stage,
.stb-app[data-theme="light"] .stb-survey,
.stb-app[data-theme="light"] .stb-recommendation,
.stb-app[data-theme="light"] .stb-note,
.stb-app[data-theme="light"] .stb-save-status,
.stb-app[data-theme="light"] .stb-practice-stats div {
    background-color: rgba(255, 252, 246, 0.94) !important;
}

.stb-app[data-theme="light"] button,
.stb-app[data-theme="light"] .stb-icon-button,
.stb-app[data-theme="light"] .stb-state-grid button,
.stb-app[data-theme="light"] .stb-mode-list button,
.stb-app[data-theme="light"] .stb-toggle-list button,
.stb-app[data-theme="light"] .stb-after-grid button,
.stb-app[data-theme="light"] .stb-survey-options button,
.stb-app[data-theme="light"] .stb-secondary-controls button {
    background: #eadfc8 !important;
    color: #142d22 !important;
    border: 1px solid rgba(20, 45, 34, 0.10);
}

.stb-app[data-theme="light"] .stb-primary,
.stb-app[data-theme="light"] .stb-start-button,
.stb-app[data-theme="light"] .stb-survey .stb-primary {
    background: #142d22 !important;
    color: #fffaf0 !important;
    border: 1px solid #142d22;
}

.stb-app[data-theme="light"] .stb-stop-button {
    background: #f1ded8 !important;
    color: #5b2019 !important;
    border: 1px solid rgba(91, 32, 25, 0.18);
}

.stb-app[data-theme="light"] .stb-selected {
    background: #1f4a37 !important;
    color: #fffaf0 !important;
}

/* DARK MODE: warm readable light */
.stb-app[data-theme="dark"],
.stb-app[data-theme="dark"] *:not(button):not(input):not(textarea):not(select) {
    color: #fffaf0;
}

.stb-app[data-theme="dark"] .stb-eyebrow,
.stb-app[data-theme="dark"] .stb-section-title p,
.stb-app[data-theme="dark"] .stb-intro,
.stb-app[data-theme="dark"] .stb-subtle-text,
.stb-app[data-theme="dark"] .stb-recommendation,
.stb-app[data-theme="dark"] .stb-note,
.stb-app[data-theme="dark"] .stb-save-status,
.stb-app[data-theme="dark"] .stb-survey p,
.stb-app[data-theme="dark"] .stb-practice-stats small,
.stb-app[data-theme="dark"] .stb-access-banner span {
    color: rgba(255, 250, 240, 0.78) !important;
}

.stb-app[data-theme="dark"] .stb-panel,
.stb-app[data-theme="dark"] .stb-stage,
.stb-app[data-theme="dark"] .stb-survey,
.stb-app[data-theme="dark"] .stb-recommendation,
.stb-app[data-theme="dark"] .stb-note,
.stb-app[data-theme="dark"] .stb-save-status,
.stb-app[data-theme="dark"] .stb-practice-stats div {
    background-color: rgba(255, 255, 255, 0.085) !important;
}

.stb-app[data-theme="dark"] button,
.stb-app[data-theme="dark"] .stb-icon-button,
.stb-app[data-theme="dark"] .stb-state-grid button,
.stb-app[data-theme="dark"] .stb-mode-list button,
.stb-app[data-theme="dark"] .stb-toggle-list button,
.stb-app[data-theme="dark"] .stb-after-grid button,
.stb-app[data-theme="dark"] .stb-survey-options button,
.stb-app[data-theme="dark"] .stb-secondary-controls button {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fffaf0 !important;
    border: 1px solid rgba(255, 250, 240, 0.12);
}

.stb-app[data-theme="dark"] .stb-primary,
.stb-app[data-theme="dark"] .stb-start-button,
.stb-app[data-theme="dark"] .stb-survey .stb-primary {
    background: #d8c69b !important;
    color: #142d22 !important;
    border: 1px solid #d8c69b;
}

.stb-app[data-theme="dark"] .stb-stop-button {
    background: rgba(255, 135, 120, 0.18) !important;
    color: #ffe5df !important;
    border: 1px solid rgba(255, 180, 165, 0.22);
}

.stb-app[data-theme="dark"] .stb-selected {
    background: #d8c69b !important;
    color: #142d22 !important;
}

/* Form fields readability */
.stb-app[data-theme="light"] textarea,
.stb-app[data-theme="light"] input,
.stb-app[data-theme="light"] select {
    background: #fffaf0 !important;
    color: #142d22 !important;
    border-color: rgba(20, 45, 34, 0.2) !important;
}

.stb-app[data-theme="dark"] textarea,
.stb-app[data-theme="dark"] input,
.stb-app[data-theme="dark"] select {
    background: rgba(0, 0, 0, 0.24) !important;
    color: #fffaf0 !important;
    border-color: rgba(255, 250, 240, 0.2) !important;
}

.stb-app[data-theme="dark"] textarea::placeholder,
.stb-app[data-theme="dark"] input::placeholder {
    color: rgba(255, 250, 240, 0.52) !important;
}

.stb-app[data-theme="light"] textarea::placeholder,
.stb-app[data-theme="light"] input::placeholder {
    color: rgba(20, 45, 34, 0.52) !important;
}

/* Highest priority readable core */
.stb-app[data-theme="light"] .stb-phase,
.stb-app[data-theme="light"] .stb-countdown,
.stb-app[data-theme="light"] .stb-counter,
.stb-app[data-theme="light"] .stb-practice-stats strong,
.stb-app[data-theme="light"] .stb-survey h3 {
    color: #10261c !important;
    text-shadow: none;
}

.stb-app[data-theme="dark"] .stb-phase,
.stb-app[data-theme="dark"] .stb-countdown,
.stb-app[data-theme="dark"] .stb-counter,
.stb-app[data-theme="dark"] .stb-practice-stats strong,
.stb-app[data-theme="dark"] .stb-survey h3 {
    color: #fffaf0 !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.32);
}

/* Path and graphic visibility */
.stb-app[data-theme="light"] .stb-orbit {
    background: radial-gradient(circle, rgba(31, 74, 55, 0.14), rgba(216,198,155,0.16) 52%, transparent 72%);
}

.stb-app[data-theme="dark"] .stb-orbit {
    background: radial-gradient(circle, rgba(120,170,123,0.24), rgba(216,198,155,0.12) 52%, transparent 72%);
}

.stb-app[data-theme="light"] .stb-path-circle::before,
.stb-app[data-theme="light"] .stb-path-square::before {
    border-color: rgba(16, 38, 28, 0.68) !important;
}

.stb-app[data-theme="dark"] .stb-path-circle::before,
.stb-app[data-theme="dark"] .stb-path-square::before {
    border-color: rgba(255, 250, 240, 0.74) !important;
}

/* Focus clarity */
.stb-app[data-theme="light"] button:focus,
.stb-app[data-theme="light"] textarea:focus {
    outline-color: #1f4a37 !important;
}

.stb-app[data-theme="dark"] button:focus,
.stb-app[data-theme="dark"] textarea:focus {
    outline-color: #d8c69b !important;
}

/* Admin page readability does not inherit app colors */
.stb-admin-wrap,
.stb-admin-wrap * {
    color: inherit;
}


/* v1.9 dynamic module layout */
.stb-dynamic-layout {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: stretch;
}

.stb-module {
    min-width: 0;
}

.stb-module-stage {
    grid-column: span 8;
    min-height: 580px;
}

.stb-module-state,
.stb-module-modes,
.stb-module-accessibility,
.stb-module-stats,
.stb-module-after {
    grid-column: span 4;
}

.stb-layout-admin-row {
    display: grid;
    grid-template-columns: 1fr 82px auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
}

.stb-layout-admin-row input[type="number"] {
    width: 80px;
}

@media (max-width: 1100px) {
    .stb-dynamic-layout {
        grid-template-columns: 1fr;
    }

    .stb-module-stage,
    .stb-module-state,
    .stb-module-modes,
    .stb-module-accessibility,
    .stb-module-stats,
    .stb-module-after {
        grid-column: span 1;
    }
}

@media (min-width: 1101px) {
    .stb-dynamic-layout .stb-module-stage:first-child,
    .stb-dynamic-layout .stb-module-stage:nth-child(2) {
        grid-column: span 8;
    }
}


/* v2.0 separate desktop/mobile module order and placement */
.stb-dynamic-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
}

.stb-layout-item {
    min-width: 0;
    display: flex;
    order: var(--stb-desktop-order);
    grid-column: span var(--stb-desktop-span);
}

.stb-layout-item > .stb-module {
    width: 100%;
}

.stb-layout-item[data-module="stage"] {
    min-height: 580px;
}

.stb-layout-item[data-module="stage"] > .stb-stage {
    min-height: 580px;
}

.stb-layout-admin-row-v2 {
    grid-template-columns: 1.2fr 0.8fr 0.9fr 0.8fr 0.9fr 0.8fr;
}

.stb-layout-admin-row-v2 label {
    margin: 0;
}

.stb-layout-admin-row-v2 input[type="number"],
.stb-layout-admin-row-v2 select {
    width: 100%;
    margin-top: 4px;
}

@media (max-width: 1100px) {
    .stb-dynamic-layout {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .stb-layout-item {
        order: var(--stb-mobile-order);
        grid-column: span var(--stb-mobile-span);
    }

    .stb-layout-item[data-module="stage"],
    .stb-layout-item[data-module="stage"] > .stb-stage {
        min-height: 520px;
    }

    .stb-layout-admin-row-v2 {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

@media (max-width: 680px) {
    .stb-layout-item {
        grid-column: span 12;
    }

    .stb-layout-item[data-module="stage"],
    .stb-layout-item[data-module="stage"] > .stb-stage {
        min-height: 480px;
    }
}


/* v2.1 desktop three-column experience builder */
.stb-desktop-three-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(360px, 1.55fr) minmax(220px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.stb-desktop-column {
    display: grid;
    gap: 16px;
    align-content: start;
    min-width: 0;
}

.stb-desktop-column .stb-layout-item {
    display: block;
    order: var(--stb-desktop-order);
    grid-column: auto;
}

.stb-desktop-column .stb-layout-item > .stb-module {
    width: 100%;
}

.stb-column-center .stb-module-stage,
.stb-column-center .stb-stage {
    min-height: 640px;
}

.stb-mobile-flow-layout {
    display: none;
}

.stb-layout-admin-row-v2 {
    grid-template-columns: 1.1fr 0.9fr 0.75fr 0.9fr 0.75fr 0.85fr 0.7fr;
}

@media (max-width: 1100px) {
    .stb-desktop-three-layout {
        display: none;
    }

    .stb-mobile-flow-layout {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 16px;
    }

    .stb-mobile-flow-layout .stb-layout-item {
        order: var(--stb-mobile-order);
        grid-column: span var(--stb-mobile-span);
    }
}

@media (max-width: 680px) {
    .stb-mobile-flow-layout .stb-layout-item {
        grid-column: span 12;
    }
}


/* v2.1.1 clearer theme switch */
.stb-theme-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 118px;
    min-height: 48px;
    padding: 10px 16px !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    transition: all 0.25s ease;
}

.stb-theme-icon {
    font-size: 18px;
    line-height: 1;
}

.stb-theme-text {
    letter-spacing: 0.02em;
}

.stb-app[data-theme="light"] .stb-theme-toggle {
    background: #142d22 !important;
    color: #fffaf0 !important;
    border: 1px solid rgba(20,45,34,0.2);
}

.stb-app[data-theme="dark"] .stb-theme-toggle {
    background: #d8c69b !important;
    color: #142d22 !important;
    border: 1px solid rgba(216,198,155,0.24);
}

.stb-theme-toggle:hover {
    transform: translateY(-1px);
}


/* v2.2 stronger sizing controls and fullscreen fit */
.stb-desktop-three-layout {
    grid-template-columns: minmax(190px, var(--stb-left-fr, 0.8fr)) minmax(320px, var(--stb-center-fr, 1.45fr)) minmax(190px, var(--stb-right-fr, 0.8fr)) !important;
    gap: var(--stb-layout-gap, 14px) !important;
}

.stb-desktop-column {
    gap: var(--stb-layout-gap, 14px) !important;
}

.stb-panel {
    padding: var(--stb-module-padding, 14px) !important;
}

.stb-stage,
.stb-column-center .stb-module-stage,
.stb-column-center .stb-stage {
    min-height: var(--stb-stage-min-height, 560px) !important;
}

.stb-orbit {
    width: min(var(--stb-orbit-size, 270px), 56vw) !important;
    height: min(var(--stb-orbit-size, 270px), 56vw) !important;
}

.stb-shape {
    width: min(var(--stb-shape-size, 150px), 34vw) !important;
    height: min(var(--stb-shape-size, 150px), 34vw) !important;
}

.stb-triangle {
    width: 0 !important;
    height: 0 !important;
    border-left-width: calc(min(var(--stb-shape-size, 150px), 34vw) * 0.58) !important;
    border-right-width: calc(min(var(--stb-shape-size, 150px), 34vw) * 0.58) !important;
    border-bottom-width: calc(min(var(--stb-shape-size, 150px), 34vw) * 1.02) !important;
}

.stb-layout-size-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 12px 0 18px;
    border-bottom: 1px solid #ececec;
    margin-bottom: 12px;
}

.stb-layout-size-grid label {
    margin: 0 !important;
}

.stb-layout-size-grid input {
    width: 100%;
    margin-top: 5px;
}

/* Prevent overlap in dense columns */
.stb-layout-item,
.stb-panel,
.stb-stage {
    overflow: visible;
    min-width: 0;
}

.stb-mode-list button,
.stb-toggle-list button,
.stb-after-grid button,
.stb-survey-options button,
.stb-state-grid button {
    min-height: 42px;
    line-height: 1.25;
    white-space: normal;
}

.stb-phase {
    overflow-wrap: anywhere;
}

/* Fullscreen must fit better */
.stb-app:fullscreen {
    max-width: none !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 10px !important;
    overflow: auto !important;
}

.stb-app:fullscreen .stb-shell {
    min-height: calc(100vh - 20px);
    padding: 12px !important;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-topbar {
    margin-bottom: 8px;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-topbar h2 {
    font-size: clamp(22px, 3vw, 34px);
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-intro,
.stb-app.stb-fullscreen-compact:fullscreen .stb-note,
.stb-app.stb-fullscreen-compact:fullscreen .stb-recommendation {
    font-size: 12px;
    line-height: 1.35;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-panel {
    padding: 10px !important;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-desktop-three-layout {
    gap: 10px !important;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-stage {
    min-height: calc(100vh - 170px) !important;
    padding: 14px !important;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-orbit {
    width: min(230px, 28vw) !important;
    height: min(230px, 28vw) !important;
    margin-bottom: 10px;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-shape {
    width: min(125px, 16vw) !important;
    height: min(125px, 16vw) !important;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-phase {
    font-size: clamp(26px, 4vw, 46px);
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-countdown {
    font-size: clamp(42px, 6vw, 76px);
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-progress {
    margin: 14px 0 10px;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-start-button {
    min-height: 52px;
    font-size: clamp(17px, 2vw, 21px) !important;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-secondary-controls button {
    min-height: 40px;
    padding: 9px 12px !important;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-practice-stats {
    gap: 6px;
}

.stb-app.stb-fullscreen-compact:fullscreen .stb-practice-stats div {
    min-height: 58px;
    padding: 9px;
}

@media (max-width: 1100px) {
    .stb-mobile-flow-layout {
        gap: var(--stb-layout-gap, 14px) !important;
    }

    .stb-stage {
        min-height: min(var(--stb-stage-min-height, 560px), 560px) !important;
    }

    .stb-layout-size-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .stb-layout-size-grid {
        grid-template-columns: 1fr;
    }

    .stb-stage {
        min-height: 460px !important;
    }

    .stb-orbit {
        width: min(var(--stb-orbit-size, 270px), 72vw) !important;
        height: min(var(--stb-orbit-size, 270px), 72vw) !important;
    }
}


/* v2.3 responsive self-sizing and bilingual controls */
.stb-desktop-column,
.stb-layout-item,
.stb-module,
.stb-panel,
.stb-stage {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.stb-panel,
.stb-stage {
    overflow-wrap: anywhere;
    word-break: normal;
}

.stb-mode-list button,
.stb-toggle-list button,
.stb-after-grid button,
.stb-survey-options button,
.stb-state-grid button,
.stb-secondary-controls button,
.stb-top-actions button {
    max-width: 100%;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.stb-desktop-three-layout {
    grid-template-columns:
        minmax(0, var(--stb-left-fr, 0.8fr))
        minmax(0, var(--stb-center-fr, 1.45fr))
        minmax(0, var(--stb-right-fr, 0.8fr)) !important;
}

.stb-column-left,
.stb-column-right,
.stb-column-center {
    min-width: 0 !important;
}

.stb-practice-stats {
    grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)) !important;
}

.stb-state-grid,
.stb-mode-list,
.stb-toggle-list,
.stb-after-grid,
.stb-survey-options {
    grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)) !important;
}

.stb-column-left .stb-state-grid,
.stb-column-left .stb-mode-list,
.stb-column-left .stb-toggle-list,
.stb-column-left .stb-after-grid,
.stb-column-right .stb-state-grid,
.stb-column-right .stb-mode-list,
.stb-column-right .stb-toggle-list,
.stb-column-right .stb-after-grid {
    grid-template-columns: 1fr !important;
}

.stb-lang-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 48px;
    padding: 10px 14px !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
}

.stb-app[data-theme="light"] .stb-lang-toggle {
    background: #eadfc8 !important;
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-lang-toggle {
    background: rgba(255,255,255,0.14) !important;
    color: #fffaf0 !important;
}

/* Prevent visual collision in narrow columns */
.stb-column-left .stb-section-title,
.stb-column-right .stb-section-title {
    flex-wrap: wrap;
}

.stb-column-left .stb-mode-list button,
.stb-column-right .stb-mode-list button {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.stb-column-left .stb-practice-stats,
.stb-column-right .stb-practice-stats {
    grid-template-columns: 1fr !important;
}

@media (max-width: 1100px) {
    .stb-mobile-flow-layout .stb-layout-item {
        min-width: 0 !important;
    }

    .stb-state-grid,
    .stb-mode-list,
    .stb-toggle-list,
    .stb-after-grid,
    .stb-survey-options {
        grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .stb-top-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .stb-top-actions button {
        width: 100%;
    }

    .stb-theme-toggle {
        min-width: 0;
    }
}


/* v2.3.1 mobile interaction fix */
@media (max-width: 1100px) {
    .stb-desktop-three-layout {
        display: none !important;
        pointer-events: none !important;
    }

    .stb-mobile-flow-layout {
        display: grid !important;
        pointer-events: auto !important;
    }
}

@media (min-width: 1101px) {
    .stb-mobile-flow-layout {
        display: none !important;
        pointer-events: none !important;
    }

    .stb-desktop-three-layout {
        display: grid !important;
        pointer-events: auto !important;
    }
}


/* v2.4 explicit active/inactive states */
.stb-active-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin-bottom: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stb-app[data-theme="light"] .stb-active-status {
    background: rgba(20,45,34,0.09);
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-active-status {
    background: rgba(216,198,155,0.18);
    color: #fffaf0 !important;
}

.stb-lang-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(120, 170, 123, 0.16);
    box-shadow: inset 0 0 0 1px rgba(216,198,155,0.2);
}

.stb-lang-option {
    min-width: 52px;
    min-height: 40px;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    font-weight: 850 !important;
}

.stb-is-active,
.stb-is-on {
    position: relative;
    transform: translateY(-1px);
}

.stb-app[data-theme="light"] .stb-is-active,
.stb-app[data-theme="light"] .stb-is-on {
    background: #1f4a37 !important;
    color: #fffaf0 !important;
    border-color: #1f4a37 !important;
    box-shadow: 0 0 0 3px rgba(31,74,55,0.16), 0 12px 28px rgba(31,74,55,0.18) !important;
}

.stb-app[data-theme="dark"] .stb-is-active,
.stb-app[data-theme="dark"] .stb-is-on {
    background: #d8c69b !important;
    color: #142d22 !important;
    border-color: #d8c69b !important;
    box-shadow: 0 0 0 3px rgba(216,198,155,0.16), 0 12px 28px rgba(216,198,155,0.14) !important;
}

.stb-is-off {
    opacity: 0.68;
}

.stb-app[data-theme="light"] .stb-is-off {
    background: #ece7dc !important;
    color: #52635a !important;
    border-color: rgba(20,45,34,0.08) !important;
}

.stb-app[data-theme="dark"] .stb-is-off {
    background: rgba(255,255,255,0.07) !important;
    color: rgba(255,250,240,0.58) !important;
    border-color: rgba(255,250,240,0.08) !important;
}

.stb-start-button.stb-is-running {
    animation: stbPulseActive 1.6s ease-in-out infinite;
}

@keyframes stbPulseActive {
    0%, 100% { box-shadow: 0 0 0 0 rgba(120,170,123,0.28), 0 16px 42px rgba(20,45,34,0.22); }
    50% { box-shadow: 0 0 0 8px rgba(120,170,123,0.08), 0 16px 42px rgba(20,45,34,0.22); }
}

.stb-lang-option[aria-pressed="true"]::after,
.stb-mode-list button.stb-is-active::after,
.stb-state-grid button.stb-is-active::after,
.stb-toggle-list button.stb-is-on::after {
    content: " Активно";
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.86;
}

.stb-lang-option[aria-pressed="true"]::after {
    content: "";
}

@media (max-width: 520px) {
    .stb-lang-switch {
        width: 100%;
        grid-column: span 2;
    }

    .stb-lang-option {
        flex: 1;
    }

    .stb-active-status {
        width: 100%;
    }
}


/* v2.4.1 stable explicit state controls */
.stb-active-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin-bottom: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stb-app[data-theme="light"] .stb-active-status {
    background: rgba(20,45,34,0.09);
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-active-status {
    background: rgba(216,198,155,0.18);
    color: #fffaf0 !important;
}

.stb-lang-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(120, 170, 123, 0.16);
    box-shadow: inset 0 0 0 1px rgba(216,198,155,0.2);
}

.stb-lang-option {
    min-width: 52px;
    min-height: 40px;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    font-weight: 850 !important;
}

.stb-is-active,
.stb-is-on {
    position: relative;
    transform: translateY(-1px);
}

.stb-app[data-theme="light"] .stb-is-active,
.stb-app[data-theme="light"] .stb-is-on {
    background: #1f4a37 !important;
    color: #fffaf0 !important;
    border-color: #1f4a37 !important;
    box-shadow: 0 0 0 3px rgba(31,74,55,0.16), 0 12px 28px rgba(31,74,55,0.18) !important;
}

.stb-app[data-theme="dark"] .stb-is-active,
.stb-app[data-theme="dark"] .stb-is-on {
    background: #d8c69b !important;
    color: #142d22 !important;
    border-color: #d8c69b !important;
    box-shadow: 0 0 0 3px rgba(216,198,155,0.16), 0 12px 28px rgba(216,198,155,0.14) !important;
}

.stb-is-off {
    opacity: 0.68;
}

.stb-app[data-theme="light"] .stb-is-off {
    background: #ece7dc !important;
    color: #52635a !important;
    border-color: rgba(20,45,34,0.08) !important;
}

.stb-app[data-theme="dark"] .stb-is-off {
    background: rgba(255,255,255,0.07) !important;
    color: rgba(255,250,240,0.58) !important;
    border-color: rgba(255,250,240,0.08) !important;
}

.stb-start-button.stb-is-running {
    animation: stbPulseActive 1.6s ease-in-out infinite;
}

@keyframes stbPulseActive {
    0%, 100% { box-shadow: 0 0 0 0 rgba(120,170,123,0.28), 0 16px 42px rgba(20,45,34,0.22); }
    50% { box-shadow: 0 0 0 8px rgba(120,170,123,0.08), 0 16px 42px rgba(20,45,34,0.22); }
}

.stb-mode-list button.stb-is-active::after,
.stb-state-grid button.stb-is-active::after,
.stb-toggle-list button.stb-is-on::after {
    content: " Активно";
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.86;
}

.stb-app[data-language="en"] .stb-mode-list button.stb-is-active::after,
.stb-app[data-language="en"] .stb-state-grid button.stb-is-active::after,
.stb-app[data-language="en"] .stb-toggle-list button.stb-is-on::after {
    content: " Active";
}

@media (max-width: 520px) {
    .stb-lang-switch {
        width: 100%;
        grid-column: span 2;
    }
    .stb-lang-option {
        flex: 1;
    }
    .stb-active-status {
        width: 100%;
    }
}


/* v2.4.2 clearer survey selection and responsive triangle fix */
.stb-survey-selected {
    margin: 12px 0;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.stb-app[data-theme="light"] .stb-survey-selected {
    background: rgba(31, 74, 55, 0.10);
    color: #142d22 !important;
    border: 1px solid rgba(31, 74, 55, 0.18);
}

.stb-app[data-theme="dark"] .stb-survey-selected {
    background: rgba(216, 198, 155, 0.16);
    color: #fffaf0 !important;
    border: 1px solid rgba(216, 198, 155, 0.22);
}

.stb-survey-options button.stb-selected,
.stb-after-grid button.stb-selected {
    position: relative;
}

.stb-survey-options button.stb-selected::before,
.stb-after-grid button.stb-selected::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 999px;
    font-weight: 900;
    background: rgba(255,255,255,0.24);
}

.stb-app[data-theme="light"] .stb-survey-options button.stb-selected,
.stb-app[data-theme="light"] .stb-after-grid button.stb-selected {
    background: #1f4a37 !important;
    color: #fffaf0 !important;
    border-color: #1f4a37 !important;
}

.stb-app[data-theme="dark"] .stb-survey-options button.stb-selected,
.stb-app[data-theme="dark"] .stb-after-grid button.stb-selected {
    background: #d8c69b !important;
    color: #142d22 !important;
    border-color: #d8c69b !important;
}

/* Replace fragile triangle CSS with scalable centered triangle */
.stb-triangle {
    width: min(var(--stb-shape-size, 150px), 34vw) !important;
    height: min(var(--stb-shape-size, 150px), 34vw) !important;
    background: transparent !important;
    border: 0 !important;
    clip-path: polygon(50% 4%, 96% 92%, 4% 92%);
    border-radius: 0 !important;
}

.stb-app[data-theme="light"] .stb-triangle {
    background: linear-gradient(145deg, #d7ead5, #78aa7b 52%, #1f4a37) !important;
}

.stb-app[data-theme="dark"] .stb-triangle {
    background: linear-gradient(145deg, #d7ead5, #78aa7b 48%, #143326) !important;
}

.stb-path-triangle::before {
    width: calc(var(--stb-orbit-size, 270px) * 0.58);
    height: calc(var(--stb-orbit-size, 270px) * 0.50);
    max-width: 72vw;
    max-height: 72vw;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    background: transparent !important;
    border: 1px solid rgba(216,198,155,0.72) !important;
    opacity: 0.55 !important;
}

.stb-app[data-theme="light"] .stb-path-triangle::before {
    border-color: rgba(20,45,34,0.55) !important;
}

.stb-app[data-theme="dark"] .stb-path-triangle::before {
    border-color: rgba(255,250,240,0.74) !important;
}

.stb-app:fullscreen .stb-triangle {
    width: min(var(--stb-shape-size, 150px), 22vw, 150px) !important;
    height: min(var(--stb-shape-size, 150px), 22vw, 150px) !important;
}

@media (max-width: 680px) {
    .stb-triangle {
        width: min(var(--stb-shape-size, 150px), 46vw) !important;
        height: min(var(--stb-shape-size, 150px), 46vw) !important;
    }

    .stb-app:fullscreen .stb-triangle {
        width: min(var(--stb-shape-size, 150px), 40vw, 150px) !important;
        height: min(var(--stb-shape-size, 150px), 40vw, 150px) !important;
    }

    .stb-path-triangle::before {
        width: min(58vw, 210px) !important;
        height: min(50vw, 190px) !important;
    }
}


/* v2.5 background music and improved stats visibility */
.stb-background-panel {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
}

.stb-app[data-theme="light"] .stb-background-panel {
    background: rgba(255,255,255,0.52);
    color: #142d22;
}

.stb-app[data-theme="dark"] .stb-background-panel {
    background: rgba(0,0,0,0.18);
    color: #fffaf0;
}

.stb-background-panel label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.76;
}

.stb-background-panel select {
    min-height: 42px;
    border-radius: 14px;
    padding: 8px 10px;
    width: 100%;
}

.stb-app[data-theme="light"] .stb-background-panel select {
    background: #fffaf0 !important;
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-background-panel select {
    background: rgba(0,0,0,0.24) !important;
    color: #fffaf0 !important;
}

#stb-stat-total,
#stb-stat-effect {
    font-weight: 900;
}

.stb-app[data-theme="light"] #stb-stat-total,
.stb-app[data-theme="light"] #stb-stat-effect {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] #stb-stat-total,
.stb-app[data-theme="dark"] #stb-stat-effect {
    color: #fffaf0 !important;
}


/* v2.6 custom admin content and custom breathing modes */
.stb-custom-panel-content {
    font-size: 14px;
    line-height: 1.6;
}

.stb-custom-panel-content p:first-child {
    margin-top: 0;
}

.stb-custom-panel-content p:last-child {
    margin-bottom: 0;
}

.stb-custom-panel-content a {
    font-weight: 800;
    text-decoration: underline;
}

.stb-app[data-theme="light"] .stb-custom-panel-content {
    color: #142d22;
}

.stb-app[data-theme="dark"] .stb-custom-panel-content {
    color: #fffaf0;
}

.stb-admin-wrap textarea.code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}


/* v2.6.1 exact SVG breath tracker: dot follows the visible line */
.stb-breath-svg {
    position: absolute;
    inset: 50%;
    width: min(var(--stb-orbit-size, 270px), 56vw);
    height: min(var(--stb-orbit-size, 270px), 56vw);
    transform: translate(-50%, -50%);
    overflow: visible;
    pointer-events: none;
    z-index: 8;
}

.stb-svg-path {
    fill: none;
    stroke-width: 2.2;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 0.25s ease, stroke 0.25s ease;
}

.stb-breath-svg[data-shape="circle"] .stb-svg-circle,
.stb-breath-svg[data-shape="square"] .stb-svg-square,
.stb-breath-svg[data-shape="triangle"] .stb-svg-triangle,
.stb-breath-svg[data-shape="rectangle"] .stb-svg-rectangle,
.stb-breath-svg[data-shape="trapezoid"] .stb-svg-trapezoid {
    opacity: 1;
}

.stb-app[data-theme="light"] .stb-svg-path {
    stroke: rgba(20, 45, 34, 0.58);
}

.stb-app[data-theme="dark"] .stb-svg-path {
    stroke: rgba(255, 250, 240, 0.72);
}

.stb-breath-svg .stb-breath-dot {
    fill: #142d22;
    stroke: rgba(255, 250, 240, 0.92);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 9px rgba(31,74,55,0.46));
    transition: cx 0.88s linear, cy 0.88s linear, fill 0.25s ease, stroke 0.25s ease;
}

.stb-app[data-theme="dark"] .stb-breath-svg .stb-breath-dot {
    fill: #d8c69b;
    stroke: rgba(20, 45, 34, 0.85);
    filter: drop-shadow(0 0 12px rgba(216,198,155,0.72));
}

/* Neutralize older div-based tracker styles when old CSS remains in file */
.stb-breath-path {
    display: none !important;
}

.stb-app:fullscreen .stb-breath-svg {
    width: min(var(--stb-orbit-size, 270px), 40vw, 270px);
    height: min(var(--stb-orbit-size, 270px), 40vw, 270px);
}

@media (max-width: 680px) {
    .stb-breath-svg {
        width: min(var(--stb-orbit-size, 270px), 72vw);
        height: min(var(--stb-orbit-size, 270px), 72vw);
    }

    .stb-app:fullscreen .stb-breath-svg {
        width: min(var(--stb-orbit-size, 270px), 62vw, 270px);
        height: min(var(--stb-orbit-size, 270px), 62vw, 270px);
    }
}


/* v2.6.2 clearer panel names */
.stb-section-title {
    position: relative;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
}

.stb-section-title span:first-child {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    border-radius: 999px !important;
}

.stb-section-title p {
    margin: 0 !important;
    font-size: clamp(14px, 2.2vw, 17px) !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
}

.stb-app[data-theme="light"] .stb-section-title {
    background: rgba(31, 74, 55, 0.08) !important;
    border: 1px solid rgba(31, 74, 55, 0.12) !important;
}

.stb-app[data-theme="light"] .stb-section-title p {
    color: #142d22 !important;
}

.stb-app[data-theme="light"] .stb-section-title span:first-child {
    background: #1f4a37 !important;
    box-shadow: 0 0 0 4px rgba(31, 74, 55, 0.10);
}

.stb-app[data-theme="dark"] .stb-section-title {
    background: rgba(216, 198, 155, 0.14) !important;
    border: 1px solid rgba(216, 198, 155, 0.18) !important;
}

.stb-app[data-theme="dark"] .stb-section-title p {
    color: #fffaf0 !important;
}

.stb-app[data-theme="dark"] .stb-section-title span:first-child {
    background: #d8c69b !important;
    box-shadow: 0 0 0 4px rgba(216, 198, 155, 0.12);
}

/* Make custom panel and small module headings readable too */
.stb-panel h3,
.stb-survey h3 {
    font-size: clamp(18px, 3vw, 24px) !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
}

.stb-app[data-theme="light"] .stb-panel h3,
.stb-app[data-theme="light"] .stb-survey h3 {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-panel h3,
.stb-app[data-theme="dark"] .stb-survey h3 {
    color: #fffaf0 !important;
}

/* Improve panel scanability */
.stb-panel {
    border: 1px solid rgba(31, 74, 55, 0.08);
}

.stb-app[data-theme="dark"] .stb-panel {
    border: 1px solid rgba(216, 198, 155, 0.13);
}

@media (max-width: 680px) {
    .stb-section-title {
        padding: 11px 12px !important;
        margin-bottom: 12px !important;
    }

    .stb-section-title p {
        font-size: 16px !important;
    }
}


/* v2.6.3 focus mode during active breathing */
.stb-app.stb-breathing-active .stb-panel {
    transition:
        opacity 0.35s ease,
        filter 0.35s ease,
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

/* Keep breathing core fully visible */
.stb-app.stb-breathing-active [data-module="visual"],
.stb-app.stb-breathing-active [data-module="controls"],
.stb-app.stb-breathing-active .stb-center-stage,
.stb-app.stb-breathing-active .stb-visual-stage,
.stb-app.stb-breathing-active .stb-main-breathing,
.stb-app.stb-breathing-active .stb-primary-controls {
    opacity: 1 !important;
    filter: none !important;
    transform: scale(1) !important;
    z-index: 5;
}

/* Fade secondary modules for focus */
.stb-app.stb-breathing-active .stb-panel:not([data-module="visual"]):not([data-module="controls"]),
.stb-app.stb-breathing-active .stb-side-panel,
.stb-app.stb-breathing-active .stb-stats-panel,
.stb-app.stb-breathing-active .stb-custom-panel-content,
.stb-app.stb-breathing-active .stb-background-panel,
.stb-app.stb-breathing-active .stb-survey,
.stb-app.stb-breathing-active .stb-note,
.stb-app.stb-breathing-active .stb-after-grid {
    opacity: 0.15 !important;
    filter: saturate(0.7) blur(0.2px);
}

/* Slightly elevate active breathing zone */
.stb-app.stb-breathing-active .stb-center-stage,
.stb-app.stb-breathing-active .stb-visual-stage {
    box-shadow:
        0 0 0 1px rgba(120,170,123,0.16),
        0 22px 60px rgba(20,45,34,0.20) !important;
}

/* Keep top controls accessible but softer */
.stb-app.stb-breathing-active .stb-topbar {
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

.stb-app.stb-breathing-active .stb-topbar:hover {
    opacity: 1;
}

/* Mobile focus tuning */
@media (max-width: 680px) {
    .stb-app.stb-breathing-active .stb-panel:not([data-module="visual"]):not([data-module="controls"]) {
        opacity: 0.18 !important;
    }

    .stb-app.stb-breathing-active .stb-center-stage,
    .stb-app.stb-breathing-active .stb-visual-stage {
        transform: scale(1.01);
    }
}


/* v2.6.4 functional fix for focus mode */
.stb-app.stb-breathing-active .stb-panel,
.stb-app.stb-breathing-active .stb-note,
.stb-app.stb-breathing-active .stb-after-grid,
.stb-app.stb-breathing-active .stb-background-panel {
    pointer-events: none;
}

.stb-app.stb-breathing-active .stb-stage,
.stb-app.stb-breathing-active .stb-stage *,
.stb-app.stb-breathing-active .stb-topbar,
.stb-app.stb-breathing-active .stb-topbar * {
    pointer-events: auto;
}

.stb-app.stb-breathing-active .stb-stage {
    opacity: 1 !important;
    filter: none !important;
}

.stb-app.stb-breathing-active .stb-stage .stb-survey[hidden] {
    display: none !important;
}


/* v2.6.5 remove decorative category styling */
.stb-section-title {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.stb-section-title span:first-child {
    display: none !important;
}

.stb-section-title::before,
.stb-section-title::after {
    display: none !important;
    content: none !important;
}

.stb-section-title p {
    font-size: clamp(15px, 2vw, 18px) !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    margin: 0 0 12px 0 !important;
}

.stb-app[data-theme="light"] .stb-section-title p {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-section-title p {
    color: #fffaf0 !important;
}


/* v2.6.6 restore simple module titles with better readability */
.stb-section-title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.stb-section-title span:first-child {
    display: inline-flex !important;
    width: 7px !important;
    height: 7px !important;
    min-width: 7px !important;
    border-radius: 999px !important;
}

.stb-app[data-theme="light"] .stb-section-title span:first-child {
    background: rgba(31,74,55,0.55) !important;
}

.stb-app[data-theme="dark"] .stb-section-title span:first-child {
    background: rgba(216,198,155,0.82) !important;
}

.stb-section-title p {
    margin: 0 !important;
    font-size: clamp(15px, 2vw, 18px) !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
}

.stb-app[data-theme="light"] .stb-section-title p {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-section-title p {
    color: #fffaf0 !important;
}

@media (max-width: 680px) {
    .stb-section-title p {
        font-size: 16px !important;
    }
}


/* v2.6.7 clean module titles and smoother tracker */
.stb-section-title::before,
.stb-section-title::after,
.stb-section-title p::before,
.stb-section-title p::after,
.stb-panel::before,
.stb-panel::after {
    content: none !important;
    display: none !important;
}

.stb-section-title {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.stb-section-title span:first-child {
    display: none !important;
}

/* Smooth SVG breathing tracker */
.stb-breath-svg .stb-breath-dot {
    transition:
        cx 0.08s linear,
        cy 0.08s linear,
        fill 0.25s ease,
        stroke 0.25s ease,
        filter 0.25s ease !important;
    will-change: cx, cy;
    shape-rendering: geometricPrecision;
}

.stb-svg-path {
    shape-rendering: geometricPrecision;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Improve visual smoothness fullscreen/mobile */
.stb-breath-svg {
    transform: translate(-50%, -50%) translateZ(0);
    backface-visibility: hidden;
}


/* v2.6.8 restore visible module names without decorative blocks */
.stb-section-title {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.stb-section-title span:first-child {
    display: none !important;
}

.stb-section-title p {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    font-size: clamp(15px, 2vw, 18px) !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.stb-app[data-theme="light"] .stb-section-title p {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-section-title p {
    color: #fffaf0 !important;
}


/* v2.6.9 corrected breath tracker timing */
.stb-breath-svg .stb-breath-dot {
    transition:
        cx 0.08s linear,
        cy 0.08s linear,
        fill 0.25s ease,
        stroke 0.25s ease,
        filter 0.25s ease !important;
}


/* v2.6.10 force visible clean module names */
.stb-section-title,
.stb-module .stb-section-title,
.stb-panel .stb-section-title {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    align-items: center !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.stb-section-title > span:first-child {
    display: none !important;
}

.stb-section-title p,
.stb-section-title p span,
.stb-section-title [data-i18n-bg],
.stb-section-title [data-i18n-en] {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
    font-size: clamp(16px, 2vw, 19px) !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-indent: 0 !important;
    white-space: normal !important;
}

.stb-section-title p {
    margin: 0 !important;
}

.stb-app[data-theme="light"] .stb-section-title p,
.stb-app[data-theme="light"] .stb-section-title p span,
.stb-app[data-theme="light"] .stb-section-title [data-i18n-bg],
.stb-app[data-theme="light"] .stb-section-title [data-i18n-en] {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-section-title p,
.stb-app[data-theme="dark"] .stb-section-title p span,
.stb-app[data-theme="dark"] .stb-section-title [data-i18n-bg],
.stb-app[data-theme="dark"] .stb-section-title [data-i18n-en] {
    color: #fffaf0 !important;
}

/* remove leftovers only, not the text */
.stb-section-title::before,
.stb-section-title::after,
.stb-section-title p::before,
.stb-section-title p::after {
    display: none !important;
    content: none !important;
}


/* v2.6.11 hard restore visible user-facing panel names */
.stb-module > .stb-section-title,
.stb-panel > .stb-section-title,
.stb-section-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 24px !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.stb-section-title > span:first-child {
    display: none !important;
}

.stb-panel-title-text,
.stb-section-title p {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    height: auto !important;
    min-height: 24px !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-indent: 0 !important;
    white-space: normal !important;
    clip: auto !important;
    clip-path: none !important;
}

.stb-panel-title-text span,
.stb-section-title p span,
.stb-section-title [data-i18n-bg],
.stb-section-title [data-i18n-en] {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    color: inherit !important;
    font: inherit !important;
    text-indent: 0 !important;
    white-space: normal !important;
    clip: auto !important;
    clip-path: none !important;
}

.stb-app[data-theme="light"] .stb-panel-title-text,
.stb-app[data-theme="light"] .stb-section-title p,
.stb-app[data-theme="light"] .stb-section-title p span {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-panel-title-text,
.stb-app[data-theme="dark"] .stb-section-title p,
.stb-app[data-theme="dark"] .stb-section-title p span {
    color: #fffaf0 !important;
}

.stb-section-title *::before,
.stb-section-title *::after,
.stb-section-title::before,
.stb-section-title::after {
    display: none !important;
    content: none !important;
}


/* v2.7 admin menu grouping and visible language switch */
.stb-admin-wide-card {
    grid-column: 1 / -1;
}

.stb-admin-card details {
    margin: 14px 0;
    padding: 14px;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    background: #fff;
}

.stb-admin-card summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 15px;
}

.stb-translation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.stb-translation-grid label {
    margin: 0 !important;
}

.stb-translation-grid input {
    width: 100%;
    margin-top: 5px;
}

.stb-lang-option[data-lang-select="en"] {
    min-width: 64px;
}

@media (max-width: 800px) {
    .stb-translation-grid {
        grid-template-columns: 1fr;
    }
}


/* v2.7.1 force visible module names + place language next to theme */
.stb-top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.stb-theme-toggle + .stb-lang-switch {
    margin-left: 0 !important;
}

.stb-lang-switch {
    order: 2 !important;
}

.stb-theme-toggle {
    order: 1 !important;
}

.stb-top-actions [data-action="fullscreen"],
.stb-top-actions .stb-icon-button {
    order: 3 !important;
}

/* hard-visible module/panel names */
.stb-section-title,
.stb-panel .stb-section-title,
.stb-module .stb-section-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 24px !important;
    height: auto !important;
    overflow: visible !important;
}

.stb-section-title > span:first-child {
    display: none !important;
}

.stb-section-title p,
.stb-panel-title-text,
.stb-section-title p span,
.stb-section-title [data-i18n-bg],
.stb-section-title [data-i18n-en] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 22px !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    text-indent: 0 !important;
    white-space: normal !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.stb-app[data-theme="light"] .stb-section-title p,
.stb-app[data-theme="light"] .stb-panel-title-text,
.stb-app[data-theme="light"] .stb-section-title p span {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-section-title p,
.stb-app[data-theme="dark"] .stb-panel-title-text,
.stb-app[data-theme="dark"] .stb-section-title p span {
    color: #fffaf0 !important;
}

.stb-section-title::before,
.stb-section-title::after,
.stb-section-title p::before,
.stb-section-title p::after {
    display: none !important;
    content: none !important;
}

@media (max-width: 520px) {
    .stb-top-actions {
        grid-template-columns: 1fr 1fr !important;
    }

    .stb-lang-switch {
        width: auto !important;
        grid-column: auto !important;
    }
}


/* v2.8 final installable UI polish: visible module names + ENG/BG beside Light/Dark */
.stb-top-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.stb-theme-toggle {
    order: 1 !important;
}

.stb-lang-switch {
    order: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 999px !important;
    width: auto !important;
    grid-column: auto !important;
    background: rgba(120, 170, 123, 0.14) !important;
}

.stb-top-actions [data-action="fullscreen"],
.stb-top-actions .stb-icon-button {
    order: 3 !important;
}

.stb-lang-option {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 56px !important;
    min-height: 40px !important;
    border-radius: 999px !important;
    font-weight: 850 !important;
    padding: 8px 12px !important;
}

.stb-lang-option[data-lang-select="en"] {
    min-width: 70px !important;
}

/* Force user-facing module names to appear cleanly. */
.stb-section-title,
.stb-module > .stb-section-title,
.stb-panel > .stb-section-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 24px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.stb-section-title > span:first-child,
.stb-section-title::before,
.stb-section-title::after,
.stb-section-title p::before,
.stb-section-title p::after {
    display: none !important;
    content: none !important;
}

.stb-section-title p,
.stb-panel-title-text,
.stb-section-title p span,
.stb-section-title [data-i18n-bg],
.stb-section-title [data-i18n-en] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 22px !important;
    max-height: none !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    white-space: normal !important;
    font-size: clamp(16px, 2vw, 19px) !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.stb-app[data-theme="light"] .stb-section-title p,
.stb-app[data-theme="light"] .stb-panel-title-text,
.stb-app[data-theme="light"] .stb-section-title p span {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-section-title p,
.stb-app[data-theme="dark"] .stb-panel-title-text,
.stb-app[data-theme="dark"] .stb-section-title p span {
    color: #fffaf0 !important;
}

/* Cleaner card readability matching the intended dashboard direction */
.stb-panel,
.stb-stage {
    border: 1px solid rgba(31, 74, 55, 0.10) !important;
}

.stb-app[data-theme="dark"] .stb-panel,
.stb-app[data-theme="dark"] .stb-stage {
    border-color: rgba(216, 198, 155, 0.16) !important;
}

@media (max-width: 680px) {
    .stb-top-actions {
        justify-content: stretch !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }

    .stb-theme-toggle,
    .stb-lang-switch,
    .stb-top-actions [data-action="fullscreen"] {
        width: 100% !important;
    }

    .stb-lang-switch {
        justify-content: center !important;
    }
}


/* v2.8.1 real visible fallback panel labels */
.stb-panel-fallback-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 24px !important;
    width: 100% !important;
    overflow: visible !important;
    font-size: clamp(16px, 2vw, 19px) !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-indent: 0 !important;
    white-space: normal !important;
    clip: auto !important;
    clip-path: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Hide the broken/empty old title bars only; keep the new label */
.stb-section-title {
    display: none !important;
}

.stb-app[data-theme="light"] .stb-panel-fallback-title {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-panel-fallback-title {
    color: #fffaf0 !important;
}

/* Better spacing because old blank bars are gone */
.stb-panel .stb-panel-fallback-title + *,
.stb-stage .stb-panel-fallback-title + * {
    margin-top: 0 !important;
}


/* v2.8.2 clean panel names, move language button, remove central title */
.stb-section-title {
    display: none !important;
}

.stb-panel-fallback-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-size: clamp(16px, 1.7vw, 19px) !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.stb-module-stage > .stb-panel-fallback-title,
.stb-stage > .stb-panel-fallback-title,
[data-module="stage"] .stb-panel-fallback-title {
    display: none !important;
}

.stb-app[data-theme="light"] .stb-panel-fallback-title {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-panel-fallback-title {
    color: #fffaf0 !important;
}

/* remove the pale rectangular remnants from previous title styles */
.stb-section-title,
.stb-section-title *,
.stb-section-title::before,
.stb-section-title::after,
.stb-section-title *::before,
.stb-section-title *::after {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* Language control moved to bottom utility area */
.stb-bottom-tools {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.stb-lang-switch-footer {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 999px !important;
    width: auto !important;
    background: rgba(120, 170, 123, 0.14) !important;
    border: 1px solid rgba(31, 74, 55, 0.10);
}

.stb-lang-option {
    min-width: 58px !important;
    min-height: 40px !important;
    border-radius: 999px !important;
    font-weight: 850 !important;
}

.stb-lang-option[data-lang-select="en"] {
    min-width: 70px !important;
}

.stb-top-actions .stb-lang-switch {
    display: none !important;
}

@media (max-width: 680px) {
    .stb-bottom-tools {
        justify-content: stretch;
    }

    .stb-lang-switch-footer {
        width: 100% !important;
        justify-content: center !important;
    }

    .stb-lang-switch-footer .stb-lang-option {
        flex: 1;
    }
}


/* v2.8.3 final: all labels clean, side language switch, no title rectangles */
.stb-section-title,
.stb-section-title *,
.stb-section-title::before,
.stb-section-title::after,
.stb-section-title *::before,
.stb-section-title *::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* The only visible panel names are fallback titles */
.stb-panel-fallback-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    font-size: clamp(16px, 1.7vw, 19px) !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-indent: 0 !important;
    white-space: normal !important;
    clip: auto !important;
    clip-path: none !important;
}

.stb-module-stage > .stb-panel-fallback-title,
.stb-stage > .stb-panel-fallback-title,
[data-module="stage"] .stb-panel-fallback-title {
    display: none !important;
}

.stb-app[data-theme="light"] .stb-panel-fallback-title {
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-panel-fallback-title {
    color: #fffaf0 !important;
}

/* Subtle side language control */
.stb-side-language {
    position: fixed;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.58);
    border: 1px solid rgba(31, 74, 55, 0.10);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(20,45,34,0.08);
}

.stb-side-lang-btn {
    width: 38px !important;
    height: 34px !important;
    min-width: 38px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    background: transparent !important;
    color: #52635a !important;
    border: 0 !important;
    box-shadow: none !important;
}

.stb-side-lang-btn.stb-is-active,
.stb-side-lang-btn[aria-pressed="true"] {
    background: #1f4a37 !important;
    color: #fffaf0 !important;
}

.stb-app[data-theme="dark"] .stb-side-language {
    background: rgba(20, 45, 34, 0.58);
    border-color: rgba(216,198,155,0.18);
}

.stb-app[data-theme="dark"] .stb-side-lang-btn {
    color: rgba(255,250,240,0.70) !important;
}

.stb-app[data-theme="dark"] .stb-side-lang-btn.stb-is-active,
.stb-app[data-theme="dark"] .stb-side-lang-btn[aria-pressed="true"] {
    background: #d8c69b !important;
    color: #142d22 !important;
}

/* Remove old footer/top language areas if present */
.stb-bottom-tools,
.stb-top-actions .stb-lang-switch,
.stb-lang-switch-footer {
    display: none !important;
}

@media (max-width: 680px) {
    .stb-side-language {
        left: auto;
        right: 10px;
        top: auto;
        bottom: 14px;
        transform: none;
        flex-direction: row;
    }
}


/* v2.8.4 restore classic visual layout */
.stb-fullscreen {
    width: 100% !important;
    max-width: 100% !important;
}

.stb-fullscreen-compact {
    width: 100% !important;
}

/* Remove floating side language switch */
.stb-side-language {
    display: none !important;
}

/* Restore top language switch */
.stb-lang-switch {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: 8px !important;
    padding: 4px !important;
    border-radius: 999px !important;
    background: rgba(120,170,123,0.10) !important;
    border: 1px solid rgba(31,74,55,0.08) !important;
}

.stb-lang-option {
    min-width: 52px !important;
    height: 36px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.stb-lang-option[aria-pressed="true"] {
    background: #1f4a37 !important;
    color: #fffaf0 !important;
}

/* Remove forced hiding blocks from v2.8.3 */
.stb-section-title {
    display: none !important;
}

/* Keep only clean fallback labels */
.stb-panel-fallback-title {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    margin-bottom: 10px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
}

/* Restore original spacing */
.stb-shell {
    gap: 18px !important;
}

.stb-panel,
.stb-stage {
    border-radius: 26px !important;
}

/* Remove compact/fullscreen distortion */
.stb-stage {
    min-height: 620px !important;
}

@media (max-width: 680px) {
    .stb-stage {
        min-height: 520px !important;
    }
}


/* v2.8.5 language selector as admin-controlled panel */
.stb-top-actions .stb-lang-switch,
.stb-bottom-tools,
.stb-lang-switch-footer,
.stb-side-language {
    display: none !important;
}

.stb-module-language {
    display: grid;
    gap: 12px;
}

.stb-language-panel-control {
    display: flex;
    gap: 8px;
    width: 100%;
}

.stb-language-panel-control .stb-lang-option {
    flex: 1;
    min-height: 42px !important;
    border-radius: 999px !important;
    font-weight: 850 !important;
    font-size: 13px !important;
}

.stb-app[data-theme="light"] .stb-language-panel-control .stb-lang-option {
    background: #eadfc8 !important;
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-language-panel-control .stb-lang-option {
    background: rgba(255,255,255,0.12) !important;
    color: #fffaf0 !important;
}

.stb-app[data-theme="light"] .stb-language-panel-control .stb-lang-option.stb-is-active,
.stb-app[data-theme="light"] .stb-language-panel-control .stb-lang-option[aria-pressed="true"] {
    background: #1f4a37 !important;
    color: #fffaf0 !important;
}

.stb-app[data-theme="dark"] .stb-language-panel-control .stb-lang-option.stb-is-active,
.stb-app[data-theme="dark"] .stb-language-panel-control .stb-lang-option[aria-pressed="true"] {
    background: #d8c69b !important;
    color: #142d22 !important;
}

/* Keep panel headings clean without rectangles */
.stb-module-language .stb-panel-fallback-title,
.stb-panel-fallback-title {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}


/* v2.9 clean panels + visible language panel + no rectangular artifacts */
.stb-panel,
.stb-stage {
    background-clip: padding-box !important;
}

.stb-section-title,
.stb-section-title *,
.stb-section-title::before,
.stb-section-title::after,
.stb-section-title *::before,
.stb-section-title *::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.stb-panel-fallback-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    font-size: clamp(16px, 1.7vw, 19px) !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.stb-module-stage > .stb-panel-fallback-title,
.stb-stage > .stb-panel-fallback-title,
[data-module="stage"] .stb-panel-fallback-title {
    display: none !important;
}

.stb-language-panel-control {
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
}

.stb-language-panel-control .stb-lang-option {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    min-height: 42px !important;
    border-radius: 999px !important;
    font-weight: 850 !important;
    font-size: 13px !important;
}

.stb-app[data-theme="light"] .stb-language-panel-control .stb-lang-option {
    background: #eadfc8 !important;
    color: #142d22 !important;
}

.stb-app[data-theme="dark"] .stb-language-panel-control .stb-lang-option {
    background: rgba(255,255,255,0.12) !important;
    color: #fffaf0 !important;
}

.stb-app[data-theme="light"] .stb-language-panel-control .stb-lang-option.stb-is-active,
.stb-app[data-theme="light"] .stb-language-panel-control .stb-lang-option[aria-pressed="true"] {
    background: #1f4a37 !important;
    color: #fffaf0 !important;
}

.stb-app[data-theme="dark"] .stb-language-panel-control .stb-lang-option.stb-is-active,
.stb-app[data-theme="dark"] .stb-language-panel-control .stb-lang-option[aria-pressed="true"] {
    background: #d8c69b !important;
    color: #142d22 !important;
}

/* Admin grouping */
.stb-admin-card details {
    margin: 14px 0;
    padding: 14px;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    background: #fff;
}

.stb-admin-card summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 15px;
}

.stb-translation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.stb-translation-grid input {
    width: 100%;
    margin-top: 5px;
}

@media (max-width: 800px) {
    .stb-translation-grid {
        grid-template-columns: 1fr;
    }
}


/* v2.9.1 horizontal My Practice panel */
.stb-module-stats .stb-stats-grid,
.stb-module-stats .stb-stats-wrap {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: stretch !important;
}

.stb-module-stats .stb-stat-card,
.stb-module-stats .stb-stat {
    min-height: 110px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.stb-module-stats {
    width: 100% !important;
}

.stb-module-stats .stb-panel-fallback-title {
    margin-bottom: 14px !important;
}

@media (max-width: 900px) {
    .stb-module-stats .stb-stats-grid,
    .stb-module-stats .stb-stats-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .stb-module-stats .stb-stats-grid,
    .stb-module-stats .stb-stats-wrap {
        grid-template-columns: 1fr !important;
    }
}


/* Theme font inheritance patch */
.stb-app,
.stb-app *:not(.dashicons),
.stb-panel,
.stb-stage,
.stb-survey,
.stb-panel-fallback-title,
.stb-phase,
.stb-countdown,
.stb-counter,
.stb-active-status,
.stb-breath-svg text,
.stb-breath-timer,
.stb-center-counter,
.stb-center-phase,
.stb-practice-stats,
.stb-practice-stats * {
    font-family: inherit !important;
}

/* Preserve WordPress/theme typography */
.stb-app button,
.stb-app input,
.stb-app textarea,
.stb-app select {
    font: inherit !important;
}


/* Theme color customization */
.stb-app[data-theme="light"]{
    color: var(--stb-text-light,#1c2a22) !important;
}

.stb-app[data-theme="dark"]{
    color: var(--stb-text-dark,#f5f0e2) !important;
}

.stb-app .stb-primary,
.stb-app .stb-start-button,
.stb-app .stb-is-active{
    background: var(--stb-primary-color,#1f2c24) !important;
    border-color: var(--stb-primary-color,#1f2c24) !important;
}

.stb-app[data-theme="dark"] .stb-primary,
.stb-app[data-theme="dark"] .stb-start-button,
.stb-app[data-theme="dark"] .stb-is-active{
    background: var(--stb-accent-color,#cdb78a) !important;
    border-color: var(--stb-accent-color,#cdb78a) !important;
    color:#1f2c24 !important;
}

.stb-breath-dot{
    fill: var(--stb-primary-color,#1f2c24) !important;
}

.stb-app[data-theme="dark"] .stb-breath-dot{
    fill: var(--stb-accent-color,#cdb78a) !important;
}


/* Dedicated color menu */
.stb-color-menu-card details {
    margin: 14px 0;
    padding: 14px;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    background: #fff;
}

.stb-color-menu-card summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 15px;
}

.stb-color-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.stb-color-menu-grid label {
    display: grid;
    gap: 6px;
    margin: 0 !important;
    font-weight: 700;
}

.stb-color-menu-grid input[type="color"] {
    width: 100%;
    height: 44px;
    padding: 0;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    background: transparent;
}

.stb-color-menu-grid small {
    font-weight: 400;
    opacity: 0.75;
}

.stb-color-preset-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

@media (max-width: 800px) {
    .stb-color-menu-grid {
        grid-template-columns: 1fr;
    }
}


/* Background audio volume control */
.stb-volume-control-wrap{
    display:grid;
    gap:12px;
    margin-top:14px;
}

.stb-volume-range{
    width:100%;
}

.stb-volume-value{
    font-weight:700;
    opacity:.8;
}


/* User-facing background volume control */
.stb-user-volume-control {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(31, 74, 55, 0.10);
}

.stb-user-volume-control label {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.78;
}

.stb-user-background-volume {
    width: 100%;
}

.stb-user-volume-percent {
    min-width: 44px;
    text-align: right;
    font-weight: 800;
    font-size: 13px;
}

.stb-app[data-theme="dark"] .stb-user-volume-control {
    border-top-color: rgba(216, 198, 155, 0.18);
}


/* Multiple custom background music admin */
textarea[name="stb_settings[background_custom_tracks_json]"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}


/* Hide removed closed-eyes control safely */
button[data-toggle="eyes"],
.stb-toggle-list button[data-toggle="eyes"] {
    display: none !important;
}


/* Save status readability */
.stb-save-status {
    font-weight: 800;
    margin-top: 10px;
    min-height: 22px;
}

.stb-save-status{font-weight:800;margin-top:10px;min-height:22px;}


/* Remove After Practice panel */
.stb-module-after,
[data-module="after"] {
    display: none !important;
}


/* Safe audio replacement admin */
.stb-audio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.stb-audio-grid label {
    display: grid;
    gap: 6px;
    margin: 0 !important;
    font-weight: 700;
}

.stb-audio-grid input[type="url"] {
    width: 100%;
}

@media (max-width: 800px) {
    .stb-audio-grid {
        grid-template-columns: 1fr;
    }
}


/* Command voice admin fields */
.stb-audio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.stb-audio-grid label {
    display: grid;
    gap: 6px;
    margin: 0 !important;
    font-weight: 700;
}

.stb-audio-grid input[type="url"] {
    width: 100%;
}

textarea[name="stb_settings[voice_cmd_custom_json]"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 800px) {
    .stb-audio-grid {
        grid-template-columns: 1fr;
    }
}


textarea[name="stb_settings[voice_context_cues_json]"],
textarea[name="stb_settings[voice_mode_cues_json]"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}


/* Session delete manager */
.stb-session-manager-card {
    grid-column: 1 / -1;
}

.stb-session-manager-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.stb-session-manager-actions .button-danger {
    border-color: #b32d2e !important;
    color: #b32d2e !important;
}

.stb-admin-session-table-wrap {
    max-height: 460px;
    overflow: auto;
    border: 1px solid #dcdcde;
    background: #fff;
}

.stb-admin-session-table th,
.stb-admin-session-table td {
    vertical-align: middle;
}


/* v2.9.2 sessions page delete controls */
.stb-session-delete-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.stb-session-delete-tools .button-danger,
.stb-delete-row-cell .button {
    border-color: #b32d2e !important;
    color: #b32d2e !important;
}

.stb-delete-column,
.stb-delete-row-cell {
    width: 110px;
    white-space: nowrap;
}


/* v2.9.3 server-side sessions page delete */
.stb-session-delete-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.stb-session-delete-tools .button-danger,
.stb-delete-session-button {
    border-color: #b32d2e !important;
    color: #b32d2e !important;
}

.stb-sessions-table td,
.stb-sessions-table th {
    vertical-align: middle;
}


/* v2.9.5 single Sessions table */
.stb-sessions-table th:last-child,
.stb-sessions-table td:last-child {
    width: 120px;
    white-space: nowrap;
}


/* v2.9.6 Custom Sessions Admin */
.stb-csa-actions,
.stb-csa-bulk {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.stb-csa-actions .button-danger,
.stb-csa-bulk .button-danger,
.stb-csa-delete-one {
    border-color: #b32d2e !important;
    color: #b32d2e !important;
}

.stb-csa-table th,
.stb-csa-table td {
    vertical-align: middle;
}

.stb-csa-table .check-column {
    width: 38px;
}

.stb-csa-table td:last-child {
    white-space: nowrap;
}


/* v2.9.7 sessions columns and wording cleanup */
body.toplevel_page_somainterra-breathing-sessions .widefat th,
body.somainterra_page_somainterra-breathing-sessions .widefat th,
body.somainterra_page_somainterra-breathing-sessions-manager .widefat th {
    font-weight: 700;
}

body.somainterra_page_somainterra-breathing-sessions .widefat th:first-child,
body.somainterra_page_somainterra-breathing-sessions .widefat td:first-child {
    width: 70px;
    white-space: nowrap;
}

body.somainterra_page_somainterra-breathing-sessions .widefat th:nth-child(2),
body.somainterra_page_somainterra-breathing-sessions .widefat td:nth-child(2) {
    width: 160px;
    white-space: nowrap;
}

body.somainterra_page_somainterra-breathing-sessions .widefat th:nth-child(5),
body.somainterra_page_somainterra-breathing-sessions .widefat td:nth-child(5) {
    width: 120px;
    white-space: nowrap;
}

/* v3.2.0 Admin service design */
.stb-admin-modern {
    --stb-admin-bg: #f6f1e7;
    --stb-admin-card: #fffaf1;
    --stb-admin-ink: #16281f;
    --stb-admin-muted: #6e766f;
    --stb-admin-line: rgba(22,40,31,.12);
    --stb-admin-accent: #2f6b4f;
    --stb-admin-gold: #cdb78a;
}

.stb-admin-modern .stb-admin-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0 18px;
    padding: 26px 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #173426, #244b37 62%, #cdb78a);
    color: #fffaf0;
    box-shadow: 0 18px 50px rgba(22,40,31,.16);
}

.stb-admin-modern .stb-admin-hero h1 {
    margin: 0;
    color: #fffaf0;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.stb-admin-modern .stb-admin-hero p {
    max-width: 760px;
    margin: 8px 0 0;
    color: rgba(255,250,240,.82);
    font-size: 15px;
}

.stb-admin-modern .stb-admin-kicker {
    margin: 0 0 8px !important;
    color: #d8c69b !important;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: 11px !important;
    font-weight: 700;
}

.stb-admin-modern .stb-admin-hero-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 240px;
}

.stb-admin-modern .stb-admin-hero-actions code {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.14);
    color: #fffaf0;
}

.stb-admin-service-strip,
.stb-admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.stb-admin-service-strip div,
.stb-admin-kpi-grid div,
.stb-admin-meta-card {
    padding: 16px;
    border: 1px solid var(--stb-admin-line);
    border-radius: 18px;
    background: var(--stb-admin-card);
    box-shadow: 0 10px 28px rgba(22,40,31,.06);
}

.stb-admin-service-strip strong,
.stb-admin-kpi-grid strong {
    display: block;
    color: var(--stb-admin-accent);
    font-size: 24px;
    line-height: 1;
}

.stb-admin-service-strip span,
.stb-admin-kpi-grid span,
.stb-admin-meta-card span {
    display: block;
    margin-top: 6px;
    color: var(--stb-admin-muted);
    font-size: 13px;
}

.stb-admin-modern .stb-admin-card {
    border: 1px solid var(--stb-admin-line);
    border-radius: 18px;
    background: var(--stb-admin-card);
    box-shadow: 0 10px 28px rgba(22,40,31,.06);
}

.stb-admin-modern .stb-admin-card h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--stb-admin-line);
    color: var(--stb-admin-ink);
}

.stb-admin-modern .stb-admin-card label {
    margin-top: 12px;
    font-weight: 650;
    color: var(--stb-admin-ink);
}

.stb-admin-modern input[type="text"],
.stb-admin-modern input[type="url"],
.stb-admin-modern input[type="number"],
.stb-admin-modern select,
.stb-admin-modern textarea {
    border-color: rgba(22,40,31,.18);
    border-radius: 10px;
}

.stb-csa-wrap .stb-csa-actions,
.stb-csa-wrap .stb-csa-bulk {
    gap: 10px;
    margin: 14px 0;
}

.stb-csa-wrap .stb-csa-table {
    overflow: hidden;
    border: 1px solid var(--stb-admin-line);
    border-radius: 16px;
    background: #fffaf1;
    box-shadow: 0 10px 28px rgba(22,40,31,.06);
}

.stb-csa-wrap .stb-csa-table th {
    background: #f1eadb;
    color: #172820;
    font-weight: 700;
}

.stb-csa-wrap .stb-csa-table td,
.stb-csa-wrap .stb-csa-table th {
    padding: 12px 10px;
    vertical-align: middle;
}

@media (max-width: 960px) {
    .stb-admin-modern .stb-admin-hero {
        flex-direction: column;
    }
    .stb-admin-service-strip,
    .stb-admin-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .stb-admin-service-strip,
    .stb-admin-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Breath Compass Admin Workflow v3.3.1 */
.stb-dashboard-wrap .stb-admin-hero,
.stb-admin-modern .stb-admin-hero {
    border-radius: 22px;
    padding: 28px;
    background: linear-gradient(135deg, #173d2b 0%, #315f47 55%, #bda56c 100%);
    color: #fff;
    box-shadow: 0 18px 42px rgba(23, 61, 43, .18);
}
.stb-admin-modern .stb-admin-hero h1 { color: #fff; font-size: 30px; margin: 4px 0 8px; }
.stb-admin-modern .stb-admin-hero p { color: rgba(255,255,255,.86); max-width: 720px; }
.stb-admin-modern .stb-admin-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; margin: 0; }
.stb-admin-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stb-admin-hero-actions code { background: rgba(255,255,255,.92); color: #173d2b; border-radius: 999px; padding: 8px 12px; }
.stb-admin-tabs { position: sticky; top: 32px; z-index: 20; display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; padding: 10px; background: rgba(246, 242, 232, .92); backdrop-filter: blur(10px); border: 1px solid rgba(37, 67, 50, .12); border-radius: 18px; }
.stb-admin-tab { border: 1px solid rgba(37, 67, 50, .14); background: #fffaf0; color: #294733; border-radius: 999px; padding: 10px 14px; cursor: pointer; font-weight: 650; }
.stb-admin-tab.is-active { background: #244b36; border-color: #244b36; color: #fff; }
.stb-admin-panel { display: none; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.stb-admin-panel.is-active { display: grid; }
.stb-admin-panel .stb-admin-card { grid-column: span 6; margin: 0; }
.stb-admin-panel .stb-admin-wide-card,
.stb-admin-panel .stb-shortcode-card { grid-column: 1 / -1; }
.stb-admin-modern .stb-admin-card { border: 1px solid rgba(37, 67, 50, .11); border-radius: 18px; padding: 18px; background: #fffaf1; box-shadow: 0 10px 28px rgba(31, 44, 36, .06); }
.stb-admin-modern .stb-admin-card h2 { margin-top: 0; color: #1f3f2e; font-size: 18px; }
.stb-admin-modern label { font-weight: 600; color: #263f30; }
.stb-admin-modern input[type="text"],
.stb-admin-modern input[type="url"],
.stb-admin-modern input[type="number"],
.stb-admin-modern select,
.stb-admin-modern textarea { border-color: rgba(37, 67, 50, .18); border-radius: 10px; min-height: 36px; }
.stb-admin-modern input:focus,
.stb-admin-modern select:focus,
.stb-admin-modern textarea:focus { border-color: #2f6b4a; box-shadow: 0 0 0 1px #2f6b4a; }
.stb-smart-details { border: 1px solid rgba(37, 67, 50, .12); border-radius: 14px; background: #fff; margin: 10px 0; padding: 8px 12px; }
.stb-smart-details summary { cursor: pointer; font-weight: 700; color: #244b36; }
.stb-dashboard-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stb-dashboard-kpi { background: #fffaf1; border: 1px solid rgba(37, 67, 50, .12); border-radius: 18px; padding: 18px; box-shadow: 0 10px 28px rgba(31, 44, 36, .06); }
.stb-dashboard-kpi span { display: block; color: #637366; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.stb-dashboard-kpi strong { display: block; margin-top: 8px; color: #1f3f2e; font-size: 24px; line-height: 1.1; }
.stb-dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.stb-dashboard-card { grid-column: span 6; }
.stb-dashboard-wide { grid-column: 1 / -1; }
.stb-quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stb-health-list { margin: 0; display: grid; gap: 8px; }
.stb-dashboard-table th { font-weight: 700; }
@media (max-width: 1200px) {
    .stb-dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stb-admin-panel .stb-admin-card,
    .stb-dashboard-card { grid-column: 1 / -1; }
}
@media (max-width: 782px) {
    .stb-admin-tabs { top: 46px; }
    .stb-dashboard-kpis { grid-template-columns: 1fr; }
}

/* Breath Compass Product Admin v3.3.3 */
.stb-dashboard-kpis-v333 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stb-recommendations-card { grid-column: span 6; }
.stb-recommendation-list { display: grid; gap: 10px; }
.stb-recommendation-list div { display: flex; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid rgba(37,67,50,.12); border-radius: 12px; background: #fff; }
.stb-recommendation-list strong { color: #173d2b; }
.stb-recommendation-list span { color: #59675d; text-align: right; }
.stb-live-preview-card { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(260px,.9fr); gap: 18px; align-items: center; margin: 18px 0; padding: 20px; border: 1px solid rgba(37,67,50,.12); border-radius: 22px; background: linear-gradient(135deg, #fffaf1 0%, #f2eadb 100%); box-shadow: 0 12px 30px rgba(31,44,36,.06); }
.stb-live-preview-card h2 { margin: 4px 0 8px; color: #173d2b; font-size: 24px; }
.stb-preview-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stb-preview-buttons span { border-radius: 999px; background: #244b36; color: #fff; padding: 8px 12px; font-weight: 700; }
.stb-preview-orbit { justify-self: center; width: 190px; height: 190px; border: 1px dashed rgba(37,67,50,.25); border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.65); }
.stb-preview-shape { width: 92px; height: 92px; border-radius: 50%; background: #cdb78a; box-shadow: 0 14px 28px rgba(31,44,36,.14); }
.stb-floating-save { position: fixed; right: 28px; bottom: 24px; z-index: 9999; display: flex; gap: 8px; padding: 10px; background: rgba(255,250,241,.96); border: 1px solid rgba(37,67,50,.15); border-radius: 999px; box-shadow: 0 12px 30px rgba(31,44,36,.18); }
.stb-session-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; margin: 16px 0; padding: 14px; border: 1px solid rgba(37,67,50,.12); border-radius: 16px; background: #fffaf1; }
.stb-session-filters label { display: grid; gap: 5px; font-weight: 700; color: #263f30; }
.stb-session-filters input { width: 100%; border-radius: 8px; border-color: rgba(37,67,50,.18); }
@media (max-width: 1200px) { .stb-dashboard-kpis-v333 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stb-session-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 782px) { .stb-live-preview-card { grid-template-columns: 1fr; } .stb-floating-save { left: 12px; right: 12px; justify-content: center; } .stb-session-filters { grid-template-columns: 1fr; } }

/* Admin color theme options */
.stb-theme-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.stb-theme-card {
    border: 1px solid rgba(31, 44, 36, 0.16);
    border-radius: 16px;
    background: #fffdf6;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.stb-theme-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(31, 44, 36, 0.10);
}
.stb-theme-card.is-active {
    border-color: #1f2c24;
    box-shadow: 0 0 0 3px rgba(31, 44, 36, 0.16);
}
.stb-theme-card-title {
    display: block;
    font-weight: 800;
    color: #143326;
    margin-bottom: 4px;
}
.stb-theme-card-desc {
    display: block;
    color: #5d685f;
    min-height: 34px;
    font-size: 12px;
    line-height: 1.35;
}
.stb-theme-swatches {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}
.stb-theme-swatches i {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    border: 1px solid rgba(0,0,0,.12);
}
@media (max-width: 1280px) {
    .stb-theme-options { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
@media (max-width: 782px) {
    .stb-theme-options { grid-template-columns: 1fr; }
}

/* v3.3.5 stable color save and next workflow improvements */
.stb-color-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stb-theme-card.is-active::after { content: 'Избрана'; position: absolute; right: 10px; top: 10px; font-size: 11px; font-weight: 800; color: #1f4b35; background: #f5f0e2; border: 1px solid rgba(31,75,53,.18); border-radius: 999px; padding: 3px 8px; }
.stb-theme-card { position: relative; }
.stb-floating-save .stb-save-state { align-self: center; padding: 0 8px; font-size: 12px; color: #244b36; opacity: .85; }
.stb-admin-modern input[type="color"] { min-height: 42px; cursor: pointer; }


/* v3.4.0 Color Application Fix
   The selected palette now controls the real frontend UI, not only the active buttons. */
.stb-app {
    --stb-ui-primary: var(--stb-primary-color, #1f2c24);
    --stb-ui-accent: var(--stb-accent-color, #cdb78a);
    --stb-ui-text-light: var(--stb-text-light, #1c2a22);
    --stb-ui-text-dark: var(--stb-text-dark, #f5f0e2);
    --stb-ui-panel-light: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 12%, #ffffff 88%);
    --stb-ui-panel-dark: color-mix(in srgb, var(--stb-primary-color, #1f2c24) 68%, #000000 32%);
    --stb-ui-soft-light: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 28%, #ffffff 72%);
    --stb-ui-soft-dark: color-mix(in srgb, var(--stb-primary-color, #1f2c24) 82%, #ffffff 18%);
    --stb-ui-line-light: color-mix(in srgb, var(--stb-primary-color, #1f2c24) 18%, transparent);
    --stb-ui-line-dark: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 22%, transparent);
}

.stb-app[data-theme="light"] {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--stb-accent-color, #cdb78a) 10%, #ffffff 90%),
        color-mix(in srgb, var(--stb-accent-color, #cdb78a) 35%, #ffffff 65%)
    ) !important;
    color: var(--stb-text-light, #1c2a22) !important;
    box-shadow: 0 24px 80px color-mix(in srgb, var(--stb-primary-color, #1f2c24) 18%, transparent) !important;
}

.stb-app[data-theme="dark"] {
    background: radial-gradient(circle at center,
        color-mix(in srgb, var(--stb-primary-color, #1f2c24) 82%, #ffffff 18%) 0%,
        color-mix(in srgb, var(--stb-primary-color, #1f2c24) 82%, #000000 18%) 74%
    ) !important;
    color: var(--stb-text-dark, #f5f0e2) !important;
}

.stb-app[data-theme="light"],
.stb-app[data-theme="light"] *:not(button):not(input):not(textarea):not(select):not(option) {
    color: var(--stb-text-light, #1c2a22) !important;
}

.stb-app[data-theme="dark"],
.stb-app[data-theme="dark"] *:not(button):not(input):not(textarea):not(select):not(option) {
    color: var(--stb-text-dark, #f5f0e2) !important;
}

.stb-app[data-theme="light"] .stb-intro,
.stb-app[data-theme="light"] .stb-subtle-text,
.stb-app[data-theme="light"] .stb-section-title p,
.stb-app[data-theme="light"] .stb-eyebrow,
.stb-app[data-theme="light"] .stb-note,
.stb-app[data-theme="light"] .stb-save-status,
.stb-app[data-theme="light"] .stb-practice-stats small,
.stb-app[data-theme="light"] .stb-access-banner span {
    color: color-mix(in srgb, var(--stb-text-light, #1c2a22) 74%, #ffffff 26%) !important;
}

.stb-app[data-theme="dark"] .stb-intro,
.stb-app[data-theme="dark"] .stb-subtle-text,
.stb-app[data-theme="dark"] .stb-section-title p,
.stb-app[data-theme="dark"] .stb-eyebrow,
.stb-app[data-theme="dark"] .stb-note,
.stb-app[data-theme="dark"] .stb-save-status,
.stb-app[data-theme="dark"] .stb-practice-stats small,
.stb-app[data-theme="dark"] .stb-access-banner span {
    color: color-mix(in srgb, var(--stb-text-dark, #f5f0e2) 76%, transparent) !important;
}

.stb-app[data-theme="light"] .stb-shell {
    border-color: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 45%, transparent) !important;
}

.stb-app[data-theme="dark"] .stb-shell {
    border-color: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 35%, transparent) !important;
}

.stb-app[data-theme="light"] .stb-panel,
.stb-app[data-theme="light"] .stb-stage,
.stb-app[data-theme="light"] .stb-survey,
.stb-app[data-theme="light"] .stb-recommendation,
.stb-app[data-theme="light"] .stb-note,
.stb-app[data-theme="light"] .stb-save-status,
.stb-app[data-theme="light"] .stb-practice-stats div {
    background: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 10%, #ffffff 90%) !important;
    border-color: color-mix(in srgb, var(--stb-primary-color, #1f2c24) 16%, transparent) !important;
}

.stb-app[data-theme="dark"] .stb-panel,
.stb-app[data-theme="dark"] .stb-stage,
.stb-app[data-theme="dark"] .stb-survey,
.stb-app[data-theme="dark"] .stb-recommendation,
.stb-app[data-theme="dark"] .stb-note,
.stb-app[data-theme="dark"] .stb-save-status,
.stb-app[data-theme="dark"] .stb-practice-stats div {
    background: color-mix(in srgb, var(--stb-primary-color, #1f2c24) 72%, #000000 28%) !important;
    border-color: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 20%, transparent) !important;
}

.stb-app[data-theme="light"] button,
.stb-app[data-theme="light"] .stb-icon-button,
.stb-app[data-theme="light"] .stb-state-grid button,
.stb-app[data-theme="light"] .stb-mode-list button,
.stb-app[data-theme="light"] .stb-toggle-list button,
.stb-app[data-theme="light"] .stb-after-grid button,
.stb-app[data-theme="light"] .stb-survey-options button,
.stb-app[data-theme="light"] .stb-secondary-controls button,
.stb-app[data-theme="light"] select {
    background: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 40%, #ffffff 60%) !important;
    color: var(--stb-text-light, #1c2a22) !important;
    border-color: color-mix(in srgb, var(--stb-primary-color, #1f2c24) 18%, transparent) !important;
}

.stb-app[data-theme="dark"] button,
.stb-app[data-theme="dark"] .stb-icon-button,
.stb-app[data-theme="dark"] .stb-state-grid button,
.stb-app[data-theme="dark"] .stb-mode-list button,
.stb-app[data-theme="dark"] .stb-toggle-list button,
.stb-app[data-theme="dark"] .stb-after-grid button,
.stb-app[data-theme="dark"] .stb-survey-options button,
.stb-app[data-theme="dark"] .stb-secondary-controls button,
.stb-app[data-theme="dark"] select {
    background: color-mix(in srgb, var(--stb-primary-color, #1f2c24) 70%, #ffffff 30%) !important;
    color: var(--stb-text-dark, #f5f0e2) !important;
    border-color: color-mix(in srgb, var(--stb-accent-color, #cdb78a) 20%, transparent) !important;
}

.stb-app .stb-primary,
.stb-app .stb-start-button,
.stb-app .stb-is-active,
.stb-app .stb-selected,
.stb-app .stb-survey .stb-primary {
    background: var(--stb-primary-color, #1f2c24) !important;
    border-color: var(--stb-primary-color, #1f2c24) !important;
    color: var(--stb-text-dark, #f5f0e2) !important;
}

.stb-app[data-theme="dark"] .stb-primary,
.stb-app[data-theme="dark"] .stb-start-button,
.stb-app[data-theme="dark"] .stb-is-active,
.stb-app[data-theme="dark"] .stb-selected,
.stb-app[data-theme="dark"] .stb-survey .stb-primary {
    background: var(--stb-accent-color, #cdb78a) !important;
    border-color: var(--stb-accent-color, #cdb78a) !important;
    color: var(--stb-text-light, #1c2a22) !important;
}

.stb-app .stb-progress div,
.stb-app .stb-breath-dot,
.stb-app .stb-circle,
.stb-app .stb-square,
.stb-app .stb-triangle {
    fill: var(--stb-primary-color, #1f2c24) !important;
    background-color: var(--stb-primary-color, #1f2c24) !important;
    border-color: var(--stb-primary-color, #1f2c24) !important;
}

.stb-app[data-theme="dark"] .stb-progress div,
.stb-app[data-theme="dark"] .stb-breath-dot,
.stb-app[data-theme="dark"] .stb-circle,
.stb-app[data-theme="dark"] .stb-square,
.stb-app[data-theme="dark"] .stb-triangle {
    fill: var(--stb-accent-color, #cdb78a) !important;
    background-color: var(--stb-accent-color, #cdb78a) !important;
    border-color: var(--stb-accent-color, #cdb78a) !important;
}

.stb-app textarea,
.stb-app input,
.stb-app select {
    border-color: color-mix(in srgb, var(--stb-primary-color, #1f2c24) 18%, transparent) !important;
}

/* Admin preview now follows palette instantly. */
.stb-live-preview-card {
    --stb-preview-primary: var(--stb-admin-preview-primary, #1f2c24);
    --stb-preview-accent: var(--stb-admin-preview-accent, #cdb78a);
}
.stb-live-preview-card .stb-preview-buttons span {
    background: var(--stb-admin-preview-primary, #1f2c24) !important;
}
.stb-live-preview-card .stb-preview-shape {
    background: var(--stb-admin-preview-accent, #cdb78a) !important;
}


/* v3.4.2 UI cleanup: remove empty fallback bars above panels. */
.stb-app .stb-panel-fallback-title {
    display: none !important;
}
.stb-app .stb-section-title {
    margin-top: 0 !important;
}

/* Cleaner selected cards and right-panel rows. */
.stb-app .stb-state-grid button.active,
.stb-app .stb-mode-list button.active {
    position: relative;
}
.stb-app .stb-state-grid button.active::after,
.stb-app .stb-mode-list button.active::after {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    margin-left: 8px;
    background: var(--stb-primary, #143b2b);
    color: #fff;
    font-weight: 800;
}

/* Keep keyboard shortcuts from being visually dominant. */
.stb-app .stb-keyboard-help,
.stb-app .stb-helper-card {
    opacity: .92;
}


/* v3.4.3 frontend UI cleanup
   Remove the meaningless empty category bars above the state, rhythm and accessibility panels. */
.stb-app .stb-section-title,
.stb-app .stb-section-title:empty,
.stb-app .stb-section-title:has(.stb-panel-title-text span:empty),
.stb-app .stb-section-title:has(.stb-panel-title-text:empty) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.stb-app .stb-panel-fallback-title {
    display: block !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    font-size: clamp(18px, 2.4vw, 24px) !important;
    line-height: 1.15 !important;
    font-weight: 850 !important;
    color: var(--stb-text-light, #143326) !important;
}
.stb-app[data-theme="dark"] .stb-panel-fallback-title {
    color: var(--stb-text-dark, #f5f0e2) !important;
}
.stb-app .stb-panel-title-text,
.stb-app .stb-panel-title-text span {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.stb-app .stb-module-state,
.stb-app .stb-module-modes,
.stb-app .stb-module-accessibility {
    overflow: hidden;
}


/* v3.4.4: hard remove empty title rows on frontend. */
.stb-app .stb-section-title:empty,
.stb-app .stb-section-title:has(.stb-panel-title-text:empty),
.stb-app .stb-section-title:has(.stb-panel-title-text span:empty),
.stb-app .stb-section-title:has(p:empty) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
    box-shadow: none !important;
}
.stb-app .stb-section-title .stb-panel-title-text:empty,
.stb-app .stb-section-title .stb-panel-title-text span:empty,
.stb-app .stb-section-title p:empty {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}


/* v3.4.5 cleanup: hide empty title bars and empty translated spans in frontend. */
.stb-app .stb-section-title:empty,
.stb-app .stb-panel-title-text:empty,
.stb-app .stb-section-title span:empty,
.stb-app .stb-panel-fallback-title:empty {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.stb-app .stb-section-title:has(.stb-panel-title-text:empty),
.stb-app .stb-section-title:has(span:empty) {
    display: none !important;
}

/* v3.4.6 intelligent progress insights */
.stb-progress-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.stb-insight-card {
    border: 1px solid color-mix(in srgb, var(--stb-primary, #123527) 14%, transparent);
    background: color-mix(in srgb, var(--stb-panel, #fffaf0) 82%, #fff 18%);
    border-radius: 16px;
    padding: 12px;
    min-height: 86px;
}
.stb-insight-card small,
.stb-effect-breakdown-title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--stb-primary, #123527) 76%, #fff 24%);
    margin-bottom: 6px;
}
.stb-insight-card strong {
    display: block;
    font-size: 22px;
    line-height: 1.15;
    color: var(--stb-primary, #123527);
    margin-bottom: 4px;
}
.stb-insight-card span {
    display: block;
    font-size: 12px;
    color: color-mix(in srgb, var(--stb-primary, #123527) 62%, #fff 38%);
}
.stb-effect-breakdown {
    margin-top: 12px;
    border: 1px solid color-mix(in srgb, var(--stb-primary, #123527) 12%, transparent);
    border-radius: 16px;
    padding: 12px;
    background: color-mix(in srgb, var(--stb-panel, #fffaf0) 88%, #fff 12%);
}
.stb-effect-list {
    display: grid;
    gap: 7px;
    font-size: 13px;
}
.stb-effect-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--stb-accent, #cdb78a) 12%, #fff 88%);
}
.stb-effect-row strong {
    color: var(--stb-primary, #123527);
}
@media (max-width: 780px) {
    .stb-progress-insights { grid-template-columns: 1fr; }
}


/* v3.5.2 Insight Cards Dark Fix */
.stb-app[data-theme="dark"] .stb-insight-card{
    background:#123026 !important;
    color:#f5f0e2 !important;
    border:1px solid rgba(201,181,137,.20) !important;
}

.stb-app[data-theme="dark"] .stb-insight-card small,
.stb-app[data-theme="dark"] .stb-insight-card span{
    color:#c9d9c8 !important;
}

.stb-app[data-theme="dark"] .stb-insight-card strong{
    color:#ffffff !important;
}

.stb-app[data-theme="dark"] .stb-progress-insights{
    background:transparent !important;
}

.stb-app[data-theme="dark"] .stb-effect-breakdown{
    background:#123026 !important;
    color:#f5f0e2 !important;
    border:1px solid rgba(201,181,137,.20) !important;
}

.stb-app[data-theme="dark"] .stb-effect-breakdown *{
    color:#f5f0e2 !important;
}


/* v3.5.3 Effect Rows Dark Fix
   Precise dark mode fixes for My Practice, insight cards and before/after rows. */
.stb-app[data-theme="dark"] .stb-effect-list,
.stb-app[data-theme="dark"] #stb-effect-list{
    background:transparent !important;
    color:#f5f0e2 !important;
}

.stb-app[data-theme="dark"] .stb-effect-row{
    background:linear-gradient(145deg, rgba(23,55,44,.98), rgba(11,36,28,.98)) !important;
    border:1px solid rgba(201,181,137,.18) !important;
    color:#f5f0e2 !important;
    box-shadow:none !important;
}

.stb-app[data-theme="dark"] .stb-effect-row,
.stb-app[data-theme="dark"] .stb-effect-row *,
.stb-app[data-theme="dark"] .stb-effect-row span,
.stb-app[data-theme="dark"] .stb-effect-row small,
.stb-app[data-theme="dark"] .stb-effect-row div{
    color:#f5f0e2 !important;
    opacity:1 !important;
}

.stb-app[data-theme="dark"] .stb-effect-row strong,
.stb-app[data-theme="dark"] .stb-effect-row b,
.stb-app[data-theme="dark"] .stb-effect-row .stb-effect-value{
    color:#ffffff !important;
    opacity:1 !important;
}

.stb-app[data-theme="dark"] .stb-effect-row .stb-effect-before,
.stb-app[data-theme="dark"] .stb-effect-row .stb-effect-after,
.stb-app[data-theme="dark"] .stb-effect-row .stb-effect-arrow{
    color:#b9f18f !important;
}

.stb-app[data-theme="dark"] .stb-effect-breakdown{
    background:linear-gradient(145deg, rgba(18,48,38,.96), rgba(8,31,24,.96)) !important;
    border:1px solid rgba(201,181,137,.20) !important;
    color:#f5f0e2 !important;
}

.stb-app[data-theme="dark"] .stb-effect-breakdown-title{
    color:#b9f18f !important;
    opacity:1 !important;
}

.stb-app[data-theme="dark"] .stb-insight-card{
    background:linear-gradient(145deg, rgba(23,55,44,.98), rgba(11,36,28,.98)) !important;
    border:1px solid rgba(201,181,137,.18) !important;
    color:#f5f0e2 !important;
    box-shadow:none !important;
}

.stb-app[data-theme="dark"] .stb-insight-card,
.stb-app[data-theme="dark"] .stb-insight-card *,
.stb-app[data-theme="dark"] .stb-insight-card span,
.stb-app[data-theme="dark"] .stb-insight-card small,
.stb-app[data-theme="dark"] .stb-insight-card div{
    color:#f5f0e2 !important;
    opacity:1 !important;
}

.stb-app[data-theme="dark"] .stb-insight-card strong,
.stb-app[data-theme="dark"] .stb-insight-card b,
.stb-app[data-theme="dark"] .stb-insight-card .stb-stat-value{
    color:#ffffff !important;
    opacity:1 !important;
}

.stb-app[data-theme="dark"] .stb-insight-card small,
.stb-app[data-theme="dark"] .stb-effect-row small,
.stb-app[data-theme="dark"] .stb-insight-card .stb-stat-meta,
.stb-app[data-theme="dark"] .stb-effect-row .stb-stat-meta{
    color:rgba(245,240,226,.82) !important;
    opacity:1 !important;
}

.stb-app[data-theme="dark"] .stb-progress-insights{
    background:transparent !important;
}

.stb-app[data-theme="dark"] .stb-practice-stats,
.stb-app[data-theme="dark"] .stb-module-stats{
    color:#f5f0e2 !important;
}

.stb-app[data-theme="dark"] .stb-practice-stats *,
.stb-app[data-theme="dark"] .stb-module-stats *{
    opacity:1;
}

/* Stronger readability for the three main insight cards */
.stb-app[data-theme="dark"] .stb-insight-card strong{
    font-size:1.12em;
    line-height:1.15;
}

.stb-app[data-theme="dark"] .stb-insight-card small{
    font-size:.82rem;
    line-height:1.35;
}

@media (max-width:768px){
    .stb-app[data-theme="dark"] .stb-insight-card{
        min-height:96px;
    }
    .stb-app[data-theme="dark"] .stb-effect-row{
        min-height:38px;
    }
}


/* v3.5.4 Mobile Menu Desktop Style
   Makes the mobile breathing rhythm menu visually match the desktop cards. */
@media (max-width: 768px){
    .stb-app .stb-mode-list,
    .stb-app .stb-rhythm-list,
    .stb-app .stb-breath-menu,
    .stb-app .stb-pattern-list{
        display:flex !important;
        flex-direction:column !important;
        gap:10px !important;
    }

    .stb-app .stb-mode-list button,
    .stb-app .stb-rhythm-list button,
    .stb-app .stb-breath-menu button,
    .stb-app .stb-pattern-list button,
    .stb-app .stb-pattern-card,
    .stb-app .stb-rhythm-card{
        display:grid !important;
        grid-template-columns:44px minmax(0,1fr) auto !important;
        grid-template-areas:
            "icon title value"
            "icon meta value" !important;
        align-items:center !important;
        gap:3px 12px !important;
        width:100% !important;
        min-height:72px !important;
        padding:14px 14px !important;
        border-radius:16px !important;
        text-align:left !important;
        overflow:hidden !important;
    }

    .stb-app .stb-mode-list button .stb-icon,
    .stb-app .stb-mode-list button .stb-mode-icon,
    .stb-app .stb-rhythm-list button .stb-icon,
    .stb-app .stb-rhythm-list button .stb-mode-icon,
    .stb-app .stb-breath-menu button .stb-icon,
    .stb-app .stb-pattern-list button .stb-icon,
    .stb-app .stb-pattern-card .stb-icon,
    .stb-app .stb-rhythm-card .stb-icon{
        grid-area:icon !important;
        width:44px !important;
        height:44px !important;
        min-width:44px !important;
        border-radius:999px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
    }

    .stb-app .stb-mode-list button .stb-mode-name,
    .stb-app .stb-mode-list button strong,
    .stb-app .stb-rhythm-list button .stb-mode-name,
    .stb-app .stb-rhythm-list button strong,
    .stb-app .stb-breath-menu button strong,
    .stb-app .stb-pattern-list button strong,
    .stb-app .stb-pattern-card strong,
    .stb-app .stb-rhythm-card strong{
        grid-area:title !important;
        display:block !important;
        min-width:0 !important;
        white-space:normal !important;
        overflow:visible !important;
        text-overflow:clip !important;
        line-height:1.18 !important;
        font-size:15px !important;
        font-weight:800 !important;
    }

    .stb-app .stb-mode-list button .stb-mode-meta,
    .stb-app .stb-mode-list button small,
    .stb-app .stb-rhythm-list button .stb-mode-meta,
    .stb-app .stb-rhythm-list button small,
    .stb-app .stb-breath-menu button small,
    .stb-app .stb-pattern-list button small,
    .stb-app .stb-pattern-card small,
    .stb-app .stb-rhythm-card small{
        grid-area:meta !important;
        display:block !important;
        min-width:0 !important;
        line-height:1.25 !important;
        font-size:12px !important;
        opacity:.86 !important;
        white-space:normal !important;
    }

    .stb-app .stb-mode-list button .stb-rhythm,
    .stb-app .stb-mode-list button .stb-seconds,
    .stb-app .stb-mode-list button .stb-pattern,
    .stb-app .stb-rhythm-list button .stb-rhythm,
    .stb-app .stb-rhythm-list button .stb-seconds,
    .stb-app .stb-rhythm-list button .stb-pattern,
    .stb-app .stb-breath-menu button .stb-rhythm,
    .stb-app .stb-breath-menu button .stb-seconds,
    .stb-app .stb-pattern-list button .stb-rhythm,
    .stb-app .stb-pattern-list button .stb-seconds,
    .stb-app .stb-pattern-card .stb-rhythm,
    .stb-app .stb-pattern-card .stb-seconds,
    .stb-app .stb-rhythm-card .stb-rhythm,
    .stb-app .stb-rhythm-card .stb-seconds{
        grid-area:value !important;
        display:flex !important;
        flex-direction:column !important;
        justify-content:center !important;
        align-items:flex-end !important;
        min-width:54px !important;
        max-width:82px !important;
        text-align:right !important;
        white-space:nowrap !important;
        line-height:1.05 !important;
        font-weight:900 !important;
    }

    .stb-app .stb-mode-list button .stb-seconds small,
    .stb-app .stb-rhythm-list button .stb-seconds small,
    .stb-app .stb-pattern-card .stb-seconds small{
        font-size:11px !important;
        line-height:1.1 !important;
        margin-top:2px !important;
    }

    .stb-app[data-theme="dark"] .stb-mode-list button,
    .stb-app[data-theme="dark"] .stb-rhythm-list button,
    .stb-app[data-theme="dark"] .stb-breath-menu button,
    .stb-app[data-theme="dark"] .stb-pattern-list button,
    .stb-app[data-theme="dark"] .stb-pattern-card,
    .stb-app[data-theme="dark"] .stb-rhythm-card{
        background:linear-gradient(145deg, rgba(23,55,44,.98), rgba(11,36,28,.98)) !important;
        border:1px solid rgba(201,181,137,.18) !important;
        color:#f5f0e2 !important;
        box-shadow:0 12px 28px rgba(0,0,0,.18) !important;
    }

    .stb-app[data-theme="dark"] .stb-mode-list button:hover,
    .stb-app[data-theme="dark"] .stb-rhythm-list button:hover,
    .stb-app[data-theme="dark"] .stb-breath-menu button:hover,
    .stb-app[data-theme="dark"] .stb-pattern-list button:hover{
        border-color:rgba(185,241,143,.42) !important;
        background:linear-gradient(145deg, rgba(31,72,56,.98), rgba(14,42,33,.98)) !important;
    }

    .stb-app[data-theme="dark"] .stb-mode-list button.is-active,
    .stb-app[data-theme="dark"] .stb-mode-list button.active,
    .stb-app[data-theme="dark"] .stb-rhythm-list button.is-active,
    .stb-app[data-theme="dark"] .stb-rhythm-list button.active,
    .stb-app[data-theme="dark"] .stb-breath-menu button.is-active,
    .stb-app[data-theme="dark"] .stb-breath-menu button.active,
    .stb-app[data-theme="dark"] .stb-pattern-list button.is-active,
    .stb-app[data-theme="dark"] .stb-pattern-list button.active,
    .stb-app[data-theme="dark"] .stb-pattern-card.is-active,
    .stb-app[data-theme="dark"] .stb-rhythm-card.is-active{
        border-color:#9adf75 !important;
        background:linear-gradient(145deg, rgba(39,84,63,.98), rgba(18,52,40,.98)) !important;
        box-shadow:0 0 0 1px rgba(154,223,117,.2), 0 14px 34px rgba(0,0,0,.22) !important;
    }

    .stb-app[data-theme="dark"] .stb-mode-list button *,
    .stb-app[data-theme="dark"] .stb-rhythm-list button *,
    .stb-app[data-theme="dark"] .stb-breath-menu button *,
    .stb-app[data-theme="dark"] .stb-pattern-list button *,
    .stb-app[data-theme="dark"] .stb-pattern-card *,
    .stb-app[data-theme="dark"] .stb-rhythm-card *{
        color:inherit !important;
        opacity:1 !important;
    }

    .stb-app[data-theme="dark"] .stb-mode-list button strong,
    .stb-app[data-theme="dark"] .stb-rhythm-list button strong,
    .stb-app[data-theme="dark"] .stb-breath-menu button strong,
    .stb-app[data-theme="dark"] .stb-pattern-list button strong{
        color:#ffffff !important;
    }

    .stb-app[data-theme="dark"] .stb-mode-list button small,
    .stb-app[data-theme="dark"] .stb-rhythm-list button small,
    .stb-app[data-theme="dark"] .stb-breath-menu button small,
    .stb-app[data-theme="dark"] .stb-pattern-list button small{
        color:rgba(245,240,226,.82) !important;
    }

    .stb-app[data-theme="dark"] .stb-mode-list button .stb-rhythm,
    .stb-app[data-theme="dark"] .stb-mode-list button .stb-seconds,
    .stb-app[data-theme="dark"] .stb-rhythm-list button .stb-rhythm,
    .stb-app[data-theme="dark"] .stb-rhythm-list button .stb-seconds,
    .stb-app[data-theme="dark"] .stb-pattern-list button .stb-rhythm,
    .stb-app[data-theme="dark"] .stb-pattern-list button .stb-seconds{
        color:#b9f18f !important;
    }
}

@media (max-width: 420px){
    .stb-app .stb-mode-list button,
    .stb-app .stb-rhythm-list button,
    .stb-app .stb-breath-menu button,
    .stb-app .stb-pattern-list button,
    .stb-app .stb-pattern-card,
    .stb-app .stb-rhythm-card{
        grid-template-columns:38px minmax(0,1fr) auto !important;
        gap:3px 9px !important;
        padding:12px !important;
    }

    .stb-app .stb-mode-list button .stb-icon,
    .stb-app .stb-mode-list button .stb-mode-icon,
    .stb-app .stb-rhythm-list button .stb-icon,
    .stb-app .stb-breath-menu button .stb-icon{
        width:38px !important;
        height:38px !important;
        min-width:38px !important;
    }

    .stb-app .stb-mode-list button .stb-mode-name,
    .stb-app .stb-mode-list button strong,
    .stb-app .stb-rhythm-list button strong,
    .stb-app .stb-breath-menu button strong,
    .stb-app .stb-pattern-list button strong{
        font-size:14px !important;
    }
}


/* v3.5.5 Mobile Mode List Desktop Match
   Restores the mobile rhythm/mode menu to the desktop visual logic:
   title on first line, rhythm below, active badge below, readable dark cards. */
.stb-app .stb-mode-list{
    gap:10px !important;
}

.stb-app .stb-mode-list button,
.stb-app button[data-mode]{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:center !important;
    width:100% !important;
    min-height:78px !important;
    padding:14px 16px !important;
    text-align:left !important;
    border-radius:16px !important;
    gap:5px !important;
    overflow:visible !important;
}

.stb-app .stb-mode-list button strong,
.stb-app button[data-mode] strong{
    display:block !important;
    width:100% !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    line-height:1.22 !important;
    font-size:15px !important;
    font-weight:800 !important;
    margin:0 !important;
}

.stb-app .stb-mode-list button small,
.stb-app button[data-mode] small{
    display:block !important;
    width:100% !important;
    line-height:1.25 !important;
    font-size:13px !important;
    margin:0 !important;
    opacity:.86 !important;
    white-space:normal !important;
}

.stb-app .stb-mode-list button::after,
.stb-app button[data-mode]::after{
    display:none !important;
}

/* Active label keeps its own line, like desktop. */
.stb-app .stb-mode-list button .stb-active-label,
.stb-app button[data-mode] .stb-active-label,
.stb-app .stb-mode-list button em,
.stb-app button[data-mode] em{
    display:inline-block !important;
    margin-top:2px !important;
    padding:3px 8px !important;
    border-radius:999px !important;
    font-size:10px !important;
    line-height:1 !important;
    font-style:normal !important;
    font-weight:800 !important;
    letter-spacing:.02em !important;
    text-transform:uppercase !important;
}

/* Dark readable desktop-like cards. */
.stb-app[data-theme="dark"] .stb-mode-list button,
.stb-app[data-theme="dark"] button[data-mode]{
    background:rgba(92,122,104,.88) !important;
    border:1px solid rgba(201,181,137,.20) !important;
    color:#f5f0e2 !important;
    box-shadow:none !important;
}

.stb-app[data-theme="dark"] .stb-mode-list button strong,
.stb-app[data-theme="dark"] button[data-mode] strong{
    color:#fff7e8 !important;
}

.stb-app[data-theme="dark"] .stb-mode-list button small,
.stb-app[data-theme="dark"] button[data-mode] small{
    color:rgba(245,240,226,.82) !important;
    opacity:1 !important;
}

/* Active card, matching desktop selection. */
.stb-app[data-theme="dark"] .stb-mode-list button.stb-is-active,
.stb-app[data-theme="dark"] .stb-mode-list button.is-active,
.stb-app[data-theme="dark"] .stb-mode-list button.active,
.stb-app[data-theme="dark"] button[data-mode].stb-is-active,
.stb-app[data-theme="dark"] button[data-mode].is-active,
.stb-app[data-theme="dark"] button[data-mode].active,
.stb-app[data-theme="dark"] button[data-mode][aria-pressed="true"]{
    background:rgba(92,122,104,.96) !important;
    border:2px solid rgba(173,215,144,.72) !important;
    color:#fff7e8 !important;
    box-shadow:0 0 0 1px rgba(173,215,144,.18), inset 0 0 0 1px rgba(0,0,0,.08) !important;
}

.stb-app[data-theme="dark"] .stb-mode-list button.stb-is-active small,
.stb-app[data-theme="dark"] button[data-mode].stb-is-active small,
.stb-app[data-theme="dark"] button[data-mode][aria-pressed="true"] small{
    color:rgba(255,247,232,.82) !important;
}

/* Active badge. */
.stb-app[data-theme="dark"] .stb-mode-list button .stb-active-label,
.stb-app[data-theme="dark"] button[data-mode] .stb-active-label,
.stb-app[data-theme="dark"] .stb-mode-list button em,
.stb-app[data-theme="dark"] button[data-mode] em{
    background:rgba(173,215,144,.18) !important;
    color:#fff7e8 !important;
}

/* Mobile inherits the same desktop logic instead of the previous 3-column split. */
@media (max-width:768px){
    .stb-app .stb-mode-list button,
    .stb-app button[data-mode]{
        display:flex !important;
        flex-direction:column !important;
        align-items:flex-start !important;
        justify-content:center !important;
        grid-template-columns:none !important;
        grid-template-areas:none !important;
        min-height:74px !important;
        padding:13px 14px !important;
    }

    .stb-app .stb-mode-list button strong,
    .stb-app button[data-mode] strong{
        grid-area:auto !important;
        font-size:15px !important;
    }

    .stb-app .stb-mode-list button small,
    .stb-app button[data-mode] small{
        grid-area:auto !important;
        font-size:13px !important;
    }

    .stb-app .stb-mode-list button .stb-rhythm,
    .stb-app .stb-mode-list button .stb-seconds,
    .stb-app .stb-mode-list button .stb-pattern,
    .stb-app button[data-mode] .stb-rhythm,
    .stb-app button[data-mode] .stb-seconds,
    .stb-app button[data-mode] .stb-pattern{
        grid-area:auto !important;
        display:block !important;
        text-align:left !important;
        min-width:0 !important;
        max-width:none !important;
        white-space:normal !important;
        font-size:13px !important;
        line-height:1.25 !important;
        color:inherit !important;
    }
}

@media (max-width:420px){
    .stb-app .stb-mode-list button,
    .stb-app button[data-mode]{
        min-height:70px !important;
        padding:12px 13px !important;
    }
}

/* v3.5.6 Access Engine */
.stb-is-locked,
.stb-mode-list button.stb-is-locked {
    opacity: 0.56;
    cursor: not-allowed;
    filter: grayscale(0.25);
}
.stb-mode-list button.stb-is-locked small::after {
    content: " · locked";
}

/* v3.5.8 Active vs inactive module states */
.stb-mode-list button:not(.stb-is-locked):not([disabled]),
.stb-toggle-list button.stb-is-on:not(.stb-is-locked):not([disabled]),
.stb-after-grid button.stb-is-active:not(.stb-is-locked):not([disabled]),
.stb-state-grid button.stb-is-active:not(.stb-is-locked):not([disabled]) {
    opacity: 1 !important;
    filter: saturate(1.18) contrast(1.04) !important;
    box-shadow: 0 12px 30px rgba(35, 72, 52, 0.16), inset 0 0 0 1px rgba(255,255,255,0.45);
}

.stb-mode-list button.stb-is-active:not(.stb-is-locked):not([disabled]),
.stb-toggle-list button.stb-is-on:not(.stb-is-locked):not([disabled]) {
    background: var(--stb-deep) !important;
    color: var(--stb-white) !important;
}

.stb-mode-list button.stb-is-locked,
.stb-mode-list button[disabled],
.stb-toggle-list button.stb-is-locked,
.stb-toggle-list button[disabled],
.stb-after-grid button.stb-is-locked,
.stb-after-grid button[disabled],
.stb-state-grid button.stb-is-locked,
.stb-state-grid button[disabled],
button[data-locked="1"] {
    opacity: 0.34 !important;
    filter: grayscale(0.65) saturate(0.45) contrast(0.92) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.stb-toggle-list button.stb-is-off:not(.stb-is-on),
.stb-mode-list button.stb-is-off {
    opacity: 0.48;
    filter: grayscale(0.35) saturate(0.6);
}

.stb-module.stb-module-disabled,
.stb-layout-item.stb-module-disabled > .stb-module {
    opacity: 0.38;
    filter: grayscale(0.55) saturate(0.5);
    pointer-events: none;
}

/* v3.5.11 light theme active mode readability fix */
.stb-app[data-theme="light"] .stb-mode-list button.stb-is-active,
.stb-app[data-theme="light"] .stb-state-grid button.stb-is-active,
.stb-app[data-theme="light"] .stb-toggle-list button.stb-is-on,
.stb-app[data-theme="light"] .stb-selected {
    background: #f7efe0 !important;
    color: #142d22 !important;
    border-color: #a8792e !important;
    box-shadow: 0 0 0 3px rgba(168,121,46,0.20), 0 12px 26px rgba(20,45,34,0.12) !important;
}

.stb-app[data-theme="light"] .stb-mode-list button.stb-is-active small,
.stb-app[data-theme="light"] .stb-state-grid button.stb-is-active small,
.stb-app[data-theme="light"] .stb-toggle-list button.stb-is-on small,
.stb-app[data-theme="light"] .stb-selected small {
    color: #4a3a21 !important;
    opacity: 1 !important;
}

.stb-app[data-theme="light"] .stb-mode-list button.stb-is-active::after,
.stb-app[data-theme="light"] .stb-state-grid button.stb-is-active::after,
.stb-app[data-theme="light"] .stb-toggle-list button.stb-is-on::after {
    color: #6b4818 !important;
    opacity: 1 !important;
}

.stb-manual-access-form label {
    display: block;
    margin-top: 12px;
    font-weight: 700;
}

/* v3.5.14 Admin breathing builder */
.stb-breath-builder {
  border: 1px solid rgba(31, 44, 36, 0.14);
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0 18px;
  background: rgba(245, 240, 226, 0.55);
}
.stb-builder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.stb-builder-grid input {
  width: 100%;
  margin-top: 4px;
}
@media (max-width: 782px) {
  .stb-builder-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}


/* v3.5.20 integrations diagnostics */
.stb-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
}
.stb-status-green {
    background: #e7f6ec;
    color: #166534;
    border: 1px solid #bbebc9;
}
.stb-status-yellow {
    background: #fff8db;
    color: #8a5a00;
    border: 1px solid #f2d174;
}
.stb-status-red {
    background: #fdecec;
    color: #991b1b;
    border: 1px solid #f2b8b8;
}
.stb-evidence-list {
    margin: 0;
    padding-left: 18px;
}
.stb-evidence-list li {
    margin: 0 0 4px;
}
.stb-integration-summary div {
    min-width: 150px;
}
