﻿/* ================================================================
   Afrawbeats Sketch System — custom font + uneven white boxes/lines
   Uses hollow frames (border-image) + kit capsules/rules/icons
   ================================================================ */

@font-face {
  font-family: 'AfrawSketch';
  src: url('/assets/fonts/AfrawSketchUI.ttf?v=1') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* The source font contains broken punctuation drawings. Preserve the original
     hand lettering for letters/numbers and let the system fallback render
     commas, periods, slashes, quotes, and other punctuation cleanly. */
  unicode-range: U+0030-0039, U+0041-005A, U+0061-007A;
}

:root {
  --font-family-title: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  --font-family-body: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  --font-comic-title: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  --font-comic-body: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  --font-family-mono: 'AfrawSketch', Arial, Helvetica, sans-serif !important;

  /* Extra Sketchy sheet → thin hollow frames (cache-bust filenames) */
  --sketch-rule: url('assets/sketch-ui/rule.png?v=extra3');
  --sketch-rule-short: url('assets/sketch-ui/rule-short.png?v=extra3');
  --sketch-rule-tiny: url('assets/sketch-ui/rule-tiny.png?v=extra3');
  --sketch-box: url('assets/sketch-ui/box-wide.png?v=extra3');
  --sketch-box-sm: url('assets/sketch-ui/box-sm.png?v=extra3');
  --sketch-box-sq: url('assets/sketch-ui/box-sm.png?v=extra3');
  --sketch-capsule: url('assets/sketch-ui/capsule.png?v=extra3');
  --sketch-capsule-sm: url('assets/sketch-ui/capsule-sm.png?v=extra3');
  --sketch-bubble: url('assets/sketch-ui/bubble.png?v=extra3');
  --sketch-frame-w: 18px;
  --sketch-frame-w-sm: 14px;
  --sketch-slice: 48;
  --sketch-slice-sm: 40;
  --sketch-slice-sq: 40;
  --sketch-slice-cap: 20;
}

/* ---------- Typeface everywhere ---------- */
html, body, button, input, select, textarea, option,
h1, h2, h3, h4, h5, h6, p, a, span, label, li, td, th,
.nav-link, .phone-btn, .comic-input, .comic-panel,
.feed-title, .feed-artist, .feed-caption, .feed-action-label,
.sidebar-nav, .live-chat-header, .chat-messages, .msg,
.story-item, .inbox-name, .inbox-preview, .su-info,
#global-toast,
.following-header, .f-name, .f-sub {
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.035em;
}

/* Keep icon fonts readable — AfrawSketch has no emoji/FA glyphs */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands,
i[class*="fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
  letter-spacing: 0 !important;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Yellow plates → black ink */
.left-sidebar .nav-link:hover,
.left-sidebar .nav-link.active,
.sidebar-user-profile:hover,
.follow-item:hover,
.btn-yellow,
button[style*="comic-yellow"],
.comic-starburst,
.badge-on-yellow,
.phone-btn.primary {
  color: #000 !important;
}

/* ================================================================
   Sketch frames via border-image (corners stay intact while edges scale)
   ================================================================ */
.sketch-frame,
.comic-panel,
.feed-card,
.liked-post-card,
.inbox-item,
.chat-overlay-modal,
#comments-modal,
#post-viewer-modal,
#story-recorder-modal,
#create-picker-modal,
#trending-modal,
#top-artists-modal,
.ver-panel,
.launcher-card,
.contract-container {
  border-style: solid !important;
  border-color: transparent !important;
  border-width: var(--sketch-frame-w) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  border-image-source: var(--sketch-box) !important;
  border-image-slice: var(--sketch-slice) !important;
  border-image-width: var(--sketch-frame-w) !important;
  border-image-repeat: stretch !important;
  border-image-outset: 0 !important;
  animation: none !important;
}

/* Compact controls — smaller hollow box (NOT chat .msg — those need readable text) */
.sidebar-search,
.chat-input-area,
.chat-overlay-input,
textarea.comic-input,
.form-group:has(.comic-input),
.phone-btn {
  border-style: solid !important;
  border-color: transparent !important;
  border-width: var(--sketch-frame-w-sm) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  border-image-source: var(--sketch-box-sm) !important;
  border-image-slice: var(--sketch-slice-sm) !important;
  border-image-width: var(--sketch-frame-w-sm) !important;
  border-image-repeat: stretch !important;
  animation: none !important;
}

/* Square / capsule chrome for actions + nav */
.sketch-action-btn {
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-image-source: var(--sketch-box-sq) !important;
  border-image-slice: var(--sketch-slice-sq) !important;
  border-image-width: 10px !important;
  border-image-repeat: stretch !important;
}

.left-sidebar .nav-link:hover,
.left-sidebar .nav-link.active,
.phone-btn.primary {
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-image-source: var(--sketch-capsule) !important;
  border-image-slice: var(--sketch-slice-cap) !important;
  border-image-width: 10px !important;
  border-image-repeat: stretch !important;
}

/* Native inputs: no border-image (parent frames them) */
input.comic-input,
#chat-thread-input,
#live-chat-input,
#sidebar-search-input,
.chat-overlay-input input {
  border: none !important;
  border-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.form-group:has(input.comic-input),
.form-group:has(textarea.comic-input),
.chat-overlay-input {
  position: relative;
}

/* Kill solid/CSS borders that fight the sketch frames */
.left-sidebar,
.right-sidebar,
.center-content-area,
.chat-header,
.live-chat-header,
.feed-actions,
.sidebar-logo,
.sidebar-user-profile,
.fc-header,
.fc-footer,
.feed-bottom .inline-comments-section {
  border-color: transparent !important;
  box-shadow: none !important;
}

.comic-panel:hover,
.feed-card:hover,
.launcher-card:hover:not(.clicked-zoom) {
  transform: none !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Intro logo click: sketch frames must not kill the launch zoom */
.launcher-card.clicked-zoom,
.launcher-card.clicked-zoom:hover {
  animation: zoomOutEverything 0.8s ease-in forwards !important;
}

/* Nav default: clean; active/hover get sketch capsule + yellow fill */
.left-sidebar .nav-link {
  background: transparent !important;
  margin: 2px 8px;
  padding: 10px 14px !important;
  border: none !important;
  border-image: none !important;
  box-shadow: none !important;
}
.left-sidebar .nav-link:hover,
.left-sidebar .nav-link.active {
  background: var(--comic-yellow) !important;
  color: #000 !important;
}
.left-sidebar .nav-link:hover img,
.left-sidebar .nav-link.active img,
.left-sidebar .nav-link:hover .sketch-icon,
.left-sidebar .nav-link.active .sketch-icon {
  filter: none !important;
  mix-blend-mode: normal !important;
}

.phone-btn.primary,
button[style*="comic-yellow"] {
  background-color: var(--comic-yellow) !important;
  color: #000 !important;
  overflow: visible;
}

/* Feed action stack */
.sketch-action-btn {
  width: 48px !important;
  height: 48px !important;
  background: var(--comic-yellow) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  overflow: visible !important;
}
.sketch-action-btn img {
  filter: none !important;
  mix-blend-mode: normal !important;
  width: 22px;
  height: 22px;
}

/* DM bubbles — NO border-image. box-sm/bubble PNGs have opaque fill + thick
   slices that paint over short .msg.self text. Use a light sketch outline. */
#chat-messages-container .msg,
#chat-messages-container .msg.self,
.msg,
.msg.self {
  border: none !important;
  border-width: 0 !important;
  border-image: none !important;
  border-image-source: none !important;
  border-radius: 4px !important;
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.9),
    -1px 0 0 rgba(255, 255, 255, 0.75),
    0 1px 0 rgba(255, 255, 255, 0.85),
    0 -1px 0 rgba(255, 255, 255, 0.7),
    2px 2px 0 rgba(255, 255, 255, 0.35) !important;
  outline: none !important;
  padding: 10px 14px !important;
  max-width: min(78%, 28rem);
  background: rgba(255, 255, 255, 0.06) !important;
  overflow: visible !important;
  color: #fff !important;
  position: relative;
  z-index: 1;
  box-sizing: border-box !important;
  line-height: 1.35 !important;
  word-break: break-word;
}
#chat-messages-container .msg.self,
.msg.self {
  background: rgba(255, 230, 0, 0.18) !important;
  color: #fff !important;
}

/* ---------- Uneven divider rules (kit + lines sheet) ---------- */
.following-header,
.live-chat-header,
.sidebar-logo,
.fc-header,
.fc-footer {
  border: none !important;
  border-image: none !important;
}
.following-header::after,
.live-chat-header::after,
.fc-header::after {
  content: '';
  display: block;
  width: 100%;
  height: 11px;
  margin-top: 0.4rem;
  background: var(--sketch-rule) center / 100% 100% no-repeat;
  pointer-events: none;
}
.fc-footer::before {
  content: '';
  display: block;
  width: 100%;
  height: 9px;
  margin-bottom: 0.45rem;
  background: var(--sketch-rule-short) center / 100% 100% no-repeat;
  pointer-events: none;
}

.sidebar-user-profile {
  /* In-flow flex footer — always visible once the sidebar is viewport-capped.
     (Absolute bottom failed when CSS Grid grew the column past 100vh.) */
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  margin-top: auto !important;
  border: none !important;
  border-image: none !important;
  background: var(--bg-panel, #0f0f12) !important;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0)) !important;
  z-index: 30 !important;
  box-shadow: 0 -14px 28px rgba(0, 0, 0, 0.55);
}
.sidebar-user-profile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 11px;
  background: var(--sketch-rule) center / 100% 100% no-repeat;
  opacity: 0.9;
  pointer-events: none;
}

.chat-input-area {
  margin-top: 0.35rem;
  padding: 10px !important;
}
.feed-actions {
  border: none !important;
  border-image: none !important;
}

/* Side column: pin profile to bottom; middle scrolls.
   grid-template-rows: minmax(0,1fr) + min-height:0 stops Grid from growing
   the row to full content height (that was pushing the profile below the fold). */
.app-wrapper {
  min-height: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
}
.left-sidebar,
.center-content-area,
.right-sidebar {
  min-height: 0 !important;
  max-height: 100% !important;
  height: 100% !important;
  align-self: stretch !important;
}
.left-sidebar {
  position: relative;
  border-right: none !important;
  border-image: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}
.left-sidebar::after {
  content: '';
  position: absolute;
  top: 3%;
  bottom: 3%;
  right: 0;
  width: 7px;
  background: url('assets/sketch-ui/rule-v.png?v=extra2') center / 100% 100% no-repeat;
  pointer-events: none;
  opacity: 0.85;
  z-index: 2;
}
.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* Profile is in-flow below this scroller — light pad only */
  padding-bottom: 12px !important;
  box-sizing: border-box;
}
.left-sidebar .nav-link {
  font-size: 1.15rem !important;
  padding: 10px 12px !important;
  gap: 0.65rem;
}
.left-sidebar .nav-link .sketch-icon {
  width: 44px !important;
  height: 44px !important;
}
.nav-section-label {
  padding-top: 0.55rem !important;
  padding-bottom: 0.2rem !important;
}
.sidebar-logo {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100%;
  padding: 0.85rem 1rem 0.65rem !important;
  margin: 0 auto 0.35rem !important;
  flex-shrink: 0;
  height: auto !important;
  max-height: none;
  cursor: pointer;
  box-sizing: border-box;
}
.sidebar-logo::after {
  content: none !important;
  display: none !important;
}
.sidebar-logo-img {
  display: block !important;
  width: calc(100% - 24px) !important;
  max-width: 220px !important;
  height: auto !important;
  margin: 0 auto !important;
  object-fit: contain;
  filter: invert(1) !important;
  mix-blend-mode: screen;
}
.sidebar-following {
  margin-top: 1rem !important;
  padding: 0 1rem 0.75rem !important;
}
.following-header {
  flex-wrap: wrap;
}
.following-header .squiggly-line {
  display: none !important;
}
.right-sidebar {
  position: relative;
  border-left: none !important;
  border-image: none !important;
  padding: 0.5rem;
  isolation: isolate;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-height: 0 !important;
}
.right-sidebar::before {
  content: '';
  position: absolute;
  top: 3%;
  bottom: 3%;
  left: 0;
  width: 7px;
  background: url('assets/sketch-ui/rule-v.png') center / 100% 100% no-repeat;
  pointer-events: none;
  opacity: 0.85;
  z-index: 2;
}
/* Outer sketch frame for live-chat column */
.right-sidebar::after {
  content: '';
  position: absolute;
  inset: 2px;
  pointer-events: none;
  z-index: 0;
  border-style: solid;
  border-color: transparent;
  border-width: 14px;
  border-image-source: var(--sketch-box);
  border-image-slice: 28;
  border-image-width: 14px;
  border-image-repeat: stretch;
  opacity: 0.95;
}
.right-sidebar > * {
  position: relative;
  z-index: 1;
}

/* Live chat: column top→bottom = oldest→newest (no spacer / no reverse) */
.right-sidebar .chat-messages,
#global-live-chat.chat-messages {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  gap: 0.4rem !important;
  padding: 0.85rem 1rem !important;
  min-height: 0;
  flex: 1 1 auto !important;
  height: auto !important;
}
.live-chat-spacer {
  display: none !important;
}
.right-sidebar .chat-messages::-webkit-scrollbar {
  width: 4px;
}
.right-sidebar .chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
}
.live-chat-line {
  flex: 0 0 auto !important;
  line-height: 1.35;
  word-break: break-word;
}

/* Corner accents pinned to the center shell viewport (do not scroll with content) */
.center-content-area {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  height: 100%;
  min-height: 0;
}
.center-content-area > .phone-screen-content.active {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.center-content-area > .phone-screen-content.profile-screen.active {
  overflow: hidden !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  padding-bottom: 0 !important;
}
.center-content-area::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background-image:
    url('assets/sketch-ui/corner-tl.png'),
    url('assets/sketch-ui/corner-tr.png'),
    url('assets/sketch-ui/corner-bl.png'),
    url('assets/sketch-ui/corner-br.png');
  background-repeat: no-repeat;
  background-size: 40px 40px;
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
}

.sidebar-search {
  padding: 0.45rem 0.65rem !important;
  margin: 0 1.1rem 1.1rem !important;
  background: rgba(255, 255, 255, 0.03) !important;
  align-items: center !important;
  min-height: 72px;
  gap: 0.15rem;
}
/* Force big search sprite — wins over any earlier 22px rule */
.sidebar-search .sidebar-search-icon.sketch-icon,
.sidebar-search .sidebar-search-icon {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  margin: 0 2px 0 0 !important;
  object-fit: contain !important;
  filter: invert(1) !important;
  mix-blend-mode: screen !important;
}

/* FA glyphs white by default; BLACK on any yellow surface */
.fa-solid, .fa-regular, .fa-brands { color: #fff !important; }
.left-sidebar .nav-link:hover .fa-solid,
.left-sidebar .nav-link.active .fa-solid,
.btn-yellow .fa-solid,
.btn-yellow .fa-regular,
button[style*="comic-yellow"] .fa-solid,
button[style*="comic-yellow"] .fa-regular,
button[style*="--comic-yellow"] .fa-solid,
button[style*="--comic-yellow"] .fa-regular,
.phone-btn.primary .fa-solid,
.phone-btn.primary .fa-regular,
.phone-btn:hover .fa-solid,
.phone-btn:hover .fa-regular,
button:hover > .fa-solid,
button:hover > .fa-regular,
button:hover > i,
.sketch-action-btn .fa-solid,
.sketch-action-btn .fa-regular,
.sketch-action-btn i,
.icon-on-yellow,
.icon-on-yellow.fa-solid,
.icon-on-yellow.fa-regular,
.district-card:hover .fa-solid,
.district-card:hover .fa-regular,
.badge-on-yellow,
.comic-starburst {
  color: #000 !important;
}

#sidebar-inbox-badge,
.sidebar-inbox-badge {
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  font-size: 1.15rem !important;
  background: var(--comic-yellow) !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  position: relative;
  z-index: 2;
}

.theme-picker-options {
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.theme-picker-options button {
  border-radius: 0 !important;
}
.custom-tag-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}
.custom-tag-entry .comic-input {
  min-width: 0;
  min-height: 44px;
}
.custom-tag-entry .phone-btn {
  min-height: 44px;
  margin: 0;
}

.radio-nav-icon {
  object-fit: contain;
  object-position: center;
}

.feed-card {
  overflow: visible !important;
  margin: 10px 6px 18px !important;
  background: var(--bg-panel) !important;
}
.feed-card-artwork {
  border-radius: 0 !important;
}

.sidebar-user-profile:hover,
.follow-item:hover {
  background: var(--comic-yellow) !important;
  color: #000 !important;
}

/* ---------- Nav IA + beta polish ---------- */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0.35rem 0.5rem;
}

.nav-section-label {
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.08em !important;
  color: rgba(255, 255, 255, 0.45) !important;
  padding: 0.85rem 1.1rem 0.35rem !important;
  text-transform: uppercase;
  pointer-events: none;
}

.nav-section-rule {
  height: 12px;
  margin: 0.45rem 0.85rem 0.2rem;
  background: var(--sketch-rule-short) center / 100% 100% no-repeat;
  opacity: 0.7;
  pointer-events: none;
}

/* Stories strip + profile wall sketch dividers */
.stories-strip {
  border-bottom: none !important;
  position: relative;
  padding-bottom: 1.35rem !important;
  margin-bottom: 0.85rem !important;
}
.stories-strip::after {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 2px;
  height: 12px;
  background: var(--sketch-rule) center / 100% 100% no-repeat;
  opacity: 0.85;
  pointer-events: none;
}

.profile-wall-section {
  position: relative;
  margin-top: 8px;
  padding: 14px 0 24px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.profile-wall-section::before {
  content: '';
  display: block;
  width: 92%;
  max-width: none;
  height: 12px;
  margin: 0 auto 12px;
  background: var(--sketch-rule) center / 100% 100% no-repeat;
  opacity: 0.85;
}
.profile-wall-label {
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  color: var(--comic-yellow);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.profile-wall-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 10px 14px !important;
  box-sizing: border-box;
}
.wall-preview {
  position: relative !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 12px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-image-source: var(--sketch-box-sm) !important;
  border-image-slice: var(--sketch-slice-sm) !important;
  border-image-width: 12px !important;
  border-image-repeat: stretch !important;
  background: #111116 !important;
  overflow: hidden !important;
  width: 100%;
  min-width: 0;
  box-sizing: border-box !important;
}
.wall-preview:hover {
  transform: translate(-1px, -1px) !important;
  box-shadow: none !important;
}
.wall-preview-media {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.wall-preview video.wall-preview-media {
  background: #000;
  object-fit: cover !important;
}

/* Browsers only permit automatic video playback while muted. This visible,
   finger-sized control lets the viewer opt into sound with one deliberate tap. */
.post-video-sound-toggle {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 8;
  min-height: 44px;
  max-width: calc(100% - 24px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-family: var(--font-family-body);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 3px 3px 0 var(--comic-ink);
  touch-action: manipulation;
}

.post-video-sound-toggle.is-audible {
  border-color: var(--comic-ink);
  background: var(--comic-yellow);
  color: var(--comic-ink);
}

.post-video-sound-toggle--compact {
  left: 8px;
  bottom: 8px;
  min-width: 44px;
  max-width: calc(100% - 16px);
  padding: 8px 10px;
  font-size: 0.68rem;
}

/* Personal radio: liked audio posts become a playable, persistent station. */
.music-player-widget {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 64px;
  gap: 8px !important;
  padding: 10px 12px !important;
  flex-wrap: nowrap !important;
  overflow: hidden;
  cursor: default !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.music-player-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--comic-yellow);
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.08);
  cursor: pointer;
}

.music-player-mark img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain;
}

.music-player-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.music-player-controls button,
.radio-control-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--comic-ink);
  border-radius: 3px;
  background: var(--bg-panel);
  color: var(--comic-ink);
  cursor: pointer;
  touch-action: manipulation;
}

.music-player-controls button:hover,
.music-player-controls button:focus-visible,
.radio-control-btn:hover,
.radio-control-btn:focus-visible,
.radio-control-btn--primary {
  background: var(--comic-yellow);
  color: #000;
}

.personal-radio-controls {
  margin: 0 15px 16px;
  padding: 14px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-panel) !important;
}

.personal-radio-now-playing {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-left: 6px;
  color: var(--text-main);
}

.personal-radio-now-playing strong,
.personal-radio-now-playing span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-radio-now-playing span {
  color: var(--text-mute);
  font-size: 0.76rem;
}

.personal-radio-queue {
  padding: 0 15px 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.personal-radio-track {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 11px;
  padding: 7px 9px;
  border: 2px solid var(--comic-ink);
  border-radius: 3px;
  background: var(--bg-panel);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.personal-radio-track.is-current {
  border-color: var(--comic-yellow);
  box-shadow: inset 5px 0 0 var(--comic-yellow);
}

.personal-radio-track img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--comic-ink);
  background: var(--bg-surface);
}

.personal-radio-track-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.personal-radio-track-copy strong,
.personal-radio-track-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-radio-track-copy small {
  color: var(--text-mute);
}

.personal-radio-track-play {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--comic-yellow);
  color: #000;
}

.personal-radio-empty {
  padding: 22px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-mute);
  text-align: center;
  background: var(--bg-panel) !important;
}

.personal-radio-empty > i {
  color: var(--comic-yellow) !important;
  font-size: 1.8rem;
}

@media (max-width: 1100px) {
  .music-player-widget {
    gap: 6px !important;
    padding: 8px 10px !important;
  }

  .music-player-controls button:nth-child(1),
  .music-player-controls button:nth-child(4) {
    display: none;
  }
}

@media (max-width: 600px) {
  .post-video-sound-toggle {
    left: 10px;
    bottom: 10px;
    min-height: 46px;
    padding: 10px 12px;
  }

  .post-video-sound-toggle--compact span {
    display: none;
  }
}

@media (max-width: 600px) {
  .profile-wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 0 8px 8px !important;
  }
}

.beta-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  font-size: 0.62rem !important;
  letter-spacing: 0.02em;
  vertical-align: middle;
  border: 1.5px solid rgba(255, 215, 0, 0.65);
  color: var(--comic-yellow) !important;
  border-radius: 2px;
  line-height: 1.3;
}

.left-sidebar .nav-link:hover .beta-flag,
.left-sidebar .nav-link.active .beta-flag {
  border-color: #000;
  color: #000 !important;
}

.left-sidebar .nav-link {
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease !important;
  cursor: pointer;
}

.left-sidebar .nav-link:active,
.mobile-bottom-nav .nav-item:active,
.sidebar-user-profile:active {
  transform: scale(0.97) translateY(1px) !important;
}

.phone-screen-content.active {
  animation: screenIn 0.28s ease;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.beta-banner {
  margin: 0 15px 14px;
  padding: 10px 12px;
  color: var(--text-mute);
  font-size: 0.85rem;
  line-height: 1.4;
  background: rgba(255, 215, 0, 0.06);
}

/* ---------- Mobile / tablet / iPad adaptation ---------- */
.mobile-bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 900;
}

.mobile-more-sheet[hidden] {
  display: none !important;
}

.mobile-more-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mobile-more-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.mobile-more-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  margin: 0;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom, 0));
  background: var(--bg-panel) !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: moreSheetUp 0.22s ease;
}

@keyframes moreSheetUp {
  from { transform: translateY(18px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.mobile-more-title {
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  color: var(--comic-yellow);
  font-size: 1.15rem;
  padding: 4px 8px 10px;
}

.mobile-more-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: none;
  border-image: none;
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  font-size: 1.05rem;
  cursor: pointer;
}

.mobile-more-link:active {
  background: var(--comic-yellow);
  color: #000;
}

/* Mobile live chat: right sidebar is display:none under 1024px — reopen as overlay */
.mobile-live-chat-close {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-open-live-chat-btn {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-open-live-chat-btn {
    display: block;
    margin: 0 auto;
    padding: 12px 18px;
    background: var(--comic-yellow);
    color: var(--comic-ink, #111);
    border: none;
    border-radius: 10px;
    font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
    font-size: 1.05rem;
    cursor: pointer;
  }

  .right-sidebar.mobile-live-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 1300;
    background: var(--bg-panel, #111) !important;
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0));
    border: none !important;
    isolation: isolate;
  }

  .right-sidebar.mobile-live-open .live-chat-header {
    flex-shrink: 0;
    padding: 0.85rem 0.75rem;
  }

  .right-sidebar.mobile-live-open .chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
  }

  .right-sidebar.mobile-live-open .chat-input-area {
    flex-shrink: 0;
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
    gap: 8px;
    align-items: center;
  }

  .right-sidebar.mobile-live-open .mobile-live-chat-close {
    display: flex;
  }

  .right-sidebar.mobile-live-open::before {
    display: none;
  }
}

@media (max-width: 767px) {
  .center-content-area {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0));
  }
}

body.mobile-live-chat-open {
  overflow: hidden;
}

/* =====================================================================
   Phone-first feed and livestream
   ===================================================================== */
.comments-modal-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
}

.comments-modal-backdrop[hidden] {
  display: none !important;
}

.comments-sheet-close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}

body.comments-sheet-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .trending-strip {
    flex: 0 0 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    width: 100%;
    padding: 6px 12px !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    font-size: 0.88rem !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .trending-strip::-webkit-scrollbar {
    display: none;
  }

  .trending-strip > * {
    flex: 0 0 auto;
  }

  .for-you-header {
    flex: 0 0 36px;
    min-height: 36px;
    margin: 0 !important;
    font-size: 1rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #feed-container {
    min-height: 0;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
  }

  #feed-container .feed-card {
    overflow: hidden !important;
    margin: 0 !important;
    max-width: none !important;
  }

  #feed-container .feed-bottom {
    max-height: none !important;
    overflow: visible !important;
  }

  #feed-container .feed-actions {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    right: 8px !important;
    gap: 0.62rem !important;
  }

  #feed-container .feed-action-text {
    display: none !important;
  }

  #feed-container .feed-action-count {
    min-height: 12px;
    line-height: 1;
    margin-top: -0.35rem !important;
  }

  #feed-container .sketch-action-btn {
    width: 44px !important;
    height: 44px !important;
  }

  #comments-modal,
  #comments-modal:hover {
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    height: min(72dvh, 620px) !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 20px) !important;
    border-radius: 22px 22px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(13, 13, 17, 0.98) !important;
    box-shadow: 0 -16px 42px rgba(0, 0, 0, 0.7) !important;
  }

  body.afraw-live-active {
    overflow: hidden !important;
  }

  body.afraw-live-active .mobile-bottom-nav,
  body.afraw-live-active #music-player-btn,
  body.afraw-live-active #global-live-banner {
    display: none !important;
  }

  body.afraw-live-active #phone-feed {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1200;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: #000;
  }

  body.afraw-live-active #phone-feed > .stories-strip,
  body.afraw-live-active #phone-feed > .trending-strip,
  body.afraw-live-active #phone-feed > .for-you-header,
  body.afraw-live-active #feed-container {
    display: none !important;
  }

  body.afraw-live-active #live-stream-container {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    scroll-snap-type: none !important;
    background: #000;
  }

  body.afraw-live-active #live-stream-container > .live-video-box {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    aspect-ratio: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.afraw-live-active #live-webcam-preview {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background: #000;
  }

  body.afraw-live-watching #live-webcam-preview.live-video-landscape {
    object-fit: contain !important;
  }

  body.afraw-live-active #live-badge-label {
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    left: 12px !important;
  }

  body.afraw-live-active #live-timer {
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
  }

  body.afraw-live-active #live-end-btn {
    top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    right: 12px !important;
  }

  body.afraw-live-active #live-help-text {
    position: absolute;
    right: 78px;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    z-index: 12;
    margin: 0 !important;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
    color: #fff !important;
    text-align: left !important;
    font-size: 0.82rem;
    pointer-events: none;
  }

  body.afraw-live-active #mobile-open-live-chat-btn {
    position: absolute;
    right: 14px;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    z-index: 13;
    width: 52px;
    height: 52px;
    min-width: 52px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.76);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  }

  body.afraw-live-active #mobile-open-live-chat-btn span {
    display: none;
  }

  body.afraw-live-active #live-unmute-btn {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .feed-card {
    max-width: 680px;
  }
}

/* Live chat: author as clean text link (no yellow button plate) */
.live-chat-user,
.live-chat-user:hover,
.live-chat-user:focus,
.live-chat-user:focus-visible,
.live-chat-user:active {
  display: inline !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  font: inherit !important;
  font-weight: bold !important;
  letter-spacing: inherit !important;
  color: var(--comic-yellow) !important;
  cursor: pointer;
  text-decoration: none !important;
}
.live-chat-user:hover,
.live-chat-user:focus-visible {
  color: #fff !important;
  text-decoration: underline !important;
  text-decoration-color: var(--comic-yellow) !important;
  text-underline-offset: 3px;
}

/* ---------- Districts: public groups ---------- */
.district-tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 8px;
}
.district-tab {
  flex: 1;
  border: none;
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 10px 12px;
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  cursor: pointer;
}
.district-tab.active {
  background: var(--comic-yellow);
  color: #000;
}
.district-chat-messages {
  min-height: 220px;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  padding: 10px;
  margin: 10px 0;
  background: rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.district-chat-msg {
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
}
.district-chat-user {
  color: var(--comic-yellow);
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.district-chat-time {
  color: var(--text-mute);
  font-size: 0.72rem;
  margin-left: 6px;
}
.district-chat-text {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}
.district-chat-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.district-chat-input-row .comic-input {
  flex: 1;
}
.district-chat-section {
  margin-top: 8px;
}
.district-tab.active {
  color: #000 !important;
}
.district-composer .comic-input {
  color: #fff;
}

/* Create-district: name field must be the obvious framed box (not the about textarea) */
.district-create-panel .district-create-label {
  display: block;
  color: var(--text-mute);
  font-size: 0.8rem;
  margin: 0 0 0.35rem;
  font-family: var(--font-comic-body);
}
.district-create-panel .district-create-field {
  margin: 0 0 0.75rem !important;
  width: 100%;
  box-sizing: border-box;
}
.district-create-panel .district-create-field .comic-input {
  width: 100% !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
}
.district-create-panel #district-create-name {
  min-height: 2.6rem;
}

/* ---------- Info: project, team and technical overview ---------- */
.info-page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 20px 15px 34px;
}
.info-page > h2 {
  margin: 0 0 8px;
  color: var(--comic-yellow);
  font-family: var(--font-comic-title);
}
.info-lead {
  margin: 0 0 20px;
  color: var(--text-mute);
  font-size: 0.94rem;
  line-height: 1.55;
}
.info-panel {
  margin-bottom: 22px;
  padding: 18px 20px;
  background: var(--bg-panel);
}
.info-panel h3,
.info-section-title {
  margin: 0 0 12px;
  color: var(--comic-ochre);
  font-family: var(--font-comic-title);
  font-size: 1.15rem;
}
.info-team-list {
  display: grid;
  gap: 14px;
}
.info-team-list p {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(180px, 1.5fr) auto;
  gap: 10px 16px;
  align-items: baseline;
  margin: 0;
  line-height: 1.4;
}
.info-team-list span,
.info-feature-card span,
.info-tech-list,
.info-beta-note {
  color: var(--text-mute);
}
.info-team-list a {
  color: var(--comic-yellow);
  text-underline-offset: 3px;
}
.info-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.info-feature-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 10px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  background: var(--bg-panel);
}
.info-feature-card i {
  grid-row: 1 / span 2;
  color: var(--comic-yellow);
  font-size: 1.2rem;
}
.info-feature-card span {
  font-size: 0.82rem;
  line-height: 1.4;
}
.info-tech-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.45;
}
.info-beta-note {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid currentColor;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .info-feature-grid { grid-template-columns: 1fr; }
  .info-team-list p { grid-template-columns: 1fr; gap: 3px; }
}

/* Human verification step strip — no broken unicode arrows / old comic chrome */
.ver-steps-indicator {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.25rem !important;
  padding: 0.55rem 0.75rem !important;
  background: rgba(0, 0, 0, 0.28) !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: var(--sketch-frame-w-sm) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-image-source: var(--sketch-box-sm) !important;
  border-image-slice: var(--sketch-slice-sm) !important;
  border-image-width: var(--sketch-frame-w-sm) !important;
  border-image-repeat: stretch !important;
}
.ver-step-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text-mute) !important;
  padding: 0.2rem 0.15rem;
  transition: color 0.15s ease;
}
.ver-step-dot .ver-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1.5px solid currentColor;
  border-radius: 0;
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}
.ver-step-dot .ver-step-label {
  white-space: nowrap;
}
.ver-step-dot.active {
  color: var(--comic-yellow) !important;
}
.ver-step-dot.done {
  color: #7dffb0 !important;
}
.ver-step-arrow {
  flex: 0 0 28px;
  width: 28px;
  height: 10px;
  margin: 0 0.15rem;
  background: var(--sketch-rule-short, var(--sketch-rule)) center / 100% 100% no-repeat;
  opacity: 0.85;
  pointer-events: none;
}

/* ================================================================
   Yellow surfaces → black ink (fixes white-on-yellow everywhere)
   theme-override makes button:hover yellow; FA default is white —
   force black text/icons on every yellow plate.
   ================================================================ */
button:hover,
.phone-btn:hover,
.phone-btn.primary,
.btn-yellow,
button[style*="comic-yellow"],
button[style*="--comic-yellow"],
.sketch-action-btn,
.district-card:hover,
.comic-panel.district-card:hover,
.follow-item:hover,
.sidebar-user-profile:hover {
  color: #000 !important;
}

button:hover .fa-solid,
button:hover .fa-regular,
button:hover .fa-brands,
button:hover i,
.phone-btn:hover .fa-solid,
.phone-btn:hover .fa-regular,
.phone-btn:hover i,
.phone-btn.primary .fa-solid,
.phone-btn.primary .fa-regular,
.phone-btn.primary i,
.btn-yellow .fa-solid,
.btn-yellow i,
button[style*="comic-yellow"] .fa-solid,
button[style*="comic-yellow"] i,
button[style*="--comic-yellow"] .fa-solid,
button[style*="--comic-yellow"] i,
.sketch-action-btn .fa-solid,
.sketch-action-btn .fa-regular,
.sketch-action-btn i,
.district-card:hover,
.district-card:hover *,
.comic-panel.district-card:hover,
.comic-panel.district-card:hover *,
.follow-item:hover *,
.sidebar-user-profile:hover * {
  color: #000 !important;
}

.district-card:hover,
.comic-panel.district-card:hover {
  background: var(--comic-yellow) !important;
}

.district-card:hover .beta-flag,
.comic-panel.district-card:hover .beta-flag,
button:hover .beta-flag,
.phone-btn:hover .beta-flag {
  border-color: #000 !important;
  color: #000 !important;
}

/* Pink delete plates stay white ink; on hover they become yellow → black */
.wall-delete-btn .fa-solid,
.btn-delete-chat {
  color: #fff !important;
}
.wall-delete-btn:hover,
.wall-delete-btn:hover .fa-solid,
.btn-delete-chat:hover,
.btn-delete-chat:hover .fa-solid {
  color: #000 !important;
}

/* Sketch PNG icons on yellow / yellow-hover must be solid black lines */
button:hover .sketch-icon,
.phone-btn:hover .sketch-icon,
.phone-btn.primary .sketch-icon,
.btn-yellow .sketch-icon,
button[style*="comic-yellow"] .sketch-icon,
button[style*="--comic-yellow"] .sketch-icon,
.sketch-action-btn img,
.sketch-action-btn .sketch-icon {
  filter: none !important;
  mix-blend-mode: normal !important;
}

/* Live-chat names must never pick up global button:hover yellow plates */
button.live-chat-user,
button.live-chat-user:hover,
button.live-chat-user:focus,
button.live-chat-user:focus-visible,
button.live-chat-user:active {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-image: none !important;
  box-shadow: none !important;
  color: var(--comic-yellow) !important;
  transform: none !important;
  padding: 0 !important;
}
button.live-chat-user:hover,
button.live-chat-user:focus-visible {
  color: #fff !important;
}

/* Profile: compact action chips (index.css forces .phone-btn { width:100% }) */
.profile-action-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  align-items: center !important;
  justify-content: flex-start !important;
  max-width: 720px;
  width: 100%;
}
#phone-profile-view .profile-action-row .phone-btn,
#phone-public-profile .profile-action-row .phone-btn,
.profile-action-row .profile-action-btn,
.profile-action-row > .phone-btn {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: auto !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: inline-flex !important;
  align-self: flex-start !important;
}
/* Yellow primary chips (Upload / Message / Following): black ink only */
#phone-profile-view .profile-action-row .phone-btn.primary,
#phone-public-profile .profile-action-row .phone-btn.primary,
.profile-action-row > .phone-btn.primary,
.profile-action-row > #btn-follow-user.is-following,
#phone-public-profile #btn-follow-user.is-following {
  background: var(--comic-yellow) !important;
  color: #000 !important;
}
#phone-profile-view .profile-action-row .phone-btn.primary,
#phone-public-profile .profile-action-row .phone-btn.primary,
#phone-profile-view .profile-action-row .phone-btn.primary *,
#phone-public-profile .profile-action-row .phone-btn.primary *,
#phone-profile-view .profile-action-row .phone-btn.primary .fa-solid,
#phone-public-profile .profile-action-row .phone-btn.primary .fa-solid,
#phone-profile-view .profile-action-row .phone-btn.primary .fa-regular,
#phone-public-profile .profile-action-row .phone-btn.primary .fa-regular,
#phone-profile-view .profile-action-row .phone-btn.primary i,
#phone-public-profile .profile-action-row .phone-btn.primary i,
#phone-profile-view .profile-action-row .phone-btn.primary span,
#phone-public-profile .profile-action-row .phone-btn.primary span,
#btn-follow-user.is-following,
#btn-follow-user.is-following *,
#btn-follow-user.is-following .fa-solid,
#btn-follow-user.is-following .fa-regular,
#btn-follow-user.is-following i,
#btn-follow-user.is-following #follow-btn-text,
#phone-public-profile #btn-follow-user.is-following #follow-btn-text {
  color: #000 !important;
}
#phone-profile-view .profile-action-row .phone-btn.secondary,
#phone-public-profile .profile-action-row .phone-btn.secondary,
.profile-action-row > .phone-btn.secondary {
  background: #000 !important;
  color: #fff !important;
}
#phone-profile-view .profile-action-row .phone-btn.secondary .fa-solid,
#phone-public-profile .profile-action-row .phone-btn.secondary .fa-solid,
#phone-profile-view .profile-action-row .phone-btn.secondary i,
#phone-public-profile .profile-action-row .phone-btn.secondary i {
  color: #fff !important;
}
#btn-follow-user:not(.is-following),
#btn-follow-user:not(.is-following) #follow-btn-text,
#btn-follow-user:not(.is-following) .fa-solid,
#btn-follow-user:not(.is-following) i {
  color: #fff !important;
}
.profile-action-btn-icon {
  width: 2.75rem !important;
  min-width: 2.75rem !important;
  padding-left: 0.55rem !important;
  padding-right: 0.55rem !important;
  justify-content: center !important;
}
.profile-bio-section,
.profile-header-info,
.profile-activity-section {
  max-width: none;
  width: 100%;
}

/* Profile: pin screen to center shell — only the wall scrolls (never the whole page) */
.center-content-area:has(> .profile-screen.active) {
  overflow: hidden !important;
}
#phone-profile-view.profile-screen.active,
#phone-public-profile.profile-screen.active {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  gap: 0 !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}
.profile-chrome {
  flex: 0 0 auto;
  z-index: 4;
  background: var(--bg-app, #000);
  padding: 0.55rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
}
#phone-profile-view .profile-chrome,
#phone-public-profile .profile-chrome,
#phone-profile-view .profile-chrome .profile-bio-section,
#phone-public-profile .profile-chrome .profile-bio-section,
#phone-profile-view .profile-chrome .profile-header-info,
#phone-public-profile .profile-chrome .profile-header-info,
#phone-profile-view .profile-chrome .profile-activity-section,
#phone-public-profile .profile-chrome .profile-activity-section,
#phone-profile-view .profile-chrome .profile-action-row,
#phone-public-profile .profile-chrome .profile-action-row {
  max-width: none !important;
  width: 100% !important;
}
.profile-back-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
.profile-back-bar h3 {
  margin: 0;
  font-family: var(--font-comic-title);
  font-size: 1.2rem;
  color: #fff;
}
.profile-back-btn {
  background: transparent !important;
  border: none !important;
  border-image: none !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 1.35rem;
  padding: 0.2rem 0.4rem !important;
  cursor: pointer;
}
.profile-chrome .profile-header-info {
  margin-top: 0 !important;
  padding: 0.15rem 0 0.25rem !important;
  max-width: none !important;
}
.profile-chrome .profile-bio-section {
  padding: 0 0 0.25rem !important;
  max-width: none !important;
}
.profile-chrome .profile-activity-section {
  padding: 0.3rem 0 0.1rem !important;
  max-width: none !important;
  width: 100%;
}
.profile-chrome .profile-action-row {
  max-width: none !important;
}

/* Status stacknut — sits in the empty chrome space to the right of bio */
.profile-main-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.85rem 1rem;
  width: 100%;
}
.profile-main-row .profile-bio-section {
  flex: 1 1 280px;
  min-width: 0;
  max-width: none !important;
}
.profile-status-stack {
  flex: 0 1 260px;
  min-width: 180px;
  max-width: 300px;
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.65rem 0.75rem 0.75rem;
  box-sizing: border-box;
  border-style: solid !important;
  border-color: transparent !important;
  border-width: var(--sketch-frame-w-sm) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-image-source: var(--sketch-box-sm) !important;
  border-image-slice: var(--sketch-slice-sm) !important;
  border-image-width: var(--sketch-frame-w-sm) !important;
  border-image-repeat: stretch !important;
  background: rgba(255, 230, 0, 0.06) !important;
}
.profile-status-stack[hidden] {
  display: none !important;
}
.profile-status-label {
  font-family: 'AfrawSketch', Arial, Helvetica, sans-serif !important;
  color: var(--comic-yellow) !important;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.profile-status-text {
  margin: 0;
  color: #fff;
  font-family: var(--font-comic-body);
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
  min-height: 2.4em;
}
.profile-status-text.is-empty {
  color: var(--text-mute);
  font-style: normal;
  opacity: 0.75;
}
.profile-status-edit-btn {
  margin-top: 0.55rem;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  color: var(--comic-yellow) !important;
  font-family: var(--font-comic-body) !important;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
}
.profile-status-edit-btn:hover {
  color: #fff !important;
}
.profile-status-editor {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.25rem;
  position: relative;
  z-index: 2;
}
.profile-status-editor[hidden] {
  display: none !important;
}
.profile-status-input {
  width: 100%;
  min-height: 4.2rem;
  resize: vertical;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(255, 230, 0, 0.55) !important;
  border-radius: 0 !important;
  border-image: none !important;
  color: #fff !important;
  font-family: var(--font-comic-body) !important;
  font-size: 0.9rem;
  line-height: 1.35;
  outline: none;
}
.profile-status-input:focus {
  border-color: var(--comic-yellow) !important;
}
.profile-status-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.profile-status-save-btn,
.profile-status-cancel-btn {
  padding: 0.3rem 0.7rem;
  font-family: var(--font-comic-body) !important;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  border-image: none !important;
  border-radius: 0;
}
.profile-status-save-btn {
  background: var(--comic-yellow) !important;
  color: #000 !important;
}
.profile-status-cancel-btn {
  background: transparent !important;
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 700px) {
  .profile-status-stack {
    flex: 1 1 100%;
    max-width: none;
  }
}
#phone-profile-view .profile-wall-section,
#phone-public-profile .profile-wall-section {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: none !important;
  width: 100% !important;
  margin-top: 0;
  padding: 0.4rem 0.5rem 1rem;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
#phone-profile-view .profile-wall-grid,
#phone-public-profile .profile-wall-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: none !important;
  margin-top: 0 !important;
  padding-top: 6px !important;
}
#phone-profile-view .profile-wall-grid > .wall-preview,
#phone-public-profile .profile-wall-grid > .wall-preview {
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}
/* Don't stack a second rule on top of the label — it crowds the grid */
#phone-profile-view .profile-wall-section::before,
#phone-public-profile .profile-wall-section::before {
  display: none !important;
}
#phone-profile-view .profile-wall-section > .profile-wall-label,
#phone-public-profile .profile-wall-section > .profile-wall-label {
  text-align: left;
  padding: 2px 10px 0;
  margin: 0 0 18px;
  position: sticky;
  top: 0;
  background: var(--bg-app, #000);
  z-index: 3;
  font-size: 1.05rem;
  color: var(--comic-yellow) !important;
  letter-spacing: 0.04em;
  border: none !important;
  border-image: none !important;
  box-shadow: none !important;
}
/* Rule under the title, with clear air before posts */
#phone-profile-view .profile-wall-section > .profile-wall-label::after,
#phone-public-profile .profile-wall-section > .profile-wall-label::after {
  content: '';
  display: block;
  width: 100%;
  height: 10px;
  margin: 10px 0 0;
  background: var(--sketch-rule) center / 100% 100% no-repeat;
  opacity: 0.75;
  pointer-events: none;
}
@media (min-width: 901px) {
  .profile-chrome .profile-activity-section {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Profile activity: real sketch boxes (not CSS rectangles) */
.profile-activity-block {
  border-style: solid !important;
  border-color: transparent !important;
  border-width: var(--sketch-frame-w-sm) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  border-image-source: var(--sketch-box-sm) !important;
  border-image-slice: var(--sketch-slice-sm) !important;
  border-image-width: var(--sketch-frame-w-sm) !important;
  border-image-repeat: stretch !important;
  background: transparent !important;
  box-sizing: border-box;
}
.profile-chip {
  border-style: solid !important;
  border-color: transparent !important;
  border-width: 10px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  border-image-source: var(--sketch-box-sq) !important;
  border-image-slice: var(--sketch-slice-sq) !important;
  border-image-width: 10px !important;
  border-image-repeat: stretch !important;
  background: transparent !important;
}

/* LAST RESORT: yellow profile CTAs — icons/text pure black (kill white FA glow) */
#phone-profile-view .profile-action-row .phone-btn.primary,
#phone-public-profile .profile-action-row .phone-btn.primary,
#phone-profile-view .profile-action-row .phone-btn.primary *,
#phone-public-profile .profile-action-row .phone-btn.primary *,
#phone-profile-view .profile-action-row .phone-btn.primary i,
#phone-public-profile .profile-action-row .phone-btn.primary i,
#phone-profile-view .profile-action-row .phone-btn.primary i::before,
#phone-public-profile .profile-action-row .phone-btn.primary i::before,
#phone-profile-view .profile-action-row .phone-btn.primary .fa-solid,
#phone-public-profile .profile-action-row .phone-btn.primary .fa-solid,
#phone-profile-view .profile-action-row .phone-btn.primary .fa-solid::before,
#phone-public-profile .profile-action-row .phone-btn.primary .fa-solid::before,
#btn-follow-user.is-following,
#btn-follow-user.is-following *,
#btn-follow-user.is-following i,
#btn-follow-user.is-following i::before,
#btn-follow-user.is-following .fa-solid,
#btn-follow-user.is-following .fa-solid::before,
#btn-follow-user.is-following #follow-btn-text,
.profile-action-row .phone-btn.primary .icon-on-yellow,
.profile-action-row .phone-btn.primary .icon-on-yellow::before,
.phone-btn.primary .fa-solid,
.phone-btn.primary .fa-solid::before,
.phone-btn.primary .fa-regular,
.phone-btn.primary .fa-regular::before,
.phone-btn.primary i,
.phone-btn.primary i::before {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* Phone structure guard.
   This file loads after index.css, so its desktop sidebar !important rules
   must be explicitly reversed at the phone breakpoint. */
@media (max-width: 767px) {
  .left-sidebar {
    display: none !important;
  }

  .right-sidebar:not(.mobile-live-open) {
    display: none !important;
  }

  .center-content-area {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    padding-bottom: 0 !important;
  }
}

/* Tablet structure: keep the original left navigation and its hover/click
   sounds, while live chat remains available as a full-screen overlay. */
@media (min-width: 768px) and (max-width: 1024px) {
  .left-sidebar {
    display: flex !important;
  }

  .sidebar-search {
    margin-inline: 0.7rem !important;
    padding-inline: 0.45rem !important;
    min-height: 60px;
  }

  .sidebar-search .sidebar-search-icon.sketch-icon,
  .sidebar-search .sidebar-search-icon {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
  }

  .sidebar-search input {
    min-width: 0;
    font-size: 1rem;
  }

  .right-sidebar:not(.mobile-live-open) {
    display: none !important;
  }

  .center-content-area {
    min-width: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    padding-bottom: 0 !important;
  }
}
