:is(#theme-toggle, #welcomeThemeToggle) .theme-mode-auto-icon {
  display: none !important;
}

[data-theme-mode="auto"] :is(#theme-toggle, #welcomeThemeToggle) .theme-mode-auto-icon {
  display: inline-block !important;
  color: var(--color-accent);
  font-size: 18px;
}

[data-theme-mode="auto"] :is(#theme-toggle, #welcomeThemeToggle) :is(.icon-sun, .icon-moon) {
  display: none;
}

.theme-mode-menu {
  position: fixed;
  z-index: 1000001;
  width: 190px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text-primary);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
}

.theme-mode-menu[hidden] {
  display: none;
}

.theme-mode-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  letter-spacing: 0;
  cursor: pointer;
}

.theme-mode-menu button i {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
}

.theme-mode-menu button[aria-checked="true"] {
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}

.theme-mode-menu button:hover,
.theme-mode-menu button:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: -1px;
}

/* Independent overrides; upstream styles remain untouched. */
.header .header-inner {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding-inline: 24px;
}
@media (max-width: 768px) {
  .header .header-inner { padding-inline: 12px; }
  .header #search-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .header #search-box .search-box-text,
  .header #search-box .search-box-kbd { display: none; }
}
.hero .theme-decor {
  right: 24px;
  top: 50%;
  bottom: auto;
  width: min(22vw, 320px);
  height: min(70vh, 640px);
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}
.hero .theme-decor img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: right center;
}
.hero .hero-profile { position: relative; z-index: 1; }
@media (max-width: 1100px) {
  .hero .theme-decor { display: none; }
}
#nav-music .aplayer .aplayer-info .aplayer-controller { pointer-events: none; }
#nav-music .aplayer:not(.aplayer-withlrc) .aplayer-pic {
  width: 30px; height: 30px; margin-left: 6px; border-radius: 50%;
}
#nav-music .aplayer:not(.aplayer-withlrc) .aplayer-info {
  height: 100%; margin: 0; padding: 0; display: flex; align-items: center;
}
@media (max-width: 768px) {
  #music-panel.active { display: block !important; }
  #music-panel { max-width: calc(100vw - 40px); max-height: calc(100dvh - 90px); }
  #music-panel .music-panel-inner { max-height: calc(100dvh - 90px); overflow-y: auto; }
}
@media (max-width: 480px) {
  #nav-music.music-ready { display: flex !important; max-width: calc(100vw - 90px); }
  #music-panel { max-width: calc(100vw - 40px); }
}
.aogiri-cover-credit {
  margin: 0;
  padding: 0.5rem 1rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.75;
}

.aogiri-cover-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Keep title text legible across the random landscape collection. */
.post-hero-bg.aogiri-shared-cover .post-hero-overlay {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 20%, rgba(0, 0, 0, 0.76) 100%);
}

