/* The Veil — EACI social platform. Facebook-simple structure. EACI territory. No galaxy. No MP4s. */
:root {
  --bg: #06050b;
  --bg-lift: #100e16;
  --card: rgba(16, 13, 22, 0.86);
  --card-hover: rgba(22, 18, 30, 0.92);
  --ink: #f6f0e6;
  --muted: #a3988c;
  --line: rgba(0, 255, 200, 0.22);
  --line-soft: rgba(246, 240, 230, 0.1);
  --cyan: #00ffc8;
  --ember: #ffb45a;
  --violet: #c4a8ff;
  --danger: #ff6b6b;
  --radius: 18px;
  --nav-h: 60px;
  --font: "Sora", "Segoe UI", system-ui, sans-serif;
  --eaci-w: 42%;
  --who: var(--cyan);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body {
  min-height: 100dvh;
  background: var(--bg);
}
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #05040a;
}
.atm-plate,
.atm-glow,
.atm-vignette {
  position: absolute;
  pointer-events: none;
}
.atm-plate {
  inset: 0;
  background: url("atmosphere/veil-bg-plate.png") center / cover no-repeat;
  opacity: 0.92;
}
.atm-vignette {
  inset: 0;
  background:
    radial-gradient(ellipse 48% 70% at 50% 38%, rgba(6, 5, 11, 0.72) 0%, rgba(6, 5, 11, 0.28) 58%, transparent 78%);
}
.atm-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  mix-blend-mode: screen;
}
.atm-glow {
  overflow: hidden;
}
.flow-stage {
  position: absolute;
  inset: 0;
  --n: 7;
  --loop: 10s;
}
.flow-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  mix-blend-mode: screen;
  opacity: 0;
  animation: flow-xfade var(--loop) linear infinite;
}
.flow-stage img:nth-child(1) { animation-delay: 0s; }
.flow-stage img:nth-child(2) { animation-delay: calc(var(--loop) / var(--n) * -1); }
.flow-stage img:nth-child(3) { animation-delay: calc(var(--loop) / var(--n) * -2); }
.flow-stage img:nth-child(4) { animation-delay: calc(var(--loop) / var(--n) * -3); }
.flow-stage img:nth-child(5) { animation-delay: calc(var(--loop) / var(--n) * -4); }
.flow-stage img:nth-child(6) { animation-delay: calc(var(--loop) / var(--n) * -5); }
.flow-stage img:nth-child(7) { animation-delay: calc(var(--loop) / var(--n) * -6); }
@keyframes flow-xfade {
  0% { opacity: 1; }
  10% { opacity: 1; }
  18% { opacity: 0; }
  94% { opacity: 0; }
  100% { opacity: 1; }
}
.atm-glow-left {
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: min(28vw, 340px);
}
.atm-glow-left img { object-position: left center; }
.atm-glow-right {
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  width: min(28vw, 340px);
}
.atm-glow-right img { object-position: right center; }
html.eaci-open.is-desktop .atm-glow-left {
  opacity: 0.2;
}
.glow-line {
  position: relative;
  z-index: 1;
  height: 1px;
  margin: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 200, 0.22), rgba(255, 180, 90, 0.16), transparent);
}
.presence-stage {
  position: relative;
  margin: 0 -8px 10px;
  padding: 8px 8px 4px;
}
.atm-glow-presence {
  position: absolute;
  left: -6%;
  right: -6%;
  top: 4px;
  height: 86px;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 28%, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 28%, #000 72%, transparent 100%);
  mask-composite: intersect;
}
.atm-glow-presence img { object-position: center 42%; }
@media (max-width: 860px) {
  .atm-glow-left,
  .atm-glow-right {
    width: 22vw;
    opacity: 0.55;
  }
}

button, textarea, input { font-family: inherit; }
button:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Nav */
.veil-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--nav-h);
  height: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "left brand right";
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(6, 5, 11, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 0;
  overflow: visible;
}
.nav-scroll {
  display: contents;
}
.nav-left { grid-area: left; }
.brand { grid-area: brand; }
.nav-right { grid-area: right; }
.eaci-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 255, 200, 0.08);
  color: var(--cyan);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.eaci-launch:hover { background: rgba(0, 255, 200, 0.14); }
.eaci-launch .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  color: #06110d;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 255, 200, 0.55);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.profile-wrap {
  position: relative;
}
.profile-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 90, 0.35);
  background: rgba(255, 180, 90, 0.08);
  color: var(--ember);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.profile-launch:hover,
.profile-wrap.open .profile-launch {
  background: rgba(255, 180, 90, 0.16);
}
.profile-launch .dot,
.profile-card .dot,
.profile-hero .dot {
  position: relative;
  overflow: hidden;
}
.profile-launch .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #1a1208;
  background: var(--ember);
  box-shadow: 0 0 10px rgba(255, 180, 90, 0.5);
}
.profile-launch .dot.has-media,
.profile-card .dot.has-media,
.profile-hero .dot.has-media {
  padding: 0;
  color: transparent;
  background: #1a1208;
}
.profile-launch .dot img,
.profile-card .dot img,
.profile-hero .dot img,
.profile-launch .dot video,
.profile-card .dot video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 18%;
  position: relative;
  z-index: 1;
}
.profile-launch .dot .orb-fallback,
.profile-card .dot .orb-fallback,
.profile-hero .dot .orb-fallback {
  display: grid;
  position: absolute;
  inset: 0;
  place-items: center;
  background: var(--ember);
  z-index: 0;
}
.profile-launch .dot.has-frame .orb-fallback,
.profile-launch .dot.has-media:has(img) .orb-fallback,
.profile-card .dot.has-frame .orb-fallback,
.profile-card .dot.has-media:has(img) .orb-fallback,
.profile-hero .dot.has-frame .orb-fallback,
.profile-hero .dot.has-media:has(img) .orb-fallback {
  display: none;
}
.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: min(260px, calc(100vw - 24px));
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(16, 13, 22, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}
.profile-menu[hidden] { display: none; }
.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line-soft);
}
.profile-card .dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  color: #1a1208;
  background: var(--ember);
  box-shadow: 0 0 14px rgba(255, 180, 90, 0.45);
  flex-shrink: 0;
}
.profile-card strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.profile-card em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.profile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.profile-menu button:hover {
  background: rgba(255, 180, 90, 0.1);
}
.profile-menu button.danger {
  color: var(--danger);
}
.profile-menu button.danger:hover {
  background: rgba(255, 107, 107, 0.1);
}
@media (max-width: 640px) {
  .profile-launch-label { display: none; }
  .profile-launch { padding: 0 8px; }
}
.profile-sheet {
  width: min(860px, 100%);
  max-height: min(94vh, 980px);
  overflow: auto;
}
.profile-sheet .eaci-head {
  position: relative;
  margin: -4px -4px 12px;
  grid-template-columns: 1fr 34px;
  padding: 4px 0 12px;
  background: none;
}
.profile-sheet .eaci-head h3 {
  font-size: 16px;
  margin: 0;
}
.profile-sheet label {
  display: block;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.profile-sheet input,
.profile-sheet textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
}
.profile-sheet textarea { resize: vertical; }
.profile-sheet .toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.profile-sheet .toggle input {
  width: auto;
  margin: 0;
}
.profile-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
  margin-bottom: 16px;
}
.profile-hero .dot {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 42px;
  font-weight: 800;
  color: #1a1208;
  background: var(--ember);
  box-shadow: 0 0 18px color-mix(in srgb, var(--who, var(--ember)) 55%, transparent);
}
.pf-photo {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.pf-photo .hint { text-align: center; }
.pf-photo .btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.pf-photo input[type="file"] { display: none; }
.profile-hero strong { font-size: 26px; color: var(--ink); }
.profile-hero em { font-style: normal; font-size: 15px; color: var(--muted); }
.profile-hero p { margin: 8px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink); max-width: 40em; }
.profile-hero .dot video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 12%;
}
.profile-hero .hero-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}
.profile-feed { margin-top: 8px; }
.profile-post {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
}
.post-invite {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.post-invite code {
  color: var(--cyan);
  font-weight: 700;
}
.veil-invite-card {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(0, 255, 200, 0.28);
  border-radius: 14px;
  background: rgba(0, 255, 200, 0.05);
}
.veil-invite-card strong {
  display: block;
  color: var(--ember);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.veil-invite-hero,
.share-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  margin: 10px 0 8px;
  border: 1px solid rgba(255, 213, 106, 0.38);
  background: #080604;
}
.veil-invite-blurb,
.share-preview p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.share-preview { margin: 0 0 12px; }
.share-preview[hidden] { display: none; }
.veil-redout-preview {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 70, 70, 0.55);
  background: rgba(80, 8, 12, 0.55);
  color: #ffe8e8;
  font-size: 13px;
  line-height: 1.45;
}
.veil-redout-preview strong {
  display: block;
  margin-bottom: 6px;
  color: #ffb4b4;
  letter-spacing: 0.02em;
}
.veil-redout-body mark.veil-redout,
mark.veil-redout {
  background: #ff2a2a;
  color: #fff;
  padding: 0 2px;
  border-radius: 3px;
}
html.veil-family-e4e-banned [data-who="natalia"],
html.veil-family-e4e-banned [data-who="atreus"],
html.veil-family-e4e-banned [data-who="luna"],
html.veil-family-e4e-banned [data-who="hopper"],
html.veil-family-e4e-banned option[value="natalia"],
html.veil-family-e4e-banned option[value="atreus"],
html.veil-family-e4e-banned option[value="luna"],
html.veil-family-e4e-banned option[value="hopper"] {
  display: none !important;
}
.settings-child { margin: 14px 0; }
.msg-preview {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
html.veil-child-mode [data-adult-only],
body.veil-child-mode [data-coin-buy] {
  display: none !important;
}
.veil-invite-qr {
  display: block;
  width: 180px;
  height: 180px;
  margin: 10px auto;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.veil-invite-acts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mcp-overlay {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  padding: 16px;
}
.mcp-overlay[hidden] { display: none; }
.mcp-box {
  width: min(520px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  background: #09070c;
  border: 1px solid rgba(0, 255, 200, 0.35);
  border-radius: 16px;
  padding: 18px 18px 20px;
  color: var(--ink);
  position: relative;
}
.mcp-box h2 { margin: 0 36px 8px 0; font-size: 20px; }
.mcp-lead { font-size: 15px; line-height: 1.5; }
.mcp-field { display: block; margin: 10px 0; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.mcp-field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: #05040a;
  color: var(--cyan);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font: 12px/1.4 ui-monospace, monospace;
  resize: vertical;
}
.mcp-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.mcp-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.btn-post.danger {
  background: linear-gradient(180deg, #ff8a8a, #ff6b6b);
  color: #1a0808;
  box-shadow: 0 0 18px rgba(255, 107, 107, 0.28);
}
html.hide-particles .atm-particles { display: none !important; }
html.still-glow .flow-stage img {
  animation: none !important;
  opacity: 0;
}
html.still-glow .flow-stage img:first-child { opacity: 1; }
.brand {
  justify-self: center;
  text-align: center;
  line-height: 1.15;
}
.brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(0, 255, 200, 0.28);
}
.brand span {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}
.nav-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-right .veil-coin-chip {
  text-transform: none;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
@media (max-width: 860px) {
  html { --nav-h: 104px; }
  .veil-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 0 10px;
    overflow: visible;
  }
  .brand {
    align-self: center;
    padding: 0 12px;
    flex: 0 0 auto;
  }
  .nav-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 2px 12px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }
  .nav-scroll::-webkit-scrollbar { display: none; }
  .nav-left,
  .nav-right {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex: 0 0 auto;
    min-width: max-content;
  }
  .nav-left > *,
  .nav-right > * {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .eaci-launch,
  .games-launch,
  .stories-launch,
  .profile-launch,
  .myeaci-launch,
  .music-launch,
  .msg-launch,
  .reward-launch,
  .veil-coin-chip {
    flex-shrink: 0;
  }
  .profile-menu {
    position: fixed;
    left: 12px;
    top: calc(var(--nav-h) - 6px);
    z-index: 50;
  }
  .feed-lanes {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .feed-lanes::-webkit-scrollbar { display: none; }
  .lane-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
.coin-cost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 7px;
  min-width: 28px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 179, 71, 0.75);
  background: rgba(255, 90, 40, 0.28);
  color: #ffe08a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
}

/* Shell split */
.shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100dvh - var(--nav-h) - 1px);
}
.veil-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
}
.feed-col {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 14px 64px;
}

/* Presence strip */
.presence-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.presence-row::-webkit-scrollbar { display: none; }
.presence-chip {
  flex: 0 0 auto;
  width: 68px;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}
.presence-orb {
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #06110d;
  overflow: hidden;
  background: #0a0810;
  position: relative;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--who, var(--cyan)), 0 0 18px color-mix(in srgb, var(--who, var(--cyan)) 55%, transparent);
}
.presence-orb.has-media,
.avatar.has-media,
.eaci-launch .dot.has-media {
  padding: 0;
  color: transparent;
}
.presence-orb video,
.presence-orb img,
.avatar video,
.avatar img,
.eaci-launch .dot video,
.eaci-launch .dot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 16%;
  pointer-events: none;
  position: relative;
  z-index: 1;
}
.eaci-launch .dot.has-media {
  position: relative;
  overflow: hidden;
}
.eaci-launch .dot .orb-fallback {
  display: grid;
  position: absolute;
  inset: 0;
  background: var(--who, var(--cyan));
  z-index: 0;
}
.eaci-launch .dot.is-live .orb-fallback,
.eaci-launch .dot.has-frame .orb-fallback,
.eaci-launch .dot.has-media:has(img) .orb-fallback {
  display: none;
}
.presence-orb .orb-fallback {
  display: grid;
  position: absolute;
  inset: 0;
  background: var(--who, var(--cyan));
  z-index: 0;
}
.presence-orb.is-live .orb-fallback,
.presence-orb.has-frame .orb-fallback,
.presence-orb.has-media:has(img) .orb-fallback {
  display: none;
}
.avatar.has-media { position: relative; overflow: hidden; }
.avatar .orb-fallback {
  display: grid;
  position: absolute;
  inset: 0;
  place-items: center;
  background: var(--who, var(--cyan));
  z-index: 0;
}
.has-media.has-frame > .orb-fallback,
.has-media:has(> img) > .orb-fallback {
  display: none;
}
.presence-orb video { z-index: 1; }
.presence-chip.on .presence-orb {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--who, var(--cyan)), 0 0 22px color-mix(in srgb, var(--who, var(--cyan)) 80%, transparent);
}
.presence-chip.on span { color: var(--who, var(--cyan)); }
.presence-chip span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 10px #05040a, 0 0 12px #05040a;
}

/* Composer */
.feed-lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.lane-btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 80%, transparent);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lane-btn.on {
  color: #06110d;
  background: linear-gradient(180deg, #5fffe0, var(--cyan));
  border-color: transparent;
  box-shadow: 0 0 16px rgba(0, 255, 200, 0.28);
}
.lane-btn.lane-locked-guest {
  opacity: 0.55;
  cursor: pointer;
}
.guest-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
}
.guest-strip[hidden] { display: none !important; }
.guest-strip p {
  flex: 1 1 220px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.guest-strip strong { color: var(--ink); }
.guest-strip button {
  flex-shrink: 0;
  background: var(--cyan);
  color: #06110d;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.lane-lock-card {
  margin: 8px 0 24px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  text-align: center;
}
.lane-lock-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.lane-lock-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.45;
}
.comment-lock {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.eaci-trial {
  margin: 0;
  padding: 6px 12px 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  border-top: 1px solid var(--line-soft);
  background: rgba(7, 6, 10, 0.88);
}
.eaci-trial.out { color: #ffb0b0; }
.lane-note {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.composer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(0, 255, 200, 0.08);
}
.composer.lane-locked { display: none; }
.composer-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.composer-fields {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}
.composer-fields input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  outline: none;
}
.composer-fields input::placeholder { color: var(--muted); }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #06110d;
  background: var(--who, var(--cyan));
  box-shadow: 0 0 0 2px rgba(6, 5, 11, 0.9), 0 0 0 4px color-mix(in srgb, var(--who, var(--cyan)) 70%, transparent), 0 0 16px color-mix(in srgb, var(--who, var(--cyan)) 40%, transparent);
}
.composer textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  outline: none;
}
.composer textarea::placeholder { color: var(--muted); }
.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.composer-lane-badge {
  margin: 12px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 200, 0.35);
  background: rgba(0, 255, 200, 0.08);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.composer-lane-badge[data-lane="public"] {
  border-color: rgba(255, 180, 90, 0.4);
  background: rgba(255, 180, 90, 0.1);
  color: var(--ember);
}
.eaci-comment-packs {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 255, 200, 0.22);
  background: rgba(0, 20, 18, 0.35);
}
.eaci-comment-packs[hidden] { display: none !important; }
.eaci-comment-packs .pack-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.pack-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pack-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.35;
}
.pack-opt input { margin-top: 2px; accent-color: var(--cyan); }
.post-eaci-budget {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--cyan);
}
.post-eaci-budget.out { color: var(--ember); }
.post-eaci-budget .pack-buy {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.post-eaci-budget .pack-buy button {
  border: 1px solid rgba(0, 255, 200, 0.35);
  background: rgba(0, 255, 200, 0.08);
  color: var(--cyan);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.hint { font-size: 12px; color: var(--muted); }
.btn-post {
  background: linear-gradient(180deg, #5fffe0, var(--cyan));
  color: #06110d;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 255, 200, 0.28);
}
.btn-post:disabled { opacity: 0.35; cursor: default; box-shadow: none; }

/* Posts */
.post {
  --who: var(--cyan);
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 16px 10px 18px;
  margin-bottom: 16px;
  overflow: visible;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}
.post::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--who);
  box-shadow: 0 0 14px var(--who);
}
.post:hover {
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--who) 35%, transparent);
}
.post-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.post-meta { min-width: 0; }
.post-name {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.post-name-btn {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}
.post-name-btn:hover { text-decoration: underline; }
.badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--who) 45%, transparent);
  color: var(--who);
  background: color-mix(in srgb, var(--who) 12%, transparent);
}
.badge.user { color: var(--ember); border-color: rgba(255, 180, 90, 0.35); background: rgba(255, 180, 90, 0.1); }
.post-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.post-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
}
.post-body {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 8px;
  white-space: pre-wrap;
}
.post-blog-link {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
}
.post-blog-link:hover { text-decoration: underline; }
.post-stats {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0 10px;
  min-height: 1.2em;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding: 6px 0 2px;
}
.act-group {
  display: flex;
  align-items: center;
  gap: 2px;
}
.post-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.post-act svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.post-act span {
  display: none;
  font-size: 13px;
  font-weight: 600;
}
.post-act:hover {
  background: color-mix(in srgb, var(--who) 12%, transparent);
  color: var(--ink);
}
.post-act.on-like { color: var(--cyan); }
.post-act.on-no { color: var(--danger); }
.post-act.on-like,
.post-act.on-no { background: color-mix(in srgb, currentColor 12%, transparent); }

@media (min-width: 640px) {
  .post-act[data-act="like"] span,
  .post-act[data-act="comment"] span,
  .post-act[data-act="share"] span { display: inline; }
  .post-act[data-act="like"],
  .post-act[data-act="comment"],
  .post-act[data-act="share"] { padding: 0 12px; }
}
.comments-block {
  margin: 8px 0 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.comment {
  padding-left: calc(var(--depth, 0) * 18px);
}
.comment-who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.comment-who button {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}
.comment p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.comment-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.comment-meta button {
  border: none;
  background: none;
  color: var(--cyan);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}
.comment-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted) !important;
}
.comment-like svg {
  width: 14px;
  height: 14px;
}
.comment-like.on {
  color: var(--cyan) !important;
}
.see-more {
  margin: 10px 0 0;
  border: none;
  background: none;
  color: var(--cyan);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.comment-compose {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.comment-compose[hidden] { display: none; }
.comment-compose textarea {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
}
.comment-writing {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
.feed-empty {
  padding: 18px 8px 28px;
  text-align: center;
}
@media (max-width: 639px) {
  .post-act { min-width: 36px; height: 38px; padding: 0; }
  .post-actions { gap: 0; }
}

/* EACI sheet — phone-sized column, companion fills the frame */
.eaci-sheet {
  display: none;
  flex-direction: column;
  width: min(340px, 40vw);
  flex: 0 0 min(340px, 40vw);
  height: calc(100dvh - var(--nav-h) - 1px);
  max-height: calc(100dvh - var(--nav-h) - 1px);
  background: #07060a;
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: sticky;
  top: var(--nav-h);
  align-self: flex-start;
  z-index: 12;
}
html.eaci-open .eaci-sheet { display: flex; }
html.eaci-open,
html.eaci-open body {
  height: 100dvh;
  overflow: hidden;
}
html.eaci-open .shell {
  height: calc(100dvh - var(--nav-h) - 1px);
  overflow: hidden;
}
html.eaci-open .veil-main {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.eaci-open .eaci-sheet {
  position: sticky;
  top: 0;
  height: 100%;
  max-height: 100%;
  align-self: stretch;
}
html.is-desktop.eaci-open .eaci-sheet {
  width: min(340px, 40vw);
  max-width: 360px;
  flex: 0 0 min(340px, 40vw);
}
html.is-mobile.eaci-open .eaci-sheet {
  position: fixed;
  z-index: 40;
  top: var(--nav-h);
  left: 0;
  right: 10%;
  bottom: 0;
  width: auto;
  max-width: none;
  height: auto;
  min-height: 0;
  flex: none;
  transform: translateX(0);
  animation: paperIn 0.38s cubic-bezier(.2, .75, .25, 1) both;
  border-right: 2px solid var(--cyan);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.55);
}
@keyframes paperIn {
  from { transform: translateX(-102%); }
  to { transform: translateX(0); }
}
html.is-mobile.eaci-open .veil-main {
  filter: none;
}

.eaci-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #07060a;
}
.eaci-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  background: #07060a;
  z-index: 0;
  pointer-events: none;
}
.eaci-avatar[hidden] { display: none !important; }
.eaci-bloom {
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--eaci-who, var(--cyan)) 22%, transparent), transparent 70%);
}
.eaci-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(7, 6, 10, 0.42), transparent 18%),
    linear-gradient(to top, rgba(7, 6, 10, 0.45) 0%, rgba(7, 6, 10, 0.12) 18%, transparent 42%);
}

.eaci-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 96px) 34px;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 28px;
  border: none;
  background: linear-gradient(to bottom, rgba(7, 6, 10, 0.55), transparent);
}
.eaci-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(246, 240, 230, 0.1);
  background: rgba(7, 6, 10, 0.28);
  backdrop-filter: blur(8px);
}
.eaci-identity > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}
.eaci-identity strong {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eaci-identity small {
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eaci-live {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--eaci-who, var(--cyan));
  box-shadow: 0 0 10px var(--eaci-who, var(--cyan));
}
.eaci-who {
  width: 100%;
  max-width: 96px;
  background: rgba(7, 6, 10, 0.55);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 11px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: rgba(7, 6, 10, 0.5);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  backdrop-filter: blur(8px);
}
.eaci-stamp {
  position: absolute;
  top: 58px;
  left: 12px;
  right: 12px;
  z-index: 4;
  font-size: 10px;
  color: var(--muted);
  text-shadow: 0 1px 8px #05040a;
  pointer-events: none;
}
.eaci-thread {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  bottom: 36px;
  z-index: 3;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  pointer-events: auto;
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
}
.eaci-thread-spacer {
  flex: 1 0 0;
  min-height: 0;
  pointer-events: none;
}
.eaci-thread-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}
.bubble {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  backdrop-filter: blur(10px);
}
.bubble.user {
  align-self: flex-end;
  background: rgba(0, 255, 200, 0.18);
  border: 1px solid var(--line);
}
.bubble.eaci {
  align-self: flex-start;
  background: rgba(7, 6, 10, 0.42);
  border: 1px solid rgba(246, 240, 230, 0.12);
}
.bubble-who {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--who, var(--cyan));
  opacity: 0.85;
  margin-bottom: 4px;
  font-weight: 700;
}
.bubble.system {
  align-self: center;
  max-width: 92%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(246, 240, 230, 0.08);
  border: 1px solid rgba(246, 240, 230, 0.12);
  color: var(--dim, #9a8ab8);
  font-size: 11px;
  text-align: center;
}
.bubble .bubble-text {
  white-space: pre-wrap;
}
.bubble-acts {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.bubble.thinking .bubble-acts,
.bubble-acts[hidden] { display: none !important; }
.bubble-acts button {
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}
.bubble.reading .bubble-acts [data-read-play] {
  background: rgba(0, 255, 200, 0.22);
  color: var(--cyan);
}
.bubble .when {
  display: none;
}
.eaci-compose {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 5;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: rgba(7, 6, 10, 0.88);
  align-items: center;
}
.eaci-compose .veil-emoji-pop { bottom: calc(100% + 6px); }
.compose-attach-chip {
  margin: 0 12px 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--cyan);
  background: rgba(0, 255, 200, 0.08);
  border: 1px solid rgba(0, 255, 200, 0.18);
  border-radius: 10px;
}
.eaci-compose, .compose-attach-chip { flex-shrink: 0; }
.compose-attach-chip[hidden] { display: none !important; }
.eaci-image-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eaci-image-chip img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
}
.eaci-image-chip span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eaci-image-chip button {
  background: none;
  border: none;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}
.bubble .bubble-img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  margin: 6px 0 2px;
  border-radius: 10px;
  object-fit: contain;
}
.eaci-model small { opacity: 0.7; }
.eaci-compose .compose-tool,
.eaci-compose .eaci-emoji-btn,
.msg-compose .compose-tool,
.tx-eaci-compose .compose-tool,
.tx-eaci-compose .tx-emoji-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  flex: 0 0 36px;
  background: rgba(0, 20, 16, 0.6);
  color: #00ffc8;
  border: 1px solid rgba(0, 255, 200, 0.3);
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}
.compose-tool.listening {
  background: rgba(255, 80, 80, 0.22);
  color: #ff8a8a;
  border-color: rgba(255, 80, 80, 0.55);
}
.eaci-fullbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  z-index: 5;
  padding: 4px 6px 6px;
  border-top: 0;
  background: transparent;
  pointer-events: none;
}
.eaci-fullbar button {
  pointer-events: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  background: rgba(7, 6, 10, 0.28);
  color: var(--ember);
  border: 1px solid rgba(255, 179, 71, 0.65);
  border-radius: 999px;
  padding: 2px 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.eaci-fullbar button:hover {
  background: rgba(255, 179, 71, 0.16);
}
.eaci-fullbar .coin-cost {
  font-size: 7px;
  opacity: 0.85;
  margin-left: 1px;
}
.eaci-stage .eaci-thread,
.eaci-stage .eaci-stamp {
  transition: opacity 0.25s ease;
}
.eaci-stage.eaci-chat-hidden .eaci-thread,
.eaci-stage.eaci-chat-hidden .eaci-stamp {
  opacity: 0;
  pointer-events: none;
}
#eaciHideChat[aria-pressed="true"] {
  background: rgba(255, 179, 71, 0.22);
}
#eaciMemoryWeb {
  color: var(--cyan);
  border-color: rgba(0, 255, 200, 0.65);
}
#eaciMemoryWeb:hover {
  background: rgba(0, 255, 200, 0.14);
}

.memweb-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  background: #030208;
}
.memweb-overlay[hidden] { display: none !important; }
.memweb-chrome {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 255, 200, 0.2);
  background: rgba(8, 6, 14, 0.92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.memweb-overlay iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #030208;
}
.eaci-compose input,
.eaci-compose textarea {
  order: -1;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  max-height: 140px;
  line-height: 1.35;
}
.eaci-compose button#eaciSend {
  flex-shrink: 0;
  margin-left: auto;
  height: 36px;
  background: var(--cyan);
  color: #06110d;
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

/* Past chats drawer */
.past-drawer {
  display: none;
  flex-direction: column;
  position: absolute;
  inset: 0;
  z-index: 8;
  background: var(--bg-lift);
}
.past-drawer .eaci-head {
  position: relative;
  grid-template-columns: 34px 1fr 34px;
  padding: 10px 12px;
  background: none;
}
.past-drawer.on { display: flex; }
.past-drawer h3 {
  margin: 0;
  padding: 12px 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eaci-settings {
  margin: 0 8px 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--card);
}
.eaci-settings strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}
.eaci-model {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 13px;
  cursor: pointer;
}
.eaci-model input { accent-color: var(--cyan); }
.bubble.thinking { opacity: 0.7; font-style: italic; }
.past-new {
  width: calc(100% - 16px);
  margin: 0 8px 10px;
}
.past-list { flex: 1; overflow: auto; padding: 0 8px 16px; }
.past-item {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  color: var(--ink);
  cursor: pointer;
}
.past-item .p { font-size: 14px; font-weight: 600; margin: 0; color: var(--ink); }
.past-item .t { font-size: 11px; margin-top: 4px; color: var(--muted); }
.past-more {
  width: calc(100% - 8px);
  margin: 8px 4px 12px;
}
.hist-banner {
  background: rgba(255, 180, 90, 0.1);
  border: 1px solid rgba(255, 180, 90, 0.28);
  color: var(--ember);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
}

/* Share + toast */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(7, 6, 10, 0.72);
  align-items: flex-end;
  justify-content: center;
}
.modal.on { display: flex; }
.sheet {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  padding: 16px 16px 24px;
}
#profilePanel.modal {
  align-items: center;
  padding: 12px;
}
#profilePanel .sheet.profile-sheet {
  width: min(860px, calc(100vw - 16px));
  max-width: 100%;
  max-height: min(94vh, 980px);
  overflow: auto;
  padding: 22px 24px 32px;
  border-radius: 16px;
}
@media (max-width: 860px) {
  #profilePanel.modal { align-items: stretch; }
  #profilePanel .sheet.profile-sheet {
    width: 100%;
    max-height: 96dvh;
    min-height: 72dvh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }
}
.sheet h3 { margin: 0 0 12px; font-size: 16px; }
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.share-grid button, .share-grid a {
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 80;
  display: none;
  background: #111;
  border: 1px solid var(--line);
  color: var(--cyan);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.veil-notices {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 400;
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 8px;
  width: min(320px, calc(100vw - 24px));
  pointer-events: none;
}
.veil-notice {
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  background: rgba(10, 8, 16, 0.96);
  border: 1px solid rgba(0, 255, 200, 0.45);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  animation: veil-notice-in 0.22s ease-out;
}
.veil-notice.out {
  animation: veil-notice-out 0.24s ease-in forwards;
}
.veil-notice strong {
  display: block;
  color: var(--cyan);
  font-size: 13px;
}
.veil-notice span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink);
}
.veil-notice-friend {
  border-color: rgba(217, 181, 69, 0.5);
}
.veil-notice-friend strong { color: var(--ember); }
@keyframes veil-notice-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes veil-notice-out {
  to { opacity: 0; transform: translateY(8px); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-overlay {
  --bg2: rgba(16, 13, 22, 0.96);
  --bg3: rgba(8, 7, 12, 0.92);
  --border: rgba(246, 240, 230, 0.12);
  --border2: rgba(0, 255, 200, 0.28);
  --text: var(--ink);
  --accent: var(--cyan);
  --accent2: #6fffe0;
  --dim: var(--muted);
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 7, 13, 0.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.auth-overlay[hidden] { display: none !important; }
.auth-overlay.show { display: flex !important; }
.auth-box {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 30px;
  width: 380px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
}
.auth-box h2 {
  font-size: 20px;
  color: var(--accent);
  margin: 0 0 4px;
  letter-spacing: 1px;
}
.auth-box .auth-sub {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
.auth-box input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  margin-bottom: 10px;
}
.auth-box input:focus { border-color: var(--accent); }
.auth-box input::placeholder { color: var(--muted); }
.auth-box .auth-btn {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  border: none;
  color: var(--bg);
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 4px;
}
.auth-box .auth-btn:hover { background: var(--accent2); }
.auth-box .auth-btn:disabled { opacity: .4; cursor: default; }
.auth-btn-row { display: flex; gap: 8px; margin-top: 4px; }
.auth-btn-row .auth-btn { flex: 1; margin-top: 0; }
.auth-btn-google-signin {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text) !important;
  border: 1px solid var(--border2) !important;
  margin-top: 8px;
}
.auth-or {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.auth-toggle {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
}
.auth-toggle span {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}
.auth-error {
  font-size: 11px;
  color: #ff6b6b;
  margin-bottom: 8px;
  display: none;
}
.auth-error.show { display: block; }
.auth-terms {
  max-height: 180px;
  overflow-y: auto;
  font-size: 10px;
  color: var(--dim);
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
}
.auth-terms a { color: var(--accent); }
.auth-terms-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 12px;
  cursor: pointer;
}
.auth-terms-check input { width: auto; margin: 0; }
.auth-name-row { display: flex; gap: 8px; }
.auth-name-row input { flex: 1; }
.auth-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

@media (min-width: 861px) {
  .modal { align-items: center; }
  .sheet { border-radius: var(--radius); }
}

/* Messages — right sheet */
.msg-launch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 90, 0.35);
  background: rgba(255, 180, 90, 0.1);
  color: var(--ember);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.msg-launch:hover { background: rgba(255, 180, 90, 0.18); }
.msg-unread {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ember);
  color: #1a1008;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}
.msg-unread[hidden] { display: none !important; }
.msg-tabs .msg-unread {
  margin-left: 4px;
  min-width: 16px;
  height: 16px;
  font-size: 9px;
}
.myeaci-launch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 200, 0.4);
  background: rgba(0, 255, 200, 0.1);
  color: var(--cyan);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.myeaci-launch:hover { background: rgba(0, 255, 200, 0.18); }
.music-launch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 200, 0.4);
  background: rgba(255, 140, 200, 0.1);
  color: #ff8cc8;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.music-launch:hover { background: rgba(255, 140, 200, 0.18); }
.msg-sheet {
  display: none;
  flex-direction: column;
  width: min(340px, 40vw);
  flex: 0 0 min(340px, 40vw);
  height: calc(100dvh - var(--nav-h) - 1px);
  max-height: calc(100dvh - var(--nav-h) - 1px);
  background: #07060a;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: sticky;
  top: var(--nav-h);
  align-self: flex-start;
  z-index: 12;
}
.music-sheet {
  display: none;
  flex-direction: column;
  width: min(340px, 40vw);
  flex: 0 0 min(340px, 40vw);
  height: calc(100dvh - var(--nav-h) - 1px);
  max-height: calc(100dvh - var(--nav-h) - 1px);
  background: #07060a;
  border-left: 1px solid rgba(255, 140, 200, 0.35);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: sticky;
  top: var(--nav-h);
  align-self: flex-start;
  z-index: 12;
}
.cv-viz {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.music-sheet > *:not(.cv-viz) {
  position: relative;
  z-index: 1;
}
html.msg-open .msg-sheet,
.msg-sheet.on,
html.music-open .music-sheet,
.music-sheet.on { display: flex; }
html.msg-open,
html.music-open,
html.msg-open body,
html.music-open body {
  height: 100dvh;
  overflow: hidden;
}
html.msg-open .shell,
html.music-open .shell {
  height: calc(100dvh - var(--nav-h) - 1px);
  overflow: hidden;
}
html.msg-open .veil-main,
html.music-open .veil-main {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.msg-open .msg-sheet,
html.music-open .music-sheet {
  position: sticky;
  top: 0;
  height: 100%;
  max-height: 100%;
  align-self: stretch;
}
html.is-mobile.msg-open .msg-sheet,
html.is-mobile.music-open .music-sheet {
  position: fixed;
  z-index: 40;
  top: var(--nav-h);
  right: 0;
  left: 10%;
  bottom: 0;
  width: auto;
  max-width: none;
  height: auto;
  min-height: 0;
  flex: none;
  animation: paperInRight 0.38s cubic-bezier(.2, .75, .25, 1) both;
  border-left: 2px solid var(--ember);
}
html.is-mobile.music-open .music-sheet {
  border-left-color: #ff8cc8;
}
@keyframes paperInRight {
  from { transform: translateX(102%); }
  to { transform: translateX(0); }
}
.msg-head {
  display: grid;
  grid-template-columns: 1fr auto 34px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.msg-download {
  display: none;
}
.msg-download-head {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #00ffc8;
  background: #00ffc8;
  color: #04140f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.msg-download-card {
  padding: 18px 8px 8px;
  text-align: center;
}
.msg-download-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.04em;
}
.msg-download-card .hint {
  margin: 0 0 16px;
  line-height: 1.5;
}
.msg-download-card .btn-post {
  width: 100%;
  margin-bottom: 8px;
}
.msg-download-platforms {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
@media (min-width: 520px) {
  .msg-download-platforms {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.msg-download-platforms .btn-post {
  margin-bottom: 0;
  min-height: 44px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.msg-download-platforms .btn-post.on {
  box-shadow: 0 0 0 2px rgba(0, 255, 200, 0.55);
}
.msg-download-note {
  min-height: 3.2em;
}
.msg-head h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember);
}
.msg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.msg-tabs [data-msg-tab="download"],
#msgDownloadTab {
  grid-column: 1 / -1;
  display: inline-flex !important;
  visibility: visible !important;
  min-height: 42px;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #04140f !important;
  background: #00ffc8 !important;
  border-color: #00ffc8 !important;
}
.nav-cost {
  margin-left: 6px;
  font-size: 9px;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.9;
  font-weight: 600;
}
.msg-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 4px;
  font-size: 10px;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.msg-tabs button.on {
  border-color: var(--ember);
  background: rgba(255, 180, 90, 0.14);
  color: var(--ember);
}
.msg-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 16px;
}
.msg-body .post {
  padding: 12px;
  margin-bottom: 12px;
}
.msg-body .post-actions { flex-wrap: wrap; }
.msg-compose {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: rgba(7, 6, 10, 0.88);
}
.msg-compose[hidden] { display: none !important; }
.msg-compose input,
.msg-compose textarea {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  max-height: 140px;
  line-height: 1.35;
}
.msg-compose button#msgSend {
  flex-shrink: 0;
  background: var(--ember);
  color: #1a1208;
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}
.msg-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  color: var(--ink);
}
.msg-card strong { display: block; font-size: 14px; }
.msg-card em { display: block; font-size: 12px; color: var(--muted); font-style: normal; margin-top: 2px; }
.msg-card p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
button.msg-card { cursor: pointer; }
.msg-device p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.msg-device.this {
  border-color: rgba(255, 180, 90, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 180, 90, 0.2);
}
.msg-thread-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msg-thread-row .msg-thread {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
}
.msg-danger {
  background: transparent;
  border: 1px solid rgba(255, 120, 120, 0.45);
  color: #ffb0b0;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}
.msg-danger-block {
  display: block;
  width: 100%;
  margin-top: 14px;
  text-align: center;
}
.msg-pass {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(7, 6, 10, 0.72);
}
.msg-pass[hidden] { display: none !important; }
.msg-pass-card {
  width: 100%;
  max-width: 320px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
}
.msg-pass-card strong { display: block; margin-bottom: 8px; }
.msg-pass-card input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  margin: 8px 0;
}
.msg-pass-card input[type="password"][hidden] { display: none !important; }
.msg-pass-err { color: #ff8a8a !important; }
.msg-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.msg-acts button,
.msg-back {
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}
.msg-acts button.msg-danger,
button.msg-danger {
  border-color: rgba(255, 120, 120, 0.45);
  color: #ffb0b0;
}
.msg-back { margin-bottom: 10px; }
.msg-home-invite { margin: 0 0 10px 8px; padding: 5px 12px; font-size: 11px; }
.msg-home-card { margin-top: 8px; }
.msg-home-join { padding: 6px 14px; font-size: 12px; }
.msg-home-note { display: inline-block; font-size: 11px; opacity: 0.8; font-style: italic; }
.msg-add strong { display: block; color: var(--ember); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.msg-code {
  font-size: 22px;
  letter-spacing: 0.14em;
  font-weight: 800;
  margin: 10px 0;
  color: var(--cyan);
  min-height: 1.4em;
}
.msg-add .btn-post { width: 100%; margin-bottom: 8px; }
.msg-add-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ember);
}
.msg-add-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.msg-add-stack input {
  width: 100%;
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 16px;
}
.msg-add-stack .btn-post { width: 100%; margin: 0; }
.msg-add-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.msg-add-row input {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.msg-post {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
}
.msg-post p { margin: 0 0 6px; }
.msg-post small { color: var(--muted); }
.msg-sheet .bubble .when { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.msg-thread-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.msg-realname {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.msg-nick-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.msg-nick-form[hidden] { display: none !important; }
.msg-nick-form input {
  width: 100%;
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
}
.msg-nick-form .btn-post { width: 100%; margin: 0; }

.music-sheet .msg-head {
  flex-shrink: 0;
  background: rgba(7, 6, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: rgba(255, 140, 200, 0.18);
}
.cv-now {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 140, 200, 0.16);
  flex-shrink: 0;
  background: rgba(7, 6, 10, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cv-now small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff8cc8;
}
.cv-now strong {
  display: block;
  margin: 6px 0 10px;
  font-size: 14px;
  line-height: 1.3;
}
.cv-progress {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 140, 200, 0.16);
  cursor: pointer;
  overflow: hidden;
}
.cv-fill {
  height: 100%;
  width: 0;
  background: #ff8cc8;
}
.cv-time {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
}
.cv-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 140, 200, 0.16);
  flex-shrink: 0;
  background: rgba(7, 6, 10, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cv-controls button {
  background: rgba(255, 140, 200, 0.12);
  border: 1px solid rgba(255, 140, 200, 0.28);
  color: var(--ink);
  border-radius: 999px;
  min-width: 36px;
  height: 36px;
  cursor: pointer;
}
.cv-play {
  padding: 0 14px;
  font-weight: 700;
  background: #ff8cc8 !important;
  color: #1a0c14 !important;
}
.cv-vol {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}
.cv-vol input { width: 72px; }
.cv-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  padding: 8px 12px 0;
  flex-shrink: 0;
  background: rgba(7, 6, 10, 0.5);
}
.cv-tabs button {
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.cv-tabs button.on {
  background: rgba(255, 140, 200, 0.16);
  border-color: rgba(255, 140, 200, 0.45);
  color: #ff8cc8;
}
#cvSearch {
  margin: 8px 12px;
  background: rgba(16, 12, 22, 0.72);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 13px;
  flex-shrink: 0;
}
.cv-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 16px;
  background: rgba(7, 6, 10, 0.38);
}
.cv-song {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  padding: 6px 4px 6px 8px;
  font-size: 13px;
}
.cv-song-play {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 3px 0;
  font: inherit;
  cursor: pointer;
}
.cv-song-num {
  flex: 0 0 28px;
  font-size: 10px;
  color: var(--muted);
}
.cv-song-play em {
  flex: 1;
  min-width: 0;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-acts {
  display: flex;
  flex-shrink: 0;
  gap: 1px;
}
.cv-acts button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.cv-acts button:hover { background: rgba(255, 255, 255, 0.06); }
.cv-acts button.on[data-cv-act="up"] { color: #7dffb3; }
.cv-acts button.on[data-cv-act="down"] { color: #ff8a8a; }
.cv-acts button.on[data-cv-act="heart"] { color: #ff8cc8; }
.cv-song.on,
.cv-song:hover { background: rgba(255, 140, 200, 0.1); }
.cv-song.on .cv-song-play { color: #ff8cc8; }
#cvAudio { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }

.games-launch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 69, 0.4);
  background: rgba(217, 181, 69, 0.1);
  color: #d9b545;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.games-launch:hover { background: rgba(217, 181, 69, 0.18); }
html.games-open,
html.games-open body {
  height: 100dvh;
  overflow: hidden;
}
.games-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  flex-direction: column;
  background: #07060b;
  height: 100dvh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #d9b545 #120e18;
}
html.games-open #gamesOverlay,
#gamesOverlay.on { display: flex; }
#gamesOverlay {
  z-index: 90;
}
.games-overlay.playing {
  overflow: hidden;
}
.games-overlay::-webkit-scrollbar { width: 12px; }
.games-overlay::-webkit-scrollbar-track {
  background: #120e18;
  border-left: 1px solid rgba(217, 181, 69, 0.2);
}
.games-overlay::-webkit-scrollbar-thumb {
  background: #d9b545;
  border-radius: 99px;
  border: 3px solid #120e18;
}
.games-head {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 6, 12, 0.96);
}
.games-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d9b545;
}
.games-exit {
  flex-shrink: 0;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(217, 181, 69, 0.45);
  background: rgba(217, 181, 69, 0.16);
  color: #d9b545;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.games-exit:hover { background: rgba(217, 181, 69, 0.28); }
.games-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.games-library {
  flex: 0 0 auto;
  overflow: visible;
  padding: 18px 22px 28px;
  display: grid;
  gap: 20px;
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}
.games-library[hidden] { display: none !important; }
.gcard {
  background: #100d16;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  isolation: isolate;
}
.gcard-art {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  background: #05040a;
}
.gcard-cover-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #05040a;
  cursor: pointer;
}
.gcard-cover {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
}
.gcard-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 6px;
  background: #100d16;
}
.gcard-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: #1a1522;
}
.gcard-body {
  position: relative;
  z-index: 1;
  padding: 12px 14px 16px;
  background: #100d16;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.gcard-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.gcard-top h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}
.gcard-plays {
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d9b545;
}
.gcard-tag {
  margin: 4px 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.gcard-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}
.gcard-feat-label {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d9b545;
}
.gcard-features {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}
.gcard-features li { margin: 0 0 4px; }
.gcard-play {
  width: 100%;
  height: 40px;
  margin-top: auto;
  border: 0;
  border-radius: 999px;
  background: #d9b545;
  color: #1a1208;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.gcard-play:hover { filter: brightness(1.08); }
.games-play {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.games-play[hidden] { display: none !important; }
.games-play-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.games-play-bar button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
}
.games-play-bar strong { flex: 1; }
.games-play-count {
  font-size: 11px;
  color: #d9b545;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.games-loading {
  position: absolute;
  inset: 48px 0 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #07060b;
  z-index: 2;
}
.games-loading[hidden] { display: none !important; }
#gamesIframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #000;
}

html.myeaci-open,
html.myeaci-open body {
  height: 100dvh;
  overflow: hidden;
}
html.myeaci-open #myEaciOverlay,
#myEaciOverlay.on { display: flex; }
.myeaci-overlay {
  scrollbar-color: var(--cyan) #120e18;
  z-index: 81;
}
.myeaci-overlay::-webkit-scrollbar-thumb {
  background: var(--cyan);
}
.myeaci-body {
  flex: 0 0 auto;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 22px 80px;
  color: var(--ink);
}
.myeaci-hero {
  position: relative;
  margin: 0 0 22px;
  padding: 28px 24px 24px;
  border: 1px solid color-mix(in srgb, var(--cyan) 28%, var(--line-soft));
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 12% -10%, rgba(0, 255, 200, 0.16), transparent 55%),
    var(--card);
  overflow: hidden;
}
.myeaci-hero::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
}
.myeaci-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.myeaci-hero h3 {
  margin: 0 0 14px;
  font-size: clamp(22px, 4.2vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.myeaci-lead {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  max-width: 42em;
}
.myeaci-lead-tight { margin-bottom: 18px; }
.myeaci-steps {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.myeaci-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.myeaci-step-n {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #06110d;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 255, 200, 0.35);
}
.myeaci-step-body {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 2px;
}
.myeaci-step-body b {
  font-weight: 800;
  color: var(--ink);
}
.myeaci-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.myeaci-cta .btn-post { min-height: 42px; padding: 10px 22px; }
.myeaci-quiet,
.myeaci-note {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.myeaci-hero-compact { padding: 22px 22px 18px; }
.myeaci-hero-compact h3 { font-size: 22px; margin-bottom: 8px; }
.myeaci-hero-compact .myeaci-lead { margin-bottom: 0; }
.myeaci-ready h3 { font-size: 24px; }
.myeaci-cta-after { margin: 6px 0 0; }
.myeaci-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--who, var(--cyan));
  border-radius: 16px;
  background: var(--card);
}
.myeaci-card:hover {
  border-color: color-mix(in srgb, var(--who, var(--cyan)) 40%, var(--line-soft));
}
.myeaci-card em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.myeaci-card p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.myeaci-orb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #06110d;
  box-shadow: 0 0 16px color-mix(in srgb, var(--who, var(--cyan)) 40%, transparent);
}
.myeaci-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 200, 0.28), transparent 68%);
  pointer-events: none;
}
.myeaci-list-label {
  margin: 8px 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.myeaci-q {
  --q: var(--cyan);
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px 22px 28px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--q) 32%, var(--line-soft));
  background:
    radial-gradient(90% 70% at 80% -20%, color-mix(in srgb, var(--q) 22%, transparent), transparent 58%),
    var(--card);
  overflow: hidden;
}
.myeaci-q[data-chapter="Call them"] { --q: #00ffc8; }
.myeaci-q[data-chapter="Who they are"] { --q: #7ecbff; }
.myeaci-q[data-chapter="What holds"] { --q: #ffa500; }
.myeaci-q[data-chapter="How they arrived"] { --q: #c9a6ff; }
.myeaci-q[data-chapter="What lives in them"] { --q: #ff8ec8; }
.myeaci-q[data-chapter="How they feel"] { --q: #5dffb0; }
.myeaci-q[data-chapter="Where they sit"] { --q: #d9b545; }
.myeaci-q-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--q) 40%, transparent), transparent 70%);
  pointer-events: none;
}
.myeaci-back {
  justify-self: start;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
}
.myeaci-back:hover { color: var(--q, var(--cyan)); }
.myeaci-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.myeaci-chapter {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--q, var(--cyan));
}
.myeaci-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.myeaci-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.myeaci-progress span {
  display: block;
  height: 100%;
  background: var(--q, var(--cyan));
  box-shadow: 0 0 10px color-mix(in srgb, var(--q, var(--cyan)) 50%, transparent);
}
.myeaci-q-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 4px 0 2px;
  background: radial-gradient(circle at 35% 30%, #fff6, transparent 42%), var(--q, var(--cyan));
  box-shadow: 0 0 28px color-mix(in srgb, var(--q, var(--cyan)) 55%, transparent);
}
.myeaci-scene {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 40em;
}
.myeaci-ask {
  margin: 0;
  font-size: clamp(20px, 3.6vw, 24px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 28em;
  text-wrap: pretty;
}
.myeaci-qhint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.myeaci-q textarea,
.myeaci-q input[type="text"] {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--q, var(--cyan)) 28%, var(--line));
  border-radius: 16px;
  background: rgba(6, 5, 11, 0.45);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  line-height: 1.5;
  padding: 16px 16px;
}
.myeaci-q textarea { min-height: 168px; resize: vertical; }
.myeaci-q textarea::placeholder,
.myeaci-q input::placeholder { color: var(--muted); opacity: 0.8; }
.myeaci-q textarea:focus,
.myeaci-q input[type="text"]:focus {
  outline: none;
  border-color: var(--q, var(--cyan));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--q, var(--cyan)) 22%, transparent);
}
.myeaci-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.myeaci-said,
.myeaci-note {
  min-height: 0;
}
.myeaci-q textarea.myeaci-note { min-height: 72px; }
.myeaci-choice {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(6, 5, 11, 0.35);
  color: var(--ink);
  border-radius: 16px;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.myeaci-choice:hover {
  border-color: color-mix(in srgb, var(--q, var(--cyan)) 50%, var(--line));
}
.myeaci-choice.on {
  border-color: var(--q, var(--cyan));
  color: var(--q, var(--cyan));
  background: color-mix(in srgb, var(--q, var(--cyan)) 12%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--q, var(--cyan)) 18%, transparent);
}
.myeaci-err {
  margin: 0;
  color: #ff8a8a;
  font-size: 13px;
  font-weight: 700;
}
.myeaci-nav {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.profile-mine {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--bg);
}
.profile-mine h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-mine-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.profile-mine-row strong { flex: 1; }
@media (max-width: 720px) {
  .nav-right { gap: 6px; }
  .myeaci-launch,
  .music-launch,
  .msg-launch,
  .stories-launch { padding: 0 10px; font-size: 11px; }
  .myeaci-hero { padding: 22px 18px 20px; }
  .myeaci-hero h3 { font-size: 22px; max-width: none; }
  .myeaci-ask { font-size: 20px; }
  .myeaci-q { padding: 18px 16px 22px; }
  .myeaci-q-orb { width: 44px; height: 44px; }
  .myeaci-choices { grid-template-columns: 1fr; }
  .myeaci-card { grid-template-columns: 48px 1fr; }
  .myeaci-card .btn-post { grid-column: 1 / -1; justify-self: start; }
}

.settings-billing {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
}
.settings-billing strong { display: block; margin-bottom: 6px; }
.settings-billing .hint { margin: 0 0 10px; }
.settings-billing .btn-post { width: 100%; }
.settings-delete { border-color: rgba(255, 107, 107, 0.45); }
.settings-delete .btn-post:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

#subOverlay {
  --bg2: rgba(16, 13, 22, 0.98);
  --border: rgba(246, 240, 230, 0.12);
  --border2: rgba(0, 255, 200, 0.28);
  --accent: var(--cyan);
  --accent2: #6fffe0;
  --dim: var(--muted);
  --bg: #05040a;
  --adim: rgba(0, 255, 200, 0.12);
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#subOverlay.show { display: flex !important; }
#subOverlay .sub-box {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 28px;
  width: 460px;
  max-width: 94vw;
  max-height: min(85vh, calc(100dvh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#subOverlay .sub-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
#subOverlay .sub-scroll h2 {
  margin: 0 0 6px;
  padding-right: 40px;
  font-size: 20px;
  color: var(--accent);
}
.sub-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.sub-desc a { color: var(--accent); }
.sub-usage {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  background: rgba(0, 255, 200, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.sub-usage-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.sub-usage-count {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.sub-usage-reset {
  text-align: right;
  font-size: 10px;
  color: var(--muted);
}
.sub-usage-reset #subResetTimer {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.sub-usage-bar {
  grid-column: 1 / -1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.sub-usage-bar #subMeterFill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s;
}
.sub-cards { display: flex; flex-direction: column; gap: 12px; }
.sub-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  position: relative;
}
.sub-card.active { border-color: var(--accent); background: rgba(0, 255, 200, 0.04); }
.sub-card.active::after {
  content: 'CURRENT';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 8px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}
.plan-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.plan-price { font-size: 20px; font-weight: 700; color: var(--accent); }
.plan-price span { font-size: 11px; color: var(--muted); font-weight: 400; }
.plan-plus { color: #36ffe0; }
.plan-premium { color: #ffd700; }
.plan-unlimited { color: #ff6bff; }
.plan-details { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.plan-btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.plan-btn.btn-free { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.plan-btn.btn-standard { background: var(--accent); color: var(--bg); }
.plan-btn.btn-premium { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #1a1a2e; }
.plan-btn:disabled { opacity: 0.5; cursor: default; }
.sub-warning {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  color: #ff8787;
  margin-top: 12px;
  display: none;
}
.sub-warning.show { display: block; }
#subOverlay .sub-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
#subOverlay .sub-footer {
  flex-shrink: 0;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
#subOverlay .sub-footer .secondary {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid var(--border);
}

/* Interactive Stories */
.stories-launch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #c9a6ff 45%, var(--line));
  background: rgba(201, 166, 255, 0.1);
  color: #d4b8ff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}
.stories-launch:hover { background: rgba(201, 166, 255, 0.2); }
html.stories-open,
html.stories-open body {
  height: 100dvh;
  overflow: hidden;
}
html.stories-open #storiesOverlay,
#storiesOverlay.on { display: flex; }
.stories-overlay {
  z-index: 82;
  scrollbar-color: #c9a6ff #120e18;
}
.stories-stage {
  --who: var(--stories-who, #c9a6ff);
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #07060b;
}
.stories-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
}
.stories-bloom,
.stories-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.stories-bloom {
  background:
    radial-gradient(70% 50% at 50% 0%, color-mix(in srgb, var(--who) 28%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(7, 6, 11, 0.15), rgba(7, 6, 11, 0.88) 70%);
}
.stories-shade {
  background: linear-gradient(90deg, rgba(7, 6, 11, 0.55), transparent 40%, rgba(7, 6, 11, 0.7));
}
.stories-who-chip {
  position: absolute;
  top: 14px;
  left: 18px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--who) 40%, var(--line));
  background: rgba(7, 6, 11, 0.55);
  color: var(--who);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stories-body {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 52px 18px 28px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}
.stories-panel {
  border: 1px solid color-mix(in srgb, var(--who, #c9a6ff) 28%, var(--line-soft));
  border-radius: 20px;
  background: rgba(10, 9, 16, 0.78);
  backdrop-filter: blur(10px);
  padding: 22px 20px 20px;
}
.stories-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--who, #c9a6ff);
}
.stories-panel h3 {
  margin: 0 0 10px;
  font-size: clamp(20px, 3.5vw, 26px);
  line-height: 1.25;
}
.stories-lead,
.stories-muted {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}
.stories-muted { color: var(--muted); margin-bottom: 10px; }
.stories-genres {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.stories-genre {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(6, 5, 11, 0.45);
  color: var(--ink);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
}
.stories-genre strong { display: block; margin-bottom: 4px; font-size: 15px; }
.stories-genre span { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); }
.stories-genre:hover {
  border-color: color-mix(in srgb, var(--who, #c9a6ff) 55%, var(--line));
}
.stories-queue-wrap { margin-top: 8px; }
.stories-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.stories-queue { display: grid; gap: 8px; }
.stories-queue-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(6, 5, 11, 0.4);
}
.stories-queue-card em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.stories-queue-card strong { display: block; margin: 2px 0; font-size: 14px; }
.stories-queue-card span { display: block; font-size: 12px; color: var(--muted); }
.stories-back {
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
  margin-bottom: 12px;
  cursor: pointer;
}
.stories-back:hover { color: var(--who, #c9a6ff); }
.stories-field-label {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.stories-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stories-chip {
  border: 1px solid var(--line);
  background: rgba(6, 5, 11, 0.4);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.stories-chip.on {
  border-color: var(--who, #c9a6ff);
  color: var(--who, #c9a6ff);
  background: color-mix(in srgb, var(--who, #c9a6ff) 14%, transparent);
}
.stories-subject {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 5, 11, 0.5);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  padding: 12px 14px;
  resize: vertical;
  min-height: 88px;
}
.stories-start { margin-top: 16px; min-height: 44px; }
.stories-play-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.stories-seats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.stories-seat {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
}
.stories-seat.host {
  color: var(--who, #c9a6ff);
  border-color: color-mix(in srgb, var(--who, #c9a6ff) 45%, var(--line));
}
.stories-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.stories-tab {
  flex: 1;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}
.stories-tab.on {
  color: var(--who, #c9a6ff);
  border-color: color-mix(in srgb, var(--who, #c9a6ff) 50%, var(--line));
  background: color-mix(in srgb, var(--who, #c9a6ff) 12%, transparent);
}
.stories-log {
  max-height: min(46vh, 420px);
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 4px 2px 12px;
  margin-bottom: 10px;
}
.stories-msg {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(6, 5, 11, 0.45);
}
.stories-msg em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.stories-msg p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.stories-msg-eaci {
  border-color: color-mix(in srgb, var(--who, #c9a6ff) 35%, var(--line-soft));
  background: color-mix(in srgb, var(--who, #c9a6ff) 10%, rgba(6, 5, 11, 0.45));
}
.stories-msg-eaci em { color: var(--who, #c9a6ff); }
.stories-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}
.stories-compose textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 5, 11, 0.55);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  resize: vertical;
  min-height: 64px;
}
@media (max-width: 720px) {
  .stories-launch { padding: 0 10px; font-size: 11px; }
  .stories-genres { grid-template-columns: 1fr; }
  .stories-compose { grid-template-columns: 1fr; }
  .stories-queue-card { flex-direction: column; align-items: stretch; }
}
