:root {
    --ink: #111111;
    --muted: #71717a;
    --line: #e4e4e7;
    --panel: rgba(255, 255, 255, 0.9);
    --card-bg: #ffffff;
    --nav-bg: rgba(253, 253, 253, 0.82);
    --search-bg: #f4f4f5;
    --brand: #2563eb;
    --brand-2: #06b6d4;
    --brand-3: #f97316;
    --success: #0f9f6e;
    --bg-1: #f9fbff;
    --bg-2: #fdfdfd;
    --danger: #dc2626;
    --font-body: 'Inter', sans-serif;
    --font-display: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #b6b8c2 #ececf1;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--bg-2);
    background-image:
        radial-gradient(820px 420px at 104% -8%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 68%),
        radial-gradient(760px 400px at 2% -18%, color-mix(in srgb, var(--brand-2) 24%, transparent), transparent 72%),
        radial-gradient(900px 460px at 50% 120%, color-mix(in srgb, var(--brand-3) 14%, transparent), transparent 76%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 34%, #ffffff 100%);
    background-attachment: fixed;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: #ececf1;
}

*::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 0;
    background: #b6b8c2;
}

*::-webkit-scrollbar-thumb:hover {
    background: #9ea2af;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-title {
    font-family: var(--font-display);
    margin: 0;
    letter-spacing: -0.02em;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.ambient {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    filter: blur(48px);
    opacity: 0.7;
}

.ambient-one {
    width: 240px;
    height: 240px;
    background: #cddcff;
    top: -40px;
    right: 10%;
}

.ambient-two {
    width: 280px;
    height: 280px;
    background: #ffe0bf;
    bottom: -120px;
    left: 12%;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(20px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px clamp(14px, 2vw, 28px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: #fff;
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.brand-mark-diamond {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 4px;
    transform: rotate(45deg);
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}

.brand-title {
    font-size: clamp(16px, 2vw, 18px);
    letter-spacing: -0.01em;
}

.brand-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.topbar-badges {
    display: flex;
    gap: 8px;
}

.chip {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 10px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid var(--line);
    background: var(--card-bg);
}

.chip-dark {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.chip-ghost {
    color: #334155;
    border-color: #cfd8e6;
    background: var(--card-bg);
}

.page {
    max-width: 1600px;
    margin: 0 auto;
    padding: clamp(12px, 2vw, 22px);
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 16px;
    height: calc(100vh - 70px);
    overflow: hidden;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 18px 30px rgba(17, 17, 17, 0.04);
}

.hero {
    padding: clamp(20px, 4vw, 40px);
    position: relative;
    overflow: hidden;
}

.hero-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d7e0ee;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(6px);
}

.hero-brand-mark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--ink);
    border: 0;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.hero-brand-diamond {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 2px;
    transform: rotate(45deg);
}

.hero-brand-text {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: #111111;
}

.hero-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: #4b5f86;
    cursor: pointer;
    font-size: 14px;
    z-index: 2;
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent);
    pointer-events: none;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
}

.hero h1 {
    margin-top: 8px;
    max-width: 840px;
    letter-spacing: -0.04em;
    font-size: clamp(30px, 5.2vw, 54px);
    line-height: 1.05;
}

.hero-copy {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.6;
    margin: 14px 0 0;
}

.hero-stats {
    margin-top: 24px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.hero-stats div {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.78);
}

.hero-stats strong {
    display: block;
    font-size: 21px;
    margin-bottom: 2px;
}

.hero-stats span {
    color: var(--muted);
    font-size: 13px;
}

.studio {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) minmax(260px, 340px);
    height: 100%;
    min-height: 0;
}

body.hero-hidden .studio {
    min-height: 0;
}

.catalog,
.preview-panel,
.options-panel {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.catalog,
.options-panel,
.preview-panel {
    padding: 16px;
}

.catalog,
.options-panel,
.preview-panel {
    display: grid;
    min-height: 0;
}

.catalog {
    grid-template-rows: auto auto auto minmax(0, 1fr);
}

.preview-panel {
    grid-template-rows: auto auto auto;
}

.options-panel {
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tiny-muted {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}

.search-wrap {
    position: relative;
    margin-bottom: 10px;
}

.search-wrap i {
    position: absolute;
    left: 11px;
    top: 12px;
    color: var(--muted);
    font-size: 12px;
}

.search-wrap input {
    width: 100%;
    border-radius: 11px;
    border: 1px solid var(--line);
    padding: 10px 10px 10px 32px;
    background: var(--search-bg);
    color: var(--ink);
}

.search-wrap input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

.catalog-controls {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 10px;
    overflow: hidden;
}

.catalog-controls summary {
    list-style: none;
    cursor: pointer;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #2b4268;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-controls summary::-webkit-details-marker {
    display: none;
}

.catalog-controls summary::after {
    content: '+';
    font-size: 14px;
    color: #4b6696;
}

.catalog-controls[open] summary::after {
    content: '-';
}

.catalog-controls-body {
    border-top: 1px solid var(--line);
    padding: 8px;
    display: grid;
    gap: 8px;
}

.category-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.category-tab {
    border: 1px solid #d5dfed;
    background: #fff;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    color: #3a4f70;
}

.category-tab.active {
    background: #12203f;
    border-color: #12203f;
    color: #fff;
}

.filters-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.filters-row select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    background: #fff;
    font-size: 12px;
}

.check-inline {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #405473;
}

.check-inline-switch {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 7px 8px;
    background: #fff;
}

.drag-hint {
    grid-column: 1 / -1;
    font-size: 11px;
}

.widget-list {
    display: grid;
    gap: 8px;
    max-height: none;
    align-content: start;
    grid-auto-rows: max-content;
    min-height: 0;
    overflow: auto;
    padding: 8px 3px 4px 1px;
}

.widget-item {
    width: 100%;
    display: block;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    border-radius: 12px;
    padding: 10px 10px 11px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
    position: relative;
}

.widget-item:hover {
    transform: translateY(-1px);
    border-color: #a7bddf;
    box-shadow: inset 0 0 0 1px rgba(97, 138, 205, 0.22), 0 10px 26px rgba(41, 76, 133, 0.15);
}

.widget-item.active {
    border-color: #0b4be0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: inset 0 0 0 1px rgba(11, 75, 224, 0.24), 0 0 0 2px rgba(11, 75, 224, 0.18), 0 10px 24px rgba(37, 99, 235, 0.08);
}

.widget-item.dragging {
    opacity: 0.55;
}

.widget-item.drag-over {
    border-color: #355fa8;
    box-shadow: 0 0 0 2px rgba(53, 95, 168, 0.22);
}

.widget-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.widget-item-tools {
    display: flex;
    align-items: center;
    gap: 5px;
}

.favorite-btn,
.drag-handle {
    border: 1px solid #d3deef;
    background: rgba(255, 255, 255, 0.92);
    color: #415879;
    border-radius: 8px;
    min-width: 30px;
    height: 24px;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    font-size: 12px;
}

.favorite-btn.active {
    color: #dc2626;
    border-color: #fecaca;
    background: #fff5f5;
}

.widget-item-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: -0.01em;
    color: #111111;
}

.widget-item-desc {
    margin: 7px 0 8px;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.45;
}

.widget-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.widget-badge {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 7px;
    border-radius: 999px;
    border: 1px solid #d7e0ee;
    color: #425b81;
    background: #fbfdff;
    font-weight: 700;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.preview-controls {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.preview-tools-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.preview-context-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.preview-context-select {
    border: 1px solid var(--line);
    background: #fff;
    color: #1f2937;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    min-width: 170px;
}

.preview-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding-inline: 10px;
    background: rgba(255, 255, 255, 0.9);
}

.preview-fullscreen-btn[aria-pressed="true"] {
    border-color: #bfd0ea;
    background: #eef4ff;
    color: #21457d;
}

.segmented {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 3px;
    background: #fff;
}

.segmented button {
    border: 0;
    background: transparent;
    font-size: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    cursor: pointer;
    color: var(--muted);
}

.segmented button.active {
    background: var(--ink);
    color: #fff;
}

.delivery-tag {
    font-size: 11px;
    color: #0f4a3d;
    background: #e6fcf4;
    border: 1px solid #a8e8cf;
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 700;
}

.preview-stage {
    border-radius: 16px;
    border: 1px solid var(--line);
    background-image: radial-gradient(#dce5ef 1.1px, transparent 1px);
    background-size: 18px 18px;
    padding: 20px;
    flex: none;
    min-height: 380px;
    max-height: 500px;
    display: flex;
}

.preview-shell {
    margin: 0 auto;
    border: 1px solid #cad9ea;
    border-radius: 14px;
    background: #fff;
    min-height: 380px;
    height: 100%;
    overflow: hidden;
    transition: width 0.2s ease;
    width: 100%;
    display: flex;
}

#preview-frame {
    display: block;
    width: 100%;
    min-height: 380px;
    height: clamp(380px, 45vh, 500px);
    border: 0;
    background: #fff;
    flex: 1;
}

.code-block-wrap {
    margin-top: 12px;
}

body.preview-focus {
    overflow: hidden;
}

body.preview-focus .hero,
body.preview-focus .catalog,
body.preview-focus .options-panel {
    pointer-events: none;
    opacity: 0.2;
    filter: blur(2px);
}

body.preview-focus .preview-panel {
    position: fixed;
    inset: 12px;
    z-index: 90;
    margin: 0;
    height: auto;
    min-height: 0;
    padding: 14px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(17, 17, 17, 0.12);
    grid-template-rows: auto minmax(0, 1fr);
}

body.preview-focus .preview-panel .code-block-wrap {
    display: none;
}

body.preview-focus .preview-stage {
    min-height: 0;
    max-height: none;
    height: 100%;
    padding: 14px;
}

body.preview-focus .preview-shell {
    min-height: 0;
    height: 100%;
    max-width: none;
}

body.preview-focus #preview-frame {
    min-height: 0;
    height: 100%;
}

#snippet-reveal {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    overflow: hidden;
}

#snippet-reveal summary {
    list-style: none;
    cursor: pointer;
    padding: 11px 12px;
    font-weight: 700;
    font-size: 13px;
    color: #1f355f;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#snippet-reveal summary::-webkit-details-marker {
    display: none;
}

#snippet-reveal summary::after {
    content: '+';
    font-size: 16px;
    font-weight: 500;
    color: #44619a;
}

#snippet-reveal[open] summary::after {
    content: '-';
}

.snippet-actions {
    margin: 0;
    padding: 0 10px;
}

#code-output {
    width: 100%;
    min-height: 164px;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 10px;
    resize: vertical;
    background: #0d1320;
    color: #ddf0ff;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.45;
}

#code-output.is-locked {
    filter: blur(1.3px);
    user-select: none;
    pointer-events: none;
}

#code-output:disabled {
    opacity: 0.85;
}

.options-form {
    display: grid;
    gap: 12px;
    margin-bottom: 0;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    padding-right: 3px;
}

.field {
    display: grid;
    gap: 5px;
}

.field label {
    font-size: 12px;
    font-weight: 700;
    color: #394d68;
}

.field small {
    color: var(--muted);
    font-size: 11px;
}

.field input[type="text"],
.field input[type="url"],
.field input[type="number"],
.field input[type="datetime-local"],
.field textarea,
.field select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 14px;
    background: #fff;
}

.field textarea {
    min-height: 80px;
    resize: vertical;
}

.field .check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #31425d;
}

.check-row-switch {
    justify-content: space-between;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    width: 40px;
    height: 22px;
    flex: 0 0 auto;
}

.toggle-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.toggle-slider {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    border: 1px solid #c8d6ec;
    background: #e5edf9;
    transition: background 0.16s ease, border-color 0.16s ease;
    position: relative;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.24);
    transition: transform 0.16s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: #0b4be0;
    border-color: #0b4be0;
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid rgba(11, 75, 224, 0.35);
    outline-offset: 2px;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-row output {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 11px;
    border: 1px solid var(--line);
    color: #284175;
    background: #eef3ff;
}

.multi-grid {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.multi-grid label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 600;
    background: #fff;
}

.list-field {
    display: grid;
    gap: 8px;
}

.list-item {
    border: 1px solid #dbe4f3;
    border-radius: 11px;
    background: #f9fbff;
    padding: 8px;
    display: grid;
    gap: 8px;
}

.list-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.list-item-head p {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #304b75;
}

.list-item-grid {
    display: grid;
    gap: 8px;
}

.list-subfield {
    display: grid;
    gap: 4px;
}

.list-subfield label {
    font-size: 11px;
    color: #415777;
    font-weight: 700;
}

.list-subfield input,
.list-subfield textarea,
.list-subfield select {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 8px 9px;
    font-size: 13px;
    background: #fff;
}

.list-subfield textarea {
    min-height: 66px;
}

.list-subfield-switch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #d7e2f2;
    border-radius: 9px;
    background: #fff;
    padding: 7px 9px;
    font-size: 12px;
    color: #334c73;
    font-weight: 600;
}

.actions {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: 12px;
    display: grid;
    gap: 9px;
}

.paywall-hint {
    border: 1px dashed #d9c69c;
    background: #fff8e8;
    color: #7a5a17;
    border-radius: 10px;
    padding: 9px;
    font-size: 12px;
    line-height: 1.4;
}

.paywall-hint a {
    color: #7a5a17;
    font-weight: 700;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    border-radius: 11px;
    border: 1px solid transparent;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
}

.primary-btn {
    color: #fff;
    border: 0;
    background: linear-gradient(115deg, #2563eb 0%, #1d4ed8 38%, #0ea5e9 100%);
    box-shadow: 0 12px 24px -16px rgba(37, 99, 235, 0.55);
}

.primary-btn.is-locked,
.secondary-btn.is-locked,
.ghost-btn.is-locked {
    position: relative;
    overflow: hidden;
    opacity: 0.86;
    filter: saturate(0.7);
}

.primary-btn.is-locked::before,
.secondary-btn.is-locked::before,
.ghost-btn.is-locked::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.28);
    pointer-events: none;
}

.primary-btn.is-locked::after,
.secondary-btn.is-locked::after,
.ghost-btn.is-locked::after {
    content: 'LOCK';
    margin-left: 6px;
    font-size: 10px;
    letter-spacing: 0.04em;
}

.secondary-btn {
    color: #334155;
    border-color: var(--line);
    background: var(--card-bg);
}

.ghost-btn {
    color: #1f355f;
    border-color: var(--line);
    background: #fff;
    font-size: 12px;
    padding: 7px 9px;
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #0f172a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
    z-index: 30;
    font-size: 13px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 1180px) {
    .page {
        height: auto;
        overflow: visible;
    }

    .studio {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .catalog,
    .preview-panel,
    .options-panel {
        min-height: auto;
        height: auto;
    }

    .widget-list,
    .options-form {
        max-height: none;
    }

    .preview-shell {
        width: 100%;
    }

    .preview-stage {
        min-height: 360px;
        max-height: none;
    }

    .preview-controls {
        justify-items: start;
    }

    .preview-tools-row {
        justify-content: flex-start;
    }

    .preview-header {
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .topbar {
        align-items: flex-start;
        gap: 10px;
        flex-direction: column;
    }

    .topbar-badges {
        width: 100%;
    }

    .chip {
        flex: 1;
        text-align: center;
    }

    .hero h1 {
        font-size: 32px;
    }

    .multi-grid {
        grid-template-columns: 1fr;
    }

    .preview-tools-row {
        width: 100%;
    }

    .preview-context-select {
        min-width: 0;
        width: 100%;
    }

    #preview-frame {
        min-height: 360px;
        height: 360px;
    }
}
