@font-face{font-family:Astro;src:url(regular.ttf)}@font-face{font-family:Astro;src:url(medium.ttf);font-weight:500}@font-face{font-family:AstroMono;src:url(mono.ttf)}
:root{color-scheme:dark;--base:#080f14;--sidebar:#0b141b;--card:#101a22;--row:#131e27;--control:#1d2b36;--well:#0a1219;--selected:#283640;--track:#2d3a43;--text:#f8f9fa;--sub:#a8b3bc;--muted:#7e8d98;--accent:#e9eaf0}*{box-sizing:border-box}body{margin:0;color:var(--text);background:transparent;font:14px Astro,sans-serif}button,input,select{font:inherit;color:inherit}button,a,input{outline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--accent)}button{border:0;cursor:pointer;background:none}button:disabled,input:disabled{cursor:default}button:hover{background:var(--control)}.preview-tools{height:44px;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--sub);padding:0 2px;gap:16px}.preview-tools div{display:flex;gap:16px;white-space:nowrap}.preview-tools button,.preview-tools a{color:var(--text);text-decoration:none;padding:6px 0}.viewport{position:relative;overflow-x:auto;overflow-y:hidden;width:100%}#menu{width:1200px;height:750px;background:var(--base);position:relative;transform-origin:top left;border-radius:8px;overflow:hidden}.titlebar{position:absolute;inset:0 0 auto;height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 18px;z-index:2}.brand{display:flex;align-items:center;gap:8px;letter-spacing:.32px;font-weight:500;font-size:11px}.brand svg{width:12px;height:12px;fill:var(--accent)}.titlebar button{width:36px;height:28px;border-radius:4px;font-size:20px;color:var(--sub)}.titlebar div{display:flex;gap:4px}aside{position:absolute;inset:0 auto 0 0;width:220px;background:var(--sidebar);padding:60px 16px 16px;overflow:auto}.hero-chip{height:52px;width:188px;border-radius:6px;background:var(--card);display:flex;align-items:center;text-align:left;padding:8px;gap:12px;margin-bottom:12px}.hero-chip img{width:36px;height:36px;border-radius:4px}.hero-chip span{flex:1}.nav{width:188px;height:34px;border-radius:4px;text-align:left;padding:0 12px;margin:0 0 2px;display:flex;align-items:center;gap:10px;color:var(--sub)}.nav[aria-current=page]{background:var(--selected);color:var(--text)}.nav svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.5}.nav-separator{height:22px}main{position:absolute;left:244px;right:24px;top:68px;bottom:24px}#page-heading{height:32px;display:flex;align-items:center;gap:16px}h1{font-weight:500;font-size:20px;letter-spacing:.22px;margin:0;text-transform:uppercase}.mode-switch{display:flex;height:28px;border-radius:6px;background:var(--well);padding:2px;gap:2px}.mode-switch button{font-size:11px;letter-spacing:.14px;padding:0 12px;border-radius:4px;color:var(--muted)}.mode-switch button[aria-pressed=true]{background:var(--selected);color:var(--text)}.mode-switch i{display:inline-block;width:4px;height:4px;background:var(--muted);border-radius:50%;margin-right:6px}.mode-switch i.lit{background:var(--accent)}#content{position:absolute;top:48px;bottom:0;width:100%;overflow:auto;scrollbar-width:thin;scrollbar-color:#e9eaf05a transparent;padding-right:0}#content.enter{animation:page-enter .18s ease-out}@keyframes page-enter{from{opacity:.35}to{opacity:1}}.row{min-height:36px;margin-bottom:4px;padding:6px 12px;border-radius:4px;background:var(--row);display:flex;align-items:center;gap:12px}.row:hover{background:#192630}.row>label,.row>.label{width:calc(34% - 12px);flex-shrink:0}.row> .right{flex:1;display:flex;align-items:center;justify-content:flex-end;gap:12px}.toggle{width:36px;height:20px;border-radius:10px;padding:3px;background:var(--track);margin-left:auto;position:relative;transition:background .16s}.toggle:after{content:'';display:block;width:14px;height:14px;border-radius:50%;background:var(--muted);transition:transform .16s,background .16s}.toggle[aria-checked=true]{background:var(--accent)}.toggle[aria-checked=true]:after{transform:translateX(16px);background:white}.toggle:hover{background:var(--track)}.toggle[aria-checked=true]:hover{background:var(--accent)}fieldset{border:0;margin:0;padding:0;min-width:0}fieldset:disabled{opacity:.38}fieldset:disabled fieldset:disabled{opacity:.65}.segmented{display:flex;background:var(--well);border-radius:6px;padding:2px;height:26px;min-width:180px;margin-left:auto}.segmented button{flex:1;padding:0 12px;border-radius:4px;white-space:nowrap;color:var(--sub);font-size:13px}.segmented button[aria-pressed=true]{color:var(--text);background:var(--selected)}input[type=range]{appearance:none;min-width:60px;width:100%;height:4px;border-radius:3px;background:var(--track);accent-color:var(--accent);cursor:pointer}input[type=range]::-webkit-slider-thumb{appearance:none;width:10px;height:10px;background:var(--accent);border-radius:50%}.number{font:13px AstroMono,monospace;width:64px;height:24px;border:0;background:var(--well);border-radius:6px;text-align:right;padding:0 6px;flex-shrink:0;-moz-appearance:textfield}.number::-webkit-inner-spin-button{appearance:none}.key{width:96px;height:24px;border-radius:6px;background:var(--control);font-size:13px;margin-left:auto}.key.capturing{color:var(--accent)}.caption{height:20px;margin:16px 0 4px;padding:0 12px;font-size:11px;font-weight:500;letter-spacing:.14px;color:var(--sub)}.caption:first-child{margin-top:0}.value{margin-left:auto;font:13px AstroMono,monospace;color:var(--sub)}.cols{display:grid;grid-template-columns:1fr 1fr;gap:16px}.curve{height:240px;background:var(--well);border-radius:6px;margin:4px 0;position:relative}.curve svg{width:100%;height:100%;touch-action:none}.curve circle{fill:var(--accent);stroke:var(--text);stroke-width:1;cursor:grab}.curve path{stroke:var(--accent);stroke-width:2;fill:none}.curve line{stroke:var(--track);stroke-width:1}.curve text{fill:var(--muted);font:11px AstroMono}.curve-label{position:absolute;top:12px;left:12px;font-size:11px;color:var(--muted);pointer-events:none}input[type=color]{width:26px;height:18px;padding:0;border:0;background:none;margin-left:auto}.action-button{background:var(--control);border-radius:6px;padding:4px 12px;margin-left:auto;height:24px}.hint{font-size:13px;color:var(--muted);line-height:1.6;padding:12px}#status{font-size:12px;line-height:20px;color:var(--muted);margin:8px 0 0}#reopen{padding:14px 28px;border-radius:6px;background:var(--control);margin:30px}dialog{width:880px;height:600px;padding:20px 24px;border:0;border-radius:10px;background:var(--card);color:var(--text);overflow:hidden}dialog::backdrop{background:#0009}.gallery-head{height:32px;display:flex;justify-content:space-between}.gallery-head input{width:300px;border:0;border-radius:6px;background:var(--well);padding:0 12px}.gallery-head button{width:36px;font-size:24px}.gallery-body{display:grid;grid-template-columns:300px 1fr;gap:32px;height:calc(100% - 52px);margin-top:20px}#hero-list{overflow:auto;scrollbar-width:thin;scrollbar-color:var(--track) transparent}.gallery-item{display:flex;align-items:center;gap:12px;width:100%;height:36px;padding:6px 12px;border-radius:4px;text-align:left;margin-bottom:4px}.gallery-item[aria-selected=true]{background:var(--selected)}.gallery-item img{width:24px;height:24px;border-radius:3px}#hero-preview{background:var(--sidebar);position:relative;overflow:auto;padding:0 12px 16px;border-radius:6px}.gallery-art{height:240px;position:relative}.gallery-art img{position:absolute;right:-12px;top:0;width:240px;height:240px;mask-image:linear-gradient(to bottom,black 55%,transparent),linear-gradient(to right,transparent,black 40%);mask-composite:intersect}.gallery-art h2{position:absolute;bottom:8px;left:0;font-weight:500;font-size:24px;margin:0}.gallery-art small{display:block;font-size:11px;letter-spacing:.14px;color:var(--sub);margin-bottom:8px;text-transform:uppercase}.gallery-action{height:36px;background:var(--row);padding:10px 12px;border-radius:4px;margin-bottom:4px;display:flex;justify-content:space-between}.gallery-action span{color:var(--sub);font:13px AstroMono}.projectile-layout{display:grid;grid-template-columns:300px 1fr;gap:16px}.projectile{height:36px;width:100%;text-align:left;padding:0 12px;border-radius:4px;margin-bottom:4px;background:var(--row)}.projectile[aria-pressed=true]{background:var(--selected)}.projectile small{float:right;color:var(--accent)}@media(max-width:600px){.preview-tools{height:66px;align-items:flex-start;padding-top:8px;flex-direction:column;gap:4px}#status{font-size:11px}.preview-tools span{font-size:11px}}@media(prefers-reduced-motion:reduce){*,*:after{animation:none!important;transition:none!important}}

.preview-tools{justify-content:flex-end}.toggle[aria-checked=true]:after{background:#0a1219}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.clear-key{color:var(--muted)}


/* Bound horizontal scrolling to the scaled menu, not its 1200px layout box. */
.menu-stage{position:relative;overflow:hidden}
#status.sr-only{top:0;left:0;margin:0}

/* Touch uses an explicit picker; mouse/keyboard capture keeps its existing UI. */
#key-picker{width:min(360px,calc(100% - 24px));height:auto;max-height:calc(100% - 24px);padding:20px;overflow:auto}
#key-picker h2{font-size:20px;font-weight:500;margin:0 0 20px}
#key-picker label{display:block;color:var(--sub);margin-bottom:8px;font-size:14px}
#key-choice{width:100%;min-height:44px;font-size:16px;padding:8px;border:1px solid var(--track);border-radius:6px;background:var(--well)}
#key-picker-note{font-size:13px;line-height:1.5;color:var(--sub);margin:12px 0 20px}
.key-picker-actions{display:flex;justify-content:flex-end;gap:12px}
.key-picker-actions button{min-height:44px;min-width:80px;padding:8px 16px;border-radius:6px;background:var(--control)}
#key-apply{color:var(--base);background:var(--accent)}
@media(max-width:719px){
  #gallery{width:calc(100% - 24px);height:calc(100% - 24px);max-width:calc(100% - 24px);max-height:calc(100% - 24px);padding:12px}
  .gallery-head{height:44px;gap:8px}
  .gallery-head input{min-width:0;width:0;flex:1;font-size:16px}
  .gallery-head button{width:44px;flex-shrink:0}
  .gallery-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:12px;height:calc(100% - 56px);margin-top:12px;min-height:0}
  #hero-list,#hero-preview{min-width:0;min-height:0;max-width:100%}
  .gallery-item{height:44px}
  .gallery-art{height:110px}
  .gallery-art img{width:130px;height:130px}
  .gallery-art h2{font-size:22px}
  .gallery-action{height:auto;min-height:44px;gap:8px;flex-wrap:wrap}
}
