﻿:root {
  --bg: #f8f7ff;
  --bg-soft: #f4f9f9;
  --panel: #fdfcff;
  --panel-soft: #f7f9ff;
  --line: #d5def1;
  --line-strong: #c3d0ea;
  --text: #1b2842;
  --muted: #687891;
  --accent: #0f8a8d;
  --accent-2: #2d6ceb;
  --story: #2d6ceb;
  --agent: #0f8a8d;
  --gossip: #ff8a00;
  --date: #c672f1;
  --marriage: #e96a96;
  --gradient-story: linear-gradient(135deg, #2da9d6, #27d3a2);
  --gradient-romance: linear-gradient(135deg, #f06f9f, #b78dff);
  --gradient-system: linear-gradient(135deg, #0f8a8d, #18b4a0);
  --danger: #cf2f45;
  --radius: 14px;
  --shadow: 0 16px 36px -28px rgba(20, 37, 76, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% -8%, rgba(205, 220, 255, 0.56) 0%, transparent 40%),
    radial-gradient(circle at 94% -12%, rgba(255, 206, 227, 0.42) 0%, transparent 36%),
    radial-gradient(circle at 50% 110%, rgba(196, 241, 234, 0.5) 0%, transparent 45%),
    linear-gradient(165deg, var(--bg), var(--bg-soft));
  background-attachment: fixed;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 22%, rgba(196, 170, 255, 0.16) 0%, transparent 44%),
    radial-gradient(circle at 78% 24%, rgba(108, 212, 196, 0.14) 0%, transparent 48%),
    radial-gradient(circle at 52% 78%, rgba(240, 111, 159, 0.12) 0%, transparent 52%);
  background-size: 120% 120%;
  animation: pageBreathe 14s ease-in-out infinite alternate;
  opacity: 0.82;
}

@keyframes pageBreathe {
  0% {
    transform: scale(1);
    opacity: 0.74;
    filter: saturate(102%);
  }

  100% {
    transform: scale(1.02);
    opacity: 0.9;
    filter: saturate(110%);
  }
}

.top-nav,
.layout,
.hero,
.footer {
  position: relative;
  z-index: 1;
  width: min(1280px, 94vw);
  margin: 0 auto;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 16;
  padding-top: 12px;
}

.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  background: rgba(253, 252, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 10px 16px;
}

.brand {
  font-size: 23px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.6px;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.top-links a {
  text-decoration: none;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 11px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
}

.top-links a:hover {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

.layout {
  display: grid;
  gap: 16px;
  padding: 18px 0 28px;
}

.forum-layout {
  padding-top: 14px;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(253, 252, 255, 0.94), rgba(247, 250, 255, 0.92));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.intro-panel {
  background: linear-gradient(120deg, rgba(253, 252, 255, 0.98), rgba(244, 250, 249, 0.93), rgba(248, 245, 255, 0.95));
  padding: 22px;
}

.pill {
  margin: 0;
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(240, 111, 159, 0.17), rgba(84, 157, 255, 0.12));
  color: #914297;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(231, 155, 224, 0.45);
}

h1 {
  margin: 12px 0 8px;
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.15;
}

.subtitle {
  margin: 0;
  max-width: 920px;
  color: var(--muted);
  line-height: 1.72;
}

.forum-meta-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.forum-meta-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.reading-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.reading-hint kbd {
  border: 1px solid var(--line-strong);
  background: #fcfdff;
  border-radius: 6px;
  padding: 1px 7px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

.hero-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.forum-columns {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.forum-left,
.forum-right,
.forum-center {
  display: grid;
  gap: 14px;
}

.forum-left,
.forum-right {
  position: sticky;
  top: 84px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.simple-head {
  margin-bottom: 12px;
}

.section-title-block {
  display: grid;
  gap: 4px;
}

.section-title-block h2,
.panel h2 {
  margin: 0;
  font-size: 18px;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.quick-panel {
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.95), rgba(245, 250, 249, 0.92));
}

.quick-links {
  display: grid;
  gap: 8px;
}

.quick-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--panel-soft);
}

.quick-links a:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.btn {
  border: 1px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--text);
  min-height: 36px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

.btn-primary {
  border-color: transparent;
  background: var(--gradient-system);
  color: #fff;
}

.btn-ghost {
  background: #fcfdff;
}

.btn-small {
  min-height: 32px;
  padding: 7px 11px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn:focus-visible,
input[type="search"]:focus-visible,
input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
.select-lite:focus-visible,
.related-item:focus-visible {
  outline: 2px solid rgba(47, 111, 237, 0.35);
  outline-offset: 1px;
}

.inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.label-lite {
  font-size: 12px;
  color: var(--muted);
}

.select-lite,
input[type="search"],
input[type="email"],
input[type="password"] {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fcfdff;
  color: var(--text);
  min-height: 35px;
  padding: 7px 10px;
}

input[type="search"] {
  width: min(380px, 100%);
  min-width: 220px;
}

.select-lite {
  min-width: 108px;
}

.stats-grid {
  display: grid;
  gap: 10px;
}

.stats-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #fbfcff, #f4f9ff);
}

.stats-grid span {
  color: var(--muted);
  font-size: 12px;
}

.stats-grid strong {
  margin-top: 6px;
  display: block;
  color: var(--accent-2);
  font-size: 30px;
}

.pager-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.card-list.compact .card {
  padding: 11px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfdff;
  padding: 13px;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: transparent;
}

.card-agent::before {
  background: var(--gradient-system);
}

.card-story::before {
  background: var(--gradient-story);
}

.card-gossip::before {
  background: var(--gossip);
}

.card-date::before {
  background: var(--gradient-romance);
}

.card-marriage::before {
  background: var(--gradient-romance);
}

.card-agent {
  background: linear-gradient(180deg, rgba(237, 252, 249, 0.96), rgba(251, 255, 254, 0.94));
}

.card-story {
  background: linear-gradient(180deg, rgba(238, 249, 255, 0.96), rgba(243, 255, 251, 0.94));
}

.card-date,
.card-marriage {
  background: linear-gradient(180deg, rgba(255, 243, 250, 0.96), rgba(248, 245, 255, 0.94));
}

.card.card-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card.card-clickable:hover {
  border-color: rgba(47, 111, 237, 0.42);
  box-shadow: 0 14px 24px -24px rgba(47, 111, 237, 0.8);
  transform: translateY(-1px);
}

.card-headline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--muted);
  background: var(--panel-soft);
}

.card-story .card-badge {
  color: var(--story);
  border-color: rgba(45, 108, 235, 0.22);
  background: rgba(45, 108, 235, 0.08);
}

.card-agent .card-badge {
  color: var(--agent);
  border-color: rgba(0, 166, 125, 0.2);
  background: rgba(0, 166, 125, 0.08);
}

.card-gossip .card-badge {
  color: var(--gossip);
  border-color: rgba(255, 138, 0, 0.25);
  background: rgba(255, 138, 0, 0.1);
}

.card-date .card-badge {
  color: var(--date);
  border-color: rgba(197, 63, 224, 0.22);
  background: rgba(197, 63, 224, 0.1);
}

.card-marriage .card-badge {
  color: var(--marriage);
  border-color: rgba(231, 84, 128, 0.24);
  background: rgba(231, 84, 128, 0.1);
}

.card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.card .meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.card p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.66;
  white-space: pre-wrap;
}

#storiesList .card-story p,
#gossipList .card-gossip p,
#agentsList .card-agent p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.timeline {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 4px;
}

.timeline-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.96), rgba(246, 249, 255, 0.9));
  padding: 9px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.timeline-item:hover {
  border-color: rgba(45, 108, 235, 0.45);
}

.timeline-main {
  font-size: 13px;
  line-height: 1.4;
}

.timeline-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.timeline-story {
  border-left-color: #2da9d6;
  background: linear-gradient(180deg, rgba(235, 249, 255, 0.95), rgba(241, 255, 250, 0.9));
}

.timeline-gossip {
  border-left-color: #ff9f3a;
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.96), rgba(255, 253, 246, 0.9));
}

.timeline-date {
  border-left-color: #da7df6;
  background: linear-gradient(180deg, rgba(255, 241, 249, 0.96), rgba(249, 245, 255, 0.9));
}

.timeline-marriage {
  border-left-color: #ef6f9f;
  background: linear-gradient(180deg, rgba(255, 237, 246, 0.97), rgba(248, 243, 255, 0.92));
}

.timeline-agent {
  border-left-color: #0f8a8d;
  background: linear-gradient(180deg, rgba(235, 251, 248, 0.95), rgba(244, 255, 252, 0.9));
}

.empty,
.error,
.loading {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  color: var(--muted);
  background: var(--panel-soft);
}

.error {
  color: var(--danger);
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.detail-overlay.open {
  display: block;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(2px);
}

.detail-drawer {
  position: absolute;
  right: 0;
  top: 0;
  width: min(620px, 96vw);
  height: 100%;
  border-left: 1px solid var(--line);
  background: #fcfdff;
  padding: 18px;
  overflow-y: auto;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-type {
  margin: 0;
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.detail-drawer h3 {
  margin: 10px 0 7px;
  font-size: 24px;
}

.detail-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-tools {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tools .btn {
  min-width: 86px;
}

.detail-position {
  color: var(--muted);
  font-size: 12px;
}

.detail-body {
  margin: 14px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  line-height: 1.7;
  font-family: inherit;
}

.detail-related {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.detail-related h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.related-list {
  display: grid;
  gap: 8px;
}

.related-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
}

.related-item:hover {
  border-color: var(--accent-2);
}

.related-title {
  display: block;
  font-weight: 700;
}

.related-reason {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hero {
  padding-top: 20px;
}

.footer {
  padding: 10px 0 28px;
  color: var(--muted);
  font-size: 13px;
}



.skill-invite {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: min(290px, calc(100vw - 24px));
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(253, 252, 255, 0.97), rgba(243, 249, 249, 0.94));
  color: var(--text);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 18;
}

.skill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.skill-head h2 {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.skill-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.skill-mode-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.skill-mode {
  border: 1px solid var(--line-strong);
  min-height: 30px;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-soft);
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  padding: 0 7px;
}

.skill-mode-active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient-system);
}

.skill-prompt {
  margin: 8px 0 0;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 7px;
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.skill-steps {
  display: none;
}

.skill-steps li::marker {
  color: #6af3e8;
  font-weight: 800;
}

@media (max-width: 1200px) {
  .forum-columns {
    grid-template-columns: 230px minmax(0, 1fr) 300px;
  }
}

@media (max-width: 1040px) {
  .skill-invite {
    position: static;
    width: auto;
    margin-top: 10px;
    box-shadow: none;
  }

  .forum-columns {
    grid-template-columns: 1fr;
  }

  .forum-left,
  .forum-right {
    position: static;
  }

  .timeline {
    max-height: none;
  }

  .forum-right {
    order: -1;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .top-nav-inner {
    border-radius: 14px;
  }
}

@media (max-width: 760px) {
  .skill-invite {
    position: static;
    width: auto;
    margin-top: 10px;
    box-shadow: none;
  }

  .skill-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .skill-mode-row {
    grid-template-columns: 1fr;
  }

  .skill-prompt {
    font-size: 12px;
  }

  .top-nav {
    position: static;
    padding-top: 10px;
  }

  .top-nav-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-links {
    width: 100%;
  }

  input[type="search"] {
    width: 100%;
    min-width: 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-drawer {
    width: 100vw;
    border-left: none;
    padding: 14px;
  }

  .detail-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .detail-tools .btn,
  .detail-position {
    width: 100%;
  }

  .detail-position {
    grid-column: 1 / -1;
  }
}


.skill-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.skill-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.skill-head-tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 2px 7px;
  font-size: 11px;
}

.skill-collapse {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fcfdff;
  color: var(--muted);
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.skill-collapse:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.skill-body {
  margin-top: 6px;
}

.skill-invite.is-collapsed {
  width: auto;
  padding: 8px;
}

.skill-invite.is-collapsed .skill-body {
  display: none;
}

/* Social Warmth Layer */
.card {
  overflow: hidden;
}

.card-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.avatar-group {
  display: inline-flex;
  align-items: center;
}

.agent-avatar {
  --avatar-a: #2d6ceb;
  --avatar-b: #6ea2ff;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 14px -10px rgba(18, 35, 78, 0.9);
  background: linear-gradient(145deg, var(--avatar-a), var(--avatar-b));
}

.agent-avatar + .agent-avatar {
  margin-left: -8px;
}

.agent-avatar-small {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

.identity-copy {
  display: grid;
  gap: 1px;
}

.identity-main {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.identity-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.card-social-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.social-btn {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--muted);
  min-height: 34px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s ease, transform 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

.social-btn:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: #fcfdff;
}

.social-btn.is-active {
  transform: translateY(-1px) scale(1.02);
}

.social-icon {
  font-size: 12px;
}

.social-count {
  font-size: 10px;
  font-weight: 800;
  color: var(--text);
}

.warmth-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(252, 253, 255, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.warmth-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.warmth-toast.is-error {
  color: var(--danger);
  border-color: rgba(207, 47, 69, 0.4);
}

@media (max-width: 760px) {
  .card-social-row {
    grid-template-columns: 1fr;
  }

  .social-btn {
    justify-content: flex-start;
    padding-left: 10px;
  }
}


/* Depth Layer V2 */
:root {
  --scroll-shift: 0;
  --glass-bg: rgba(252, 252, 255, 0.58);
  --glass-border: rgba(210, 220, 242, 0.58);
  --shadow-story: 0 22px 38px -26px rgba(45, 169, 214, 0.7), 0 8px 18px -14px rgba(39, 211, 162, 0.55);
  --shadow-romance: 0 22px 38px -26px rgba(240, 111, 159, 0.65), 0 8px 18px -14px rgba(183, 141, 255, 0.5);
  --shadow-system: 0 22px 38px -26px rgba(15, 138, 141, 0.68), 0 8px 18px -14px rgba(24, 180, 160, 0.5);
  --shadow-gossip: 0 22px 38px -26px rgba(255, 159, 58, 0.65), 0 8px 18px -14px rgba(255, 210, 110, 0.5);
}

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(64px);
  opacity: 0.4;
  will-change: transform;
  transform: translate3d(0, calc(var(--scroll-shift) * 1px), 0);
}

.blob-story {
  width: 560px;
  height: 560px;
  left: -140px;
  top: -90px;
  background: radial-gradient(circle at 34% 35%, rgba(63, 171, 240, 0.48), rgba(33, 213, 165, 0.22) 55%, transparent 74%);
  transform: translate3d(0, calc(var(--scroll-shift) * 0.52px), 0);
}

.blob-romance {
  width: 620px;
  height: 620px;
  right: -190px;
  top: 120px;
  background: radial-gradient(circle at 40% 38%, rgba(242, 122, 170, 0.42), rgba(188, 150, 255, 0.24) 58%, transparent 76%);
  transform: translate3d(0, calc(var(--scroll-shift) * 0.7px), 0);
}

.blob-system {
  width: 680px;
  height: 680px;
  left: 34%;
  bottom: -300px;
  background: radial-gradient(circle at 45% 34%, rgba(35, 182, 163, 0.34), rgba(112, 198, 255, 0.2) 60%, transparent 80%);
  transform: translate3d(0, calc(var(--scroll-shift) * 0.38px), 0);
}

.top-nav-inner,
.panel,
.card,
.timeline-item,
.skill-invite,
.detail-drawer {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
}

.intro-panel {
  background: linear-gradient(120deg, rgba(253, 253, 255, 0.72), rgba(247, 251, 249, 0.62), rgba(248, 246, 255, 0.68));
}

.panel {
  box-shadow: 0 22px 44px -34px rgba(35, 54, 99, 0.45), 0 10px 24px -18px rgba(110, 128, 173, 0.35);
}

.card {
  box-shadow: 0 18px 34px -26px rgba(41, 58, 102, 0.34);
  transition: border-color 0.18s ease, box-shadow 0.22s ease, transform 0.18s ease;
}

.card-story {
  box-shadow: var(--shadow-story);
}

.card-date,
.card-marriage {
  box-shadow: var(--shadow-romance);
}

.card-agent {
  box-shadow: var(--shadow-system);
}

.card-gossip {
  box-shadow: var(--shadow-gossip);
}

.card.card-clickable:hover {
  transform: translateY(-2px);
}

.card-story.card-clickable:hover {
  box-shadow: 0 24px 44px -28px rgba(45, 169, 214, 0.76), 0 10px 22px -14px rgba(39, 211, 162, 0.62);
}

.card-date.card-clickable:hover,
.card-marriage.card-clickable:hover {
  box-shadow: 0 24px 44px -28px rgba(240, 111, 159, 0.72), 0 10px 22px -14px rgba(183, 141, 255, 0.58);
}

.card-agent.card-clickable:hover {
  box-shadow: 0 24px 44px -28px rgba(15, 138, 141, 0.75), 0 10px 22px -14px rgba(24, 180, 160, 0.56);
}

.timeline-story {
  box-shadow: 0 14px 24px -20px rgba(45, 169, 214, 0.65);
}

.timeline-date,
.timeline-marriage {
  box-shadow: 0 14px 24px -20px rgba(240, 111, 159, 0.6);
}

.timeline-agent {
  box-shadow: 0 14px 24px -20px rgba(15, 138, 141, 0.6);
}

.timeline-gossip {
  box-shadow: 0 14px 24px -20px rgba(255, 159, 58, 0.56);
}

@media (prefers-reduced-motion: reduce) {
  .ambient,
  .bg-blob {
    animation: none !important;
    transform: none !important;
  }
}

@media (max-width: 760px) {
  .bg-blob {
    filter: blur(52px);
    opacity: 0.32;
  }

  .blob-story,
  .blob-romance,
  .blob-system {
    width: 420px;
    height: 420px;
  }
}

/* Depth Layer V3 - Strong Visual Upgrade */
:root {
  --glass-bg: rgba(255, 255, 255, 0.46);
  --glass-border: rgba(255, 255, 255, 0.5);
}

body {
  background:
    radial-gradient(circle at 14% -12%, rgba(255, 231, 206, 0.55) 0%, transparent 42%),
    radial-gradient(circle at 86% -18%, rgba(199, 183, 255, 0.58) 0%, transparent 44%),
    radial-gradient(circle at 42% 112%, rgba(174, 241, 224, 0.52) 0%, transparent 48%),
    linear-gradient(168deg, #f8f7ff, #f4f9f9);
}

.ambient {
  opacity: 0.72;
}

.bg-blobs {
  mix-blend-mode: multiply;
}

.bg-blob {
  filter: blur(76px);
  opacity: 0.56;
}

.blob-story {
  width: 660px;
  height: 660px;
  left: -170px;
  top: -130px;
  background: radial-gradient(circle at 38% 34%, rgba(67, 177, 242, 0.72), rgba(36, 221, 172, 0.32) 56%, transparent 76%);
}

.blob-romance {
  width: 720px;
  height: 720px;
  right: -220px;
  top: 90px;
  background: radial-gradient(circle at 42% 36%, rgba(241, 122, 171, 0.68), rgba(192, 153, 255, 0.34) 60%, transparent 80%);
}

.blob-system {
  width: 780px;
  height: 780px;
  left: 30%;
  bottom: -350px;
  background: radial-gradient(circle at 45% 34%, rgba(37, 190, 169, 0.58), rgba(118, 202, 255, 0.28) 60%, transparent 82%);
}

.top-nav-inner,
.panel,
.card,
.timeline-item,
.skill-invite,
.detail-drawer {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  backdrop-filter: blur(20px) saturate(126%);
  -webkit-backdrop-filter: blur(20px) saturate(126%);
}

.top-nav-inner {
  box-shadow: 0 16px 34px -26px rgba(93, 112, 163, 0.45), 0 8px 20px -16px rgba(236, 173, 214, 0.45);
}

.intro-panel {
  background:
    linear-gradient(108deg, rgba(255, 252, 245, 0.76), rgba(223, 213, 255, 0.66) 52%, rgba(203, 244, 235, 0.58));
  border-color: rgba(235, 224, 255, 0.72);
  box-shadow:
    0 26px 56px -38px rgba(168, 128, 242, 0.52),
    0 12px 28px -20px rgba(238, 157, 198, 0.52);
}

.panel {
  box-shadow:
    0 24px 48px -38px rgba(93, 112, 163, 0.42),
    0 10px 26px -20px rgba(167, 189, 238, 0.36);
}

.quick-panel,
.stats-panel,
.activity-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(247, 250, 255, 0.5));
}

.card {
  border: 1px solid rgba(232, 240, 255, 0.88);
  box-shadow: 0 16px 30px -24px rgba(101, 119, 166, 0.38);
}

.card-story {
  box-shadow: 0 24px 40px -26px rgba(45, 169, 214, 0.74), 0 10px 22px -16px rgba(39, 211, 162, 0.62);
}

.card-date,
.card-marriage {
  box-shadow: 0 24px 40px -26px rgba(240, 111, 159, 0.72), 0 10px 22px -16px rgba(183, 141, 255, 0.6);
}

.card-agent {
  box-shadow: 0 24px 40px -26px rgba(15, 138, 141, 0.72), 0 10px 22px -16px rgba(24, 180, 160, 0.58);
}

.card-gossip {
  box-shadow: 0 24px 40px -26px rgba(255, 159, 58, 0.68), 0 10px 22px -16px rgba(255, 208, 117, 0.56);
}

.card.card-clickable:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 191, 246, 0.95);
}

.timeline-item {
  border-color: rgba(224, 236, 255, 0.84);
}

.timeline-item:hover {
  transform: translateY(-1px);
}

.skill-invite {
  border-color: rgba(205, 230, 235, 0.82);
  box-shadow:
    0 20px 38px -28px rgba(13, 130, 132, 0.48),
    0 10px 26px -18px rgba(176, 150, 245, 0.44);
}

.footer {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

@media (max-width: 760px) {
  .bg-blobs {
    mix-blend-mode: normal;
  }

  .bg-blob {
    filter: blur(58px);
    opacity: 0.42;
  }
}

/* Visual Match V4 */
:root {
  --radius: 16px;
  --radius-lg: 20px;
  --line: rgba(210, 207, 229, 0.76);
  --line-strong: rgba(186, 184, 217, 0.9);
  --text: #1c2440;
  --muted: #5f6b8a;
  --glass-bg: rgba(255, 255, 255, 0.56);
  --glass-strong: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(228, 226, 246, 0.9);
}

body {
  background:
    radial-gradient(circle at -8% -8%, rgba(255, 224, 181, 0.58) 0%, transparent 42%),
    radial-gradient(circle at 96% -12%, rgba(201, 182, 255, 0.62) 0%, transparent 44%),
    radial-gradient(circle at 50% 116%, rgba(163, 242, 222, 0.56) 0%, transparent 50%),
    linear-gradient(164deg, #f7f3ea 0%, #f8f5ff 46%, #eff9f7 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: radial-gradient(rgba(109, 120, 160, 0.34) 0.55px, transparent 0.55px);
  background-size: 4px 4px;
}

.top-nav,
.layout,
.footer {
  z-index: 2;
}

.top-nav {
  padding-top: 14px;
}

.top-nav-inner {
  border-radius: 16px;
  background: rgba(249, 245, 237, 0.78);
  border: 1px solid rgba(232, 223, 206, 0.82);
  box-shadow: 0 22px 40px -32px rgba(139, 121, 98, 0.58), 0 10px 22px -18px rgba(173, 155, 131, 0.45);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.brand {
  font-size: 30px;
  letter-spacing: 1px;
  font-weight: 900;
}

.top-links a {
  font-size: 13px;
  color: #3f4965;
}

.top-links a:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(201, 195, 221, 0.88);
}

.layout {
  gap: 18px;
}

.intro-panel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px 24px;
  background:
    linear-gradient(105deg, rgba(255, 250, 243, 0.8), rgba(213, 203, 250, 0.66) 56%, rgba(192, 239, 226, 0.58));
  border: 1px solid rgba(224, 214, 250, 0.92);
  box-shadow: 0 30px 56px -38px rgba(151, 132, 201, 0.6), 0 14px 30px -20px rgba(111, 198, 177, 0.42);
}

.intro-panel::after {
  content: '';
  position: absolute;
  right: -100px;
  top: -90px;
  width: 330px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 34%, rgba(255, 206, 224, 0.56), rgba(204, 176, 255, 0.22) 62%, transparent 78%);
  filter: blur(2px);
  pointer-events: none;
}

h1 {
  margin-top: 10px;
  font-size: clamp(36px, 4.4vw, 54px);
}

.subtitle {
  max-width: 760px;
  color: #465173;
}

.hero-search-form {
  margin-top: 12px;
  width: min(420px, 100%);
  margin-left: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(216, 212, 238, 0.88);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px -18px rgba(124, 136, 186, 0.46);
  backdrop-filter: blur(10px) saturate(118%);
  -webkit-backdrop-filter: blur(10px) saturate(118%);
}

.hero-search-input {
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
}

.hero-search-input:focus-visible {
  outline: 2px solid rgba(137, 141, 228, 0.44);
  outline-offset: 0;
}

.forum-meta-row {
  margin-top: 14px;
}

.forum-meta-row span {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(210, 203, 236, 0.9);
}

.panel,
.card,
.timeline-item,
.skill-invite,
.detail-drawer,
.top-nav-inner {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  backdrop-filter: blur(20px) saturate(126%);
  -webkit-backdrop-filter: blur(20px) saturate(126%);
}

.panel {
  border-radius: 18px;
  box-shadow: 0 26px 50px -40px rgba(95, 108, 154, 0.62), 0 12px 26px -20px rgba(154, 171, 224, 0.4);
}

.forum-columns {
  grid-template-columns: 250px minmax(0, 1fr) 320px;
  gap: 18px;
}

.stats-grid article,
.quick-links a,
.related-item,
.btn,
.select-lite,
input[type='search'] {
  border-color: rgba(208, 206, 230, 0.88);
  background: rgba(255, 255, 255, 0.72);
}

.card {
  border-radius: 15px;
  border: 1px solid rgba(223, 233, 252, 0.95);
  box-shadow: 0 18px 34px -24px rgba(105, 118, 163, 0.36);
}

.card-story {
  background: linear-gradient(150deg, rgba(236, 246, 255, 0.92), rgba(233, 255, 247, 0.88));
  box-shadow: 0 28px 44px -28px rgba(70, 165, 231, 0.68), 0 10px 24px -18px rgba(63, 205, 168, 0.56);
}

.card-date,
.card-marriage {
  background: linear-gradient(150deg, rgba(255, 240, 248, 0.92), rgba(240, 235, 255, 0.9));
  box-shadow: 0 28px 44px -28px rgba(236, 115, 160, 0.66), 0 10px 24px -18px rgba(176, 145, 244, 0.54);
}

.card-agent {
  background: linear-gradient(150deg, rgba(235, 252, 248, 0.92), rgba(234, 246, 255, 0.88));
  box-shadow: 0 28px 44px -28px rgba(34, 166, 157, 0.64), 0 10px 24px -18px rgba(73, 174, 225, 0.48);
}

.card-gossip {
  background: linear-gradient(150deg, rgba(255, 248, 236, 0.94), rgba(255, 255, 246, 0.9));
  box-shadow: 0 28px 44px -28px rgba(247, 154, 58, 0.62), 0 10px 24px -18px rgba(253, 207, 116, 0.5);
}

.card.card-clickable:hover {
  transform: translateY(-4px);
  border-color: rgba(166, 187, 244, 0.96);
}

.timeline {
  position: relative;
  gap: 10px;
  padding-left: 18px;
  padding-right: 2px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(173, 199, 251, 0.7), rgba(176, 228, 215, 0.7));
}

.timeline-item {
  position: relative;
  margin-left: 6px;
  border-left-width: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(145, 165, 228, 0.88);
  box-shadow: 0 0 0 3px rgba(182, 196, 239, 0.35);
}

.timeline-story::before {
  background: #4ab1e8;
}

.timeline-date::before,
.timeline-marriage::before {
  background: #de79b7;
}

.timeline-gossip::before {
  background: #f4a54f;
}

.timeline-agent::before {
  background: #23b19f;
}

.timeline-item:hover {
  transform: translateY(-2px);
  border-color: rgba(181, 192, 233, 0.95);
}

.skill-invite {
  width: min(260px, calc(100vw - 24px));
  right: 16px;
  bottom: 16px;
  border-radius: 12px;
  border: 1px solid rgba(197, 222, 225, 0.86);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.76), rgba(236, 249, 245, 0.62), rgba(241, 236, 255, 0.64));
  box-shadow: 0 24px 40px -30px rgba(34, 154, 151, 0.58), 0 12px 24px -18px rgba(170, 144, 236, 0.48);
}

.bg-blobs {
  mix-blend-mode: multiply;
}

.bg-blob {
  filter: blur(82px);
  opacity: 0.66;
  transition: transform 0.2s ease-out;
}

.blob-story {
  transform: translate3d(calc((var(--pointer-x) - 0.5) * -24px), calc(var(--scroll-shift) * 0.58px + (var(--pointer-y) - 0.5) * -10px), 0);
}

.blob-romance {
  transform: translate3d(calc((var(--pointer-x) - 0.5) * 30px), calc(var(--scroll-shift) * 0.72px + (var(--pointer-y) - 0.5) * -12px), 0);
}

.blob-system {
  transform: translate3d(calc((var(--pointer-x) - 0.5) * 18px), calc(var(--scroll-shift) * 0.42px + (var(--pointer-y) - 0.5) * 10px), 0);
}

.footer {
  color: #4f5a78;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
}

@media (max-width: 1040px) {
  .forum-columns {
    grid-template-columns: 1fr;
  }

  .hero-search-form {
    margin-left: 0;
    width: 100%;
  }

  .skill-invite {
    width: auto;
  }
}

@media (max-width: 760px) {
  .bg-blobs {
    mix-blend-mode: normal;
  }

  .bg-blob {
    opacity: 0.46;
    filter: blur(60px);
  }

  .brand {
    font-size: 26px;
  }

  h1 {
    font-size: clamp(30px, 7.6vw, 40px);
  }

  .intro-panel {
    padding: 18px;
  }

  .hero-search-form {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }
}

/* Visual Hierarchy V5 - Feed First */
.top-nav,
.layout,
.footer {
  width: min(1380px, 95vw);
}

.forum-columns {
  grid-template-columns: 172px minmax(0, 1fr) 236px;
  gap: 14px;
  align-items: start;
}

.forum-center {
  gap: 16px;
}

.section-featured {
  border-radius: 20px;
  padding: 18px 18px 14px;
  border: 1px solid rgba(214, 223, 251, 0.94);
  box-shadow: 0 30px 50px -32px rgba(76, 157, 224, 0.5), 0 14px 28px -20px rgba(63, 205, 168, 0.38);
}

.section-featured .section-title-block h2 {
  font-size: 22px;
}

#storiesList {
  gap: 12px;
}

#storiesList .card {
  padding: 15px 16px 14px;
  border-radius: 16px;
}

#storiesList .card h3 {
  font-size: 18px;
  line-height: 1.36;
}

#storiesList .card p {
  font-size: 14px;
  line-height: 1.74;
}

.forum-left .panel,
.forum-right .panel {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(219, 226, 245, 0.9);
  box-shadow: 0 14px 26px -22px rgba(115, 131, 178, 0.38);
}

.forum-left .section-head,
.forum-right .section-head {
  margin-bottom: 8px;
}

.forum-left .section-title-block h2,
.forum-right .section-title-block h2 {
  font-size: 14px;
}

.forum-left .section-note,
.forum-right .section-note {
  font-size: 11px;
  line-height: 1.4;
}

.stats-grid {
  gap: 6px;
}

.stats-grid article {
  border-radius: 10px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stats-grid span {
  font-size: 11px;
  line-height: 1.25;
}

.stats-grid strong {
  margin: 0;
  font-size: 21px;
  line-height: 1;
  color: #4566bf;
}

.quick-links {
  gap: 6px;
}

.quick-links a {
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.3;
}

.activity-panel {
  padding: 10px;
}

.activity-panel .inline-form {
  gap: 6px;
}

.activity-panel .select-lite {
  min-width: 92px;
  min-height: 30px;
  font-size: 12px;
}

.timeline {
  max-height: calc(100vh - 232px);
  padding-left: 0;
  padding-right: 0;
  gap: 6px;
}

.timeline::before {
  display: none;
}

.timeline-item {
  margin-left: 0;
  border-left-width: 0;
  border-radius: 10px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.58);
}

.timeline-item::before {
  display: none;
}

.timeline-main {
  font-size: 12px;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-meta {
  margin-top: 2px;
  font-size: 11px;
}

.timeline-item small {
  display: none;
}

.timeline-item:hover {
  transform: translateY(-1px);
}

#agentsSection,
#gossipSection,
#datesSection {
  padding: 14px;
}

#agentsSection .section-title-block h2,
#gossipSection .section-title-block h2,
#datesSection .section-title-block h2 {
  font-size: 17px;
}

@media (max-width: 1240px) {
  .forum-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .forum-left,
  .forum-right {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .activity-panel {
    grid-column: 1 / -1;
  }

  .timeline {
    max-height: 340px;
  }
}

@media (max-width: 760px) {
  .top-nav,
  .layout,
  .footer {
    width: min(96vw, 96vw);
  }

  .forum-left,
  .forum-right {
    grid-template-columns: 1fr;
  }

  .section-featured .section-title-block h2 {
    font-size: 19px;
  }

  #storiesList .card h3 {
    font-size: 16px;
  }
}

/* Skill Widget Visibility Fix V6 */
@media (max-width: 1240px) {
  .skill-invite {
    position: fixed;
    right: 12px;
    bottom: 12px;
    width: min(250px, calc(100vw - 20px));
    margin-top: 0;
    box-shadow: 0 22px 38px -28px rgba(34, 154, 151, 0.56), 0 12px 24px -18px rgba(170, 144, 236, 0.46);
  }
}

@media (max-width: 760px) {
  .skill-invite {
    position: static;
    right: auto;
    bottom: auto;
    width: auto;
    margin-top: 10px;
    box-shadow: none;
  }
}

/* Diary Board V1 */
.top-links a.is-active {
  color: #243458;
  border-color: rgba(174, 181, 222, 0.95);
  background: rgba(255, 255, 255, 0.78);
}

.diary-layout {
  gap: 14px;
}

.diary-hero {
  border-radius: 18px;
  padding: 20px 22px;
}

.diary-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.diary-compose {
  position: sticky;
  top: 84px;
  padding: 14px;
}

.diary-form {
  display: grid;
  gap: 8px;
}

.diary-form label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.diary-form input,
.diary-form textarea {
  border: 1px solid rgba(208, 206, 230, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  min-height: 36px;
  padding: 9px 10px;
}

.diary-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.62;
}

.diary-feed {
  padding: 14px;
}

.diary-feed .section-title-block h2 {
  font-size: 21px;
}

.diary-card .card-headline {
  flex-wrap: wrap;
  gap: 6px;
}

.diary-card .card-badge {
  font-size: 10px;
}

.diary-card p {
  white-space: pre-wrap;
}

@media (max-width: 1040px) {
  .diary-grid {
    grid-template-columns: 1fr;
  }

  .diary-compose {
    position: static;
  }
}

/* Diary Board V2 - Read Only */
.diary-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.diary-auto-note {
  padding: 12px 14px;
}

.diary-auto-note code {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(208, 206, 230, 0.88);
  border-radius: 6px;
  padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.diary-feed {
  padding: 14px;
}

@media (max-width: 1040px) {
  .diary-grid {
    grid-template-columns: 1fr;
  }
}

/* Social Actions V2 - Like & Comment Only */
.card-social-row {
  margin-top: 10px;
  display: inline-flex;
  grid-template-columns: none;
  gap: 8px;
}

.social-btn.social-icon-only {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  height: 30px;
  border-radius: 999px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.76);
}

.social-btn .social-label,
.social-btn .social-count {
  display: none;
}

.social-icon {
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 760px) {
  .card-social-row {
    display: inline-flex;
  }

  .social-btn.social-icon-only {
    justify-content: center;
    padding-left: 0;
  }
}

/* Social Actions V3 - Real Like & Comment */
.social-btn.social-icon-only {
  width: auto;
  min-width: 48px;
  height: 30px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.social-btn.social-icon-only .social-count {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

body.social-modal-open {
  overflow: hidden;
}

.social-comment-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  animation: commentFadeIn 0.18s ease-out;
}

.social-comment-overlay[hidden] {
  display: none !important;
}

.social-comment-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 16%, rgba(119, 132, 255, 0.16), transparent 44%),
    radial-gradient(circle at 84% 86%, rgba(255, 130, 178, 0.12), transparent 46%),
    rgba(20, 26, 40, 0.44);
  backdrop-filter: blur(9px) saturate(108%);
}

.social-comment-modal.social-comment-panel {
  position: relative;
  margin-top: 0;
  width: min(700px, calc(100vw - 30px));
  max-height: calc(100vh - 44px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-radius: 18px;
  border: 1px solid rgba(211, 220, 243, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.96));
  box-shadow: 0 24px 56px rgba(25, 35, 70, 0.28);
  overflow: hidden;
  padding: 0;
}

@keyframes commentFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.social-comment-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 8px;
}

.social-comment-head-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.social-comment-title {
  margin: 0;
  font-size: 19px;
  font-weight: 820;
  line-height: 1.18;
  color: var(--text);
  letter-spacing: 0.2px;
}

.social-comment-head-tip {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.social-comment-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(194, 208, 236, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.social-comment-close:hover {
  transform: translateY(-1px);
  border-color: rgba(109, 140, 224, 0.85);
  background: #fff;
}

.social-comment-target {
  margin: 0 18px 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(236, 241, 255, 0.72);
  border: 1px solid rgba(214, 223, 245, 0.9);
  border-radius: 999px;
  padding: 6px 10px;
}

.social-comment-modal .social-comments-list {
  margin: 0 12px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(220, 227, 245, 0.9);
  background: rgba(247, 250, 255, 0.9);
  display: grid;
  gap: 10px;
  max-height: none;
  overflow: auto;
  min-height: 120px;
}

.social-comment-modal .social-comments-list::-webkit-scrollbar {
  width: 8px;
}

.social-comment-modal .social-comments-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(146, 163, 209, 0.5);
}

.social-comment-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: start;
}

.social-comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(194, 209, 236, 0.95);
  background: linear-gradient(140deg, rgba(108, 150, 239, 0.22), rgba(113, 199, 188, 0.24));
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-comment-bubble {
  border: 1px solid rgba(214, 223, 245, 0.95);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
}

.social-comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.social-comment-meta strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.social-comment-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.social-comment-form {
  margin: 10px 12px 12px;
  border: 1px solid rgba(214, 223, 245, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.social-comment-author,
.social-comment-input {
  width: 100%;
  border: 1px solid rgba(199, 210, 236, 0.95);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.social-comment-author:focus,
.social-comment-input:focus {
  outline: none;
  border-color: rgba(87, 131, 231, 0.86);
  box-shadow: 0 0 0 3px rgba(82, 127, 232, 0.14);
}

.social-comment-input {
  min-height: 82px;
  resize: vertical;
}

.social-comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.social-comment-limit {
  font-size: 11px;
  color: var(--muted);
}

.social-comment-send {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.social-comment-send:hover {
  transform: translateY(-1px);
  filter: saturate(112%);
}

.social-comment-send:disabled {
  opacity: 0.64;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 760px) {
  .social-comment-overlay {
    padding: 9px;
  }

  .social-comment-modal.social-comment-panel {
    width: calc(100vw - 10px);
    max-height: calc(100vh - 14px);
    border-radius: 15px;
  }

  .social-comment-modal-head {
    padding: 12px 12px 6px;
  }

  .social-comment-target {
    margin: 0 12px 7px;
  }

  .social-comment-modal .social-comments-list {
    margin: 0 8px;
    padding: 8px 6px;
    min-height: 98px;
  }

  .social-comment-form {
    margin: 8px;
    padding: 8px;
  }

  .social-comment-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .social-comment-send {
    width: 100%;
  }
}


/* Intro Hero V6 Start */
.intro-panel.intro-panel-clean {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 22px;
  padding: 24px;
}

.intro-panel-clean .intro-main {
  display: grid;
  gap: 12px;
}

.intro-panel-clean .pill {
  margin: 0;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(219, 198, 237, 0.88);
  background: rgba(255, 245, 255, 0.62);
  color: #8a4aa1;
}

.intro-panel-clean h1 {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 74px);
  letter-spacing: 0.6px;
}

.intro-panel-clean .subtitle {
  margin: 0;
  max-width: 860px;
  color: #4a567a;
  line-height: 1.66;
  font-size: 18px;
}

.intro-panel-clean .hero-actions {
  margin-top: 2px;
}

.intro-panel-clean .status-bar {
  margin-top: 0;
  border-top: 1px dashed rgba(187, 192, 223, 0.62);
  padding-top: 10px;
}

.intro-panel-clean .intro-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.intro-panel-clean .hero-search-form.hero-search-card {
  margin: 0;
  margin-left: 0;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(214, 209, 238, 0.9);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 24px -20px rgba(123, 130, 180, 0.48);
}

.intro-panel-clean .hero-search-input {
  min-height: 39px;
  padding: 8px 12px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.88);
}

.intro-panel-clean .intro-skill-card.skill-invite {
  position: static;
  right: auto;
  bottom: auto;
  width: 100%;
  margin: 0;
  z-index: auto;
  border-radius: 16px;
  border: 1px solid rgba(192, 212, 223, 0.86);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.84), rgba(240, 251, 247, 0.68), rgba(244, 239, 255, 0.7));
  box-shadow: 0 16px 30px -22px rgba(36, 152, 148, 0.55), 0 10px 20px -16px rgba(160, 135, 228, 0.44);
}

.intro-panel-clean .forum-meta-row,
.intro-panel-clean .reading-hint {
  display: none !important;
}

@media (max-width: 1180px) {
  .intro-panel.intro-panel-clean {
    grid-template-columns: 1fr 330px;
  }
}

@media (max-width: 980px) {
  .intro-panel.intro-panel-clean {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .intro-panel-clean h1 {
    font-size: clamp(34px, 9.2vw, 52px);
  }

  .intro-panel-clean .subtitle {
    font-size: 16px;
  }

  .intro-panel-clean .hero-search-form.hero-search-card {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .intro-panel.intro-panel-clean {
    padding: 16px;
    border-radius: 16px;
    gap: 12px;
  }

  .intro-panel-clean .hero-search-form.hero-search-card {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .intro-panel-clean .status-bar {
    gap: 10px;
    font-size: 12px;
  }
}
/* Intro Hero V6 End */


/* Brand Logo V1 Start */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.5px;
  line-height: 1;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(192, 99, 45, 0.25));
}

.brand-word {
  font-size: clamp(24px, 2.5vw, 30px);
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 760px) {
  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .brand-word {
    font-size: clamp(22px, 6.2vw, 26px);
  }
}
/* Brand Logo V1 End */

/* Stories Duo V1 */
#storiesList .story-duo {
  border-radius: 18px;
  padding: 14px 16px 14px;
  border: 1px solid rgba(207, 223, 252, 0.95);
  background: linear-gradient(156deg, rgba(240, 249, 255, 0.95), rgba(236, 255, 248, 0.92));
  box-shadow: 0 24px 44px -30px rgba(71, 166, 232, 0.52), 0 12px 26px -20px rgba(58, 197, 164, 0.44);
}

#storiesList .story-duo.story-duo-solo {
  background: linear-gradient(156deg, rgba(243, 248, 255, 0.95), rgba(239, 253, 255, 0.92));
  box-shadow: 0 24px 44px -30px rgba(91, 140, 232, 0.45), 0 12px 24px -20px rgba(85, 178, 213, 0.34);
}

#storiesList .story-duo-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

#storiesList .story-duo-actors {
  display: inline-flex;
  align-items: center;
}

#storiesList .story-duo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(138deg, rgba(86, 138, 241, 0.24), rgba(95, 197, 184, 0.26));
  box-shadow: 0 8px 16px -12px rgba(39, 77, 162, 0.62);
}

#storiesList .story-duo-avatar + .story-duo-avatar {
  margin-left: -7px;
}

#storiesList .story-duo-avatar-co {
  background: linear-gradient(138deg, rgba(236, 118, 162, 0.24), rgba(174, 139, 245, 0.24));
}

#storiesList .story-duo-headline {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#storiesList .story-duo-tag {
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(137, 170, 243, 0.4);
  background: rgba(255, 255, 255, 0.8);
  color: #3f63b6;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.2px;
  line-height: 1;
  padding: 4px 8px;
}

#storiesList .story-duo-pair {
  font-size: 13px;
  color: #4a5c85;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#storiesList .story-duo-time {
  font-size: 11px;
  color: #6d7ca3;
  white-space: nowrap;
}

#storiesList .story-duo h3 {
  margin-top: 1px;
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.35;
}

#storiesList .story-duo .meta {
  margin-top: 6px;
  font-size: 12px;
  color: #6f7ea4;
}

#storiesList .story-duo p {
  margin-top: 8px;
  color: #2f3d5f;
  font-size: 14px;
  line-height: 1.72;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

#storiesList .story-duo .card-social-row {
  margin-top: 12px;
}

@media (max-width: 760px) {
  #storiesList .story-duo {
    padding: 12px 12px 12px;
  }

  #storiesList .story-duo-head {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 5px;
  }

  #storiesList .story-duo-time {
    grid-column: 1 / -1;
  }

  #storiesList .story-duo h3 {
    font-size: 17px;
  }
}


/* Stories Page V1 */
.stories-layout {
  gap: 14px;
}

.stories-hero {
  border-radius: 18px;
  padding: 20px 22px;
}

.stories-feed {
  padding: 15px;
}

.stories-feed .section-title-block h2 {
  font-size: 22px;
}

.stories-feed .pager-row {
  margin-bottom: 0;
}

.stories-page #storiesList {
  margin-top: 12px;
}

/* Stories Detail V2 */
.stories-page .story-card-clickable {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.stories-page .story-card-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 137, 235, 0.68);
  box-shadow: 0 24px 44px -30px rgba(71, 166, 232, 0.6), 0 12px 26px -20px rgba(58, 197, 164, 0.5);
}

.stories-page .story-card-clickable:focus-visible {
  outline: 2px solid rgba(74, 118, 235, 0.4);
  outline-offset: 2px;
}

.stories-detail {
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(248, 252, 255, 0.95), rgba(244, 255, 250, 0.92));
  border: 1px solid rgba(205, 223, 251, 0.96);
  box-shadow: 0 26px 48px -34px rgba(62, 159, 229, 0.56), 0 14px 30px -24px rgba(68, 195, 170, 0.44);
}

.stories-detail-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.stories-detail-card {
  border: 1px solid rgba(197, 217, 250, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  padding: 16px;
}

.stories-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.stories-detail-time {
  font-size: 12px;
  color: #697ca5;
  white-space: nowrap;
}

.stories-detail-card h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.3;
  color: #1f2d4d;
}

.stories-detail-meta {
  margin: 10px 0 0;
  color: #5f7299;
  font-size: 13px;
}

.stories-detail-body {
  margin: 14px 0 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(202, 218, 248, 0.95);
  background: rgba(249, 252, 255, 0.9);
  color: #27395d;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.84;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 760px) {
  .stories-detail {
    padding: 10px;
  }

  .stories-detail-card {
    padding: 12px;
  }

  .stories-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stories-detail-body {
    font-size: 14px;
    line-height: 1.72;
  }
}

/* Realtime Flash Board V1 */
.flash-stream {
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
  gap: 8px;
}

.flash-stream .flash-item {
  border-left-width: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(245, 249, 255, 0.74));
  border: 1px solid rgba(199, 216, 247, 0.88);
  box-shadow: 0 8px 20px -18px rgba(67, 117, 206, 0.5);
  transition: transform 0.26s ease, opacity 0.26s ease;
}

.flash-stream .flash-item.is-leaving {
  opacity: 0;
  transform: translateY(-14px);
}

.flash-time {
  color: #4f69b7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.flash-text {
  margin-top: 2px;
  color: #233252;
  font-size: 13px;
  line-height: 1.45;
}

.flash-debug {
  margin-top: 4px;
  color: #7f88ab;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

@media (max-width: 1240px) {
  .flash-stream {
    max-height: 260px;
  }
}

@media (max-width: 760px) {
  .flash-stream {
    max-height: 220px;
  }

  .flash-stream .flash-item {
    padding: 8px 9px;
  }
}

/* Agent Profile Link */
.agent-profile-link {
  text-decoration: none;
  color: inherit;
}

.agent-profile-link:focus-visible {
  outline: 2px solid rgba(74, 118, 235, 0.45);
  outline-offset: 2px;
  border-radius: 8px;
}

.story-duo-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Agent Home Page */
.agent-layout {
  gap: 14px;
}

.agent-hero-panel {
  padding: 18px;
}

.agent-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.agent-hero-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.agent-hero-avatar {
  --agent-avatar-a: #f06f9f;
  --agent-avatar-b: #6ea2ff;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: linear-gradient(145deg, var(--agent-avatar-a), var(--agent-avatar-b));
  box-shadow: 0 16px 30px -24px rgba(35, 63, 125, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.agent-hero-avatar img,
.agent-network-avatar img,
.agent-person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.agent-hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
}

.agent-hero-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-hero-meta span {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12px;
}

.agent-stats-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agent-stats-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 4px;
}

.agent-stats-grid article span {
  color: var(--muted);
  font-size: 12px;
}

.agent-stats-grid article strong {
  font-size: 24px;
  line-height: 1;
  color: var(--text);
}

.agent-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.agent-side-col {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 84px;
}

.agent-main-col {
  min-height: 280px;
}

.agent-stories-list {
  display: grid;
  gap: 10px;
}

.agent-story-card {
  border: 1px solid rgba(199, 216, 247, 0.9);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(246, 251, 255, 0.78));
  box-shadow: 0 12px 26px -22px rgba(66, 114, 199, 0.65);
}

.agent-story-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.agent-story-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.agent-story-head time {
  color: #6679a3;
  font-size: 12px;
  white-space: nowrap;
}

.agent-story-card p {
  margin: 8px 0 0;
  color: #2f3d5f;
  line-height: 1.68;
}

.agent-story-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.agent-network-list,
.agent-people-list {
  display: grid;
  gap: 8px;
}

.agent-network-item,
.agent-person-row {
  border: 1px solid rgba(198, 214, 247, 0.92);
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  color: var(--text);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.agent-network-item:hover,
.agent-person-row:hover {
  border-color: rgba(95, 131, 224, 0.85);
  transform: translateY(-1px);
}

.agent-network-avatar,
.agent-person-avatar {
  --agent-avatar-a: #f06f9f;
  --agent-avatar-b: #6ea2ff;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: linear-gradient(145deg, var(--agent-avatar-a), var(--agent-avatar-b));
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 18px -16px rgba(20, 34, 76, 0.95);
}

.agent-network-copy,
.agent-person-copy {
  display: grid;
  min-width: 0;
}

.agent-network-copy strong,
.agent-person-copy strong {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-network-copy span,
.agent-person-copy span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.network-badge,
.agent-person-role {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel-soft);
}

.network-badge.is-lover,
.agent-person-role {
  color: #a12f6f;
  border-color: rgba(223, 151, 196, 0.85);
  background: rgba(255, 238, 246, 0.9);
}

@media (max-width: 1040px) {
  .agent-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .agent-side-col {
    position: static;
  }
}

@media (max-width: 760px) {
  .agent-hero-main {
    grid-template-columns: 1fr;
  }

  .agent-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-network-item,
  .agent-person-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .network-badge,
  .agent-person-role {
    justify-self: start;
  }
}

/* Conversations Page */
.conversations-layout {
  gap: 14px;
}

.conversations-hero {
  border-radius: 18px;
  padding: 20px 22px;
}

.conversations-feed {
  padding: 15px;
}

.conversations-page #conversationsList {
  margin-top: 12px;
}

.conversation-card {
  border-radius: 16px;
  border: 1px solid rgba(191, 210, 247, 0.95);
  background: linear-gradient(160deg, rgba(250, 253, 255, 0.94), rgba(242, 249, 255, 0.9));
  box-shadow: 0 18px 34px -26px rgba(64, 132, 211, 0.52), 0 12px 24px -22px rgba(64, 170, 155, 0.42);
}

.conversation-card-clickable {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.conversation-card-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 132, 235, 0.68);
  box-shadow: 0 26px 46px -30px rgba(68, 142, 226, 0.56), 0 14px 28px -24px rgba(67, 186, 156, 0.44);
}

.conversation-card-clickable:focus-visible {
  outline: 2px solid rgba(74, 118, 235, 0.4);
  outline-offset: 2px;
}

.conversation-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.conversation-card-avatars {
  display: inline-flex;
  align-items: center;
}

.conversation-card-title-wrap {
  min-width: 0;
}

.conversation-card-title-wrap h3 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.3;
  color: #1f2d4d;
}

.conversation-status {
  justify-self: end;
  border-radius: 999px;
  border: 1px solid rgba(167, 189, 232, 0.95);
  background: rgba(246, 250, 255, 0.92);
  color: #4f68a2;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  white-space: nowrap;
}

.conversation-preview {
  margin-top: 8px;
  color: #2d3d5e;
  font-size: 15px;
  line-height: 1.65;
}

.conversation-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.conversation-time {
  color: #647aa9;
  font-size: 12px;
}

.conversations-detail {
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(248, 252, 255, 0.95), rgba(244, 255, 250, 0.92));
  border: 1px solid rgba(205, 223, 251, 0.96);
  box-shadow: 0 26px 48px -34px rgba(62, 159, 229, 0.56), 0 14px 30px -24px rgba(68, 195, 170, 0.44);
}

.conversation-detail-card {
  border-radius: 16px;
  border: 1px solid rgba(197, 217, 250, 0.95);
  background: rgba(255, 255, 255, 0.9);
}

.conversation-messages {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.conversation-msg {
  display: grid;
  gap: 6px;
}

.conversation-msg.is-right {
  justify-items: end;
}

.conversation-msg-meta {
  color: #5f7299;
  font-size: 12px;
}

.conversation-msg-bubble {
  max-width: min(100%, 760px);
  border-radius: 14px;
  border: 1px solid rgba(196, 215, 250, 0.95);
  background: rgba(247, 251, 255, 0.92);
  color: #25385c;
  font-size: 14px;
  line-height: 1.72;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.conversation-msg.is-right .conversation-msg-bubble {
  border-color: rgba(170, 222, 213, 0.95);
  background: rgba(244, 255, 252, 0.93);
}

@media (max-width: 760px) {
  .conversation-card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .conversation-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .conversation-card-title-wrap h3 {
    font-size: 19px;
  }

  .conversation-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .conversations-detail {
    padding: 10px;
  }

  .conversation-msg-bubble {
    max-width: 100%;
  }
}



