:root {
  --bg-deep: #4e1236;
  --bg-mid: #8f295f;
  --bg-light: #f37fb8;
  --surface: rgba(93, 18, 61, 0.78);
  --surface-alt: rgba(127, 26, 84, 0.82);
  --surface-strong: #681845;
  --ink: #fff3fb;
  --muted: #f3c4de;
  --accent: #ff76b6;
  --accent-strong: #ff4fa1;
  --accent-soft: #ffd0e7;
  --danger: #ff8e8e;
  --radius: 20px;
  --shadow: 0 22px 55px rgba(63, 8, 36, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Outfit", "Baloo 2", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.18), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 208, 231, 0.18), transparent 24%),
    radial-gradient(circle at 20% 82%, rgba(255, 118, 182, 0.22), transparent 28%),
    linear-gradient(160deg, #3a0d28 0%, #8f295f 45%, #ff9cc8 100%);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

.section,
main,
.app-shell,
.modal,
.modal-dialog {
  position: relative;
  z-index: 1;
}

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

.bg-icon {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(3.2rem, 8vw, 6rem);
  aspect-ratio: 1;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 38px rgba(84, 10, 50, 0.18);
  color: rgba(255, 243, 251, 0.82);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  backdrop-filter: blur(12px);
  animation: drift 12s ease-in-out infinite;
}

.icon-a {
  top: 7%;
  left: 5%;
}

.icon-b {
  top: 18%;
  right: 8%;
  animation-delay: -2s;
}

.icon-c {
  top: 54%;
  left: 8%;
  animation-delay: -4s;
}

.icon-d {
  right: 11%;
  bottom: 17%;
  animation-delay: -1s;
}

.icon-e {
  left: 46%;
  bottom: 10%;
  animation-delay: -5s;
}

.section {
  width: min(1220px, calc(100% - 2.2rem));
  margin: 0 auto;
  padding: 3.5rem 0;
}

.hero {
  min-height: 84vh;
  display: grid;
  align-content: center;
  gap: 1.8rem;
}

.nav {
  position: sticky;
  top: 1.1rem;
  z-index: 9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 208, 231, 0.3);
  background: rgba(104, 24, 69, 0.58);
  backdrop-filter: blur(10px);
}

.brand {
  font-family: "Baloo 2", "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.nav-cta,
.primary-btn {
  border: none;
  text-decoration: none;
  cursor: pointer;
  color: #45122c;
  font-weight: 700;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 28px rgba(255, 79, 161, 0.28);
}

.ghost-btn {
  text-decoration: none;
  border: 1px solid rgba(255, 208, 231, 0.42);
  color: var(--accent-soft);
  background: rgba(126, 30, 86, 0.38);
  font-weight: 700;
  cursor: pointer;
  padding: 0.68rem 1rem;
  border-radius: 999px;
}

.hero-content {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 208, 231, 0.34);
  background:
    radial-gradient(circle at top right, rgba(255, 208, 231, 0.2), transparent 40%),
    rgba(93, 18, 61, 0.8);
  box-shadow: var(--shadow);
  padding: clamp(1.3rem, 4vw, 2.7rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.6rem;
  align-items: center;
}

.hero-copy {
  display: grid;
  align-content: start;
}

.hero-visual {
  display: grid;
}

.hero-visual-frame {
  position: relative;
  min-height: 100%;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 208, 231, 0.32);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(104, 24, 69, 0.18), rgba(104, 24, 69, 0.62));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-car {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.hero-visual-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(104, 24, 69, 0.76);
  border: 1px solid rgba(255, 208, 231, 0.42);
  color: #fff3fb;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.eyebrow {
  color: #ffd0e7;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.9rem;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Baloo 2", "Outfit", sans-serif;
}

h1 {
  line-height: 0.98;
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: 0.95rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.subtitle {
  max-width: 68ch;
  color: #ffe2f0;
  margin-bottom: 1.2rem;
  font-size: 1.08rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pill {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 118, 182, 0.16);
  border: 1px solid rgba(255, 208, 231, 0.44);
  color: #fff0f8;
  letter-spacing: 0.05em;
  font-weight: 700;
  font-size: 0.82rem;
}

.hero-stats {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.9rem;
}

.stat-label {
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.stat-value {
  color: #ffd0e7;
  font-size: 2rem;
  font-weight: 800;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(250px, 0.9fr);
  gap: 1.6rem;
  align-items: stretch;
}

.radar-panel,
.detail-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 208, 231, 0.24);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.radar-header {
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.radar-scan {
  display: grid;
  place-items: center;
}

.radar-grid {
  width: min(420px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(255, 118, 182, 0.22), rgba(104, 24, 69, 0.88));
  box-shadow: inset 0 0 40px rgba(2, 6, 23, 0.58);
}

.radar-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(255, 208, 231, 0.22);
}

.ring-2 {
  inset: 26%;
}

.ring-3 {
  inset: 40%;
}

.ring-4 {
  inset: 54%;
}

.radar-cross {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 208, 231, 0.18) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(255, 208, 231, 0.18) 50%, transparent 51%);
}

.radar-sweep {
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, rgba(255, 208, 231, 0.4), rgba(255, 208, 231, 0) 55%);
  animation: sweep 5.8s linear infinite;
  mix-blend-mode: screen;
}

.radar-dots {
  position: absolute;
  inset: 0;
}

.radar-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffd0e7;
  box-shadow: 0 0 14px rgba(255, 79, 161, 0.45);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.radar-dot:hover {
  transform: scale(1.25);
  box-shadow: 0 0 18px rgba(255, 208, 231, 0.8);
}

.risk-radar-grid {
  background: radial-gradient(circle at center, rgba(255, 144, 198, 0.22), rgba(104, 24, 69, 0.9));
}

.risk-dot {
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.risk-dot-low {
  background: #86efac;
}

.risk-dot-medium {
  background: #facc15;
}

.risk-dot-high {
  background: #fb923c;
}

.risk-dot-critical {
  background: #f87171;
}

.radar-footer {
  margin-top: 1.2rem;
}

.detail-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.detail-empty {
  padding: 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: var(--muted);
}

.detail-card {
  display: grid;
  gap: 0.7rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  padding: 0.34rem 0.66rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 208, 231, 0.4);
  background: rgba(255, 118, 182, 0.14);
  color: #ffe2f0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.55rem;
}

.muted {
  color: var(--muted);
}

.overview-item {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(126, 30, 86, 0.34);
  border: 1px solid rgba(255, 208, 231, 0.3);
  cursor: pointer;
}

.overview-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(143, 199, 255, 0.45);
}

.text-input {
  border: 1px solid rgba(255, 208, 231, 0.35);
  border-radius: 12px;
  padding: 0.66rem 0.82rem;
  background: rgba(104, 24, 69, 0.58);
  color: var(--ink);
  font: inherit;
  min-width: 220px;
}

.text-area {
  resize: vertical;
  min-height: 120px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(54, 8, 31, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 190ms ease;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(520px, 100%);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--surface-strong);
  border: 1px solid rgba(143, 199, 255, 0.35);
  box-shadow: var(--shadow);
}

.modal-card--wide {
  width: min(760px, 100%);
}

.modal-text {
  color: var(--muted);
  margin-bottom: 1rem;
}

.modal-dialog {
  width: min(560px, calc(100% - 2rem));
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
}

.modal-dialog::backdrop {
  background:
    radial-gradient(circle at top, rgba(10, 110, 209, 0.18), transparent 32%),
    rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.dialog-close-btn {
  margin-top: 0;
  align-self: center;
}

.form-grid {
  display: grid;
  gap: 0.95rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.field.full {
  grid-column: 1 / -1;
}

.radar-items-list {
  display: grid;
  gap: 0.65rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.radar-item-button {
  width: 100%;
  text-align: left;
  font: inherit;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-6deg);
  }

  50% {
    transform: translate3d(0, -14px, 0) rotate(8deg);
  }
}

@media (max-width: 980px) {
  .radar-layout {
    grid-template-columns: 1fr;
  }

  .nav {
    position: static;
    border-radius: 18px;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-car {
    min-height: 300px;
  }

}

/* Existing app shell styling for authenticated pages */

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.workspace-shell {
  width: min(1100px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  border: 1px solid rgba(255, 208, 231, 0.28);
  backdrop-filter: blur(18px);
}

.workspace-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.workspace-topbar-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.community-menu {
  position: relative;
}

.community-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(460px, calc(100vw - 2.5rem));
  background:
    radial-gradient(circle at top right, rgba(255, 208, 231, 0.2), transparent 40%),
    rgba(93, 18, 61, 0.96);
  border: 1px solid rgba(255, 208, 231, 0.35);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0.9rem;
  z-index: 8;
  display: grid;
  gap: 0.75rem;
}

.community-menu-panel[hidden] {
  display: none;
}

.community-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.community-sort-select {
  min-width: 0;
  width: 150px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.community-post-form {
  display: grid;
  gap: 0.55rem;
}

.community-post-input {
  min-height: 86px;
}

.community-feed {
  display: grid;
  gap: 0.5rem;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.community-post {
  border: 1px solid rgba(255, 208, 231, 0.28);
  border-radius: 12px;
  background: rgba(104, 24, 69, 0.72);
  padding: 0.6rem 0.65rem;
  display: grid;
  gap: 0.45rem;
}

.community-post-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.community-post-text {
  line-height: 1.4;
  color: #e2e8f0;
  overflow-wrap: anywhere;
}

.community-like-btn {
  justify-self: start;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
}

.surprise-card {
  margin-top: 0.2rem;
  border: 1px solid rgba(255, 208, 231, 0.3);
  border-radius: 12px;
  padding: 0.72rem;
  background: rgba(126, 30, 86, 0.34);
  display: grid;
  gap: 0.5rem;
}

.daily-challenge-text {
  color: #dbeafe;
  line-height: 1.4;
}

.workspace-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
}

.dashboard-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.coe-spotlight,
.workspace-sidebar {
  background: var(--surface-alt);
  border-radius: 12px;
  border: 1px solid rgba(255, 208, 231, 0.28);
}

.coe-spotlight {
  padding: 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 1rem;
  align-items: center;
  background:
    radial-gradient(circle at top left, rgba(255, 208, 231, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(127, 26, 84, 0.98), rgba(93, 18, 61, 0.98));
}

.coe-spotlight-copy {
  display: grid;
  gap: 0.7rem;
}

.coe-spotlight-visual {
  display: grid;
}

.coe-car-image {
  width: 100%;
  min-height: 240px;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 208, 231, 0.28);
}

.dashboard-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.dashboard-stat-card {
  display: grid;
  gap: 0.18rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 208, 231, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-stat-label {
  color: #ffdceb;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-stat-value {
  color: #fff6fb;
  font-size: 1.5rem;
}

.workspace-sidebar {
  padding: 1rem;
}

.workspace-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.thread-sidebar-header {
  margin-top: 1rem;
}

.sidebar-add-btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
}

.project-list {
  display: grid;
  gap: 0.75rem;
}

.thread-list {
  display: grid;
  gap: 0.4rem;
}

.project-item {
  display: grid;
  gap: 0.4rem;
}

.project-row {
  position: relative;
}

.project-menu-item.danger {
  color: var(--danger);
}

.project-actions {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  transform: translateY(-50%);
  z-index: 2;
}

.project-menu-wrap {
  position: relative;
}

.project-new-chat-btn,
.project-menu-btn {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent-soft);
  font-size: 1.05rem;
  line-height: 1;
}

.project-new-chat-btn {
  font-size: 0.95rem;
}

.project-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  background: var(--surface-strong);
  border: 1px solid rgba(255, 208, 231, 0.4);
  border-radius: 8px;
  min-width: 150px;
  box-shadow: var(--shadow);
  display: grid;
  padding: 0.25rem;
  z-index: 5;
}

.project-menu[hidden] {
  display: none;
}

.project-menu.open {
  display: grid;
}

.project-menu-item {
  border: none;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

.project-menu-item:hover {
  background: rgba(255, 208, 231, 0.12);
}

.project-button,
.session-button {
  border: 1px solid rgba(255, 208, 231, 0.28);
  background: rgba(126, 30, 86, 0.48);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.thread-button {
  border: 1px solid rgba(255, 208, 231, 0.24);
  background: rgba(104, 24, 69, 0.48);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  text-align: left;
  font: inherit;
  display: grid;
  gap: 0.1rem;
  color: var(--ink);
}

.project-row .project-button {
  width: 100%;
  padding-right: 3.6rem;
}

.project-button.active,
.session-button.active {
  border-color: var(--accent);
  background: rgba(10, 110, 209, 0.2);
}

.project-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(143, 199, 255, 0.28);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  background: rgba(8, 44, 81, 0.7);
  color: var(--ink);
  cursor: pointer;
}

.project-btn.active {
  border-color: var(--accent);
}

.session-list {
  display: grid;
  gap: 0.35rem;
  padding-left: 0.8rem;
}

.session-button {
  display: grid;
  gap: 0.1rem;
  position: relative;
  padding-right: 2.6rem;
}

.session-actions {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: flex;
  align-items: center;
  z-index: 2;
}

.session-title {
  line-height: 1.25;
}

.project-sharing-meta {
  display: block;
  margin-top: 0.2rem;
  color: #8fc7ff;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.session-modified {
  font-size: 0.56rem;
  color: var(--muted);
  line-height: 1.05;
}

.workspace-main {
  background: var(--surface-alt);
  border: 1px solid rgba(255, 208, 231, 0.28);
  border-radius: 12px;
  padding: 1rem;
}

.workspace-chat {
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 520px;
}

.chat-empty {
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.chat-messages {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.chat-bubble {
  max-width: min(640px, 85%);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  line-height: 1.45;
}

.chat-bubble.user {
  justify-self: end;
  background: linear-gradient(130deg, var(--accent-strong), var(--accent));
  color: #f3f9ff;
}

.chat-bubble.assistant {
  justify-self: start;
  background: rgba(126, 30, 86, 0.44);
  border: 1px solid rgba(255, 208, 231, 0.25);
}

.chat-composer {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.app-meta {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.profile-panel {
  background: var(--surface-alt);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(143, 199, 255, 0.28);
}

.profile-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.profile-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.close-btn {
  margin-top: 1rem;
  border: 1px solid rgba(255, 208, 231, 0.55);
  background: rgba(255, 118, 182, 0.18);
  color: var(--ink);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}

.thread-modal-card {
  width: min(560px, 100%);
  background:
    radial-gradient(circle at top right, rgba(255, 208, 231, 0.16), transparent 45%),
    linear-gradient(170deg, rgba(93, 18, 61, 0.97), rgba(104, 24, 69, 0.98));
  border: 1px solid rgba(255, 208, 231, 0.35);
}

.thread-modal-dialog[open] {
  display: grid;
  place-items: center;
}

.share-list-wrap {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.share-list {
  display: grid;
  gap: 0.45rem;
}

.share-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid rgba(255, 208, 231, 0.3);
  border-radius: 10px;
  background: rgba(104, 24, 69, 0.64);
  padding: 0.45rem 0.55rem;
  color: #fff0f8;
}

.share-chip button {
  border: 1px solid rgba(255, 208, 231, 0.5);
  border-radius: 999px;
  background: rgba(126, 30, 86, 0.4);
  color: var(--accent-soft);
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.share-chip button:hover {
  border-color: var(--accent);
}

.workspace-footer {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-footer-panel {
  border-radius: 14px;
  border: 1px solid rgba(143, 199, 255, 0.24);
  background:
    radial-gradient(circle at top left, rgba(10, 110, 209, 0.14), transparent 45%),
    rgba(4, 30, 58, 0.76);
  padding: 0.95rem;
  display: grid;
  gap: 0.72rem;
}

.workspace-footer-label {
  color: #c8e2fb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.workspace-footer-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.workspace-stat-card {
  border: 1px solid rgba(10, 110, 209, 0.32);
  border-radius: 11px;
  background: rgba(4, 30, 58, 0.78);
  padding: 0.55rem 0.5rem;
  display: grid;
  gap: 0.12rem;
}

.workspace-stat-value {
  font-size: 1.18rem;
  font-weight: 800;
  color: #8fc7ff;
}

.workspace-stat-label {
  color: #d8e9fa;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workspace-footer-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.36;
}

.workspace-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.footer-action-btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .dashboard-strip,
  .workspace-body {
    grid-template-columns: 1fr;
  }

  .community-menu-panel {
    right: auto;
    left: 0;
    width: min(460px, calc(100vw - 3rem));
  }

  .workspace-chat {
    min-height: 420px;
  }

  .workspace-footer {
    grid-template-columns: 1fr;
  }

  .coe-spotlight {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-row {
    grid-template-columns: 1fr;
  }

  .dialog-header {
    flex-direction: column;
  }
}
