.seedream-layer { width: min(560px, calc(100vw - 24px)); max-height: min(94vh, 980px); padding: 0; border: 1px solid #3a5367; border-radius: 16px; background: #101b28; color: #eff7fc; box-shadow: 0 20px 70px #000b; }
.seedream-layer.is-viewing { width: min(1160px, calc(100vw - 24px)); }
.seedream-layer::backdrop { background: #02080dd9; backdrop-filter: blur(5px); }
.seedream-layer-shell { padding: 23px; display: grid; gap: 17px; max-height: min(94vh, 980px); box-sizing: border-box; overflow: auto; }
.seedream-layer [hidden] { display: none !important; }
.seedream-layer [data-layer-config] { display: grid; gap: 17px; }
.seedream-layer header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.seedream-layer h2 { margin: 0 0 7px; font-size: 22px; }
.seedream-layer p { margin: 0; color: #b6cbd7; font-size: 13px; line-height: 1.6; }
.seedream-layer button { border: 1px solid #425d72; background: #182a3a; color: #edf6fc; border-radius: 9px; padding: 9px 13px; cursor: pointer; }
.seedream-layer button:disabled { opacity: .55; cursor: not-allowed; }
.seedream-layer button:focus-visible, .seedream-layer textarea:focus-visible { outline: 2px solid #79d9cb; outline-offset: 2px; }
.seedream-layer [data-layer-close] { font-size: 22px; line-height: 1; min-width: 38px; }
.seedream-layer-preview { display: grid; place-items: center; min-height: 130px; max-height: 280px; background: #0a1420; border: 1px solid #365067; border-radius: 11px; overflow: hidden; }
.seedream-layer-preview img { display: block; max-width: 100%; max-height: 280px; object-fit: contain; }
.seedream-layer label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }
.seedream-layer textarea { width: 100%; box-sizing: border-box; min-height: 78px; resize: vertical; padding: 10px; border: 1px solid #425d72; border-radius: 9px; color: #eff7fc; background: #0b1520; font: inherit; font-weight: 400; }
.seedream-layer .seedream-layer-price { padding: 12px; border-radius: 9px; background: #17323c; color: #b7e3db; font-size: 13px; }
.seedream-layer footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seedream-layer footer span { color: #b7d0db; font-size: 12px; }
.seedream-layer footer span.is-error { color: #ffa7a7; }
.seedream-layer [data-layer-submit] { border-color: #74d4c6; background: #74d4c6; color: #09231f; font-weight: 750; white-space: nowrap; }
.seedream-layer-wait { min-height: 240px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; text-align: center; border: 1px solid #365067; border-radius: 12px; background: #0b1724; }
.seedream-layer-wait strong { font-size: 20px; }
.seedream-layer-wait.is-error strong, .seedream-layer-wait.is-error p { color: #ffaaaa; }
.seedream-layer-spinner { width: 38px; height: 38px; border: 3px solid #39556b; border-top-color: #7ae0ce; border-radius: 50%; animation: seedream-layer-spin 1s linear infinite; }
@keyframes seedream-layer-spin { to { transform: rotate(360deg); } }
.seedream-layer-view { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 310px); gap: 16px; }
.seedream-layer-view-main { min-width: 0; }
.seedream-layer-composite { display: flex; align-items: flex-start; justify-content: center; overflow: hidden; border: 1px solid #365067; border-radius: 12px; background-color: #f0f2f3; background-image: linear-gradient(45deg, #d6dce0 25%, transparent 25%), linear-gradient(-45deg, #d6dce0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d6dce0 75%), linear-gradient(-45deg, transparent 75%, #d6dce0 75%); background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0; }
.seedream-layer-composite canvas { display: block; width: 100%; height: auto; max-height: 68vh; object-fit: contain; }
.seedream-layer-view-main p { margin-top: 7px; }
.seedream-layer-view aside { min-width: 0; max-height: 68vh; display: flex; flex-direction: column; border: 1px solid #365067; border-radius: 12px; background: #0b1724; box-sizing: border-box; overflow: hidden; }
.seedream-layer-list-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-bottom: 1px solid #31495d; }
.seedream-layer-list-header strong { font-size: 14px; }
.seedream-layer-list-header button { padding: 6px 9px; font-size: 12px; }
.seedream-layer-history { padding: 9px 12px; border-bottom: 1px solid #31495d; font-size: 12px; color: #b6cbd7; }
.seedream-layer-history select { width: 100%; padding: 7px; border: 1px solid #425d72; border-radius: 7px; background: #142636; color: #edf6fc; }
.seedream-layer-list { min-height: 0; overflow: auto; padding: 5px; }
.seedream-layer-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto 30px; gap: 5px; align-items: center; padding: 7px; border-radius: 8px; }
.seedream-layer-item + .seedream-layer-item { border-top: 1px solid #243a4c; }
.seedream-layer-item.is-hidden { opacity: .55; }
.seedream-layer-item img { width: 52px; height: 52px; object-fit: contain; border-radius: 5px; background: #344453; }
.seedream-layer-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.seedream-layer-item button, .seedream-layer-item a { min-height: 32px; box-sizing: border-box; padding: 6px; font-size: 12px; white-space: nowrap; }
.seedream-layer-item a { display: inline-flex; align-items: center; color: #bce9e3; border: 1px solid #425d72; border-radius: 9px; text-decoration: none; }
.seedream-layer-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seedream-layer-item .seedream-layer-place { width: 30px; min-width: 30px; height: 32px; padding: 0; color: #94eee0; font-size: 20px; line-height: 1; }
.node-card.visual-node.seedream-layer-result-node,
.node-card.visual-node.seedream-layer-result-node.visual-expanded { width: min(690px, calc(100vw - 148px)); min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.node-card.seedream-layer-result-node > .node-port-out { display: none !important; }
.seedream-layer-inline { width: 100%; box-sizing: border-box; padding: 13px; border: 1px solid #3a5367; border-radius: 13px; background: #101b28; color: #edf6fc; box-shadow: 0 16px 44px #0008; pointer-events: auto; user-select: none; }
.seedream-layer-inline header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.seedream-layer-inline header div { display: grid; gap: 2px; }
.seedream-layer-inline header small { color: #80d9cd; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.seedream-layer-inline header strong { font-size: 16px; }
.seedream-layer-inline button { border: 1px solid #415a6f; border-radius: 7px; background: #1a2d3f; color: #e7f3f8; cursor: pointer; }
.seedream-layer-inline button:hover, .seedream-layer-inline button:focus-visible { border-color: #7ad9cd; outline: none; }
.seedream-layer-inline [data-layer-expand] { width: 32px; height: 32px; font-size: 19px; }
.seedream-layer-inline-body { display: grid; grid-template-columns: minmax(0, 1fr) 225px; gap: 10px; min-width: 0; }
.seedream-layer-inline-preview.result-frame { width: 100%; min-width: 0; aspect-ratio: 16 / 9; border-color: #3a5367; border-radius: 9px; background: #0b1520; }
.seedream-layer-inline-preview img, .seedream-layer-inline-preview canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.seedream-layer-inline-preview [hidden] { display: none; }
.seedream-layer-inline-preview [data-layer-inline-status] { padding: 16px; color: #c9d9e4; font-size: 13px; text-align: center; }
.seedream-layer-inline aside { min-width: 0; height: 235px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #334c60; border-radius: 9px; background: #0b1724; }
.seedream-layer-inline-list-title { padding: 8px 10px; border-bottom: 1px solid #334c60; font-size: 12px; font-weight: 700; }
.seedream-layer-inline-list { min-height: 0; overflow-y: auto; padding: 4px; scrollbar-width: thin; }
.seedream-layer-inline-item { display: grid; grid-template-columns: 37px minmax(0, 1fr) 30px 25px 30px; gap: 3px; align-items: center; padding: 4px; border-radius: 6px; }
.seedream-layer-inline-item + .seedream-layer-inline-item { border-top: 1px solid #263c4e; }
.seedream-layer-inline-item.is-hidden { opacity: .5; }
.seedream-layer-inline-item img { width: 37px; height: 37px; object-fit: contain; border-radius: 4px; background: #354554; }
.seedream-layer-inline-item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.seedream-layer-inline-item button { width: 30px; height: 30px; padding: 0; font-size: 11px; }
.seedream-layer-inline-item a { display: grid; place-items: center; width: 25px; height: 30px; box-sizing: border-box; border: 1px solid #415a6f; border-radius: 7px; color: #aee8dd; font-size: 17px; text-decoration: none; }
.seedream-layer-inline-item a:hover, .seedream-layer-inline-item a:focus-visible { border-color: #7ad9cd; outline: none; }
.seedream-layer-inline-item .seedream-layer-inline-place { color: #92eadc; font-size: 19px; }
@media (max-width: 700px) { .seedream-layer-inline-body { grid-template-columns: 1fr; } .seedream-layer-inline aside { height: 170px; } }
@media (max-width: 700px) { .seedream-layer-shell { padding: 15px; } .seedream-layer footer { align-items: stretch; flex-direction: column; } .seedream-layer-view { grid-template-columns: 1fr; } .seedream-layer-view aside { height: auto !important; max-height: 270px; } .seedream-layer-composite canvas { max-height: 43vh; } }
@media (prefers-reduced-motion: reduce) { .seedream-layer-spinner { animation: none; } }
