/* =========================================
   SHARED SITE BRAND + THEME TOGGLE MOBILE
   Single source of truth for the fixed top-left "hanafuda.moe" brand and
   the theme-toggle refinements that sit on top of theme.css's base
   #theme-toggle (touch handling + the mobile tap-target bump). Any page
   that shows both should link this after theme.css so nothing has to be
   hand-copied between pages again.
========================================= */

.site-brand {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: max(1rem, env(safe-area-inset-left));
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  margin: -6px -4px;
  /* var(--accent) is the one color used at every state (rest, :visited,
     :hover) - the muted "default" look comes from brightness, not a second
     color, so there's no color-mix()<->color transition left to glitch */
  color: var(--accent);
  filter: brightness(0.75);
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.02em;
  text-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.15s ease;
}

.site-brand:hover {
  filter: brightness(1);
  text-shadow: none;
}

.site-brand-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-brand span {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .site-brand { font-size: 18px; gap: 8px; }
  .site-brand-icon { width: 24px; height: 24px; }
}

/* theme.css already defines the base #theme-toggle/#theme-icon look -
   these are the extra touch/mobile bits home had that card was missing */
#theme-toggle {
  touch-action: manipulation;
}

@media (hover: none) {
  #theme-toggle:hover { transform: none; }
}

@media (max-width: 600px) {
  #theme-toggle {
    width: 44px;
    height: 44px;
    top: 0.75rem;
    right: 0.75rem;
  }

  #theme-icon {
    width: 26px;
    height: 26px;
    margin: auto;
  }
}
