/* One set of surfaces for every section. The room-colour pass tinted the panel,
   field, hover and bar backgrounds per room, and earlier layers left their own
   hard-coded greys on the rail, dock and title bars, so each section sat on a
   slightly different background. Backgrounds are now defined once here and the
   room colour stays an accent only (icons, current marker, selection, focus). */

html.graphite63.studio59{
  --u-stage:oklch(.215 .007 265);
  --u-panel:oklch(.245 .008 265);
  --u-well:oklch(.175 .006 265);
  --u-field:oklch(.285 .009 265);
  --u-hover:oklch(.35 .011 265);
  --u-line:oklch(.42 .012 265);
  --u-chrome:oklch(.265 .008 265);

  --g-bg:var(--u-stage);
  --g-panel:var(--u-panel);
  --g-stage:var(--u-well);
  --g-field:var(--u-field);
  --g-hover:var(--u-hover);
  --g-line:var(--u-line);
  --bar-bg64:var(--u-chrome);
  --pane-edge65:oklch(.34 .01 265);
}

/* Same tokens on the elements the room pass re-declared them on. */
html.graphite63 :is(dialog.g-room63,#gallery-settings63,#gallery-head63){
  --g-bg:var(--u-stage);
  --g-panel:var(--u-panel);
  --g-stage:var(--u-well);
  --g-field:var(--u-field);
  --g-hover:var(--u-hover);
  --g-line:var(--u-line);
  --bar-bg64:var(--u-chrome);
}

/* Navigation chrome (rail, dock) matches the title bars. */
html.graphite63 .rail59{background:var(--u-chrome)}
html.graphite63.studio59 dialog.g-room63:is(#detail,#palette-panel,#library-room63,#motion-room50,#post-panel50,#export-menu49) .dock63{
  background:var(--u-chrome);
  border-right-color:var(--pane-edge65);
}

/* Every room sits on the same stage colour. */
html.graphite63.studio59 dialog.g-room63{background:var(--u-stage)}

/* Navigation toggle: a single sidebar icon (collapse), mirrored when the rail
   is compact. The old overlay chevron was drawn for the previous icon and now
   collided with it. */
.rail59 .rail-toggle60 .panel-arrow60{display:none}
.studio59[data-rail60=compact] .rail-toggle60 .u59-icon:not(.rail-close60){transform:scaleX(-1)}

/* No glows. Zero-offset halos around buttons (hover rings in grey, a white
   double ring on focus) read as decoration and looked blurry on dark. Hover is
   carried by the fill change; focus is one crisp accent outline. */
@media(hover:hover){
  html.graphite63.studio59 :is(
    #gallery-head63 #export-gallery49,
    #motion-room50 #motion-export50,
    #palette-panel #palette-apply,
    #detail .finish-toolbar .actions #export-detail49,
    #export-menu49 :is(#export-png48,#export-video48,#export-link48)
  ):not(:disabled):hover{
    box-shadow:none;
  }
}
@media(forced-colors:none){
  html.graphite63.studio59 :is(.gallery-actions59,.gallery-toolbar59,.tile-menu59,.vary-panel59,#fields,#detail,#motion-room50,#post-panel50,#export-menu49,#palette-panel) :is(button,summary,select,a[href]):focus-visible{
    outline:2px solid var(--accent,#fff);
    outline-offset:2px;
    box-shadow:none;
  }
}

/* No hover underlines. Underlining text on hover shifted the baseline feel and
   fought the pill hovers around it. Hover is carried by colour instead. */
@media(hover:hover){
  html.graphite63 #fields .tile:hover .style-name,
  html.graphite63 #detail #detail-palettes:hover .prop-palette-name59,
  html.graphite63 .brandbar49 .stage-nav50>:hover,
  html.graphite63 a:hover,
  html.graphite63 a:not([class]):hover{
    text-decoration:none;
  }
  html.graphite63 #fields .tile:hover .style-name{color:var(--accent-strong)}
  html.graphite63 a:not([class]):hover{color:var(--g-text)}
}
html.graphite63 a:not([class]){text-decoration:none}

/* Randomizer next to "Exportar galería": same pill and weight as the other
   gallery actions, a neutral fill so the export stays the primary action. */
html.graphite63.studio59 .gallery-actions59 .randomize63{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:36px;
  padding:7px 14px;
  background:var(--g-field);
  color:var(--g-text);
  border:1px solid var(--g-line);
  border-radius:var(--g-pill,999px);
  font:500 13px/1.2 var(--font-ui);
  cursor:pointer;
}
html.graphite63.studio59 .gallery-actions59 .randomize63 .u59-icon{width:16px;height:16px}
@media(hover:hover){
  html.graphite63.studio59 .gallery-actions59 .randomize63:not(:disabled):hover{
    background:var(--g-hover);
    border-color:var(--accent-line);
  }
  html.graphite63.studio59 .gallery-actions59 .randomize63:not(:disabled):hover .u59-icon{
    transform:rotate(18deg) scale(1.08);
  }
}
html.graphite63.studio59 .gallery-actions59 .randomize63:not(:disabled):active .u59-icon{transform:rotate(-24deg)}
html.graphite63.studio59 .gallery-actions59 .randomize63 .u59-icon{
  transition:transform var(--dur-overlay,.32s) var(--ease-out,cubic-bezier(.16,1,.3,1));
}
html.graphite63.studio59 .gallery-actions59 .randomize63:disabled{opacity:.45;cursor:default}
