/* A narrow rail expands over the content, without moving the editor or photos. */
html{scrollbar-gutter:stable}
body[data-view=styles] #app{--atelier-rail-width:64px;--atelier-header-height:58px;--atelier-expanded-width:232px;--atelier-content-width:1440px;--atelier-page-gutter:clamp(18px,3vw,48px)}
/* Keep the header at the viewport edges independently of the centred page. */
body[data-view=styles] .atelier-topbar{position:sticky;top:0;height:var(--atelier-header-height);min-height:0;z-index:35;padding:0 16px;gap:24px;justify-content:space-between}
body[data-view=styles] .atelier-topbar .top-actions{margin-left:auto}
body[data-view=styles] .atelier-topbar .brand{gap:.8rem}
body[data-view=styles] .atelier-topbar .brand img{width:44px;height:44px}
body[data-view=styles] .atelier-topbar .brand span{font-size:1.05rem;line-height:1.3}
body[data-view=styles] .atelier-topbar .brand small{font-size:.61rem;line-height:1.3;margin-top:.15rem}
body[data-view=styles] main{width:calc(100% - var(--atelier-rail-width));max-width:var(--atelier-content-width);margin:0 0 0 calc(var(--atelier-rail-width) + max(0px,calc((100% - var(--atelier-rail-width) - var(--atelier-content-width))/2)));padding:32px var(--atelier-page-gutter)}
.atelier-sidebar{
  position:fixed;inset:var(--atelier-header-height) auto 0 0;z-index:40;
  width:var(--atelier-rail-width);display:flex;flex-direction:column;gap:.35rem;
  padding:.7rem 7px;background:#251e29;color:var(--muted);
  border-right:1px solid var(--line);overflow-x:hidden;overflow-y:auto;
  overscroll-behavior:contain;scrollbar-width:thin;
  transition:width .18s ease,box-shadow .18s ease;
}
.atelier-nav-link,.atelier-rail-toggle{
  display:flex;align-items:center;gap:1rem;flex-shrink:0;min-height:46px;width:100%;
  padding:10px 13px;border:1px solid transparent;background:none;color:inherit;
  font:.86rem var(--heading);text-align:left;white-space:nowrap;
}
.atelier-nav-link svg,.atelier-rail-toggle svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.atelier-nav-divider{height:1px;flex:none;margin:.6rem .35rem;background:var(--line)}
.atelier-nav-label{opacity:0;visibility:hidden;transition:opacity .12s ease}
.atelier-nav-link:hover,.atelier-nav-link:focus-visible{color:var(--bright);background:#9c6b8130;border-color:#d9aa5077}
.atelier-nav-link[aria-current=page]{color:var(--bright);background:#9c6b8120;border-color:#d9aa5055}
.atelier-private-tools{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.atelier-private-tools p{margin:0}
.atelier-sidebar-bottom{margin-top:auto;padding-top:.65rem;border-top:1px solid var(--line)}
.atelier-sidebar-bottom .atelier-nav-link{font-size:.77rem}
.atelier-sidebar-bottom .discord-community-link .atelier-nav-label{width:152px;flex:none;white-space:normal;line-height:1.35}
.atelier-rail-toggle,.atelier-menu-shade{display:none}
@media(min-width:761px){
  body[data-view=styles] .style-gallery{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
 /* Pointer clicks retain focus; only keyboard-visible focus keeps the rail open. */
 .atelier-sidebar:has(:focus-visible){width:var(--atelier-expanded-width);box-shadow:12px 0 24px #0005}
 .atelier-sidebar:has(:focus-visible) .atelier-nav-label{opacity:1;visibility:visible}
}
@media(min-width:761px) and (hover:hover){
  .atelier-sidebar:hover{width:var(--atelier-expanded-width);box-shadow:12px 0 24px #0005}
  .atelier-sidebar:hover .atelier-nav-label{opacity:1;visibility:visible}
}
@media(max-width:760px){
  body[data-view=styles] #app{--atelier-rail-width:48px;--atelier-header-height:64px}
  body[data-view=styles] .atelier-topbar{align-items:center;padding:.65rem .8rem;gap:8px}
  body[data-view=styles] .atelier-topbar .brand{gap:.6rem}
  body[data-view=styles] .atelier-topbar .brand img{width:38px;height:38px}
  body[data-view=styles] .atelier-topbar .brand span{font-size:.82rem}
  body[data-view=styles] .atelier-topbar .brand small{font-size:.53rem}
  body[data-view=styles] main{padding:24px 12px}
  .atelier-sidebar{padding:10px 2px 8px;gap:6px}
  .atelier-nav-link,.atelier-rail-toggle{min-height:44px;padding:10px;gap:12px}
  .atelier-rail-toggle{display:flex;color:var(--gold)}
  .atelier-rail-toggle svg{transition:transform .18s ease}
  .atelier-sidebar[data-open=true]{width:min(var(--atelier-expanded-width),calc(100vw - 48px));box-shadow:12px 0 24px #0007}
  .atelier-sidebar[data-open=true] .atelier-nav-label{opacity:1;visibility:visible}
  .atelier-sidebar[data-open=true] .atelier-rail-toggle svg{transform:rotate(180deg)}
  .atelier-menu-shade:not([hidden]){display:block;position:fixed;inset:var(--atelier-header-height) 0 0;z-index:39;border:0;background:#17111a99;cursor:default}
}
@media(min-width:761px) and (max-height:620px){
  .atelier-sidebar{padding-block:.35rem;gap:.2rem}
  .atelier-nav-link{min-height:38px;padding-block:7px}
  .atelier-sidebar-bottom{padding-top:.35rem}
}
@media(max-width:480px){body[data-view=styles] .style-gallery{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.atelier-sidebar,.atelier-nav-label,.atelier-rail-toggle svg{transition:none}}

.style-reactions{display:flex;align-items:center;gap:6px}
body[data-view=styles] .style-reaction{display:flex;align-items:center;justify-content:center;gap:7px;min-width:54px;min-height:44px;padding:8px 10px;border:1px solid var(--line);background:#211b2499;color:var(--muted);font:14px var(--body);border-radius:3px}
.style-reaction svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.style-reaction[data-reaction="-1"] svg{transform:rotate(180deg)}
body[data-view=styles] .style-reaction:hover{border-color:var(--gold);color:var(--bright)}
body[data-view=styles] .style-reaction[aria-pressed=true]{color:#edc678;background:#ad81332e;border-color:#d9aa50}
body[data-view=styles] .style-reaction[data-reaction="-1"][aria-pressed=true]{color:#e7a18b;background:#a86a5830;border-color:#c98b74}
body[data-view=styles] .style-card-actions .style-reaction{color:var(--muted)}
body[data-view=styles] .style-card-actions .style-reaction[aria-pressed=true]{color:#edc678}
body[data-view=styles] .style-card-actions .style-reaction[data-reaction="-1"][aria-pressed=true]{color:#e7a18b}
.style-reaction:disabled{opacity:.6;cursor:wait}
.style-card-actions{align-items:center}
body[data-view=styles] .style-card-actions>button{min-height:44px}
.discord-short{display:none}
.photo-missing:after{content:none}
.photo-missing>img{visibility:hidden}
.style-photo-failure{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:20px;color:var(--muted);font:14px var(--body);text-align:center}
body[data-view=styles] .page-head :is(h1,.intro){overflow-wrap:anywhere}
body[data-view=styles] dialog :is(h2,h3){min-width:0;overflow-wrap:anywhere}
.atelier-archived-notice{margin:0 0 20px;color:var(--gold);font:13px var(--body)}
.atelier-demo-label{font-size:12px;line-height:1.3;color:var(--gold);max-width:140px}
@media(max-width:760px){
  body[data-view=styles] .atelier-topbar:has(.discord-btn){padding-block:4px}
  .atelier-topbar .top-actions:has(.discord-btn){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 4px;max-width:94px}
  .top-actions:has(.discord-btn) .language-switch{grid-column:1/-1;justify-self:end}
  .top-actions:has(.discord-btn) .language-switch button{font-size:12px;padding:3px 4px}
  .top-actions:has(.discord-btn) .username{font-size:10px;max-width:40px;line-height:1.2}
  .atelier-topbar .top-actions .discord-btn{font-size:10px!important;height:24px;width:auto;min-height:24px;padding:3px 4px;line-height:1.2}
  .top-actions :is(#login,#logout){grid-column:1/-1;justify-self:end}
  .discord-label{display:none}.discord-short{display:inline}
  .atelier-demo-label{font-size:8px;max-width:40px}
  .atelier-topbar .top-actions:has(.atelier-demo-label){max-width:110px;flex-wrap:nowrap}
  .top-actions:has(.atelier-demo-label) .language-switch{flex-shrink:0}
  .top-actions:has(.atelier-demo-label) .username,.top-actions:has(.atelier-demo-label) #logout{display:none}
}
