.studio-popover { position: relative; flex: none; }

.studio-popover > summary {
  display: grid;
  place-items: center;
  width: var(--studio-control-size, 2.4rem);
  min-height: var(--studio-control-size, 2.4rem);
  padding: 0;
  border: 1px solid var(--border, var(--line));
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  list-style: none;
}

.studio-popover > summary::-webkit-details-marker { display: none; }
.studio-launcher > summary svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.studio-launcher > summary:hover, .studio-launcher[open] > summary {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.studio-popover > :is(nav, .studio-profile-actions) {
  position: absolute;
  z-index: 20;
  inset-block-start: calc(100% + .5rem);
  inset-inline-end: 0;
  padding: .45rem;
  border: 1px solid var(--border, var(--line));
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 28px #0002;
}

.studio-launcher > nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .3rem;
  width: min(14rem, calc(100vw - 4.2rem));
  max-height: min(22rem, 65dvh);
  overflow: auto;
}

.studio-profile > summary {
  height: var(--studio-control-size, 2.4rem);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 17%, var(--surface));
  color: var(--ink);
  font-weight: 700;
}

.studio-profile > summary:hover, .studio-profile[open] > summary { border-color: var(--accent); }
.studio-profile-actions { min-width: 8rem; }
.studio-profile-actions > button {
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  text-align: start;
  white-space: nowrap;
}
.studio-profile-actions > button:hover:not(:disabled) {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.studio-launcher a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: .55rem .3rem;
  border-radius: 8px;
  color: var(--ink);
  font-size: .85rem;
  text-align: center;
  text-decoration: none;
}

.studio-launcher a:hover, .studio-launcher a[aria-current] {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.studio-launcher a:focus-visible { outline-offset: -2px; }
.studio-app-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
}
.studio-app-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#theme-toggle .moon, [data-theme=dark] #theme-toggle .sun { display: none; }
[data-theme=dark] #theme-toggle .moon { display: block; }
