@import url('./components.css');

:root {
  --yap-max: 1120px;
  --yap-app: 1440px;
  --yap-read: 680px;
}

html { scroll-behavior: smooth; }
body { background: var(--yap-deep); }

/* —— Shared header (landing / about / later) —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #062b43f0;
  border-bottom: 1px solid var(--yap-line);
  backdrop-filter: blur(16px);
}
.site-header-inner {
  max-width: var(--yap-max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-height: 48px;
}
.brand-lockup img {
  width: 96px;
  height: auto;
}
.brand-lockup .brand-text {
  display: grid;
  gap: 2px;
}
.brand-lockup strong {
  font-size: 13px;
  letter-spacing: 0.4px;
  color: var(--yap-ivory);
}
.brand-lockup span {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--yap-muted);
  font-weight: 700;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-nav a {
  color: var(--yap-muted);
  text-decoration: none;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-size: 14px;
}
.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: var(--yap-ivory);
  background: var(--yap-panel);
}
.header-nav a[aria-current="page"] .yap-icon { color: var(--yap-gold); }
.header-nav .later-link { opacity: 0.8; font-size: 13px; }
.later-tag {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--yap-navy);
  background: var(--yap-gold);
  border-radius: 999px;
  padding: 2px 7px;
  font-weight: 800;
}

/* —— Landing —— */
.hero {
  max-width: min(var(--yap-max), calc(100% - 48px));
  margin: 28px auto 0;
  border: 1px solid var(--yap-line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--yap-navy) url('../assets/backgrounds/skybridge-city.svg') right center / auto 100% no-repeat;
  min-height: 320px;
  padding: 48px 40px;
  position: relative;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #062B43 8%, #062B43e6 42%, #062B4300 100%);
}
.hero > * { position: relative; }
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  max-width: 14ch;
  margin: 12px 0 16px;
}
.hero .lede {
  max-width: 42ch;
  font-size: 18px;
  color: var(--yap-muted);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.cta-row .yap-btn { text-decoration: none; }

.section {
  max-width: var(--yap-max);
  margin: 0 auto;
  padding: 48px 24px 0;
}
.section h2 { margin: 8px 0 12px; }
.section-intro { max-width: 62ch; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.service-card {
  padding: 22px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.service-card .yap-icon { color: var(--yap-gold); width: 26px; height: 26px; }
.service-card p { color: var(--yap-muted); font-size: 14px; }

.foundry-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  margin-top: 24px;
}
.foundry-band img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--yap-line);
  max-height: 220px;
  object-fit: cover;
}

.world-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.world-links a {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 6px;
}
.world-links a strong { color: var(--yap-ivory); }
.world-links a span { color: var(--yap-muted); font-size: 13px; }
.world-links a:hover { border-color: var(--yap-aqua); }

.fixture-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px dashed var(--yap-gold);
  border-radius: 12px;
  background: #3e3420;
  color: #ffd783;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 18px;
}
.fixture-banner .chip {
  background: var(--yap-gold);
  color: var(--yap-navy);
  border-color: transparent;
}

.landing-feed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  margin-top: 8px;
  padding-bottom: 32px;
}

.site-footer {
  max-width: var(--yap-max);
  margin: 48px auto 0;
  padding: 28px 24px 80px;
  border-top: 1px solid var(--yap-line);
  color: var(--yap-muted);
  font-size: 13px;
  display: grid;
  gap: 10px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer a { color: var(--yap-muted); }

/* —— App shell (feed) —— */
.app {
  max-width: var(--yap-app);
  margin: auto;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 28px 18px;
  border-right: 1px solid var(--yap-line);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar .brand { display: block; padding: 0 12px; text-decoration: none; color: inherit; }
.sidebar .brand img { width: 154px; max-width: 100%; height: auto; }
.sidebar .brand span {
  font-size: 10px;
  display: block;
  letter-spacing: 1.2px;
  color: var(--yap-muted);
  margin-top: 9px;
  font-weight: 700;
}
.sidebar nav { display: grid; gap: 4px; }
.nav-button {
  border: 0;
  background: transparent;
  color: var(--yap-muted);
  text-align: left;
  display: flex;
  gap: 13px;
  align-items: center;
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
  font-weight: 650;
  text-decoration: none;
}
.nav-button:hover,
.nav-button[aria-current="page"] {
  background: var(--yap-panel);
  color: var(--yap-ivory);
}
.nav-button[aria-current="page"] .yap-icon { color: var(--yap-gold); }
.nav-button.is-later { opacity: 0.72; }
.nav-button .later-tag { margin-left: auto; }
.sidebar-foot {
  margin-top: auto;
  font-size: 12px;
  display: grid;
  gap: 10px;
}
.sidebar-foot a { color: var(--yap-muted); }
.workspace { min-width: 0; }
.topbar {
  min-height: 88px;
  border-bottom: 1px solid var(--yap-line);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--yap-muted);
  max-width: 330px;
  flex: 1;
}
.searchbox input {
  background: transparent;
  color: var(--yap-ivory);
  border: 0;
  outline-offset: 6px;
  width: 100%;
  min-height: 44px;
}
.shell-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--yap-gold);
  text-align: right;
  line-height: 1.4;
}
.content { padding: 28px 32px 80px; }
.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 24px;
  margin-top: 22px;
}
.feed-main { min-width: 0; max-width: var(--yap-read); }
/* yapacts1 filterbar retired — context chips live in feed-selectors */
.filterbar { display: none !important; }
.filterbar-old {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}
.filterbar select { width: auto; max-width: 220px; font-size: 13px; }
.composer { padding: 20px; margin-bottom: 16px; }
.composer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.composer-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--yap-ivory);
  letter-spacing: -0.01em;
}
.composer-context { flex: none; }
.composer-context-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  color: var(--yap-ivory);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2357D4DF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 12px 8px;
  border: 0;
  border-radius: 8px;
  padding: 4px 22px 4px 8px;
  cursor: pointer;
  max-width: min(100%, 220px);
}
.composer-context-select:hover { background-color: rgba(87, 212, 223, 0.08); }
.composer-context-select:focus-visible {
  outline: 3px solid var(--yap-focus);
  outline-offset: 3px;
}
.composer textarea,
.composer .composer-input {
  display: block;
  width: 100%;
  resize: none;
  overflow: hidden;
  min-height: 88px;
  max-height: 320px;
  padding: 12px 14px;
  border: 1px solid var(--yap-line);
  border-radius: 12px;
  background: #071f2f; /* slightly deeper than panel so typing well is obvious */
  color: var(--yap-ivory);
  line-height: 1.45;
}
.composer textarea:hover,
.composer .composer-input:hover { border-color: #4a6d82; }
.composer textarea:focus-visible,
.composer .composer-input:focus-visible {
  outline: 3px solid var(--yap-focus);
  outline-offset: 3px;
  border-color: var(--yap-aqua);
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.composer-tools .yap-btn { margin-left: auto; }
.composer-count {
  font-size: 12px;
  color: var(--yap-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.composer-count.is-near { color: var(--yap-gold); }
.composer-count.is-full { color: #ffb6b1; }
.context-note { display: none !important; }

.post {
  padding: 22px 20px;
  border: 1px solid var(--yap-line);
  border-radius: 18px;
  background: #082b40;
  margin-bottom: 14px;
}
.post-head { display: flex; gap: 12px; align-items: start; }
.post-meta { flex: 1; min-width: 0; }
.post-meta .row { flex-wrap: wrap; gap: 7px; }
.post-author { font-weight: 750; font-size: 14px; }
.post-body { margin-top: 16px; overflow-wrap: anywhere; }
.post-body p { white-space: pre-wrap; }
.post-context { margin-top: 8px; display: flex; gap: 7px; flex-wrap: wrap; }
.post-topic { font-size: 13px; color: var(--yap-aqua); margin-top: 12px; }
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--yap-muted);
  border-top: 1px solid #234658;
  padding-top: 8px;
}
.post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  color: inherit;
  min-height: 44px;
  padding: 8px 10px;
}
.post-media {
  border-radius: 12px;
  margin-top: 14px;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border: 1px solid var(--yap-line);
}
.source-card {
  background: #041c2c;
  border: 1px solid var(--yap-line);
  border-radius: 12px;
  padding: 16px;
  margin-top: 14px;
}
.source-card span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--yap-muted);
}
.aside {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  min-height: 100%;
}
.aside > .rail-foot {
  margin-top: auto;
}
.aside .yap-card { padding: 20px; }
.aside-list { display: grid; gap: 20px; margin-top: 22px; }
.aside-list p { font-size: 12px; color: var(--yap-muted); margin-top: 3px; }
.sample-note { font-size: 12px; }

.mobile-nav { display: none; }
.toast {
  position: fixed;
  z-index: 500;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--yap-ivory);
  color: var(--yap-navy);
  padding: 14px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 35px #0005;
  max-width: 90%;
  font-size: 14px;
  font-weight: 650;
}
.toast[hidden] { display: none; }
dialog {
  background: var(--yap-navy);
  color: var(--yap-ivory);
  border: 1px solid var(--yap-line);
  border-radius: 22px;
  padding: 28px;
  max-width: 520px;
  width: calc(100% - 32px);
}
dialog::backdrop { background: #00111acc; }
dialog h2 { margin-bottom: 14px; }
dialog p { margin-bottom: 18px; }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.stack { display: grid; gap: 12px; }

.page-about .prose,
.page-later .prose {
  max-width: 720px;
  margin: 36px auto;
  padding: 0 24px 80px;
  display: grid;
  gap: 16px;
}
.page-about .prose h1,
.page-later .prose h1 { font-size: clamp(32px, 5vw, 48px); }
.later-list { display: grid; gap: 14px; margin-top: 8px; }
.later-list li { list-style: none; }

.bridge-rule {
  display: block;
  width: min(100%, 640px);
  height: 28px;
  margin: 8px 0 4px;
  opacity: 0.85;
}

@media (max-width: 1150px) {
  .app { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding: 22px 10px; }
  .feed-layout, .landing-feed { grid-template-columns: 1fr; }
  .aside { grid-template-columns: 1fr 1fr; display: grid; align-content: start; }
  .aside > .rail-foot { grid-column: 1 / -1; margin-top: 8px; }
  .service-grid, .world-links, .foundry-band { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 16px 24px; }
  .content { padding: 24px; }
}
@media (max-width: 767px) {
  .app { display: block; }
  .sidebar { display: none; }
  .site-header-inner { padding: 10px 16px; }
  .header-nav .hide-sm { display: none; }
  .brand-lockup img { width: 72px; }
  .hero { margin: 16px 12px 0; padding: 28px 22px; min-height: 260px; background-position: 65% center; }
  .hero:before { background: linear-gradient(90deg, #062b43f7, #062b43b0); }
  .section { padding: 36px 16px 0; }
  .service-grid, .world-links, .foundry-band, .aside { grid-template-columns: 1fr; }
  .topbar { min-height: 72px; padding: 10px 18px; }
  .content { padding: 20px 14px 100px; }
  .feed-layout { margin-top: 16px; }
  .aside { display: none; }
  .mobile-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 30;
    background: #062b43f5;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--yap-line);
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    backdrop-filter: blur(16px);
  }
  .mobile-nav a, .mobile-nav button {
    display: grid;
    place-items: center;
    gap: 4px;
    background: none;
    border: 0;
    color: var(--yap-muted);
    min-width: 50px;
    min-height: 46px;
    font-size: 10px;
    text-decoration: none;
  }
  .mobile-nav a[aria-current="page"],
  .mobile-nav button[aria-current="page"] { color: var(--yap-gold); }
  .toast { bottom: 85px; }
  .site-footer { padding-bottom: 100px; }
}

/* —— yapring1: account PFP + status rings (same palette as brand ringfix1) —— */
#yap-session-chip.yap-session-chip,
.yap-session-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--yap-ivory);
  font-weight: 700;
  font-size: 13px;
  background: transparent;
  border: 1px solid transparent;
}
#yap-session-chip.yap-session-chip:hover,
.yap-session-chip:hover {
  background: var(--yap-panel);
  border-color: var(--yap-line);
  color: var(--yap-ivory);
  text-decoration: none;
}
.yap-session-chip-ring,
.yap-session-chip .signal-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  padding: 2px;
  box-sizing: border-box;
  background: linear-gradient(160deg, #3a424c 0%, #1a1f26 100%);
  box-shadow: 0 0 0 1px rgba(120, 130, 140, 0.28);
}
.yap-session-chip-face,
.yap-session-chip .signal-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0a2433;
  color: var(--yap-aqua);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  overflow: hidden;
  border: 1px solid rgba(126, 200, 216, 0.28);
  box-sizing: border-box;
}
.yap-session-chip .signal-avatar-img,
.yap-session-chip-ring img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(126, 200, 216, 0.28);
  box-sizing: border-box;
}
.yap-session-chip-ring.has-photo > .signal-avatar,
.yap-session-chip-ring.has-photo > .yap-session-chip-face,
.yap-session-chip .signal-avatar[hidden],
.yap-session-chip .signal-avatar-img[hidden] {
  display: none !important;
}
.yap-session-chip-label {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* blue = website (brand + yap.ms site presence) */
#yap-session-chip.is-status-online .yap-session-chip-ring,
#yap-session-chip[data-status="online"] .yap-session-chip-ring,
.yap-session-chip-ring.is-status-online,
.yap-session-chip-ring[data-status="online"] {
  background: linear-gradient(160deg, #9ad4ff 0%, #3b82f6 55%, #1d4ed8 100%);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.4),
    0 0 12px rgba(59, 130, 246, 0.38);
}
/* green = in-game */
#yap-session-chip.is-status-in-game .yap-session-chip-ring,
#yap-session-chip[data-status="in-game"] .yap-session-chip-ring,
.yap-session-chip-ring.is-status-in-game,
.yap-session-chip-ring[data-status="in-game"] {
  background: linear-gradient(160deg, #7dffb0 0%, #3dce7a 55%, #1f8a4c 100%);
  box-shadow:
    0 0 0 1px rgba(61, 206, 122, 0.35),
    0 0 12px rgba(61, 206, 122, 0.35);
}
/* purple = Global party */
#yap-session-chip.is-status-global .yap-session-chip-ring,
#yap-session-chip.is-status-audio .yap-session-chip-ring,
.yap-session-chip-ring.is-status-global,
.yap-session-chip-ring.is-status-audio {
  background: linear-gradient(160deg, #e0b3ff 0%, #a855f7 55%, #6b21a8 100%);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.4),
    0 0 12px rgba(168, 85, 247, 0.38);
}
/* teal = Quest party */
#yap-session-chip.is-status-quest .yap-session-chip-ring,
.yap-session-chip-ring.is-status-quest {
  background: linear-gradient(160deg, #5eead4 0%, #2dd4bf 55%, #0f766e 100%);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.4),
    0 0 12px rgba(45, 212, 191, 0.38);
}
#yap-session-chip.is-status-offline .yap-session-chip-ring,
.yap-session-chip-ring.is-status-offline {
  background: linear-gradient(160deg, #3a424c 0%, #1a1f26 100%);
  box-shadow: 0 0 0 1px rgba(120, 130, 140, 0.28);
}
@media (max-width: 720px) {
  .yap-session-chip-label { display: none; }
}

/* —— yapfeed1: home = feed (X-style chrome) —— */
.page-home-feed .topbar-feed {
  min-height: 64px;
  padding: 0 24px;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 30;
  background: #062b43f0;
  backdrop-filter: blur(16px);
}
.page-home-feed .feed-selectors {
  flex: 1 1 220px;
  border-bottom: 0;
  min-width: 0;
}
.page-home-feed .feed-selectors button {
  flex: 0 0 auto;
  min-width: auto;
}
.page-home-feed .topbar-account {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-home-feed .feed-layout { margin-top: 8px; }
.page-home-feed .content { padding-top: 16px; }
.feed-sentinel {
  text-align: center;
  padding: 28px 12px 48px;
  border-top: 1px solid var(--yap-line);
  margin-top: 8px;
}
.feed-sentinel a { color: var(--yap-aqua); }
.rail-foot {
  display: grid;
  gap: 8px;
  padding: 8px 2px 0;
  margin-top: 4px;
}
.rail-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--yap-muted);
}
.rail-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--yap-muted);
  padding: 0;
}
.rail-legal a,
.rail-legal .linkish {
  color: var(--yap-muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.rail-legal a:hover,
.rail-legal .linkish:hover { color: var(--yap-aqua); text-decoration: underline; }
a.post-author,
a.handle-link {
  color: inherit;
  text-decoration: none;
}
a.post-author:hover,
a.handle-link:hover { color: var(--yap-aqua); text-decoration: underline; }
a.avatar {
  text-decoration: none;
  color: inherit;
}

/* —— yapprof2 + yapring2: feed/list PFPs circular + shared status rings (chip palette) —— */
.post .avatar,
.profile-posts .avatar,
.explore-list .avatar,
a.avatar.yap-session-chip-ring,
a.avatar.signal-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  padding: 2px;
  box-sizing: border-box;
  overflow: visible;
  background: linear-gradient(160deg, #3a424c 0%, #1a1f26 100%);
  box-shadow: 0 0 0 1px rgba(120, 130, 140, 0.28);
  text-decoration: none;
  color: inherit;
}
.post .avatar .signal-avatar,
.profile-posts .avatar .signal-avatar,
.explore-list .avatar .signal-avatar,
a.avatar .signal-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #0a2433;
  color: var(--yap-aqua);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(126, 200, 216, 0.28);
  box-sizing: border-box;
}
.post .avatar img,
.profile-posts .avatar img,
.explore-list .avatar img,
.avatar.has-photo img,
a.avatar .signal-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  border: 1px solid rgba(126, 200, 216, 0.28);
  box-sizing: border-box;
}
a.avatar.has-photo > .signal-avatar {
  display: none !important;
}
/* Status rings on feed/list avatars — same green/blue/purple/teal as chip */
.post .avatar.is-status-online,
.profile-posts .avatar.is-status-online,
.explore-list .avatar.is-status-online,
a.avatar.is-status-online,
a.avatar[data-status="online"] {
  background: linear-gradient(160deg, #9ad4ff 0%, #3b82f6 55%, #1d4ed8 100%);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.4),
    0 0 12px rgba(59, 130, 246, 0.38);
}
.post .avatar.is-status-in-game,
.profile-posts .avatar.is-status-in-game,
.explore-list .avatar.is-status-in-game,
a.avatar.is-status-in-game,
a.avatar[data-status="in-game"] {
  background: linear-gradient(160deg, #7dffb0 0%, #3dce7a 55%, #1f8a4c 100%);
  box-shadow:
    0 0 0 1px rgba(61, 206, 122, 0.35),
    0 0 12px rgba(61, 206, 122, 0.35);
}
.post .avatar.is-status-global,
.post .avatar.is-status-audio,
a.avatar.is-status-global,
a.avatar.is-status-audio {
  background: linear-gradient(160deg, #e0b3ff 0%, #a855f7 55%, #6b21a8 100%);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.4),
    0 0 12px rgba(168, 85, 247, 0.38);
}
.post .avatar.is-status-quest,
a.avatar.is-status-quest {
  background: linear-gradient(160deg, #5eead4 0%, #2dd4bf 55%, #0f766e 100%);
  box-shadow:
    0 0 0 1px rgba(45, 212, 191, 0.4),
    0 0 12px rgba(45, 212, 191, 0.38);
}
.post .avatar.is-status-offline,
a.avatar.is-status-offline {
  background: linear-gradient(160deg, #3a424c 0%, #1a1f26 100%);
  box-shadow: 0 0 0 1px rgba(120, 130, 140, 0.28);
}

/* yapacct1: settings edit form */
.yap-settings-form { display: grid; gap: 14px; margin-top: 8px; }
.yap-settings-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.yap-settings-form .yap-field,
.yap-settings-form textarea.yap-field { width: 100%; }
.yap-settings-form textarea.yap-field { min-height: 88px; resize: vertical; }
.yap-settings-photo-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.yap-settings-socials { display: grid; gap: 8px; }
.yap-settings-socials .soc-row { display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: center; }
.yap-settings-socials .soc-name { font-size: 12px; color: var(--yap-muted); }
.yap-settings-msg.ok { color: #7dffb0; }
.yap-settings-msg.err { color: #ff8f8f; }
.check-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.check-row input { width: auto; }
.profile-face .signal-avatar,
.profile-face img.signal-avatar-img {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
  background: #0a2433;
  color: var(--yap-aqua);
  font-weight: 800;
  line-height: 1;
}
.topbar-title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.3px;
}
.page-settings .content { max-width: 640px; }
@media (min-width: 768px) {
  .hide-lg { display: none !important; }
}
@media (max-width: 767px) {
  .page-home-feed .topbar-feed { padding: 8px 12px 0; }
  .page-home-feed .searchbox { order: 3; flex: 1 1 100%; max-width: none; padding-bottom: 8px; }
}

/* —— yapnav1: Play now + stay-on-yap chrome —— */
.yap-btn.yap-play-now {
  background: linear-gradient(160deg, #7dffb0 0%, #3dce7a 55%, #1f8a4c 100%);
  color: #062b43;
  border-color: transparent;
  font-weight: 800;
}
.yap-btn.yap-play-now:hover {
  background: #8af0b8;
  color: #062b43;
}
.sidebar .yap-play-now {
  width: 100%;
}
.mobile-nav a.yap-play-now {
  color: #7dffb0;
  font-weight: 800;
}
.profile-face.signal-avatar-wrap,
.profile-hero .yap-session-chip-ring {
  padding: 3px;
}
.page-profile .profile-hero { padding: 24px; }

/* —— yapgames1: Games IA + right-rail play banners —— */
.rail-games {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.game-banner {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--yap-line);
  overflow: hidden;
  text-decoration: none;
  color: var(--yap-ivory);
  background: var(--yap-panel);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
a.game-banner:hover {
  transform: translateY(-1px);
  border-color: var(--yap-aqua);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  color: var(--yap-ivory);
}
.game-banner-arco {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 100, 31, .45), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(87, 212, 223, .35), transparent 50%),
    linear-gradient(155deg, #0a3a55 0%, #062b43 48%, #041c2c 100%);
  border-color: rgba(87, 212, 223, .35);
  min-height: 118px;
}
.game-banner-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 181, 17, .35), transparent 70%);
  pointer-events: none;
}
.game-banner-kicker {
  position: relative;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--yap-aqua);
  font-weight: 700;
}
.game-banner-title {
  position: relative;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}
.game-banner-cta {
  position: relative;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--yap-gold);
}
.game-banner-slot {
  min-height: 86px;
  opacity: .72;
  background: linear-gradient(160deg, rgba(12, 53, 77, .9), rgba(6, 43, 67, .95));
}
.game-banner-slot.is-empty {
  min-height: 64px;
  opacity: .45;
  border-style: dashed;
}
.game-banner .muted,
.game-banner-cta.muted { color: var(--yap-muted); }

.page-games .content { max-width: 720px; }
.games-hero {
  padding: 28px 24px;
  background:
    radial-gradient(100% 80% at 100% 0%, rgba(255, 100, 31, .28), transparent 50%),
    radial-gradient(80% 70% at 0% 100%, rgba(87, 212, 223, .22), transparent 55%),
    var(--yap-panel);
  border: 1px solid rgba(87, 212, 223, .28);
}
.games-hero h2 { margin: 8px 0 10px; font-size: 28px; }
.games-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 12px;
}
.yap-btn.game-play-cta {
  background: linear-gradient(160deg, #ffb511 0%, #ff641f 70%);
  color: #062b43;
  border-color: transparent;
  font-weight: 800;
}
.yap-btn.game-play-cta:hover {
  background: #ffc84a;
  color: #062b43;
}
.games-section-title {
  margin: 28px 0 8px;
  font-size: 18px;
}
.games-vision { margin-bottom: 16px; max-width: 54ch; }
.games-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.game-card.is-placeholder {
  border-style: dashed;
  opacity: .85;
}
.game-card h3 { margin: 6px 0 8px; }


/* —— yapacts1: tab-row context chips + optimistic action paint —— */
.page-home-feed .feed-selectors,
.feed-selectors.yap-tabs {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
  overflow: visible;
}
.feed-scope-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
}
/* yapctxpick1 picker retired — chips stay hidden */
.feed-context-chips { display: none !important; }
.feed-ctx-picker { display: none !important; }

/* —— yapctxrail1 + yaptabfix1: game tabs + Contexts rail/sheet —— */
.page-home-feed .feed-selectors,
.feed-selectors.yap-tabs {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: visible; /* popover must escape tab strip */
}
.feed-scope-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  position: relative;
  overflow: visible;
}
.feed-scope-tabs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.feed-scope-tabs-row > [data-feed],
.feed-scope-tabs-row .feed-game-tab-wrap,
.feed-scope-tabs-row .feed-game-tabs {
  flex: 0 0 auto;
}
.feed-scope-tabs-row > [data-feed],
.feed-game-tab {
  white-space: nowrap;
  padding-left: 14px;
  padding-right: 14px;
}
.feed-game-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}
.feed-game-tab-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.feed-game-tab {
  padding-right: 28px; /* room for hover X without overlap */
}
.feed-game-tab-remove {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--yap-muted, #AFC1CA);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.feed-game-tab-wrap:hover .feed-game-tab-remove,
.feed-game-tab-wrap:focus-within .feed-game-tab-remove {
  display: inline-flex;
}
.feed-game-tab-remove:hover {
  color: #ffb6b1;
  background: rgba(255, 182, 177, 0.12);
  border-color: rgba(255, 182, 177, 0.35);
}
@media (hover: none) {
  .feed-game-tab-remove {
    display: inline-flex;
    opacity: 0.9;
  }
}
.feed-tabs-edit,
.feed-game-edit-btn,
.feed-game-edit-menu { display: none !important; }
.feed-game-add {
  flex: 0 0 auto;
  border: 1px dashed var(--yap-line, #335368);
  background: transparent;
  color: var(--yap-muted, #AFC1CA);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  cursor: pointer;
  padding: 0 10px;
  line-height: 1;
}
.feed-game-add:hover,
.feed-game-add[aria-expanded="true"] {
  border-style: solid;
  border-color: var(--yap-aqua, #57D4DF);
  color: var(--yap-aqua, #57D4DF);
  background: rgba(87,212,223,.08);
}
.feed-game-add-menu {
  position: fixed;
  z-index: 200;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--yap-line, #335368);
  background: var(--yap-panel, #0b334d);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  display: grid;
  gap: 4px;
}
.feed-game-add-menu[hidden] { display: none !important; }
.feed-game-add-menu button {
  border: 0;
  background: transparent;
  color: var(--yap-ivory);
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
  white-space: normal;
}
.feed-game-add-menu button:hover { background: rgba(87,212,223,.1); }
.feed-game-add-menu .feed-game-add-empty {
  margin: 0;
  padding: 10px 12px;
}

.topbar-feed-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.ctx-sheet-open {
  display: none;
  border: 1px solid var(--yap-line, #335368);
  background: transparent;
  color: var(--yap-ivory);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 999px;
  min-height: 32px;
  cursor: pointer;
  white-space: nowrap;
}
.ctx-sheet-open:hover { border-color: #4a6d82; background: rgba(87,212,223,.08); }

/* Right-rail Contexts */
.rail-contexts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rail-contexts-toggle {
  border: 0;
  background: transparent;
  color: var(--yap-muted);
  font-size: 14px;
  cursor: pointer;
  min-width: 28px;
  min-height: 28px;
  border-radius: 8px;
}
.rail-contexts-toggle:hover { color: var(--yap-aqua); background: rgba(87,212,223,.08); }
.rail-contexts[data-collapsed="true"] .rail-contexts-body { display: none; }
.rail-contexts-search { display: block; margin: 10px 0 8px; }
.rail-contexts-search input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--yap-line);
  background: rgba(0,0,0,.2);
  color: var(--yap-ivory);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.ctx-checklist { display: grid; gap: 2px; }
.feed-ctx-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--yap-ivory);
  cursor: pointer;
}
.feed-ctx-opt:hover { background: rgba(87,212,223,.1); }
.feed-ctx-opt input { accent-color: var(--yap-aqua); width: 16px; height: 16px; }
.feed-ctx-opt[hidden] { display: none !important; }
.rail-contexts-summary { margin: 8px 0 0; }
.rail-contexts-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.feed-ctx-manage {
  font-size: 12px;
  color: var(--yap-aqua);
  text-decoration: none;
}
.feed-ctx-manage:hover { text-decoration: underline; }

/* Mobile Contexts bottom sheet */
.ctx-sheet {
  max-width: 520px;
  width: calc(100% - 16px);
  margin: auto 8px 8px;
  border-radius: 20px 20px 16px 16px;
  padding: 12px 18px 22px;
  border: 1px solid var(--yap-line);
  background: var(--yap-navy);
  color: var(--yap-ivory);
}
.ctx-sheet::backdrop { background: #00111acc; }
.ctx-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--yap-line);
  margin: 4px auto 12px;
}
.ctx-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ctx-sheet-head h2 { margin: 0; font-size: 18px; }

.mobile-nav-post {
  color: var(--yap-gold, #ffb511) !important;
  font-weight: 700;
}

@media (max-width: 767px) {
  .ctx-sheet-open { display: inline-flex; align-items: center; }
  .rail-contexts { /* aside hidden on mobile anyway */ }
  .topbar-feed .searchbox { min-width: 0; flex: 1; }
  .feed-scope-tabs-row > [data-feed],
  .feed-game-tab {
    padding-left: 12px;
    padding-right: 12px;
  }
  .feed-game-tab { padding-right: 26px; }
}

/* —— yapacctmenu1: single left-rail account menu (no top-bar chip) —— */
.yap-account-slot {
  position: relative;
  display: grid;
  gap: 8px;
}
.yap-login-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--yap-line);
  background: var(--yap-panel);
  color: var(--yap-ivory) !important;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.yap-login-side:hover {
  border-color: var(--yap-aqua);
  color: var(--yap-aqua) !important;
  text-decoration: none;
}
#yap-session-chip.yap-session-chip,
.yap-session-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}
.yap-session-chip.is-menu-open {
  background: var(--yap-panel);
  border-color: var(--yap-line);
}
.yap-account-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 14px;
  background: #0a1f2e;
  border: 1px solid var(--yap-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  min-width: 11rem;
}
.yap-account-menu.hidden {
  display: none !important;
}
.yap-account-menu a,
.yap-account-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--yap-ivory);
  font: inherit;
  font-weight: 650;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.yap-account-menu a:hover,
.yap-account-menu button:hover {
  background: rgba(87, 212, 223, 0.12);
  color: var(--yap-aqua);
  text-decoration: none;
}
.yap-account-menu button[data-yap-acct-logout] {
  color: #ff7b8a;
  margin-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 10px 10px;
}
.yap-account-menu button[data-yap-acct-logout]:hover {
  background: rgba(255, 107, 138, 0.14);
  color: #ff9aab;
}
/* Defensive: never show leftover top-bar account chrome */
.topbar-account,
#yap-session-chip-top,
#yap-login-top {
  display: none !important;
}

/* —— yapgamerail1: In this game who-scope (Everyone|Following) —— */
.rail-game-who[hidden],
#rail-contexts[hidden] { display: none !important; }
.game-who-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.game-who-choice {
  border: 1px solid var(--yap-line, #335368);
  background: transparent;
  color: var(--yap-ivory);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  min-height: 40px;
}
.game-who-choice:hover { border-color: #4a6d82; background: rgba(87,212,223,.08); }
.game-who-choice.is-active,
.game-who-choice[aria-checked="true"] {
  border-color: var(--yap-aqua, #57d4df);
  background: rgba(87,212,223,.14);
  color: var(--yap-aqua, #57d4df);
}
#game-who-sheet .game-who-choices { margin-bottom: 8px; }

/* yapexplore1 — Explore live search layout */
.page-explore .topbar-title { margin: 0; font-size: 1.15rem; }
.explore-searchbox { min-width: min(420px, 100%); flex: 1; }
.explore-layout { display: grid; gap: 28px; max-width: 720px; }
.explore-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.explore-section-head h2 { margin: 0; font-size: 1.05rem; }
.explore-list { display: grid; gap: 10px; }
.explore-person {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}
.explore-person-meta { display: grid; gap: 2px; min-width: 0; }
.explore-person-meta .post-author { font-weight: 700; text-decoration: none; color: inherit; }
.explore-foot { margin-top: 8px; }
.yap-btn.sm { padding: 6px 12px; font-size: 0.8rem; min-height: 32px; }
@media (max-width: 720px) {
  .explore-searchbox { min-width: 0; width: 100%; }
  .page-explore .topbar-feed { flex-wrap: wrap; gap: 10px; }
}

/* === yapchrome2: mark-only sidebar (revert Artsy lockup width) === */
.sidebar .brand img { width: 154px; max-width: 100%; height: auto; }
.brand-lockup img.yap-lockup-header {
  width: min(100%, 280px);
  height: auto;
}

/* —— yapembedmedia1: in-post YouTube embed + chip name/@handle + solid act fills + profile games —— */
.yap-yt-embed {
  position: relative;
  width: 100%;
  max-width: 32rem;
  margin: 0.55rem 0 0.2rem;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0e14;
  border: 1px solid rgba(126, 200, 216, 0.18);
}
.yap-yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yap-session-chip-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  max-width: 11rem;
  min-width: 0;
  line-height: 1.15;
  white-space: nowrap;
}
.yap-session-chip-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 750;
  font-size: 13px;
  color: var(--yap-ivory, #f2f5f7);
}
.yap-session-chip-handle {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 550;
  font-size: 11px;
  color: var(--yap-muted, #8aa0b0);
  opacity: 0.95;
}
@media (max-width: 720px) {
  .yap-session-chip-label { display: none; }
}

/* Solid filled + brand color when active (X-style), not a weak tint */
.post-act .yap-icon g,
.post-act .yap-icon path {
  fill: none;
  stroke: currentColor;
  transition: fill 0.12s ease, stroke 0.12s ease, color 0.12s ease;
}
.post-act.is-active {
  font-weight: 700;
}
.post-act.is-active .yap-icon g,
.post-act.is-active .yap-icon path {
  fill: currentColor;
  stroke: currentColor;
}
.post-act-like.is-active {
  color: #ff4d6d !important;
}
.post-act-repost.is-active {
  color: #00ba7c !important;
}
.post-act-save.is-active {
  color: #ffb511 !important;
}

/* Profile tabs + My Games */
.profile-tabs {
  display: flex;
  gap: 4px;
  margin: 14px 0 10px;
  border-bottom: 1px solid var(--yap-line, rgba(126,200,216,0.18));
}
.profile-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--yap-muted, #8aa0b0);
  font: inherit;
  font-weight: 650;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.profile-tab:hover { color: var(--yap-ivory, #f2f5f7); }
.profile-tab.is-active,
.profile-tab.is-active {
  color: var(--yap-aqua, #57d4df);
  border-bottom-color: var(--yap-aqua, #57d4df);
}
.profile-games-list {
  display: grid;
  gap: 10px;
}
.profile-game-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--yap-line, rgba(126,200,216,0.18));
  background: rgba(12, 16, 22, 0.55);
  text-decoration: none;
  color: inherit;
}
.profile-game-card:hover {
  border-color: rgba(87, 212, 223, 0.45);
  text-decoration: none;
}
.profile-game-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(160deg, #1a3a4c, #0a1a24);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--yap-aqua, #57d4df);
  flex: none;
}
.profile-game-meta strong { display: block; font-size: 14px; }
.profile-game-meta span { display: block; font-size: 12px; color: var(--yap-muted, #8aa0b0); margin-top: 2px; }
.profile-secondary-links {
  margin-top: 10px;
  font-size: 12px;
  color: var(--yap-muted, #8aa0b0);
}
.profile-secondary-links a { color: var(--yap-aqua, #57d4df); }

/* —— yapfooter1: self photo pencil → settings (Yap-skinned) —— */
.profile-photo-edit-wrap {
  position: relative;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
}
.profile-photo-edit-wrap .profile-face,
.profile-photo-edit-wrap .yap-session-chip-ring {
  width: 88px;
  height: 88px;
}
.profile-edit-pencil {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  color: var(--yap-ivory);
  background: rgba(6, 43, 67, 0.88);
  border: 1px solid rgba(87, 212, 223, 0.45);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  opacity: 0.62;
  z-index: 3;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.profile-edit-pencil:hover,
.profile-edit-pencil:focus-visible,
.profile-photo-edit-wrap:hover > .profile-edit-pencil,
.profile-photo-edit-wrap:focus-within > .profile-edit-pencil {
  opacity: 1;
  background: rgba(12, 53, 77, 0.96);
  border-color: var(--yap-aqua);
  outline: none;
  color: var(--yap-gold);
}
.profile-edit-pencil:focus-visible {
  box-shadow: 0 0 0 2px var(--yap-deep), 0 0 0 4px rgba(87, 212, 223, 0.7);
}
@media (hover: none), (pointer: coarse) {
  .profile-edit-pencil {
    opacity: 0.78;
  }
}
@media (max-width: 820px) {
  .profile-edit-pencil {
    opacity: 0.78;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
}


/* Settings: brand-like stack — photo, name, bio */
.page-settings .yap-settings-form,
#settings-form.yap-settings-form {
  display: grid;
  gap: 14px;
  max-width: 36rem;
}
.yap-settings-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.yap-settings-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
}
.yap-field {
  width: 100%;
  box-sizing: border-box;
}


/* —— yapgames2: Games storefront + Coming soon empty states —— */
.games-storefront {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 24px;
  align-items: center;
  padding: 28px 24px;
  background:
    radial-gradient(100% 80% at 100% 0%, rgba(255, 100, 31, .28), transparent 50%),
    radial-gradient(80% 70% at 0% 100%, rgba(87, 212, 223, .22), transparent 55%),
    var(--yap-panel);
  border: 1px solid rgba(87, 212, 223, .32);
}
.games-storefront-media {
  flex-shrink: 0;
}
.games-storefront-logo {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  background: #0b1316;
}
.games-storefront-body { min-width: 0; }
.games-storefront h2 {
  margin: 6px 0 10px;
  font-size: 28px;
  line-height: 1.15;
}
.games-storefront-blurb {
  margin: 0;
  max-width: 46ch;
  color: var(--yap-ivory);
  font-size: 15px;
  line-height: 1.45;
}
.games-storefront-meta { margin: 0; }
.games-storefront-meta a { color: var(--yap-aqua); }

/* Keep legacy .games-hero usable if referenced elsewhere */
.page-games .games-hero { /* unchanged fallback */ }

.game-card.is-placeholder {
  border-style: dashed;
  opacity: .72;
  background: rgba(6, 43, 67, .45);
  pointer-events: none;
}
.game-card.is-placeholder h3 {
  color: var(--yap-muted);
}

.yap-empty-state {
  max-width: 28rem;
  margin: 28px auto;
  padding: 36px 28px;
  text-align: center;
  border-style: dashed;
  border-color: rgba(87, 212, 223, .22);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(87, 212, 223, .12), transparent 55%),
    var(--yap-panel);
}
.yap-empty-state h2 {
  margin: 8px 0 10px;
  font-size: 22px;
}
.yap-empty-state .muted { margin: 0 auto; max-width: 36ch; }
.yap-empty-state .small.muted { margin-top: 10px; }
.yap-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: rgba(87, 212, 223, .12);
  color: var(--yap-aqua);
  font-size: 22px;
}
.yap-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 22px 0 0;
}

@media (max-width: 560px) {
  .games-storefront {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 22px 18px;
  }
  .games-storefront-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }
  .games-storefront h2 { font-size: 24px; }
}
