:root {
  color-scheme: light;
  --ink: #202638;
  --muted: #687086;
  --line: #dfe3ea;
  --paper: #ffffff;
  --canvas: #f4f5f8;
  --navy: #263e66;
  --navy-dark: #1c2d4b;
  --teal: #267b73;
  --teal-dark: #1d625c;
  --red: #b23b43;
  --amber: #b87924;
  --soft-blue: #eaf0f8;
  --soft-red: #faecee;
  --soft-green: #e9f4f1;
  --shadow: 0 12px 30px rgba(34, 45, 67, 0.11);
  font-family: "Segoe UI", "Noto Sans Georgian", Arial, sans-serif;
}

* { box-sizing: border-box; }
* { letter-spacing: 0; }

html { overflow-x: hidden; }

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
}
body.modal-open { overflow: hidden; }

button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .62; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(38, 123, 115, 0.32);
  outline-offset: 2px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr);
  align-items: start;
  background: var(--paper);
}

.login-panel {
  min-width: 0;
  width: 100%;
  padding: 38px clamp(24px, 4vw, 64px) 64px;
}
.login-panel-inner {
  width: min(100%, 900px);
  margin: 0 auto;
}
.login-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}
.login-heading > div:last-child { min-width: 0; }

.brand-mark {
  --coin-size: 64px;
  --coin-border: 6px;
  --coin-face: #a99863;
  --coin-face-deep: #6f5b34;
  --coin-face-dark: #332817;
  --coin-highlight: #fff1b3;
  width: var(--coin-size);
  height: var(--coin-size);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
  isolation: isolate;
  overflow: visible;
  color: #6b5125;
}

.brand-coin {
  position: relative;
  width: 100%;
  height: 100%;
  animation: brandMedallionTurn 21s linear infinite;
  transform-origin: 50% 50%;
  will-change: transform;
}

.brand-coin-face,
.brand-coin-edge {
  position: absolute;
  pointer-events: none;
}

.brand-coin-face {
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 250, 203, .72), transparent 14%),
    radial-gradient(circle at 72% 76%, rgba(42, 33, 17, .56), transparent 44%),
    linear-gradient(115deg, #d4bf7a 0%, #9e8b58 35%, #77653b 62%, #b79b57 100%);
  border: var(--coin-border) solid rgba(190, 156, 82, .94);
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    inset 0 2px 5px rgba(255, 247, 193, .62),
    inset -7px 0 12px rgba(44, 35, 18, .55),
    inset 0 -9px 14px rgba(52, 38, 17, .46),
    inset 0 0 0 1px rgba(255, 246, 194, .34),
    inset 0 0 0 7px rgba(101, 79, 39, .24);
  backface-visibility: hidden;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  -webkit-text-stroke: .45px rgba(255, 236, 159, .44);
  text-shadow:
    -1px -1px 0 rgba(255, 244, 186, .46),
    1px 2px 1px rgba(56, 42, 18, .78),
    0 4px 7px rgba(42, 31, 13, .32);
}

.brand-coin-face::before,
.brand-coin-face::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.brand-coin-face::before {
  inset: 14%;
  border: 1px solid rgba(255, 236, 166, .3);
  background:
    radial-gradient(circle at 38% 26%, rgba(255, 250, 203, .36), transparent 21%),
    linear-gradient(118deg, rgba(255, 241, 179, .18), transparent 34%, rgba(61, 47, 22, .22) 74%),
    radial-gradient(circle at 50% 50%, rgba(118, 95, 48, .2), rgba(83, 65, 32, .18) 58%, rgba(255, 233, 154, .12) 63%, transparent 68%);
  box-shadow:
    inset 0 3px 4px rgba(45, 34, 16, .34),
    inset 0 -2px 5px rgba(255, 235, 159, .24),
    0 1px 0 rgba(255, 247, 196, .34);
  opacity: .96;
}

.brand-coin-face::after {
  inset: calc(var(--coin-border) * -1);
  border: 1px solid rgba(255, 240, 171, .56);
  background:
    radial-gradient(circle at 34% 18%, rgba(255, 252, 204, .55), transparent 16%),
    radial-gradient(circle at 50% 50%, transparent 0 56%, rgba(255, 243, 177, .42) 58% 61%, rgba(64, 48, 22, .62) 64% 70%, transparent 73%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 241, 177, .28),
    inset 0 0 0 9px rgba(81, 62, 31, .22);
  -webkit-mask: radial-gradient(circle, transparent 0 56%, #000 57% 100%);
  mask: radial-gradient(circle, transparent 0 56%, #000 57% 100%);
}

.brand-coin-front {
  transform: none;
}

.brand-coin-back,
.brand-coin-edge {
  display: none;
}

@keyframes brandMedallionTurn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-coin {
    animation: none;
    transform: none;
  }
}

.brand-mark.small {
  --coin-size: 38px;
  --coin-border: 4px;
  font-size: 18px;
}

.brand-mark.small .brand-coin-face {
  font-size: 19px;
  box-shadow:
    inset 0 1px 4px rgba(255, 247, 193, .54),
    inset -5px 0 8px rgba(44, 35, 18, .48),
    inset 0 -6px 9px rgba(52, 38, 17, .42),
    inset 0 0 0 1px rgba(255, 246, 194, .26),
    inset 0 0 0 5px rgba(101, 79, 39, .2);
}

.eyebrow {
  margin: 22px 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow.light { color: #9fd8d1; }
.login-panel h1 { margin: 0; overflow-wrap: anywhere; font-size: 38px; }
.login-heading .eyebrow { margin: 0 0 5px; }
.login-copy { margin: 14px 0 22px; color: var(--muted); line-height: 1.65; }

.login-form { min-inline-size: 0; display: grid; gap: 22px; }
.login-form label { min-width: 0; min-inline-size: 0; display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
.login-form input, .login-form select, .chat-form input, .profile-edit-form input, .profile-edit-form textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid #cfd5df;
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
}
.login-form select { cursor: pointer; }
.profile-edit-form textarea { resize: vertical; line-height: 1.55; }

.form-error { min-height: 20px; margin: -8px 0 0; color: var(--red); font-size: 13px; }
.credential-card {
  min-width: 0;
  min-inline-size: 0;
  position: sticky;
  z-index: 5;
  top: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid #ccd5e2;
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(34,45,67,.14);
}
.credential-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.credential-card-head .eyebrow { margin: 0 0 4px; }
.credential-card h2 { margin: 0; font-size: 19px; }
.prayer-gate {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px;
  background: #fffaf0;
  border: 1px solid #ead7af;
  border-left: 5px solid #d6a54b;
  border-radius: 7px;
}
.prayer-gate img {
  width: 86px;
  height: 106px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(38, 62, 102, .18);
}
.prayer-gate h3 { margin: 0 0 8px; color: var(--navy); font-size: 16px; }
.prayer-gate p { margin: 0 0 11px; color: #5b4630; line-height: 1.55; font-size: 13px; }
.prayer-check {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 8px !important;
  color: var(--ink);
  line-height: 1.4;
}
.prayer-check input { width: auto; margin-top: 2px; }
.gate-count {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--navy);
  background: var(--soft-blue);
  border: 1px solid #cbd8e8;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}
.credential-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.starter-login-field { grid-column: 1 / -1; }
.starter-login-intro { display: block; margin: 0 0 10px; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.65; }
.field-help { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.45; }
.credential-fields .button { min-height: 46px; }
.layer1-fieldset {
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fb;
}
.layer1-fieldset legend { max-width: 100%; padding: 0 8px; color: var(--navy); overflow-wrap: anywhere; white-space: normal; font-size: 18px; font-weight: 800; }
.layer1-fieldset > p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.layer1-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(10, auto) auto;
  grid-auto-flow: column;
  gap: 10px 14px;
}
.layer1-question {
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #dce1e9;
  border-left: 4px solid var(--navy);
  border-radius: 5px;
}
.layer1-question:last-child {
  grid-column: 1 / -1;
  grid-row: 11;
}
.layer1-question.invalid { border-color: #d99ba1; border-left-color: var(--red); background: #fff8f9; }
.layer1-question p { margin: 0 0 10px; overflow-wrap: anywhere; line-height: 1.5; font-size: 13px; }
.layer1-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.layer1-choice label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: var(--canvas);
  border: 1px solid #d6dce5;
  border-radius: 4px;
  cursor: pointer;
}
.layer1-choice input { width: auto; margin: 0; padding: 0; }

.login-aside {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(40px, 6vw, 90px);
  color: #fff;
  background: var(--navy-dark);
  border-left: 12px solid var(--teal);
}
.login-aside-inner { width: min(100%, 700px); }
.login-aside h2 { max-width: 700px; margin: 8px 0 18px; font-size: clamp(29px, 3vw, 50px); line-height: 1.18; }
.landing-copy {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  color: #d6dfed;
  line-height: 1.65;
}
.landing-copy p { margin: 0; }
.landing-gallery {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--ink);
}
.landing-gallery-frame {
  position: relative;
  overflow: hidden;
  background: #f7f2ea;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(0,0,0,.28);
}
.landing-gallery-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: #111827;
}
.landing-gallery-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(12,18,30,.82));
  font-size: 12px;
  font-weight: 700;
}
.landing-gallery-counter { flex: 0 0 auto; color: #ffd98d; }
.landing-gallery-arrow {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  color: #fff;
  background: rgba(20,30,50,.55);
  font-size: 25px;
  transform: translateY(-50%);
}
.landing-gallery-arrow:hover { background: rgba(20,30,50,.82); }
.landing-gallery-arrow.previous { left: 12px; }
.landing-gallery-arrow.next { right: 12px; }
.landing-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.landing-gallery-dots {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.landing-gallery-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%;
  background: transparent;
}
.landing-gallery-dots button.active {
  background: #fff;
  border-color: #fff;
}
.landing-gallery-toggle {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 5px;
  color: #fff;
  background: #2b4a76;
  font-size: 12px;
  font-weight: 800;
}
.prelogin-banners { display: grid; gap: 12px; margin-bottom: 34px; }
.prelogin-banners button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px;
  color: #fff;
  background: #2b4a76;
  border: 1px solid rgba(255,255,255,.25);
  border-left: 5px solid #d6a54b;
  border-radius: 6px;
  text-align: left;
}
.prelogin-banners button:hover { background: #345887; }
.prelogin-banners span { font-size: 17px; font-weight: 800; line-height: 1.4; }
.prelogin-banners b { flex: 0 0 auto; color: #a9ddd6; font-size: 12px; }
.aside-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.aside-grid span { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.25); color: #d6dfed; }
.aside-grid b { display: block; margin-bottom: 6px; color: #fff; font-size: 23px; }

.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.portal-shell.has-chat-rail { grid-template-columns: 252px minmax(260px, 310px) minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--navy-dark);
  border-right: 5px solid var(--teal);
}

.sidebar-brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 18px; font-weight: 800; }
.account-block { display: flex; align-items: center; gap: 12px; margin: 20px 18px; padding: 13px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 6px; }
.account-block img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.account-block strong, .account-block small { display: block; }
.account-block small { margin-top: 4px; color: #aebbd0; }
.primary-nav { min-height: 0; overflow-x: hidden; overflow-y: auto; display: grid; gap: 5px; padding: 8px 12px; }
.nav-button { width: 100%; display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 8px; padding: 13px 12px; border: 0; border-left: 4px solid transparent; border-radius: 4px; color: #dce4f1; background: transparent; text-align: left; line-height: 1.35; }
.nav-icon { color: #d6a54b; text-align: center; }
.nav-button span:last-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.nav-button:hover { background: rgba(255,255,255,.07); }
.nav-button.active { color: #fff; background: #2b4a76; border-left-color: #d6a54b; font-weight: 700; }
.sidebar-footer { margin-top: auto; padding: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.text-button { padding: 0; border: 0; color: #b9c6d9; background: none; font-size: 13px; text-decoration: underline; }

.main-column { grid-column: 2; min-width: 0; }
.portal-shell.has-chat-rail .main-column { grid-column: 3; }
.chat-rail {
  grid-column: 2;
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  overflow: auto;
  background: #f7f9fc;
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 22px rgba(34, 45, 67, .08);
}
.chat-rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  color: #fff;
  background: var(--navy);
}
.chat-rail-header .eyebrow { margin: 0 0 4px; color: #9fd8d1; }
.chat-rail-header h2 { margin: 0; font-size: 19px; }
.chat-thread-list { display: grid; gap: 8px; padding: 12px; }
.chat-thread {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d9e0ea;
  border-left: 4px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}
.chat-thread.active { border-left-color: var(--teal); background: var(--soft-green); }
.chat-thread img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.chat-thread strong, .chat-thread small { display: block; min-width: 0; overflow-wrap: anywhere; }
.chat-thread small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.topbar { min-height: 106px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner {
  width: min(100%, 1180px);
  min-height: 106px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
}
.topbar .eyebrow { margin: 0 0 8px; }
.topbar h1 { margin: 0; font-size: 26px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.diagnostic-badge { padding: 8px 10px; border: 1px solid #ddc798; border-radius: 4px; color: #73551f; background: #fff8e9; font-size: 12px; font-weight: 700; }
.content { padding: 30px 34px 54px; }
.content-inner { width: min(100%, 1180px); margin: 0 auto; }
.section-intro {
  width: min(100%, 1080px);
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}
.section-intro p { margin: 0; }

.button {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 750;
}
.button.primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { color: var(--navy); background: #fff; border-color: #bdc7d7; }
.button.secondary:hover { background: var(--soft-blue); }
.button.danger { color: #fff; background: var(--red); border-color: var(--red); }
.button.disabled { color: #8a8f9b; background: #e5e7eb; border-color: #d5d8de; cursor: not-allowed; }
.button.wide { width: 100%; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.profile-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 7px; box-shadow: 0 4px 16px rgba(40,50,70,.06); }
.profile-card > img {
  width: 100%;
  height: 148px;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #f8fbfc;
}
.profile-card-body { padding: 18px; }
.profile-card h2, .friend-row h2 { margin: 0; font-size: 19px; }
.profile-card p { color: var(--muted); line-height: 1.5; }
.profile-meta { font-weight: 700; }
.profile-photo-trigger { cursor: zoom-in; }
.profile-photo-trigger:focus-visible,
.detail-name-link:focus-visible {
  outline: 3px solid rgba(38, 123, 115, .35);
  outline-offset: 3px;
}
.detail-name-link {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}
.detail-name-link:hover { color: var(--teal-dark); text-decoration: underline; }
.anonymous-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 1080px;
  margin: 0 auto;
}
.anonymous-grid > .profile-card { grid-column: span 2; }
.anonymous-grid > .profile-card:nth-child(4) { grid-column: 2 / span 2; }
.anonymous-grid > .profile-card:nth-child(5) { grid-column: 4 / span 2; }
.anonymous-card { border-top-color: var(--navy); }
.anonymous-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.rank-badge { display: inline-grid; place-items: center; min-width: 42px; height: 34px; padding: 0 10px; color: #fff; background: var(--navy); border-radius: 4px; font-size: 15px; font-weight: 800; }
.row-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.score { flex: 0 0 auto; padding: 5px 8px; color: #14615a; background: var(--soft-green); border: 1px solid #badbd6; border-radius: 4px; font-size: 12px; font-weight: 800; }
.score.muted { color: #666d7b; background: #eef0f3; border-color: #d7dbe2; }
.card-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }

.category-radar {
  min-width: 0;
  margin: 16px 0 0;
  padding: 14px;
  color: #e9fffb;
  background:
    radial-gradient(circle at 28% 18%, rgba(78, 255, 226, .20), transparent 34%),
    radial-gradient(circle at 82% 86%, rgba(255, 207, 115, .16), transparent 32%),
    linear-gradient(135deg, rgba(11, 22, 42, .97), rgba(12, 46, 58, .94));
  border: 1px solid rgba(101, 255, 232, .42);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 28, 42, .22), inset 0 0 28px rgba(67, 244, 221, .10);
  overflow: hidden;
}
.category-radar-card { padding: 12px; }
.category-radar-comparison { margin-bottom: 16px; }
.category-radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: #fbfffb;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.category-radar-head b {
  flex: 0 1 auto;
  max-width: 58%;
  color: #ffdc8c;
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}
.category-radar-scale {
  margin: 0 0 12px;
  color: rgba(235, 255, 251, .78);
  font-size: 11.5px;
  font-weight: 760;
  line-height: 1.35;
}
.category-radar-body {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, 206px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.category-radar-card .category-radar-body { grid-template-columns: 1fr; }
.category-radar-svg {
  width: 100%;
  max-width: 206px;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
  filter: drop-shadow(0 0 9px rgba(71, 255, 231, .32));
}
.category-radar-ring {
  fill: none;
  stroke: rgba(177, 245, 238, .28);
  stroke-width: .7;
}
.category-radar-axis {
  stroke: rgba(255, 221, 143, .22);
  stroke-width: .55;
}
.category-radar-fill {
  fill: rgba(71, 255, 231, .24);
  stroke: none;
}
.category-radar-line {
  fill: none;
  stroke: #5affea;
  stroke-width: 2.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(90, 255, 234, .86));
}
.category-radar-value {
  fill: #ffe29a;
  font-size: 8.1px;
  font-weight: 950;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(5, 17, 30, .88);
  stroke-width: 2px;
}
.category-radar-letter {
  fill: #ffe66f;
  font-size: 11.4px;
  font-weight: 950;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(5, 17, 30, .92);
  stroke-width: 2.4px;
  filter: drop-shadow(0 0 5px rgba(255, 232, 113, .55));
}
.category-radar-list {
  min-width: 0;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.category-radar-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
}
.category-radar-list-letter {
  color: #ffe66f;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255, 232, 113, .50);
}
.category-radar-list span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.25;
}
.category-radar-list-percent {
  color: #60ffea;
  font-size: 13px;
  font-weight: 950;
  text-shadow: 0 0 8px rgba(96, 255, 234, .52);
}

.dimension-bars {
  min-width: 0;
  margin: 16px 0 0;
  padding: 16px;
  color: #eafffb;
  background:
    radial-gradient(circle at 16% 9%, rgba(98, 255, 230, .22), transparent 30%),
    radial-gradient(circle at 92% 20%, rgba(255, 220, 140, .18), transparent 28%),
    linear-gradient(140deg, rgba(7, 18, 37, .98), rgba(10, 54, 64, .95));
  border: 1px solid rgba(101, 255, 232, .45);
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(0, 28, 42, .24), inset 0 0 30px rgba(74, 255, 230, .11);
  overflow: hidden;
}
.dimension-bars-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.dimension-bars-head span { color: #fbfffb; }
.dimension-bars-head b {
  max-width: 64%;
  color: #ffdc8c;
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}
.dimension-bar-columns {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}
.dimension-bar-list {
  min-width: 0;
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dimension-bar-list-column {
  align-content: start;
}
.dimension-bar-row {
  min-width: 0;
  padding: 9px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09);
}
.dimension-bar-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
}
.dimension-bar-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #effffb;
  font-size: 12px;
  line-height: 1.3;
}
.dimension-bar-meta b {
  color: #65ffeb;
  font-size: 12px;
  text-shadow: 0 0 9px rgba(101, 255, 235, .58);
}
.dimension-bar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.dimension-edit-button {
  padding: 4px 8px;
  color: #07313c;
  background: #ffdc8c;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}
.dimension-edit-button:hover {
  background: #fff1bc;
  border-color: #fff;
}
.dimension-bar-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04)),
    rgba(1, 11, 23, .62);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, .48),
    inset 0 -1px 1px rgba(255, 255, 255, .09);
}
.dimension-bar-fill {
  position: relative;
  display: block;
  width: var(--dimension-width);
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #1cdacb, #63ffea 48%, #ffe08f),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  box-shadow:
    0 0 13px rgba(85, 255, 233, .72),
    0 5px 10px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .62),
    inset 0 -3px 7px rgba(0, 65, 78, .35);
}
.dimension-bar-shine {
  position: absolute;
  inset: 2px 6px auto 8px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  filter: blur(.15px);
}
.dimension-question-scope {
  margin: 14px 0;
  padding: 13px 15px;
  background: #f6fbfb;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 6px;
}
.dimension-question-scope div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dimension-question-scope strong { color: var(--navy); }
.dimension-question-scope span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}
.dimension-question-scope p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.list-stack { display: grid; gap: 14px; }
.friend-row { display: grid; grid-template-columns: 78px minmax(240px, 1fr) auto; align-items: center; gap: 18px; padding: 18px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 6px; }
.friend-row > img { width: 78px; height: 78px; border-radius: 5px; object-fit: cover; }
.friend-main p { margin: 8px 0 0; color: var(--muted); }
.friend-row .row-actions { justify-content: flex-end; margin: 0; max-width: 540px; }
.deleted-row { border-left-color: #8d93a0; }
.status-line { color: var(--amber) !important; font-weight: 700; }

.empty-state, .notice-card { max-width: 790px; padding: 48px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.empty-state h2, .notice-card h2 { margin: 10px 0; font-size: 22px; }
.empty-state p, .notice-card p { color: var(--muted); line-height: 1.7; }
.empty-icon { color: var(--amber); font-size: 34px; }
.profile-local-note { margin: 0 auto 22px; padding: 28px; }
.profile-edit-form {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.profile-preview-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.profile-preview-card img { width: 118px; height: 118px; object-fit: cover; border-radius: 7px; }
.profile-preview-card .eyebrow { margin: 0 0 6px; }
.profile-preview-card h2 { margin: 0 0 8px; font-size: 28px; }
.profile-preview-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.55; }

.real-profile-avatar { object-fit: contain; background: #f8fbfc; }
.account-block img.real-profile-avatar,
.profile-preview-card img.real-profile-avatar,
.friend-row > img.real-profile-avatar,
.detail-hero img.real-profile-avatar { object-fit: contain; background: #f8fbfc; }
.profile-photo-section { margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfc; }
.profile-photo-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.profile-photo-section-head h3 { margin: 3px 0 7px; font-size: 22px; }
.profile-photo-section-head p { margin: 0; color: var(--muted); line-height: 1.5; }
.profile-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.profile-photo-slot { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 13px; border: 1px solid #ccd6e3; border-radius: 8px; background: #fff; }
.profile-photo-slot.primary { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(38,123,115,.12); }
.profile-photo-slot header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.primary-photo-badge { padding: 4px 8px; color: #fff; background: var(--teal); border-radius: 999px; font-size: 12px; font-weight: 700; }
.profile-photo-preview { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: #eef3f7; color: var(--muted); text-align: center; }
.profile-photo-preview img { width: 100%; height: 100%; object-fit: contain; display: block; background: transparent; }
.photo-slot-meta { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.profile-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-upload-label { position: relative; overflow: hidden; }
.photo-upload-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.modal.photo-crop-modal { width: min(720px, calc(100vw - 80px)); }
.photo-crop-editor { display: grid; gap: 16px; }
.photo-crop-editor p { margin: 0; color: var(--muted); line-height: 1.55; }
.photo-crop-stage {
  width: var(--stage);
  height: var(--stage);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  border: 2px solid var(--teal);
  border-radius: 10px;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, rgba(15, 23, 42, .10) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(15, 23, 42, .10) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(15, 23, 42, .10) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(15, 23, 42, .10) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  box-shadow: inset 0 0 0 1px rgba(38,123,115,.18);
}
.photo-crop-stage:active { cursor: grabbing; }
.photo-crop-stage img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; pointer-events: none; transform-origin: 0 0; }
.photo-crop-controls { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.photo-crop-controls input { width: 100%; }
.photo-crop-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.profile-form-grid label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}
.birthdate-picker {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}
.birthdate-picker legend {
  padding: 0 4px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}
.birthdate-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.birthdate-selected {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}
.profile-textarea-label { grid-column: 1 / -1; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.recommendation-status { margin: 0 auto 24px; }
.recommendation-kicker { color: var(--red); font-size: 24px; font-weight: 800; }
.recommendation-status h2 { margin-top: 2px; font-size: 25px; }
.recommendation-status p { max-width: 640px; margin: 18px auto 0; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(16,24,38,.62); }
.modal { width: min(680px, calc(100vw - 80px)); max-height: calc(100vh - 56px); overflow: hidden; display: flex; flex-direction: column; background: #fff; border-radius: 7px; box-shadow: 0 24px 70px rgba(0,0,0,.32); }
.modal.large { width: min(850px, calc(100vw - 80px)); }
.modal.chat-modal { width: min(760px, calc(100vw - 80px)); }
.modal.comparison-modal { width: min(1180px, calc(100vw - 70px)); }
.modal.content-modal { width: min(1180px, calc(100vw - 70px)); }
.modal.image-modal { width: min(1060px, calc(100vw - 70px)); }
.modal.profile-photo-slideshow-modal { width: min(80vw, 1180px); max-height: min(80vh, calc(100vh - 56px)); }
.modal.claim-gate-modal { width: min(560px, calc(100vw - 80px)); }
.modal.account-delete-modal { width: min(560px, calc(100vw - 80px)); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; background: var(--navy-dark); color: #fff; }
.modal-header h1 { margin: 0; font-size: 20px; }
.icon-button { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; color: #fff; background: transparent; font-size: 24px; }
.modal-body {
  min-height: 0;
  overflow: auto;
  overflow-anchor: none;
  padding: 24px;
}
.claim-gate-modal-body {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 10px 6px 2px;
  text-align: center;
}
.claim-gate-modal-body p {
  max-width: 420px;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}
.claim-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.claim-modal-primary { min-width: 245px; justify-content: center; }
.claim-modal-secondary { max-width: 360px; justify-content: center; }
.account-delete-form {
  display: grid;
  gap: 16px;
  text-align: center;
}
.account-delete-form p {
  max-width: 430px;
  margin: 0 auto;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}
.account-delete-form label {
  display: grid;
  gap: 7px;
  text-align: left;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}
.account-delete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.detail-hero { display: grid; grid-template-columns: 132px 1fr; align-items: center; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-hero img { width: 132px; height: 132px; object-fit: cover; border-radius: 6px; }
.detail-hero .eyebrow { margin: 0 0 7px; }
.detail-hero h2 { margin: 0; font-size: 28px; }
.detail-hero p:last-child { color: var(--muted); line-height: 1.6; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.detail-grid div { padding: 14px; background: var(--canvas); border: 1px solid var(--line); border-radius: 5px; }
.detail-grid dt { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.detail-grid dd { margin: 0; font-weight: 700; line-height: 1.4; }
.synthetic-note { padding: 12px 14px; color: #5c6475; background: #f6f1e5; border-left: 4px solid var(--amber); line-height: 1.5; }
.embedded-chat { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.embedded-chat h3 { margin: 0 0 14px; }

.messages { min-height: 260px; max-height: 52vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 18px; }
.message { max-width: 72%; padding: 11px 13px; border-radius: 6px; }
.message p { margin: 0 0 5px; line-height: 1.5; }
.message span { color: #788093; font-size: 11px; }
.message.mine { align-self: flex-end; background: var(--soft-green); border: 1px solid #c3dfda; }
.message.theirs { align-self: flex-start; background: #eef1f6; border: 1px solid #dce1e9; }
.chat-form { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.chat-input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.emoji-tools { position: relative; display: flex; align-items: center; }
.emoji-toggle, .emoji-picker button {
  display: grid;
  place-items: center;
  border: 1px solid #cfd5df;
  border-radius: 5px;
  background: #fff;
}
.emoji-toggle { width: 38px; height: 34px; font-size: 18px; }
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
  padding: 7px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.emoji-picker button { width: 32px; height: 32px; font-size: 17px; }
.emoji-picker button:hover { border-color: var(--teal); background: var(--soft-green); }
.readonly-note { padding: 13px; color: #6d5660; background: var(--soft-red); border: 1px solid #eccbd0; border-radius: 5px; text-align: center; }
.muted-copy { color: var(--muted); }
.chat-shell-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.chat-shell-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.chat-person-photo,
.chat-person-name {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}
.chat-person-photo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(37, 143, 132, .20);
}
.chat-person-photo:hover,
.chat-person-name:hover { color: var(--teal-dark); text-decoration: underline; }
.chat-person-photo img,
.chat-shell-header img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.chat-person-photo img.real-profile-avatar,
.chat-shell-header img.real-profile-avatar { object-fit: contain; background: #f8fbfc; }
.chat-shell-header .eyebrow { margin: 0 0 5px; }
.chat-shell-header h2 { margin: 0 0 5px; font-size: 24px; }
.chat-shell-header h2 .chat-person-name { font: inherit; font-weight: 800; }
.chat-shell-header p:last-child { margin: 0; color: var(--muted); line-height: 1.45; }

.content-page-intro { max-width: 850px; }
.source-library { display: grid; gap: 12px; }
.source-article {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 6px;
}
.source-article summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  color: var(--navy);
  background: #f7f9fc;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.45;
}
.source-article summary span { min-width: 0; overflow-wrap: anywhere; }
.source-article summary b { flex: 0 0 auto; color: var(--teal); font-size: 12px; }
.article-text { padding: 20px; border-top: 1px solid var(--line); }
.article-text p { margin: 0 0 16px; overflow-wrap: anywhere; line-height: 1.75; white-space: normal; }
.article-text p:last-child { margin-bottom: 0; }
.author-page { display: grid; gap: 26px; }
.author-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
}
.author-image-button {
  width: 100%;
  min-width: 0;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9dee7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(34,45,67,.08);
}
.author-image-button:hover { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(38,123,115,.12); }
.author-image-button img { width: 100%; height: auto; display: block; }
.author-portrait-button { width: 180px; }
.author-portrait-button img { width: 180px; height: 180px; object-fit: cover; }
.author-hero .eyebrow { margin-top: 0; }
.author-hero h2 { margin: 0 0 12px; font-size: 30px; }
.author-hero p:last-child, .author-copy p { color: #4f586a; line-height: 1.75; }
.author-copy { padding: 24px 28px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.author-copy p { margin: 0 0 18px; }
.author-copy p:last-child { margin-bottom: 0; }
.author-gallery h3 { margin: 0 0 14px; color: var(--navy); }
.document-grid, .fragment-grid { display: grid; gap: 16px; }
.document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fragment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.author-gallery figure { min-width: 0; margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.author-gallery figcaption { padding: 12px 14px; color: var(--muted); line-height: 1.5; font-size: 13px; }
.image-lightbox { margin: 0; }
.image-lightbox img {
  width: 100%;
  max-height: calc(100vh - 190px);
  display: block;
  object-fit: contain;
  background: #f6f7fa;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.image-lightbox figcaption { margin-top: 12px; color: var(--muted); line-height: 1.5; text-align: center; }
.profile-photo-slideshow { margin: 0; }
.profile-photo-slideshow-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(56vh, 620px);
  background:
    linear-gradient(45deg, rgba(255,255,255,.82) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.82) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.82) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.82) 75%),
    #eef3f7;
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.profile-photo-slideshow-stage img {
  width: 100%;
  height: min(62vh, 640px);
  display: block;
  object-fit: contain;
  object-position: center;
}
.profile-photo-slideshow figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.profile-photo-slideshow figcaption strong { color: var(--ink); }
.slideshow-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 44px;
  height: 54px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 999px;
  color: #fff;
  background: rgba(21, 40, 70, .72);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}
.slideshow-nav:hover,
.slideshow-nav:focus-visible { background: rgba(21, 40, 70, .92); }
.slideshow-nav.prev { left: 16px; }
.slideshow-nav.next { right: 16px; }

.comparison-head { position: sticky; top: -24px; z-index: 2; display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; margin: -24px -24px 18px; padding: 15px 24px; color: #fff; background: var(--navy); font-weight: 700; }
.comparison-head strong { color: #ffd98d; }
.anonymous-context { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 18px; padding: 14px 16px; color: #3f4b60; background: var(--soft-blue); border: 1px solid #cbd8e8; border-radius: 5px; }
.anonymous-context strong { color: var(--navy); }
.answer-editor-toolbar { position: sticky; top: 35px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 5px; box-shadow: 0 4px 14px rgba(34,45,67,.08); }
.answer-editor-toolbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.editor-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; }
.recalculation-state, .save-validation, .save-success { margin: 0 0 14px; padding: 12px 14px; border-radius: 5px; line-height: 1.5; }
.recalculation-state { color: #334a6c; background: var(--soft-blue); border: 1px solid #c7d6e8; }
.save-validation { color: #792c32; background: var(--soft-red); border: 1px solid #ebc5c9; }
.save-success { color: #185e56; background: var(--soft-green); border: 1px solid #bcdcd7; }
.question-list { display: grid; gap: 12px; }
.question-row { padding: 16px; border: 1px solid var(--line); border-left: 5px solid var(--amber); border-radius: 5px; }
.question-row.same { border-left-color: var(--teal); }
.question-row.invalid { border-color: #d89ca1; border-left-color: var(--red); background: #fffafb; }
.question-row header { display: flex; justify-content: space-between; gap: 18px; color: var(--navy); font-size: 12px; }
.question-row header b { color: var(--amber); }
.question-row.same header b { color: var(--teal); }
.question-row > p { line-height: 1.55; }
.question-validation { margin: 10px 0; padding: 9px 11px; color: #842f35; background: var(--soft-red); border-radius: 4px; font-size: 12px; font-weight: 700; }
.answer-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.answer-column { min-width: 0; padding: 12px; background: var(--canvas); border-radius: 4px; }
.answer-column-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.answer-column-head > span { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.answer-option-list { display: grid; gap: 7px; }
.answer-option {
  min-width: 0;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #d8dde6;
  border-radius: 4px;
  background: #fff;
  color: #687083;
  font-size: 12px;
  line-height: 1.45;
}
.answer-option > b { display: grid; place-items: center; width: 25px; height: 25px; color: #fff; background: #8a92a2; border-radius: 3px; }
.answer-option-text { min-width: 0; overflow-wrap: anywhere; }
.answer-option-status { color: #7b8392; font-size: 11px; font-weight: 700; white-space: nowrap; }
.answer-option.selected { border-color: #89bdb3; background: #edf7f4; color: #253e3a; }
.answer-option.selected > b { background: var(--teal); }
.answer-option.selected .answer-option-status { color: #17695c; }
.answer-option.unselected { background: #f8f9fb; }
.answer-option.editable { width: 100%; text-align: left; cursor: pointer; }
.answer-option.editable:hover { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(38,123,115,.1); }
.answer-option.readonly { cursor: default; }
.readonly-answer-column { border: 1px dashed #d5dae3; }
.compatibility-explanations { margin-top: 14px; border: 1px solid #d8dde6; border-radius: 5px; background: #fff; }
.compatibility-explanations > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; color: var(--navy); background: #f3f6fa; cursor: pointer; font-size: 13px; font-weight: 750; }
.compatibility-explanations > summary b { color: var(--teal); font-size: 12px; }
.compatibility-explanation-list { display: grid; gap: 9px; padding: 12px; }
.explanation-boundary { margin: 0; padding: 11px 14px; color: #5c6475; background: #fffaf0; border-top: 1px solid #eadfc6; border-bottom: 1px solid #eadfc6; font-size: 12px; line-height: 1.55; }
.compatibility-explanation { padding: 12px; border-left: 4px solid var(--amber); background: #fbfaf7; }
.compatibility-explanation-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 12px; }
.compatibility-explanation-meta strong { color: var(--navy); }
.compatibility-explanation-meta b { margin-left: auto; color: #76551d; }
.compatibility-explanation h4 { margin: 9px 0 5px; font-size: 14px; }
.compatibility-explanation p { margin: 0; color: #555d6d; font-size: 13px; line-height: 1.55; }

.toast { position: fixed; z-index: 40; right: 26px; bottom: 26px; max-width: 420px; padding: 13px 18px; color: #fff; background: #202a3d; border-left: 5px solid #d6a54b; border-radius: 5px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.asset-preload { position: fixed; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.asset-preload img { width: 1px; height: 1px; }

@media (max-width: 1380px) {
  .topbar, .content { padding-left: 25px; padding-right: 25px; }
  .friend-row { grid-template-columns: 68px minmax(210px, 1fr); }
  .friend-row > img { width: 68px; height: 68px; }
  .friend-row .row-actions { grid-column: 2; justify-content: flex-start; }
  .card-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
  .anonymous-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .credential-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credential-fields .button { grid-column: 1 / -1; }
  .login-aside { padding: 44px; }
  .prelogin-banners button { align-items: flex-start; flex-direction: column; }
  .fragment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .anonymous-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .anonymous-grid > .profile-card { grid-column: span 2; }
  .anonymous-grid > .profile-card:nth-child(4) { grid-column: span 2; }
  .anonymous-grid > .profile-card:nth-child(5) { grid-column: 2 / span 2; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .topbar-inner { align-items: flex-start; flex-direction: column; gap: 12px; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .diagnostic-badge { white-space: normal; }
}

@media (max-width: 860px) {
  .anonymous-grid { grid-template-columns: minmax(0, 1fr); }
  .category-radar-body { grid-template-columns: 1fr; }
  .category-radar-svg { max-width: 176px; }
  .dimension-bar-columns { grid-template-columns: 1fr; }
  .category-radar-head,
  .dimension-bars-head { align-items: flex-start; flex-direction: column; }
  .category-radar-head b,
  .dimension-bars-head b { max-width: 100%; text-align: left; }
  .anonymous-grid > .profile-card,
  .anonymous-grid > .profile-card:nth-child(4),
  .anonymous-grid > .profile-card:nth-child(5) { grid-column: 1; }
}

@media (max-width: 760px) {
  .login-shell { grid-template-columns: minmax(0, 1fr); }
  .login-panel { width: auto; max-width: 100%; justify-self: stretch; padding: 26px 16px 40px; }
  .login-panel-inner { width: 100%; max-width: 100%; }
  .login-heading { align-items: flex-start; }
  .login-panel h1 { font-size: 33px; }
  .credential-card { top: 8px; padding: 14px; }
  .credential-card-head { align-items: flex-start; }
  .prayer-gate { grid-template-columns: 1fr; }
  .prayer-gate img { width: 92px; height: 112px; }
  .credential-fields { grid-template-columns: 1fr; }
  .credential-fields .button { grid-column: auto; }
  .layer1-fieldset { padding: 15px; }
  .layer1-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }
  .layer1-question:last-child { grid-column: 1; grid-row: auto; }
  .login-aside { order: -1; position: static; min-height: 0; padding: 34px 24px; border-left: 0; border-top: 0; border-bottom: 8px solid var(--teal); }
  .aside-grid { grid-template-columns: 1fr; }
  .portal-shell { display: block; }
  .sidebar { position: static; width: 100%; border-right: 0; border-bottom: 5px solid var(--teal); }
  .sidebar-brand { height: 64px; }
  .account-block { margin: 12px; }
  .primary-nav { grid-template-columns: minmax(0, 1fr); padding-bottom: 12px; }
  .nav-button { min-width: 0; }
  .nav-button span:last-child { min-width: 0; overflow-wrap: anywhere; }
  .sidebar-footer { margin-top: 0; padding: 12px 16px 16px; }
  .main-column { min-width: 0; }
  .portal-shell.has-chat-rail .main-column { grid-column: auto; }
  .chat-rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: none; }
  .chat-thread-list { grid-template-columns: 1fr; }
  .topbar { min-height: 0; padding: 0 16px; }
  .topbar-inner { min-height: 0; align-items: flex-start; flex-direction: column; gap: 14px; padding: 18px 0; }
  .topbar-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .content { padding: 20px 16px 40px; }
  .card-grid, .anonymous-grid { grid-template-columns: 1fr; }
  .anonymous-grid > .profile-card,
  .anonymous-grid > .profile-card:nth-child(4),
  .anonymous-grid > .profile-card:nth-child(5) { grid-column: 1; }
  .notice-card { padding: 32px 22px; }
  .recommendation-kicker { font-size: 21px; }
  .friend-row { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .friend-row > img { width: 54px; height: 54px; }
  .friend-row .row-actions { grid-column: 1 / -1; }
  .modal-backdrop { padding: 0; place-items: stretch; }
  .modal, .modal.large, .modal.chat-modal, .modal.comparison-modal, .modal.content-modal, .modal.image-modal, .modal.profile-photo-slideshow-modal {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
  }
  .modal-header { padding: 14px 16px; }
  .modal-header h1 { min-width: 0; overflow-wrap: anywhere; font-size: 17px; }
  .modal-body { padding: 16px; }
  .comparison-head { top: -16px; grid-template-columns: 1fr; margin: -16px -16px 14px; padding: 13px 16px; }
  .answer-editor-toolbar { top: 92px; align-items: stretch; flex-direction: column; }
  .editor-actions .button { flex: 1; }
  .answer-columns { grid-template-columns: 1fr; }
  .answer-option { grid-template-columns: 27px minmax(0, 1fr); }
  .answer-option-status { grid-column: 2; white-space: normal; }
  .question-row { padding: 13px; }
  .question-row header { align-items: flex-start; flex-direction: column; gap: 6px; }
  .detail-hero { grid-template-columns: 1fr; }
  .profile-photo-slideshow-stage { min-height: 58vh; }
  .profile-photo-slideshow-stage img { height: 58vh; }
  .profile-photo-slideshow figcaption { align-items: flex-start; flex-direction: column; }
  .slideshow-nav { width: 38px; height: 46px; font-size: 28px; }
  .slideshow-nav.prev { left: 8px; }
  .slideshow-nav.next { right: 8px; }
  .detail-grid { grid-template-columns: 1fr; }
  .profile-preview-card, .chat-shell-header { grid-template-columns: 1fr; }
  .profile-photo-grid { grid-template-columns: 1fr; }
  .photo-crop-controls { grid-template-columns: 1fr; }
  .chat-person-photo { width: 72px; }
  .profile-form-grid { grid-template-columns: 1fr; }
  .profile-actions { align-items: stretch; flex-direction: column; }
  .chat-input-row { grid-template-columns: 1fr; }
  .emoji-tools { align-items: flex-start; }
  .emoji-picker { margin-left: 6px; }
  .message { max-width: 88%; }
  .source-article summary { align-items: flex-start; flex-direction: column; gap: 6px; }
  .article-text { padding: 16px; }
  .author-hero { grid-template-columns: 1fr; padding: 18px; }
  .author-portrait-button,
  .author-portrait-button img { width: min(100%, 220px); height: auto; }
  .author-copy { padding: 18px; }
  .document-grid, .fragment-grid { grid-template-columns: 1fr; }
  .toast { right: 12px; bottom: 12px; left: 12px; max-width: none; }
}

@media (max-width: 420px) {
  .login-heading { gap: 12px; }
  .login-heading .brand-mark {
    --coin-size: 52px;
    --coin-border: 4px;
    font-size: 25px;
  }
  .login-heading .brand-mark .brand-coin-face { font-size: 25px; }
  .login-panel h1 { font-size: 30px; }
  .credential-card-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
