:root {
    color-scheme: dark;
    --bg: #080a18;
    --panel: rgba(16, 20, 45, .76);
    --panel-strong: rgba(20, 26, 58, .92);
    --line: rgba(255, 255, 255, .11);
    --text: #eef3ff;
    --muted: #9aa7c7;
    --gold: #edc66d;
    --cyan: #74e1ff;
    --violet: #735cff;
    --green: #7df0b3;
    --danger: #ff7b9b;

    --sidebar-width: 198px;
    --sidebar-collapsed-width: 198px;
    --font-base: 13px;
    --font-small: 11px;
    --font-xs: 10px;
    --font-h1: 20px;
    --font-h2: 17px;
    --font-h3: 13px;
    --font-metric: 32px;
    --line-base: 1.38;
    --line-tight: 1.18;

    --space-1: 4px;
    --space-2: 6px;
    --space-3: 8px;
    --space-4: 10px;
    --space-5: 12px;
    --space-6: 14px;
    --space-7: 16px;

    --topbar-height: 64px;
    --row-height: 34px;
    --button-height: 34px;
    --preview-height: 78px;
    --catalog-card-width: 150px;
    --catalog-card-gap: var(--space-2);
    --panel-min-height: 112px;
    --icon-size: 32px;
    --brand-size: 34px;
    --dot-size: 7px;
    --radius-sm: 5px;
    --radius: 7px;
    --radius-lg: 8px;
    --shadow-panel: 0 12px 34px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .06);
    --shadow-active: 0 8px 20px rgba(76, 61, 190, .16);
    --shadow-button: 0 9px 22px rgba(77, 61, 190, .24), inset 0 1px rgba(255, 255, 255, .16);
    --window-width: min(720px, calc(100vw - var(--sidebar-width) - 30px));
    --window-height: 420px;
    --window-dock-offset: 12px;

    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--font-base);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 10%, rgba(115, 92, 255, .26), transparent 32%),
        radial-gradient(circle at 80% 20%, rgba(116, 225, 255, .13), transparent 28%),
        linear-gradient(135deg, #070914 0%, #111634 48%, #090b1b 100%);
    color: var(--text);
    font-size: var(--font-base);
    line-height: var(--line-base);
    overflow: hidden;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
    cursor: pointer;
}

.academy-shell {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

.academy-sidebar {
    display: none;
}

.academy-sidebar.is-pinned {
    border-color: rgba(237, 198, 109, .28);
    max-height: min(78vh, 620px);
}

.brand-block,
.academy-topbar,
.summary-panel,
.category-rail,
.component-card,
.academy-window {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-panel);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius);
    width: 100%;
}

.sidebar-pin {
    margin-left: auto;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(237, 198, 109, .22);
    border-radius: var(--radius-sm);
    background: rgba(237, 198, 109, .08);
    color: var(--gold);
    font-size: var(--font-xs);
    opacity: .72;
}

.academy-sidebar.is-pinned .sidebar-pin {
    opacity: 1;
    background: rgba(237, 198, 109, .18);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: var(--brand-size);
    height: var(--brand-size);
    border-radius: var(--radius);
    color: #13101f;
    background: linear-gradient(135deg, var(--gold), #fff1ba);
    font-size: var(--font-small);
    font-weight: 800;
}

.brand-block strong,
.brand-block small {
    display: block;
}

.brand-block strong {
    font-size: var(--font-base);
    line-height: var(--line-tight);
}

.brand-block small,
.sidebar-footer,
.eyebrow,
.rv-label,
.module-link em {
    color: var(--muted);
    font-size: var(--font-xs);
}

.module-nav {
    display: grid;
    gap: var(--space-1);
    overflow: auto;
    padding-right: 2px;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease;
}

.academy-sidebar.is-pinned .module-nav,
.academy-sidebar.is-pinned .sidebar-footer {
    opacity: 1;
    pointer-events: auto;
}

.module-link {
    display: grid;
    gap: 1px;
    width: 100%;
    min-height: var(--row-height);
    padding: var(--space-2) var(--space-3);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    text-align: left;
    transition: .16s ease;
}

.module-link span {
    font-size: var(--font-small);
    font-weight: 650;
    line-height: var(--line-tight);
}

.module-link em {
    overflow: hidden;
    font-style: normal;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-link:hover,
.module-link.is-active {
    border-color: rgba(237, 198, 109, .32);
    background: rgba(255, 255, 255, .065);
    box-shadow: var(--shadow-active);
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 2px;
    padding-top: var(--space-2);
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease;
}

.academy-main {
    min-width: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: var(--topbar-height) 1fr;
}

.academy-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    margin: var(--space-3) var(--space-4) 0;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: var(--font-h1);
    line-height: var(--line-tight);
    letter-spacing: 0;
}

h2 {
    font-size: var(--font-h2);
    line-height: 1.24;
    letter-spacing: 0;
}

h3 {
    font-size: var(--font-h3);
    line-height: 1.25;
    letter-spacing: 0;
}

p {
    color: var(--muted);
    line-height: var(--line-base);
}

.eyebrow {
    margin-bottom: var(--space-1);
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.level-switch {
    display: flex;
    max-width: 390px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(2, 4, 12, .35);
    overflow: auto;
}

.level-switch button {
    min-height: 28px;
    padding: 4px var(--space-2);
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: var(--font-xs);
    white-space: nowrap;
}

.level-switch button.is-active {
    color: #0d1730;
    background: linear-gradient(135deg, var(--cyan), #d8f7ff);
}

.mode-switch {
    display: flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(2, 4, 12, .4);
}

.mode-switch button,
.icon-command,
.text-command {
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
}

.mode-switch button {
    display: grid;
    gap: 1px;
    min-width: 132px;
    min-height: 38px;
    padding: var(--space-1) var(--space-3);
    color: var(--muted);
    font-size: var(--font-small);
    line-height: var(--line-tight);
    text-align: left;
}

.mode-switch strong,
.mode-switch small {
    display: block;
}

.mode-switch strong {
    font-size: var(--font-small);
}

.mode-switch small {
    font-size: var(--font-xs);
    color: currentColor;
    opacity: .78;
}

.mode-switch button.is-active {
    color: #160f22;
    background: linear-gradient(135deg, var(--gold), #fff0b0);
}

.icon-command {
    width: var(--icon-size);
    height: var(--icon-size);
    border: 1px solid rgba(237, 198, 109, .38);
    background: rgba(237, 198, 109, .1);
    font-size: var(--font-small);
}

.workspace {
    position: relative;
    min-height: 0;
    padding: var(--space-4);
    overflow: auto;
}

.module-panel {
    display: none;
    animation: panelIn .16s ease both;
}

.module-panel.is-visible {
    display: block;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr .8fr .8fr;
    gap: var(--space-4);
}

.summary-panel {
    width: 100%;
    min-height: var(--panel-min-height);
    padding: var(--space-5);
    border-radius: var(--radius);
    color: inherit;
    text-align: left;
}

.summary-panel.wide {
    grid-row: span 2;
}

.guide-card {
    position: relative;
    display: grid;
    gap: var(--space-2);
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.guide-card:hover {
    transform: translateY(-1px);
    border-color: rgba(237, 198, 109, .38);
    box-shadow: var(--shadow-panel), var(--shadow-active);
}

.guide-card:active {
    transform: translateY(1px);
}

.guide-card-info {
    border-color: rgba(116, 225, 255, .28);
}

.guide-card-green {
    border-color: rgba(125, 240, 179, .32);
}

.guide-card-gold {
    border-color: rgba(237, 198, 109, .32);
}

.guide-card-blue {
    border-color: rgba(116, 225, 255, .32);
}

.guide-card-purple {
    border-color: rgba(145, 118, 255, .36);
}

.card-action {
    width: fit-content;
    margin-top: var(--space-1);
    padding: 3px var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--gold);
    background: rgba(237, 198, 109, .08);
    font-size: var(--font-xs);
    font-weight: 700;
}

.metric {
    display: block;
    margin-bottom: var(--space-1);
    color: var(--gold);
    font-size: var(--font-metric);
    font-weight: 800;
    line-height: .95;
}

.realtime-card {
    position: relative;
    overflow: hidden;
}

.pulse-line {
    position: absolute;
    left: var(--space-5);
    right: var(--space-5);
    bottom: var(--space-5);
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: pulseLine 1.8s ease-in-out infinite;
}

@keyframes pulseLine {
    50% { opacity: .38; transform: scaleX(.82); }
}

.studio-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: var(--space-4);
    align-items: start;
}

.category-rail {
    position: sticky;
    top: 0;
    display: grid;
    gap: var(--space-3);
    max-height: calc(100vh - var(--topbar-height) - 42px);
    overflow: auto;
    padding: var(--space-4);
    border-radius: var(--radius);
}

.category-list {
    display: grid;
    gap: var(--space-1);
}

.category-list button {
    display: grid;
    gap: 2px;
    min-height: 32px;
    padding: var(--space-1) var(--space-3);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    text-align: left;
    font-size: var(--font-small);
}

.category-list button span,
.category-list button em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-list button span {
    color: var(--text);
    font-weight: 700;
}

.category-list button em {
    color: var(--muted);
    font-size: var(--font-xs);
    font-style: normal;
}

.category-list button:hover,
.category-list button.is-active {
    color: var(--text);
    border-color: rgba(116, 225, 255, .28);
    background: rgba(116, 225, 255, .08);
}

.component-stage {
    min-width: 0;
}

.stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.catalog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 248px;
    gap: var(--space-3);
    align-items: start;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.button-catalog-grid {
    grid-template-columns: repeat(auto-fill, var(--catalog-card-width));
    gap: var(--catalog-card-gap);
    justify-content: start;
    align-content: start;
}

.component-card {
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.component-card.is-category-hidden {
    display: none;
}

.button-style-card {
    position: relative;
    display: block;
}

.component-preview {
    min-height: var(--preview-height);
    display: grid;
    place-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: linear-gradient(135deg, rgba(116, 92, 255, .12), rgba(116, 225, 255, .06));
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.button-style-preview {
    position: relative;
    min-height: var(--preview-height);
    overflow: hidden;
    cursor: default;
    padding-top: 24px;
}

.style-card-topline {
    position: absolute;
    left: 8px;
    top: var(--space-2);
    right: 6px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.style-id {
    max-width: calc(100% - 38px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(154, 167, 199, .42);
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.component-preview.is-demo-hover {
    border-color: rgba(237, 198, 109, .45);
    box-shadow: inset 0 0 0 1px rgba(237, 198, 109, .15);
}

.component-preview.is-demo-active {
    transform: translateY(1px) scale(.995);
}

.component-preview.is-demo-loading {
    background: linear-gradient(135deg, rgba(116, 92, 255, .2), rgba(237, 198, 109, .08));
}

.component-preview.is-demo-disabled {
    opacity: .55;
    filter: saturate(.65);
}

.component-preview.is-demo-error {
    border-color: rgba(255, 123, 155, .5);
    background: linear-gradient(135deg, rgba(255, 123, 155, .12), rgba(116, 92, 255, .08));
}

.component-preview.is-demo-success {
    border-color: rgba(125, 240, 179, .48);
    background: linear-gradient(135deg, rgba(125, 240, 179, .12), rgba(116, 225, 255, .06));
}

.style-usage {
    display: none !important;
}

.style-card-head {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-1);
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.style-card-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0;
    margin-left: auto;
    padding: 0;
}

.style-icon-action {
    display: grid;
    place-items: center;
    width: 9px;
    height: 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: 8px;
    line-height: 1;
    opacity: .78;
}

.style-icon-action + .style-icon-action {
    margin-left: -1px;
}

.style-icon-action:hover,
.style-icon-action.is-selected {
    color: var(--gold);
    background: rgba(237, 198, 109, .08);
    opacity: 1;
}

.style-icon-action.is-favorite {
    color: var(--danger);
    background: rgba(255, 123, 155, .07);
}

.style-facts {
    display: grid;
    gap: var(--space-2);
    margin: 0;
}

.style-facts div {
    display: grid;
    gap: 2px;
    padding: var(--space-2);
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .035);
}

.style-facts dt,
.style-facts dd {
    margin: 0;
}

.style-facts dt {
    color: var(--gold);
    font-size: var(--font-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.style-facts dd {
    color: var(--muted);
    font-size: var(--font-small);
    line-height: var(--line-base);
}

.rv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: var(--button-height);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.rv-btn-primary {
    border-color: rgba(238, 198, 109, .48);
    background: linear-gradient(135deg, rgba(116, 92, 255, .95), rgba(27, 42, 95, .96));
    box-shadow: var(--shadow-button);
}

.rv-btn-primary:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 211, 128, .75);
}

.rv-btn:active {
    transform: translateY(1px) scale(.99);
}

.rv-btn:disabled,
.rv-btn.is-loading {
    cursor: not-allowed;
    opacity: .58;
}

.rv-btn-muted {
    background: rgba(255, 255, 255, .06);
}

.rv-btn-dot {
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 99px;
    background: var(--green);
    box-shadow: 0 0 14px rgba(125, 240, 179, .75);
}

.rv-client-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-3);
    width: min(100%, 300px);
    padding: var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 22, 48, .68);
    backdrop-filter: blur(18px);
}

.rv-client-card strong {
    color: var(--gold);
    font-size: 20px;
    line-height: var(--line-tight);
}

.rv-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 20px;
    padding: 3px var(--space-2);
    border: 1px solid rgba(237, 198, 109, .28);
    border-radius: 99px;
    color: var(--gold);
    background: rgba(237, 198, 109, .08);
    font-size: var(--font-xs);
}

.rv-badge-success {
    color: var(--green);
    border-color: rgba(125, 240, 179, .32);
    background: rgba(125, 240, 179, .08);
}

.rv-badge-muted {
    color: var(--muted);
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .045);
}

.style-button {
    position: relative;
    isolation: isolate;
    min-width: 104px;
    min-height: 30px;
    padding: 0 var(--space-3);
    border: 1px solid color-mix(in srgb, var(--btn-accent) 55%, transparent);
    border-radius: var(--btn-radius);
    background: var(--btn-surface);
    color: var(--btn-text);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    overflow: hidden;
    font-size: var(--font-xs);
    font-weight: 800;
    letter-spacing: 0;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, filter .16s ease;
}

.style-button-stack {
    display: grid;
    gap: 5px;
    padding-block: var(--space-2);
    transform: translateY(-20px);
}

.style-button-stack .style-button {
    width: min(100%, 160px);
    margin-inline: auto;
}

.style-button span {
    position: relative;
    z-index: 2;
}

.style-button:hover {
    transform: translateY(-2px);
    border-color: var(--btn-accent);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--btn-accent) 24%, transparent);
}

.style-button:active {
    transform: translateY(1px) scale(.98);
    filter: brightness(.92);
}

.style-button-glass {
    background: linear-gradient(135deg, color-mix(in srgb, var(--btn-surface) 82%, transparent), rgba(255, 255, 255, .045));
    backdrop-filter: blur(18px);
    box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 18px 38px rgba(0, 0, 0, .2);
}

.style-button-gold {
    background: linear-gradient(135deg, var(--btn-accent), var(--btn-accent-2) 48%, #8a621d);
    text-shadow: 0 1px rgba(255, 255, 255, .28);
    box-shadow: inset 0 1px rgba(255, 255, 255, .45), 0 12px 26px color-mix(in srgb, var(--btn-accent) 25%, transparent);
}

.style-button-neon {
    background: radial-gradient(circle at 30% 15%, color-mix(in srgb, var(--btn-accent) 25%, transparent), transparent 34%), var(--btn-surface);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--btn-accent) 35%, transparent), 0 0 18px color-mix(in srgb, var(--btn-accent) 28%, transparent);
}

.style-button-minimal {
    box-shadow: none;
}

.style-button-minimal::after {
    content: "";
    position: absolute;
    left: var(--space-4);
    right: var(--space-4);
    bottom: 7px;
    height: 1px;
    background: var(--btn-accent);
    opacity: .55;
    transform: scaleX(.55);
    transition: transform .16s ease;
}

.style-button-minimal:hover::after {
    transform: scaleX(1);
}

.style-button-solid3d {
    background: linear-gradient(180deg, color-mix(in srgb, var(--btn-accent) 82%, white 18%), var(--btn-surface));
    box-shadow: 0 5px 0 var(--btn-accent-2), 0 15px 24px rgba(0, 0, 0, .24);
}

.style-button-solid3d:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 var(--btn-accent-2), 0 8px 16px rgba(0, 0, 0, .22);
}

.style-button-metal {
    background: linear-gradient(110deg, #10141d, var(--btn-surface) 28%, color-mix(in srgb, var(--btn-accent) 38%, #141923), #080b12 76%);
    box-shadow: inset 0 1px color-mix(in srgb, var(--btn-accent) 35%, transparent), inset 0 -1px rgba(0, 0, 0, .5), 0 12px 24px rgba(0, 0, 0, .26);
}

.style-button-engraved {
    background: var(--btn-surface);
    box-shadow: inset 0 2px 7px rgba(0, 0, 0, .6), inset 0 -1px color-mix(in srgb, var(--btn-accent) 22%, transparent);
}

.style-button-glow {
    background: linear-gradient(135deg, var(--btn-surface), color-mix(in srgb, var(--btn-accent-2) 28%, var(--btn-surface)));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--btn-accent) 25%, transparent), 0 0 26px color-mix(in srgb, var(--btn-accent) 25%, transparent);
}

.style-button-soft {
    background: linear-gradient(180deg, color-mix(in srgb, var(--btn-surface) 82%, white 18%), var(--btn-surface));
    box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 10px 20px rgba(0, 0, 0, .14);
}

.style-button-sharp {
    clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
    background: linear-gradient(135deg, var(--btn-surface), color-mix(in srgb, var(--btn-accent) 16%, #070914));
}

.style-button-sport {
    background: linear-gradient(120deg, var(--btn-surface) 0 55%, var(--btn-accent) 55% 67%, var(--btn-accent-2) 67%);
}

.style-button-future {
    background: linear-gradient(115deg, color-mix(in srgb, var(--btn-accent) 18%, transparent), var(--btn-surface), color-mix(in srgb, var(--btn-accent-2) 18%, transparent));
}

.style-button-future::before,
.style-button-motion::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, .24), transparent 55%);
    transform: translateX(-120%);
    transition: transform .35s ease;
}

.style-button-future:hover::before,
.style-button-motion:hover::before {
    transform: translateX(120%);
}

.style-button-admin,
.style-button-table,
.style-button-form,
.style-button-nav {
    min-height: 34px;
    background: var(--btn-surface);
    box-shadow: inset 0 1px rgba(255, 255, 255, .055);
}

.style-button-mobile {
    min-height: 34px;
    min-width: 140px;
    background: linear-gradient(135deg, var(--btn-accent), var(--btn-accent-2));
    box-shadow: 0 12px 26px color-mix(in srgb, var(--btn-accent) 22%, transparent);
}

.style-button-saas,
.style-button-ai {
    background: linear-gradient(135deg, var(--btn-accent), var(--btn-accent-2));
    box-shadow: 0 12px 30px color-mix(in srgb, var(--btn-accent) 26%, transparent), inset 0 1px rgba(255, 255, 255, .18);
}

.style-button-brand {
    background: radial-gradient(circle at 18% 50%, var(--btn-accent) 0 11px, transparent 12px), linear-gradient(135deg, var(--btn-surface), color-mix(in srgb, var(--btn-accent-2) 22%, var(--btn-surface)));
    padding-left: 42px;
}

.style-button-iconic {
    min-width: 132px;
    background: linear-gradient(135deg, var(--btn-surface), color-mix(in srgb, var(--btn-accent) 12%, var(--btn-surface)));
}

.style-button-iconic::after {
    content: "+";
    position: absolute;
    left: 12px;
    top: 50%;
    color: var(--btn-accent);
    transform: translateY(-50%);
}

.style-button-motion {
    background: linear-gradient(135deg, var(--btn-surface), color-mix(in srgb, var(--btn-accent) 16%, var(--btn-surface)));
}

.style-button-danger {
    background: linear-gradient(135deg, var(--btn-surface), rgba(255, 123, 155, .04));
}

.style-button-success {
    background: linear-gradient(135deg, var(--btn-surface), rgba(125, 240, 179, .05));
}

.button-effect-card {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-2);
}

.effect-preview {
    position: relative;
    min-height: var(--preview-height);
    overflow: hidden;
    padding-top: 24px;
}

.effect-preview-group {
    align-items: stretch;
    padding: 18px var(--space-2) 0;
}

.effect-id {
    max-width: calc(100% - 38px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(154, 167, 199, .42);
    cursor: help;
    font-size: 7px;
    font-weight: 700;
    line-height: 1;
}

.effect-button {
    position: relative;
    isolation: isolate;
    display: inline-grid;
    place-items: center;
    min-width: 104px;
    min-height: 30px;
    padding: 0 var(--space-4);
    overflow: hidden;
    border: 1px solid rgba(116, 225, 255, .36);
    border-radius: 10px;
    background: rgba(17, 26, 50, .88);
    color: var(--text);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
    font-size: var(--font-xs);
    font-weight: 800;
    letter-spacing: 0;
    transition: transform .16s ease, opacity .16s ease, filter .16s ease, color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.effect-button span {
    position: relative;
    z-index: 2;
}

.effect-lift-soft:hover,
.effect-lift-soft.is-effect-active {
    transform: translateY(-3px);
    border-color: rgba(116, 225, 255, .7);
    box-shadow: 0 14px 28px rgba(116, 225, 255, .16);
}

.effect-press-soft:active,
.effect-press-soft.is-effect-active {
    transform: translateY(1px) scale(.98);
    filter: brightness(.92);
}

.effect-press-physical {
    box-shadow: 0 4px 0 rgba(41, 78, 134, .9), 0 13px 22px rgba(0, 0, 0, .24);
}

.effect-press-physical:active,
.effect-press-physical.is-effect-active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 rgba(41, 78, 134, .9), 0 8px 16px rgba(0, 0, 0, .22);
}

.effect-shine-sweep::before,
.effect-fill-left::before,
.effect-fill-bottom::before,
.effect-fill-split::before,
.effect-fill-split::after,
.effect-ripple-center::before,
.effect-spotlight-static::before,
.effect-loading-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.effect-shine-sweep::before {
    background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .32), transparent 58%);
    transform: translateX(-125%);
    transition: transform .36s ease;
}

.effect-shine-sweep:hover::before,
.effect-shine-sweep.is-effect-active::before {
    transform: translateX(125%);
}

.effect-border-draw::after {
    content: "";
    position: absolute;
    left: var(--space-4);
    right: var(--space-4);
    bottom: 6px;
    z-index: 2;
    height: 1px;
    background: var(--gold);
    opacity: .72;
    transform: scaleX(.24);
    transition: transform .18s ease, opacity .18s ease;
}

.effect-border-draw:hover::after,
.effect-border-draw.is-effect-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.effect-fill-left::before {
    background: linear-gradient(90deg, rgba(116, 225, 255, .34), rgba(237, 198, 109, .18));
    transform: translateX(-104%);
    transition: transform .22s ease;
}

.effect-fill-left:hover::before,
.effect-fill-left.is-effect-active::before {
    transform: translateX(0);
}

.effect-fill-bottom::before {
    background: linear-gradient(0deg, rgba(125, 240, 179, .3), rgba(116, 225, 255, .12));
    transform: translateY(104%);
    transition: transform .22s ease;
}

.effect-fill-bottom:hover::before,
.effect-fill-bottom.is-effect-active::before {
    transform: translateY(0);
}

.effect-fill-split::before,
.effect-fill-split::after {
    background: rgba(116, 225, 255, .18);
    transition: transform .2s ease;
}

.effect-fill-split::before {
    right: 50%;
    transform: translateX(-105%);
}

.effect-fill-split::after {
    left: 50%;
    transform: translateX(105%);
}

.effect-fill-split:hover::before,
.effect-fill-split.is-effect-active::before,
.effect-fill-split:hover::after,
.effect-fill-split.is-effect-active::after {
    transform: translateX(0);
}

.effect-ripple-center::before {
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgba(116, 225, 255, .28);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

.effect-ripple-center:active::before,
.effect-ripple-center.is-effect-active::before {
    animation: effectRipple .58s ease-out;
}

.effect-magnetic-soft:hover,
.effect-magnetic-soft.is-effect-active {
    transform: translate(3px, -2px) scale(1.02);
    border-color: rgba(237, 198, 109, .58);
    box-shadow: 0 12px 28px rgba(237, 198, 109, .13);
}

.effect-border-corners::before,
.effect-border-corners::after {
    content: "";
    position: absolute;
    z-index: 2;
    width: 16px;
    height: 10px;
    opacity: .35;
    transition: opacity .16s ease, transform .16s ease;
}

.effect-border-corners::before {
    left: 5px;
    top: 5px;
    border-left: 1px solid var(--cyan);
    border-top: 1px solid var(--cyan);
}

.effect-border-corners::after {
    right: 5px;
    bottom: 5px;
    border-right: 1px solid var(--cyan);
    border-bottom: 1px solid var(--cyan);
}

.effect-border-corners:hover::before,
.effect-border-corners:hover::after,
.effect-border-corners.is-effect-active::before,
.effect-border-corners.is-effect-active::after {
    opacity: 1;
    transform: scale(1.18);
}

.effect-border-glow:hover,
.effect-border-glow.is-effect-active {
    border-color: rgba(116, 225, 255, .82);
    box-shadow: 0 0 0 1px rgba(116, 225, 255, .16), 0 0 18px rgba(116, 225, 255, .18);
}

.effect-text-slide-up {
    color: transparent;
}

.effect-text-slide-up span {
    color: var(--text);
    transition: transform .18s ease;
}

.effect-text-slide-up::after {
    content: attr(data-alt-label);
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: var(--gold);
    transform: translateY(120%);
    transition: transform .18s ease;
}

.effect-text-slide-up:hover span,
.effect-text-slide-up.is-effect-active span {
    transform: translateY(-140%);
}

.effect-text-slide-up:hover::after,
.effect-text-slide-up.is-effect-active::after {
    transform: translateY(0);
}

.effect-icon-reveal {
    padding-right: 28px;
}

.effect-icon-reveal::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 11px;
    z-index: 2;
    color: var(--gold);
    opacity: 0;
    transform: translate(-5px, -50%);
    transition: opacity .16s ease, transform .16s ease;
}

.effect-icon-reveal:hover::after,
.effect-icon-reveal.is-effect-active::after {
    opacity: 1;
    transform: translate(0, -50%);
}

.effect-icon-slide-right {
    padding-right: 30px;
}

.effect-icon-slide-right::after {
    content: "›";
    position: absolute;
    right: 12px;
    top: 48%;
    z-index: 2;
    color: var(--gold);
    transform: translate(-5px, -50%);
    transition: transform .16s ease;
}

.effect-icon-slide-right:hover::after,
.effect-icon-slide-right.is-effect-active::after {
    transform: translate(2px, -50%);
}

.effect-icon-badge {
    padding-right: 30px;
}

.effect-icon-badge::after {
    content: "+";
    position: absolute;
    right: 9px;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgba(237, 198, 109, .18);
    color: var(--gold);
    opacity: .45;
    transform: translateY(-50%) scale(.86);
    transition: opacity .16s ease, transform .16s ease;
}

.effect-icon-badge:hover::after,
.effect-icon-badge.is-effect-active::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.effect-text-slide-left span {
    transition: transform .18s ease;
}

.effect-text-slide-left:hover span,
.effect-text-slide-left.is-effect-active span {
    transform: translateX(-7px);
}

.effect-text-slide-left::after {
    content: "•";
    position: absolute;
    right: 13px;
    top: 50%;
    color: var(--gold);
    opacity: 0;
    transform: translate(5px, -50%);
    transition: opacity .16s ease, transform .16s ease;
}

.effect-text-slide-left:hover::after,
.effect-text-slide-left.is-effect-active::after {
    opacity: 1;
    transform: translate(0, -50%);
}

.effect-text-glow:hover,
.effect-text-glow.is-effect-active {
    color: #effcff;
    text-shadow: 0 0 10px rgba(116, 225, 255, .55);
}

.effect-morph-pill:hover,
.effect-morph-pill.is-effect-active {
    border-radius: 999px;
}

.effect-morph-sharp:hover,
.effect-morph-sharp.is-effect-active {
    border-radius: 2px;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.effect-toggle-dot,
.effect-toggle-glow {
    justify-content: end;
    min-width: 112px;
    padding-left: 34px;
}

.effect-toggle-dot::before,
.effect-toggle-glow::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 50%;
    z-index: 2;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--muted);
    transform: translateY(-50%);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.effect-toggle-dot::after,
.effect-toggle-glow::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    width: 34px;
    height: 18px;
    border-radius: 999px;
    background: rgba(154, 167, 199, .16);
    transform: translateY(-50%);
}

.effect-toggle-dot:hover::before,
.effect-toggle-dot.is-effect-active::before,
.effect-toggle-glow:hover::before,
.effect-toggle-glow.is-effect-active::before {
    background: var(--green);
    transform: translate(16px, -50%);
}

.effect-toggle-glow:hover::before,
.effect-toggle-glow.is-effect-active::before {
    box-shadow: 0 0 12px rgba(125, 240, 179, .42);
}

.effect-spotlight-static::before {
    background: radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .26), transparent 34%);
    opacity: .28;
    transition: opacity .16s ease, transform .16s ease;
}

.effect-spotlight-static:hover::before,
.effect-spotlight-static.is-effect-active::before {
    opacity: .72;
    transform: scale(1.05);
}

.effect-blur-soft {
    backdrop-filter: blur(10px);
}

.effect-blur-soft:hover,
.effect-blur-soft.is-effect-active {
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(18px);
}

.effect-loading-dots.is-effect-active span::after {
    content: "...";
    display: inline-block;
    width: 0;
    overflow: hidden;
    vertical-align: bottom;
    animation: effectDots 1s steps(4, end) infinite;
}

.effect-loading-dots.is-effect-active {
    border-color: rgba(237, 198, 109, .7);
    color: #fff2c4;
}

.effect-loading-bar::after {
    top: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
}

.effect-loading-bar.is-effect-active::after {
    animation: effectLoadingBar 1.1s ease-in-out;
}

.effect-loading-spinner {
    padding-left: 30px;
}

.effect-loading-spinner.is-effect-active::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 50%;
    z-index: 2;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(116, 225, 255, .24);
    border-top-color: var(--cyan);
    border-radius: 999px;
    animation: effectSpin .7s linear infinite;
    transform: translateY(-50%);
}

.effect-success-green-fill.is-effect-active,
.effect-success-green-fill:hover {
    border-color: rgba(125, 240, 179, .65);
    background: rgba(125, 240, 179, .18);
    color: #eafff3;
    box-shadow: 0 12px 24px rgba(125, 240, 179, .12);
}

.effect-success-check {
    padding-right: 30px;
}

.effect-success-check.is-effect-active {
    border-color: rgba(125, 240, 179, .7);
    background: rgba(125, 240, 179, .16);
}

.effect-success-check.is-effect-active::after {
    content: "✓";
    position: absolute;
    right: 11px;
    top: 50%;
    z-index: 2;
    color: var(--green);
    transform: translateY(-50%);
}

.effect-error-border.is-effect-active,
.effect-error-border:hover {
    border-color: rgba(255, 123, 155, .8);
    box-shadow: 0 0 0 1px rgba(255, 123, 155, .2), 0 10px 22px rgba(255, 123, 155, .1);
}

.effect-error-border.is-effect-active {
    animation: effectErrorShake .24s ease;
}

.effect-error-shake.is-effect-active,
.effect-error-shake:hover {
    border-color: rgba(255, 123, 155, .8);
    color: #ffdce5;
}

.effect-error-shake.is-effect-active {
    animation: effectErrorShake .24s ease;
}

.effect-disabled-fade,
.effect-disabled-fade[aria-disabled="true"] {
    border-color: rgba(154, 167, 199, .18);
    background: repeating-linear-gradient(135deg, rgba(154, 167, 199, .08) 0 6px, rgba(154, 167, 199, .035) 6px 12px), rgba(17, 26, 50, .46);
    color: rgba(154, 167, 199, .56);
    opacity: .7;
    filter: saturate(.35);
    cursor: not-allowed;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.effect-disabled-fade::after {
    content: "zamčeno";
    position: absolute;
    right: 8px;
    bottom: 4px;
    color: rgba(154, 167, 199, .42);
    font-size: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

.effect-disabled-lock,
.effect-disabled-lock[aria-disabled="true"] {
    border-color: rgba(154, 167, 199, .18);
    background: rgba(17, 26, 50, .5);
    color: rgba(154, 167, 199, .58);
    opacity: .74;
    cursor: not-allowed;
}

.effect-disabled-lock::after {
    content: "×";
    position: absolute;
    right: 11px;
    top: 50%;
    color: rgba(154, 167, 199, .56);
    transform: translateY(-50%);
}

.effect-group-frame {
    position: absolute;
    left: var(--space-2);
    right: var(--space-2);
    top: 20px;
    bottom: var(--space-2);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(116, 225, 255, .05), rgba(116, 92, 255, .08));
    cursor: pointer;
}

.effect-group-demo {
    display: grid;
    gap: 4px;
    width: min(100%, 124px);
}

.effect-frame-effect-group-fade-stack {
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.effect-frame-effect-group-fade-stack .effect-group-demo {
    transform: translateY(-12px);
}

.effect-group-demo .effect-button {
    width: 100%;
    min-width: 0;
}

.effect-group-fade-stack {
    mask-image: none;
}

.effect-preview-group .effect-button {
    cursor: pointer;
}

.effect-preview-group .effect-button:hover,
.effect-preview-group .effect-button.is-preview-hover,
.effect-preview-group .effect-button.is-preview-selected {
    border-color: rgba(116, 225, 255, .62);
    background: rgba(116, 225, 255, .1);
    box-shadow: 0 10px 20px rgba(116, 225, 255, .1);
}

.effect-preview-group .effect-button.is-preview-selected:not(.is-preview-hover) {
    border-color: rgba(237, 198, 109, .72);
}

.effect-group-active-row .effect-button:hover,
.effect-group-active-row .effect-button.is-preview-hover,
.effect-group-active-row .effect-button.is-preview-selected {
    transform: scale(1.03);
}

.effect-group-stagger .effect-button {
    --stagger-x: 0px;
    transform: translateX(var(--stagger-x));
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease, background .16s ease;
}

.effect-group-stagger .effect-button:nth-child(2),
.effect-group-stagger .effect-button:nth-child(6) {
    --stagger-x: 4px;
}

.effect-group-stagger .effect-button:nth-child(3),
.effect-group-stagger .effect-button:nth-child(5),
.effect-group-stagger .effect-button:nth-child(7) {
    --stagger-x: 8px;
}

.effect-group-stagger .effect-button:nth-child(4),
.effect-group-stagger .effect-button:nth-child(8) {
    --stagger-x: 12px;
}

.effect-group-stagger .effect-button:hover,
.effect-group-stagger .effect-button.is-preview-hover,
.effect-group-stagger .effect-button.is-preview-selected {
    transform: translateX(calc(var(--stagger-x) + 10px)) scale(1.03);
    border-color: rgba(237, 198, 109, .8);
    background: rgba(237, 198, 109, .12);
    box-shadow: 0 10px 20px rgba(237, 198, 109, .14);
    opacity: 1;
}

.effect-card-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.effect-card-meta strong,
.effect-card-meta code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.effect-card-meta strong {
    color: var(--text);
    font-size: var(--font-xs);
    line-height: var(--line-tight);
}

.effect-card-meta code {
    color: rgba(154, 167, 199, .55);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 7px;
}

@keyframes effectDots {
    0% { width: 0; }
    100% { width: 1.05em; }
}

@keyframes effectRipple {
    0% { opacity: .55; transform: translate(-50%, -50%) scale(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}

@keyframes effectLoadingBar {
    0% { transform: scaleX(0); }
    70% { transform: scaleX(.82); }
    100% { transform: scaleX(1); }
}

@keyframes effectSpin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

@keyframes effectErrorShake {
    0%, 100% { transform: translateX(0); }
    35% { transform: translateX(-2px); }
    70% { transform: translateX(2px); }
}

.selection-panel {
    position: sticky;
    top: var(--space-3);
    display: grid;
    gap: var(--space-2);
    padding: var(--space-3);
    border: 1px solid rgba(237, 198, 109, .24);
    border-radius: var(--radius);
    background: rgba(10, 15, 34, .88);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-panel);
}

.selection-help {
    font-size: var(--font-xs);
}

.selection-list {
    display: grid;
    gap: var(--space-2);
    min-height: 80px;
}

.selection-empty {
    padding: var(--space-3);
    border: 1px dashed rgba(255, 255, 255, .12);
    border-radius: var(--radius-sm);
}

.selection-item {
    display: grid;
    gap: 2px;
    padding: var(--space-2);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .04);
}

.selection-item strong {
    color: var(--text);
    font-size: var(--font-small);
}

.selection-item span {
    color: var(--muted);
    font-size: var(--font-xs);
}

.selection-item button {
    width: fit-content;
    margin-top: var(--space-1);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--danger);
    font-size: var(--font-xs);
}

.selection-export {
    width: 100%;
    min-height: 120px;
    padding: var(--space-3);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, .24);
    color: var(--text);
    resize: vertical;
    font: var(--font-xs)/1.45 "JetBrains Mono", Consolas, monospace;
}

.style-detail-panel {
    position: fixed;
    right: var(--space-4);
    top: calc(var(--topbar-height) + var(--space-5));
    z-index: 70;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100vh - var(--topbar-height) - 36px);
    border: 1px solid rgba(237, 198, 109, .24);
    border-radius: var(--radius-lg);
    background: rgba(10, 15, 34, .96);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-panel);
    opacity: 0;
    pointer-events: none;
    transform: translateX(12px);
    transition: opacity .18s ease, transform .18s ease;
}

.style-detail-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.style-detail-panel header,
.style-detail-panel footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--line);
}

.style-detail-panel footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.style-detail-panel header button {
    width: var(--icon-size);
    height: var(--icon-size);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
    color: var(--text);
}

.style-detail-content {
    display: grid;
    gap: var(--space-3);
    overflow: auto;
    padding: var(--space-4);
}

.style-detail-preview {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 430px;
    padding: var(--space-3);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(116, 92, 255, .12), rgba(116, 225, 255, .06));
    overflow: hidden;
}

.detail-preview-frame {
    display: grid;
    place-items: center;
    width: min(100%, 320px);
    min-height: 360px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(116, 225, 255, .05), rgba(116, 92, 255, .1));
    mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%);
}

.detail-preview-stack {
    display: grid;
    gap: 5px;
    place-items: center;
    width: min(100%, 220px);
    transform: translateY(-20px);
}

.detail-preview-stack .style-button,
.detail-preview-stack .effect-button {
    min-height: 34px;
    width: min(100%, 190px);
}

.style-detail-meta {
    display: grid;
    gap: var(--space-2);
}

.style-detail-meta div {
    padding: var(--space-2);
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .035);
}

.style-detail-meta dt,
.style-detail-meta dd {
    margin: 0;
}

.style-detail-meta dt {
    color: var(--gold);
    font-size: var(--font-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.style-detail-meta dd {
    color: var(--muted);
    font-size: var(--font-small);
}

.mini-window {
    width: min(100%, 300px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #080d1c;
    overflow: hidden;
}

.mini-window header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 28px;
    padding: var(--space-2) var(--space-3);
    background: #111a32;
}

.mini-window header span {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: var(--danger);
}

.mini-window header span:nth-child(2) { background: var(--gold); }
.mini-window header span:nth-child(3) { background: var(--green); }
.mini-window pre { margin: 0; padding: var(--space-3); color: #dce7ff; overflow: auto; }

.rv-upload {
    width: min(100%, 300px);
    display: grid;
    place-items: center;
    gap: var(--space-2);
    min-height: 92px;
    padding: var(--space-4);
    border: 1px dashed rgba(116, 225, 255, .45);
    border-radius: var(--radius);
    background: rgba(116, 225, 255, .07);
}

.state-row,
.blueprint-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.state-row span,
.state-row button,
.blueprint-strip span {
    padding: 3px var(--space-2);
    border: 0;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
    font-size: var(--font-xs);
}

.state-row button:hover,
.state-row button.is-active {
    color: var(--gold);
    background: rgba(237, 198, 109, .1);
}

.text-command {
    width: fit-content;
    padding: 0;
    color: var(--cyan);
    font-size: var(--font-small);
}

.module-blueprint {
    max-width: 680px;
}

.blueprint-strip {
    margin-top: var(--space-4);
}

.window-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
}

.guide-panel {
    position: fixed;
    right: var(--space-4);
    top: calc(var(--topbar-height) + var(--space-5));
    z-index: 60;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(430px, calc(100vw - 24px));
    max-height: calc(100vh - var(--topbar-height) - 36px);
    border: 1px solid rgba(116, 225, 255, .22);
    border-radius: var(--radius-lg);
    background: rgba(10, 15, 34, .94);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-panel);
    opacity: 0;
    pointer-events: none;
    transform: translateX(12px);
    transition: opacity .18s ease, transform .18s ease;
}

.guide-panel[data-guide-type="intro"] {
    border-color: rgba(116, 225, 255, .28);
}

.guide-panel[data-guide-type="start"],
.guide-panel[data-guide-type="modules"] {
    border-color: rgba(237, 198, 109, .3);
}

.guide-panel[data-guide-type="modes"] {
    border-color: rgba(173, 140, 255, .32);
}

.guide-panel[data-guide-type="components"] {
    border-color: rgba(125, 240, 179, .28);
}

.guide-panel[data-guide-type="realtime"] {
    border-color: rgba(116, 225, 255, .3);
}

.guide-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.guide-panel header,
.guide-panel footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--line);
}

.guide-panel footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.guide-panel header button {
    width: var(--icon-size);
    height: var(--icon-size);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
    color: var(--text);
}

.guide-content {
    display: grid;
    gap: var(--space-3);
    overflow: auto;
    padding: var(--space-4);
}

.guide-content section {
    display: grid;
    gap: var(--space-1);
    padding: var(--space-3);
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .035);
}

.guide-content h3 {
    color: var(--text);
}

.guide-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.audio-inline-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.audio-control {
    flex: 0 0 auto;
    min-width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .04);
    color: var(--muted);
    font-size: 9px;
    line-height: 1;
    opacity: .76;
    transition: opacity .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.audio-control:hover {
    opacity: 1;
}

.audio-play {
    color: var(--green);
    border-color: rgba(125, 240, 179, .18);
}

.audio-play.is-playing,
.audio-play.is-paused {
    color: var(--gold);
    border-color: rgba(237, 198, 109, .34);
    background: rgba(237, 198, 109, .08);
    opacity: 1;
}

.audio-stop {
    color: var(--danger);
    border-color: rgba(255, 123, 155, .18);
}

.audio-control.is-disabled {
    opacity: .35;
    cursor: not-allowed;
}

.audio-settings-toggle {
    color: var(--cyan);
    border-color: rgba(116, 225, 255, .16);
}

.audio-settings-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 75;
    display: grid;
    gap: var(--space-3);
    width: 238px;
    padding: var(--space-3);
    border: 1px solid rgba(116, 225, 255, .18);
    border-radius: var(--radius);
    background: rgba(8, 12, 28, .97);
    box-shadow: var(--shadow-panel);
    opacity: 0;
    pointer-events: none;
    transform: translate(8px, -6px) scale(.96);
    transform-origin: top right;
    transition: opacity .16s ease, transform .16s ease;
}

.audio-settings-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
}

.audio-settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.audio-settings-head button {
    width: 22px;
    height: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
}

.audio-setting-group {
    display: grid;
    gap: var(--space-1);
}

.audio-setting-group span,
.audio-setting-group label {
    color: var(--gold);
    font-size: var(--font-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.audio-rate-options {
    display: flex;
    gap: var(--space-1);
}

.audio-rate-options button,
.audio-setting-group select {
    min-height: 24px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    font-size: var(--font-xs);
}

.audio-rate-options button {
    padding: 3px var(--space-2);
}

.audio-rate-options button.is-active {
    color: #160f22;
    border-color: rgba(237, 198, 109, .34);
    background: linear-gradient(135deg, var(--gold), #fff0b0);
}

.audio-setting-group select {
    width: 100%;
    padding: 2px var(--space-1);
}

.audio-setting-group input[type="range"] {
    width: 100%;
    accent-color: var(--gold);
}

.audio-voice-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.audio-voice-label[data-tooltip] {
    width: fit-content;
    border-bottom: 1px dotted rgba(237, 198, 109, .36);
    cursor: help;
}

.audio-voice-note,
.audio-word-note p,
.audio-pitch-note,
.audio-value-grid p {
    margin: 0;
    color: var(--muted);
    font-size: var(--font-xs);
    line-height: var(--line-base);
}

.audio-value-grid {
    padding: var(--space-2);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .03);
}

.audio-value-grid strong {
    color: var(--gold);
}

.audio-reset-button {
    min-height: 26px;
    border: 1px solid rgba(237, 198, 109, .24);
    border-radius: var(--radius-sm);
    background: rgba(237, 198, 109, .08);
    color: var(--gold);
    font-size: var(--font-xs);
}

.audio-pitch-note {
    padding: var(--space-2);
    border: 1px solid rgba(116, 225, 255, .1);
    border-radius: var(--radius-sm);
    background: rgba(116, 225, 255, .045);
}

.rivy-tooltip {
    position: fixed;
    z-index: 999;
    max-width: min(310px, calc(100vw - 20px));
    padding: var(--space-3);
    border: 1px solid rgba(116, 225, 255, .16);
    border-radius: var(--radius);
    background: rgba(7, 11, 26, .97);
    color: var(--text);
    box-shadow: var(--shadow-panel);
    font-size: var(--font-small);
    line-height: var(--line-base);
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition: opacity .14s ease, transform .14s ease;
}

.rivy-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.audio-sentence {
    border-radius: 4px;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.audio-sentence.is-reading {
    color: var(--text);
    background: rgba(116, 225, 255, .055);
    box-shadow: 0 0 0 1px rgba(116, 225, 255, .075);
}

.guide-content ul,
.guide-content ol {
    display: grid;
    gap: var(--space-1);
    margin: 0;
    padding-left: var(--space-6);
    color: var(--muted);
}

.guide-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.guide-pill {
    padding: 3px var(--space-2);
    border-radius: 99px;
    font-size: var(--font-xs);
    font-weight: 700;
}

.guide-pill.done { color: var(--green); background: rgba(125, 240, 179, .08); }
.guide-pill.info { color: var(--cyan); background: rgba(116, 225, 255, .08); }
.guide-pill.important { color: var(--gold); background: rgba(237, 198, 109, .08); }
.guide-pill.warning { color: var(--danger); background: rgba(255, 123, 155, .08); }
.guide-pill.learning { color: #b7a7ff; background: rgba(145, 118, 255, .1); }

.academy-window {
    position: absolute;
    right: var(--window-dock-offset);
    bottom: var(--window-dock-offset);
    width: var(--window-width);
    height: var(--window-height);
    min-width: 360px;
    min-height: 210px;
    max-height: calc(100vh - 24px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    pointer-events: auto;
    resize: both;
}

.academy-window.is-minimized {
    height: 40px !important;
    min-height: 40px;
    resize: none;
}

.academy-window.is-maximized {
    left: calc(var(--sidebar-width) + var(--space-4)) !important;
    right: auto !important;
    top: var(--space-4) !important;
    bottom: auto !important;
    width: calc(100vw - var(--sidebar-width) - (var(--space-4) * 2)) !important;
    height: calc(100vh - (var(--space-4) * 2)) !important;
}

.window-header {
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(0, 1.4fr) auto;
    align-items: center;
    gap: var(--space-3);
    min-height: 40px;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--line);
    background: rgba(5, 8, 20, .78);
    cursor: move;
    user-select: none;
}

.window-header strong {
    overflow: hidden;
    font-size: var(--font-small);
    line-height: var(--line-tight);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.window-tabs {
    display: flex;
    gap: var(--space-1);
    min-width: 0;
    overflow: auto;
}

.window-tab {
    flex: 0 0 auto;
    min-height: 26px;
    padding: 3px var(--space-2);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    font-size: var(--font-xs);
}

.window-tab.is-active {
    border-color: rgba(237, 198, 109, .32);
    color: var(--gold);
    background: rgba(237, 198, 109, .08);
}

.window-actions {
    display: flex;
    gap: var(--space-1);
}

.window-actions button,
.copy-button {
    min-width: 26px;
    min-height: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
    font-size: var(--font-xs);
}

.window-content {
    height: calc(100% - 40px);
    overflow: auto;
    padding: var(--space-4);
}

.academy-window.is-minimized .window-tabs,
.academy-window.is-minimized .window-content {
    display: none;
}

.code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
    color: var(--muted);
    font-size: var(--font-xs);
}

.code-editor {
    margin: 0;
    padding: var(--space-3) 0;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--radius);
    background: #090d1c;
    color: #dce7ff;
    overflow: auto;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: var(--font-xs);
    line-height: 1.52;
    counter-reset: line;
}

.code-editor code {
    display: block;
}

.code-editor .code-line {
    display: grid;
    grid-template-columns: 36px 1fr;
    min-height: 18px;
    padding-right: var(--space-3);
    white-space: pre;
}

.code-editor .code-line::before {
    counter-increment: line;
    content: counter(line);
    color: #596482;
    text-align: right;
    padding-right: var(--space-3);
    user-select: none;
}

.explain-list {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding-left: var(--space-6);
    color: var(--muted);
}

[data-mode="library"] .developer-only,
[data-mode="library"] .developer-command {
    display: none;
}

[data-mode="developer"] .library-command {
    display: none;
}

@media (max-width: 980px) {
    body { overflow: auto; }
    .academy-sidebar {
        left: 0;
        height: 100vh;
    }
    .academy-main { height: auto; min-height: 100vh; }
    .academy-topbar { position: relative; flex-wrap: wrap; }
    .studio-layout,
    .dashboard-grid,
    .catalog-layout,
    .component-grid {
        grid-template-columns: 1fr;
    }
    .button-catalog-grid {
        grid-template-columns: repeat(auto-fill, var(--catalog-card-width));
    }
    .selection-panel {
        position: relative;
    }
    .academy-window {
        left: var(--space-3) !important;
        right: auto !important;
        width: calc(100vw - (var(--space-3) * 2));
    }
    .academy-window.is-maximized {
        width: calc(100vw - (var(--space-3) * 2)) !important;
    }
}

@media (max-width: 640px) {
    .academy-topbar {
        margin-left: calc(var(--sidebar-collapsed-width) + var(--space-3));
    }
    .button-catalog-grid {
        --catalog-card-width: minmax(0, 1fr);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .academy-topbar,
    .stage-head,
    .topbar-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .level-switch { max-width: none; }
    .mode-switch button { min-width: 0; flex: 1; }
    .window-header {
        grid-template-columns: 1fr auto;
    }
    .window-tabs {
        grid-column: 1 / -1;
        order: 3;
    }
}
