/* 呢喃 Web 发现页 v4 — Talkie 式内容密度，呢喃式关系叙事 */
:root {
  --plaza-ink: #09090c;
  --plaza-panel: #111116;
  --plaza-card: #18171e;
  --plaza-warm: #f1d9bd;
  --plaza-rose: #f08eaa;
}

/* 明确尊重社区暂时关闭状态；旧版样式的 display 规则不能覆盖 hidden。 */
.rail-create[hidden], .rail-item[hidden], .plaza-head .btn[hidden] { display: none !important; }

.app-body { background: var(--plaza-ink); }
.app-shell { background: var(--plaza-ink); }
.rail {
  width: 224px; flex-basis: 224px; padding: 22px 16px 18px;
  align-items: stretch; background: #111116; border-color: rgba(255,255,255,.07);
}
.rail-brand a { display: flex; align-items: center; gap: 11px; color: #fff; }
.rail-brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px;
  color: #171319; font-size: 18px; font-weight: 900;
  background: linear-gradient(145deg, #f1d9bd, #ec9fb4);
  box-shadow: 0 9px 24px rgba(240,142,170,.15);
}
.rail-brand b { display: block; font-size: 18px; letter-spacing: .08em; }
.rail-brand small { display: block; margin-top: -3px; color: #827b86; font-size: 9px; letter-spacing: .28em; text-transform: uppercase; }
.rail-create {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; margin: 24px 0 18px;
  padding: 0 13px; border: 1px solid rgba(241,217,189,.16); border-radius: 14px;
  background: rgba(241,217,189,.075); color: #e8ded5; cursor: pointer; font-size: 12px; font-weight: 700;
}
.rail-create span { color: var(--plaza-warm); font-size: 18px; font-weight: 400; }
.rail-top { align-items: stretch; gap: 4px; }
.rail-item {
  width: 100%; min-height: 44px; padding: 0 13px; flex-direction: row; justify-content: flex-start;
  gap: 11px; border-radius: 13px; font-size: 13px; font-weight: 650;
}
.rail-item svg { width: 19px; height: 19px; }
.rail-item.active { color: #fff; background: rgba(255,255,255,.085); }
.rail-item.active svg { color: var(--plaza-warm); }
.rail-companions { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.06); }
.rail-companions > span { display: block; margin: 0 10px 10px; color: #6f6973; font-size: 10px; letter-spacing: .12em; }
.rail-companions a { display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 13px; color: #ddd7de; font-size: 12px; }
.rail-companions a:hover { background: rgba(255,255,255,.05); }
.rail-companions img { width: 34px; height: 34px; border-radius: 11px; object-fit: cover; }
.rail-companions a { position: relative; }
.rail-companions i { position: absolute; left: 36px; bottom: 8px; width: 8px; height: 8px; border: 2px solid #111116; border-radius: 50%; background: #63c995; }
.rail-companions a > span { display: flex; flex-direction: column; }
.rail-companions small { color: #756f79; font-size: 9px; font-weight: 400; }
.rail-bottom { margin-top: auto; align-items: stretch; }

.plaza-main {
  padding: 0 34px 56px; background:
    radial-gradient(50% 44% at 74% 15%, rgba(63,91,89,.18), transparent 70%),
    radial-gradient(44% 50% at 32% 34%, rgba(100,76,111,.13), transparent 72%),
    #09090c;
}
.plaza-head {
  position: sticky; z-index: 20; top: 0; max-width: none; min-height: 84px; margin: 0 -34px;
  padding: 16px 34px; justify-content: center; background: rgba(9,9,12,.82);
  border-bottom: 1px solid rgba(255,255,255,.04); backdrop-filter: blur(22px) saturate(140%);
}
.mobile-brand { display: none; }
.plaza-head-actions { width: min(840px, 68vw); }
.plaza-search { flex: 1; min-width: 0; min-height: 46px; border-radius: 18px; background: #1d1d22; border-color: transparent; }
.plaza-search:focus-within { border-color: rgba(241,217,189,.32); box-shadow: 0 0 0 3px rgba(241,217,189,.05); }
.search-action { min-height: 46px; padding: 0 22px; border: 0; border-radius: 16px; background: #f3f0ed; color: #151318; font-weight: 850; cursor: pointer; }
.plaza-about-link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 12px; color: #b7aeb9; font-size: 11px; white-space: nowrap; }
.plaza-about-link:hover { color: var(--plaza-warm); }
.plaza-head .btn { min-height: 46px; border-radius: 16px; background: transparent; border: 1px solid rgba(255,255,255,.12); box-shadow: none; color: #ddd7de; }
.plaza-head .btn:hover { background: rgba(255,255,255,.06); }

.discovery-hero {
  display: grid; grid-template-columns: minmax(340px,.78fr) minmax(560px,1.35fr); align-items: center;
  max-width: 1520px; min-height: 326px; margin: 0 auto; padding: 34px 0 24px; overflow: hidden;
}
.discovery-copy { position: relative; z-index: 4; padding-left: 2px; }
.hero-kicker { display: block; margin-bottom: 11px; color: #b7aeb9; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.discovery-copy h1 { margin: 0; color: #f9f6f3; font-size: clamp(34px,3.4vw,54px); line-height: 1.12; letter-spacing: -.055em; }
.discovery-copy h1 em { color: var(--plaza-warm); font-style: normal; }
.discovery-copy > p { max-width: 450px; margin: 18px 0 20px; color: #8f8893; font-size: 13px; line-height: 1.8; }
.mood-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-picks button {
  display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border: 1px solid rgba(255,255,255,.075);
  border-radius: 999px; background: #18171d; color: #aaa2ad; cursor: pointer; font-size: 11px; font-weight: 700;
}
.mood-picks button:hover { color: #fff; border-color: rgba(241,217,189,.24); transform: translateY(-1px); }
.mood-picks span { color: var(--plaza-rose); font-size: 15px; }

.plaza-feature { position: relative; max-width: none; width: 100%; height: 272px; min-height: 0; margin: 0; border: 0; border-radius: 0; overflow: visible; background: transparent; box-shadow: none; }
.focus-stage { position: relative; width: 100%; height: 100%; }
.focus-stage::after { content: ""; position: absolute; left: 9%; right: 6%; bottom: 1px; height: 70px; background: radial-gradient(ellipse, rgba(83,124,120,.16), transparent 66%); filter: blur(6px); }
.focus-card {
  --offset: 0; position: absolute; z-index: calc(10 - var(--distance)); left: 50%; top: 50%;
  width: 150px; height: 206px; border: 1px solid rgba(255,255,255,.13); border-radius: 21px; overflow: hidden;
  transform: translate(calc(-50% + var(--offset) * 112px), -50%) scale(calc(1 - var(--distance) * .09));
  opacity: calc(1 - var(--distance) * .17); box-shadow: 0 24px 50px rgba(0,0,0,.32);
  transition: transform .55s cubic-bezier(.22,1,.36,1), width .55s cubic-bezier(.22,1,.36,1), height .55s cubic-bezier(.22,1,.36,1), opacity .4s, filter .4s, border-color .4s, box-shadow .55s; filter: saturate(calc(1 - var(--distance) * .16));
}
.focus-card.is-active { z-index: 15; width: 174px; height: 242px; border-color: rgba(241,217,189,.38); box-shadow: 0 28px 74px rgba(0,0,0,.48), 0 0 0 1px rgba(241,217,189,.08); }
.focus-card img { width: 100%; height: 100%; object-fit: cover; }
.focus-card::after { content: ""; position: absolute; inset: 38% 0 0; background: linear-gradient(transparent, rgba(7,7,10,.92)); }
.focus-card-copy { position: absolute; z-index: 2; left: 11px; right: 11px; bottom: 10px; color: #fff; }
.focus-card-copy b { display: block; font-size: 13px; }
.focus-card-copy span { display: block; overflow: hidden; margin-top: 2px; color: rgba(255,255,255,.66); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.focus-card.is-active .focus-card-copy b { font-size: 16px; }
.focus-card.is-active .focus-card-copy span { font-size: 10px; }
.focus-nav { position: absolute; z-index: 20; top: 50%; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: rgba(15,14,18,.7); color: #fff; cursor: pointer; transform: translateY(-50%); backdrop-filter: blur(10px); }
.focus-nav:hover { background: rgba(241,217,189,.16); }
.focus-prev { left: 4px; } .focus-next { right: 4px; }
.focus-status { position: absolute; z-index: 20; right: 17%; bottom: 2px; color: #68626c; font-size: 9px; letter-spacing: .13em; }

.plaza-section-head { max-width: 1520px; margin-top: 8px; margin-bottom: 15px; align-items: flex-end; }
.section-eyebrow { color: var(--plaza-rose); font-size: 9px; font-weight: 900; letter-spacing: .2em; }
.plaza-section-head h2 { margin-top: 3px; font-size: 23px; letter-spacing: -.025em; }
.plaza-section-head p { color: #77717b; }
.live-note { display: flex; align-items: center; gap: 6px; }
.live-note i { width: 6px; height: 6px; border-radius: 50%; background: #62c795; box-shadow: 0 0 10px rgba(98,199,149,.6); }
.discovery-tabs { max-width: 1520px; margin-bottom: 14px; gap: 7px; }
.discovery-tab { min-height: 36px; padding: 0 15px; border: 0; border-radius: 11px; background: #17161b; color: #918a95; font-size: 11px; }
.discovery-tab.active { background: #f1eeeb; color: #17151a; }

.plaza-grid { max-width: 1520px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.persona-card { position: relative; border-radius: 19px; background: #141318; border-color: rgba(255,255,255,.07); }
.persona-card:hover { border-color: rgba(241,217,189,.33); transform: translateY(-5px); }
.persona-card .card-img { aspect-ratio: 3 / 4; }
.persona-card .card-img-overlay { padding: 70px 12px 12px; background: linear-gradient(180deg, transparent, rgba(8,8,11,.92)); }
.persona-card .card-img-overlay .card-name { font-size: 16px; }
.persona-card .card-body { padding: 10px 11px 12px; }
.persona-card .card-bg { min-height: 38px; margin-top: 0; -webkit-line-clamp: 2; color: #8d8690; font-size: 10px; line-height: 1.55; }
.persona-card .bg-label, .persona-card .card-tags { display: none; }
.persona-card .card-chat { min-height: 34px; margin-top: 8px; border-radius: 10px; background: rgba(255,255,255,.065); color: #d8d1d8; font-size: 11px; }
.persona-card .card-chat:hover { background: var(--plaza-warm); color: #161419; filter: none; }
.persona-card .card-report { display: block; width: 100%; min-height: 30px; margin-top: 6px; padding: 0; border: 0; background: transparent; color: #9c929d; font-size: 10px; text-align: center; cursor: pointer; }
.persona-card .card-report:hover { color: #e5b9a2; }
.persona-card .card-badge { top: 9px; left: 9px; background: rgba(10,9,12,.55); border: 1px solid rgba(255,255,255,.12); }
.persona-card .memory-mark { position: absolute; z-index: 3; right: 9px; top: 9px; padding: 4px 7px; border-radius: 999px; background: rgba(10,9,12,.58); color: rgba(255,255,255,.78); font-size: 8px; backdrop-filter: blur(8px); }

@media (min-width: 1540px) { .plaza-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .rail { width: 188px; flex-basis: 188px; }
  .discovery-hero { grid-template-columns: minmax(300px,.7fr) minmax(460px,1.2fr); }
  .plaza-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .focus-card { transform: translate(calc(-50% + var(--offset) * 88px), -50%) scale(calc(1 - var(--distance) * .1)); }
}
@media (max-width: 840px) {
  .rail { width: 72px; flex-basis: 72px; padding: 14px 8px; }
  .rail-brand a { justify-content: center; } .rail-brand a > span:last-child, .rail-create:not(:focus) { font-size: 0; }
  .rail-create { justify-content: center; padding: 0; } .rail-create span { font-size: 21px; }
  .rail-item { justify-content: center; padding: 0; } .rail-item span, .rail-companions { display: none; }
  .discovery-hero { grid-template-columns: 1fr; padding-top: 26px; }
  .discovery-copy { text-align: center; } .discovery-copy > p { margin-inline: auto; } .mood-picks { justify-content: center; }
  .plaza-feature { margin-top: 4px; }
  .plaza-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .rail { position: fixed; width: auto; height: 66px; padding: 6px; justify-content: center; }
  .rail-brand, .rail-create, .rail-companions { display: none; }
  .rail-top, .rail-bottom { flex-direction: row; gap: 0; }
  .rail-item { width: 58px; flex-direction: column; gap: 2px; padding: 3px 0; font-size: 9px; line-height: 1.15; white-space: nowrap; }
  .rail-item span { display: block; }
  .plaza-main { padding: 0 12px 96px; }
  .plaza-head { min-height: auto; margin: 0 -12px; padding: 12px; justify-content: space-between; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; color: #fff; }
  .mobile-brand span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--plaza-warm); color: #171419; font-weight: 900; }
  .mobile-brand b { font-size: 15px; }
  .plaza-head-actions { width: auto; flex: 1; justify-content: flex-end; }
  .plaza-search { max-width: 230px; } .search-action, .plaza-about-link, .plaza-head .btn { display: none; }
  .discovery-hero { min-height: auto; padding: 28px 0 8px; }
  .discovery-copy h1 { font-size: 38px; } .discovery-copy > p { max-width: 330px; }
  .mood-picks button { padding-inline: 11px; }
  .plaza-feature { height: 248px; }
  .focus-card { width: 124px; height: 176px; transform: translate(calc(-50% + var(--offset) * 72px), -50%) scale(calc(1 - var(--distance) * .11)); }
  .focus-card.is-active { width: 148px; height: 208px; }
  .plaza-section-head { margin-top: 0; }
  .plaza-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
}
@media (max-width: 390px) {
  .plaza-search { max-width: 190px; }
  .discovery-copy h1 { font-size: 34px; }
  .mood-picks { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 3px; }
  .mood-picks button { flex: 0 0 auto; }
  .focus-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .focus-card, .persona-card, .mood-picks button { transition: none !important; animation: none !important; }
}
