:root {
  color-scheme: dark;
  --bg: #171718;
  --panel: #202121;
  --surface: #262729;
  --hover: #313235;
  --selected: #3c3d42;
  --edge: #393a3e;
  --control-edge: #494a50;
  --fg: #f1f1f3;
  --muted: #b2b2ba;
  --accent: #43b4f4;
  --button-blue: #126fba;
  --danger: #ffaca8;
  --space-x: clamp(16px, 3vw, 44px);
  font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--fg);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p, figure { margin: 0; }
body { min-height: 100vh; }
button, input, textarea, select { color: inherit; font: inherit; }
button, select, a { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, select:disabled { opacity: .48; cursor: default; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, .title { overflow-wrap: anywhere; }
h1 { font-size: clamp(25px, 2.5vw, 34px); line-height: 1.2; letter-spacing: -.04em; font-weight: 640; }
h2 { font-size: 18px; line-height: 1.35; letter-spacing: -.025em; font-weight: 610; }
h3 { font-size: 17px; line-height: 1.4; letter-spacing: -.015em; font-weight: 610; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 640; letter-spacing: -.035em; color: var(--fg); text-decoration: none; }
.brand img { width: 26px; height: 26px; flex: none; }
.icon { width: 18px; height: 18px; flex: none; stroke-width: 1.65; }
.btn, .button, .account-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px;
  border: 1px solid var(--control-edge); border-radius: 6px; padding: 6px 11px; background: var(--surface);
  color: var(--fg); text-decoration: none; font-size: 13px; line-height: 1.35; font-weight: 550;
}
.btn:not(:disabled):hover, .button:not(:disabled):hover, .account-link:hover { background: var(--hover); border-color: #65666e; }
.primary, .accent { background: var(--button-blue); border-color: var(--button-blue); color: #fff; }
.btn.primary:not(:disabled):hover, .button.primary:not(:disabled):hover, .btn.accent:not(:disabled):hover { background: #177dc8; border-color: #2586d0; }
.low, .quiet { color: var(--muted); border-color: transparent; background: transparent; }
.btn.danger { border-color: #945453; color: var(--danger); background: #412a2a; }
.btn.danger:not(:disabled):hover { background: #563130; }
input:not([type="hidden"]):not([type="file"]), select, textarea {
  min-width: 0; width: 100%; padding: 8px 10px; border: 1px solid var(--control-edge); border-radius: 6px; background: var(--bg); color: var(--fg);
}
input::placeholder, textarea::placeholder { color: #94949c; }
label, .legend { font-size: 13px; font-weight: 550; }
.muted, .hint, .expires, .context, .meta, .count, .sub { color: var(--muted); font-size: 13px; }
.error, .field-error, .form-error { color: var(--danger); }
.error-box, .error.banner { padding: 10px 12px; margin-top: 14px; border-radius: 6px; border: 1px solid #6f4546; background: #342425; color: var(--danger); }
.error-box button, .error button { background: transparent; border: 0; color: inherit; text-decoration: underline; }
dialog { width: min(440px, calc(100% - 32px)); margin: auto; padding: 21px; max-height: calc(100dvh - 32px); overflow: auto; color: var(--fg); background: var(--surface); border: 1px solid var(--control-edge); border-radius: 10px; box-shadow: 0 18px 65px #0008; }
dialog::backdrop { background: #070708a8; }
dialog form, dialog .body { display: grid; gap: 16px; }
dialog label, .field { display: grid; gap: 6px; }
.buttons, .dialog-actions, .form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 8px 16px; border-bottom: 1px solid var(--edge); background: var(--bg); }
.workspace { display: grid; grid-template-columns: 64px minmax(0, 1fr); min-height: calc(100svh - 50px); }
.toolrail { display: flex; align-items: center; flex-direction: column; gap: 4px; padding: 9px 4px; border-right: 1px solid var(--edge); background: var(--bg); }
.toolrail form { margin: 0; }
.rail-link { position: relative; width: 55px; min-height: 49px; display: flex; align-items: center; justify-content: center; gap: 3px; flex-direction: column; border: 0; border-radius: 6px; background: transparent; color: var(--muted); text-decoration: none; font: 500 10px/1.3 Inter, system-ui, sans-serif; }
.rail-link .icon { width: 20px; height: 20px; }
.rail-link:hover { background: var(--hover); color: var(--fg); }
.rail-link[aria-current="page"] { background: var(--surface); color: var(--fg); }
.rail-link[aria-current="page"]::before { content: ""; position: absolute; left: -4px; top: 10px; bottom: 10px; width: 2px; background: var(--accent); border-radius: 0 2px 2px 0; }
main { min-width: 0; }
.studio-shell > .topbar { position: sticky; top: 0; z-index: 3; height: 50px; }
.toolrail { position: sticky; top: 50px; align-self: start; height: calc(100dvh - 50px); overflow-y: auto; }
.account-link { max-width: min(45vw, 230px); color: var(--muted); }
.account-link .icon { width: 16px; height: 16px; }
.account-link span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-link[aria-current="page"] { color: var(--fg); border-color: #60636b; background: var(--selected); }
.section-status { color: var(--muted); }
.section-status button { margin-inline-start: 8px; }
.content { width: 100%; max-width: 1560px; margin-inline: auto; padding: clamp(24px, 3.3vw, 48px) var(--space-x) 60px; min-width: 0; }
.intro, .section-head, .folder-head, .filters, .head-row, .section-row, .modal-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.section-head { margin-bottom: 12px; }
.intro .btn { flex: none; }
.team .content { max-width: 1100px; }
.team .content > section { margin-top: 30px; }
.list { border: 1px solid var(--edge); border-radius: 8px; background: var(--panel); padding: 0 16px; }
.member, .invite { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.member + .member, .invite + .invite { border-top: 1px solid var(--edge); }
.identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.identity strong, .invite strong { font-weight: 550; overflow-wrap: anywhere; }
.avatar, .account-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; color: #bfe4ff; background: #243c4d; border: 1px solid #355065; border-radius: 7px; font-size: 12px; font-weight: 600; }
.role { font-size: 12px; color: var(--muted); }
.invite .meta { display: grid; gap: 3px; min-width: 0; }
.list .empty { margin: 0; padding: 16px 0; color: var(--muted); }
#notice:not(:empty), #feedback:not(:empty) { margin-top: 12px; font-size: 13px; color: var(--muted); }

.activity { margin-top: 12px; color: var(--muted); font-size: 12px; }
.activity summary { cursor: pointer; width: fit-content; }
.presence { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 8px 0; }
.filters { margin-block: 24px 15px; }
.filter { display: flex; align-items: center; gap: 12px; min-width: 0; }
.select-wrap { position: relative; min-width: 0; }
.select-wrap select { appearance: none; width: clamp(140px, 18vw, 208px); min-height: 34px; padding: 5px 32px 5px 10px; background: var(--surface); text-overflow: ellipsis; }
.select-wrap::after { content: ""; position: absolute; right: 13px; top: 11px; width: 7px; height: 7px; pointer-events: none; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.folder-area { margin-bottom: 25px; padding: 16px; border: 1px solid var(--edge); border-radius: 8px; background: var(--panel); }
.folder-head { margin-bottom: 12px; }
.folder-head h2 { font-size: 15px; }
.folder-actions, .folder-tiles, .pagination { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.folder-tiles:empty { display: none; }
.folder-tile { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--control-edge); border-radius: 6px; background: var(--surface); text-align: start; color: var(--fg); font-size: 13px; overflow-wrap: anywhere; }
.folder-tile .icon { color: var(--muted); }
.folder-tile:hover { background: var(--hover); }
.folder-tile[aria-pressed="true"] { border-color: #49708e; background: #223444; }
.folder-tile[aria-pressed="true"] .icon { color: #81c5fb; }
.folder-actions .btn, .file-action, .revoke { font-size: 12px; min-height: 29px; padding: 4px 8px; }
.journal-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 11px; }
.journal-heading .count { font-variant-numeric: tabular-nums; }
#jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); align-items: start; gap: 12px; }
#jobs > .empty { grid-column: 1/-1; padding: 22px; color: var(--muted); background: var(--panel); border: 1px dashed var(--control-edge); border-radius: 8px; text-align: center; }
#jobs article { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--edge); background: var(--panel); border-radius: 8px; }
.job { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; padding: 12px; }
.job .summary { grid-column: 1; grid-row: 1; }
.job .title { font-size: 13px; font-weight: 600; }
.job .context { margin-top: 3px; font-size: 12px; overflow-wrap: anywhere; }
.job .author, .job .clock { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.job .author { grid-column: 1; }
.job .clock { grid-column: 1/-1; display: flex; gap: 7px; font-variant-numeric: tabular-nums; }
.job .clock div::before { content: "· "; }
.status { grid-column: 2; grid-row: 1; padding: 2px 7px; background: var(--hover); color: var(--muted); border-radius: 4px; font-size: 11px; }
.status.success { background: #20372d; color: #92d6aa; }
.status.error, .status.interrupted { background: #4a2e30; color: #ffb7b6; }
.status.running { background: #403821; color: #e5ca80; }
.pagination { justify-content: center; margin-top: 18px; }
@media (max-width: 650px) {
  .workspace { display: block; }
  .toolrail { z-index: 2; flex-direction: row; gap: 4px; height: auto; padding: 4px 12px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--edge); }
  .rail-link { flex-direction: row; width: auto; min-height: 34px; padding: 6px 8px; gap: 5px; font-size: 12px; }
  .rail-link .icon { width: 16px; height: 16px; }
  .rail-link[aria-current="page"]::before { left: 6px; right: 6px; top: auto; bottom: -4px; height: 2px; width: auto; }
  .filter { gap: 8px; }
  .select-wrap select { width: 142px; }
  .intro .btn { font-size: 12px; }
}
@media (max-width: 450px) {
  .toolrail { justify-content: space-around; padding-inline: 4px; gap: 2px; }
  .rail-link { flex-direction: column; min-width: 49px; min-height: 44px; padding: 3px 4px; gap: 2px; font-size: 10px; }
  .rail-link .icon { width: 18px; height: 18px; }
  .filters { gap: 7px; }
  .folder-area { padding: 12px; }
  .select-wrap select { width: 118px; }
}

.auth-page { min-height: 100svh; display: grid; place-items: center; padding: 20px; background-color: var(--bg); background-image: radial-gradient(#343538 1px, transparent 1px); background-size: 20px 20px; }
.auth-card { width: min(100%, 395px); padding: clamp(24px, 5vw, 34px); background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; box-shadow: 0 16px 64px #0003; }
.auth-card .brand { margin-bottom: 24px; }
.auth-card h1 { font-size: 23px; margin-bottom: 20px; }
.auth-card p { color: var(--muted); margin-bottom: 16px; }
.auth-card strong { color: var(--fg); }
.auth-card form, .auth-card label { display: grid; gap: 6px; }
.auth-card form { gap: 14px; }
.auth-card input:not([type="hidden"]), .auth-card button { min-height: 39px; }
.auth-card form button { padding: 8px; color: white; border: 1px solid var(--button-blue); border-radius: 6px; background: var(--button-blue); font-weight: 600; }
.auth-card form button:hover { background: #177dc8; }
.auth-card a { color: var(--accent); }
.auth-card .error { color: var(--danger); font-size: 13px; margin: 0; }
.auth-card .error:empty { display: none; }
.auth-card #password-hint { margin: -9px 0 0; font-size: 12px; }

.dismiss { display: grid; place-items: center; border: 0; border-radius: 5px; width: 28px; height: 28px; background: transparent; color: var(--muted); font-size: 21px; line-height: 1; }
.dismiss:hover { background: var(--hover); }
.dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #94949c; }
.dot[data-state="connected"] { background: #78c698; }
.dot[data-state="connecting"] { background: #d8aa56; }
.connect-brand { display: none; }
.page { max-width: 1520px; margin: auto; padding: clamp(24px, 3.3vw, 48px) var(--space-x) 64px; }
.page .sub { margin-top: 6px; }
.plus { font-size: 17px; line-height: 1; }
#home .empty { display: grid; grid-template-columns: 1fr 1.25fr; gap: 0; border: 1px solid var(--edge); border-radius: 8px; overflow: hidden; margin-top: 20px; background: var(--panel); }
.empty-copy { align-self: center; padding: 25px; }
.empty-copy p { margin: 8px 0 18px; color: var(--muted); }
.sample-art { display: grid; position: relative; place-items: center; min-height: 180px; background: var(--surface); overflow: hidden; }
.sample-art img, .sample-art .no-preview { grid-area: 1/1; }
.sample-art img { width: 100%; height: 100%; max-height: 300px; object-fit: contain; }
.sample-art figcaption { position: absolute; right: 8px; bottom: 8px; border-radius: 4px; background: #171718da; color: var(--fg); padding: 3px 7px; font-size: 11px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 22px; }
.project-card, .variant-card { min-width: 0; padding: 0; border: 1px solid var(--edge); border-radius: 8px; overflow: hidden; color: var(--fg); background: var(--panel); text-align: start; }
.project-card { display: block; text-decoration: none; }
.project-card:hover, .variant-card:hover { border-color: #686a72; }
.tile-image, .miniature { display: grid; place-items: center; overflow: hidden; aspect-ratio: 1.65; background: var(--surface); }
.thumb-image, .thumb-video { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.card-copy { display: grid; gap: 4px; padding: 11px 13px; }
.card-copy strong { font-size: 15px; overflow-wrap: anywhere; }
.card-copy small { color: var(--muted); font-size: 12px; }
.section-row { margin: 25px 0 12px; }
.section-row .count { margin-left: 4px; font-weight: 500; }
.board { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(190px, 1fr); border: 1px solid var(--edge); border-radius: 8px; background: var(--panel); overflow: hidden; }
.stage { position: relative; display: grid; place-items: center; aspect-ratio: 1.75; min-height: 190px; max-height: 480px; min-width: 0; overflow: hidden; background: repeating-conic-gradient(#292a2c 0 25%, #252628 0 50%) 50% / 20px 20px; }
.stage > img, .stage > video { display: block; width: 100%; height: 100%; max-height: 480px; min-height: 0; object-fit: contain; }
.details { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-width: 0; padding: clamp(16px, 2.4vw, 30px); border-left: 1px solid var(--edge); }
.details .button { margin-top: auto; }
.note { width: 100%; max-height: 16rem; overflow: auto; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.empty-preview { display: grid; place-items: center; align-content: center; gap: 8px; width: 100%; height: 100%; color: #a7b5c1; background: #272c30; }
.empty-preview[data-kind="ui"] { color: #adc0c6; background: #293235; }
.empty-preview[data-kind="animation"] { color: #b7adc6; background: #302c36; }
.no-preview { color: var(--muted); font-size: 12px; }
.shape { font-size: 33px; line-height: 1; }
.tile-image .shape, .miniature .shape { font-size: 25px; }
.rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 8px; margin-top: 12px; }
.variant-card { max-width: 240px; padding: 4px; }
.variant-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.miniature { aspect-ratio: 1.85; border-radius: 4px; }
.variant-name { display: -webkit-box; min-height: 32px; padding: 5px 4px 0; overflow: hidden; overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; }
.simple-box { padding: clamp(18px, 3vw, 30px); border: 1px solid var(--edge); border-radius: 8px; background: var(--panel); }
.simple-box p { color: var(--muted); }
.auth-box { max-width: 560px; margin-top: 20px; }
.status-line, .code-row { display: flex; align-items: center; gap: 8px; }
.status-line strong { font-weight: 570; }
.auth-content { display: grid; justify-items: start; gap: 12px; margin-top: 12px; }
.code-row { flex-wrap: wrap; }
.code-row code { font: 600 21px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
textarea { min-height: 72px; resize: vertical; }
.file { border: 1px dashed var(--control-edge); border-radius: 6px; padding: 7px; width: 100%; min-width: 0; background: var(--bg); font-size: 12px; }
.file::file-selector-button { border: 1px solid var(--control-edge); border-radius: 4px; background: var(--surface); color: var(--fg); font: inherit; padding: 5px 8px; cursor: pointer; margin-right: 7px; }
.upload-preview { max-height: 150px; overflow: hidden; border-radius: 6px; background: var(--bg); display: grid; place-items: center; }
.upload-preview img, .upload-preview video { max-width: 100%; max-height: 150px; }
#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 9px 14px; background: var(--surface); border: 1px solid var(--control-edge); color: var(--fg); border-radius: 6px; z-index: 11; box-shadow: 0 5px 15px #0004; text-align: center; }
.onboarding { background-color: var(--bg); background-image: radial-gradient(#343538 1px, transparent 1px); background-size: 20px 20px; }
.onboarding .workspace { display: grid; place-items: center; min-height: 100svh; padding: 18px; grid-template-columns: 1fr; }
.onboarding .toolrail, .onboarding .topbar, .onboarding #home, .onboarding #project { display: none; }
.onboarding main { width: min(100%, 410px); }
.onboarding .page { padding: clamp(22px, 4vw, 34px); border: 1px solid var(--edge); border-radius: 10px; background: var(--panel); box-shadow: 0 16px 64px #0003; }
.onboarding .connect-brand { display: inline-flex; margin-bottom: 22px; }
.account-switch { display: none; }
.onboarding .account-switch { display: block; margin-top: 16px; }
.account-switch button { padding-inline: 0; font-size: 13px; }
.onboarding h1 { font-size: 23px; }
.onboarding .auth-box { max-width: none; border: 0; padding: 16px 0 0; border-top: 1px solid var(--edge); border-radius: 0; }

@media (max-width: 550px) {
  #home .empty, .board { grid-template-columns: 1fr; }
  .sample-art { aspect-ratio: 1.9; min-height: 0; }
  .details { border-left: 0; border-top: 1px solid var(--edge); }
  .details .button { margin-top: 5px; }
  .stage { min-height: 160px; }
  .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
}
.auth-card form + p { margin: 16px 0 0; color: var(--muted); font-size: 12px; }

.team .member-copy { display: grid; min-width: 0; gap: 2px; }
.team .member-copy .muted, .team .invite .expires, .team #confirmInfo,
.team #validUntil, .team #renameLogin, .team #notice, .auth-card p { overflow-wrap: anywhere; }
.team .member-actions { display: flex; flex: none; flex-wrap: wrap; gap: 6px; }
.team .member-action { font-size: 12px; min-height: 32px; padding: 5px 9px; }
.team .member-action:focus-visible { outline-offset: 2px; }
@media (max-width: 620px) {
  .team .member { align-items: flex-start; flex-direction: column; gap: 9px; }
  .team .member-actions { padding-left: 43px; max-width: 100%; }
  .team .member-action { min-height: 36px; }
}

#jobs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); }
#jobs .generation-card { background: transparent; border: 0; overflow: visible; }
.generation-card .project-card { width: 100%; }
.generation-card .tile-image { border-bottom: 1px solid var(--edge); }
.generation-card .tile-image img, .generation-card .tile-image video {
  width: 100%; height: 100%; min-height: 0; object-fit: contain;
}
.generation-card .card-copy { gap: 3px; }
.generation-card .card-copy strong, .generation-card .card-copy small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.generation-viewer {
  width: min(1120px, calc(100% - 40px)); height: min(880px, calc(100dvh - 40px));
  max-width: none; max-height: none; padding: 0; overflow: hidden; background: var(--panel);
}
.generation-viewer[open] {
  display: flex; flex-direction: column;
}
.generation-head, .generation-caption, .generation-actions { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.generation-head { flex: none; justify-content: space-between; border-bottom: 1px solid var(--edge); }
.generation-head > div, .generation-caption > div { min-width: 0; }
.generation-head h2, .generation-head p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.generation-head p { margin-top: 2px; }
.viewer-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--control-edge); border-radius: 7px; color: var(--fg); background: var(--surface); font: 25px/1 system-ui, sans-serif; }
.viewer-icon:hover { background: var(--hover); }
.generation-stage {
  position: relative; display: grid; flex: 1 1 auto; min-height: 90px; overflow: hidden;
  background: repeating-conic-gradient(#222325 0 25%, #262729 0 50%) 50% / 18px 18px;
}
#generationMedia { position: absolute; inset: 0; display: grid; place-items: center; }
#generationMedia img, #generationMedia video { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.generation-stage .viewer-icon { position: absolute; top: 50%; transform: translateY(-50%); background: #232426e8; }
.step-back { left: 10px; } .step-next { right: 10px; }
.generation-caption { justify-content: space-between; flex: none; }
.generation-caption strong { display: block; overflow-wrap: anywhere; }
.generation-caption span { color: var(--muted); font-size: 12px; }
#outputNumber { flex: none; font-variant-numeric: tabular-nums; }
.generation-thumbs { display: flex; flex: none; gap: 8px; overflow: auto; margin: 0 18px 12px; padding: 3px; }
.generation-thumb { flex: 0 0 88px; display: grid; grid-template-rows: 46px auto; min-width: 0; padding: 3px; gap: 3px; border: 1px solid var(--control-edge); border-radius: 6px; color: var(--muted); background: var(--bg); }
.generation-thumb[aria-pressed="true"] { border-color: var(--accent); color: var(--fg); }
.generation-thumb img, .generation-thumb video { display: block; width: 100%; height: 100%; object-fit: contain; }
.generation-thumb span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.generation-actions { flex: none; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--edge); }
#generationError { padding: 0 18px 10px; }
@media (max-width: 550px), (max-height: 520px) {
  .generation-viewer { width: 100%; height: 100dvh; border: 0; border-radius: 0; overflow-y: auto; }
  .generation-head, .generation-caption, .generation-actions { padding: 9px 12px; }
  .generation-head h2 { font-size: 16px; }
  .generation-thumbs { margin: 0 10px 7px; gap: 5px; }
  .generation-thumb { flex-basis: 65px; grid-template-rows: 32px auto; }
  .generation-actions .btn { padding: 6px 8px; }
}
