/* Social tools over the living KnockSpace world. Load after grand-opening.css.
   Visual overrides only: existing handlers, hidden flags and capture areas stay intact. */
:is(#ks-go-bar, #ks-go-elepod-pop, #ks-go-hub, #ks-go-composer,
    #ks-go-lightbox, #ks-go-blog-reader, #ks-go-profile-modal, #ks-go-studio,
    #ks-go-toast) {
  --go-font-display: Inter, "Segoe UI", Arial, sans-serif;
  --go-font-hand: Inter, "Segoe UI", Arial, sans-serif;
  --go-font-body: Inter, "Segoe UI", Arial, sans-serif;
  --go-ink: #fff;
  --go-gold: #fff;
  --go-mint: #a8eeff;
  --go-muted: #e6edf0;
  --go-shadow: 0 1px 1px #000;
  color: var(--go-ink);
  font: 500 18px/1.5 var(--go-font-body) !important;
  letter-spacing: 0 !important;
  text-shadow: var(--go-shadow) !important;
  -webkit-text-stroke: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:is(#ks-go-bar, #ks-go-elepod-pop, #ks-go-hub, #ks-go-composer,
    #ks-go-lightbox, #ks-go-blog-reader, #ks-go-profile-modal, #ks-go-studio) * {
  box-sizing: border-box;
  font-family: var(--go-font-body) !important;
  font-weight: 500 !important;
  font-synthesis: none !important;
  letter-spacing: 0 !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: var(--go-shadow) !important;
  -webkit-font-smoothing: antialiased;
}

:is(#ks-go-bar, #ks-go-elepod-pop, #ks-go-hub, #ks-go-composer,
    #ks-go-lightbox, #ks-go-blog-reader, #ks-go-profile-modal, #ks-go-studio)
  :is(p, span, small, div, label, input, textarea, select, button, a, summary) {
  font-size: 18px !important;
  line-height: 1.5 !important;
}

:is(#ks-go-elepod-pop, #ks-go-hub, #ks-go-composer,
    #ks-go-lightbox, #ks-go-blog-reader, #ks-go-profile-modal)
  :is(.ks-hub-head, .ks-hub-body, .ks-post-card, .ks-addon-card,
      .ks-modal-card, .ks-kiosk-stage, .ks-kiosk-sidebar, .ks-comments-box,
      .ks-comment-item, .ks-post-media-btn) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#ks-go-hub { max-width: 1440px; margin-inline: auto; }
#ks-go-hub .ks-hub-head { gap: 12px 28px; padding-bottom: 20px; }
#ks-go-hub .ks-hub-title { flex-wrap: wrap; gap: 4px 24px; }
#ks-go-hub :is(.ks-hub-nav, .ks-feed-filters, .ks-post-actions) {
  align-items: center;
  gap: 8px 24px;
}
#ks-go-hub .ks-hub-body { padding-inline: 0; }
#ks-go-hub .ks-posts-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 40px;
}
#ks-go-hub :is(.ks-post-card, .ks-addon-card) { gap: 12px; padding-block: 8px 24px; }
#ks-go-hub .ks-post-head { align-items: flex-start; gap: 16px; }
#ks-go-hub .ks-post-text { line-height: 1.65 !important; }
#ks-go-hub .ks-post-meta small { color: var(--go-muted); }
#ks-go-hub .ks-post-meta strong { font-size: 20px !important; font-weight: 600 !important; }
#ks-go-hub .ks-comment-item { padding-left: 0; margin-top: 16px; }
#ks-go-hub .ks-comment-form { flex-wrap: wrap; align-items: baseline; }
#ks-go-hub .ks-comment-form input { min-width: min(100%, 180px); }

:is(#ks-go-elepod-pop, #ks-go-hub, #ks-go-composer,
    #ks-go-lightbox, #ks-go-blog-reader, #ks-go-profile-modal) :is(h2, h3) {
  color: #fff !important;
  font-size: clamp(24px, 2vw, 30px) !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

:is(#ks-go-bar, #ks-go-elepod-pop, #ks-go-hub, #ks-go-composer,
    #ks-go-lightbox, #ks-go-blog-reader, #ks-go-profile-modal, #ks-go-studio)
  :is(button, a, summary, .ks-room-chip) {
  min-height: 44px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-transform: none !important;
}

:is(#ks-go-bar, #ks-go-elepod-pop, #ks-go-hub, #ks-go-composer,
    #ks-go-lightbox, #ks-go-blog-reader, #ks-go-profile-modal, #ks-go-studio)
  :is(button, a, summary):is(:hover, :focus-visible) {
  color: #a8eeff !important;
  text-decoration: underline;
  transform: none !important;
}

:is(#ks-go-bar, #ks-go-elepod-pop, #ks-go-hub, #ks-go-composer,
    #ks-go-lightbox, #ks-go-blog-reader, #ks-go-profile-modal, #ks-go-studio)
  :is(button, a, summary):focus-visible {
  outline: 1px solid #a8eeff;
  outline-offset: 4px;
}

#ks-go-hub :is(.ks-hub-tab, .ks-filter-btn, .ks-go-pill, .ks-act-btn).active,
#ks-go-hub .ks-act-btn.on { color: #a8eeff !important; text-decoration: underline; }
#ks-go-hub .ks-act-btn.loved { color: #ffb6da !important; }

:is(#ks-go-composer, #ks-go-profile-modal, #ks-go-blog-reader, #ks-go-lightbox)
  .ks-modal-card {
  padding: 16px;
  gap: 20px;
  max-height: calc(100dvh - 48px);
  overscroll-behavior: contain;
}
:is(#ks-go-composer, #ks-go-profile-modal) .ks-modal-card label {
  font-size: 18px !important;
  line-height: 1.5 !important;
  gap: 8px;
  color: #fff;
}
:is(#ks-go-composer, #ks-go-profile-modal) .ks-modal-card strong {
  font-size: 22px !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
}
#ks-go-blog-reader .ks-modal-card p { font-size: 20px !important; line-height: 1.7 !important; }

/* Only the fields receive a restrained contrast surface. No modal wall. */
:is(#ks-go-elepod-pop, #ks-go-hub, #ks-go-composer, #ks-go-profile-modal)
  :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select) {
  color: #fff !important;
  background: rgba(0, 0, 0, .16) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .55) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 10px 6px !important;
  min-height: 44px;
  max-width: 100%;
}
:is(#ks-go-hub, #ks-go-composer, #ks-go-profile-modal) :is(input, textarea)::placeholder {
  color: #e6edf0 !important;
  opacity: 1;
}
:is(#ks-go-hub, #ks-go-composer, #ks-go-profile-modal) :is(input, textarea, select):focus-visible {
  outline: 1px solid #a8eeff;
  outline-offset: 3px;
}
:is(#ks-go-composer, #ks-go-profile-modal) option {
  background: #102329;
  color: #fff;
}

#ks-go-hub .ks-map-node text {
  font-size: 16px !important;
  stroke: none !important;
  stroke-width: 0 !important;
  paint-order: normal;
  fill: #fff;
}
#ks-go-hub :is(.ks-kiosk-thumb, .ks-post-media-btn) { border-radius: 0 !important; box-shadow: none !important; }
#ks-go-lightbox :is(img, video) { background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }

/* The embedded app owns its content; the parent contributes no opaque stage. */
#ks-go-studio, #ks-go-studio .ks-studio-bar, #ks-studio-iframe {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
#ks-go-studio .ks-studio-bar { flex-wrap: wrap; padding: 8px 24px; gap: 4px 24px; }
#ks-go-studio .ks-studio-bar > div { flex-wrap: wrap; }
#ks-go-studio #ks-studio-title { font-size: 20px !important; font-weight: 600 !important; }

@media (max-width: 700px) {
  #ks-go-hub { left: 16px; right: 16px; top: 64px; bottom: 32px; }
  #ks-go-hub .ks-posts-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  #ks-go-hub .ks-hub-head { gap: 8px; padding-bottom: 12px; }
  #ks-go-hub :is(.ks-hub-nav, .ks-feed-filters, .ks-post-actions) { gap: 4px 18px; }
  #ks-go-hub .ks-search-input { width: 100%; min-width: 0; }
  #ks-go-studio .ks-studio-bar { padding-inline: 16px; }
  :is(#ks-go-composer, #ks-go-profile-modal, #ks-go-blog-reader, #ks-go-lightbox) .ks-modal-card { padding: 8px; }
}
