/* ==========================================================================
   Frame Manager — main stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   Theme tokens
   -------------------------------------------------------------------------- */
:root {
    color-scheme: dark;

    --bg: #0a0d17;

    --surface: rgba(17, 22, 36, .78);
    --surface-2: rgba(24, 30, 48, .94);
    --surface-3: rgba(36, 44, 68, .94);

    --stroke: rgba(151, 165, 205, .18);
    --stroke-strong: rgba(151, 165, 205, .32);

    --text: #eef2fb;
    --text-2: #bcc4db;
    --text-3: #737c98;

    --accent: #7c9cff;
    --accent-2: #5eead4;
    --grad: linear-gradient(135deg, #778df4 0%, #b594f6 100%);

    --danger: #f87171;
    --warn: #fbbf24;
    --ok: #34d399;

    --blob-a: #4a63e4;
    --blob-b: #2dd4bf;
    --blob-c: #b89dfa;

    --radius-m: 14px;
    --radius-l: 22px;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .38), 0 10px 28px rgba(0, 0, 0, .34);
    --shadow-2: 0 16px 48px rgba(0, 0, 0, .54);
}

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f2f4fb;

    --surface: rgba(255, 255, 255, .78);
    --surface-2: rgba(255, 255, 255, .94);
    --surface-3: #e9edf7;

    --stroke: rgba(22, 31, 62, .1);
    --stroke-strong: rgba(22, 31, 62, .2);

    --text: #121830;
    --text-2: #47516e;
    --text-3: #8790ab;

    --accent: #4f6ef2;
    --accent-2: #0d9488;
    --grad: linear-gradient(135deg, #4f6ef2 0%, #8b5cf6 100%);

    --danger: #dc2626;
    --warn: #b45309;
    --ok: #059669;

    --blob-a: #7c9cff;
    --blob-b: #5eead4;
    --blob-c: #c4b5fd;

    --shadow-1: 0 1px 2px rgba(22, 31, 62, .08), 0 10px 28px rgba(22, 31, 62, .12);
    --shadow-2: 0 16px 48px rgba(22, 31, 62, .22);
}

@media (prefers-color-scheme: light) {
    html[data-theme="auto"] {
        color-scheme: light;

        --bg: #f2f4fb;

        --surface: rgba(255, 255, 255, .78);
        --surface-2: rgba(255, 255, 255, .94);
        --surface-3: #e9edf7;

        --stroke: rgba(22, 31, 62, .1);
        --stroke-strong: rgba(22, 31, 62, .2);

        --text: #121830;
        --text-2: #47516e;
        --text-3: #8790ab;

        --accent: #4f6ef2;
        --accent-2: #0d9488;
        --grad: linear-gradient(135deg, #4f6ef2 0%, #8b5cf6 100%);

        --danger: #dc2626;
        --warn: #b45309;
        --ok: #059669;

        --blob-a: #7c9cff;
        --blob-b: #5eead4;
        --blob-c: #c4b5fd;

        --shadow-1: 0 1px 2px rgba(22, 31, 62, .08), 0 10px 28px rgba(22, 31, 62, .12);
        --shadow-2: 0 16px 48px rgba(22, 31, 62, .22);
    }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; width: 100%; overflow: hidden; }

body {
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
                 Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* Everything the app draws sits above the backdrop. */
.app {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* --------------------------------------------------------------------------
   Aurora backdrop — soft drifting blobs + subtle film grain
   -------------------------------------------------------------------------- */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: var(--bg);
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .28;
    will-change: transform;
}
.blob-a {
    width: 46vw; height: 46vw;
    top: -18vw; right: -10vw;
    background: radial-gradient(circle at 35% 35%, var(--blob-a), transparent 68%);
    animation: drift-a 36s ease-in-out infinite alternate;
}
.blob-b {
    width: 42vw; height: 42vw;
    bottom: -20vw; left: -12vw;
    background: radial-gradient(circle at 60% 60%, var(--blob-b), transparent 68%);
    animation: drift-b 44s ease-in-out infinite alternate;
}
.blob-c {
    width: 36vw; height: 36vw;
    top: 26%; left: 33%;
    background: radial-gradient(circle at 50% 50%, var(--blob-c), transparent 68%);
    opacity: .16;
    animation: drift-c 52s ease-in-out infinite alternate;
}

.grain {
    position: absolute;
    inset: 0;
    opacity: .05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

@keyframes drift-a { to { transform: translate(-7vw, 5vh) scale(1.06); } }
@keyframes drift-b { to { transform: translate(6vw, -6vh) scale(1.08); } }
@keyframes drift-c { to { transform: translate(4vw, 6vh) scale(1.12); } }

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.app-header {
    position: relative;
    z-index: 10;
    min-height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--stroke);
}

.brand { display: flex; align-items: center; gap: 12px; margin-right: 16px; }
.brand-logo {
    width: 26px;
    height: 26px;
    display: block;
    filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 50%, transparent));
}
.brand-text h1 { font-size: 15px; font-weight: 650; letter-spacing: .01em; line-height: 1.15; }
.brand-text span { font-size: 11.5px; color: var(--text-3); opacity: .78; letter-spacing: .04em; }

.spacer { flex: 1; }
.sep { width: 1px; height: 20px; background: var(--stroke-strong); margin: 0 4px; flex-shrink: 0; }

.preset-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-3);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--stroke);
    background: var(--surface-2);
    color: var(--text);
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .01em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform .15s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover {
    border-color: var(--stroke-strong);
    background: var(--surface-3);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* armed state (e.g. swap mode) */
.btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.btn.active:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }

.btn-accent {
    border-color: transparent;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn-accent:hover {
    border-color: transparent;
    background: var(--grad);
    box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 55%, transparent);
    transform: translateY(-1px);
}

.btn-danger { color: var(--danger); }
.btn-danger:hover {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dirty-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--warn);
    box-shadow: 0 0 8px var(--warn);
    margin-left: 2px;
}

/* --------------------------------------------------------------------------
   Inputs & select
   -------------------------------------------------------------------------- */
input[type="text"],
input[type="password"],
select {
    background: var(--surface-2);
    border: 1px solid var(--stroke);
    color: var(--text);
    border-radius: 12px;
    padding: 8px 12px;
    font: inherit;
    font-size: 13.5px;
    outline: none;
    width: 100%;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder { color: var(--text-3); }
input[readonly] {
    opacity: .85;
    background: var(--surface-3);
    cursor: default;
}
input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

select {
    appearance: none;
    -webkit-appearance: none;
    max-width: 210px;
    padding-right: 34px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa4c2' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* --------------------------------------------------------------------------
   Form fields
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 4px; }
.field span {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Save-inline bar
   -------------------------------------------------------------------------- */
.save-inline {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--stroke);
    flex-shrink: 0;
}
.save-inline[hidden] { display: none; }
.save-inline .field { min-width: 0; }
#preset-name-input { min-width: 210px; }
#preset-password-input { min-width: 160px; }

/* --------------------------------------------------------------------------
   Hint bar
   -------------------------------------------------------------------------- */
.hintbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--stroke);
    color: var(--text-2);
    font-size: 12.5px;
    flex-shrink: 0;
}
.hintbar[hidden] { display: none; }
.hintbar .hint-icon { color: var(--accent); }
.hintbar b { color: var(--text); font-weight: 600; }
.hintbar code {
    color: var(--accent);
    background: var(--surface-3);
    border: 1px solid var(--stroke);
    padding: 1px 8px;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Workspace & split tree
   -------------------------------------------------------------------------- */
#workspace { position: relative; flex: 1; min-width: 0; min-height: 0; }

/* landing — shown when no preset is loaded */
.landing {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px;
}
.landing-inner {
    text-align: center;
    max-width: 360px;
}
.landing-logo {
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--accent) 50%, transparent));
}
.landing-inner h2 {
    font-size: 18px;
    font-weight: 650;
    letter-spacing: .01em;
    margin-bottom: 10px;
}
.landing-inner p {
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.6;
}
.landing-inner b {
    color: var(--text);
    font-weight: 600;
}

.split {
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}
.split-row { flex-direction: row; }
.split-col { flex-direction: column; }
.split > :first-child { flex: 0 0 50%; min-width: 0; min-height: 0; }
.split > :last-child  { flex: 1 1 0%; min-width: 0; min-height: 0; }

/* dividers — the resize line is always visible, prominent while editing */
.divider {
    position: relative;
    z-index: 30;
    background: transparent;
    touch-action: none;
    flex-shrink: 0;
}
.divider-row { flex: 0 0 7px; width: 7px; cursor: ew-resize; }
.divider-col { flex: 0 0 7px; height: 7px; cursor: ns-resize; }

/* always-visible thin resize line */
.divider::before {
    content: "";
    position: absolute;
    background: var(--stroke);
    transition: background .15s ease;
}
.divider-row::before { top: 0; bottom: 0; left: 50%; width: 1.5px; transform: translateX(-50%); }
.divider-col::before { left: 0; right: 0; top: 50%; height: 1.5px; transform: translateY(-50%); }

/* edit mode: resize lines are clearly visible */
body.editing .divider-row::before { background: color-mix(in srgb, var(--accent) 45%, transparent); width: 2px; }
body.editing .divider-col::before { background: color-mix(in srgb, var(--accent) 45%, transparent); height: 2px; }

/* drag in progress: full accent line */
body.resizing .divider-row::before { background: var(--accent); width: 2px; }
body.resizing .divider-col::before { background: var(--accent); height: 2px; }

/* grip pill on hover / drag */
.divider::after {
    content: "";
    position: absolute;
    background: var(--accent);
    border-radius: 999px;
    box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}
.divider-row::after {
    top: 50%; left: 50%;
    width: 4px; height: 34px;
    transform: translate(-50%, -50%) scale(.6);
}
.divider-col::after {
    top: 50%; left: 50%;
    width: 34px; height: 4px;
    transform: translate(-50%, -50%) scale(.6);
}
.divider:hover::after,
.divider.active::after {
    opacity: .9;
    transform: translate(-50%, -50%) scale(1);
}

body.resizing { user-select: none; }
body.resizing-row { cursor: ew-resize; }
body.resizing-col { cursor: ns-resize; }

/* --------------------------------------------------------------------------
   Frames
   -------------------------------------------------------------------------- */
.leaf { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; }

.leaf-editor {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
    /* flat blueprint-holo grid — purely decorative, no glow, no gradient */
    background-color: color-mix(in srgb, var(--bg) 62%, var(--surface-2));
    background-image:
        linear-gradient(to right, color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px),
        linear-gradient(to right, color-mix(in srgb, var(--accent) 2.5%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in srgb, var(--accent) 2.5%, transparent) 1px, transparent 1px);
    background-size: 26px 26px, 26px 26px, 130px 130px, 130px 130px;
    background-position: center;
}

.editor-inner {
    width: min(340px, 94%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    background: var(--surface-2);
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-1);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.editor-inner:focus-within {
    border-color: color-mix(in srgb, var(--accent) 48%, transparent);
    box-shadow: var(--shadow-1), 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}
.editor-inner input[type="text"] {
    background: var(--surface);
}

.frame-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.btn-icon {
    padding: 0;
    width: 31px;
    height: 31px;
    min-width: 0;
}
.btn-swap-frame svg {
    display: block;
    width: 15px;
    height: 15px;
    opacity: .7;
    transition: opacity .15s ease;
}
.btn-swap-frame:hover svg {
    opacity: 1;
}

.flash { animation: flashBg 1.5s ease; }
@keyframes flashBg {
    0%, 100% { border-color: var(--stroke-strong); }
    25%, 55% {
        border-color: var(--danger);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 25%, transparent);
    }
}

/* swap mode — pick source, then destination */
body.swapping .leaf-editor { cursor: pointer; }
body.swapping .leaf-editor::after {
    content: "⇄";
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--stroke-strong);
    color: var(--accent);
    font-size: 13px;
    box-shadow: var(--shadow-1);
    pointer-events: none;
}
.leaf-editor.swap-source {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background-color: color-mix(in srgb, var(--accent) 8%, transparent);
}
.leaf-editor.swap-source::after {
    content: "Source";
    width: auto;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    color: var(--text);
}

.leaf-live { background: var(--bg); box-shadow: inset 0 0 0 1px var(--stroke); }
.leaf-live iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.frame-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    padding: 4px 12px;
    max-width: 72%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    font-weight: 550;
    letter-spacing: .02em;
    color: var(--text);
    background: color-mix(in srgb, var(--bg) 62%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--stroke-strong);
    border-radius: 999px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}
.leaf-live:hover .frame-badge { opacity: 1; transform: none; }

.drag-overlay { position: absolute; inset: 0; z-index: 60; background: transparent; }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.modal.show { opacity: 1; pointer-events: auto; }

.modal-card {
    width: min(360px, 94vw);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px;
    background: var(--surface-2);
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-2);
    transform: translateY(10px) scale(.98);
    transition: transform .2s ease;
}
.modal.show .modal-card { transform: none; }
.modal-card h3 { font-size: 16px; font-weight: 650; }
.modal-desc { font-size: 13px; color: var(--text-2); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
#toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 400;
    transform: translateX(-50%) translateY(14px);
    max-width: min(560px, 88vw);
    padding: 10px 16px;
    background: var(--surface-2);
    border: 1px solid var(--stroke-strong);
    border-radius: 999px;
    box-shadow: var(--shadow-2);
    color: var(--text);
    font-size: 13px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --------------------------------------------------------------------------
Shared / read-only view
-------------------------------------------------------------------------- */
.shared-bar {
display: none;
position: fixed;
top: 16px;
right: 16px;
z-index: 100;
align-items: center;
gap: 8px;
padding: 8px;
background: var(--surface);
backdrop-filter: blur(18px) saturate(1.4);
-webkit-backdrop-filter: blur(18px) saturate(1.4);
border: 1px solid var(--stroke);
border-radius: 999px;
box-shadow: var(--shadow-1), 0 2px 12px rgba(0, 0, 0, .12);
}

.shared-brand {
display: none;
position: fixed;
top: 16px;
left: 16px;
z-index: 100;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
padding: 6px;
background: var(--surface);
backdrop-filter: blur(18px) saturate(1.4);
-webkit-backdrop-filter: blur(18px) saturate(1.4);
border: 1px solid var(--stroke);
border-radius: 999px;
box-shadow: var(--shadow-1), 0 2px 12px rgba(0, 0, 0, .12);
cursor: pointer;
transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.shared-brand:hover {
    transform: translateY(-2px);
    border-color: var(--stroke-strong);
    box-shadow: var(--shadow-1), 0 8px 26px color-mix(in srgb, var(--accent) 38%, transparent);
}
.shared-brand .brand-logo { width: 18px; height: 18px; }

body.shared .shared-bar { display: flex; }
body.shared .shared-brand { display: flex; }
body.shared .app-header,
body.shared .save-inline,
body.shared .hintbar { display: none; }

/* view=1 — strict read-only: no chrome, no edit icon, nothing */
body.view-only .shared-bar { display: none !important; }
body.view-only .shared-brand { display: none !important; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
* { scrollbar-width: none !important; -ms-overflow-style: none !important; }

@media (prefers-reduced-motion: reduce) {
    .blob { animation: none; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 760px) {
    .brand-text span { display: none; }
    .app-header { padding: 10px 12px; gap: 6px; }
    .hintbar { font-size: 11.5px; padding: 8px 12px; }
    .save-inline { padding: 10px 12px; }
    .editor-inner { padding: 20px; gap: 10px; }
    #toast { max-width: min(340px, 92vw); font-size: 12px; }
}
