/* GBZ LIGHT LAUNCHER V9 START */
/*
  Desktop Light only.
  Search-first + category launcher.
  All tools share one card system.
  No explicit lore copy.
*/
@media (min-width: 769px) {
  html[data-theme="light"] {
    --gbz-v9-bg: #f4f6f7;
    --gbz-v9-surface: rgba(255,255,255,.94);
    --gbz-v9-surface-strong: #fff;
    --gbz-v9-line: rgba(113,124,134,.16);
    --gbz-v9-line-strong: rgba(105,116,126,.24);
    --gbz-v9-text: #171b1f;
    --gbz-v9-muted: #6d767e;
    --gbz-v9-blood: #720a12;
  }

  html[data-theme="light"] body {
    background:
      radial-gradient(circle at 50% -12%, #fff 0%, rgba(255,255,255,.94) 18%, rgba(255,255,255,0) 42%),
      linear-gradient(180deg, #fafbfc 0%, #f4f6f7 45%, #eef1f3 100%) !important;
    color: var(--gbz-v9-text) !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  }

  html[data-theme="light"] .header {
    min-height: 62px !important;
    padding: 0 28px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--gbz-v9-line) !important;
    background: rgba(255,255,255,.90) !important;
    box-shadow: 0 8px 30px rgba(31,37,42,.035) !important;
    backdrop-filter: blur(18px) saturate(118%) !important;
  }

  html[data-theme="light"] .header .logo {
    color: #11161a !important;
    -webkit-text-fill-color: #11161a !important;
    background: none !important;
    text-shadow: none !important;
    letter-spacing: -.015em !important;
  }

  html[data-theme="light"] .hero {
    min-height: 0 !important;
    padding: 54px 24px 22px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
  }

  html[data-theme="light"] .hero-brand {
    display: block !important;
    width: min(920px, calc(100% - 48px)) !important;
    margin: 0 auto 16px !important;
    color: #171b1f !important;
    -webkit-text-fill-color: #171b1f !important;
    background: none !important;
    text-shadow: none !important;
    text-align: center !important;
    font: 650 24px/1.15 Inter, "Segoe UI", Arial, sans-serif !important;
    letter-spacing: -.03em !important;
  }

  html[data-theme="light"] .hero > h1,
  html[data-theme="light"] .hero > .hero-title,
  html[data-theme="light"] .hero > .hero-heading,
  html[data-theme="light"] .hero > p,
  html[data-theme="light"] .hero > .hero-subtitle,
  html[data-theme="light"] .gbz-problem-examples,
  html[data-theme="light"] .gbz-problem-search-compact .gbz-problem-help,
  html[data-theme="light"] .gbz-problem-search-compact .gbz-problem-hint {
    display: none !important;
  }

  html[data-theme="light"] .hero .gbz-problem-search-compact {
    width: min(820px, calc(100% - 48px)) !important;
    max-width: 820px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  html[data-theme="light"] .hero .gbz-problem-search-inner {
    padding: 10px !important;
    border: 1px solid var(--gbz-v9-line) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.94) !important;
    box-shadow:
      0 24px 64px rgba(34,40,45,.06),
      inset 0 1px 0 rgba(255,255,255,.98) !important;
  }

  html[data-theme="light"] .gbz-problem-form input {
    min-height: 50px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #fafbfc !important;
    color: #171b1f !important;
    box-shadow: inset 0 0 0 1px rgba(113,124,134,.17) !important;
  }

  html[data-theme="light"] .gbz-problem-form input:focus {
    outline: none !important;
    box-shadow:
      inset 0 0 0 1px rgba(111,126,139,.34),
      0 0 0 4px rgba(255,255,255,.88),
      0 0 26px rgba(255,255,255,.96) !important;
  }

  html[data-theme="light"] .gbz-problem-form button,
  html[data-theme="light"] .hero .hero-btn,
  html[data-theme="light"] .hero button.hero-btn {
    min-height: 40px !important;
    border: 1px solid var(--gbz-v9-line) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.94) !important;
    color: #30373d !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.98),
      0 5px 16px rgba(31,35,40,.025) !important;
    text-shadow: none !important;
    transform: none !important;
  }

  html[data-theme="light"] .gbz-problem-form button:hover,
  html[data-theme="light"] .hero .hero-btn:hover {
    background: #fff !important;
    color: #171b1f !important;
    box-shadow:
      0 0 26px rgba(255,255,255,.98),
      inset 0 -1px 0 rgba(114,10,18,.10) !important;
  }

  /* hide old homepage tool sections only; launcher replaces them */
  html[data-theme="light"] body:not(.gbz-tool-page) .section:has(.tool-grid) {
    display: none !important;
  }

  html[data-theme="light"] #gbz-light-launcher {
    display: block !important;
    width: min(1180px, calc(100% - 48px));
    margin: 12px auto 38px;
  }

  html[data-theme="light"] .gbz-launcher-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 18px;
  }

  html[data-theme="light"] .gbz-launcher-tab {
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #727b83;
    font: 550 11.5px/1 Inter, "Segoe UI", Arial, sans-serif;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  }

  html[data-theme="light"] .gbz-launcher-tab:hover,
  html[data-theme="light"] .gbz-launcher-tab:focus-visible {
    outline: none;
    background: rgba(255,255,255,.76);
    border-color: var(--gbz-v9-line);
    color: #262c31;
  }

  html[data-theme="light"] .gbz-launcher-tab.is-active {
    background: #fff;
    border-color: var(--gbz-v9-line);
    color: #171b1f;
    box-shadow:
      0 7px 20px rgba(34,40,45,.04),
      inset 0 1px 0 rgba(255,255,255,1);
  }

  html[data-theme="light"] .gbz-launcher-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
  }

  html[data-theme="light"] .gbz-launcher-card {
    position: relative;
    isolation: isolate;
    min-height: 112px;
    display: flex;
    align-items: flex-end;
    padding: 16px 42px 16px 16px;
    overflow: hidden;
    border: 1px solid var(--gbz-v9-line);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,251,252,.94));
    color: #252b30;
    text-decoration: none;
    box-shadow:
      0 14px 38px rgba(35,42,48,.04),
      inset 0 1px 0 rgba(255,255,255,.99);
    transform: translateY(0);
    transition:
      transform .18s ease,
      border-color .18s ease,
      box-shadow .18s ease,
      background .18s ease;
  }

  html[data-theme="light"] .gbz-launcher-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -30% -24%;
    opacity: 0;
    pointer-events: none;
    background:
      linear-gradient(
        115deg,
        transparent 0%,
        rgba(255,255,255,0) 28%,
        rgba(255,255,255,.80) 40%,
        rgba(114,10,18,.035) 47%,
        rgba(114,10,18,.09) 50%,
        rgba(114,10,18,.035) 53%,
        rgba(255,255,255,.72) 61%,
        rgba(255,255,255,0) 73%,
        transparent 100%
      );
    filter: blur(12px);
    transform: translateX(-36%);
  }

  html[data-theme="light"] .gbz-launcher-card::after {
    content: "↗";
    position: absolute;
    top: 14px;
    right: 15px;
    color: #a0a7ad;
    font: 500 15px/1 "Segoe UI", Arial, sans-serif;
  }

  html[data-theme="light"] .gbz-launcher-card:hover,
  html[data-theme="light"] .gbz-launcher-card:focus-visible {
    outline: none;
    transform: translateY(-2px);
    border-color: var(--gbz-v9-line-strong);
    background: #fff;
    box-shadow:
      0 22px 52px rgba(34,40,45,.065),
      0 0 28px rgba(255,255,255,.94),
      inset 0 1px 0 rgba(255,255,255,1);
  }

  html[data-theme="light"] .gbz-launcher-card:hover::before,
  html[data-theme="light"] .gbz-launcher-card:focus-visible::before {
    opacity: .92;
    animation: gbz-v9-flow 1.3s cubic-bezier(.22,.7,.28,1) both;
  }

  html[data-theme="light"] .gbz-launcher-card:hover::after,
  html[data-theme="light"] .gbz-launcher-card:focus-visible::after {
    color: var(--gbz-v9-blood);
  }

  html[data-theme="light"] .gbz-launcher-name {
    position: relative;
    z-index: 1;
    max-width: 92%;
    color: #252b30;
    font: 610 13.5px/1.34 Inter, "Segoe UI", Arial, sans-serif;
    letter-spacing: -.01em;
  }

  html[data-theme="light"] .gbz-launcher-empty {
    grid-column: 1 / -1;
    padding: 54px 20px;
    text-align: center;
    color: #7a838b;
    font-size: 13px;
  }

  @keyframes gbz-v9-flow {
    from { transform: translateX(-36%); }
    to   { transform: translateX(36%); }
  }

  /* About + updates become quiet support content below the working area */
  html[data-theme="light"] #about-ghostbladezero,
  html[data-theme="light"] #system-updates {
    width: min(1180px, calc(100% - 48px)) !important;
    max-width: 1180px !important;
    margin: 18px auto !important;
    padding: 18px !important;
    border: 1px solid var(--gbz-v9-line) !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.70) !important;
    box-shadow: 0 16px 42px rgba(35,42,48,.03) !important;
  }

  html[data-theme="light"] #about-ghostbladezero > .section-title,
  html[data-theme="light"] #system-updates .section-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #252b30 !important;
    -webkit-text-fill-color: #252b30 !important;
    text-shadow: none !important;
    font: 620 14px/1.2 Inter, "Segoe UI", Arial, sans-serif !important;
    text-align: left !important;
  }

  html[data-theme="light"] #about-ghostbladezero > .gbz-project-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html[data-theme="light"] #about-ghostbladezero > .gbz-project-nav a {
    width: auto !important;
    padding: 6px 9px !important;
    border: 1px solid var(--gbz-v9-line) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.76) !important;
    color: #606a72 !important;
    font-size: 11px !important;
  }

  html[data-theme="light"] #about-ghostbladezero > .gbz-project-nav span,
  html[data-theme="light"] .gbz-updates-eyebrow,
  html[data-theme="light"] .gbz-update-type,
  html[data-theme="light"] .gbz-update-date,
  html[data-theme="light"] .gbz-updates-status {
    display: none !important;
  }

  html[data-theme="light"] #about-ghostbladezero > p,
  html[data-theme="light"] .gbz-update-body {
    color: #68727a !important;
    text-shadow: none !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
  }

  html[data-theme="light"] .gbz-update-viewport,
  html[data-theme="light"] .gbz-update-frame,
  html[data-theme="light"] .gbz-update-slide {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html[data-theme="light"] .gbz-update-frame::before,
  html[data-theme="light"] .gbz-update-slide::before,
  html[data-theme="light"] .gbz-update-slide::after {
    display: none !important;
    content: none !important;
  }

  /* Existing overlay remains usable but visually secondary */
  html[data-theme="light"] .tool-overlay {
    background: rgba(55,61,67,.14) !important;
    backdrop-filter: blur(12px) !important;
  }

  html[data-theme="light"] .overlay-content {
    border: 1px solid var(--gbz-v9-line-strong) !important;
    border-radius: 18px !important;
    background: rgba(252,253,253,.98) !important;
    box-shadow: 0 28px 88px rgba(34,40,45,.15) !important;
  }

  @media (max-width: 1120px) {
    html[data-theme="light"] .gbz-launcher-grid {
      grid-template-columns: repeat(3, minmax(0,1fr));
    }
  }

  @media (max-width: 900px) {
    html[data-theme="light"] .gbz-launcher-grid {
      grid-template-columns: repeat(2, minmax(0,1fr));
    }
  }
}

/* hidden outside desktop light */
#gbz-light-launcher {
  display: none;
}
/* GBZ LIGHT LAUNCHER V9 END */

/* GBZ LIGHT SIGIL CURSOR V2 START */
@media (min-width: 769px) {
  /*
    Force the sigil across the entire desktop Light UI.
    Some existing components had their own cursor declarations,
    which caused the custom cursor to disappear intermittently.
  */
  html[data-theme="light"],
  html[data-theme="light"] body,
  html[data-theme="light"] body * {
    cursor: url("/assets/cursors/upper-city-sigil.png") 12 6, auto !important;
  }

  /* Keep normal text editing behavior where precision matters. */
  html[data-theme="light"] input[type="text"],
  html[data-theme="light"] input[type="search"],
  html[data-theme="light"] input[type="email"],
  html[data-theme="light"] input[type="url"],
  html[data-theme="light"] input[type="password"],
  html[data-theme="light"] textarea,
  html[data-theme="light"] [contenteditable="true"] {
    cursor: text !important;
  }
}
/* GBZ LIGHT SIGIL CURSOR V2 END */

/* GBZ CHOOSE BLADE HIGHLIGHT V3 START */
@media (min-width: 769px) {
  html[data-theme="light"] .gbz-launcher-card.tool-highlight {
    border-color: rgba(114,10,18,.32) !important;
    background: #fff !important;
    box-shadow:
      0 24px 58px rgba(34,40,45,.07),
      0 0 32px rgba(255,255,255,.98),
      inset 0 -2px 0 rgba(114,10,18,.48) !important;
  }

  html[data-theme="light"] .gbz-launcher-card.tool-highlight::before {
    opacity: .92 !important;
    animation: gbz-v9-flow 1.3s cubic-bezier(.22,.7,.28,1) both !important;
  }

  html[data-theme="light"] .gbz-launcher-card.tool-highlight::after {
    color: var(--gbz-v9-blood) !important;
  }
}
/* GBZ CHOOSE BLADE HIGHLIGHT V3 END */
