':root {
    /* Design tokens - Higgsfield-inspired Orange & Obsidian with Cyber Cyan Complement */
    --bg-base: #060608;
    --bg-shell: #0a0a0f;
    --bg-panel: rgba(18, 18, 26, 0.82);
    --bg-input: #12121a;
    --surface-app: rgba(6, 6, 8, 0.95);
    --surface-subtle: rgba(255, 255, 255, 0.04);
    --surface-soft: rgba(255, 255, 255, 0.05);
    --surface-overlay: rgba(4, 4, 6, 0.86);

    /* Electric Molten Orange Palette */
    --accent-orange: #ff5722;
    --accent-orange-bright: #ff6d00;
    --accent-orange-neon: #ff9100;
    --accent-orange-glow: rgba(255, 109, 0, 0.32);

    /* Complementary Cyber Cyan / Azure Accents (180deg complementary) */
    --accent-cyan: #00d2ff;
    --accent-cyan-bright: #00f0ff;
    --accent-cyan-glow: rgba(0, 210, 255, 0.28);
    --accent-sky: #00d2ff;
    --accent-success: #10b981;
    --accent-danger: #f87171;

    /* Backward compatibility alias so existing rules referencing --accent-purple adopt electric orange */
    --accent-purple: #ff6d00;
    --accent-purple-rgb: 255, 109, 0;

    /* Gradients prioritizing orange & complementary tones */
    --primary-gradient: linear-gradient(135deg, #ff5722 0%, #ff6d00 48%, #ff9100 100%);
    --primary-hover: linear-gradient(135deg, #f4511e 0%, #ff5722 48%, #ff6d00 100%);
    --complementary-gradient: linear-gradient(135deg, #ff6d00 0%, #ff9100 35%, #00d2ff 100%);
    --surface-gradient: linear-gradient(145deg, rgba(26, 26, 36, 0.65) 0%, rgba(12, 12, 16, 0.85) 100%);
    --card-gradient: linear-gradient(160deg, rgba(22, 22, 30, 0.8) 0%, rgba(10, 10, 14, 0.95) 100%);
    --border-gradient: linear-gradient(135deg, rgba(255, 109, 0, 0.45), rgba(0, 210, 255, 0.35));

    --text-main: #f8fafc;
    --text-muted: #9aa7bd;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-glow: rgba(255, 109, 0, 0.4);
    --glass-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
    --glass-backdrop: blur(14px);
    --border-radius-lg: 22px;
    --border-radius-md: 14px;
    --border-radius-sm: 8px;
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 109, 0, 0.16), transparent 32%),
        radial-gradient(circle at 84% 0%, rgba(0, 210, 255, 0.12), transparent 34%),
        radial-gradient(circle at 50% 60%, rgba(255, 87, 34, 0.08), transparent 45%),
        var(--bg-base);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: none;
    height: 100dvh;
    position: relative;
    background: var(--surface-app);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px clamp(22px, 5vw, 72px);
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(1.45rem, 2vw, 2.05rem);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-btn {
    appearance: none;
    width: 42px;
    height: 42px;
    background: var(--surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    color: var(--text-main);
}

/* App Tabs */
.app-tabs {
    display: none;
    gap: 10px;
    padding: 0 clamp(22px, 5vw, 72px) 18px;
    z-index: 10;
}

.app-container.tabs-visible .app-tabs {
    display: flex;
}

.tab-btn {
    appearance: none;
    flex: 0 1 230px;
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-soft);
    color: #d7def0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 28px rgba(255, 109, 0, 0.35);
}

.tab-btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
}

.tab-btn:active {
    transform: translateY(1px);
}

/* Views System */
.view {
    position: absolute;
    top: 86px;
    left: 0;
    width: 100%;
    height: calc(100% - 86px);
    padding: 24px clamp(22px, 5vw, 72px) 40px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.98);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
    overflow-y: auto;
}

.app-container.tabs-visible .view {
    top: 152px;
    height: calc(100% - 152px);
}

.view.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    z-index: 5;
}

/* Common Buttons */
.btn {
    appearance: none;
    border: none;
    padding: 14px 24px;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.96);
}

.primary-btn {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 18px rgba(255, 109, 0, 0.45);
}

.secondary-btn {
    background: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

/* Upload View */
.upload-area {
    background: var(--bg-panel);
    border: 2px dashed rgba(148, 163, 184, 0.28);
    border-radius: 34px;
    padding: clamp(42px, 8vh, 96px) 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    min-height: clamp(430px, 58vh, 720px);
    justify-content: center;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(255, 109, 0, 0.08), transparent 40%),
        linear-gradient(245deg, rgba(0, 210, 255, 0.08), transparent 44%);
    pointer-events: none;
}

.upload-area:active {
    background: var(--bg-input);
}

.upload-icon-wrapper {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: var(--accent-purple);
    margin-bottom: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.upload-area h2 {
    font-size: clamp(2rem, 4vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.upload-area p {
    color: var(--text-muted);
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    margin-bottom: 10px;
}

.upload-area .btn {
    min-width: min(390px, 100%);
    height: 62px;
    font-size: clamp(1rem, 1.4vw, 1.35rem);
}

.upload-area .secondary-btn {
    background: rgba(255, 255, 255, 0.035);
}

.temporarily-hidden {
    display: none !important;
}

.upload-actions {
    display: grid;
    gap: 12px;
    width: min(390px, 100%);
}

.upload-actions .btn {
    width: 100%;
}

.recent-images {
    margin-top: 34px;
}

.recent-images-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.recent-images h3 {
    font-size: clamp(1.05rem, 1.6vw, 1.45rem);
    color: var(--text-muted);
}

.text-link-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--accent-sky);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.recent-edit-card {
    appearance: none;
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-input);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
}

.recent-edit-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recent-edit-card span {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--surface-overlay);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
}

.recent-empty {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.skeleton {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { background-color: var(--bg-input); }
    50% { background-color: rgba(255, 255, 255, 0.1); }
    100% { background-color: var(--bg-input); }
}

/* Prompt View */
.preview-container {
    position: relative;
    width: 100%;
    height: min(58vh, 620px);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--glass-shadow);
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-pick-btn {
    right: 60px;
}

.prompt-section {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    flex-grow: 1;
}

.edit-mode-panel {
    display: none;
    gap: 10px;
    margin-bottom: 16px;
}

.edit-mode-panel.visible {
    display: grid;
}

.control-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
}

.segment-btn,
.mask-tool-btn,
.mask-summary {
    appearance: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.segment-btn {
    min-height: 40px;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px;
}

.segment-btn small,
.style-transfer-heading small {
    color: var(--accent-sky);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.segment-btn.active {
    color: white;
    background: #4459a8;
}

.mask-summary {
    display: none;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(56, 189, 248, 0.36);
    border-radius: var(--border-radius-sm);
    background: rgba(14, 165, 233, 0.1);
    color: #dff5ff;
    font-size: 0.88rem;
    font-weight: 650;
}

.edit-mode-panel.inpaint-active .mask-summary {
    display: flex;
}

.inpaint-model-info {
    display: none;
    min-height: 46px;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.84rem;
}

.inpaint-model-info strong {
    margin-left: auto;
    color: var(--text-main);
    font-size: 0.84rem;
}

.edit-mode-panel.inpaint-active + .inpaint-model-info {
    display: flex;
}

.edit-mode-panel.inpaint-active ~ .model-selection,
.edit-mode-panel.inpaint-active ~ .lucid-parameters,
.edit-mode-panel.style-active ~ .model-selection,
.edit-mode-panel.style-active ~ .lucid-parameters {
    display: none !important;
}

.style-transfer-panel {
    display: none;
    margin-bottom: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.edit-mode-panel.style-active ~ .style-transfer-panel {
    display: grid;
    gap: 12px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 4px;
}

/* Realtime Style Transfer */
.realtime-style-view {
    overflow: hidden;
}

.realtime-shell {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(300px, 380px);
    gap: 18px;
    min-height: 0;
    height: 100%;
}

.realtime-panel,
.realtime-stage {
    min-height: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--bg-panel);
    box-shadow: var(--glass-shadow);
}

.realtime-panel {
    padding: 18px;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 14px;
}

.realtime-heading h2,
.realtime-controls-head h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.realtime-heading p,
.realtime-controls-head p,
.realtime-status {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

.realtime-image-picker {
    position: relative;
    min-height: 148px;
    border: 1px dashed rgba(125, 211, 252, 0.34);
    border-radius: var(--border-radius-sm);
    background: rgba(14, 165, 233, 0.06);
    color: var(--text-main);
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
}

.realtime-picker-card {
    display: grid;
    gap: 8px;
}

.realtime-picker-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.realtime-picker-actions .btn,
.realtime-preset-actions .btn {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.78rem;
}

.realtime-image-picker img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.realtime-image-picker.has-image img {
    display: block;
}

.realtime-image-picker.has-image span {
    display: none;
}

.realtime-image-picker span {
    display: grid;
    justify-items: center;
    gap: 7px;
    color: #dbe7fb;
}

.realtime-cost-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.realtime-cost-panel div {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--border-radius-sm);
    background: rgba(15, 23, 42, 0.42);
    padding: 10px;
    display: grid;
    gap: 4px;
}

.realtime-cost-panel span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.realtime-cost-panel strong {
    color: var(--text-main);
    font-size: 0.98rem;
    font-variant-numeric: tabular-nums;
}

.realtime-stage {
    padding: 18px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 12px;
}

.realtime-output-shell {
    position: relative;
    min-height: 360px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: #070b14;
    display: grid;
    place-items: center;
}

#realtime-output-image {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#realtime-output-image.has-image {
    display: block;
}

.realtime-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-align: center;
}

.realtime-empty i {
    color: var(--accent-sky);
    font-size: 2rem;
}

.realtime-busy {
    position: absolute;
    right: 14px;
    top: 14px;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(125, 211, 252, 0.32);
    color: #dff5ff;
    font-size: 0.8rem;
    font-weight: 800;
}

.realtime-busy.visible {
    display: inline-flex;
}

.realtime-status {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.realtime-countdown-card {
    min-height: 70px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--border-radius-sm);
    background: rgba(15, 23, 42, 0.62);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.realtime-countdown-card > i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
}

.realtime-countdown-card > div {
    display: grid;
    gap: 3px;
}

.realtime-countdown-card > div strong {
    color: var(--text-main);
    font-size: 0.82rem;
}

.realtime-countdown-card > div span {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.realtime-countdown-card output {
    min-width: 72px;
    color: var(--text-muted);
    font-size: 1.45rem;
    font-weight: 850;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.realtime-countdown-card[data-state="queued"] {
    border-color: rgba(250, 204, 21, 0.48);
    background: rgba(113, 63, 18, 0.18);
}

.realtime-countdown-card[data-state="queued"] > i,
.realtime-countdown-card[data-state="queued"] output {
    color: #fde047;
}

.realtime-countdown-card[data-state="generating"] {
    border-color: rgba(56, 189, 248, 0.54);
    background: rgba(7, 89, 133, 0.2);
}

.realtime-countdown-card[data-state="generating"] > i,
.realtime-countdown-card[data-state="generating"] output {
    color: #7dd3fc;
}

.realtime-countdown-card[data-state="generating"] > i {
    animation: realtime-pulse 1s ease-in-out infinite;
}

@keyframes realtime-pulse {
    50% { opacity: 0.45; }
}

.realtime-countdown-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

.realtime-countdown-bar span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-sky));
    transition: width 0.12s linear;
}

.realtime-error {
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: var(--border-radius-sm);
    background: rgba(127, 29, 29, 0.18);
    color: #fecaca;
    padding: 12px;
    display: grid;
    gap: 5px;
    font-size: 0.84rem;
}

.realtime-version-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.realtime-version-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 8px;
}

.realtime-version-thumb {
    height: 54px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: #070b14;
    padding: 0;
    cursor: pointer;
}

.realtime-version-thumb.active {
    border-color: rgba(125, 211, 252, 0.82);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.16);
}

.realtime-version-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.realtime-slider-groups {
    display: grid;
    gap: 12px;
}

.realtime-preset-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.realtime-slider-group {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--border-radius-sm);
    background: rgba(15, 23, 42, 0.38);
    overflow: hidden;
}

.realtime-slider-group summary {
    min-height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.realtime-slider-group[open] summary i {
    transform: rotate(180deg);
}

.realtime-slider-list {
    display: grid;
    gap: 9px;
    padding: 0 12px 12px;
}

.realtime-detailed-list {
    padding-top: 4px;
}

.realtime-slider-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(90px, 1fr) 64px;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 750;
}

.realtime-slider-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.realtime-slider-label > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.realtime-help {
    position: relative;
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    border: 1px solid rgba(125, 211, 252, 0.44);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-sky);
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
    cursor: help;
    outline: none;
}

.realtime-help::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translateX(-50%) translateY(4px);
    width: min(260px, 72vw);
    padding: 9px 10px;
    border: 1px solid rgba(125, 211, 252, 0.32);
    border-radius: var(--border-radius-sm);
    background: rgba(15, 23, 42, 0.98);
    color: var(--text-main);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.35;
    text-transform: none;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 40;
}

.realtime-help:hover::after,
.realtime-help:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.realtime-slider-row input[type="range"] {
    width: 100%;
    accent-color: var(--accent-purple);
}

.realtime-number-input {
    width: 64px;
    min-height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: rgba(11, 16, 32, 0.78);
    color: var(--text-main);
    font: inherit;
    font-weight: 850;
    text-align: center;
    font-variant-numeric: tabular-nums;
    outline: none;
}

.realtime-number-input:focus {
    border-color: rgba(125, 211, 252, 0.68);
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.14);
}

.edit-mode-panel.style-active ~ .model-selection,
.edit-mode-panel.style-active ~ #lucid-parameters {
    display: none !important;
}

.style-transfer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.style-transfer-heading > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-main);
}

.style-reference-note {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: var(--border-radius-sm);
    color: #c8d5ec;
    background: rgba(14, 165, 233, 0.06);
    font-size: 0.8rem;
    font-weight: 700;
}

.style-reference-note i {
    color: var(--accent-sky);
}

.style-reference-picker {
    position: relative;
    width: 100%;
    height: 154px;
    overflow: hidden;
    border: 1px dashed rgba(125, 211, 252, 0.42);
    border-radius: var(--border-radius-sm);
    background: rgba(14, 165, 233, 0.07);
    color: var(--text-main);
    cursor: pointer;
}

.style-reference-picker img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.style-control-panel {
    display: grid;
    gap: 13px;
    padding-top: 4px;
}

.style-control-group {
    display: grid;
    gap: 8px;
    padding: 11px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--border-radius-sm);
    background: rgba(15, 23, 42, 0.38);
}

.style-control-group > span {
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.style-control-group label {
    display: grid;
    grid-template-columns: minmax(92px, 1fr) minmax(88px, 1.15fr) 28px;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.style-control-group input[type="range"] {
    width: 100%;
    accent-color: var(--accent-primary);
}

.style-control-group output {
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.style-reference-picker.has-image img {
    display: block;
}

#style-reference-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

#style-reference-placeholder i {
    color: var(--accent-sky);
    font-size: 1.5rem;
}

#style-reference-placeholder small {
    color: var(--text-muted);
}

.style-reference-picker.has-image #style-reference-placeholder {
    display: none;
}

.style-reference-change {
    display: none;
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    background: rgba(3, 7, 18, 0.82);
    color: white;
    font-size: 0.76rem;
    font-weight: 700;
}

.style-reference-picker.has-image .style-reference-change {
    display: block;
}

.style-gallery-btn {
    width: 100%;
    min-height: 46px;
}

.style-provider-selection {
    margin-bottom: 0;
}

.fixed-model-value {
    color: var(--text-main);
    font-size: 0.95rem;
}

.style-strength-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.style-strength-control {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.style-strength-control label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.strength-select {
    width: 100%;
    min-height: 44px;
    padding: 0 34px 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
}

/* Mask editor */
.mask-view {
    gap: 18px;
}

.mask-editor-header,
.mask-editor-actions,
.mask-toolbar {
    display: flex;
    align-items: center;
}

.mask-editor-header {
    justify-content: space-between;
    gap: 16px;
}

.mask-editor-header h2 {
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.mask-editor-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.mask-editor-header .btn-icon,
.mask-icon-actions .btn-icon {
    position: static;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
}

.mask-workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(260px, 1fr) auto;
    gap: 12px;
}

.mask-canvas-shell {
    position: relative;
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    min-height: 260px;
    justify-self: center;
    align-self: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: #070b14;
    box-shadow: var(--glass-shadow);
    touch-action: none;
}

.mask-canvas-shell canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#mask-source-canvas {
    object-fit: contain;
}

#mask-draw-canvas {
    cursor: crosshair;
}

.mask-empty-state {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--surface-overlay);
    color: #d7def0;
    font-size: 0.82rem;
    pointer-events: none;
    white-space: nowrap;
}

.mask-empty-state.hidden {
    display: none;
}

.mask-toolbar {
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--bg-panel);
}

.mask-tool-group,
.mask-icon-actions {
    display: flex;
    gap: 8px;
}

.mask-tool-btn {
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
}

.mask-tool-btn.active {
    background: #4459a8;
    color: white;
}

.mask-size-control {
    flex: 1;
    max-width: 320px;
    display: grid;
    gap: 6px;
}

.mask-size-control label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.mask-size-control input {
    width: 100%;
}

.mask-editor-actions {
    justify-content: flex-end;
    gap: 10px;
}

/* Gallery View */
.gallery-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.gallery-toolbar h2 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.gallery-toolbar p,
.gallery-status {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.gallery-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.gallery-filter-btn {
    appearance: none;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-soft);
    color: #d7def0;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gallery-filter-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.gallery-filter-btn span {
    min-width: 24px;
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.34);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
}

.gallery-upload-btn {
    min-width: 116px;
    padding: 12px 14px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    padding-bottom: 24px;
}

.gallery-section {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
}

.gallery-section h3 {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 800;
}

.gallery-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.gallery-card {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-input);
    cursor: pointer;
}

.gallery-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--surface-overlay);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    pointer-events: none;
}

.gallery-empty-state {
    min-height: 160px;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 700;
}

[hidden] {
    display: none !important;
}

.print-orders-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--bg-panel);
    padding: 16px;
    margin-bottom: 18px;
}

.print-orders-heading,
.print-order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.print-orders-heading {
    margin-bottom: 12px;
}

.print-orders-list {
    display: grid;
    gap: 10px;
}

.print-order-card {
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
}

.print-order-card div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.print-order-card span {
    color: var(--text-muted);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.print-order-status {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.14);
    color: #dff5ff !important;
    font-weight: 800;
    text-transform: capitalize;
}

.gallery-type-badge.style {
    color: #dff5ff;
    border-color: rgba(125, 211, 252, 0.34);
}

.gallery-type-badge.generation {
    color: #e9ddff;
    border-color: rgba(139, 92, 246, 0.34);
}

.gallery-type-badge.original {
    color: #d8f7e9;
    border-color: rgba(16, 185, 129, 0.34);
    background: rgba(16, 185, 129, 0.17);
}

.gallery-actions {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.gallery-primary-actions,
.gallery-secondary-actions {
    display: grid;
    gap: 8px;
}

.gallery-primary-actions {
    grid-template-columns: 1fr;
}

.gallery-secondary-actions {
    grid-template-columns: repeat(2, 44px);
    justify-content: end;
}

.gallery-actions .btn {
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.gallery-icon-btn {
    width: 44px;
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
    color: var(--text-main);
    cursor: pointer;
}

.gallery-icon-btn.danger {
    color: var(--accent-danger);
}

.gallery-adjust-modal {
    position: fixed;
}

.gallery-adjust-content {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: 88vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--bg-shell);
    box-shadow: var(--glass-shadow);
}

.gallery-adjust-preview {
    min-height: 420px;
    background:
        linear-gradient(45deg, rgba(148, 163, 184, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.08) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.08) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.08) 75%),
        #070b14;
    background-size: 28px 28px;
    background-position: 0 0, 0 14px, 14px -14px, -14px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-adjust-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-adjust-panel {
    padding: 24px;
    background: var(--bg-panel);
    display: flex;
    flex-direction: column;
}

.gallery-adjust-model {
    margin-bottom: 14px;
}

.gallery-adjust-style-panel {
    display: none;
    margin-bottom: 14px;
}

.gallery-adjust-style-panel.visible {
    display: block;
}

/* Settings View */
.settings-view {
    gap: 20px;
}

.settings-header,
.settings-panel-heading,
.pricing-row,
.usage-row,
.balance-editor {
    display: flex;
    align-items: center;
}

.settings-header {
    justify-content: space-between;
    gap: 16px;
}

.settings-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.settings-header h2 {
    font-size: 1.45rem;
    margin-bottom: 4px;
}

.settings-header p,
.settings-card p,
.settings-panel-heading p,
.pricing-row span,
.usage-row span {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.settings-card,
.settings-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.settings-card {
    min-height: 148px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.settings-card-label {
    color: var(--accent-sky);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.settings-card h3 {
    font-size: clamp(1.15rem, 2vw, 1.8rem);
    overflow-wrap: anywhere;
}

.profile-card h3 {
    font-size: 1.05rem;
}

.profile-view {
    justify-content: flex-start;
}

.profile-shell {
    display: grid;
    gap: 18px;
}

.profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 22px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 900;
    font-size: 1.45rem;
    box-shadow: 0 10px 28px rgba(255, 109, 0, 0.35);
}

.profile-hero h2 {
    font-size: clamp(1.35rem, 2.5vw, 2.2rem);
    margin: 6px 0 4px;
    overflow-wrap: anywhere;
}

.profile-hero p {
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.profile-grid .settings-card {
    min-height: 190px;
}

.balance-editor {
    min-height: 46px;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
}

.balance-editor input,
.pricing-row input,
.account-field input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text-main);
    font: inherit;
    font-weight: 800;
}

.account-panel {
    padding: 18px;
}

.account-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.account-field {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: rgba(25, 34, 51, 0.72);
}

.account-field span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.account-field input {
    min-height: 34px;
}

.settings-inline-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.settings-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 28px;
}

.settings-panel {
    padding: 18px;
}

.settings-panel-heading {
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.settings-panel-heading h3 {
    font-size: 1.05rem;
}

.pricing-list,
.usage-list {
    display: grid;
    gap: 10px;
}

.pricing-row,
.usage-row {
    justify-content: space-between;
    gap: 12px;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: rgba(25, 34, 51, 0.72);
}

.pricing-row > div,
.usage-row > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pricing-row label {
    width: 116px;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    background: var(--bg-input);
}

.image-modal {
    position: absolute;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.image-modal.show {
    display: flex;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
}

.image-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 86vh;
}

.image-modal-content img {
    width: 100%;
    max-height: 86vh;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    background: var(--bg-input);
}

.modal-close-btn {
    z-index: 2;
}

.camera-modal-content {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: 90vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--glass-shadow);
}

.camera-preview-shell {
    position: relative;
    min-height: min(64vh, 620px);
    background: #030712;
}

.camera-preview-shell video {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: block;
    object-fit: cover;
}

.camera-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    background: rgba(3, 7, 18, 0.74);
    text-align: center;
    padding: 24px;
}

.camera-empty-state.hidden {
    display: none;
}

.camera-empty-state i {
    font-size: 2.4rem;
    color: var(--accent-sky);
}

.camera-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
}

.camera-panel h3 {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.camera-panel p {
    color: var(--text-muted);
    line-height: 1.45;
}

.camera-actions {
    display: grid;
    gap: 12px;
}

.camera-actions .btn {
    width: 100%;
    min-height: 52px;
}

.camera-actions .btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    box-shadow: none;
}

.prompt-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.model-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    background: var(--bg-input);
    padding: 10px 14px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.model-selection label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.model-select {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    padding-right: 24px;
    cursor: pointer;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.model-select option {
    background: var(--bg-input);
    color: var(--text-main);
}

.select-icon {
    position: absolute;
    right: 0;
    color: var(--primary-gradient);
    pointer-events: none;
    font-size: 0.8rem;
    color: var(--accent-purple);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    background: var(--bg-input);
    border-radius: var(--border-radius-md);
    padding: 12px;
    border: 1px solid var(--border-color);
}

.generation-cost-chip {
    min-width: 92px;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: var(--border-radius-sm);
    background: rgba(14, 165, 233, 0.08);
    color: var(--text-muted);
    display: grid;
    align-content: center;
    gap: 2px;
    text-align: right;
    font-size: 0.68rem;
    font-weight: 700;
}

.generation-cost-chip strong {
    color: #dff5ff;
    font-size: 0.92rem;
}

.input-wrapper textarea {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1rem;
    resize: none;
    outline: none;
}

.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.icon-btn {
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-left: 8px;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.chip {
    background: var(--bg-input);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chip:active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* State Views (Analyzing / Generating) */
.state-view {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.scanning-wrapper, .generating-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 32px;
}

.scanning-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-md);
    object-fit: cover;
    opacity: 0.5;
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-purple);
    box-shadow: 0 0 15px var(--accent-purple), 0 0 30px #3b82f6;
    animation: scan 2s ease-in-out infinite alternate;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.status-text h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-text p {
    color: var(--text-muted);
}

.loader-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--text-main);
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Generating Orb & Progress */
.magic-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-gradient);
    filter: blur(20px);
    opacity: 0.6;
    animation: pulseOrb 3s infinite ease-in-out;
}

@keyframes pulseOrb {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--bg-input);
    stroke-width: 4;
}

.ring-progress {
    fill: none;
    stroke: var(--accent-purple);
    stroke-width: 4;
    stroke-dasharray: 283; /* 2 * pi * r (r=45) */
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.1s linear;
    stroke-linecap: round;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Result View */
.result-container {
    flex-grow: 1;
    min-height: 0;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--glass-shadow);
    margin-bottom: 24px;
    background:
        linear-gradient(45deg, rgba(148, 163, 184, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.08) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.08) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.08) 75%),
        #070b14;
    background-size: 28px 28px;
    background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}

.comparison-slider {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-slider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    display: block;
}

.print-order-content {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
    max-height: 90vh;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--bg-shell);
    box-shadow: var(--glass-shadow);
}

.print-order-preview {
    min-height: 520px;
    background: #070b14;
    display: grid;
    place-items: center;
}

.print-order-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.print-order-form {
    padding: 28px;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 18px;
}

.print-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.print-form-grid label {
    display: grid;
    gap: 7px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.print-form-grid input {
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
}

.result-comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 14px;
}

.result-variant-card {
    min-width: 0;
    min-height: 0;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: rgba(15, 23, 42, 0.84);
    color: var(--text-main);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
}

.result-variant-card img {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: calc(100vh - 260px);
    object-fit: contain;
    display: block;
    border-radius: calc(var(--border-radius-sm) - 4px);
    background: #070b14;
}

.result-variant-card span {
    display: grid;
    gap: 3px;
    min-height: 44px;
}

.result-variant-card span strong {
    font-weight: 800;
}

.result-variant-card small {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

.result-variant-card.active {
    border-color: rgba(125, 211, 252, 0.72);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.24), rgba(14, 165, 233, 0.18));
    box-shadow: 0 12px 34px rgba(14, 165, 233, 0.13);
}

.result-variant-card.active small {
    color: #dff5ff;
}

.result-variant-card:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.result-variant-card.failed {
    border-color: rgba(248, 113, 113, 0.32);
}

.result-variant-error {
    min-height: 0;
    display: grid;
    place-items: center;
    color: var(--accent-danger);
    font-size: 1.6rem;
    border-radius: calc(var(--border-radius-sm) - 4px);
    background: rgba(127, 29, 29, 0.12);
}

.action-panel {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
}

.review-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.action-panel h3 {
    margin-bottom: 4px;
}

.action-panel p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.result-cost-chip {
    min-width: 118px;
    min-height: 54px;
    padding: 8px 12px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: var(--border-radius-sm);
    background: rgba(14, 165, 233, 0.08);
    color: var(--text-muted);
    display: grid;
    align-content: center;
    gap: 3px;
    text-align: right;
    font-size: 0.72rem;
    font-weight: 700;
}

.result-cost-chip strong {
    color: #dff5ff;
    font-size: 1rem;
}

.refinement-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.regenerate-notes {
    width: 100%;
    min-height: 86px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
    resize: vertical;
    outline: none;
}

.regenerate-notes::placeholder {
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-buttons .btn {
    flex: 1;
}

/* Toast */
.toast {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-success);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.toast.show {
    bottom: 24px;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Auth View */
.auth-container {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: auto;
    margin-top: 10%;
    box-shadow: var(--glass-shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.input-group input:focus {
    border-color: var(--accent-purple);
}

.auth-form .btn {
    margin-top: 8px;
    width: 100%;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.text-link {
    color: var(--accent-purple);
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.text-link:hover {
    color: #a78bfa;
}

/* Landing Page */
.landing-view {
    padding: 0;
    background: #060608;
}

.landing-shell {
    width: 100%;
    min-height: 100%;
    color: var(--text-main);
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 12;
    min-height: 64px;
    padding: 12px clamp(22px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    background: rgba(6, 6, 8, 0.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-nav a {
    color: #d7def0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.landing-nav .btn {
    min-height: 38px;
    padding: 9px 15px;
}

.landing-hero {
    position: relative;
    min-height: min(780px, calc(100dvh - 86px));
    display: grid;
    align-items: center;
    padding: clamp(58px, 8vw, 110px) clamp(22px, 5vw, 72px);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#landing-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: #060608;
}

.landing-hero-sculpture {
    position: absolute;
    z-index: 1;
    right: clamp(28px, 8vw, 138px);
    top: 50%;
    width: min(34vw, 460px);
    aspect-ratio: 1;
    transform: translateY(-48%) perspective(900px) rotateX(58deg) rotateZ(-26deg);
    transform-style: preserve-3d;
    pointer-events: none;
    filter: drop-shadow(0 30px 70px rgba(255, 109, 0, 0.35));
}

.landing-hero-sculpture span {
    position: absolute;
    inset: 14%;
    border: 2px solid rgba(255, 109, 0, 0.85);
    border-radius: 18px;
    background: rgba(255, 109, 0, 0.12);
    transform-style: preserve-3d;
    animation: landingSculptureFloat 9s ease-in-out infinite;
}

.landing-hero-sculpture span:nth-child(2) {
    inset: 25%;
    border-color: rgba(0, 210, 255, 0.85);
    background: rgba(0, 210, 255, 0.14);
    transform: translateZ(76px) rotate(18deg);
    animation-delay: -2s;
}

.landing-hero-sculpture span:nth-child(3) {
    inset: 37%;
    border-color: rgba(255, 145, 0, 0.9);
    background: rgba(255, 145, 0, 0.14);
    transform: translateZ(138px) rotate(-12deg);
    animation-delay: -4s;
}

@keyframes landingSculptureFloat {
    0%, 100% {
        translate: 0 0 0;
    }
    50% {
        translate: 0 -16px 40px;
    }
}

.landing-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 6, 8, 0.96) 0%, rgba(6, 6, 8, 0.72) 42%, rgba(6, 6, 8, 0.08) 100%),
        linear-gradient(180deg, rgba(6, 6, 8, 0.12), rgba(6, 6, 8, 0.82));
    pointer-events: none;
}

.landing-hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    display: grid;
    gap: 22px;
}

.landing-kicker,
.landing-section-heading p,
.landing-proof-copy p {
    color: #ff9100;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.landing-hero h1 {
    max-width: 760px;
    font-size: clamp(3.1rem, 7vw, 6.8rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.landing-hero p:not(.landing-kicker) {
    max-width: 650px;
    color: #d7def0;
    font-size: clamp(1.02rem, 1.7vw, 1.28rem);
    line-height: 1.7;
}

.landing-hero-actions,
.landing-cta-band {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.landing-hero-actions .btn,
.landing-cta-band .btn,
.landing-contact-form .btn {
    min-height: 50px;
    padding: 13px 20px;
}

.landing-band {
    padding: clamp(64px, 8vw, 104px) clamp(22px, 5vw, 72px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-section-heading {
    max-width: 760px;
    margin-bottom: 30px;
    display: grid;
    gap: 10px;
}

.landing-section-heading h2,
.landing-proof-copy h2,
.landing-cta-band h2 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.landing-feature-grid,
.landing-use-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.landing-feature-grid article,
.landing-use-grid article,
.landing-proof-list div {
    min-height: 210px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.landing-feature-grid i {
    width: 42px;
    height: 42px;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(125, 211, 252, 0.14);
    color: #7dd3fc;
}

.landing-feature-grid h3,
.landing-use-grid h3 {
    font-size: 1.08rem;
    margin-bottom: 12px;
}

.landing-feature-grid p,
.landing-use-grid p,
.landing-proof-list span,
.landing-cta-band p,
.landing-footer p {
    color: var(--text-muted);
    line-height: 1.62;
}

.landing-use-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-use-grid article span {
    display: block;
    color: #7dd3fc;
    font-weight: 900;
    margin-bottom: 44px;
}

.landing-proof-band {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: start;
}

.landing-proof-copy {
    display: grid;
    gap: 10px;
}

.landing-proof-list {
    display: grid;
    gap: 12px;
}

.landing-proof-list div {
    min-height: 112px;
    display: grid;
    align-content: center;
    gap: 6px;
}

.landing-proof-list strong {
    font-size: 1.1rem;
}

.landing-cta-band {
    justify-content: space-between;
    padding: clamp(56px, 7vw, 90px) clamp(22px, 5vw, 72px);
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-cta-band h2,
.landing-cta-band p {
    max-width: 760px;
}

.landing-contact-band {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.75fr);
    gap: clamp(28px, 5vw, 72px);
}

.landing-contact-form {
    display: grid;
    gap: 14px;
}

.landing-contact-form label {
    display: grid;
    gap: 7px;
    color: #d7def0;
    font-size: 0.86rem;
    font-weight: 700;
}

.landing-contact-form input,
.landing-contact-form textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.065);
    color: var(--text-main);
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

.landing-contact-form input:focus,
.landing-contact-form textarea:focus {
    border-color: #7dd3fc;
}

.landing-footer {
    min-height: 120px;
    padding: 28px clamp(22px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #060608;
}

@media (max-width: 1040px) {
    .landing-feature-grid,
    .landing-use-grid,
    .landing-proof-band,
    .landing-contact-band {
        grid-template-columns: 1fr 1fr;
    }

    .landing-proof-band .landing-proof-copy,
    .landing-contact-band .landing-section-heading {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .landing-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .landing-hero {
        min-height: calc(100dvh - 86px);
        padding-top: 78px;
        align-items: end;
    }

    .landing-hero::after {
        background:
            linear-gradient(180deg, rgba(6, 6, 8, 0.18) 0%, rgba(6, 6, 8, 0.78) 38%, rgba(6, 6, 8, 0.98) 100%);
    }

    .landing-hero h1 {
        font-size: clamp(2.65rem, 14vw, 4.2rem);
    }

    .landing-hero-sculpture {
        right: -68px;
        top: 26%;
        width: 320px;
        opacity: 0.62;
    }

    .landing-feature-grid,
    .landing-use-grid,
    .landing-proof-band,
    .landing-contact-band {
        grid-template-columns: 1fr;
    }

    .landing-feature-grid article,
    .landing-use-grid article {
        min-height: 178px;
    }

    .landing-cta-band,
    .landing-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Lucid Parameters Panel */
.lucid-parameters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--border-radius-md);
    margin-bottom: 16px;
    animation: slideDown var(--transition-smooth);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.parameter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.parameter-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dimensions-toggle-group {
    display: flex;
    gap: 8px;
}

.dimension-btn {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dimension-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.dimension-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.parameter-row {
    display: flex;
    gap: 16px;
}

.parameter-group.half {
    flex: 1;
}

/* Premium Range Slider */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-input);
    outline: none;
    border: 1px solid var(--border-color);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-purple);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: transform 0.1s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Premium Switch Checkboxes */
.checkbox-row {
    justify-content: flex-start;
    gap: 24px;
    padding-top: 4px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
}

.ios-checkbox {
    appearance: none;
    width: 38px;
    height: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
}

.ios-checkbox::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    left: 1px;
    top: 1px;
    background: var(--text-muted);
    transition: left 0.3s, background 0.3s;
}

.ios-checkbox:checked {
    background: var(--accent-purple);
}

.ios-checkbox:checked::before {
    left: 19px;
    background: white;
}

@media (min-width: 900px) {
    .app-container.tabs-visible {
        display: grid;
        grid-template-columns: 112px 1fr;
        grid-template-rows: 88px 1fr;
    }

    .app-container.tabs-visible .app-header {
        grid-column: 1 / -1;
        grid-row: 1;
        padding: 22px 32px 18px 136px;
    }

    .app-container.tabs-visible .app-tabs {
        grid-column: 1;
        grid-row: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 92px 14px 22px;
        background: rgba(3, 7, 18, 0.48);
        border-right: 1px solid rgba(148, 163, 184, 0.12);
    }

    .app-container.tabs-visible .tab-btn {
        flex: none;
        width: 74px;
        height: 74px;
        border-radius: 20px;
        flex-direction: column;
        gap: 7px;
        font-size: 0.72rem;
        line-height: 1.05;
        padding: 8px;
        text-align: center;
    }

    .app-container.tabs-visible .tab-btn i {
        font-size: 1.25rem;
    }

    .app-container.tabs-visible .view {
        grid-column: 2;
        grid-row: 2;
        top: 88px;
        left: 112px;
        width: calc(100% - 112px);
        height: calc(100% - 88px);
        padding: 28px clamp(28px, 4vw, 72px) 48px;
    }

    #view-upload.active {
        display: grid;
        grid-template-columns: minmax(480px, 1fr) minmax(280px, 420px);
        gap: clamp(24px, 3vw, 42px);
        align-items: stretch;
    }

    #view-upload .upload-area {
        min-height: calc(100vh - 210px);
    }

    #view-upload .recent-images {
        margin-top: 0;
        align-self: stretch;
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid var(--border-color);
        border-radius: 24px;
        padding: 24px;
        overflow-y: auto;
    }

    #view-upload .image-grid {
        grid-template-columns: 1fr;
    }

    #view-prompt.active {
        display: grid;
        grid-template-columns: minmax(420px, 1fr) minmax(340px, 440px);
        gap: clamp(24px, 3vw, 40px);
        align-items: stretch;
    }

    #view-prompt .preview-container {
        height: auto;
        min-height: calc(100vh - 210px);
        margin-bottom: 0;
    }

    #view-prompt .prompt-section {
        display: flex;
        flex-direction: column;
    }

    #view-mask.active {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    #view-settings.active {
        display: flex;
    }

    #view-result.active {
        display: grid;
        grid-template-rows: minmax(320px, 1fr) auto;
    }

    .image-modal {
        position: fixed;
    }
}

@media (min-width: 1280px) {
    .app-container.tabs-visible .app-tabs {
        width: 120px;
    }

    .app-container.tabs-visible .view {
        left: 120px;
        width: calc(100% - 120px);
    }

    #view-gallery .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (min-width: 900px) and (max-width: 1120px) {
    .result-comparison-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .realtime-shell {
        grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    }

    .realtime-controls {
        grid-column: 1 / -1;
    }
}

@media (max-width: 899px) {
    .result-comparison-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .result-variant-card img,
    .result-variant-error {
        min-height: 220px;
    }

    .realtime-style-view {
        overflow-y: auto;
    }

    .realtime-shell {
        height: auto;
        grid-template-columns: 1fr;
    }

    .realtime-output-shell {
        min-height: 300px;
    }

    .realtime-preset-actions,
    .realtime-cost-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body {
        overflow: hidden;
    }

    .app-container {
        max-width: 520px;
        margin: 0 auto;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }

    .app-tabs {
        flex-wrap: nowrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 0;
        height: 44px;
        font-size: 0.85rem;
    }

    .upload-area {
        min-height: 420px;
    }

    .upload-area .btn {
        min-width: 100%;
    }

    .camera-modal-content {
        width: min(520px, 100%);
        max-height: 92vh;
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .camera-preview-shell {
        min-height: min(52vh, 460px);
    }

    .camera-panel {
        padding: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-actions {
        gap: 8px;
    }

    .gallery-primary-actions {
        grid-template-columns: 1fr;
    }

    .gallery-secondary-actions {
        grid-template-columns: repeat(2, 42px);
    }

    .gallery-icon-btn {
        width: 42px;
    }

    .gallery-adjust-content {
        max-height: 92vh;
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .gallery-adjust-preview {
        min-height: 260px;
        max-height: 42vh;
    }

    .settings-summary-grid,
    .settings-panels,
    .profile-grid,
    .account-form-grid {
        grid-template-columns: 1fr;
    }

    .settings-header,
    .settings-panel-heading,
    .profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-hero {
        display: flex;
    }

    .settings-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .settings-header-actions .btn {
        flex: 1;
    }

    .input-wrapper {
        flex-wrap: wrap;
    }

    .input-wrapper textarea {
        flex-basis: 100%;
    }

    .generation-cost-chip {
        flex: 1;
        text-align: left;
    }

    .review-heading {
        flex-direction: column;
    }

    .result-cost-chip {
        width: 100%;
        text-align: left;
    }

    .mask-toolbar {
        flex-wrap: wrap;
    }

    .mask-size-control {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .mask-tool-btn span {
        display: none;
    }

    .mask-workspace {
        min-height: 460px;
    }

    .mask-canvas-shell {
        width: 100%;
        height: auto;
    }

    .print-order-content {
        grid-template-columns: 1fr;
        max-height: 94vh;
    }

    .print-order-preview {
        min-height: 260px;
        max-height: 36vh;
    }

    .print-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .app-container {
        max-width: none;
        box-shadow: none;
    }

    .app-header {
        padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 10px;
    }

    .logo {
        font-size: 1.35rem;
    }

    .settings-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .app-tabs {
        gap: 8px;
        padding: 0 12px 10px;
    }

    .tab-btn {
        height: 48px;
        border-radius: 14px;
        flex-direction: column;
        gap: 4px;
        font-size: 0.68rem;
        line-height: 1.05;
        padding: 6px 4px;
        text-align: center;
    }

    .tab-btn i {
        font-size: 1rem;
    }

    .view,
    .app-container.tabs-visible .view {
        top: 126px;
        height: calc(100% - 126px);
        padding: 14px 12px 28px;
    }

    .upload-area {
        min-height: auto;
        padding: 28px 16px;
        border-radius: 22px;
        gap: 12px;
    }

    .upload-icon-wrapper {
        width: 68px;
        height: 68px;
        font-size: 1.6rem;
        margin-bottom: 2px;
    }

    .upload-area h2 {
        font-size: 1.9rem;
        line-height: 1.05;
    }

    .upload-area p {
        font-size: 0.95rem;
    }

    .upload-area .btn {
        height: 52px;
        font-size: 0.95rem;
        padding-inline: 14px;
    }

    #btn-text-to-image {
        max-width: none !important;
    }

    .recent-images {
        margin-top: 22px;
    }

    .image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #view-prompt .preview-container {
        height: min(44vh, 360px);
        min-height: 230px;
        border-radius: 22px;
        margin-bottom: 14px;
    }

    .prompt-section {
        padding: 18px;
        border-radius: 22px;
    }

    .segmented-control {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .segment-btn {
        min-height: 46px;
        justify-content: center;
        white-space: normal;
    }

    .model-selection {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .select-wrapper,
    .model-select {
        width: 100%;
    }

    .model-select {
        min-height: 32px;
        padding-right: 26px;
        white-space: normal;
    }

    .dimension-btn {
        min-height: 42px;
        font-size: 0.78rem;
    }

    .parameter-row {
        grid-template-columns: 1fr;
    }

    .style-reference-picker {
        min-height: 132px;
    }

    .style-strength-grid {
        grid-template-columns: 1fr;
    }

    .input-wrapper {
        padding: 10px;
        gap: 10px;
    }

    .input-wrapper textarea,
    .regenerate-notes {
        font-size: 1rem;
    }

    .input-wrapper .icon-btn {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
    }

    .suggestions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mask-editor-header,
    .mask-editor-actions,
    .gallery-toolbar,
    .settings-header {
        flex-direction: column;
        align-items: stretch;
    }

    .mask-editor-header h2,
    .gallery-toolbar h2,
    .settings-header h2 {
        font-size: 1.45rem;
    }

    .mask-workspace {
        min-height: 360px;
        gap: 12px;
    }

    .mask-toolbar,
    .mask-editor-actions,
    .action-buttons,
    .camera-actions {
        grid-template-columns: 1fr;
    }

    .mask-tool-group,
    .mask-icon-actions {
        width: 100%;
        justify-content: stretch;
    }

    .mask-tool-btn,
    .mask-icon-actions .btn-icon {
        flex: 1;
    }

    .mask-tool-btn span {
        display: inline;
    }

    .gallery-filter-bar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gallery-section-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gallery-card {
        max-width: none;
    }

    .gallery-actions {
        padding: 10px;
    }

    .gallery-primary-actions {
        grid-template-columns: 1fr;
    }

    .gallery-secondary-actions {
        grid-template-columns: repeat(2, minmax(48px, 1fr));
    }

    .gallery-icon-btn {
        width: auto;
        min-height: 48px;
    }

    .gallery-adjust-content,
    .camera-modal-content {
        width: 100%;
        max-height: calc(100dvh - 24px);
        border-radius: 18px;
    }

    .gallery-adjust-panel,
    .camera-panel {
        padding: 16px;
    }

    .gallery-adjust-preview,
    .camera-preview-shell {
        min-height: 260px;
        max-height: 46vh;
    }

    .settings-card,
    .settings-panel {
        padding: 16px;
    }

    .pricing-row,
    .usage-row {
        align-items: stretch;
        flex-direction: column;
    }

    .pricing-row label {
        width: 100%;
    }

    #view-result.active {
        gap: 14px;
    }

    .result-preview {
        min-height: 260px;
        max-height: 52vh;
    }

    .action-panel {
        padding: 16px;
        border-radius: 18px;
    }
}

/* Admin Workflow Debugger */
.workflow-view {
    padding: 0;
    overflow: hidden;
}

.app-container.workflow-focus-active .app-header,
.app-container.workflow-focus-active .app-tabs {
    display: none;
}

.app-container.workflow-focus-active .view {
    top: 0;
    height: 100dvh;
}

.workflow-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 360px;
    height: 100%;
    min-height: 0;
    border-top: 1px solid var(--border-color);
}

.workflow-shell.canvas-focus {
    grid-template-columns: minmax(0, 1fr);
    border-top: 0;
}

.workflow-shell.canvas-focus .workflow-sidebar,
.workflow-shell.canvas-focus .workflow-detail-panel {
    display: none;
}

.workflow-shell.canvas-focus .workflow-main {
    height: 100dvh;
}

.workflow-sidebar,
.workflow-detail-panel {
    background: rgba(10, 16, 30, 0.94);
    border-right: 1px solid var(--border-color);
    padding: 18px;
    overflow: auto;
}

.workflow-detail-panel {
    border-right: 0;
    border-left: 1px solid var(--border-color);
}

.workflow-side-heading,
.workflow-toolbar,
.workflow-node-head,
.workflow-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.workflow-side-heading h2,
.workflow-detail-heading h3 {
    font-size: 1.15rem;
    line-height: 1.2;
}

.workflow-side-heading p,
.workflow-detail-heading p,
.workflow-name-field span,
.workflow-history-empty,
.workflow-node-body small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.workflow-name-field {
    display: grid;
    gap: 7px;
    margin: 18px 0 12px;
}

.workflow-name-field input,
.workflow-json-editor {
    width: 100%;
    color: var(--text-main);
    background: #111a2a;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 11px 12px;
    font: inherit;
}

.workflow-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.workflow-flow-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.workflow-mode-toggle .segment-btn,
.workflow-flow-tabs .segment-btn {
    border-radius: var(--border-radius-sm);
}

.workflow-history {
    display: grid;
    gap: 8px;
}

.workflow-history-item {
    appearance: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--surface-soft);
    color: var(--text-main);
    padding: 12px;
    text-align: left;
    cursor: pointer;
}

.workflow-history-item strong,
.workflow-history-item span {
    display: block;
}

.workflow-history-item span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.workflow-history-item.active {
    border-color: rgba(125, 211, 252, 0.55);
    background: rgba(14, 165, 233, 0.12);
}

.workflow-main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: #09111f;
}

.workflow-toolbar {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(17, 24, 39, 0.9);
}

.workflow-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.workflow-toolbar .btn {
    min-height: 40px;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.workflow-canvas-shell {
    position: relative;
    min-height: 0;
    overflow: hidden;
    cursor: grab;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
}

.workflow-canvas-shell:active {
    cursor: grabbing;
}

.workflow-canvas {
    position: absolute;
    inset: 0 auto auto 0;
    width: 1200px;
    height: 2360px;
    transform-origin: 0 0;
}

.workflow-edges,
.workflow-nodes {
    position: absolute;
    inset: 0;
}

.workflow-edges path {
    fill: none;
    stroke: rgba(125, 211, 252, 0.5);
    stroke-width: 2.5;
}

.workflow-edges marker path {
    fill: rgba(125, 211, 252, 0.72);
}

.workflow-node {
    position: absolute;
    width: 280px;
    min-height: 164px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: var(--border-radius-sm);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    padding: 13px;
    cursor: grab;
    user-select: none;
}

.workflow-node.selected {
    outline: 2px solid var(--accent-sky);
    outline-offset: 2px;
}

.workflow-node.image {
    border-color: rgba(16, 185, 129, 0.46);
}

.workflow-node.json {
    border-color: rgba(251, 191, 36, 0.46);
}

.workflow-node.prompt {
    border-color: rgba(125, 211, 252, 0.52);
}

.workflow-node.slider {
    border-color: rgba(168, 85, 247, 0.52);
}

.workflow-slider-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 6px;
    color: #d8b4fe;
    font-size: 0.76rem;
    font-weight: 600;
}

.workflow-slider-chip strong {
    color: #fff;
    font-size: 0.85rem;
}

.workflow-node.generation,
.workflow-node.output {
    border-color: rgba(248, 113, 113, 0.44);
}

.workflow-node-head span {
    font-size: 0.92rem;
    font-weight: 800;
}

.workflow-node-head strong {
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.68rem;
    text-transform: uppercase;
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.workflow-node.status-running .workflow-node-head strong {
    background: rgba(125, 211, 252, 0.16);
    color: var(--accent-sky);
}

.workflow-node.status-approved .workflow-node-head strong {
    background: rgba(16, 185, 129, 0.16);
    color: var(--accent-success);
}

.workflow-node.status-failed .workflow-node-head strong,
.workflow-node.status-rejected .workflow-node-head strong {
    background: rgba(248, 113, 113, 0.16);
    color: var(--accent-danger);
}

.workflow-node.status-stale .workflow-node-head strong,
.workflow-node.status-needs-approval .workflow-node-head strong {
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
}

.workflow-node-body {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.workflow-node-body img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 7px;
    background: #020617;
}

.workflow-node-body p {
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.45;
}

.workflow-detail-empty {
    min-height: 220px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: var(--text-muted);
}

.workflow-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.workflow-detail-actions .btn {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.82rem;
}

.workflow-json-editor {
    min-height: 330px;
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.78rem;
    line-height: 1.5;
}

.workflow-version-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.workflow-version-list button {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-muted);
    padding: 6px 9px;
    cursor: pointer;
}

@media (max-width: 1040px) {
    .workflow-shell {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .workflow-detail-panel {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: min(360px, 92vw);
        z-index: 4;
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.35);
    }
}

@media (max-width: 720px) {
    .workflow-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .workflow-sidebar {
        max-height: 210px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .workflow-main {
        min-height: 0;
    }

    .workflow-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

.workflow-flow-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    padding: 3px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.workflow-toolbar .btn[data-workflow-flow].active,
.workflow-flow-switch .btn[data-workflow-flow].active {
    background: var(--primary-gradient);
    border-color: rgba(147, 197, 253, 0.45);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 109, 0, 0.35);
}

.workflow-node-quick-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
}

.workflow-node-quick-actions .btn {
    flex: 1;
    font-size: 0.76rem;
    padding: 6px 8px;
    min-height: 28px;
    border-radius: 6px;
}

.workflow-node-image-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.workflow-node-image-empty i {
    font-size: 1.4rem;
    opacity: 0.6;
}

.workflow-node-image-empty p {
    font-size: 0.8rem;
    margin: 0;
}

.gallery-selection-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(255, 109, 0, 0.2), rgba(0, 210, 255, 0.16));
    border: 1px solid rgba(255, 109, 0, 0.45);
    border-radius: var(--border-radius-md);
    margin-bottom: 14px;
    color: #f1f5f9;
    font-weight: 500;
}

.gallery-selection-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
}

.gallery-selection-info i {
    color: #ff9100;
    font-size: 1.1rem;
}

/* ==========================================================================
   Higgsfield-Inspired Showcase & SuperStudio Banner Styles
   ========================================================================== */
.landing-showcase-band {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(255, 109, 0, 0.08) 0%, transparent 60%), #060608;
}

.landing-pill-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 109, 0, 0.12);
    border: 1px solid rgba(255, 109, 0, 0.35);
    color: #ff9100 !important;
    font-size: 0.76rem !important;
    font-weight: 850 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 8px;
}

.landing-pill-kicker i {
    color: #ff9100;
}

.landing-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.showcase-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0c0c12;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.showcase-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 109, 0, 0.5);
    box-shadow: 0 20px 45px rgba(255, 109, 0, 0.2);
}

.showcase-card-media {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.showcase-glow-circle {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 109, 0, 0.32) 0%, transparent 70%);
    top: -40px;
    right: -40px;
    pointer-events: none;
}

.showcase-card-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.showcase-tag {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #ff9100;
    background: rgba(255, 109, 0, 0.16);
    border: 1px solid rgba(255, 109, 0, 0.32);
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 4px;
}

.showcase-card:nth-child(2) .showcase-tag {
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.16);
    border-color: rgba(0, 210, 255, 0.32);
}

.showcase-card h3 {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.showcase-card p {
    font-size: 0.86rem;
    color: #c4cde0;
    line-height: 1.45;
    margin: 0;
}

.showcase-recreate-btn {
    align-self: flex-start;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 750;
    padding: 9px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-recreate-btn:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(255, 109, 0, 0.5);
    transform: scale(1.04);
}

/* Higgsfield SuperStudio Banner */
.landing-superstudio-banner {
    position: relative;
    margin-top: 56px;
    border-radius: 28px;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 109, 0, 0.14) 0%, rgba(10, 10, 15, 0.98) 72%), linear-gradient(180deg, #0a0a10 0%, #060608 100%);
    border: 2px solid rgba(255, 109, 0, 0.48);
    box-shadow: 0 0 70px rgba(255, 109, 0, 0.18), inset 0 0 50px rgba(255, 109, 0, 0.08);
    padding: clamp(52px, 7vw, 84px) clamp(24px, 5vw, 64px);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.superstudio-glow-border {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 109, 0, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.7;
}

.superstudio-center-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.superstudio-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.35);
    border-radius: 999px;
    padding: 6px 14px;
}

.superstudio-center-content h2 {
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    font-weight: 950;
    letter-spacing: 2px;
    color: #ffffff;
    background: linear-gradient(135deg, #ffffff 25%, #ff9100 75%, #ff5722 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.superstudio-center-content p {
    font-size: clamp(0.98rem, 1.5vw, 1.2rem);
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 480px;
}

.superstudio-cta {
    min-height: 52px;
    padding: 13px 30px;
    font-size: 1rem;
    font-weight: 750;
    border-radius: 999px;
    margin-top: 8px;
    box-shadow: 0 8px 30px rgba(255, 109, 0, 0.45);
}

.superstudio-card-floating {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(18, 18, 26, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    animation: floatPulse 7s ease-in-out infinite;
}

.superstudio-card-floating.float-left {
    left: clamp(16px, 4vw, 56px);
    top: 32%;
}

.superstudio-card-floating.float-right-top {
    right: clamp(16px, 4vw, 56px);
    top: 20%;
    animation-delay: -2.3s;
}

.superstudio-card-floating.float-right-bottom {
    right: clamp(24px, 5vw, 72px);
    bottom: 18%;
    animation-delay: -4.6s;
}

.chip-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff6d00;
    box-shadow: 0 0 12px #ff6d00;
    flex-shrink: 0;
}

.chip-dot.cyan {
    background: #00d2ff;
    box-shadow: 0 0 12px #00d2ff;
}

.superstudio-card-floating i {
    font-size: 1.25rem;
    color: #ff9100;
}

.superstudio-card-floating:has(.chip-dot.cyan) i {
    color: #00d2ff;
}

.superstudio-card-floating strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 750;
    color: #ffffff;
    line-height: 1.2;
}

.superstudio-card-floating small {
    display: block;
    font-size: 0.74rem;
    color: #94a3b8;
    line-height: 1.2;
    margin-top: 2px;
}

@keyframes floatPulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 1100px) {
    .landing-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .superstudio-card-floating {
        display: none;
    }
}

@media (max-width: 640px) {
    .landing-showcase-grid {
        grid-template-columns: 1fr;
    }
    .landing-superstudio-banner {
        padding: 40px 20px;
    }
}

/* Dashboard & Studio Enhancements (Higgsfield Style) */
.realtime-slider-row input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    transition: background var(--transition-fast);
}

.realtime-slider-row input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(255, 109, 0, 0.7);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.realtime-slider-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 14px rgba(255, 109, 0, 0.95);
}

.gallery-card {
    background: var(--card-gradient) !important;
    border: 1px solid var(--border-color) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.gallery-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 109, 0, 0.45) !important;
    box-shadow: 0 16px 36px rgba(255, 109, 0, 0.2) !important;
}

.workflow-node {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(14, 14, 20, 0.92) !important;
}

.workflow-node.active,
.workflow-node:hover {
    border-color: rgba(255, 109, 0, 0.5) !important;
    box-shadow: 0 8px 24px rgba(255, 109, 0, 0.2) !important;
}
