/* KESTREL AI shared type roles. Surface styles own geometry and component states. */
:root {
  color-scheme:dark;
  --kestrel-bg:#050806; --kestrel-panel:rgba(13,23,18,.86); --kestrel-edge:rgba(190,235,208,.14);
  --kestrel-text:#e9f4ed; --kestrel-copy:#b4c8bb; --kestrel-muted:#a2b7aa; --kestrel-accent:#00e676;
  --kestrel-font:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",Inter,system-ui,sans-serif;
  --kestrel-type-page:22px; --kestrel-type-section:18px; --kestrel-type-card:16px;
  --kestrel-type-body:14px; --kestrel-type-control:13px; --kestrel-type-meta:12px;
  --kestrel-leading-title:1.5; --kestrel-leading-body:1.75; --kestrel-leading-control:1.5; --kestrel-leading-meta:1.6;
  --kestrel-control-height:40px; --kestrel-space-field:8px; --kestrel-space-group:16px; --kestrel-space-section:24px;
  --restrel-bg:var(--kestrel-bg); --restrel-void:var(--kestrel-bg); --restrel-panel:var(--kestrel-panel); --restrel-panel-2:#0d1712;
  --restrel-line:var(--kestrel-edge); --restrel-edge:var(--kestrel-edge); --restrel-text:var(--kestrel-text);
  --restrel-copy:var(--kestrel-copy); --restrel-muted:var(--kestrel-muted); --restrel-green:var(--kestrel-accent);
  --restrel-accent:var(--kestrel-accent); --restrel-font:var(--kestrel-font);
  --d-bg:var(--kestrel-bg); --d-panel:var(--kestrel-panel); --d-line:var(--kestrel-edge); --d-text:var(--kestrel-text);
  --d-copy:var(--kestrel-copy); --d-muted:var(--kestrel-muted); --d-green:var(--kestrel-accent); --d-font:var(--kestrel-font);
  --landing-neon:var(--kestrel-accent); --landing-neon-deep:#00b960;
}
html body,html body :is(h1,h2,h3,h4,h5,h6,button,input,select,textarea,label) {font-family:var(--kestrel-font)!important}
html body {font-size:var(--kestrel-type-body);line-height:var(--kestrel-leading-body);letter-spacing:0;scrollbar-color:#395744 #08110c;scrollbar-width:thin}
html body :is(h1,h2,h3,h4,h5,h6) {letter-spacing:0;text-wrap:balance}
html body :is(button,input,select,textarea) {line-height:var(--kestrel-leading-control);letter-spacing:0}
html body :is(button,.drama-primary-btn,.drama-ghost-btn,.mini-button,.asset-action-button) {font-size:var(--kestrel-type-control);font-weight:600;line-height:var(--kestrel-leading-control)}
html body :is(input,textarea) {caret-color:var(--kestrel-accent)}
html body :is(input,textarea)::placeholder {color:var(--kestrel-muted);opacity:1}
html body :is(.drama-panel-intro h2,.drama-inspector-head h2,.api-page-heading h1,.admin-page h2) {font-size:var(--kestrel-type-section);line-height:var(--kestrel-leading-title);font-weight:600;letter-spacing:0}
html body :is(.drama-workspace,.drama-sidebar,.drama-inspector,.api-main,.api-sidebar) {min-width:0}
html body :is(.drama-workspace-head,.drama-panel-intro,.api-page-heading,.drama-production-card) {overflow-wrap:anywhere}
html body :is(.credits-badge,.frozen-credits-badge,.drama-stat-grid strong,.plan-credits,.api-top-account b) {font-variant-numeric:tabular-nums}
html body :is(.api-page,.admin-page) button[type=submit],html body .purchase-page :is(.plan-button,.note-action) {background:var(--kestrel-accent)!important;color:#04140a!important}
html body.restrel-page :is(button,input,select,textarea) {border-radius:8px!important}
html body .drama-kicker {display:none}
html body :focus-visible {outline:2px solid var(--kestrel-accent)!important;outline-offset:3px}
html body ::selection {background:#26563b;color:#effff4}
html body ::-webkit-scrollbar {width:8px;height:8px}
html body ::-webkit-scrollbar-track {background:#08110c}
html body ::-webkit-scrollbar-thumb {background:#395744;border-radius:6px}
@media(max-width:860px) {html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {font-size:16px!important}}
@media(prefers-reduced-motion:reduce) {html body *,html body *::before,html body *::after {animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* Backend-defined parameters share aligned labels and on-demand explanations. */
.image-parameter-field{position:relative;display:grid;grid-template-rows:24px auto;gap:6px;min-width:0;align-content:start}
.image-parameter-field select{min-width:0;width:100%;align-self:end}
.image-parameter-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;line-height:1.5;color:var(--kestrel-copy);font-size:12px}
.image-parameter-heading>label{margin:0;white-space:nowrap}
.image-parameter-info{flex:none}
.image-parameter-info>summary{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;list-style:none;cursor:pointer;color:var(--kestrel-muted)}
.image-parameter-info>summary::-webkit-details-marker{display:none}
.image-parameter-info>summary:is(:hover,:focus-visible),.image-parameter-info[open]>summary{background:#224732;color:var(--kestrel-text)}
.image-parameter-info>summary:focus-visible{outline:2px solid var(--kestrel-accent);outline-offset:2px}
.image-parameter-info>summary svg{width:16px;height:16px}
.image-parameter-info:not([open])>.image-parameter-help{display:none}
.image-parameter-help{position:absolute;bottom:calc(100% + 8px);left:0;z-index:5;box-sizing:border-box;width:max(100%,260px);max-width:calc(100vw - 48px);max-height:260px;overflow:auto;padding:12px;border:1px solid #42634e;border-radius:8px;background:#14251a;box-shadow:0 8px 24px #0006;font-size:12px;font-weight:400;line-height:1.6;color:var(--kestrel-text);white-space:normal;overflow-wrap:anywhere}
.image-parameter-help p{margin:0}
.image-parameter-help .image-parameter-option-help{margin-top:6px;color:var(--kestrel-copy)}
.image-parameter-field:nth-child(3n) .image-parameter-help,.image-parameter-field:last-child .image-parameter-help{left:auto;right:0}
@media(max-width:700px){.image-parameter-field{grid-template-rows:32px auto}.image-parameter-info>summary{width:32px;height:32px}.image-parameter-help{width:max(100%,240px)}.image-parameter-field:nth-child(2n) .image-parameter-help{left:auto;right:0}}
