:root {
    --ink: #e8edf4;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --surface: #0a0e16;
    --surface-soft: #121826;
    --panel: #141a24;
    --teal: #0ea5e9;
    --teal-deep: #38bdf8;
    --teal-soft: rgba(14, 165, 233, 0.14);
    --blue: #0ea5e9;
    --blue-deep: #38bdf8;
    --blue-soft: rgba(14, 165, 233, 0.12);
    --green: #22c55e;
    --red: #ef4444;
    --brass: #c9a66b;
    --brass-soft: rgba(201, 166, 107, 0.16);
    --ink-panel: #0c111a;
    --accent: #0ea5e9;
    --accent-glow: rgba(14, 165, 233, 0.28);
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.28);
    --ui-font: "Segoe UI Variable", "PingFang SC", "Microsoft YaHei UI", "Helvetica Neue", sans-serif;
    --brand-font: "Palatino Linotype", "Book Antiqua", "Songti SC", Georgia, serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    background: #050814;
    font: 13px/1.45 var(--ui-font);
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
    letter-spacing: 0;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

[hidden] {
    display: none !important;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    background: #afbfcd;
    background-clip: padding-box;
}

.app {
    width: 100%;
    height: 100%;
    min-width: 960px;
    min-height: 640px;
    display: grid;
    grid-template-rows: 48px 40px minmax(0, 1fr);
    overflow: hidden;
    background: #050814;
}

.topbar {
    position: relative;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(150px, 190px) auto minmax(220px, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.98), rgba(10, 14, 22, 0.98));
    color: var(--ink);
    backdrop-filter: blur(16px);
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #041018;
    background: linear-gradient(145deg, #38bdf8 0%, #0ea5e9 100%);
    border-radius: 8px;
    box-shadow: 0 0 16px var(--accent-glow);
}

.brand-mark svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.7;
}

.brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.15;
}

.brand-name {
    color: #f1f5f9;
    font-family: var(--brand-font);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    white-space: nowrap;
}

.brand-copy span {
    color: rgba(148, 163, 184, 0.9);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.top-tools {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    padding: 3px 6px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
}

.top-modes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.top-modes .mode-btn {
    height: 32px;
    min-width: 58px;
    flex-direction: row;
    gap: 5px;
    padding: 0 10px;
    border-radius: 8px;
}

.top-modes .mode-btn span {
    font-size: 11px;
}

.top-modes .mode-btn svg {
    width: 14px;
    height: 14px;
}

.top-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recharge-btn {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    color: #041018;
    background: linear-gradient(145deg, #38bdf8, #0ea5e9);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 0 14px var(--accent-glow);
}

.recharge-btn:hover {
    filter: brightness(1.08);
}

.recharge-btn svg {
    width: 16px;
    height: 16px;
}

.service-state {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(244, 241, 234, 0.58);
    font-size: 11px;
    white-space: nowrap;
}

.service-state>span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(244, 241, 234, 0.35);
}

.service-state.ready>span {
    background: #6fcf97;
    box-shadow: 0 0 0 3px rgba(111, 207, 151, 0.18);
}

.topbar .icon-btn {
    color: rgba(244, 241, 234, 0.78);
}

.topbar .icon-btn:hover,
.topbar .zoom-value:hover {
    color: #f7f1e6;
    background: rgba(255, 255, 255, 0.08);
}

.topbar .icon-btn.active {
    color: #1a2332;
    background: linear-gradient(145deg, #f0e2c4, #c9a66b);
    box-shadow: none;
}

.topbar .danger-quiet:hover {
    color: #ffb4b4;
    background: rgba(194, 75, 75, 0.18);
}

.topbar .tool-divider {
    background: rgba(255, 255, 255, 0.14);
}

.icon-btn,
.zoom-value {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: #5a6573;
    background: transparent;
    border-radius: 7px;
    transition: background 0.16s ease, color 0.16s ease;
}

.icon-btn:hover,
.zoom-value:hover {
    color: var(--ink);
    background: var(--blue-soft);
}

.icon-btn.active {
    color: var(--teal-deep);
    background: var(--teal-soft);
    box-shadow: inset 0 0 0 1px rgba(184, 149, 108, 0.28);
}

.icon-btn svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.8;
}

.icon-btn.small {
    width: 28px;
    height: 28px;
}

.icon-btn.small svg {
    width: 15px;
    height: 15px;
}

.danger-quiet:hover {
    color: var(--red);
    background: #fff3f3;
}

.tool-divider {
    width: 1px;
    height: 20px;
    margin: 0 3px;
    background: var(--line);
}

.ai-queue-bar {
    position: relative;
    z-index: 30;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 30px;
    align-items: center;
    gap: 9px;
    padding: 4px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 14, 22, 0.96);
}

.queue-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.queue-heading svg {
    width: 16px;
    height: 16px;
    color: var(--teal-deep);
}

.queue-heading span {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 10px;
    color: var(--blue-deep);
    background: var(--blue-soft);
    font-size: 11px;
    font-weight: 700;
}

.queue-list {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.queue-empty {
    color: var(--muted);
    font-size: 11px;
}

.queue-entry {
    width: 188px;
    min-width: 188px;
    height: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--panel);
}

.queue-entry.active {
    border-color: var(--teal);
    box-shadow: inset 3px 0 0 var(--teal);
}

.queue-select {
    min-width: 0;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    padding: 3px 4px 3px 7px;
    color: var(--ink);
    background: transparent;
    text-align: left;
}

.queue-select:hover {
    background: var(--teal-soft);
}

.queue-select svg {
    width: 15px;
    height: 15px;
    color: var(--teal-deep);
}

.queue-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.queue-copy strong,
.queue-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-copy strong {
    font-size: 11px;
    font-weight: 700;
}

.queue-copy small {
    color: var(--muted);
    font-size: 10px;
}

.queue-remove {
    width: 28px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border-left: 1px solid var(--line);
}

.queue-remove:hover {
    color: var(--red);
    background: #fff3f3;
}

.queue-remove svg {
    width: 14px;
    height: 14px;
}

.workspace {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 0;
    background: #050814;
}

.workspace.canvas-workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
}

body.inspector-collapsed .workspace.canvas-workspace {
    grid-template-columns: minmax(0, 1fr) 0;
}

body.inspector-collapsed .inspector {
    width: 0;
    min-width: 0;
    overflow: hidden;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.mode-rail:not(.top-modes) {
    display: none;
}

.mode-btn {
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    color: #94a3b8;
    background: transparent;
    border-radius: 10px;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.mode-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.6;
}

.mode-btn span {
    font-size: 11px;
    letter-spacing: 0.04em;
}

.mode-btn:hover {
    color: #e2e8f0;
    background: rgba(14, 165, 233, 0.12);
}

.mode-btn.active {
    color: #041018;
    background: linear-gradient(145deg, #38bdf8, #0ea5e9);
    box-shadow: 0 0 16px var(--accent-glow);
}

.mode-btn.utility.active {
    color: var(--teal-deep);
    background: var(--teal-soft);
    box-shadow: inset 0 0 0 1px rgba(184, 149, 108, 0.28);
}

.rail-spacer {
    flex: 1 1 auto;
}

.studio {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    border-right: 1px solid var(--line);
    background: #060b18;
}

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

.canvas-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 10px 0 14px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.canvas-title {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.canvas-title>span {
    font-weight: 800;
}

.canvas-title small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.canvas-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.zoom-value {
    width: 46px;
    color: var(--muted);
    font-size: 11px;
}

.compare-range {
    width: 116px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 5px;
}

.compare-range svg {
    width: 14px;
    color: var(--muted);
}

.compare-range input {
    min-width: 0;
    width: 100%;
}

.stage {
    --zoom: 1;
    --split: 50%;
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: stretch;
    overflow: hidden;
    outline: 0;
    background-color: #060b18;
    background-image:
        radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.08), transparent 34%),
        radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: auto, 24px 24px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.empty-state strong {
    color: var(--ink);
    font-family: var(--brand-font);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.empty-hint {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.empty-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    color: #1a2332;
    background: linear-gradient(145deg, #f0e2c4, #c9a66b);
    border: 1px solid rgba(184, 149, 108, 0.4);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(20, 26, 34, 0.12);
}

.empty-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.6;
}

.empty-actions {
    display: flex;
    gap: 8px;
}

.btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 700;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn.primary {
    color: #1a2332;
    background: linear-gradient(145deg, #f0e2c4, #c9a66b);
    border-color: rgba(184, 149, 108, 0.55);
}

.btn.primary:hover {
    background: linear-gradient(145deg, #f7ecd4, #d4b483);
    border-color: #c9a66b;
}

.btn.primary-soft {
    color: var(--teal-deep);
    background: var(--teal-soft);
    border-color: rgba(184, 149, 108, 0.35);
}

.btn.primary-soft:hover {
    background: #efe4d4;
    border-color: rgba(184, 149, 108, 0.55);
}

.btn.secondary {
    color: #425466;
    background: #ffffff;
    border-color: var(--line-strong);
}

.btn.secondary:hover {
    color: var(--blue-deep);
    border-color: #9cc8ee;
    background: var(--blue-soft);
}

.image-view,
.three-view {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-view img {
    position: absolute;
    max-width: calc(100% - 36px);
    max-height: calc(100% - 36px);
    object-fit: contain;
    transform: scale(var(--zoom));
    transform-origin: center;
    box-shadow: 0 8px 28px rgba(21, 32, 51, 0.18);
    user-select: none;
    -webkit-user-drag: none;
}

.image-view #resultImage {
    z-index: 2;
}

.image-view.compare #resultImage {
    clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.image-view #baseImage {
    z-index: 1;
}

.image-view:not(.compare).has-result #baseImage {
    visibility: hidden;
}

#maskCanvas {
    position: absolute;
    z-index: 4;
    max-width: calc(100% - 36px);
    max-height: calc(100% - 36px);
    transform: scale(var(--zoom));
    transform-origin: center;
    cursor: crosshair;
    touch-action: none;
}

.compare-line {
    position: absolute;
    z-index: 3;
    top: 16px;
    bottom: 16px;
    left: var(--split);
    width: 2px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(21, 32, 51, 0.32);
    pointer-events: none;
}

.three-view canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.loading-layer,
.drop-layer {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #314253;
    background: rgba(245, 249, 252, 0.9);
    backdrop-filter: blur(3px);
}

.loading-layer span {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #cfe3ef;
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.drop-layer {
    color: var(--teal-deep);
    background: rgba(227, 248, 252, 0.94);
    border: 2px dashed var(--teal);
}

.drop-layer svg {
    width: 32px;
    height: 32px;
}

.prompt-dock {
    min-height: 0;
    display: grid;
    grid-template-rows: 34px minmax(0, 1fr);
    padding: 0 14px 14px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #fbfbfc, #f5f6f8);
}

.prompt-head,
.section-heading,
.drawer-head,
.modal-head,
.modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.prompt-head strong,
.section-heading strong {
    font-size: 12px;
}

.prompt-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
}

.text-btn {
    min-height: 27px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 7px;
    color: var(--teal-deep);
    background: transparent;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.text-btn:hover {
    background: var(--teal-soft);
}

.text-btn svg {
    width: 14px;
    height: 14px;
}

#promptInput {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 11px 12px;
    resize: none;
    outline: 0;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 10px;
    line-height: 1.55;
    box-shadow: inset 0 1px 2px rgba(20, 26, 34, 0.03);
}

#promptInput:focus {
    border-color: rgba(184, 149, 108, 0.65);
    box-shadow: 0 0 0 3px rgba(184, 149, 108, 0.12);
}

.inspector {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    background: linear-gradient(180deg, #121826, #0c111a);
    border-left: 1px solid var(--line);
    transition: width 0.2s ease, opacity 0.2s ease;
}

.inspector-scroll {
    min-height: 0;
    overflow: auto;
}

.inspector-section {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

.flow-node-lib {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

.flow-node-lib button {
    height: 32px;
    color: #dbe4f0;
    background: #1c2433;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 650;
}

.flow-node-lib button:hover {
    border-color: rgba(14, 165, 233, 0.55);
    color: #fff;
    background: rgba(14, 165, 233, 0.14);
}

.section-heading {
    min-height: 27px;
    margin-bottom: 9px;
}

.input-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 8;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--muted);
    background: #0f1520;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
}

.input-preview:hover {
    color: #e2e8f0;
    border-color: rgba(14, 165, 233, 0.55);
    background: rgba(14, 165, 233, 0.08);
}

.input-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.input-placeholder {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-placeholder svg {
    width: 17px;
    height: 17px;
}

.reference-strip {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.reference-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 5px;
}

.reference-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reference-item button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #ffffff;
    background: rgba(21, 32, 51, 0.7);
    border-radius: 4px;
}

.reference-item svg {
    width: 11px;
    height: 11px;
}

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 3px;
    padding: 3px;
    background: #0f1520;
    border-radius: 9px;
}

.segmented button {
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    color: var(--muted);
    background: transparent;
    border-radius: 7px;
    font-size: 11px;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.segmented button.active {
    color: #041018;
    font-weight: 700;
    background: linear-gradient(145deg, #38bdf8, #0ea5e9);
    box-shadow: 0 0 12px var(--accent-glow);
}

.field-stack,
.field-row,
.switch-row {
    display: flex;
    color: #cbd5e1;
    font-size: 12px;
}

.field-stack {
    flex-direction: column;
    gap: 6px;
    margin-top: 11px;
}

.field-row,
.switch-row {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
}

.field-row select {
    width: 155px;
}

.field-stack input,
.field-stack select,
.field-row select {
    height: 34px;
    min-width: 0;
    padding: 0 9px;
    outline: 0;
    color: #e2e8f0;
    background: #0f1520;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
}

.field-stack input:focus,
.field-stack select:focus,
.field-row select:focus {
    border-color: #9cc8ee;
}

input[type="range"] {
    accent-color: var(--teal);
}

.switch-row {
    position: relative;
}

.switch-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch {
    position: relative;
    width: 34px;
    height: 19px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: #c8d1da;
    transition: background 0.16s ease;
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(21, 32, 51, 0.24);
    transition: transform 0.16s ease;
}

.switch-row input:checked+.switch {
    background: var(--teal);
}

.switch-row input:checked+.switch::after {
    transform: translateX(15px);
}

.model-chip {
    max-width: 132px;
    overflow: hidden;
    padding: 2px 7px;
    color: var(--teal-deep);
    background: var(--teal-soft);
    border-radius: 4px;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-field {
    position: relative;
    z-index: 12;
}

.platform-picker {
    position: relative;
}

.platform-trigger {
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 8px;
    padding: 5px 9px;
    color: var(--ink);
    text-align: left;
    background: #0f1520;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
}

.platform-trigger:hover,
.platform-trigger[aria-expanded="true"] {
    border-color: #9cc8ee;
    box-shadow: 0 0 0 3px rgba(47, 128, 216, 0.08);
}

.platform-mark {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    color: #111820;
    background: #edf2f6;
}

.platform-mark svg {
    width: 16px;
    height: 16px;
}

.platform-mark.gpt {
    color: #ffffff;
    background: #177a62;
}

.platform-mark.flux {
    color: #ffffff;
    background: #15191d;
}

.platform-mark.custom {
    color: #1c64a5;
    background: #e5f1fb;
}

.platform-mark.qwen {
    color: #ffffff;
    background: #313b85;
}

.platform-mark.wanx {
    color: #ffffff;
    background: #6e43aa;
}

.platform-mark.dbao {
    color: #ffffff;
    background: #24272b;
}

.platform-current {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.platform-current strong,
.platform-current small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-current strong {
    font-size: 12px;
}

.platform-current small {
    color: var(--muted);
    font-size: 10px;
}

.platform-chevron {
    width: 15px;
    height: 15px;
    color: var(--muted);
    transition: transform 0.16s ease;
}

.platform-trigger[aria-expanded="true"] .platform-chevron {
    transform: rotate(180deg);
}

.platform-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 90;
    max-height: 310px;
    overflow-y: auto;
    padding: 5px;
    background: #151c28;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.platform-menu[hidden] {
    display: none;
}

.platform-option {
    width: 100%;
    min-height: 42px;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    color: var(--ink);
    text-align: left;
    background: transparent;
    border-radius: 5px;
}

.platform-option:hover,
.platform-option.selected {
    background: rgba(14, 165, 233, 0.14);
}

.platform-option-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.platform-option-copy strong {
    font-size: 12px;
}

.platform-option-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-option .check-icon {
    width: 15px;
    height: 15px;
    color: var(--blue-deep);
    opacity: 0;
}

.platform-option.selected .check-icon {
    opacity: 1;
}

.inspector-footer {
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
    background: #0a1018;
}

.generate-btn {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #041018;
    background: linear-gradient(145deg, #38bdf8 0%, #0ea5e9 100%);
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 0 22px var(--accent-glow);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.generate-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 0 28px rgba(14, 165, 233, 0.4);
}

.generate-btn:active {
    transform: translateY(1px);
}

.generate-btn svg {
    width: 17px;
    height: 17px;
}

.footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.history-drawer {
    position: absolute;
    z-index: 45;
    top: 48px;
    bottom: 0;
    left: 0;
    width: 300px;
    padding: 14px;
    overflow: hidden;
    color: var(--ink);
    background: rgba(12, 16, 24, 0.96);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.drawer-head {
    height: 34px;
}

.drawer-head>div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-head span {
    min-width: 22px;
    padding: 1px 6px;
    color: var(--muted);
    background: var(--surface);
    border-radius: 10px;
    font-size: 10px;
    text-align: center;
}

.history-tabs {
    margin: 7px 0 10px;
}

.history-list {
    height: calc(100% - 90px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 8px;
    overflow: auto;
}

.history-item {
    position: relative;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.history-item:hover {
    border-color: #9cc8ee;
    box-shadow: 0 4px 10px rgba(21, 32, 51, 0.12);
}

.history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-open {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: transparent;
}

.history-badge,
.favorite-btn {
    position: absolute;
    top: 4px;
    height: 20px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(21, 32, 51, 0.68);
    border-radius: 4px;
    font-size: 9px;
}

.history-badge {
    left: 4px;
    padding: 0 5px;
}

.favorite-btn {
    right: 4px;
    width: 20px;
    padding: 0;
}

.favorite-btn.active {
    color: #ffe06a;
}

.favorite-btn svg {
    width: 12px;
    height: 12px;
}

.history-empty {
    height: calc(100% - 90px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b0;
}

.history-empty svg {
    width: 28px;
    height: 28px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(21, 32, 51, 0.36);
    backdrop-filter: blur(2px);
}

.modal {
    width: min(620px, calc(100vw - 48px));
    overflow: hidden;
    color: var(--ink);
    background: #151c28;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.modal.compact {
    width: min(480px, calc(100vw - 48px));
}

.modal.recharge-modal {
    width: min(560px, calc(100vw - 48px));
}

.modal-head {
    height: 48px;
    padding: 0 14px 0 18px;
    border-bottom: 1px solid var(--line);
}

.modal-body {
    padding: 17px 18px 19px;
}

.modal-foot {
    justify-content: flex-end;
    min-height: 56px;
    padding: 10px 18px;
    border-top: 1px solid var(--line);
    background: #0f1520;
}

.billing-portal-list {
    max-height: min(430px, calc(100vh - 180px));
    overflow-y: auto;
    padding: 6px 18px;
}

.billing-portal-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin: 0 -8px;
    padding: 8px;
    border-radius: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #e8edf4;
}

.billing-portal-row:last-child {
    border-bottom: 0;
}

.billing-portal-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.billing-portal-row.active {
    background: #1a2332;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.billing-portal-row.active .billing-portal-copy strong {
    color: #f3f7fc;
}

.billing-portal-row.active .billing-portal-copy small {
    color: #9fb0c3;
}

.billing-portal-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: #2878bd;
    border-radius: 6px;
}

.billing-portal-icon.volcengine_ark {
    background: #3f58d8;
}

.billing-portal-icon.aliyun_bailian {
    background: #e85e25;
}

.billing-portal-icon.siliconflow {
    background: #167c71;
}

.billing-portal-icon.openai {
    background: #1f2937;
}

.billing-portal-icon.runninghub {
    background: #7b4cc9;
}

.billing-portal-icon.google_ai_studio {
    background: #2878bd;
}

.billing-portal-icon svg {
    width: 17px;
    height: 17px;
}

.billing-portal-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.billing-portal-copy strong,
.billing-portal-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-portal-copy strong {
    color: #e8edf4;
    font-size: 13px;
}

.billing-portal-copy small {
    color: #8b97a8;
    font-size: 11px;
}

.billing-portal-action {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    color: #ffffff;
    background: #1876bd;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.billing-portal-action:hover {
    background: #125f99;
}

.billing-portal-action svg {
    width: 14px;
    height: 14px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
}

.settings-grid .wide {
    grid-column: 1 / -1;
}

.api-key-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.api-key-heading label {
    flex: 0 0 auto;
}

.field-stack .api-key-heading select {
    width: 168px;
    height: 28px;
    padding: 0 26px 0 8px;
    font-size: 11px;
}

.api-key-control {
    position: relative;
    min-width: 0;
}

.field-stack .api-key-control input {
    width: 100%;
    padding-right: 42px;
}

.api-key-visibility {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 34px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: #526879;
    background: #ffffff;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 5px 5px 0;
}

.api-key-visibility:hover,
.api-key-visibility:focus-visible {
    color: var(--blue-deep);
    background: var(--blue-soft);
    outline: 0;
}

.api-key-visibility svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.8;
}

.api-key-field small {
    min-height: 14px;
    color: #6a7b89;
    font-size: 11px;
    line-height: 14px;
}

.view-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.view-modes button {
    height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
}

.view-modes button:hover,
.view-modes button.active {
    color: var(--blue-deep);
    background: var(--blue-soft);
    border-color: #9cc8ee;
}

.view-modes button.active {
    box-shadow: inset 0 0 0 1px rgba(47, 128, 216, 0.22);
}

.capture-hint {
    margin: 12px 0 0;
    color: var(--muted, #9aa4b2);
    font-size: 11px;
    line-height: 1.55;
}

.view-modes svg {
    width: 24px;
    height: 24px;
}

.toast-region {
    position: fixed;
    z-index: 120;
    right: 316px;
    bottom: 154px;
    width: min(340px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 7px;
    pointer-events: none;
}

.toast {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    color: #ffffff;
    background: #263746;
    border-radius: 6px;
    box-shadow: var(--shadow);
    animation: toast-in 0.18s ease-out;
}

.toast.success {
    background: #107948;
}

.toast.error {
    background: #b83f3f;
}

.toast svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

@keyframes toast-in {
    from {
        transform: translateY(8px);
        opacity: 0;
    }
}

@media (max-width: 1020px) {
    .workspace {
        grid-template-columns: 68px minmax(0, 1fr) 286px;
    }

    .topbar {
        grid-template-columns: minmax(150px, 180px) minmax(220px, 1fr) auto;
    }

    .brand-name {
        font-size: 16px;
    }

    .service-state {
        display: none;
    }

    .mode-rail {
        padding-left: 5px;
        padding-right: 5px;
    }

    .history-drawer {
        left: 68px;
    }

    .toast-region {
        right: 298px;
    }
}

@media (max-height: 700px) {
    .studio {
        grid-template-rows: 40px minmax(240px, 1fr) 118px;
    }

    .inspector-section {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .input-preview {
        aspect-ratio: 16 / 7;
    }

    .toast-region {
        bottom: 132px;
    }
}

/* ===== 无限节点画布（主界面） ===== */
body.canvas-primary .prompt-dock,
body.flow-mode .prompt-dock,
body.canvas-primary .canvas-bar {
    display: none !important;
}

body.canvas-primary .stage {
    background-color: #060b18;
    background-image:
        radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.1), transparent 34%),
        radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: auto, 24px 24px;
}

.flow-canvas-host {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    color: #e8edf4;
}

.flow-canvas-host[hidden] {
    display: none !important;
}

body.canvas-primary .flow-canvas-host {
    display: flex !important;
}

.flow-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 15, 20, 0.92);
    backdrop-filter: blur(8px);
}

.flow-palette,
.flow-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.flow-brand-chip {
    height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    color: #041018;
    background: linear-gradient(145deg, #38bdf8, #0ea5e9);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 0 14px var(--accent-glow);
}

.flow-palette button,
.flow-toolbar-actions button {
    height: 28px;
    padding: 0 10px;
    color: #d7dde7;
    background: #242a34;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
}

.flow-palette button:hover,
.flow-toolbar-actions button:hover {
    border-color: rgba(184, 149, 108, 0.55);
    color: #f7f1e6;
}

.flow-toolbar-actions button.primary {
    color: #1a2332;
    background: linear-gradient(145deg, #f0e2c4, #c9a66b);
    border-color: transparent;
}

.flow-zoom {
    min-width: 42px;
    color: #9aa4b2;
    font-size: 11px;
    text-align: right;
}

.flow-viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    cursor: grab;
}

.flow-viewport.panning {
    cursor: grabbing;
}

.flow-world {
    position: absolute;
    inset: 0;
    width: 8000px;
    height: 8000px;
    transform-origin: 0 0;
    will-change: transform;
}

.flow-wires {
    position: absolute;
    inset: 0;
    width: 8000px;
    height: 8000px;
    overflow: visible;
    pointer-events: none;
}

.flow-wire {
    fill: none;
    stroke-width: 3.2;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.45));
}

.flow-wire-glow {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    opacity: 0.16;
}

.flow-wire-temp {
    stroke-dasharray: 8 6;
    animation: flow-dash 0.7s linear infinite;
}

.flow-wire-tip {
    filter: drop-shadow(0 0 6px currentColor);
}

@keyframes flow-dash {
    to {
        stroke-dashoffset: -28;
    }
}

.flow-nodes {
    position: absolute;
    inset: 0;
}

.flow-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #edf1f7;
    background: linear-gradient(180deg, #2a303a 0%, #222831 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    user-select: none;
}

.flow-node.selected,
.flow-node.accent.selected {
    box-shadow: 0 0 0 1px rgba(184, 149, 108, 0.7), 0 16px 34px rgba(0, 0, 0, 0.42);
}

.flow-node.accent {
    border-color: rgba(47, 200, 130, 0.55);
    box-shadow: 0 0 0 1px rgba(47, 200, 130, 0.35), 0 16px 34px rgba(0, 0, 0, 0.4);
}

.flow-node.running {
    border-color: #3dd68c;
    animation: flow-pulse 1.1s ease-in-out infinite;
}

.flow-node.done {
    border-color: rgba(61, 214, 140, 0.65);
}

@keyframes flow-pulse {
    50% {
        box-shadow: 0 0 0 2px rgba(61, 214, 140, 0.35), 0 16px 34px rgba(0, 0, 0, 0.4);
    }
}

.flow-node-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(90deg, var(--node, #3a4555), rgba(20, 24, 30, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.flow-node-head strong {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.flow-node-close {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
}

.flow-node-close:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.25);
}

.flow-node-body {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.flow-thumb {
    min-height: 96px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #8b95a5;
    background: #171c24;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 11px;
}

.flow-thumb.has-img {
    border-style: solid;
}

.flow-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.flow-prompt {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    padding: 8px;
    color: #edf1f7;
    background: #171c24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font: inherit;
    line-height: 1.45;
}

.flow-prompt:focus {
    outline: 0;
    border-color: rgba(255, 204, 51, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 204, 51, 0.12);
}

.flow-mini-btn {
    height: 28px;
    padding: 0 10px;
    color: #e8edf4;
    background: #313846;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.flow-mini-btn.primary {
    color: #102018;
    background: linear-gradient(145deg, #7dffb5, #2fbf78);
    border-color: transparent;
}

.flow-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #9aa4b2;
    font-size: 11px;
}

.flow-ports {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    padding: 4px 8px 10px;
}

.flow-port-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    color: #c2cad6;
    font-size: 11px;
}

.flow-port-row.out {
    justify-content: flex-end;
}

.flow-port {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid var(--port, #9aa4b2);
    border-radius: 50%;
    background: #12161d;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
    cursor: crosshair;
}

.flow-port:hover {
    background: var(--port, #9aa4b2);
    transform: scale(1.15);
}

.flow-hint {
    padding: 5px 10px 7px;
    color: rgba(232, 237, 244, 0.45);
    background: rgba(12, 15, 20, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    letter-spacing: 0.02em;
}

.flow-panel-copy {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.flow-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.flow-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #405365;
    font-size: 11px;
}

.flow-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.flow-tips {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

/* ---------- ImageFree 免费工具 ---------- */
.imagefree-heading {
    margin-top: 14px;
}

.imagefree-lib button {
    border-color: rgba(14, 165, 233, 0.35) !important;
    color: #bae6fd !important;
}

.imagefree-lib button:hover {
    border-color: rgba(56, 189, 248, 0.7) !important;
    background: rgba(14, 165, 233, 0.14) !important;
}

.imagefree-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0 12px;
}

.imagefree-quick .btn.small {
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
}

.imagefree-modal .imagefree-dialog {
    width: min(920px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.imagefree-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.imagefree-brand small {
    color: var(--muted, #9aa4b2);
    font-size: 11px;
}

.imagefree-brand a {
    color: #38bdf8;
    text-decoration: none;
}

.imagefree-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
}

.imagefree-tabs button {
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1d2430;
    color: #c9d1dc;
    font-size: 12px;
    font-weight: 600;
}

.imagefree-tabs button.active {
    color: #041018;
    background: linear-gradient(145deg, #7dd3fc, #0ea5e9);
    border-color: transparent;
}

.imagefree-mode-switch {
    display: inline-flex;
    gap: 4px;
    margin: 0 16px 8px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    width: fit-content;
}

.imagefree-mode-switch button {
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9aa4b2;
    font-size: 11px;
    font-weight: 600;
}

.imagefree-mode-switch button.active {
    background: #243041;
    color: #e8edf4;
}

.imagefree-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.imagefree-desc {
    margin: 0 0 12px;
    color: #9aa4b2;
    font-size: 12px;
}

.imagefree-browser-card {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: linear-gradient(160deg, rgba(14, 165, 233, 0.12), rgba(12, 18, 28, 0.6));
}

.imagefree-browser-card strong {
    display: block;
    margin-bottom: 8px;
    color: #e8edf4;
    font-size: 14px;
}

.imagefree-browser-card > p {
    margin: 0 0 10px;
    color: #9aa4b2;
    font-size: 12px;
    line-height: 1.55;
}

.imagefree-browser-card ol {
    margin: 0 0 14px;
    padding-left: 18px;
    color: #c9d1dc;
    font-size: 12px;
    line-height: 1.7;
}

.imagefree-open-main {
    width: 100%;
}

.imagefree-site {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 520px;
}

.imagefree-site iframe {
    width: 100%;
    height: min(62vh, 560px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: #0b1018;
}

.imagefree-site-hint {
    margin: 0;
    color: #7b8796;
    font-size: 11px;
}

.imagefree-foot {
    gap: 8px;
}

.btn.small {
    height: 30px;
    padding: 0 10px;
    font-size: 11px;
}