:root {
    color-scheme: dark;
    --bg: #08070d;
    --panel: #12101a;
    --panel-2: #171420;
    --panel-3: #1d1929;
    --line: rgba(247, 244, 255, 0.11);
    --line-strong: rgba(247, 244, 255, 0.2);
    --text: #f7f4ff;
    --muted: #aaa4ba;
    --subtle: #777184;
    --lyra: #9c5cff;
    --lyra-deep: #6d28d9;
    --crystal: #7ddcff;
    --crystal-bright: #c9f4ff;
    --shared: #c184ff;
    --rose: #ff7dae;
    --success: #5be3a2;
    --warning: #ffc76e;
    --danger: #ff7d90;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
}

* {
    box-sizing: border-box;
}
html,
body {
    min-height: 100%;
}
body {
    margin: 0;
    background:
        radial-gradient(circle at 8% 88%, rgba(109, 40, 217, 0.16), transparent 32rem),
        radial-gradient(circle at 95% 4%, rgba(125, 220, 255, 0.13), transparent 28rem), var(--bg);
    color: var(--text);
    overflow-x: hidden;
}
button,
input,
select {
    font: inherit;
}
button {
    color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--crystal);
    outline-offset: 2px;
}
::selection {
    background: rgba(193, 132, 255, 0.35);
}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0b0911;
}
::-webkit-scrollbar-thumb {
    background: #302942;
    border-radius: 999px;
}

.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}
.ambient::before,
.ambient::after {
    content: '';
    position: absolute;
    width: 44rem;
    height: 44rem;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.12;
}
.ambient::before {
    left: -24rem;
    bottom: -20rem;
    background: var(--lyra);
}
.ambient::after {
    right: -24rem;
    top: -24rem;
    background: var(--crystal);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 7, 13, 0.82);
    backdrop-filter: blur(24px) saturate(135%);
}
.header-inner {
    width: min(1720px, 100%);
    min-height: 72px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.our-world-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
}

.our-world-label {
    font-size: 0.55rem;
    line-height: 1;
    letter-spacing: 0.18em;
    font-weight: 800;
    color: var(--subtle);
}

.our-world-couple {
    display: flex;
    align-items: center;
    gap: 7px;
}

.social-love-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 44px;
    min-height: 44px;
    padding: 0 6px;

    gap: 5px;
    color: var(--text);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;

    transition:
        color 0.18s ease,
        transform 0.18s ease,
        text-shadow 0.18s ease;
}

.social-love-link:hover {
    transform: translateY(-1px);
}

.lyra-link:hover {
    color: var(--lyra, #c184ff);
    text-shadow: 0 0 14px rgba(193, 132, 255, 0.42);
}

.crystal-link:hover {
    color: var(--crystal, #7ddcff);
    text-shadow: 0 0 14px rgba(125, 220, 255, 0.42);
}

.music-link:hover {
    color: var(--shared);
    text-shadow: 0 0 14px rgba(193, 132, 255, 0.42);
}

.music-link .social-symbol {
    color: var(--shared);
}

.social-symbol {
    font-size: 0.75rem;
}

.lyra-link .social-symbol {
    color: #c184ff;
}

.crystal-link .social-symbol {
    color: #7ddcff;
}

.social-heart {
    color: rgba(247, 244, 255, 0.48);
    font-size: 0.72rem;
}
.brand-mark {
    width: 82px;
    height: 52px;
    flex: 0 0 82px;

    display: grid;
    place-items: center;

    overflow: visible;
}

.brand-mark svg {
    width: 48px;
    height: 30px;
    display: block;

    transform: scale(1.8);
    transform-origin: center;
    overflow: visible;
}

.brand-copy {
    min-width: 0;
}
.eyebrow {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.brand h1 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.08rem, 2vw, 1.42rem);
    font-weight: 500;
    letter-spacing: 0.025em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand h1 span {
    background: linear-gradient(90deg, #d9baff, #f7f4ff 50%, var(--crystal-bright));
    -webkit-background-clip: text;
    color: transparent;
}
.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.privacy-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}
.privacy-pill i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 14px rgba(91, 227, 162, 0.75);
}

.icon-button,
.ghost-button,
.tool-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 11px;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s,
        color 0.2s,
        transform 0.15s;
}
.icon-button:hover,
.ghost-button:hover,
.tool-button:hover {
    border-color: rgba(193, 132, 255, 0.4);
    background: rgba(193, 132, 255, 0.1);
}
.icon-button:active,
.ghost-button:active,
.tool-button:active {
    transform: translateY(1px);
}
.ghost-button {
    min-height: 40px;
    padding: 0 14px;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 700;
}
.ghost-button[disabled] {
    opacity: 0.42;
    cursor: not-allowed;
}

.app-shell {
    width: min(1720px, 100%);
    min-height: calc(100vh - 73px);
    margin: 0 auto;
    padding: 22px 24px 26px;
    display: grid;
    grid-template-columns: minmax(286px, 342px) minmax(0, 1fr);
    gap: 18px;
}
.control-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.panel-card,
.workspace {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(23, 20, 32, 0.91), rgba(15, 13, 22, 0.91));
    box-shadow: var(--shadow);
}
.panel-card {
    padding: 17px;
    border-radius: var(--radius);
}
.section-heading {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #ded8eb;
}
.section-heading small {
    color: var(--subtle);
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
}
.dropzone {
    min-height: 106px;
    padding: 18px 14px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed rgba(193, 132, 255, 0.36);
    border-radius: 15px;
    background:
        linear-gradient(135deg, rgba(156, 92, 255, 0.07), rgba(125, 220, 255, 0.045)),
        rgba(0, 0, 0, 0.14);
    cursor: pointer;
    transition: 0.2s ease;
}
.dropzone:hover,
.dropzone.is-over {
    border-color: var(--crystal);
    background: linear-gradient(135deg, rgba(156, 92, 255, 0.13), rgba(125, 220, 255, 0.1));
    transform: translateY(-1px);
}
.dropzone input {
    display: none;
}
.upload-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    color: var(--shared);
}
.dropzone strong {
    display: block;
    font-size: 0.92rem;
}
.dropzone span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.76rem;
}
.preset-row {
    display: flex;
    gap: 7px;
    margin-top: 10px;
}
.preset-button {
    flex: 1;
    min-width: 0;
    padding: 8px 7px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 0.74rem;
    cursor: pointer;
    transition: 0.2s;
}
.preset-button:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.segmented {
    display: grid;
    gap: 7px;
    padding: 4px;
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.055);
}
.segmented.three {
    grid-template-columns: repeat(3, 1fr);
}
.segmented button {
    min-height: 39px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 0.81rem;
    font-weight: 750;
    cursor: pointer;
    transition: 0.2s ease;
}
.segmented button:hover {
    color: var(--text);
}
.segmented button.active {
    color: #fff;
    border-color: rgba(193, 132, 255, 0.36);
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.45), rgba(125, 220, 255, 0.17));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 8px 24px rgba(109, 40, 217, 0.15);
}
.segmented.style-control button:first-child.active {
    border-color: rgba(125, 220, 255, 0.42);
    background: rgba(125, 220, 255, 0.12);
    color: var(--crystal-bright);
}
.segmented.style-control button:last-child.active {
    border-color: rgba(156, 92, 255, 0.44);
    background: rgba(156, 92, 255, 0.15);
    color: #d9baff;
}
.style-note {
    margin: 9px 2px 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.engine-control button {
    min-height: 47px;
    line-height: 1.15;
}
.engine-control button small {
    display: block;
    margin-top: 3px;
    color: var(--subtle);
    font-size: 0.64rem;
    font-weight: 650;
}
.engine-control button.active small {
    color: rgba(255, 255, 255, 0.72);
}
.model-panel[hidden] {
    display: none;
}
.model-select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #0d0b13;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
}
.model-summary {
    margin: 10px 1px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 12px;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}
.model-summary strong {
    color: var(--text);
    font-size: 0.76rem;
}
.model-summary .full {
    grid-column: 1 / -1;
}
.model-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.72rem;
}
.model-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 10px rgba(255, 199, 110, 0.42);
}
.model-status.ready::before {
    background: var(--success);
    box-shadow: 0 0 10px rgba(91, 227, 162, 0.55);
}
.model-status.error::before {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(255, 125, 144, 0.55);
}
.license-note {
    margin: 10px 1px 0;
    color: var(--subtle);
    font-size: 0.68rem;
    line-height: 1.4;
}
.license-note a {
    color: var(--crystal);
}

.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.mode-card {
    min-height: 70px;
    padding: 11px 12px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: 0.2s ease;
}
.mode-card:hover {
    border-color: rgba(193, 132, 255, 0.34);
    transform: translateY(-1px);
}
.mode-card.active {
    border-color: rgba(193, 132, 255, 0.5);
    background: linear-gradient(135deg, rgba(156, 92, 255, 0.14), rgba(125, 220, 255, 0.07));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.mode-card strong {
    display: block;
    font-size: 0.82rem;
}
.mode-card span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.25;
}

details.advanced {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.15);
}
details.advanced summary {
    padding: 13px 14px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 750;
}
details.advanced summary::-webkit-details-marker {
    display: none;
}
details.advanced summary::after {
    content: '⌄';
    font-size: 1rem;
    transition: transform 0.2s;
}
details[open].advanced summary::after {
    transform: rotate(180deg);
}
.advanced-body {
    padding: 0 14px 14px;
    display: grid;
    gap: 11px;
}
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}
.field label {
    display: block;
    margin: 0 0 6px;
    color: var(--subtle);
    font-size: 0.7rem;
    font-weight: 700;
}
.field select {
    width: 100%;
    min-height: 38px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0d0b13;
    color: var(--text);
    font-size: 0.78rem;
}
.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 0.76rem;
    cursor: pointer;
}
.check-row input {
    accent-color: var(--shared);
    width: 16px;
    height: 16px;
}

.run-card {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1000;

    width: min(520px, calc(100vw - 32px));

    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(193, 132, 255, 0.34);

    background: linear-gradient(135deg, rgba(23, 18, 34, 0.96), rgba(16, 18, 28, 0.96));

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.42),
        0 0 30px rgba(156, 92, 255, 0.12);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body {
    padding-bottom: 120px;
}

@media (max-width: 700px) {
    .run-card {
        bottom: 10px;
        width: calc(100vw - 20px);
        border-radius: 16px;
    }

    body {
        padding-bottom: 115px;
    }
}

.run-card .resolution-line {
    padding: 7px 11px 4px;
}

.run-card .primary-button {
    min-height: 54px;
}

.run-card .button-caption {
    margin: 6px 8px 7px;
}
.resolution-line {
    padding: 10px 11px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.75rem;
}
.resolution-line strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.primary-button {
    width: 100%;
    min-height: 51px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(110deg, var(--lyra-deep), var(--shared) 48%, #4bbdde);
    color: #fff;
    font-weight: 850;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow:
        0 14px 34px rgba(109, 40, 217, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition:
        transform 0.18s ease,
        filter 0.18s ease;
}
.primary-button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.primary-button:active {
    transform: translateY(1px);
}
.primary-button[disabled] {
    opacity: 0.58;
    cursor: progress;
    transform: none;
}
.button-caption {
    margin: 7px 8px 8px;
    text-align: center;
    color: var(--muted);
    font-size: 0.7rem;
}

.workspace {
    min-width: 0;
    min-height: 690px;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.workspace-toolbar {
    min-height: 62px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.018);
}
.tool-group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.tool-button {
    min-height: 36px;
    padding: 0 11px;
    color: var(--muted);
    font-size: 0.77rem;
    font-weight: 750;
    white-space: nowrap;
}
.tool-button.active {
    color: var(--crystal-bright);
    border-color: rgba(125, 220, 255, 0.38);
    background: rgba(125, 220, 255, 0.09);
}
.icon-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}
.zoom-readout {
    min-width: 57px;
    text-align: center;
    color: var(--crystal-bright);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.viewport {
    position: relative;
    flex: 1;
    min-height: 540px;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 28px;
    background-color: #09080d;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.018) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.018) 75%);
    background-size: 22px 22px;
    background-position:
        0 0,
        0 11px,
        11px -11px,
        -11px 0;
    touch-action: none;
    cursor: grab;
}
.viewport.is-panning {
    cursor: grabbing;
}
.stage {
    position: relative;
    width: min(100%, 1060px);
    height: min(100%, 650px);
    display: grid;
    place-items: center;
    transform-origin: center;
    transition: transform 0.12s ease-out;
}
.image-frame {
    --ratio: 1.5;
    position: relative;
    width: min(100%, calc((100vh - 235px) * var(--ratio)));
    max-height: calc(100vh - 235px);
    aspect-ratio: var(--ratio);
    overflow: hidden;
    border-radius: 13px;
    border: 1px solid rgba(247, 244, 255, 0.17);
    background: #050407;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(156, 92, 255, 0.06);
}
.image-frame canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}
#originalCanvas {
    image-rendering: auto;
}
#resultCanvas {
    clip-path: inset(0 0 0 50%);
}
#gridCanvas {
    pointer-events: none;
    z-index: 4;
}
.frame-badge {
    position: absolute;
    top: 13px;
    z-index: 7;
    padding: 6px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(8, 7, 13, 0.76);
    backdrop-filter: blur(12px);
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
}
.frame-badge.original {
    left: 13px;
}
.frame-badge.result {
    right: 13px;
    color: var(--crystal-bright);
}
.split-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 8;
    width: 2px;
    background: linear-gradient(180deg, var(--lyra), #fff 48%, var(--crystal));
    box-shadow: 0 0 17px rgba(193, 132, 255, 0.55);
    pointer-events: none;
}
.split-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 9;
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%) rotate(45deg);
    display: grid;
    place-items: center;
    border: 1px solid rgba(247, 244, 255, 0.52);
    border-radius: 11px;
    background: linear-gradient(145deg, #231a37, #132632);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.48),
        0 0 22px rgba(193, 132, 255, 0.34);
    cursor: ew-resize;
    touch-action: none;
}
.split-handle::before {
    content: '◇';
    transform: rotate(-45deg);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
}
.split-handle:hover {
    filter: brightness(1.18);
}

.loupe {
    position: absolute;
    z-index: 12;
    width: 190px;
    height: 190px;
    transform: translate(-50%, -50%);
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--crystal);
    background: #050407;
    box-shadow:
        0 18px 60px rgba(0, 0, 0, 0.58),
        0 0 24px rgba(125, 220, 255, 0.28);
    pointer-events: none;
    display: none;
}
.loupe::after {
    content: '4×';
    position: absolute;
    right: 14px;
    bottom: 12px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(8, 7, 13, 0.78);
    color: var(--crystal-bright);
    font-size: 0.7rem;
    font-weight: 800;
}
.loupe canvas {
    width: 100%;
    height: 100%;
}

.sbs {
    position: absolute;
    inset: 20px;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    z-index: 11;
}
.sbs-pane {
    position: relative;
    min-width: 0;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.35);
}
.sbs-pane canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.sbs-pane span {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(8, 7, 13, 0.78);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sbs-pane:last-child span {
    color: var(--crystal-bright);
}

.progress-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(8, 7, 13, 0.82);
    backdrop-filter: blur(18px);
}
.progress-card {
    width: min(410px, 100%);
    padding: 24px;
    border: 1px solid rgba(193, 132, 255, 0.28);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(29, 25, 41, 0.98), rgba(13, 11, 19, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
}
.progress-card h2 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.38rem;
    font-weight: 500;
}
.progress-card p {
    margin: 7px 0 18px;
    color: var(--muted);
    font-size: 0.82rem;
}
.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}
.progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--lyra), var(--shared), var(--crystal));
    box-shadow: 0 0 18px rgba(193, 132, 255, 0.34);
    transition: width 0.12s linear;
}
.progress-meta {
    margin-top: 11px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
}
.our-world-follow {
    font-size: 0.56rem;
    line-height: 1.2;
    letter-spacing: 0.05em;
    color: var(--subtle);
    white-space: nowrap;
}

/* =========================================================
   STORY / ABOUT
   ========================================================= */

.story-section {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 110px 28px 90px;
}

.story-intro {
    max-width: 760px;
    margin: 0 auto 72px;
    text-align: center;
}

.story-eyebrow {
    margin: 0 0 14px;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.22em;
    color: var(--crystal);
}

.story-intro h2,
.story-love h2,
.story-social h2 {
    margin: 0 0 22px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
    color: var(--text);
}

.story-intro h2 span {
    background: linear-gradient(90deg, #c184ff, #7ddcff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.story-intro p,
.story-love p,
.story-social p {
    max-width: 680px;
    margin: 0 auto 15px;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.75;
}

.story-highlight {
    margin-top: 25px !important;
    color: var(--text) !important;
    font-weight: 750;
}

/* THREE STEPS */

.story-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 0 0 100px;
}

.story-card {
    position: relative;
    min-height: 250px;
    padding: 28px;
    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 18px;

    background:
        radial-gradient(circle at top left, rgba(156, 92, 255, 0.12), transparent 45%),
        rgba(255, 255, 255, 0.025);
}

.story-card::after {
    content: '';
    position: absolute;
    inset: auto -35px -55px auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(125, 220, 255, 0.06);
    filter: blur(18px);
}

.story-number {
    display: block;
    margin-bottom: 32px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    color: var(--crystal);
}

.story-card h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 1.15rem;
}

.story-card p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.story-card strong {
    display: block;
    color: var(--text);
    font-size: 0.79rem;
    line-height: 1.55;
}

/* LOVE / WHY SECTION */

.story-love {
    position: relative;
    max-width: 850px;
    margin: 0 auto 100px;
    padding: 70px 45px;
    text-align: center;

    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.story-love::before {
    content: '◇';
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%);

    padding: 5px 14px;
    background: var(--bg);

    color: var(--crystal);
    font-size: 1rem;
}

.story-motto {
    margin-top: 30px !important;
    color: var(--text) !important;

    font-weight: 800;
    font-size: 0.88rem !important;
    line-height: 1.8 !important;

    letter-spacing: 0.035em;
}

/* SOCIAL ENDING */

.story-social {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.story-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;

    margin-top: 28px;
}

.story-social-links > span {
    color: rgba(247, 244, 255, 0.4);
}

.story-social-link {
    display: inline-flex;
    align-items: center;

    padding: 11px 18px;

    border: 1px solid var(--line);
    border-radius: 999px;

    color: var(--text);
    text-decoration: none;

    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.09em;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease;
}

.story-social-link:hover {
    transform: translateY(-2px);
}

.lyra-story-link:hover {
    color: #c184ff;
    border-color: rgba(193, 132, 255, 0.45);
    box-shadow: 0 0 24px rgba(193, 132, 255, 0.12);
}

.crystal-story-link:hover {
    color: #7ddcff;
    border-color: rgba(125, 220, 255, 0.45);
    box-shadow: 0 0 24px rgba(125, 220, 255, 0.12);
}

.story-follow {
    margin-top: 14px !important;
    font-size: 0.68rem !important;
    color: var(--subtle) !important;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .story-section {
        padding: 80px 20px 70px;
    }

    .story-steps {
        grid-template-columns: 1fr;
        max-width: 620px;
        margin-left: auto;
        margin-right: auto;
    }

    .story-card {
        min-height: auto;
    }
}

@media (max-width: 600px) {
    .story-section {
        padding: 65px 16px 55px;
    }

    .story-intro {
        margin-bottom: 50px;
    }

    .story-love {
        padding: 55px 12px;
        margin-bottom: 70px;
    }

    .story-social-links {
        gap: 9px;
        flex-wrap: wrap;
    }

    .story-social-link {
        padding: 10px 14px;
    }
}
.workspace-footer {
    min-height: 76px;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.018);
}
.meta-block {
    min-width: 0;
}
.meta-block.right {
    text-align: right;
}
.meta-label {
    display: block;
    margin-bottom: 3px;
    color: var(--subtle);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.meta-value {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.meta-block.right .meta-value {
    color: var(--crystal-bright);
}
.footer-diamond {
    color: var(--shared);
    font-size: 1.3rem;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 100;
    max-width: min(430px, calc(100vw - 32px));
    padding: 12px 15px;
    transform: translate(-50%, 18px);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(24, 20, 34, 0.96);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    color: var(--text);
    font-size: 0.82rem;
    opacity: 0;
    pointer-events: none;
    transition: 0.22s ease;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.toast.error {
    border-color: rgba(255, 125, 144, 0.4);
    color: #ffd6dd;
}

@media (max-width: 1080px) {
    .app-shell {
        grid-template-columns: 300px minmax(0, 1fr);
        padding-inline: 14px;
    }
    .tool-button span {
        display: none;
    }
    .viewport {
        padding: 18px;
        min-height: 480px;
    }
    .workspace {
        min-height: 620px;
    }
}
@media (max-width: 900px) {
    .our-world-label {
        display: none;
    }

    .our-world-links {
        padding: 4px 7px;
        border-left: 0;
        border-right: 0;
    }
}

@media (max-width: 700px) {
    .social-love-link {
        min-width: 44px;
        min-height: 44px;
        padding: 0 7px;
        font-size: 0.62rem;
    }

    .social-heart {
        display: none;
    }
}
@media (max-width: 820px) {
    .header-inner {
        padding-inline: 14px;
    }
    .privacy-pill {
        display: none;
    }
    .app-shell {
        grid-template-columns: 1fr;
        padding: 14px;
    }
    .control-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .panel-card.source-card,
    .run-card,
    details.advanced {
        grid-column: 1 / -1;
    }
    .workspace {
        min-height: 670px;
    }
    .image-frame {
        max-height: 470px;
        width: min(100%, calc(470px * var(--ratio)));
    }
}
@media (max-width: 560px) {
    .brand .eyebrow {
        display: none;
    }
    .brand h1 {
        font-size: 1rem;
    }
    .brand-mark {
        width: 38px;
        height: 38px;
    }
    .header-inner {
        min-height: 64px;
    }
    .header-actions .ghost-button {
        width: 39px;
        padding: 0;
        font-size: 0;
    }
    .header-actions .ghost-button::before {
        content: '↓';
        font-size: 1.1rem;
    }
    .app-shell {
        min-height: calc(100vh - 65px);
    }

    .music-link span:last-child {
        display: none;
    }

    .music-link {
        min-width: 44px;
        padding-inline: 6px;
    }
    .control-panel {
        display: flex;
    }
    .workspace-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .workspace-toolbar .tool-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .workspace-toolbar .tool-group:last-child {
        justify-content: flex-end;
    }
    .viewport {
        min-height: 430px;
        padding: 12px;
    }
    .image-frame {
        max-height: 390px;
        width: min(100%, calc(390px * var(--ratio)));
    }
    .sbs {
        inset: 10px;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 8px;
    }
    .loupe {
        width: 140px;
        height: 140px;
    }
    .workspace-footer {
        grid-template-columns: 1fr auto 1fr;
        padding-inline: 12px;
        gap: 8px;
    }
    .meta-value {
        font-size: 0.72rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* AI Finish */

.finish-strength-row {
    margin-top: 14px;
}

.finish-strength-row label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.finish-strength-row label strong {
    color: #c9f4ff;
    font-variant-numeric: tabular-nums;
}

.finish-strength-row input[type='range'] {
    width: 100%;
}

#finishPanel.is-off .finish-strength-row,
#finishPanel.is-off .model-summary {
    opacity: 0.48;
}

/* =========================================================
   LICENSES / THIRD-PARTY NOTICES
   ========================================================= */

.license-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 56px 0 80px;
}

.license-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.license-hero {
    max-width: 820px;
    margin-bottom: 64px;
}

.license-hero h2 {
    margin: 8px 0 22px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.license-hero h2 span {
    display: block;
    color: rgba(247, 244, 255, 0.62);
}

.license-hero > p:not(.eyebrow) {
    max-width: 760px;
    color: rgba(247, 244, 255, 0.7);
    line-height: 1.75;
    font-size: 15px;
}

.license-section {
    margin-top: 58px;
}

.license-section-heading {
    margin-bottom: 20px;
}

.license-section-heading h2 {
    margin: 5px 0 0;
    font-size: 24px;
    letter-spacing: -0.025em;
}

.license-card {
    position: relative;
    margin-bottom: 16px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(24, 19, 37, 0.93), rgba(12, 11, 20, 0.94));
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

.license-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 90% 0%, rgba(156, 92, 255, 0.08), transparent 32%);
}

.license-card-highlight {
    border-color: rgba(125, 220, 255, 0.2);
}

.license-card-top {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.license-kicker {
    margin: 0 0 8px;
    color: rgba(201, 244, 255, 0.6);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.license-card h3 {
    margin: 0;
    font-size: clamp(19px, 3vw, 26px);
    letter-spacing: -0.025em;
}

.license-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(193, 132, 255, 0.28);
    border-radius: 999px;
    color: #c9f4ff;
    background: rgba(156, 92, 255, 0.08);
    font-size: 11px;
    font-weight: 750;
}

.license-meta {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.license-meta > div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
}

.license-meta dt {
    margin-bottom: 5px;
    color: rgba(247, 244, 255, 0.42);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.license-meta dd {
    margin: 0;
    color: rgba(247, 244, 255, 0.88);
    font-size: 13px;
    line-height: 1.45;
}

.license-card > p {
    position: relative;
    max-width: 850px;
    color: rgba(247, 244, 255, 0.65);
    line-height: 1.7;
    font-size: 13px;
}

.license-change-note {
    padding: 13px 15px;
    border-left: 2px solid rgba(125, 220, 255, 0.55);
    border-radius: 0 10px 10px 0;
    background: rgba(125, 220, 255, 0.04);
}

.license-links {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 19px;
}

.license-links a {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 11px;
    color: rgba(247, 244, 255, 0.82);
    background: rgba(255, 255, 255, 0.025);
    text-decoration: none;
    font-size: 12px;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}

.license-links a:hover {
    transform: translateY(-1px);
    border-color: rgba(193, 132, 255, 0.35);
    background: rgba(156, 92, 255, 0.08);
}

.license-notice {
    margin-top: 58px;
    padding: 30px;
    border: 1px solid rgba(193, 132, 255, 0.17);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(156, 92, 255, 0.065), rgba(125, 220, 255, 0.035));
}

.license-notice h2 {
    margin: 7px 0 12px;
}

.license-notice p:not(.eyebrow) {
    max-width: 720px;
    color: rgba(247, 244, 255, 0.64);
    line-height: 1.7;
}

.license-notices-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-height: 51px;

    margin-top: 10px;
    padding: 0 18px;

    line-height: 1;
    text-decoration: none;
}

.license-page-footer {
    margin-top: 60px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
    color: rgba(247, 244, 255, 0.5);
    font-size: 12px;
}

.license-footer-motto {
    color: rgba(201, 244, 255, 0.62);
}

.license-page-footer a {
    display: inline-block;
    margin-top: 10px;
    color: #c9f4ff;
    text-decoration: none;
}

@media (max-width: 760px) {
    .license-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 36px;
    }

    .license-card {
        padding: 20px;
    }

    .license-card-top {
        display: block;
    }

    .license-badge {
        display: inline-flex;
        margin-top: 14px;
    }

    .license-meta {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   INTERACTIVE GUIDE
   ========================================================= */

.guide-button {
    min-height: 38px;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border: 1px solid rgba(193, 132, 255, 0.24);
    border-radius: 999px;

    background:
        linear-gradient(135deg, rgba(156, 92, 255, 0.08), rgba(125, 220, 255, 0.055)),
        rgba(255, 255, 255, 0.025);

    color: var(--muted);

    font-size: 0.76rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.guide-button:hover {
    color: var(--text);
    border-color: rgba(193, 132, 255, 0.46);

    background:
        linear-gradient(135deg, rgba(156, 92, 255, 0.14), rgba(125, 220, 255, 0.09)),
        rgba(255, 255, 255, 0.035);

    transform: translateY(-1px);
}

.guide-button-mark {
    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: linear-gradient(135deg, var(--lyra), var(--crystal));

    color: #fff;

    font-size: 0.72rem;
    font-weight: 900;

    box-shadow: 0 0 15px rgba(193, 132, 255, 0.2);
}

/* Entire walkthrough layer */

.guide-layer {
    position: fixed;
    inset: 0;

    z-index: 3000;

    pointer-events: none;
}

.guide-layer[hidden] {
    display: none;
}

/* Blocks interaction with the application while touring */

.guide-shield {
    position: fixed;
    inset: 0;

    z-index: 3000;

    pointer-events: auto;
}

/* The clear area around the selected control */

.guide-spotlight {
    position: fixed;

    z-index: 3001;

    pointer-events: none;

    border: 1px solid rgba(201, 244, 255, 0.75);

    background: rgba(255, 255, 255, 0.018);

    box-shadow:
        0 0 0 9999px rgba(5, 4, 10, 0.79),
        0 0 0 2px rgba(193, 132, 255, 0.2),
        0 0 30px rgba(156, 92, 255, 0.32),
        0 0 48px rgba(125, 220, 255, 0.15);

    transition:
        top 0.24s ease,
        left 0.24s ease,
        width 0.24s ease,
        height 0.24s ease,
        border-radius 0.24s ease;
}

/* Explanation card */

.guide-card {
    position: fixed;

    top: 20px;
    left: 20px;

    z-index: 3002;

    width: min(360px, calc(100vw - 24px));

    padding: 24px;

    pointer-events: auto;

    border: 1px solid rgba(193, 132, 255, 0.3);
    border-radius: 20px;

    background:
        radial-gradient(circle at 0% 0%, rgba(156, 92, 255, 0.15), transparent 52%),
        linear-gradient(145deg, rgba(29, 24, 42, 0.99), rgba(11, 10, 18, 0.99));

    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.58),
        0 0 35px rgba(156, 92, 255, 0.12);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    opacity: 1;

    transition:
        opacity 0.16s ease,
        top 0.2s ease,
        left 0.2s ease;
}

.guide-close {
    position: absolute;

    top: 13px;
    right: 14px;

    width: 31px;
    height: 31px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 1px solid var(--line);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);

    font-size: 1.15rem;
    line-height: 1;

    cursor: pointer;
}

.guide-close:hover {
    color: var(--text);
    border-color: rgba(193, 132, 255, 0.4);
}

.guide-kicker {
    margin: 0 40px 10px 0;

    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--crystal);

    font-size: 0.61rem;
    font-weight: 850;

    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.guide-kicker span:first-child {
    color: rgba(247, 244, 255, 0.48);
}

.guide-card h2 {
    margin: 0 0 11px;

    font-family: Georgia, 'Times New Roman', serif;

    color: var(--text);

    font-size: 1.42rem;
    font-weight: 500;

    line-height: 1.15;
}

.guide-text {
    margin: 0;

    color: var(--muted);

    font-size: 0.83rem;
    line-height: 1.65;
}

/* tiny progress line */

.guide-progress {
    display: flex;
    gap: 5px;

    margin: 21px 0 18px;
}

.guide-progress span {
    height: 3px;
    flex: 1;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.09);

    transition: background 0.18s ease;
}

.guide-progress span.done {
    background: rgba(193, 132, 255, 0.42);
}

.guide-progress span.active {
    background: linear-gradient(90deg, var(--lyra), var(--crystal));
}

/* navigation */

.guide-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.guide-back,
.guide-next {
    min-height: 40px;

    padding: 0 15px;

    border-radius: 11px;

    font-size: 0.76rem;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.guide-back {
    border: 1px solid var(--line);

    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
}

.guide-back:hover:not(:disabled) {
    color: var(--text);
    border-color: var(--line-strong);
}

.guide-back:disabled {
    opacity: 0.35;
    cursor: default;
}

.guide-next {
    margin-left: auto;

    border: 1px solid rgba(193, 132, 255, 0.38);

    background: linear-gradient(
        110deg,
        rgba(109, 40, 217, 0.9),
        rgba(193, 132, 255, 0.82),
        rgba(75, 189, 222, 0.82)
    );

    color: #fff;

    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.2);
}

.guide-next:hover {
    transform: translateY(-1px);
}

/* compact header button */

@media (max-width: 700px) {
    .guide-button {
        width: 38px;
        padding: 0;
    }

    .guide-button-label {
        display: none;
    }

    .guide-card {
        width: auto;
        max-width: none;
    }
}

/* =========================================================
   EXPLORE MORE — SCROLL HINT
   ========================================================= */

.page-scroll-hint {
    position: fixed;

    right: 20px;
    bottom: 24px;

    z-index: 1100;

    width: 58px;
    height: 58px;

    padding: 0;

    display: grid;
    place-items: center;

    border: 1px solid rgba(193, 132, 255, 0.32);

    border-radius: 50%;

    background:
        radial-gradient(circle at 35% 25%, rgba(125, 220, 255, 0.17), transparent 45%),
        linear-gradient(145deg, rgba(37, 27, 56, 0.96), rgba(12, 10, 19, 0.96));

    color: #e7ceff;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.42),
        0 0 28px rgba(156, 92, 255, 0.18);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    cursor: pointer;

    opacity: 1;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.page-scroll-hint:hover {
    transform: translateY(-3px);

    border-color: rgba(193, 132, 255, 0.58);

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.46),
        0 0 34px rgba(156, 92, 255, 0.3);
}

.page-scroll-hint.is-hidden {
    opacity: 0;

    transform: translateY(12px) scale(0.92);

    pointer-events: none;
}

.page-scroll-hint-arrow {
    width: 27px;
    height: 27px;

    display: grid;
    place-items: center;

    animation: page-scroll-hint-bounce 1.8s ease-in-out infinite;
}

.page-scroll-hint-arrow svg {
    width: 100%;
    height: 100%;
}

.page-scroll-hint-label {
    position: absolute;

    top: -19px;
    left: 50%;

    transform: translateX(-50%);

    color: rgba(247, 244, 255, 0.48);

    font-size: 0.52rem;
    font-weight: 850;

    letter-spacing: 0.15em;
}

@keyframes page-scroll-hint-bounce {
    0%,
    100% {
        transform: translateY(-2px);
    }

    50% {
        transform: translateY(4px);
    }
}

/*
 * On narrow screens the floating Upscale button occupies
 * the bottom of the viewport, so keep the arrow above it.
 */

@media (max-width: 700px) {
    .page-scroll-hint {
        right: 13px;
        bottom: 132px;

        width: 52px;
        height: 52px;
    }

    .page-scroll-hint-arrow {
        width: 24px;
        height: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-scroll-hint-arrow {
        animation: none;
    }
}

.run-card {
    transition:
        opacity 0.32s ease,
        transform 0.32s ease,
        visibility 0.32s ease;
}

.run-card.is-past-workspace {
    opacity: 0;

    transform: translateX(-50%) translateY(18px);

    visibility: hidden;

    pointer-events: none;
}

.brand-home-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.brand-home-link:hover {
    color: inherit;
}

.brand-home-link {
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.brand-home-link:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* =========================================================
   MOBILE HEADER — compact clean layout
   ========================================================= */

@media (max-width: 560px) {
    .header-inner {
        min-height: 64px;
        padding-inline: 10px;
        gap: 8px;
    }

    /* Keep the logo, remove the squeezed title text */
    .brand .eyebrow {
        display: none;
    }

    .brand-copy {
        display: block;
        min-width: 0;
    }

    .brand h1 {
        font-size: 0.82rem;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }

    .brand {
        flex: 0 0 auto;
        gap: 0;
    }

    /* Prevent the heart/diamond logo overflowing its box */
    .brand-mark {
        width: 48px;
        height: 40px;
        flex: 0 0 48px;
    }

    .brand-mark svg {
        width: 40px;
        height: 25px;
        transform: scale(1.35);
    }

    /* Keep Crystal + Lyra, remove secondary line on tiny screens */
    .our-world-links {
        padding: 0 3px;
    }

    .our-world-couple {
        gap: 4px;
    }

    .our-world-follow {
        display: none;
    }

    .header-actions {
        gap: 6px;
    }
}

.music-story-link:hover {
    color: var(--shared);
    border-color: rgba(193, 132, 255, 0.45);
    box-shadow: 0 0 24px rgba(193, 132, 255, 0.12);
}

/* =========================================================
   GLOBAL SITE FOOTER
   ========================================================= */

.site-footer {
    width: min(1180px, calc(100% - 40px));
    margin: 80px auto 0;
    padding: 42px 20px 46px;

    text-align: center;

    border-top: 1px solid var(--line);
}

.site-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 7px;
}

.site-footer-brand strong {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 500;

    background: linear-gradient(90deg, #d9baff, #f7f4ff 50%, var(--crystal-bright));

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-footer-brand span {
    color: var(--subtle);

    font-size: 0.68rem;
    line-height: 1.6;
    letter-spacing: 0.04em;
}

.site-footer-socials {
    margin-top: 24px;
}

.site-footer-nav {
    margin-top: 24px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 18px;
}

.site-footer-nav a {
    color: var(--muted);

    font-size: 0.7rem;
    font-weight: 750;

    text-decoration: none;

    transition: color 0.18s ease;
}

.site-footer-nav a:hover {
    color: var(--text);
}

.music-story-link:hover {
    color: var(--shared);
    border-color: rgba(193, 132, 255, 0.45);
    box-shadow: 0 0 24px rgba(193, 132, 255, 0.12);
}

@media (max-width: 600px) {
    .site-footer {
        width: calc(100% - 28px);
        margin-top: 55px;
        padding: 32px 8px 38px;
    }

    .site-footer-socials {
        gap: 8px;
        flex-wrap: wrap;
    }

    .site-footer-socials .story-social-link {
        padding: 10px 13px;
    }

    .site-footer-nav {
        gap: 14px;
    }
}
