/* Page tidy: one account menu, compact controls, no full-width button stacks. */
header.top .switch-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  pointer-events: none !important;
}
header.top .mode-switch .switch-label {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  font-size: 0.78rem;
  font-weight: 650;
}
header.top .top-switches { gap: 0.35rem; }
header.top button.switch { width: auto !important; min-height: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; }
header.top .account { gap: 0.45rem; }
header.top .account > a.ghost,
header.top .account > a.solid { width: auto !important; min-height: 36px !important; padding: 0 12px !important; }

.acct-menu { position: relative; }
.acct-menu > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  min-height: 36px;
  padding: 0 0.2rem;
}
.acct-menu > summary::-webkit-details-marker { display: none; }
.acct-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  gap: 0.35rem;
  min-width: 180px;
  padding: 0.45rem;
  background: var(--surface, #17181c);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
body .acct-panel a,
body .acct-panel button {
  width: 100% !important;
  min-height: 36px !important;
  justify-content: flex-start !important;
  padding: 0 12px !important;
}
body .ytgo-tools button {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 32px !important;
  padding: 0 10px !important;
}
body .livebox .kb,
body .livebox-bar button.kb {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 0 !important;
  padding: 0 !important;
}
body .ytgo-form button.go,
body .live-start button.go {
  width: auto !important;
  max-width: none !important;
  min-width: 8rem;
  height: auto !important;
}

.ytgo {
  display: grid;
  grid-template-columns: minmax(260px, 440px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.ytgo-preview {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.ytgo-preview video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.ytgo-idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.ytgo-idle[hidden] { display: none; }
.ytgo-tools {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  gap: 0.35rem;
}
.ytgo-tools button { width: auto !important; min-height: 32px !important; padding: 0 10px !important; }
.ytgo-form, .live-start { display: grid; gap: 0.65rem; align-content: start; }
.ytgo-form button.go, .live-start button.go { justify-self: start; width: auto !important; }
.live-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1rem; }
.live-extra { padding: 0; overflow: hidden; }
.live-extra > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 650;
}
.live-extra > summary::-webkit-details-marker { display: none; }
.live-extra .fold-body { display: grid; gap: 0.55rem; padding: 0 1rem 1rem; }
.live-extra:not([open]) .fold-body { display: none; }

.livebox { position: relative !important; overflow: hidden; background: #000; }
.livebox-bar {
  position: absolute !important;
  left: 0; right: 0; bottom: 0;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  height: 48px !important;
}
.livebox-bar button,
.livebox .kb,
.livebox-end button {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}
.livebox .kb { width: 36px !important; height: 36px !important; min-height: 0 !important; padding: 0 !important; }

.row-buttons, .stack, .mod-list form { align-items: center; }
.row-buttons > a,
.row-buttons > button,
.stack > button,
.stack > .site-btn,
.row-buttons > .site-btn,
.panel > .site-btn {
  width: auto !important;
  max-width: 100%;
}
.copy-line { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; gap: 0.45rem; align-items: center; }
.copy-line .path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.site-foot { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; padding: 0.8rem 1rem 1.2rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.7rem; }

@media (max-width: 900px) {
  .ytgo, .live-tools, .ys-split { grid-template-columns: 1fr; }
  .copy-line { grid-template-columns: 1fr; }
  .yside { scrollbar-width: none; }
  main { padding: 0.75rem 0.75rem 5.5rem; }
}
@media (max-width: 720px) {
  #alert-toggle, #sound-toggle { display: none !important; }
  header.top .acct-name { display: none; }
  .ytgo-form button.go, .live-start button.go, button.go, a.go-live { width: 100% !important; justify-self: stretch; }
  body .ytgo-form button.go, body .live-start button.go, body button.go, body a.go-live { width: 100% !important; max-width: 100% !important; }
  .row-buttons { display: flex; flex-wrap: wrap; }
  .chips, .scroller { max-width: 100%; }
  .site-foot { margin-bottom: 3.2rem; }
  .lang-menu { right: 0; width: min(320px, calc(100vw - 1rem)); }
}
