/* MBTI-Yu H5 全局样式 - 移动端优先 */

:root {
  --primary: #151922;
  --primary-strong: #0f1218;
  --primary-light: #b83a4b;
  --primary-dark: #07090d;
  --accent: #b83a4b;
  --accent-soft: rgba(184, 58, 75, 0.1);
  --accent-line: rgba(184, 58, 75, 0.2);
  --paper: #f7f5ef;
  --paper-deep: #ebe7de;
  --graphite: #151922;
  --bg: #f3f0ea;
  --bg-secondary: rgba(255, 255, 255, 0.64);
  --bg-elevated: rgba(255, 255, 255, 0.86);
  --bg-card: #fffdf8;
  --bg-input: #f7f4ee;
  --text: #151922;
  --text-secondary: #62666f;
  --text-muted: #8a8d94;
  --success: #2f7d62;
  --warning: #b57a2b;
  --danger: #b84a4a;
  --border: rgba(21, 25, 34, 0.11);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(21, 25, 34, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Avenir Next', 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(184, 58, 75, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(21, 25, 34, 0.07), transparent 24%),
    linear-gradient(180deg, #fbfaf6 0%, #f3f0ea 50%, #ebe7de 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--primary); }

img, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 容器 */
.container {
  width: min(560px, 100%);
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px;
}

.page {
  min-height: 100vh;
  padding-bottom: 20px;
}
.page::after {
  content: '';
  display: block;
  height: 80px;
  height: calc(80px + env(safe-area-inset-bottom, 0px));
}

.app-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 18px 20px 110px;
}

.app-shell.app-shell-report,
.app-shell.app-shell-premium,
.app-shell.app-shell-assessment {
  width: min(900px, 100%);
}

.app-dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  padding: 8px;
  border-radius: 24px;
  background: rgba(255,253,248,0.82);
  border: 1px solid rgba(21, 25, 34, 0.12);
  box-shadow: 0 20px 40px rgba(21, 25, 34, 0.14);
  backdrop-filter: blur(18px);
}

.shell-segmented-nav {
  padding: 6px;
  border-radius: 22px;
  background: rgba(255,253,248,0.66);
  border: 1px solid rgba(21, 25, 34, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.frost-card {
  background:
    linear-gradient(180deg, rgba(255,253,248,0.96), rgba(249,247,241,0.88)),
    var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.app-icon-slot svg {
  width: 18px;
  height: 18px;
}

.tab-icon svg,
.app-icon svg {
  width: 18px;
  height: 18px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, background 0.25s ease;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 28px rgba(21, 25, 34, 0.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(21,25,34,0.24); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #8f2c3a);
  color: #fff;
}

.btn-sm { padding: 8px 16px; font-size: 14px; width: auto; }
.btn-lg { padding: 16px 32px; font-size: 18px; }

/* 输入框 */
.input-group { margin-bottom: 16px; }

.input-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 6px;
}

.input-group input, .input-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.input-group input:focus, .input-group textarea:focus {
  border-color: var(--primary);
}

.input-row {
  display: flex;
  gap: 12px;
}

.input-row input { flex: 1; }
.input-row .btn { width: auto; white-space: nowrap; }

/* 卡片 */
.card {
  background:
    linear-gradient(180deg, rgba(255,253,248,0.96), rgba(249,247,241,0.9)),
    var(--bg-card);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 30px 24px;
  border-radius: 28px;
  border: 1px solid rgba(21, 25, 34, 0.16);
  background:
    radial-gradient(circle at 85% 15%, rgba(184, 58, 75, 0.18), transparent 26%),
    radial-gradient(circle at 15% 85%, rgba(255, 253, 248, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    #151922;
  box-shadow: 0 30px 60px rgba(21, 25, 34, 0.34);
}

.hero-badge,
.soft-chip,
.metric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.hero-badge {
  background: rgba(184, 58, 75, 0.14);
  border: 1px solid rgba(184, 58, 75, 0.22);
  color: #f3c8cf;
}

.hero-title {
  margin-top: 14px;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #fffdf8 10%, #d8d1c7 58%, #d36a7a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  max-width: 420px;
}

.auth-hero {
  margin-top: 28px;
  padding: 34px 24px 26px;
  border: 1px solid rgba(21, 25, 34, 0.11);
  background:
    radial-gradient(circle at 88% 12%, rgba(184, 58, 75, 0.12), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(21, 25, 34, 0.06), transparent 26%),
    linear-gradient(135deg, rgba(255,253,248,0.98), rgba(249,247,241,0.95) 52%, rgba(239,235,226,0.92));
  box-shadow: 0 30px 70px rgba(21, 25, 34, 0.12);
}

.auth-hero::before,
.auth-hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.auth-hero::before {
  top: 18px;
  right: 22px;
  width: 108px;
  height: 108px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.7);
  background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0));
  opacity: 0.75;
}

.auth-hero::after {
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 58, 75, 0), rgba(184, 58, 75, 0.14), rgba(184, 58, 75, 0));
}

.auth-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(168px, 0.82fr);
  gap: 18px;
  align-items: end;
}

.auth-hero-copy {
  min-width: 0;
}

.auth-hero-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.auth-hero-kicker {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6f7278;
}

.auth-hero .hero-badge {
  background: rgba(184, 58, 75, 0.08);
  border-color: rgba(184, 58, 75, 0.14);
  color: var(--accent);
}

.auth-hero .hero-title {
  margin-top: 18px;
  font-size: 48px;
  font-weight: 700;
  background: none;
  color: var(--text);
  -webkit-background-clip: initial;
  -webkit-text-fill-color: currentColor;
  letter-spacing: -1.8px;
}

.auth-hero .hero-subtitle {
  margin-top: 14px;
  max-width: none;
  color: var(--text-secondary);
  line-height: 1.75;
}

.auth-hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.auth-hero-notes span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255,253,248,0.74);
  border: 1px solid rgba(21, 25, 34, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
}

.auth-hero-panel {
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,253,248,0.9), rgba(239,235,226,0.82)),
    rgba(255,253,248,0.78);
  border: 1px solid rgba(21, 25, 34, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 16px 32px rgba(21, 25, 34, 0.08);
  backdrop-filter: blur(10px);
}

.auth-hero-panel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-hero-panel-value {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--text);
}

.auth-hero-points {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.auth-hero-points span {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-hero-points span::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.auth-form-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,247,241,0.94)),
    var(--bg-card);
  border-color: rgba(21, 25, 34, 0.1);
  box-shadow: 0 24px 52px rgba(21, 25, 34, 0.11);
}

.auth-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 58, 75, 0), rgba(184, 58, 75, 0.18), rgba(184, 58, 75, 0));
}

.hero-tagline {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.06);
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-actions .btn {
  flex: 1 1 180px;
  width: auto;
}

.metric-pill,
.soft-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

.soft-chip-sm {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
}

/* Cinematic auth entry shell: red-black, premium, and still conversion-first. */
body.auth-page {
  --primary: #f04854;
  --primary-strong: #ff6670;
  --primary-light: #ff9aa1;
  --primary-dark: #09080a;
  --accent: #ff2d3d;
  --bg: #050406;
  --bg-elevated: rgba(15, 13, 15, 0.78);
  --bg-card: rgba(14, 12, 14, 0.72);
  --bg-input: rgba(255, 255, 255, 0.08);
  --text: #fff7f2;
  --text-secondary: rgba(255, 231, 222, 0.72);
  --text-muted: rgba(255, 231, 222, 0.5);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 34px 100px rgba(0, 0, 0, 0.5);
  position: relative;
  min-height: 100vh;
  background: #050406;
  color: var(--text);
  overflow-x: hidden;
}

body.auth-page::before,
body.auth-page::after {
  display: none;
}

.auth-cinema-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #050406;
}

.auth-cinema-image {
  position: absolute;
  inset: -4vh -4vw;
  z-index: 0;
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 56, 72, 0.24), transparent 30%),
    radial-gradient(circle at 58% 8%, rgba(255, 111, 118, 0.14), transparent 24%),
    radial-gradient(circle at 18% 76%, rgba(255, 47, 63, 0.18), transparent 28%),
    radial-gradient(circle at 78% 55%, rgba(255, 40, 57, 0.1), transparent 32%),
    linear-gradient(90deg, rgba(5, 4, 6, 0.22), rgba(42, 6, 10, 0.74) 42%, rgba(5, 4, 6, 0.9)),
    linear-gradient(180deg, rgba(5, 4, 6, 0.04), rgba(5, 4, 6, 0.9));
  transform: scale(1.04);
  transition: filter 0.3s ease;
  animation: authImageDrift 24s ease-in-out infinite alternate;
}

.auth-cinema-image::before,
.auth-cinema-image::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.auth-cinema-image::before {
  left: 7%;
  top: 18%;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 80, 92, 0.16);
  background:
    linear-gradient(60deg, transparent 48%, rgba(255, 90, 103, 0.12) 49%, transparent 51%),
    linear-gradient(125deg, transparent 45%, rgba(255, 90, 103, 0.08) 46%, transparent 48%);
  box-shadow: inset 0 0 80px rgba(255, 44, 58, 0.08), 0 0 90px rgba(255, 44, 58, 0.08);
  opacity: 0.72;
}

.auth-cinema-image::after {
  right: 11%;
  top: 16%;
  width: min(24vw, 320px);
  height: min(58vh, 560px);
  border-radius: 48% 52% 44% 56%;
  border: 1px solid rgba(255, 84, 98, 0.1);
  background:
    radial-gradient(circle at 50% 20%, transparent 0 13%, rgba(255, 76, 90, 0.12) 14%, transparent 18%),
    linear-gradient(180deg, transparent 0 42%, rgba(255, 76, 90, 0.09) 43%, transparent 47%);
  mask-image: linear-gradient(180deg, transparent, #000 15%, #000 82%, transparent);
  opacity: 0.5;
}

.auth-theory-field {
  position: absolute;
  inset: -8vh -10vw;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: clamp(16px, 3vh, 34px);
  overflow: hidden;
  color: rgba(255, 93, 106, 0.56);
  font-family: 'Avenir Next', 'SF Pro Display', sans-serif;
  font-size: clamp(11px, 1.25vw, 18px);
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-8deg);
  opacity: 0.22;
  mix-blend-mode: screen;
  mask-image:
    radial-gradient(circle at 42% 42%, #000, transparent 64%),
    linear-gradient(90deg, transparent, #000 18%, #000 74%, transparent);
  animation: authTheoryDrift 24s linear infinite alternate;
}

.auth-theory-field span {
  display: block;
  width: max-content;
  white-space: nowrap;
  text-shadow: 0 0 24px rgba(255, 47, 63, 0.34);
  transform: translateX(var(--theory-x, 0));
}

.auth-theory-field span:nth-child(1) { --theory-x: 6vw; }
.auth-theory-field span:nth-child(2) { --theory-x: -4vw; }
.auth-theory-field span:nth-child(3) { --theory-x: 18vw; }
.auth-theory-field span:nth-child(4) { --theory-x: 0vw; }
.auth-theory-field span:nth-child(5) { --theory-x: 11vw; }

.auth-cinema-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 55, 68, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 55, 68, 0.12) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  transition: opacity 0.3s ease;
  animation: authGridFloat 18s linear infinite;
}

.auth-cinema-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 59, 73, 0.16) 46%, transparent 58%);
  transform: translateX(-78%);
  animation: authScanSweep 8.5s ease-in-out infinite;
}

.auth-cinema-orbit {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  border: 1px solid rgba(255, 61, 74, 0.18);
  box-shadow:
    inset 0 0 34px rgba(255, 42, 58, 0.12),
    0 0 46px rgba(255, 42, 58, 0.1);
}

.auth-cinema-orbit::before,
.auth-cinema-orbit::after {
  content: '';
  position: absolute;
  inset: 14%;
  border-radius: inherit;
  border: 1px dashed rgba(255, 82, 94, 0.16);
}

.auth-cinema-orbit::after {
  inset: 34%;
  border-style: solid;
  opacity: 0.8;
}

.auth-cinema-orbit--primary {
  width: 420px;
  height: 420px;
  left: max(-96px, calc(50vw - 760px));
  bottom: 12vh;
  animation: authOrbitSlow 28s linear infinite;
}

.auth-cinema-orbit--secondary {
  width: 220px;
  height: 220px;
  right: max(-64px, calc(50vw - 720px));
  top: 9vh;
  opacity: 0.62;
  animation: authOrbitSlow 22s linear infinite reverse;
}

.auth-avatar-field {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.auth-mbti-avatar {
  position: absolute;
  display: block;
  width: clamp(54px, 7vw, 104px);
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 92, 104, 0.2), transparent 34%),
    rgba(9, 7, 9, 0.62);
  border: 1px solid rgba(255, 80, 92, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 22px rgba(255, 44, 58, 0.16),
    0 22px 70px rgba(0, 0, 0, 0.28);
  will-change: transform, opacity;
}

.auth-mbti-avatar::after {
  content: attr(data-type);
  position: absolute;
  left: 8px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(9, 7, 9, 0.64);
  color: rgba(255, 207, 210, 0.84);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-mbti-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
  opacity: 0.86;
  filter: grayscale(1) sepia(1) saturate(2.8) hue-rotate(306deg) brightness(1.05) contrast(1.28);
}

.auth-mbti-avatar--ambient {
  left: var(--avatar-x);
  top: var(--avatar-y);
  opacity: 0.13;
  transform: translate3d(-50%, -50%, 0) scale(var(--avatar-scale)) rotate(var(--avatar-rotate));
  transition: opacity 0.3s ease;
  animation: authAvatarDrift var(--avatar-drift) ease-in-out var(--avatar-delay) infinite alternate;
}

.auth-mbti-avatar--burst {
  z-index: 3;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.8) rotate(var(--burst-rotate));
  animation: authAvatarBurst var(--burst-life) cubic-bezier(.16, .82, .28, 1) forwards;
}

.auth-card-avatar-signal {
  position: absolute;
  z-index: 2;
  width: var(--signal-size);
  aspect-ratio: 1;
  left: var(--signal-x);
  top: var(--signal-y);
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  border: 1px solid rgba(255, 91, 105, 0.28);
  background: rgba(12, 9, 11, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 22px rgba(255, 54, 70, 0.24),
    0 16px 38px rgba(0, 0, 0, 0.24);
  transform: translate3d(-50%, -50%, 0) scale(0.82) rotate(var(--signal-rotate));
  animation: authCardSignal var(--signal-life) cubic-bezier(.16, .82, .28, 1) forwards;
}

.auth-card-avatar-signal::before {
  content: attr(data-type);
  position: absolute;
  left: 6px;
  bottom: 5px;
  z-index: 1;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(6, 5, 7, 0.64);
  color: rgba(255, 210, 214, 0.88);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-card-avatar-signal img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  mix-blend-mode: multiply;
  opacity: 0.9;
  filter: grayscale(1) sepia(1) saturate(3.2) hue-rotate(305deg) brightness(1.08) contrast(1.34);
}

.auth-cinema-scan {
  position: absolute;
  z-index: 3;
  inset: -20% 42% -20% auto;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 88, 100, 0.0), rgba(255, 88, 100, 0.75), rgba(255, 88, 100, 0.0), transparent);
  box-shadow: 0 0 28px rgba(255, 44, 58, 0.62), 0 0 120px rgba(255, 44, 58, 0.26);
  transform: rotate(18deg) translateX(-120px);
  animation: authNeedleScan 9.5s ease-in-out infinite;
}

.auth-cinema-noise {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0.24;
  mix-blend-mode: overlay;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 3px),
    linear-gradient(115deg, rgba(255, 46, 61, 0.08), transparent 32%, rgba(255,255,255,0.03) 62%, transparent);
}

body.auth-page.is-auth-card-engaged .auth-cinema-image {
  filter: saturate(1.12) contrast(1.06);
}

body.auth-page.is-auth-card-engaged .auth-cinema-grid {
  opacity: 0.26;
}

body.auth-page.is-auth-card-engaged .auth-cinema-scan {
  opacity: 0.9;
}

body.auth-page.is-auth-card-engaged .auth-mbti-avatar--ambient {
  opacity: 0.2;
}

.auth-page .page::after {
  display: none;
}

.auth-cinema-page {
  position: relative;
  z-index: 1;
}

.auth-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(44px, 6vw, 84px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 480px);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.auth-brand-stage {
  min-width: 0;
  max-width: 580px;
  padding: 24px 0;
}

.auth-stage-kicker {
  margin: 0 0 18px;
  color: rgba(255, 128, 138, 0.92);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.auth-brand-stage h1 {
  margin: 0;
  color: #fff4ee;
  font-size: clamp(46px, 6vw, 78px);
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 24px 80px rgba(0, 0, 0, 0.74), 0 0 42px rgba(236, 46, 60, 0.18);
}

.auth-stage-copy {
  max-width: 440px;
  margin: 22px 0 0;
  color: rgba(255, 235, 228, 0.7);
  font-size: 16px;
  line-height: 1.85;
}

.auth-stage-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-stage-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(10, 8, 10, 0.46);
  color: rgba(255, 235, 228, 0.72);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.auth-stage-signal {
  width: min(420px, 100%);
  margin-top: 26px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 70, 84, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 42, 58, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(8, 7, 9, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 22px 64px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.auth-stage-signal span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff394b;
  box-shadow: 0 0 0 6px rgba(255, 57, 75, 0.1), 0 0 24px rgba(255, 57, 75, 0.78);
  animation: authSignalPulse 2.6s ease-in-out infinite;
  flex-shrink: 0;
}

.auth-stage-signal strong {
  color: rgba(255, 244, 239, 0.88);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.auth-archive-stage {
  --archive-left-x: clamp(-92px, -8vw, -58px);
  --archive-right-x: clamp(58px, 8vw, 92px);
  --archive-radius: clamp(170px, 21vw, 248px);
  min-height: min(68vh, 650px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.auth-archive-field {
  --archive-scan-from: -190px;
  --archive-scan-to: 210px;
  position: relative;
  width: min(580px, 100%);
  height: clamp(390px, 54vw, 620px);
  isolation: isolate;
  perspective: 1200px;
  transition: transform 0.32s ease;
}

.auth-archive-field::before,
.auth-archive-field::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.auth-archive-field::before {
  inset: 8%;
  z-index: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 70, 84, 0.16);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 48, 64, 0.13), transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 56%, rgba(255, 74, 88, 0.08) 57%, transparent 62%);
  box-shadow:
    inset 0 0 52px rgba(255, 45, 60, 0.08),
    0 0 78px rgba(255, 45, 60, 0.1);
  animation: authArchiveBreathe 5.8s ease-in-out infinite alternate;
}

.auth-archive-field::after {
  left: 10%;
  right: 10%;
  bottom: 6%;
  height: 16%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.46), transparent 70%);
  filter: blur(12px);
  opacity: 0.7;
}

.auth-archive-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.auth-archive-ring--outer {
  width: clamp(340px, 42vw, 500px);
  border: 1px dashed rgba(255, 93, 105, 0.2);
  animation: authArchiveRing 28s linear infinite;
}

.auth-archive-ring--inner {
  width: clamp(212px, 29vw, 340px);
  border: 1px solid rgba(255, 93, 105, 0.14);
  box-shadow: inset 0 0 32px rgba(255, 59, 74, 0.1);
  animation: authArchiveRing 22s linear infinite reverse;
}

.auth-dossier {
  --z: 0px;
  --dx: 6px;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: clamp(220px, 27vw, 330px);
  height: clamp(300px, 37vw, 440px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(10, 9, 11, 0.74);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z)) rotate(var(--r));
  animation: authDossierFan 4.2s ease-in-out infinite alternate;
  animation-delay: var(--d);
}

.auth-dossier--prime {
  z-index: 2;
  border-color: rgba(255, 78, 92, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 66, 80, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(12, 9, 11, 0.82);
  box-shadow:
    0 0 0 1px rgba(255, 66, 80, 0.06),
    0 34px 100px rgba(0, 0, 0, 0.46),
    0 0 70px rgba(255, 44, 58, 0.14);
}

.auth-dossier--single {
  width: clamp(246px, 30vw, 350px);
  height: clamp(326px, 39vw, 460px);
  animation: authDossierBreathe 4.8s ease-in-out infinite alternate;
}

.auth-archive-field.is-receiving .auth-dossier--single {
  border-color: rgba(255, 108, 120, 0.58);
  box-shadow:
    0 0 0 1px rgba(255, 70, 84, 0.18),
    0 34px 108px rgba(0, 0, 0, 0.54),
    0 0 110px rgba(255, 45, 60, 0.32);
}

.auth-dossier::before {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 64, 80, 0.72), rgba(255, 255, 255, 0.18), transparent);
  opacity: 0.72;
}

.auth-dossier::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.12) 48%, transparent 62%),
    repeating-linear-gradient(90deg, transparent 0 32px, rgba(255, 70, 84, 0.035) 32px 33px);
  opacity: 0.42;
}

.auth-dossier-portrait {
  position: absolute;
  left: 26px;
  right: 26px;
  top: 44px;
  height: 132px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 64, 81, 0.2);
  background: rgba(255, 64, 81, 0.1);
}

.auth-dossier-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
  opacity: 0.92;
  filter: grayscale(1) sepia(1) saturate(3.1) hue-rotate(305deg) brightness(1.04) contrast(1.26);
  transform: scale(1);
  transition: opacity 0.42s ease, filter 0.42s ease, transform 0.42s ease;
}

.auth-dossier-portrait.is-changing img {
  opacity: 0.24;
  filter: grayscale(1) sepia(1) saturate(3.1) hue-rotate(305deg) brightness(1.22) contrast(1.34) blur(3px);
  transform: scale(1.06);
}

.auth-dossier-lines {
  position: absolute;
  left: 28px;
  right: 52px;
  bottom: 34px;
  display: grid;
  gap: 14px;
}

.auth-dossier-lines span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 235, 228, 0.2);
}

.auth-dossier-lines span:nth-child(1) {
  width: 82%;
}

.auth-dossier-lines span:nth-child(2) {
  width: 64%;
}

.auth-dossier-lines span:nth-child(3) {
  width: 74%;
}

.auth-dossier-lines span:nth-child(4) {
  width: 48%;
}

.auth-archive-node {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: clamp(50px, 6vw, 72px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 86, 100, 0.28);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(8, 7, 9, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 28px rgba(255, 64, 81, 0.18),
    0 18px 48px rgba(0, 0, 0, 0.26);
  opacity: 0.92;
  filter: blur(0);
  transform: rotate(var(--a)) translateX(var(--archive-radius));
  transition:
    transform 0.92s cubic-bezier(.18, .82, .18, 1),
    opacity 0.5s ease,
    filter 0.5s ease,
    box-shadow 0.5s ease,
    border-color 0.5s ease;
  will-change: transform, opacity, filter;
  animation: authArchiveNodeOrbit 30s linear infinite;
  animation-delay: var(--delay);
}

.auth-archive-node.is-entering {
  z-index: 5;
  opacity: 0.18 !important;
  filter: blur(4px) !important;
  border-color: rgba(255, 116, 128, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 42px rgba(255, 64, 81, 0.36),
    0 22px 58px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%) scale(0.74) !important;
  animation-play-state: paused;
}

.auth-archive-node.is-entering img {
  opacity: 0.46;
}

.auth-archive-node img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
  opacity: 0.92;
  filter: grayscale(1) sepia(1) saturate(3.1) hue-rotate(305deg) brightness(1.06) contrast(1.26);
}

.auth-archive-scan {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 50%;
  z-index: 4;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 100, 112, 0.92), transparent);
  box-shadow: 0 0 30px rgba(255, 64, 81, 0.58);
  animation: authArchiveScan 2.9s ease-in-out infinite;
  pointer-events: none;
}

.auth-archive-link {
  position: absolute;
  left: 72%;
  right: -18%;
  top: 50%;
  z-index: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 64, 80, 0), rgba(255, 64, 80, 0.56), rgba(255, 64, 80, 0));
  box-shadow: 0 0 28px rgba(255, 56, 72, 0.3);
  opacity: 0.5;
  transform-origin: left center;
  transition: opacity 0.24s ease, transform 0.24s ease;
  pointer-events: none;
}

.auth-stage-signal--compact {
  width: max-content;
  max-width: 100%;
  margin-top: -18px;
  padding: 10px 13px;
  border-radius: 15px;
  position: relative;
  z-index: 4;
}

.auth-stage-signal--compact strong {
  letter-spacing: 0;
}

body.auth-page.is-auth-card-engaged .auth-archive-field {
  transform: translateX(8px) scale(1.015);
}

body.auth-page.is-auth-card-engaged .auth-dossier--prime {
  border-color: rgba(255, 98, 112, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 70, 84, 0.14),
    0 34px 108px rgba(0, 0, 0, 0.52),
    0 0 96px rgba(255, 45, 60, 0.24);
}

body.auth-page.is-auth-card-engaged .auth-archive-link,
body.auth-page.is-auth-card-engaged .auth-archive-node {
  opacity: 1;
}

body.auth-page.is-auth-card-engaged .auth-archive-link {
  transform: scaleX(1.18);
}

.auth-form-card {
  --card-cursor-x: 50%;
  --card-cursor-y: 22%;
  --card-tilt-x: 0deg;
  --card-tilt-y: 0deg;
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: perspective(1200px) rotateX(var(--card-tilt-x)) rotateY(var(--card-tilt-y));
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.18s ease;
}

.auth-form-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.42;
  background:
    radial-gradient(circle at var(--card-cursor-x) var(--card-cursor-y), rgba(255, 68, 82, 0.24), transparent 30%),
    linear-gradient(135deg, transparent 0%, rgba(255, 82, 94, 0.08) 44%, transparent 74%);
  transition: opacity 0.24s ease;
}

.auth-form-card.is-card-active {
  border-color: rgba(255, 83, 96, 0.34);
  box-shadow:
    0 0 0 1px rgba(255, 70, 84, 0.08),
    0 34px 100px rgba(0, 0, 0, 0.56),
    0 0 86px rgba(255, 40, 58, 0.15);
}

.auth-form-card.is-card-active::after {
  opacity: 0.72;
}

.auth-form-card > :not(.auth-card-reactor) {
  position: relative;
  z-index: 2;
}

.auth-card-reactor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.auth-card-reactor::before {
  content: '';
  position: absolute;
  left: -18%;
  right: -18%;
  top: var(--card-cursor-y);
  height: 1px;
  opacity: 0.42;
  background: linear-gradient(90deg, transparent, rgba(255, 78, 92, 0.74), transparent);
  box-shadow: 0 0 24px rgba(255, 64, 80, 0.38);
}

.auth-card-reactor::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 76, 90, 0.11);
  background:
    linear-gradient(90deg, rgba(255, 76, 90, 0.12), transparent 20%, transparent 80%, rgba(255, 76, 90, 0.08)),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 76, 90, 0.035) 34px 35px);
  opacity: 0.7;
}

.auth-entry-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-entry-actions-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-entry-utility-row {
  display: flex;
  justify-content: flex-start;
  margin-top: -2px;
}

.auth-entry-login-hint {
  margin: -2px 0 0;
  color: rgba(255, 235, 228, 0.48);
  font-size: 12px;
  line-height: 1.45;
}

.guest-primary-entry {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.guest-primary-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 76px;
  padding: 16px 17px;
  text-align: left;
  border: 1px solid rgba(255, 70, 84, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 56, 72, 0.24), rgba(255, 255, 255, 0.06) 44%, rgba(255, 255, 255, 0.02)),
    rgba(12, 10, 12, 0.74);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.guest-primary-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 8%, rgba(255, 255, 255, 0.16) 44%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.guest-primary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 92, 104, 0.46);
  box-shadow: 0 18px 52px rgba(255, 42, 58, 0.15), 0 24px 58px rgba(0, 0, 0, 0.24);
}

.guest-primary-card:hover::after {
  transform: translateX(120%);
}

.guest-primary-card span,
.guest-primary-card small {
  display: block;
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  font-size: 13px;
}

.guest-primary-card strong {
  display: block;
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.guest-primary-card--accent {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 40, 58, 0.08)),
    rgba(10, 9, 11, 0.66);
}

.auth-panel-collapsed {
  margin-top: 8px;
  padding-top: 10px;
  opacity: 0.88;
}

.auth-form-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-back-link {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-mode-switch {
  margin-top: 2px;
  margin-bottom: 0;
  padding: 4px;
  gap: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-mode-switch .home-switch-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  min-height: 34px;
  padding: 8px 10px;
  font-size: 13px;
}

.auth-mode-switch .home-switch-btn.active {
  background: linear-gradient(135deg, rgba(255, 57, 75, 0.2), rgba(255, 255, 255, 0.07));
  border-color: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 92, 104, 0.16), 0 10px 24px rgba(255, 44, 58, 0.08);
}

.auth-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.auth-title {
  font-size: 18px;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--text);
}

.auth-subtitle {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.auth-context-inline {
  margin: 0;
  max-width: 640px;
}

.auth-form-panel {
  padding-top: 0;
}

.auth-page .input-group {
  margin-bottom: 10px;
}

.auth-page .input-group label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.auth-page .input-group input {
  min-height: 42px;
  background: var(--bg-input);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.auth-compact-submit {
  width: auto;
  min-width: 96px;
  min-height: 36px;
  margin-top: 2px;
}

.auth-page .input-group input::placeholder {
  color: rgba(255, 231, 222, 0.36);
}

.auth-page .input-group input:focus {
  border-color: rgba(255, 83, 96, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 57, 75, 0.12);
}

.auth-page .btn-primary {
  background: linear-gradient(135deg, #ff4051, #a80f22);
  color: #fff7f2;
  box-shadow: 0 16px 34px rgba(255, 42, 58, 0.24), 0 22px 44px rgba(0, 0, 0, 0.2);
}

.auth-page .btn-primary:hover {
  box-shadow: 0 18px 42px rgba(255, 42, 58, 0.32), 0 24px 50px rgba(0, 0, 0, 0.26);
}

.auth-page .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

.auth-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-choice-row .btn {
  width: 100%;
}

.auth-inline-meta,
.auth-legal {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-inline-meta {
  margin-top: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-inline-link:hover {
  text-decoration: underline;
}

.auth-field-note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.auth-legal {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
}

.auth-legal p {
  width: 100%;
}

body.auth-page .type-overview-trigger-auth {
  border-color: rgba(255, 75, 88, 0.3);
  color: rgba(255, 199, 202, 0.94);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

@keyframes authImageDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.09) translate3d(-1.4vw, 0.8vh, 0); }
}

@keyframes authTheoryDrift {
  from { transform: rotate(-8deg) translate3d(0, 0, 0); }
  to { transform: rotate(-8deg) translate3d(-3vw, 2vh, 0); }
}

@keyframes authGridFloat {
  from { background-position: 0 0, 0 0; }
  to { background-position: 82px 82px, 82px 82px; }
}

@keyframes authScanSweep {
  0%, 30% { transform: translateX(-82%); opacity: 0; }
  45% { opacity: 0.82; }
  70%, 100% { transform: translateX(82%); opacity: 0; }
}

@keyframes authNeedleScan {
  0%, 28% { transform: rotate(18deg) translateX(-140px); opacity: 0; }
  45% { opacity: 0.86; }
  74%, 100% { transform: rotate(18deg) translateX(150px); opacity: 0; }
}

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

@keyframes authSignalPulse {
  0%, 100% { transform: scale(1); opacity: 0.82; }
  50% { transform: scale(1.25); opacity: 1; }
}

@keyframes authArchiveBreathe {
  to {
    transform: scale(1.025);
    opacity: 0.88;
  }
}

@keyframes authArchiveRing {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes authDossierFan {
  to {
    transform: translate(-50%, -50%) translate3d(calc(var(--x) + var(--dx)), calc(var(--y) - 12px), var(--z)) rotate(var(--r2));
  }
}

@keyframes authDossierBreathe {
  from {
    transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z)) rotate(var(--r));
  }
  to {
    transform: translate(-50%, -50%) translate3d(var(--x), calc(var(--y) - 10px), var(--z)) rotate(var(--r2));
  }
}

@keyframes authArchiveNodeOrbit {
  from {
    transform: rotate(var(--a)) translateX(var(--archive-radius));
  }
  to {
    transform: rotate(calc(var(--a) + 360deg)) translateX(var(--archive-radius));
  }
}

@keyframes authArchiveNodeEclipse {
  0%, 24%, 68%, 100% {
    opacity: 0.92;
    filter: blur(0);
  }
  38%, 52% {
    opacity: 0.08;
    filter: blur(3px);
  }
}

@keyframes authArchiveScan {
  0%, 100% {
    transform: translateY(var(--archive-scan-from));
    opacity: 0;
  }
  18%, 78% {
    opacity: 1;
  }
  50% {
    transform: translateY(var(--archive-scan-to));
  }
}

@keyframes authAvatarDrift {
  from {
    transform: translate3d(-50%, -50%, 0) scale(var(--avatar-scale)) rotate(var(--avatar-rotate));
  }
  to {
    transform: translate3d(calc(-50% + 18px), calc(-50% - 22px), 0) scale(calc(var(--avatar-scale) + 0.05)) rotate(calc(var(--avatar-rotate) * -1));
  }
}

@keyframes authAvatarBurst {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.72) rotate(var(--burst-rotate));
  }
  16% {
    opacity: 0.46;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y)), 0) scale(1.08) rotate(calc(var(--burst-rotate) * -1));
  }
}

@keyframes authCardSignal {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.66) rotate(var(--signal-rotate));
  }
  18% {
    opacity: 0.58;
  }
  58% {
    opacity: 0.42;
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(1.08) rotate(calc(var(--signal-rotate) * -0.7));
  }
}

@media (max-width: 980px) {
  .auth-shell {
    width: min(640px, calc(100% - 24px));
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: center;
    padding-top: 36px;
  }

  .auth-brand-stage {
    max-width: 100%;
    padding: 8px 0 0;
  }

  .auth-archive-stage {
    min-height: auto;
    align-items: center;
  }

  .auth-archive-field {
    --archive-scan-from: -128px;
    --archive-scan-to: 136px;
    width: min(520px, 100%);
    height: clamp(312px, 50vw, 380px);
  }

  .auth-archive-link {
    display: none;
  }

  .auth-stage-signal--compact {
    align-self: center;
    margin-top: -16px;
  }

  .auth-brand-stage h1 {
    font-size: clamp(36px, 7vw, 50px);
  }

  .auth-stage-copy {
    max-width: 520px;
    margin-top: 14px;
  }

  .auth-stage-signal {
    margin-top: 16px;
  }
}

@media (max-height: 940px) and (min-width: 981px) {
  .auth-stage-signal {
    display: none;
  }

  .auth-stage-signal--compact {
    display: flex;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    width: calc(100% - 32px);
    padding: 20px 0 24px;
    gap: 16px;
    align-items: flex-start;
  }

  .auth-stage-kicker {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .auth-brand-stage h1 {
    font-size: 38px;
    line-height: 1;
  }

  .auth-stage-copy {
    font-size: 14px;
    line-height: 1.65;
  }

  .auth-stage-metrics {
    margin-top: 16px;
    gap: 8px;
  }

  .auth-stage-metrics span {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }

  .auth-stage-signal {
    display: none;
  }

  .auth-archive-stage {
    width: 100%;
    align-items: center;
  }

  .auth-archive-field {
    --archive-left-x: -44px;
    --archive-right-x: 44px;
    --archive-radius: 128px;
    --archive-scan-from: -94px;
    --archive-scan-to: 106px;
    width: min(360px, 100%);
    height: 246px;
  }

  .auth-archive-ring--outer {
    width: 260px;
  }

  .auth-archive-ring--inner {
    width: 168px;
  }

  .auth-dossier {
    width: 150px;
    height: 206px;
    border-radius: 14px;
  }

  .auth-dossier--single {
    width: 168px;
    height: 218px;
  }

  .auth-dossier::before {
    left: 17px;
    right: 17px;
    top: 16px;
    height: 4px;
  }

  .auth-dossier-portrait {
    left: 18px;
    right: 18px;
    top: 29px;
    height: 68px;
    border-radius: 12px;
  }

  .auth-dossier-lines {
    left: 18px;
    right: 26px;
    bottom: 22px;
    gap: 10px;
  }

  .auth-dossier-lines span {
    height: 6px;
  }

  .auth-archive-node {
    width: 44px;
    border-radius: 13px;
  }

  .auth-stage-signal--compact {
    display: flex;
    margin-top: -6px;
    padding: 9px 11px;
  }

  .auth-mbti-avatar--ambient {
    opacity: 0.1;
  }

  .auth-form-card {
    padding: 16px 14px 18px;
    border-radius: 24px;
    transform: none;
  }

  .auth-entry-actions {
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .auth-entry-grid {
    grid-template-columns: 1fr;
  }

  .auth-page .input-group input {
    min-height: 50px;
  }

  .auth-inline-meta {
    margin-top: 10px;
  }
}

@media (max-width: 380px) {
  .type-overview-trigger-auth {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-cinema-image,
  .auth-theory-field,
  .auth-cinema-grid,
  .auth-cinema-grid::after,
  .auth-cinema-orbit,
  .auth-cinema-scan,
  .auth-stage-signal span,
  .auth-archive-field::before,
  .auth-archive-ring,
  .auth-dossier,
  .auth-archive-node,
  .auth-archive-scan,
  .auth-mbti-avatar--ambient,
  .auth-mbti-avatar--burst,
  .auth-card-avatar-signal {
    animation: none !important;
  }
}

.pane-hero-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  margin-bottom: 8px;
  font-size: 14px;
}

.pane-hero-bar .group-preview-tag {
  font-size: 11px;
}

.section {
  margin-top: 28px;
}

.gate-shell {
  padding-bottom: 32px;
}

.gate-panel {
  min-height: 0;
}

.gate-footer {
  text-align: center;
  padding: 30px 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.app-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  min-width: 0;
}

.app-topbar > div:first-child,
.topbar-actions,
.section-stack,
.home-summary-actions {
  min-width: 0;
}

.app-topbar-label {
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.app-topbar h1 {
  margin-top: 6px;
  font-size: 32px;
  line-height: 1.08;
}

.app-topbar p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.74);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.icon-button-sm {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.72);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.chrome-icon-button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(21, 25, 34, 0.1);
  color: var(--text);
}

.nav-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 70px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 14px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.82);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 10px 22px rgba(21, 25, 34, 0.08);
}

.nav-back-button:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 14px 26px rgba(21, 25, 34, 0.12);
}

.nav-back-button .app-icon,
.nav-back-button svg {
  width: 17px;
  height: 17px;
}

.home-switch .topbar-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.home-summary {
  margin-top: 18px;
}

.home-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-summary-actions .btn {
  width: auto;
  max-width: 100%;
  white-space: normal;
}

.section-stack {
  display: grid;
  gap: 16px;
}

.home-switch {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 18px;
}

.home-switch.top-switch {
  margin-top: 14px;
  padding-top: env(safe-area-inset-top, 0);
}

.home-switch-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  background: rgba(255,253,248,0.48);
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.home-switch-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(21, 25, 34, 0.16);
}

.profile-hero-card {
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(184,58,75,0.08), transparent 32%),
    linear-gradient(180deg, rgba(255,253,248,0.96), rgba(249,247,241,0.92));
}

.universe-pane {
  min-height: 260px;
}

.pane-hero {
  margin-bottom: 16px;
}

.pane-hero-sm {
  padding: 14px 16px;
}

.pane-hero-sm .pane-hero-top h3 {
  font-size: 16px;
}

.pane-hero-sm p {
  display: none;
}

.pane-hero-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.pane-hero h3 {
  margin-top: 12px;
  font-size: 24px;
}

.pane-hero p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.mbti-home-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(184, 58, 75, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248, 246, 240, 0.94));
}

.mbti-home-copy {
  display: grid;
  gap: 8px;
}

.mbti-home-kicker {
  color: #9b7540;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.mbti-home-copy h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.8px;
}

.mbti-home-copy p:last-child {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.mbti-home-actions {
  display: grid;
  gap: 12px;
}

.test-entry-family {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
}

.test-entry-panel {
  min-height: 0;
  padding: 20px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,253,248,0.78));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 16px 36px rgba(21, 25, 34, 0.05);
}

.test-entry-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #151922;
  opacity: 0.78;
}

.test-entry-panel--intimacy {
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 58, 75, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,253,248,0.78));
}

.test-entry-panel--intimacy::before {
  background: linear-gradient(180deg, #151922, #b83a4b);
}

.test-entry-copy {
  display: grid;
  gap: 8px;
  padding-left: 2px;
}

.test-entry-label {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.test-entry-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.test-entry-subactions {
  display: grid;
  gap: 10px;
}

.test-entry-subactions .btn {
  width: 100%;
  min-height: 54px;
  justify-content: flex-start;
  padding: 0 16px;
  border-radius: 16px;
  border-color: rgba(21, 25, 34, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,253,248,0.82));
  color: #151922;
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

.test-entry-subactions .btn:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 58, 75, 0.22);
  box-shadow: 0 12px 24px rgba(21, 25, 34, 0.06);
}

.test-entry-panel--intimacy .test-entry-subactions .btn:first-child {
  border-color: rgba(184, 58, 75, 0.3);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,247,247,0.88));
}

.test-entry-panel--intimacy .test-entry-subactions .btn:last-child {
  color: #5f2530;
}

.test-entry-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 36px;
  margin-top: 0;
}

.mbti-home-action {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid rgba(21, 25, 34, 0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
  cursor: pointer;
}

.mbti-home-action strong {
  color: var(--text-primary);
  font-size: 15px;
}

.mbti-home-action span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.mbti-home-action:active {
  transform: translateY(1px);
}

.composer-card {
  margin-bottom: 16px;
}

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

.composer-textarea {
  width: 100%;
  min-height: 92px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 15px;
  resize: vertical;
  outline: none;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.composer-actions .btn {
  width: auto;
}

/* FAB + composer sheet */
.fab-compose {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-strong), var(--primary-dark));
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(184, 58, 75,0.35);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}

.composer-sheet {
  width: min(560px, 100%);
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 20px;
}

.composer-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
}

.composer-close {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px 8px;
}

.composer-sheet .composer-textarea {
  margin-top: 0;
}

.empty-state-card h3 {
  font-size: 22px;
}

.empty-state-card p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.empty-state-card .btn {
  margin-top: 18px;
  width: auto;
}

.tunnel-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  margin-bottom: 16px;
}

.tunnel-select:focus {
  border-color: var(--primary);
}

.section-kicker {
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.section-copy {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.test-plan-grid,
.feature-grid {
  display: grid;
  gap: 16px;
}

.entry-grid,
.group-preview-grid,
.spotlight-grid {
  display: grid;
  gap: 16px;
}

.entry-card,
.spotlight-card {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.06);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    var(--bg-card);
  box-shadow: 0 18px 40px rgba(9, 11, 22, 0.28);
}

.entry-top,
.spotlight-top,
.group-preview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.entry-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(184, 58, 75, 0.12);
  font-size: 22px;
}

.entry-state,
.spotlight-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.entry-title {
  margin-top: 16px;
  font-size: 22px;
  line-height: 1.15;
}

.entry-copy {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.entry-footer {
  margin-top: 18px;
}

.group-preview-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--group-color) 24%, rgba(255,255,255,0.08));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--group-color) 14%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    #151922;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.group-preview-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--group-color) 42%, rgba(255,255,255,0.1));
}

.group-preview-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--group-color) 16%, transparent);
  color: var(--group-color);
  font-size: 12px;
  font-weight: 700;
}

.group-preview-card h3 {
  margin-top: 12px;
  font-size: 24px;
}

.group-preview-copy,
.universe-group-head p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.group-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.group-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.group-pill strong {
  color: var(--pill-color);
  font-size: 13px;
  letter-spacing: 0.2px;
}

.group-pill span {
  color: var(--text-secondary);
  font-size: 12px;
}

.spotlight-card {
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.spotlight-card:hover {
  transform: translateY(-2px);
  border-color: rgba(21, 25, 34, 0.22);
}

.spotlight-card h3 {
  margin-top: 16px;
  font-size: 20px;
}

.spotlight-card p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plan-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(21, 25, 34, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    #151922;
  box-shadow: 0 18px 44px rgba(8, 9, 18, 0.42);
}

.plan-card.featured {
  border-color: rgba(21, 25, 34, 0.26);
  background:
    radial-gradient(circle at top right, rgba(21, 25, 34, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
    #171a21;
}

.plan-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.14);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
}

.plan-title {
  margin-top: 14px;
  font-size: 24px;
  line-height: 1.15;
}

.plan-copy {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.plan-points {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.plan-points div {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.plan-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.plan-note {
  font-size: 12px;
  color: var(--text-muted);
}

.feature-card {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.06);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    var(--bg-card);
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(184, 58, 75, 0.14);
  font-size: 22px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.profile-glance {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-glance .avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.profile-glance .meta strong {
  display: block;
  font-size: 18px;
}

.profile-glance .meta span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.info-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.info-item strong {
  display: block;
  font-size: 18px;
}

.info-item span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.action-list {
  display: grid;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.action-row:last-child {
  border-bottom: 0;
}

.action-row strong {
  display: block;
  font-size: 15px;
}

.action-row span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.history-card {
  cursor: pointer;
}

.history-card + .history-card {
  margin-top: 12px;
}

.relationship-archive-list {
  gap: 12px;
}

.relationship-archive-list.timeline {
  padding-left: 0;
}

.relationship-archive-list.timeline::before {
  display: none;
}

.relationship-archive-card {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(21,25,34,0.1);
  background:
    radial-gradient(circle at 88% 8%, rgba(196,58,88,0.08), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,247,243,0.94));
  box-shadow: 0 14px 34px rgba(21,25,34,0.07);
}

.relationship-archive-card.timeline-item {
  display: block;
  padding: 14px;
  border: 1px solid rgba(21,25,34,0.1);
  background:
    radial-gradient(circle at 88% 8%, rgba(196,58,88,0.08), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,247,243,0.94));
}

.relationship-archive-card.timeline-item::before {
  display: none;
}

.relationship-archive-card.timeline-item + .relationship-archive-card.timeline-item {
  margin-top: 12px;
  border-top: 1px solid rgba(21,25,34,0.1);
}

.relationship-archive-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.relationship-archive-pair {
  display: grid;
  grid-template-columns: 34px minmax(14px, 1fr) 52px minmax(14px, 1fr) 34px;
  gap: 6px;
  align-items: center;
  width: min(320px, 100%);
  min-width: 0;
}

.relationship-archive-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1d2430, #5f646c);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.relationship-archive-avatar.is-target {
  background: linear-gradient(145deg, #a8324e, #d9798f);
}

.relationship-archive-line {
  height: 2px;
  min-width: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(21,25,34,0.16), rgba(196,58,88,0.42));
}

.relationship-archive-ring {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: #151922;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 #fff;
  background:
    radial-gradient(circle, #fff 0 47%, transparent 48%),
    conic-gradient(from 218deg, #151922, #515a68, #c43a58, #d9d4ca, #151922);
  box-shadow: 0 10px 20px rgba(21,25,34,0.12);
}

.relationship-archive-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.relationship-archive-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.58;
}

.relationship-archive-card .timeline-meta {
  margin-top: 2px;
}

.relationship-archive-card .chip[data-tone="ruby"] {
  color: #c43a58;
  border-color: rgba(196,58,88,0.18);
  background: rgba(196,58,88,0.08);
}

.legacy-bridge-grid {
  display: grid;
  gap: 16px;
}

.legacy-bridge-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

.legacy-bridge-card h3 {
  margin-top: 12px;
  font-size: 20px;
}

.legacy-bridge-card p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* 头部 */
.header {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  font-size: 20px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header .back-btn {
  appearance: none;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.78);
  color: var(--text);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 12px;
  min-width: 70px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.header .back-btn span[aria-hidden="true"] {
  font-size: 20px;
  line-height: 1;
}

.header .back-btn:focus-visible,
.nav-back-button:focus-visible,
.icon-button:focus-visible,
.icon-button-sm:focus-visible,
.chrome-icon-button:focus-visible {
  outline: 2px solid rgba(184, 58, 75, 0.38);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(184, 58, 75, 0.12);
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* MBTI 类型标签 */
.type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  max-width: 100%;
}

.type-badge-lg {
  font-size: 48px;
  padding: 20px 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  text-align: center;
  margin: 20px 0;
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.type-variant-label {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(21, 25, 34, 0.10);
  border: 1px solid rgba(21, 25, 34, 0.25);
  border-radius: 20px;
}

/* 雷达图容器 */
.radar-container {
  width: 100%;
  max-width: min(320px, calc(100% - 20px));
  margin: 20px auto;
}

.radar-container canvas {
  width: 100%;
  height: auto;
}

/* 评语区域 */
.profile-section {
  margin-bottom: 20px;
}

.profile-section h3 {
  font-size: 16px;
  color: var(--primary-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-section p, .profile-section .content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}

/* 分数条 */
.score-bar {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.score-bar .label {
  width: 32px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  text-align: right;
}

.score-bar .bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar .bar .fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.score-bar .bar-bi {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.score-bar .bar-bi .bar-center {
  position: absolute;
  left: 50%;
  top: -1px;
  width: 1px;
  height: 10px;
  background: rgba(160, 160, 176, 0.5);
}

.score-bar .bar-bi .bar-fill {
  position: absolute;
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.score-bar .value {
  width: 40px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

/* 16型网格 */
.types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.type-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.type-card:hover, .type-card.active {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(184, 58, 75,0.3);
}

.type-card .type { font-size: 16px; font-weight: 700; color: var(--primary-light); }
.type-card .name { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.explorer-hero {
  margin-top: 10px;
}

.universe-group-stack {
  display: grid;
  gap: 16px;
}

.universe-group {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--group-color) 26%, rgba(255,255,255,0.08));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--group-color) 14%, transparent), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    #151922;
}

.universe-group-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.universe-group-head h3 {
  margin-top: 12px;
  font-size: 24px;
}

.group-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.group-type-card {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.group-type-card:hover,
.group-type-card.active {
  transform: translateY(-1px);
  border-color: var(--group-color);
  background: color-mix(in srgb, var(--group-color) 12%, rgba(255,255,255,0.03));
}

.group-type-card .code {
  display: block;
  color: var(--group-color);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.group-type-card .name {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.type-detail-card {
  margin-top: 20px;
}

.type-detail-head {
  display: grid;
  gap: 16px;
}

.type-detail-titles h2 {
  margin-top: 10px;
  font-size: 28px;
  line-height: 1.15;
}

.type-detail-titles p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.detail-eyebrow {
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.detail-cognitive-bar {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(21, 25, 34, 0.14);
  background: rgba(255,255,255,0.03);
}

.detail-cognitive-label {
  display: inline-flex;
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 700;
}

.detail-cognitive-value {
  margin-top: 8px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.function-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.function-card.primary {
  border-color: rgba(21, 25, 34, 0.26);
  background: linear-gradient(180deg, rgba(184, 58, 75, 0.12), rgba(255,255,255,0.03));
}

.function-rank {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.function-card strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  color: var(--text);
}

.function-name {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.detail-list {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-secondary);
}

.detail-list li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.famous-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.famous-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 13px;
}

/* 帖子卡片 */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.post-card .post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-card .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.post-card .avatar.cert-0 { background: #666; }
.post-card .avatar.cert-1 { background: #515a68; }
.post-card .avatar.cert-2 { background: #b83a4b; }
.post-card .avatar.cert-3 { background: #F8DF89; color: #3d2800; }

.post-card .nickname { font-size: 14px; font-weight: 600; }
.post-card .meta { font-size: 12px; color: var(--text-muted); }
.post-card .post-content { font-size: 14px; line-height: 1.7; margin-bottom: 10px; }

.post-card .post-actions {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.post-card .post-actions .post-action-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: inherit;
  font: inherit;
}

.post-card .post-actions .post-action-btn:hover { color: var(--primary-light); }
.post-card .post-actions .post-action-btn.liked { color: var(--accent); }

/* Post menu (edit/delete) */
.post-menu-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  padding: 2px 6px;
  line-height: 1;
  flex-shrink: 0;
}

.post-menu {
  display: none;
  gap: 8px;
  padding: 0 0 10px;
}

.post-menu.show {
  display: flex;
}

.post-menu button {
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}

.post-menu button:last-child {
  color: var(--danger);
  border-color: rgba(225,112,85,0.2);
}

.edit-post-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--primary);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.edit-post-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Comment enhancements */
.comment-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.comment-del {
  appearance: none;
  border: 0;
  background: transparent;
  margin-left: auto;
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

/* 底部导航 */
.tab-bar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  background: rgba(255,253,248,0.84);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(21, 25, 34, 0.12);
  box-shadow: 0 20px 40px rgba(21, 25, 34, 0.14);
  display: flex;
  justify-content: space-around;
  padding: 8px;
  border-radius: 24px;
  z-index: 100;
}

.tab-bar .tab {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  min-width: 88px;
  border-radius: 18px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.tab-bar .tab.active {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(21, 25, 34, 0.1), rgba(184, 58, 75, 0.08));
}
.tab-bar .tab .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
  position: relative;
}

.tab-bar .tab.active .icon {
  transform: translateY(-1px);
}

.tab-label {
  line-height: 1;
}

/* Daily Match Card */
.daily-match-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(21,25,34,.12);
}
.daily-match-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}
.daily-match-body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.daily-match-avatar { flex-shrink: 0; cursor: pointer; }
.daily-match-info { flex: 1; min-width: 0; }
.daily-match-info strong {
  display: block;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daily-match-type {
  font-size: 12px;
  color: var(--text-muted);
}

.gender-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  font-size: 0.95em;
  font-weight: 700;
  vertical-align: middle;
}

.gender-symbol.is-male {
  color: #62666f;
}

.gender-symbol.is-female {
  color: #b83a4b;
}
.daily-match-bio {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daily-match-compat {
  flex-shrink: 0;
  text-align: center;
}
.daily-match-score {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.daily-match-rel {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}
.daily-match-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.daily-match-actions .btn { flex: 1; }
.daily-match-exhausted {
  opacity: .7;
}
.daily-match-empty {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.btn-xs {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* Compatibility Page */
.compat-back {
  padding: 14px 0 4px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.compat-title {
  font-size: 26px;
  margin-top: 4px;
}

.compat-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 18px;
}

.compat-selector-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.compat-slot {
  flex: 1;
  min-height: 80px;
  border-radius: 16px;
  border: 1.5px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.compat-slot-label {
  color: var(--text-muted);
  font-size: 13px;
}

.compat-slot-type {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.compat-slot-name {
  font-size: 12px;
  color: var(--text-secondary);
}

.compat-vs {
  color: var(--text-muted);
  font-size: 22px;
  flex-shrink: 0;
}

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

.compat-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 4px;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
}

.compat-grid-item strong {
  font-size: 13px;
}

.compat-grid-item span {
  font-size: 10px;
  opacity: 0.8;
}

.compat-score-num {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.compat-rel-title {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.compat-summary {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.6;
}

.compat-section-head {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.compat-point {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 6px;
}

.compat-point-good {
  background: rgba(47, 125, 98, 0.08);
  border-left: 3px solid #2f7d62;
  color: var(--text);
}

.compat-point-warn {
  background: rgba(184, 58, 75, 0.07);
  border-left: 3px solid #b83a4b;
  color: var(--text);
}

.func-compare {
  display: flex;
  gap: 6px;
  text-align: center;
}

.func-compare-col {
  flex: 1;
}

.func-compare-mid {
  flex: 0 0 30px;
  color: var(--text-muted);
  font-size: 12px;
}

.func-compare-type {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

.func-compare-cell {
  padding: 6px 4px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.func-compare-cell small {
  color: var(--text-muted);
  font-size: 10px;
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 112px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 9999;
  animation: toastIn 0.3s ease;
  pointer-events: none;
  transition: bottom 0.2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Tab content fade */
.tab-fade-in {
  animation: tabFadeIn 150ms ease-out;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skeleton screens */
.skeleton {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skeleton-circle { border-radius: 50%; }
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-title { height: 20px; margin-bottom: 10px; width: 60%; }
.skeleton-rect { height: 40px; margin-bottom: 8px; }

/* 加载中 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

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

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty .icon { font-size: 48px; margin-bottom: 12px; }

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: overlayFadeIn 200ms ease;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalScaleIn 200ms ease-out;
  box-sizing: border-box;
}

.test-overview-modal,
.app-confirm-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-confirm-copy {
  margin-top: 10px;
}

.app-confirm-actions,
.test-overview-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.app-confirm-actions .btn,
.test-overview-actions .btn {
  flex: 1;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal h2 { font-size: 18px; margin-bottom: 16px; }

.type-overview-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(21, 25, 34, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(21, 25, 34, 0.08);
}

.type-overview-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 58, 75, 0.18);
}

.type-overview-trigger-auth {
  white-space: nowrap;
  min-height: 36px;
  padding: 0 14px;
  border-width: 1.5px;
  border-color: rgba(184, 58, 75, 0.34);
  color: #8f2c3a;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 20px rgba(184, 58, 75, 0.08);
}

.intimacy-persona-overview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(184, 58, 75, 0.18), transparent 38%),
    rgba(5, 6, 9, 0.74);
  backdrop-filter: blur(18px);
}

.intimacy-persona-overview-sheet {
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1180px, calc(100vw - 32px));
  height: min(86vh, 700px);
  max-height: calc(100dvh - 32px);
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(194, 58, 75, 0.44);
  background: #08090d;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: modalScaleIn 180ms ease-out;
}

.intimacy-persona-overview-sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 14% 0%, rgba(194, 58, 75, 0.16), transparent 28%);
}

.intimacy-persona-overview-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intimacy-persona-overview-kicker {
  margin: 0 0 5px;
  color: rgba(227, 167, 176, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.intimacy-persona-overview-head h3 {
  margin: 0;
  color: #fffaf4;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.intimacy-persona-overview-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.intimacy-persona-overview-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 239, 233, 0.78);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.intimacy-persona-overview-close:focus-visible {
  outline: 2px solid rgba(194, 58, 75, 0.86);
  outline-offset: 3px;
}

.intimacy-persona-overview-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(100px, 1fr);
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.intimacy-persona-card {
  --persona-accent: #c23a4b;
  --persona-accent-soft: rgba(194, 58, 75, 0.28);
  --persona-accent-glow: rgba(194, 58, 75, 0.44);
  --persona-title: #f4efe9;
  position: relative;
  display: grid;
  min-height: 0;
  height: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008)),
    rgba(12, 14, 19, 0.42);
  box-shadow: none;
  overflow: hidden;
}

.intimacy-persona-card-body {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.intimacy-persona-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.intimacy-persona-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border-radius: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.intimacy-persona-image-frame {
  position: relative;
  z-index: 2;
  display: block;
  width: 54px;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
}

.intimacy-persona-image-frame::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 22%;
  height: 18%;
  border-bottom-right-radius: 8px;
  background: #07080c;
  pointer-events: none;
}

.intimacy-persona-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  background-image: url('/assets/intimacy/persona-v4/persona-sheet-v4-optimized.jpg');
  background-size: 600% 400%;
  background-position: var(--persona-sprite-position);
  background-repeat: no-repeat;
}

.intimacy-persona-axis {
  margin: 0;
  color: rgba(227, 167, 176, 0.68);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.intimacy-persona-card h4 {
  color: var(--persona-title);
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.08;
  letter-spacing: 0;
}

.intimacy-persona-card p:not(.intimacy-persona-axis) {
  color: rgba(255, 250, 244, 0.76);
  font-size: clamp(10px, 0.9vw, 12px);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.intimacy-persona-card.is-secure {
  --persona-accent: #c23a4b;
  --persona-accent-soft: rgba(194, 58, 75, 0.28);
  --persona-accent-glow: rgba(194, 58, 75, 0.44);
  --persona-title: #f6f1ea;
}

.intimacy-persona-card.is-anxious {
  --persona-accent: #a52f42;
  --persona-accent-soft: rgba(165, 47, 66, 0.26);
  --persona-accent-glow: rgba(165, 47, 66, 0.42);
  --persona-title: #f1e6e7;
}

.intimacy-persona-card.is-avoidant {
  --persona-accent: #7b1f2e;
  --persona-accent-soft: rgba(123, 31, 46, 0.26);
  --persona-accent-glow: rgba(123, 31, 46, 0.42);
  --persona-title: #eee8e2;
}

.intimacy-persona-card.is-fearful {
  --persona-accent: #df6a79;
  --persona-accent-soft: rgba(223, 106, 121, 0.25);
  --persona-accent-glow: rgba(223, 106, 121, 0.44);
  --persona-title: #fff8f5;
}

.intimacy-persona-overview-footer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  margin-top: 0;
  color: rgba(244, 239, 233, 0.62);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.intimacy-persona-overview-source {
  color: rgba(227, 167, 176, 0.54);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

@media (max-width: 980px) {
  .intimacy-persona-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(96px, auto);
  }

  .intimacy-persona-visual {
    width: 54px;
  }
}

@media (max-width: 560px) {
  .intimacy-persona-overview-sheet {
    grid-template-rows: auto auto auto;
    height: auto;
    max-height: calc(100dvh - 20px - env(safe-area-inset-bottom, 0px));
    padding: 14px;
    border-radius: 14px;
  }

  .intimacy-persona-overview-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(4, 88px);
    grid-auto-rows: 88px;
    align-content: start;
    gap: 5px;
    overflow: hidden;
  }

  .intimacy-persona-overview-kicker,
  .intimacy-persona-axis,
  .intimacy-persona-card p:not(.intimacy-persona-axis) {
    display: none;
  }

  .intimacy-persona-card {
    justify-items: center;
    align-content: start;
    gap: 4px;
    padding: 6px 4px 5px;
    border-radius: 5px;
  }

  .intimacy-persona-card-body {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 3px;
    width: 100%;
  }

  .intimacy-persona-visual {
    width: 42px;
    border-radius: 4px;
    box-shadow: 0 6px 14px rgba(21, 25, 34, 0.08);
  }

  .intimacy-persona-image-frame {
    width: 36px;
    border-radius: 8px;
  }

  .intimacy-persona-card h4 {
    width: 100%;
    font-size: 11px;
    line-height: 1.08;
    text-align: center;
    white-space: nowrap;
  }

}

.comment-list {
  max-height: 300px;
  overflow-y: auto;
}

.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item-body {
  flex: 1;
  min-width: 0;
}

.comment-item p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.comment-editor {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.comment-editor input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.comment-editor .btn {
  width: auto;
}

.request-card,
.friend-card,
.search-result-card,
.notification-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(21, 25, 34, 0.09);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,250,253,0.88));
  box-shadow: 0 18px 40px rgba(27, 47, 77, 0.08);
}

.request-card + .request-card,
.notification-card + .notification-card {
  margin-top: 12px;
}

.request-top,
.friend-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-avatar,
.friend-avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}

/* Avatar colors by certification level (cannot be changed by user) */
.friend-avatar.cert-0 {
  background: linear-gradient(135deg, #555, #777);
}

.friend-avatar.cert-1 {
  background: linear-gradient(135deg, #515a68, #151922);
}

.friend-avatar.cert-2 {
  background: linear-gradient(135deg, #b83a4b, #8f2c3a);
}

.friend-avatar.cert-3 {
  background: linear-gradient(135deg, #F8DF89, #CFA33F);
  color: #3d2800;
}

.request-meta strong,
.friend-meta strong {
  display: block;
  font-size: 15px;
}

.request-meta span,
.friend-meta span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.request-actions,
.friend-actions,
.search-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.request-actions .btn,
.friend-actions .btn,
.search-actions .btn {
  width: auto;
}

.request-message,
.notification-body {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.friends-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.friend-card {
  min-width: 150px;
}

.search-toolbar {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.search-toolbar input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.modal-copy {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.notification-card.unread {
  border-color: rgba(21, 25, 34, 0.24);
  background: rgba(184, 58, 75, 0.08);
}

.modal-search-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 320px;
  overflow-y: auto;
}

/* 响应式 - 桌面端 */
@media (min-width: 768px) {
  .container { max-width: 560px; }
  .types-grid { gap: 14px; }
  .type-card { padding: 16px 12px; }
  .entry-grid,
  .group-preview-grid,
  .spotlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 7档选择器 */
.likert-scale {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.likert-axis {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.likert-axis span:first-child {
  text-align: left;
}

.likert-axis span:nth-child(2) {
  text-align: center;
}

.likert-axis span:last-child {
  text-align: right;
}

.likert-scale-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.likert-scale .option {
  appearance: none;
  width: 100%;
  min-height: 62px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 4px 10px;
  border-radius: 16px;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: inherit;
  text-align: center;
}

.likert-scale .option:hover {
  border-color: rgba(21, 25, 34, 0.28);
  background: rgba(184, 58, 75, 0.08);
}

.likert-scale .option.selected {
  border-color: rgba(21, 25, 34, 0.42);
  background: linear-gradient(135deg, rgba(184, 58, 75, 0.20), rgba(184, 58, 75, 0.06));
  box-shadow: 0 16px 30px rgba(14, 16, 28, 0.35);
}

.likert-scale .option .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.22);
  transition: all 0.2s;
}

.likert-scale .option.selected .dot {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 0 0 5px rgba(184, 58, 75, 0.10);
}

.likert-scale .option .text {
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
}

.likert-selection-note {
  min-height: 18px;
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.likert-selection-note.selected {
  color: var(--text-secondary);
}

.likert-labels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 8px;
}

.statement-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025);
}

.statement-card strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-bottom: 0;
  flex: 0 0 auto;
  border-radius: 999px;
  font-size: 11px;
  color: var(--primary-light);
  letter-spacing: 0;
  text-transform: none;
  background: rgba(184, 58, 75, 0.12);
}

.statement-card span {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.statement-card-a {
  background: linear-gradient(135deg, rgba(93, 106, 255, 0.08), rgba(255,255,255,0.02));
}

.statement-card-b {
  background: linear-gradient(135deg, rgba(159, 95, 255, 0.08), rgba(255,255,255,0.02));
}

/* 测试题目 */
.question-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    var(--bg-card);
  border: 1px solid rgba(21, 25, 34, 0.12);
  border-radius: 20px;
  padding: 20px 18px;
  margin: 10px 0 12px;
  box-shadow: 0 24px 48px rgba(7, 9, 18, 0.42);
}

.question-card .q-number {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.10);
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
}

.question-card .q-text {
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.test-brief {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
  margin-bottom: 10px;
  padding: 12px 14px;
}

.test-brief .headline {
  font-size: 16px;
  font-weight: 700;
}

.test-brief .copy {
  margin-top: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.header-action-btn {
  min-width: 46px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.72);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.page.test-page {
  padding-bottom: 148px;
}

.test-status-card {
  margin-top: 0;
  padding: 10px 12px;
}

.test-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.test-status-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.test-status-summary strong {
  font-size: 16px;
  color: var(--text);
}

.test-status-summary span,
.test-status-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.test-status-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.test-status-overview-btn {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  flex: 0 0 auto;
}

.test-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.test-sticky-actions {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: min(560px, calc(100% - 12px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 86px 1fr;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.84);
  border-top: 1px solid rgba(21, 25, 34, 0.08);
  backdrop-filter: blur(16px);
}

.test-sticky-actions .btn {
  min-height: 46px;
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.test-overview-grid-wrap {
  margin-top: 12px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 0;
}

.question-grid-btn {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.question-grid-btn.answered {
  color: var(--text);
  border-color: rgba(21, 25, 34, 0.2);
  background: rgba(184, 58, 75, 0.12);
}

.question-grid-btn.current {
  border-color: rgba(21, 25, 34, 0.42);
  background: linear-gradient(135deg, rgba(184, 58, 75, 0.24), rgba(184, 58, 75, 0.08));
  color: #fff;
}

.question-grid-btn.unanswered {
  opacity: 0.88;
}

.overview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.overview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.overview-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  background: rgba(255,255,255,0.08);
}

.overview-legend .answered i {
  background: rgba(184, 58, 75, 0.72);
}

.overview-legend .current i {
  background: var(--accent);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.modal-actions .btn {
  width: auto;
}

.test-footnote {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .app-shell.app-shell-assessment.test-page {
    width: min(1120px, calc(100% - 64px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas:
      "topbar topbar"
      "progress sideBrief"
      "question sideBrief"
      "question sideStatus"
      "question sideFoot";
    gap: 16px 22px;
    align-items: start;
    padding-top: 26px;
    padding-bottom: 132px;
  }

  .test-page .assessment-topbar {
    grid-area: topbar;
    width: 100%;
    margin-bottom: 2px;
    padding: 0;
  }

  .test-page .assessment-topbar h1 {
    font-size: 25px;
    letter-spacing: -0.2px;
    background: none;
    -webkit-text-fill-color: var(--text);
  }

  .test-page .assessment-topbar .back-btn,
  .test-page .assessment-topbar .header-action-btn {
    background: rgba(255,253,248,0.72);
    border: 1px solid rgba(21, 25, 34, 0.1);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(21, 25, 34, 0.08);
  }

  .test-page .test-brief {
    grid-area: sideBrief;
    position: sticky;
    top: 24px;
    display: block;
    margin: 0;
    padding: 22px;
    border-radius: 22px;
  }

  .test-page .test-brief .headline {
    font-size: 18px;
    line-height: 1.35;
  }

  .test-page .test-brief .copy {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.75;
  }

  .test-page .test-status-card {
    grid-area: sideStatus;
    position: sticky;
    top: 174px;
    margin: 0;
    padding: 18px;
    border-radius: 22px;
  }

  .test-page .test-status-row {
    align-items: flex-start;
  }

  .test-page .test-status-summary {
    display: grid;
    gap: 8px;
  }

  .test-page .test-status-summary strong {
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.6px;
  }

  .test-page .test-status-summary span,
  .test-page .test-status-meta span {
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(21, 25, 34, 0.05);
    border: 1px solid rgba(21, 25, 34, 0.06);
    color: var(--text-secondary);
    font-size: 12px;
  }

  .test-page .test-status-meta {
    gap: 8px;
    margin-top: 14px;
  }

  .test-page .progress-bar {
    grid-area: progress;
    height: 8px;
    margin: 0;
    border-radius: 999px;
    background: rgba(21, 25, 34, 0.08);
  }

  .test-page .progress-bar .fill {
    border-radius: 999px;
    background: linear-gradient(90deg, #151922 0%, #5a2530 58%, #b83a4b 100%);
  }

  .test-page #questionArea {
    grid-area: question;
    min-width: 0;
  }

  .test-page .question-card {
    min-height: 520px;
    margin: 0;
    padding: 32px;
    border-radius: 26px;
    background:
      radial-gradient(circle at 96% 0%, rgba(184, 58, 75, 0.1), transparent 30%),
      linear-gradient(180deg, rgba(255,253,248,0.98), rgba(249,247,241,0.94)),
      var(--bg-card);
    border-color: rgba(21, 25, 34, 0.1);
    box-shadow: 0 26px 70px rgba(21, 25, 34, 0.12);
  }

  .test-page .question-card .q-number {
    margin-bottom: 18px;
    padding: 7px 11px;
    border: 1px solid rgba(184, 58, 75, 0.14);
    background: rgba(184, 58, 75, 0.08);
    color: #8f2c3a;
    font-size: 12px;
  }

  .test-page .question-card .q-text {
    max-width: 720px;
    font-size: 26px;
    line-height: 1.52;
    letter-spacing: 0;
  }

  .test-page .likert-labels {
    gap: 12px;
    margin: 24px 0 18px;
  }

  .test-page .statement-card {
    padding: 14px 16px;
    border-color: rgba(21, 25, 34, 0.08);
    background: rgba(255, 255, 255, 0.66);
  }

  .test-page .statement-card span {
    font-size: 13px;
    line-height: 1.65;
  }

  .test-page .likert-scale {
    gap: 18px;
    margin-top: 24px;
  }

  .test-page .likert-axis {
    font-size: 13px;
  }

  .test-page .likert-scale-row {
    gap: 10px;
  }

  .test-page .likert-scale .option {
    min-height: 82px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 30px rgba(21, 25, 34, 0.06);
  }

  .test-page .likert-scale .option .dot {
    width: 12px;
    height: 12px;
    border-color: rgba(21, 25, 34, 0.16);
  }

  .test-page .likert-scale .option .text {
    font-size: 12px;
  }

  .test-page .likert-selection-note {
    min-height: 22px;
    font-size: 12px;
  }

  .test-page .choice-grid,
  .test-page .forced-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
  }

  .test-page .choice-card {
    min-height: 112px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
  }

  .test-page .choice-card .choice-text {
    font-size: 14px;
    line-height: 1.65;
  }

  .test-page .test-footnote {
    grid-area: sideFoot;
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.58);
    border: 1px solid rgba(21, 25, 34, 0.07);
    text-align: left;
    line-height: 1.65;
  }

  .test-sticky-actions {
    width: min(720px, calc(100% - 64px));
    bottom: 18px;
    grid-template-columns: 136px 96px minmax(180px, 1fr);
    padding: 10px;
    border: 1px solid rgba(21, 25, 34, 0.1);
    border-radius: 22px;
    background: rgba(255,253,248,0.86);
    box-shadow: 0 24px 54px rgba(21, 25, 34, 0.16);
  }

  .test-sticky-actions .btn {
    min-height: 48px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

  .auth-hero {
    padding: 28px 20px 22px;
  }

  .auth-hero::before {
    width: 72px;
    height: 72px;
    top: 16px;
    right: 16px;
  }

  .auth-hero-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .auth-hero .hero-title {
    font-size: 38px;
  }

  .auth-hero-panel {
    padding: 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .plan-title {
    font-size: 22px;
  }

  .question-card .q-text {
    font-size: 18px;
  }

  .likert-scale-row {
    gap: 5px;
  }

  .likert-scale .option {
    min-height: 54px;
    padding-top: 7px;
    padding-bottom: 9px;
  }

  .likert-scale .option .text {
    font-size: 10px;
  }

  .likert-labels {
    grid-template-columns: 1fr;
  }

  .test-brief {
    padding: 10px 12px;
    margin-bottom: 8px;
  }

  .test-brief .headline {
    font-size: 15px;
  }

  .test-brief .copy {
    font-size: 11px;
  }

  .mbti-share-milestone-card {
    padding: 22px 16px 18px;
  }

  .mbti-share-milestone-headline {
    font-size: 18px;
  }

  .mbti-share-milestone-copy {
    font-size: 13px;
  }

  .test-status-card {
    padding: 8px 10px;
  }

  .test-status-row {
    flex-wrap: wrap;
  }

  .test-sticky-actions {
    grid-template-columns: 1fr 72px 1fr;
    padding-left: 12px;
    padding-right: 12px;
  }

  .test-sticky-actions .btn {
    min-height: 44px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 13px;
  }

  .question-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .app-confirm-actions,
  .test-overview-actions {
    flex-direction: column-reverse;
  }
}

/* Test slide animations */
.question-slide-out-left { animation: slideOutLeft 200ms ease-out forwards; }
.question-slide-in-right { animation: slideInRight 200ms ease-out forwards; }
.question-slide-out-right { animation: slideOutRight 200ms ease-out forwards; }
.question-slide-in-left { animation: slideInLeft 200ms ease-out forwards; }
@keyframes slideOutLeft { to { transform: translateX(-100%); opacity: 0; } }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { to { transform: translateX(100%); opacity: 0; } }
@keyframes slideInLeft { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.mbti-share-milestone-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 24px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(21, 25, 34, 0.18);
  background:
    radial-gradient(circle at top left, rgba(184, 58, 75, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(184, 58, 75, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
    var(--bg-card);
  animation: milestoneIn 300ms ease-out;
}

.mbti-share-milestone-card::before {
  content: '';
  position: absolute;
  inset: auto -20px -30px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 58, 75, 0.22), rgba(184, 58, 75, 0));
  pointer-events: none;
}

.mbti-share-milestone-progress {
  margin: 0 auto 12px;
}

.mbti-share-milestone-headline {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.2px;
}

.mbti-share-milestone-copy {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.mbti-share-milestone-tail {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}

.mbti-share-milestone-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.mbti-share-milestone-actions .btn {
  width: auto;
  min-width: 144px;
}

@keyframes milestoneIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Progress pulse */
.progress-pulse { animation: progressPulse 300ms ease-out; }
@keyframes progressPulse {
  0% { transform: scaleY(1); filter: brightness(1); }
  50% { transform: scaleY(1.3); filter: brightness(1.3); }
  100% { transform: scaleY(1); filter: brightness(1); }
}

/* Question type badges */
.q-type-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}
.q-type-fc { background: rgba(21,25,34,0.08); color: #151922; }
.q-type-sc { background: rgba(184,58,75,0.08); color: #8f2c3a; }

/* 选择题卡片 (forced_choice A/B, scenario A/B/C/D) */
.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.choice-card {
  appearance: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 14px 14px;
  border: 0;
  border-radius: 14px;
  border: 1.5px solid rgba(21, 25, 34, 0.08);
  background: rgba(255,255,255,0.82);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: all 0.18s ease;
  box-shadow: 0 14px 28px rgba(21, 25, 34, 0.06);
}

.choice-card:hover {
  border-color: rgba(184, 58, 75, 0.24);
  background: rgba(184, 58, 75, 0.06);
}

.choice-card:focus-visible {
  outline: none;
  border-color: rgba(184, 58, 75, 0.7);
  box-shadow:
    0 0 0 3px rgba(184, 58, 75, 0.14),
    0 14px 28px rgba(21, 25, 34, 0.06);
}

.choice-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(184, 58, 75, 0.12), rgba(184, 58, 75, 0.14));
  box-shadow: 0 0 0 2px rgba(184, 58, 75, 0.12);
}

.choice-card .choice-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
  transition: all 0.18s ease;
}

.choice-card.selected .choice-label {
  color: #fff;
  background: var(--primary);
}

.choice-card .choice-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

.choice-card.selected .choice-text {
  color: var(--text-primary);
}

.choice-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.choice-hint.selected {
  color: var(--primary-light);
}

/* Forced-choice (2-option) layout */
.forced-choice-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.forced-choice-grid .choice-card {
  padding: 16px 20px;
  min-height: 60px;
}

/* Micro-rank (click-to-rank) layout */
.rank-container {
  margin-top: 8px;
}

.rank-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-align: center;
}

.rank-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-item {
  appearance: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.82);
  border: 1.5px solid rgba(21, 25, 34, 0.08);
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  opacity: 1;
  transition: all 0.2s;
  box-shadow: 0 14px 28px rgba(21, 25, 34, 0.06);
}

.rank-item.unranked:hover {
  border-color: var(--primary);
  background: rgba(184, 58, 75, 0.06);
}

.rank-item.unranked:focus-visible {
  outline: none;
  border-color: rgba(184, 58, 75, 0.7);
  box-shadow:
    0 0 0 3px rgba(184, 58, 75, 0.14),
    0 14px 28px rgba(21, 25, 34, 0.06);
}

.rank-item.ranked {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(184, 58, 75, 0.08), rgba(184, 58, 75, 0.10));
  cursor: default;
}

.rank-item:disabled {
  opacity: 1;
}

.rank-position {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.rank-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.rank-item.ranked .rank-text {
  color: var(--text-primary);
}

.rank-reset-btn {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.rank-reset-btn:hover {
  color: var(--text-primary);
}

/* Intimacy portrait card */
.portrait-card {
  position: relative;
  overflow: hidden;
}
.portrait-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(184, 58, 75, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.portrait-name {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 4px;
}
.portrait-quadrant {
  font-size: 13px;
  color: var(--text-muted);
}
.portrait-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.portrait-tag {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.portrait-tag-strength {
  background: rgba(184, 58, 75, 0.06);
  border: 1px solid rgba(184, 58, 75, 0.12);
}
.portrait-tag-growth {
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.15);
}

.intimacy-portrait-hero {
  position: relative;
  overflow: hidden;
  padding: 2px 0 0;
}

.intimacy-portrait-hero::before {
  content: '';
  position: absolute;
  top: -54px;
  right: -46px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 58, 75, 0.12), transparent 70%);
  pointer-events: none;
}

.intimacy-portrait-layout {
  position: relative;
  z-index: 1;
  display: block;
}

.intimacy-portrait-cardlet {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  width: min(620px, 100%);
  margin: 0 auto 16px;
  padding: 18px 20px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 16px 38px rgba(21, 25, 34, 0.07);
}

.intimacy-portrait-main {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.intimacy-portrait-visual-wrap {
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
}

.intimacy-persona-visual.intimacy-persona-visual-lg {
  width: 128px;
  border-radius: 14px;
  box-shadow: none;
}

.intimacy-portrait-visual-wrap .intimacy-persona-visual.intimacy-persona-visual-lg {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #08090d;
  box-shadow: none;
}

.intimacy-persona-visual.intimacy-persona-visual-lg .intimacy-persona-image-frame {
  width: 112px;
  border-radius: 16px;
}

@media (max-width: 480px) {
  .intimacy-portrait-main {
    gap: 5px;
  }

  .intimacy-portrait-cardlet {
    gap: 14px;
    padding: 14px;
    border-radius: 22px;
  }

  .intimacy-persona-visual.intimacy-persona-visual-lg {
    width: 104px;
    border-radius: 13px;
  }

  .intimacy-persona-visual.intimacy-persona-visual-lg .intimacy-persona-image-frame {
    width: 88px;
    border-radius: 14px;
  }
}

.intimacy-portrait-name {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--primary);
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: 0;
}

.intimacy-portrait-kicker {
  margin: 0;
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.intimacy-portrait-copy {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.intimacy-portrait-status-chip {
  position: relative;
  z-index: 1;
}

.intimacy-summary-strip {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.intimacy-summary-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.72);
}

.intimacy-summary-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: rgba(184, 58, 75, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.intimacy-summary-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.intimacy-hero-cta {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 14px;
}

.intimacy-dimension-overview {
  display: grid;
  gap: 12px;
}

.intimacy-report-section-head,
.intimacy-locked-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.intimacy-report-section-head h3,
.intimacy-locked-report-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.intimacy-report-section-head p,
.intimacy-locked-report-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.intimacy-report-section-head span,
.intimacy-lock-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(184, 58, 75, 0.14);
  background: rgba(184, 58, 75, 0.08);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.intimacy-parent-dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.intimacy-parent-dimension-card {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(249,247,241,0.72));
}

.intimacy-parent-dimension-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.intimacy-parent-dimension-head span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.intimacy-parent-dimension-head strong {
  color: var(--text);
  font-size: 16px;
}

.intimacy-parent-dimension-meter {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.08);
}

.intimacy-parent-dimension-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-strong), #c44a5a);
}

.intimacy-parent-dimension-status {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.intimacy-parent-dimension-card p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.intimacy-subdimension-preview {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(21, 25, 34, 0.12);
}

.intimacy-subdimension-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.intimacy-subdimension-preview-head span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.intimacy-subdimension-preview-head small {
  color: var(--text-muted);
  font-size: 11px;
}

.intimacy-subdimension-group {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.intimacy-subdimension-parent {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.intimacy-subdimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.intimacy-subdimension-card {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(21, 25, 34, 0.12);
}

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

.intimacy-subdimension-card-head div {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.intimacy-subdimension-card-head strong {
  color: var(--text);
  font-size: 12px;
}

.intimacy-subdimension-copy {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.is-obscured {
  display: inline-block;
  filter: blur(4px);
  opacity: 0.72;
  user-select: none;
}

.intimacy-locked-report {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background:
    radial-gradient(circle at 86% 4%, rgba(255, 143, 184, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(249,247,241,0.88));
}

.intimacy-locked-report::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 98px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.98) 58%);
  opacity: 0;
  pointer-events: none;
}

.intimacy-locked-report.is-locked {
  padding-bottom: 76px;
}

.intimacy-locked-report.is-locked::after {
  opacity: 1;
}

.intimacy-desire-layer-card {
  background:
    radial-gradient(circle at 86% 4%, rgba(255, 143, 184, 0.2), transparent 34%),
    radial-gradient(circle at 8% 100%, rgba(184, 58, 75, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,247,241,0.9));
}

.intimacy-locked-group-list,
.intimacy-unlocked-report-groups,
.intimacy-unlocked-report-rows {
  display: grid;
  gap: 9px;
}

.intimacy-locked-group,
.intimacy-unlocked-report-group,
.intimacy-unlocked-report-row {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.7);
}

.intimacy-locked-group h4,
.intimacy-unlocked-report-group h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.intimacy-blur-line {
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(93,107,130,0.34), rgba(93,107,130,0.1));
  filter: blur(3px);
}

.intimacy-blur-line-short {
  width: 68%;
}

.intimacy-lock-cta {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 16px;
  width: auto;
  box-shadow: 0 14px 28px rgba(24, 72, 182, 0.18);
}

.intimacy-unlocked-report-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.intimacy-unlocked-report-row-head strong {
  color: var(--text);
  font-size: 13px;
}

.intimacy-unlocked-report-row-head span {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.intimacy-unlocked-report-row p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}
.portrait-tag-label {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 6px;
  margin-top: 1px;
}
.portrait-tag-strength .portrait-tag-label {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
}
.portrait-tag-growth .portrait-tag-label {
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
}

/* AI breathing / pulse effects */
.ai-breathing {
  animation: aiBreathe 2s ease-in-out infinite;
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes aiBreathe {
  0%, 100% { border-color: rgba(184, 58, 75, 0.12); }
  50% { border-color: rgba(184, 58, 75, 0.4); }
}
.ai-pulse {
  animation: aiPulseGlow 600ms ease-out;
}
@keyframes aiPulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(184, 58, 75, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(184, 58, 75, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(184, 58, 75, 0); }
}

/* 一致性/置信度标签 */
.consistency-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.consistency-badge.high { background: rgba(0,184,148,0.2); color: var(--success); }
.consistency-badge.medium { background: rgba(253,203,110,0.2); color: var(--warning); }
.consistency-badge.low { background: rgba(225,112,85,0.2); color: var(--danger); }

/* ── Profile Page v2 ── */

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.avatar-circle-lg {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Avatar colors by certification level (user cannot change avatar) */
.avatar-circle-lg.cert-0 {
  background: linear-gradient(135deg, #555, #777);
}

.avatar-circle-lg.cert-1 {
  background: linear-gradient(135deg, #515a68, #151922);
}

.avatar-circle-lg.cert-2 {
  background: linear-gradient(135deg, #b83a4b, #8f2c3a);
}

.avatar-circle-lg.cert-3 {
  background: linear-gradient(135deg, #F8DF89, #CFA33F);
  color: #3d2800;
}
  font-weight: 800;
  letter-spacing: 1px;
  flex: 0 0 72px;
}

.profile-header .meta {
  flex: 1;
  min-width: 0;
}

.profile-header .meta .name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-header .meta .name-row strong {
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-header .meta .name-row .edit-btn {
  appearance: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 14px;
  cursor: pointer;
  flex: 0 0 auto;
  line-height: 1;
  color: var(--text-muted);
  transition: background 0.2s;
}

.profile-header .meta .name-row .edit-btn:active {
  background: rgba(255,255,255,0.12);
}

.profile-header .meta .type-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.profile-header .meta .cert-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(184, 58, 75, 0.15);
  color: var(--primary-light);
}

.profile-bio {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* Profile summary pills */
.profile-identity-pills {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.profile-identity-pills::-webkit-scrollbar { display: none; }

.stat-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(21, 25, 34, 0.08);
  text-align: center;
  min-width: 80px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.stat-pill strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}

.stat-pill span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.profile-assets-card {
  margin-top: 12px;
  margin-bottom: 12px;
}

.profile-archive-summary {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(21, 25, 34, 0.08);
}

.profile-archive-summary .profile-section-head {
  margin-bottom: 10px;
}

.profile-archive-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-archive-summary-item {
  min-width: 0;
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.profile-archive-summary-item span,
.profile-archive-summary-item small {
  display: block;
  color: var(--text-secondary);
}

.profile-archive-summary-item span {
  font-size: 12px;
  font-weight: 700;
}

.profile-archive-summary-item strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.1;
}

.profile-archive-summary-item small {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}

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

.profile-section-head strong {
  font-size: 15px;
  color: var(--text);
}

.profile-section-head span {
  font-size: 12px;
  color: var(--text-muted);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.asset-card {
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,250,252,0.9));
  border: 1px solid rgba(21, 25, 34, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.asset-card-points {
  background: linear-gradient(180deg, rgba(234, 244, 255, 0.96), rgba(246, 251, 255, 0.92));
  border-color: rgba(74, 144, 226, 0.18);
}

.asset-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.asset-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.asset-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(21, 25, 34, 0.08);
  color: var(--text-muted);
  font-size: 11px;
}

.asset-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 28px;
  line-height: 1;
  color: var(--text);
}

.asset-value span {
  font-size: 12px;
  color: var(--text-muted);
}

.asset-bar {
  margin-top: 14px;
  height: 6px;
  border-radius: 999px;
  background: rgba(21, 25, 34, 0.08);
  overflow: hidden;
}

.asset-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7bb0ff, #5b8def);
}

@media (max-width: 560px) {
  .profile-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .profile-archive-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Test entry cards */
.test-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.test-entry-card {
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.test-entry-card:active {
  transform: scale(0.97);
  border-color: rgba(21, 25, 34, 0.3);
}

.test-entry-card .icon {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
}

.test-entry-card .title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.test-entry-card .count {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--primary-light);
  font-weight: 600;
}

.test-entry-card .desc {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 20px;
  margin-top: 12px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 1px;
}

.timeline-item {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
  padding: 12px 0 12px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(184, 58, 75, 0.3);
}

.timeline-item + .timeline-item {
  border-top: 1px solid rgba(255,255,255,0.04);
}

.inline-link-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.timeline-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-head strong {
  font-size: 16px;
  color: var(--text);
}

.timeline-head .type-name {
  color: var(--text-secondary);
  font-size: 13px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.timeline-blurb {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.timeline-meta .chip {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
}

.timeline-meta .chip[data-tone="neutral"] {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.12);
  border-color: rgba(107, 114, 128, 0.18);
}

.timeline-meta .chip[data-tone="gold"] {
  color: #8a5a00;
  background: rgba(243, 205, 129, 0.2);
  border-color: rgba(227, 181, 87, 0.3);
}

.timeline-meta .chip.conf-high { color: var(--success); border-color: rgba(0,184,148,0.2); }
.timeline-meta .chip.conf-medium { color: var(--warning); border-color: rgba(253,203,110,0.2); }
.timeline-meta .chip.conf-low { color: var(--danger); border-color: rgba(225,112,85,0.2); }

.timeline-meta time {
  font-size: 11px;
  color: var(--text-muted);
}

/* Bottom sheet */
.sheet-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet-panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 70vh;
  overflow-y: auto;
}

.sheet-overlay.open + .sheet-panel,
.sheet-panel.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  margin: 0 auto 16px;
}

.sheet-panel h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.recharge-inline-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.recharge-quantity-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.recharge-quantity-sheet-kicker {
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recharge-quantity-sheet-copy {
  margin: -6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.recharge-quantity-sheet-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.recharge-quantity-stepper {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.recharge-quantity-stepper-btn {
  height: 52px;
  border: 1px solid rgba(21, 25, 34,0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  color: var(--text-primary);
  font-size: 28px;
  cursor: pointer;
}

.recharge-quantity-stepper-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.recharge-quantity-stepper-value {
  min-height: 52px;
  border-radius: 18px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(21, 25, 34,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.recharge-quantity-quick-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.recharge-quantity-chip {
  border: 1px solid rgba(21, 25, 34,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
}

.recharge-quantity-chip.active {
  background: rgba(59,104,255,0.1);
  border-color: rgba(59,104,255,0.22);
  color: var(--brand-primary);
}

.recharge-quantity-summary {
  margin: 18px 0 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(21, 25, 34,0.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.recharge-quantity-summary p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.recharge-quantity-total {
  font-size: 24px;
  letter-spacing: -0.02em;
}

/* Logout link */
/* MBTI Avatar system */
.mbti-avatar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
  letter-spacing: 0;
  border: 2px solid transparent;
  gap: 0;
  line-height: 1.1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24), 0 10px 22px rgba(21, 25, 34, 0.12);
}

.avatar-vip-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F8DF89 0%, #E0A340 100%);
  color: #3B1F00;
  font-size: 9px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  letter-spacing: 0;
  border: 1.5px solid var(--bg-base, #0a0a14);
  box-shadow: 0 0 6px rgba(248,223,137,0.55);
  pointer-events: none;
}

.mbti-avatar-md .avatar-vip-badge {
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  line-height: 16px;
  right: -3px;
  bottom: -3px;
}

.mbti-avatar-lg .avatar-vip-badge {
  min-width: 22px;
  height: 22px;
  font-size: 13px;
  line-height: 22px;
  right: -2px;
  bottom: -2px;
  border-width: 2px;
}
.avatar-main {
  display: block;
  max-width: 100%;
  color: rgba(255,255,255,0.96);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(21, 25, 34, 0.18);
}

.avatar-rank-number {
  display: block;
  color: rgba(255,255,255,0.94);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(21, 25, 34, 0.2);
}

/* 基础: 用石墨细边做普通认证，不抢人格组颜色。 */
.avatar-basic {
  border-color: rgba(20, 24, 32, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 1px rgba(255,255,255,0.14),
    0 8px 18px rgba(21,25,34,0.14);
}

.avatar-basic .avatar-main {
  opacity: 0.92;
  font-weight: 780;
}

/* 进阶: 银灰双层细边，保持克制但一眼能和基础区分。 */
.avatar-adv {
  border-color: rgba(244, 246, 248, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(16,19,26,0.24),
    0 0 0 1px rgba(20,24,32,0.66),
    0 0 0 3px rgba(220,225,230,0.68),
    0 12px 26px rgba(21,25,34,0.18);
}

.avatar-adv .avatar-main {
  color: #fff;
  font-weight: 950;
  text-shadow: 0 1px 2px rgba(21,25,34,0.32), 0 0 8px rgba(255,255,255,0.16);
}

.avatar-adv .avatar-rank-number {
  color: #fff;
  font-weight: 950;
  text-shadow: 0 1px 2px rgba(21,25,34,0.32), 0 0 8px rgba(255,255,255,0.16);
}

.mbti-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.mbti-avatar-sm .avatar-main {
  max-width: 30px;
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

.mbti-avatar-sm .avatar-rank-number {
  font-size: 13px;
  line-height: 0.95;
  margin-top: 2px;
}

.mbti-avatar-md {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.mbti-avatar-md .avatar-main {
  max-width: 36px;
  font-size: 9px;
}

.mbti-avatar-md .avatar-rank-number {
  font-size: 16px;
  margin-top: 2px;
}

.mbti-avatar-lg {
  width: 72px;
  height: 72px;
  border-width: 3px;
  border-radius: 22px;
}

.mbti-avatar-lg .avatar-main {
  max-width: 60px;
  font-size: 15px;
}

.mbti-avatar-lg .avatar-rank-number {
  font-size: 26px;
  margin-top: 3px;
}

.mbti-avatar.ring-basic {
  border-color: rgba(20, 24, 32, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 1px rgba(255,255,255,0.14),
    0 8px 18px rgba(21,25,34,0.14);
}

.mbti-avatar.ring-adv {
  border-color: rgba(244, 246, 248, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(16,19,26,0.24),
    0 0 0 1px rgba(20,24,32,0.66),
    0 0 0 3px rgba(220,225,230,0.68),
    0 12px 26px rgba(21,25,34,0.18);
}

.mbti-avatar.ring-gold {
  border-color: #F8DF89;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.34), 0 0 12px rgba(248,223,137,0.45), 0 14px 30px rgba(21,25,34,0.16);
}

.profile-section-title {
  padding: 18px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.logout-link {
  display: block;
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.logout-link:active {
  color: var(--danger);
}

/* Confirm dialog */
.confirm-dialog {
  text-align: center;
}

.confirm-dialog p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.confirm-dialog .actions {
  display: flex;
  gap: 10px;
}

.confirm-dialog .actions .btn {
  flex: 1;
}

.mbti-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: 'Avenir Next Condensed', 'DIN Alternate', 'PingFang SC', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  border: 1px solid transparent;
}

.tier-basic {
  color: #c4cad7;
  background: rgba(196, 202, 215, 0.12);
  border-color: rgba(196, 202, 215, 0.18);
}

.tier-advanced {
  color: #121212;
  background: linear-gradient(135deg, #f7f4ef, #d8d3cb);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.tier-gold {
  color: #5a3d00;
  background: linear-gradient(135deg, #f8df89, #cfa33f);
  border-color: rgba(248, 223, 137, 0.36);
  box-shadow: 0 10px 24px rgba(207, 163, 63, 0.24);
}

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

.admin-section-head h3 {
  font-size: 18px;
}

.admin-section-head p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-stat-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 4px;
}

.admin-stat-card span,
.admin-stat-card small {
  color: var(--text-secondary);
}

.admin-stat-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.admin-subsection {
  margin-top: 18px;
}

.admin-subsection-title {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.admin-inline-list,
.admin-log-list,
.admin-user-list {
  display: grid;
  gap: 10px;
}

.admin-inline-item,
.admin-log-item,
.admin-user-row {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-inline-item strong,
.admin-log-head strong,
.admin-user-head strong {
  display: block;
  font-size: 15px;
}

.admin-inline-item span,
.admin-log-meta,
.admin-user-meta {
  color: var(--text-secondary);
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-log-head,
.admin-user-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-log-meta,
.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 8px;
}

.admin-log-error {
  margin-top: 10px;
  color: #ffb0b0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-status-chip,
.admin-role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.admin-status-chip.is-success {
  color: #b9ffe8;
  background: rgba(0, 184, 148, 0.16);
}

.admin-status-chip.is-error {
  color: #ffd1c7;
  background: rgba(225, 112, 85, 0.16);
}

.admin-role-chip {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
}

.admin-role-chip.is-admin {
  color: #ffe7a5;
  background: rgba(253, 203, 110, 0.16);
}

.admin-user-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-user-row time {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.admin-user-sessions {
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.admin-user-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.admin-user-main {
  min-width: 0;
}

.admin-user-badge {
  min-height: 26px;
  padding: 5px 10px;
  font-size: 11px;
}

.admin-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-search-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.admin-search-row input:focus {
  border-color: var(--primary);
}

.admin-empty {
  margin-top: 16px;
  padding: 18px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.admin-tab-active {
  border-color: rgba(253, 203, 110, 0.42) !important;
  color: #ffe7a5 !important;
  background: rgba(253, 203, 110, 0.12) !important;
}

.admin-user-analysis-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 20, 33, 0.56);
  backdrop-filter: blur(16px);
}

.admin-user-analysis-modal {
  width: min(1240px, 100%);
  max-height: min(90vh, 920px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background:
    radial-gradient(circle at 12% 0%, rgba(184, 58, 75, 0.16), transparent 22%),
    radial-gradient(circle at 100% 0%, rgba(184, 58, 75, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.95));
  box-shadow: 0 36px 90px rgba(10, 18, 30, 0.34);
}

.admin-user-analysis-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-user-analysis-modal-headcopy {
  min-width: 0;
}

.admin-user-analysis-kicker {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-user-analysis-modal-headcopy h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.6px;
  color: var(--text);
}

.admin-user-analysis-modal-subtitle {
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.admin-user-analysis-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.admin-user-analysis-header-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(247, 250, 255, 0.82);
  border: 1px solid rgba(21, 25, 34, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.84);
}

.admin-user-analysis-header-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-user-analysis-header-title {
  min-width: 0;
}

.admin-user-analysis-header-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
}

.admin-user-analysis-header-title p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.admin-user-analysis-header-meta,
.admin-user-analysis-header-badges,
.admin-user-analysis-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-user-analysis-header-badges {
  align-items: center;
}

.admin-user-analysis-chip,
.admin-user-analysis-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(21, 25, 34, 0.1);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
}

.admin-user-analysis-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.admin-user-analysis-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  color: var(--text-secondary);
  border: 1px solid rgba(21, 25, 34, 0.12);
  white-space: nowrap;
}

.admin-user-analysis-tab em {
  font-style: normal;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.08);
  color: var(--primary-strong);
  font-size: 11px;
}

.admin-user-analysis-tab.is-active {
  border-color: rgba(184, 58, 75, 0.3) !important;
  background: rgba(184, 58, 75, 0.12) !important;
  color: var(--primary-strong) !important;
}

.admin-user-analysis-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(290px, 320px) minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
}

.admin-user-analysis-history,
.admin-user-analysis-detail {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.admin-user-analysis-history {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.admin-user-analysis-history-headline {
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(21, 25, 34, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.admin-user-analysis-history-list {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.admin-user-analysis-history-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(247, 250, 255, 0.92);
  color: var(--text);
}

.admin-user-analysis-history-item.is-active {
  border-color: rgba(184, 58, 75, 0.26);
  background: rgba(184, 58, 75, 0.08);
}

.admin-user-analysis-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-user-analysis-history-head strong {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}

.admin-user-analysis-history-head time {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
}

.admin-user-analysis-history-subtitle {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.admin-user-analysis-detail {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.admin-user-analysis-detail-switch {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.08);
  border: 1px solid rgba(184, 58, 75, 0.08);
}

.admin-user-analysis-detail-switch-btn {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
}

.admin-user-analysis-detail-switch-btn.is-active {
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 8px 18px rgba(184, 58, 75, 0.12);
}

.admin-user-analysis-preview-shell {
  display: grid;
  gap: 10px;
  min-height: 100%;
}

.admin-user-analysis-preview-note,
.admin-preview-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(184, 58, 75, 0.12);
  background: rgba(184, 58, 75, 0.08);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
}

.admin-preview-notice {
  margin-top: 8px;
}

.admin-user-analysis-preview-frame {
  width: 100%;
  min-height: 980px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  border-radius: 18px;
  background: #fff;
}

.admin-user-analysis-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(21, 25, 34, 0.08);
}

.admin-user-analysis-detail-head h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  color: var(--text);
}

.admin-user-analysis-detail-head p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.admin-user-analysis-detail-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--text-muted);
  font-size: 11px;
}

.admin-user-analysis-section {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  background: rgba(255,255,255,0.78);
}

.admin-user-analysis-section-head h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  color: var(--text);
}

.admin-user-analysis-section-body {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.admin-user-analysis-kv-grid,
.admin-user-analysis-list,
.admin-user-analysis-stack {
  display: grid;
  gap: 10px;
}

.admin-user-analysis-kv-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-user-analysis-kv-item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  background: rgba(247, 250, 255, 0.86);
}

.admin-user-analysis-kv-label {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.admin-user-analysis-kv-value {
  min-width: 0;
  color: var(--text);
}

.admin-user-analysis-tag-list-tight {
  margin-bottom: 12px;
}

.admin-user-analysis-tag {
  background: rgba(184, 58, 75, 0.08);
  color: var(--primary-strong);
}

.admin-user-analysis-empty,
.admin-user-analysis-empty-inline {
  color: var(--text-muted);
}

.admin-user-analysis-empty {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(21, 25, 34, 0.12);
  background: rgba(247, 250, 255, 0.7);
  font-size: 13px;
}

.admin-user-analysis-empty-inline {
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
}

.admin-user-analysis-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  background: rgba(247, 250, 255, 0.88);
}

.admin-user-analysis-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-user-analysis-card-head strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.admin-user-analysis-card-meta {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.admin-user-analysis-card-copy {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.admin-user-analysis-loading,
.admin-user-analysis-empty-state {
  min-height: 320px;
  display: grid;
  place-items: center;
}

.admin-user-analysis-loading .loading {
  margin: 0;
  color: var(--text-secondary);
}

body.admin-preview-mode .topbar-actions {
  display: none !important;
}

.admin-user-share-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 10055;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 20, 33, 0.56);
  backdrop-filter: blur(16px);
}

.admin-user-share-card-modal {
  width: min(900px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background:
    radial-gradient(circle at 12% 0%, rgba(184, 58, 75, 0.16), transparent 22%),
    radial-gradient(circle at 100% 0%, rgba(184, 58, 75, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.95));
  box-shadow: 0 36px 90px rgba(10, 18, 30, 0.34);
}

.admin-user-share-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-user-share-card-headcopy {
  min-width: 0;
}

.admin-user-share-card-headcopy h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.6px;
  color: var(--text);
}

.admin-user-share-card-subtitle {
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.admin-user-share-card-summary {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(247, 250, 255, 0.82);
  border: 1px solid rgba(21, 25, 34, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.84);
}

.admin-user-share-card-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.admin-user-share-card-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-user-share-card-meta-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  background: rgba(255,255,255,0.78);
}

.admin-user-share-card-meta-item span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-user-share-card-meta-item strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.admin-user-share-card-note {
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(184, 58, 75, 0.08);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}

.admin-user-share-card-note.is-error {
  background: rgba(255, 107, 107, 0.1);
  color: #a13535;
}

.admin-user-share-card-body {
  display: grid;
  gap: 12px;
}

.admin-user-share-card-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  background: rgba(255,255,255,0.78);
}

.admin-user-share-card-section-head {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-user-share-card-copy {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.admin-user-share-card-copy.is-headline {
  font-size: 19px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.admin-user-share-card-empty,
.admin-user-share-card-loading {
  min-height: 260px;
  display: grid;
  place-items: center;
}

.admin-user-share-card-empty-inline {
  color: var(--text-muted);
  font-size: 12px;
}

.admin-user-share-card-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-user-share-card-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.admin-user-share-card-status.is-success {
  background: rgba(81, 207, 167, 0.18);
  color: #106d4a;
}

.admin-user-share-card-status.is-pending {
  background: rgba(255, 189, 89, 0.2);
  color: #8a5a00;
}

.admin-user-share-card-status.is-error,
.admin-user-share-card-status.is-disabled,
.admin-user-share-card-status.is-missing {
  background: rgba(120, 139, 177, 0.14);
  color: var(--text-secondary);
}

.admin-question-bank-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 16px;
}

.admin-question-sidebar,
.admin-question-editor,
.admin-question-aside {
  min-width: 0;
  display: grid;
  gap: 16px;
  align-content: start;
}

.admin-qb-search-row {
  margin-bottom: 10px;
}

.admin-qb-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.admin-qb-select {
  min-width: 132px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
}

.admin-qb-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.admin-qb-list-item {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.admin-qb-list-item.is-active {
  border-color: rgba(253, 203, 110, 0.28);
  background: rgba(253, 203, 110, 0.08);
}

.admin-qb-list-top,
.admin-qb-list-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-qb-list-top strong {
  font-size: 14px;
}

.admin-qb-list-meta {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-qb-list-bottom {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.admin-qb-editor-card,
.admin-qb-weight-block {
  min-width: 0;
}

.admin-qb-form-grid,
.admin-qb-weight-block {
  display: grid;
  gap: 14px;
}

.admin-qb-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-qb-field {
  display: grid;
  gap: 8px;
}

.admin-qb-field span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.admin-qb-field input,
.admin-qb-field textarea,
.admin-qb-field select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.admin-qb-field textarea {
  resize: vertical;
  min-height: 84px;
}

.admin-qb-field input:focus,
.admin-qb-field textarea:focus,
.admin-qb-field select:focus {
  border-color: var(--primary);
}

.admin-weight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-qb-weight-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-qb-diff-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-qb-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-qb-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-qb-count-chip {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 4px;
}

.admin-qb-count-chip strong {
  font-size: 13px;
}

.admin-qb-count-chip span,
.admin-qb-count-chip small {
  color: var(--text-secondary);
}

.admin-qb-count-chip span {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.admin-qb-count-chip.is-warning {
  border-color: rgba(253, 203, 110, 0.28);
  background: rgba(253, 203, 110, 0.08);
}

.admin-qb-validation-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-qb-validation {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.admin-qb-validation.is-ok {
  color: #b9ffe8;
  background: rgba(0, 184, 148, 0.12);
  border: 1px solid rgba(0, 184, 148, 0.18);
}

.admin-qb-validation.is-error {
  color: #ffd1c7;
  background: rgba(225, 112, 85, 0.12);
  border: 1px solid rgba(225, 112, 85, 0.16);
}

.admin-qb-release-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 12px;
}

.admin-qb-diff-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 12px;
}

.admin-qb-diff-note {
  margin-top: -4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.admin-qb-diff-section {
  display: grid;
  gap: 8px;
}

.admin-qb-diff-rows {
  display: grid;
  gap: 8px;
}

.admin-qb-diff-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.admin-qb-diff-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding-top: 4px;
}

.admin-qb-diff-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.admin-qb-diff-value {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-qb-diff-value.is-before {
  color: var(--text-secondary);
}

.admin-qb-diff-value.is-after {
  border-color: rgba(184, 58, 75, 0.22);
  background: rgba(184, 58, 75, 0.08);
}

.admin-qb-diff-arrow {
  color: var(--text-muted);
  font-size: 12px;
  padding-top: 10px;
}

.admin-qb-diff-row.is-multiline .admin-qb-diff-label {
  padding-top: 10px;
}

@media (max-width: 420px) {
  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-search-row {
    flex-direction: column;
  }

  .admin-search-row .btn {
    width: 100% !important;
  }

  .admin-user-row {
    flex-direction: column;
  }
}

@media (max-width: 1100px) {
  .admin-question-bank-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-qb-meta-grid,
  .admin-weight-grid,
  .admin-qb-summary-grid,
  .admin-qb-weight-dual,
  .admin-qb-actions {
    grid-template-columns: 1fr;
  }

  .admin-qb-diff-row {
    grid-template-columns: 1fr;
  }

  .admin-qb-diff-values {
    grid-template-columns: 1fr;
  }

  .admin-qb-diff-arrow {
    padding-top: 0;
  }
}

.result-ai-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(21, 25, 34, 0.18);
  background:
    radial-gradient(circle at top right, rgba(21, 25, 34, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    var(--bg-card);
  min-width: 0;
}

.result-ai-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.14);
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.result-ai-card h3 {
  margin-top: 0;
  font-size: 20px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-ai-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  min-width: 0;
}

.result-ai-block {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  min-width: 0;
}

.result-ai-block.is-growth {
  border-color: rgba(253, 203, 110, 0.16);
  background: rgba(253, 203, 110, 0.05);
}

.result-ai-block span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.result-ai-block p {
  margin-top: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.68;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.share-card-panel {
  padding: 16px;
}

.app-shell-premium .premium-hero,
.vip-plan-card,
.legacy-bridge-card,
.type-detail-card,
.match-detail-header,
.app-shell-assessment .test-brief {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.97), rgba(246,250,255,0.9)),
    var(--bg-card);
  border: 1px solid rgba(21, 25, 34, 0.1);
  box-shadow: 0 20px 46px rgba(21, 25, 34, 0.12);
}

.premium-hero {
  padding: 28px 24px;
  text-align: left;
  margin-bottom: 20px;
}

.premium-hero h2 {
  margin-top: 14px;
  font-size: 30px;
  line-height: 1.15;
}

.premium-hero p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.app-shell-premium .vip-plan-card.popular {
  border-color: rgba(184, 58, 75,0.28);
  box-shadow: 0 24px 52px rgba(34, 86, 196, 0.16);
}

.app-shell-premium .vip-features {
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(21, 25, 34, 0.1);
  box-shadow: 0 18px 40px rgba(21, 25, 34, 0.08);
}

.app-shell .universe-group {
  border: 1px solid color-mix(in srgb, var(--group-color) 24%, rgba(21, 25, 34, 0.08));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--group-color) 14%, transparent), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,247,241,0.9));
  box-shadow: 0 20px 44px rgba(21, 25, 34, 0.08);
}

.app-shell .group-type-card {
  border: 1px solid rgba(21, 25, 34, 0.08);
  background: rgba(255,255,255,0.76);
}

.app-shell .group-type-card:hover,
.app-shell .group-type-card.active {
  background: color-mix(in srgb, var(--group-color) 10%, rgba(255,255,255,0.84));
}

.app-shell-assessment .question-card,
.app-shell-assessment .test-status-card,
.app-shell-assessment .test-brief,
.app-shell-report .result-ai-card,
.app-shell-report .share-card-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.94)),
    var(--bg-card);
  border: 1px solid rgba(21, 25, 34, 0.1);
  box-shadow: 0 18px 42px rgba(21, 25, 34, 0.1);
}

.assessment-topbar,
.app-shell-report .app-topbar {
  margin-bottom: 16px;
}

.share-card-preview-wrap {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.share-card-preview {
  width: 100%;
  height: auto;
}

.share-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.share-card-meta strong {
  display: block;
  font-size: 16px;
}

.share-card-meta p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.share-card-tier {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.share-card-caption {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.mbti-share-hero {
  display: grid;
  gap: 12px;
  padding: 24px 22px;
  background:
    radial-gradient(circle at top left, rgba(184, 58, 75, 0.12), transparent 36%),
    radial-gradient(circle at bottom right, rgba(255, 132, 168, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,255,0.94));
  border: 1px solid rgba(21, 25, 34, 0.1);
  box-shadow: 0 18px 42px rgba(21, 25, 34, 0.1);
}

.mbti-share-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.mbti-share-hero .type-badge-lg {
  margin: 0;
  padding: 12px 22px;
  border-radius: 18px;
  font-size: 38px;
  box-shadow: 0 16px 30px rgba(184, 58, 75, 0.16);
}

.mbti-share-hero-type-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.06);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.mbti-share-hero-headline {
  margin: 0;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.18;
  text-align: center;
  color: var(--text);
  letter-spacing: 0;
}

.mbti-share-hero-subcopy,
.mbti-share-hero-bridge {
  margin: 0;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.65;
}

.mbti-share-hero-subcopy {
  font-size: 15px;
}

.mbti-share-hero-bridge {
  font-size: 13px;
  color: var(--text-muted);
}

.mbti-share-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.mbti-share-hero-tag {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.mbti-share-hero-actions {
  justify-content: center;
}

.mbti-result-identity-card .type-badge-lg {
  margin-top: 0;
}

.mbti-share-poster-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.94)),
    var(--bg-card);
}

.mbti-share-poster-intro {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.mbti-share-poster-preview-wrap {
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(184, 58, 75, 0.12), transparent 34%),
    rgba(21, 25, 34, 0.96);
  border: 1px solid rgba(216, 209, 199, 0.16);
}

.mbti-share-poster-meta {
  align-items: flex-start;
}

.mbti-share-poster-badge {
  background: rgba(184, 58, 75, 0.08);
  color: var(--primary);
}

.mbti-share-poster-caption {
  margin-top: 12px;
}

.mbti-share-poster-hint {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 420px) {
  .container {
    padding: 0 14px;
  }

  .card {
    padding: 18px 16px;
  }

  .app-topbar {
    gap: 12px;
  }

  .app-topbar h1 {
    font-size: 28px;
  }

  .mbti-share-hero {
    gap: 10px;
    padding: 18px 16px;
  }

  .mbti-share-hero-headline {
    font-size: 26px;
  }

  .mbti-share-hero .type-badge-lg {
    padding: 10px 18px;
    font-size: 34px;
  }

  .mbti-share-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .home-summary-actions .btn {
    width: 100%;
  }

  .home-summary-actions.mbti-share-hero-actions .btn {
    width: 100%;
    padding: 9px 10px;
  }

  .home-summary-actions.mbti-share-hero-actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .intimacy-subdimension-preview-head {
    display: grid;
    gap: 2px;
  }

  .type-badge-lg {
    font-size: 38px;
    padding: 16px 20px;
    margin: 16px 0;
  }

  .result-ai-card h3 {
    font-size: 18px;
  }

  .result-ai-block {
    padding: 13px 14px;
  }

  .result-ai-block span {
    font-size: 11px;
    letter-spacing: 0.3px;
  }

  .result-ai-block p {
    font-size: 13px;
  }

  .share-card-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .mbti-share-poster-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 340px) {
  .intimacy-parent-dimension-grid,
  .intimacy-subdimension-grid {
    grid-template-columns: 1fr;
  }
}

/* Inline search bar */
.search-bar-inline {
  margin-bottom: 14px;
}

.search-bar-inline input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.search-bar-inline input:focus {
  border-color: var(--primary);
}

/* Sub-section title */
.sub-section-title {
  padding: 12px 16px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ─── Type Lab (类型实验室) ─── */

.lab-topic-card {
  padding: 20px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  margin-bottom: 14px;
}

.lab-topic-current {
  border-color: rgba(21, 25, 34, 0.25);
  background:
    radial-gradient(circle at top right, rgba(184, 58, 75,0.1), transparent 50%),
    rgba(255,255,255,0.03);
}

.lab-topic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.lab-topic-title {
  font-size: 17px;
  font-weight: 700;
  margin-top: 6px;
}

.lab-topic-title-main {
  font-size: 18px;
  line-height: 1.45;
  margin-top: 0;
}

.lab-vote-count {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lab-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.lab-badge-active {
  background: rgba(0,184,148,0.15);
  color: var(--success);
}

.lab-badge-closed {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}

.lab-past-title {
  padding: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.lab-scenario {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(184, 58, 75,0.06);
  border: 1px solid rgba(21, 25, 34,0.1);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 14px;
}

.lab-scenario-sm {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.lab-no-type {
  text-align: center;
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.lab-no-type .btn { margin-top: 8px; }

.lab-freetext {
  position: relative;
  margin-bottom: 14px;
}

.lab-freetext input {
  width: 100%;
  padding: 12px 14px;
  padding-right: 50px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.lab-freetext input:focus {
  border-color: var(--primary);
}

.lab-charcount {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-muted);
}

.lab-options {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.lab-options-compact {
  margin-bottom: 10px;
}

.lab-distribution-track {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.lab-option-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.lab-option-btn:active {
  transform: scale(0.98);
}

.lab-option-fill-track {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  display: flex;
  border-radius: inherit;
  opacity: 0.18;
  pointer-events: none;
  overflow: hidden;
}

.lab-option-fill-seg {
  display: block;
  height: 100%;
}

.lab-option-btn.selected {
  border-color: rgba(21, 25, 34, 0.4);
  box-shadow: 0 0 0 1px rgba(21, 25, 34,0.12);
}

.lab-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.practice-option-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.practice-option-btn.selected {
  border-color: rgba(21, 25, 34,0.55);
  background: linear-gradient(135deg, rgba(184, 58, 75,0.18), rgba(184, 58, 75,0.06));
  box-shadow: 0 0 0 1px rgba(21, 25, 34,0.12);
  color: #fff;
}

.lab-option-text {
  flex: 1;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.lab-submit {
  margin-top: 4px;
}

.lab-submit .btn {
  width: 100%;
}

.lab-my-freetext {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  font-size: 13px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.lab-bar-empty {
  background: rgba(255,255,255,0.04);
}

.lab-type-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.lab-type-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lab-type-chip.active {
  background: rgba(184, 58, 75,0.15);
  border-color: rgba(21, 25, 34,0.3);
  color: var(--text);
}

.lab-resp-type-header {
  padding: 10px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.lab-response-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}

.lab-resp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
  cursor: pointer;
}

.lab-resp-avatar.cert-0 { background: linear-gradient(135deg, #555, #777); }
.lab-resp-avatar.cert-1 { background: linear-gradient(135deg, #515a68, #151922); }
.lab-resp-avatar.cert-2 { background: linear-gradient(135deg, #b83a4b, #8f2c3a); }
.lab-resp-avatar.cert-3 { background: linear-gradient(135deg, #F8DF89, #CFA33F); color: #3d2800; }

.lab-resp-body {
  flex: 1;
  min-width: 0;
}

.lab-resp-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lab-resp-meta strong {
  font-size: 13px;
}

.lab-option-letter-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
}

.lab-resp-text {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

/* Topic actions: like + comment */
.lab-actions {
  display: flex;
  gap: 16px;
  padding: 8px 0 12px;
}

.lab-like-btn,
.lab-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lab-like-btn.liked {
  color: var(--accent);
}

/* Comment area */
.lab-panel-empty {
  padding: 16px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 13px;
}

.lab-chart-area-compact {
  margin-top: 0;
}

.lab-comment-area {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 12px;
  margin-bottom: 14px;
}

.lab-comment-area-inline {
  border-top: 0;
  padding-top: 0;
  margin-bottom: 0;
}

.lab-comment-preview {
  min-height: 18px;
}

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

.lab-comment-add {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.lab-comment-input {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.lab-comment-input input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.lab-comment-input input:focus {
  border-color: var(--primary);
}

.lab-comments-preview-note {
  font-size: 11px;
  color: var(--text-muted);
}

.lab-comment-item {
  display: flex;
  gap: 8px;
  padding: 6px 0;
}

.lab-comment-body {
  flex: 1;
  min-width: 0;
}

.lab-comment-text {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

/* === Match Detail === */
#compatPane {
  padding-bottom: 18px;
}

#compatDetail,
#compatFriendDetail {
  margin-top: 10px;
}

.compat-divider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
}

.compat-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.compat-divider-text {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.compat-subtabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  background: var(--bg-secondary);
  border: 1px solid rgba(21, 25, 34, 0.08);
  border-radius: 16px;
  padding: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.compat-subtab {
  flex: 1;
  padding: 7px 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.compat-subtab.active {
  background: rgba(184, 58, 75, 0.1);
  color: var(--primary-strong);
}

.inline-dims,
.inline-analysis {
  margin-top: 10px;
}

.compat-structure {
  display: grid;
  gap: 18px;
}

.compat-subsection {
  display: grid;
  gap: 10px;
}

.compat-subsection + .compat-subsection {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

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

.compat-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compat-score-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
}

.compat-score-chip.is-personality { color: #a5f3fc; border-color: rgba(69, 211, 239, 0.32); background: rgba(69, 211, 239, 0.12); }
.compat-score-chip.is-desire { color: #d36a7a; border-color: rgba(184, 58, 75, 0.34); background: rgba(184, 58, 75, 0.14); }
.compat-score-chip.is-direction { color: #62666f; border-color: rgba(21, 25, 34, 0.36); background: rgba(184, 58, 75, 0.16); }
.compat-score-chip.is-attraction { color: #ffd8b3; border-color: rgba(255, 190, 85, 0.32); background: rgba(255, 190, 85, 0.12); }
.compat-score-chip.is-alignment { color: #b7ffd6; border-color: rgba(65, 217, 166, 0.34); background: rgba(65, 217, 166, 0.12); }

.compat-dynamic-tags {
  margin-top: 6px;
}

.compat-dynamic-tag {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
}

.dual-dim-row {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 10px 12px;
}

.dual-dim-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.dual-dim-meaning {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.dual-dim-metrics {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dual-dim-metrics span {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-input);
}

.dual-dim-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--primary);
  opacity: 0.7;
  padding-left: 10px;
  border-left: 2px solid var(--primary-light);
}

.compat-gender-gate h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.compat-gender-gate p {
  color: var(--text-secondary);
  font-size: 14px;
}

.compat-gender-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.compat-gender-actions .btn {
  flex: 1;
}

.compat-gender-muted {
  text-align: center;
  padding: 12px;
}

.match-detail-header { text-align: center; }

.match-detail-user { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.match-detail-user-info { text-align: left; flex: 1; min-width: 0; }
.match-detail-user-info strong { font-size: 18px; display: block; }
.match-detail-type { color: var(--text-muted); font-size: 13px; }
.match-detail-bio { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-detail-score-row { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 12px 0 8px; }
.match-detail-total { font-size: 48px; font-weight: 800; }
.match-detail-rel { font-size: 18px; font-weight: 600; }
.match-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.match-detail-tag { background: rgba(255,255,255,0.06); border-radius: 20px; padding: 4px 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.match-detail-tag small { color: var(--text-muted); font-size: 11px; }
.match-detail-summary { color: var(--text-muted); font-size: 14px; margin-top: 12px; line-height: 1.6; }
.match-detail-actions { display: flex; gap: 10px; padding: 0 0 24px; }
.match-detail-actions .btn { flex: 1; }

.relationship-result-card {
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.relationship-section-card {
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 0%, rgba(196, 58, 88, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,247,243,0.94));
  border: 1px solid rgba(21, 25, 34, 0.08);
  box-shadow: 0 14px 36px rgba(21, 25, 34, 0.06);
}

.relationship-pair-hero {
  position: relative;
  overflow: hidden;
  padding: 20px 16px 18px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 28%, rgba(196, 58, 88, 0.10), transparent 28%),
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.9), transparent 48%),
    linear-gradient(180deg, #ffffff, #f7f7f2);
  border: 1px solid rgba(21, 25, 34, 0.1);
  box-shadow: 0 18px 48px rgba(21, 25, 34, 0.1);
}

.relationship-pair-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(21,25,34,0.18) 1px, transparent 1px),
    linear-gradient(rgba(21,25,34,0.18) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 34%, black, transparent 66%);
}

.relationship-pair-axis {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.relationship-connection-line {
  position: absolute;
  left: 76px;
  right: 76px;
  top: 43px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(21,25,34,0), rgba(21,25,34,0.54), rgba(196,58,88,0.66), rgba(196,58,88,0));
  box-shadow: 0 5px 18px rgba(196, 58, 88, 0.11);
}

.relationship-pair-person {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  min-width: 0;
}

.relationship-pair-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #fff;
  background: linear-gradient(145deg, #1d2430, #5f646c);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.26),
    inset 0 -8px 16px rgba(21,25,34,0.16),
    0 12px 26px rgba(21,25,34,0.16);
}

.relationship-pair-person.is-target .relationship-pair-avatar {
  background: linear-gradient(145deg, #a8324e, #d9798f);
}

.relationship-pair-avatar strong {
  font-size: 20px;
  line-height: 1;
}

.relationship-pair-avatar span {
  font-size: 10px;
  font-weight: 800;
  opacity: .84;
}

.relationship-pair-person b {
  display: block;
  max-width: 100%;
  margin-top: 9px;
  color: #151922;
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relationship-pair-person small {
  margin-top: 4px;
  color: #6e7785;
  font-size: 11px;
  font-weight: 740;
}

.relationship-match-ring {
  position: relative;
  z-index: 3;
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
}

.relationship-match-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255,255,255,0.99) 0 51%, transparent 52%),
    conic-gradient(from 218deg, #151922 0deg, #515a68 86deg, #c43a58 176deg, #d9d4ca 264deg, #151922 360deg);
  box-shadow:
    0 20px 44px rgba(21,25,34,0.16),
    0 10px 26px rgba(196,58,88,0.11),
    inset 0 1px 1px rgba(255,255,255,0.58);
}

.relationship-match-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.74);
  box-shadow:
    inset 0 12px 22px rgba(21,25,34,0.08),
    0 0 0 1px rgba(21,25,34,0.04);
}

.relationship-match-core {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff, #f4f3ef);
  box-shadow:
    inset 0 0 0 1px rgba(21,25,34,0.06),
    inset 0 -8px 18px rgba(21,25,34,0.04);
}

.relationship-match-core strong {
  display: block;
  color: #151922;
  font-size: 31px;
  line-height: 1;
}

.relationship-match-core span {
  display: block;
  margin-top: 5px;
  color: #68707d;
  font-size: 10px;
  font-weight: 850;
}

.relationship-pair-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin-top: 15px;
  text-align: center;
}

.relationship-pair-copy h2 {
  margin: 0;
  color: #151922;
  font-size: 22px;
  line-height: 1.2;
}

.relationship-pair-copy p {
  max-width: 560px;
  margin: 0 auto;
  color: #5e6673;
  font-size: 13px;
  line-height: 1.66;
}

.relationship-signal-tags {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.relationship-signal-tag {
  display: grid;
  align-content: center;
  min-height: 52px;
  padding: 9px 8px;
  border-radius: 8px;
  text-align: center;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(21,25,34,0.09);
  box-shadow: 0 8px 20px rgba(21,25,34,0.05);
}

.relationship-signal-tag b {
  color: #151922;
  font-size: 13px;
  line-height: 1.2;
}

.relationship-signal-tag.is-accent b {
  color: #c43a58;
}

.relationship-signal-tag small {
  margin-top: 5px;
  color: #6e7785;
  font-size: 10px;
  font-weight: 760;
}

.relationship-hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.relationship-hero-actions .btn {
  width: auto;
}

.relationship-compat-structure {
  gap: 16px;
}

.relationship-compat-structure .compat-subsection {
  border-radius: 8px;
  padding: 14px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(21,25,34,0.06);
}

.relationship-compat-structure .compat-subsection + .compat-subsection {
  padding-top: 14px;
  border-top: 1px solid rgba(21,25,34,0.06);
}

.relationship-compat-structure .dual-dim-row {
  border-radius: 8px;
  border-color: rgba(21,25,34,0.08);
  background: rgba(248,248,245,0.92);
}

/* Dimension bars */
.dim-row { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.dim-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.dim-label { font-size: 13px; width: 72px; flex-shrink: 0; }
.dim-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.dim-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.dim-score { font-size: 14px; font-weight: 700; width: 28px; text-align: right; flex-shrink: 0; }

/* Daily match rare tags */
.daily-match-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.daily-match-tag { background: rgba(255,255,255,0.06); border-radius: 16px; padding: 2px 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.daily-match-tag small { color: var(--text-muted); font-size: 10px; }

/* Compatibility user picker */
.match-detail-tag {
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(21, 25, 34, 0.08);
}

.compat-user-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.42);
  font: inherit;
  color: inherit;
  text-align: left;
}

.compat-user-item:hover,
.compat-user-item.active {
  background: rgba(184, 58, 75, 0.08);
  border-color: rgba(184, 58, 75, 0.1);
}
.compat-user-item:focus-visible {
  outline: none;
  border-color: rgba(184, 58, 75, 0.38);
  box-shadow: 0 0 0 3px rgba(184, 58, 75, 0.14);
}
.compat-user-name { flex: 1; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; min-width: 0; }
.compat-user-type { color: var(--text-muted); font-size: 13px; }
.compat-user-arrow { color: var(--text-muted); font-size: 18px; line-height: 1; }
.compat-user-item.active .compat-user-arrow { color: var(--primary); }

/* ── Compat vertical layout（上选择 sticky + 下详情滚动） ── */
.compat-vertical {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
  min-height: 320px;
}

.compat-vertical-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 8px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.compat-vertical-head .compat-side-label {
  margin-bottom: 0;
  white-space: nowrap;
}

.compat-vertical-head .compat-friend-select {
  flex: 1;
  min-width: 0;
}

.compat-vertical-head .compat-side-count {
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-muted);
}

.compat-vertical-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

/* 好友下拉选择框 */
.compat-side-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding-left: 2px;
}
.compat-friend-select {
  width: 100%;
  padding: 8px 28px 8px 12px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path fill='%238b97aa' d='M5 7L1 3h8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.compat-friend-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 58, 75, 0.12);
}
.compat-friend-select:disabled {
  background-color: rgba(0,0,0,0.04);
  color: var(--text-muted);
  cursor: not-allowed;
}
.compat-side-count {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.compat-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

#compatFriendDetail, #compatDetail {
  padding: 0 2px 8px;
}

/* 今日匹配紧凑卡（左栏） */
.daily-match-compact {
  padding: 12px 10px;
}
.daily-match-compact .daily-match-body {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.daily-match-compact .daily-match-info {
  align-items: center;
  min-width: 0;
  width: 100%;
}
.daily-match-compact .daily-match-info strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.daily-match-compact .daily-match-type {
  font-size: 11px;
}
.daily-match-compact .daily-match-actions {
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.daily-match-compact .daily-match-actions .btn {
  width: 100%;
}
.daily-match-skip-empty {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 0;
}
.daily-match-missing {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* 桌面端 */
@media (min-width: 768px) {
  .compat-vertical {
    max-height: calc(100vh - 200px);
  }
}

.compat-gender-gate h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.compat-gender-gate p {
  color: var(--text-secondary);
  font-size: 14px;
}

.compat-gender-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.compat-gender-actions .btn {
  flex: 1;
}

/* ── Community Filter Chips ── */
.community-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.community-filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip.active {
  background: linear-gradient(135deg, rgba(184, 58, 75,0.28), rgba(184, 58, 75,0.08));
  border-color: rgba(21, 25, 34,0.3);
  color: var(--text);
}

.community-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
}

.community-filter-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-filter-clear {
  padding: 4px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

.community-filter-dropdown {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}

.filter-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.filter-type-option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.filter-type-option input { display: none; }

.filter-type-option.checked {
  background: rgba(184, 58, 75,0.15);
  border-color: rgba(21, 25, 34,0.3);
  color: var(--text);
}

/* ── Lab Enhancements ── */
.lab-prediction-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(184, 58, 75, 0.08);
  font-size: 13px;
  color: var(--primary-light, #b83a4b);
  margin-top: 10px;
}
.lab-prediction-icon { font-size: 16px; }
.lab-freetext-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border);
  background: var(--bg-input, rgba(255,255,255,0.05));
  color: var(--text);
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.lab-freetext-input::placeholder { color: var(--text-muted); }

/* ── VIP Lock Card ── */
.vip-lock-card {
  display: grid;
  gap: 10px;
}

.vip-lock-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vip-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.1);
  border: 1px solid rgba(184, 58, 75, 0.22);
  color: var(--primary-light, #b83a4b);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.vip-lock-copy {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.full-report-preview {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(21, 25, 34, 0.1);
}

.full-report-preview-title {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.full-report-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.full-report-preview-item {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.08);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

/* ── Report Lock Overlay ── */
.vip-lock-overlay {
  position: relative;
  cursor: default;
  overflow: hidden;
  border: 1px solid rgba(184, 58, 75, 0.14);
  background:
    radial-gradient(circle at top left, rgba(184, 58, 75, 0.16), transparent 52%),
    radial-gradient(circle at bottom right, rgba(216, 209, 199, 0.12), transparent 48%),
    rgba(21, 25, 34, 0.72);
}
.vip-lock-overlay::after {
  content: '完整报告';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 26, 0.36);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius, 12px);
  color: var(--primary-light, #b83a4b);
  font-size: 14px;
  font-weight: 600;
  z-index: 2;
}

/* ── VIP Page ── */
.vip-hero { text-align: center; padding: 32px 0 24px; }
.vip-hero h1 { font-size: 28px; margin-bottom: 8px; }
.vip-hero p { color: var(--text-secondary); font-size: 15px; }

.vip-plans { display: flex; gap: 12px; margin: 24px 0; }
.vip-plan-card {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius, 12px);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.2s;
  cursor: pointer;
}
.vip-plan-card.popular {
  border-color: var(--primary, #6b4eff);
  background: rgba(184, 58, 75, 0.06);
}
.vip-plan-card .plan-badge {
  display: inline-block;
  background: var(--primary, #6b4eff);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.vip-plan-card .plan-price {
  font-size: 32px;
  font-weight: 800;
  margin: 8px 0 4px;
}
.vip-plan-card .plan-price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}
.vip-plan-card .plan-period {
  color: var(--text-muted);
  font-size: 13px;
}

.vip-features {
  margin: 24px 0;
}
.vip-features h3 {
  font-size: 16px;
  margin-bottom: 12px;
}
.vip-feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.vip-feature-row .feature-icon { font-size: 20px; width: 28px; text-align: center; }
.vip-feature-row .feature-text { flex: 1; font-size: 14px; }
.vip-feature-row .feature-free { color: var(--text-muted); font-size: 13px; width: 60px; text-align: center; }
.vip-feature-row .feature-vip { color: var(--primary-light, #b83a4b); font-size: 13px; width: 60px; text-align: center; font-weight: 600; }

/* Rank pages */
.rank-board-shell {
  display: grid;
  gap: 12px;
}

.rank-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}

.rank-hero-copy { min-width: 0; }
.rank-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-light);
}
.rank-hero-title {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.2;
}
.rank-hero-subtitle {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.rank-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
  align-items: start;
}

.rank-column { display: grid; gap: 16px; }
.rank-main-column { min-width: 0; }

.rank-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.rank-section-head h3 { font-size: 18px; line-height: 1.25; }
.rank-section-sub { color: var(--text-muted); font-size: 12px; }

.rank-board-group { margin-top: 14px; }
.rank-group-title {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.rank-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.rank-board-grid-home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.rank-total-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.rank-board-stack {
  display: grid;
  gap: 6px;
}
.rank-home-column { min-width: 0; }
.rank-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.rank-section-title strong {
  color: var(--text);
  font-size: 15px;
}
.rank-section-title span {
  font-size: 11px;
  color: var(--text-muted);
}

.rank-board-card {
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.62);
  cursor: pointer;
}
.rank-board-card.active {
  border-color: rgba(184, 58, 75, 0.34);
  box-shadow: 0 18px 32px rgba(21, 25, 34, 0.08);
}
.rank-board-card-head,
.rank-board-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.rank-board-card-head strong { font-size: 14px; }
.rank-board-card-meta {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.rank-board-meta-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.rank-home-card {
  cursor: default;
}
.rank-mini-card {
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
}
.rank-mini-card.rank-total-card {
  border-color: rgba(184, 58, 75, 0.18);
  background: linear-gradient(135deg, rgba(184, 58, 75,0.1), rgba(255,255,255,0.76));
}
.rank-mini-card .rank-board-card-head {
  align-items: flex-start;
  gap: 6px;
}
.rank-mini-card .rank-board-card-head strong {
  font-size: 12px;
  line-height: 1.25;
}
.rank-mini-card .rank-board-card-head span {
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
}
.rank-board-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.rank-board-actions .btn {
  flex: 1;
}
.rank-board-score {
  margin-top: 14px;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}
.rank-mini-score {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1;
}
.rank-mini-card .rank-board-meta-inline {
  margin-top: 5px;
  gap: 6px;
  font-size: 10px;
}
.rank-mini-card .rank-board-actions .btn {
  padding: 5px 7px;
  border-radius: 9px;
}
.rank-board-score span {
  margin-left: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.rank-board-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.08);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.rank-asset-list,
.rank-question-list {
  display: grid;
  gap: 10px;
}
.rank-assets-card {
  display: grid;
  gap: 16px;
}
.rank-asset-group {
  display: grid;
  gap: 10px;
}
.rank-asset-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}
.rank-asset-group-head strong {
  color: var(--text);
  font-size: 15px;
}
.rank-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.rank-asset-meta {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}
.rank-share-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rank-share-btn {
  width: auto;
}
.rank-board-summary-card {
  padding: 16px;
  border-radius: 18px;
  margin-bottom: 0;
}
.rank-all-rankings-shell {
  display: block;
}
.rank-user-board-shell {
  display: block;
}
.rank-search-card,
.rank-result-card {
  padding: 16px;
  border-radius: 18px;
  margin-bottom: 0;
}
.rank-board-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(21, 25, 34, 0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(21, 25, 34, 0.08);
}
.rank-board-back-btn span:first-child {
  font-size: 15px;
}
.rank-board-shell .app-topbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.rank-result-copy {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}
.rank-board-summary-top,
.rank-search-row,
.rank-leader-row,
.rank-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rank-board-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.rank-board-summary-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(184, 58, 75, 0.06);
  border: 1px solid rgba(184, 58, 75, 0.08);
}
.rank-board-summary-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
}
.rank-board-summary-item strong {
  display: block;
  font-size: 15px;
}
.rank-search-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 15px;
}
.rank-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(184, 58, 75, 0.06);
  border: 1px solid rgba(184, 58, 75, 0.08);
  font-size: 13px;
}
.rank-leader-row {
  padding: 12px 0;
  border-top: 1px solid rgba(21, 25, 34, 0.08);
}
.rank-leader-row:first-child {
  border-top: 0;
}
.rank-leader-pos {
  width: 44px;
  color: var(--text-secondary);
  font-weight: 700;
}
.rank-leader-name {
  flex: 1;
  min-width: 0;
}
.rank-leader-score {
  font-weight: 700;
}

.rank-asset-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(21, 25, 34, 0.08);
}
.rank-asset-row:last-child { border-bottom: 0; }
.rank-asset-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.1);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}
.rank-asset-name { font-size: 13px; }
.rank-asset-score { color: var(--text-secondary); font-weight: 700; }

.rank-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.rank-search-bar .input-like {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 15px;
}

.rank-board-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.rank-me-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(184, 58, 75, 0.06);
  border: 1px solid rgba(184, 58, 75, 0.1);
}
.rank-me-label {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.rank-me-card strong { display: block; font-size: 16px; }
.rank-me-meta { margin-top: 6px; color: var(--text-secondary); font-size: 12px; }

.rank-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(21, 25, 34, 0.08);
}
.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rank-table th,
.rank-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(21, 25, 34, 0.08);
}
.rank-table th {
  color: var(--text-secondary);
  font-size: 12px;
  background: rgba(255,255,255,0.7);
}
.rank-table tr.is-me td { background: rgba(184, 58, 75, 0.05); }

.rank-queue-card {
  display: grid;
  gap: 12px;
}
.rank-queue-state {
  display: grid;
  gap: 12px;
  text-align: center;
}
.rank-queue-meta { color: var(--text-muted); font-size: 12px; }
.rank-queue-warning {
  border: 1px solid rgba(212, 101, 101, 0.2);
  background: rgba(212, 101, 101, 0.05);
}
.rank-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.08);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}
.rank-submit-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.rank-question-row {
  padding: 14px 0;
  border-top: 1px solid rgba(21, 25, 34, 0.08);
}
.rank-question-row:first-of-type {
  border-top: 0;
}
.rank-answer-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.rank-question-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.66);
}
.rank-question-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.rank-question-index {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rank-question-title {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.5;
}
.rank-option-list {
  display: grid;
  gap: 10px;
}
.rank-option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  background: rgba(255,255,255,0.72);
}
.rank-option.selected {
  border-color: rgba(184, 58, 75, 0.32);
  background: rgba(184, 58, 75, 0.08);
}
.rank-option-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.1);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-option-text {
  font-size: 14px;
  line-height: 1.65;
}

.rank-empty-state,
.rank-soft-note {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.rank-empty-state {
  padding: 18px 0;
  text-align: center;
}
.rank-empty-icon {
  font-size: 26px;
  margin-bottom: 8px;
}

.rank-entry-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.rank-entry-copy h3 { margin-top: 4px; font-size: 18px; }
.rank-entry-copy p { margin-top: 6px; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }

.rank-share-card-content {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 24px 20px;
}
.rank-share-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(184, 58, 75, 0.1);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.rank-share-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}
.rank-share-board {
  color: var(--text-secondary);
  font-size: 14px;
}
.rank-share-rank {
  color: var(--text-secondary);
  font-size: 13px;
}

.rank-measurement-hall {
  display: grid;
  gap: 18px;
}
.rank-measurement-shell {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 28px 22px 24px;
  overflow: hidden;
  border: 1px solid rgba(154, 120, 64, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at 14% 10%, rgba(243, 205, 129, 0.46), transparent 24%),
    radial-gradient(circle at 88% 4%, rgba(184, 58, 75, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(252, 246, 232, 0.98), rgba(246, 236, 219, 0.94));
  box-shadow:
    0 24px 68px rgba(97, 73, 32, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.58);
}
.rank-measurement-glow {
  position: absolute;
  inset: -12% auto auto -16%;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 236, 192, 0.96) 0%, rgba(255, 236, 192, 0.34) 38%, transparent 72%);
  filter: blur(8px);
  opacity: 0.85;
  pointer-events: none;
}
.rank-measurement-copy {
  position: relative;
  display: grid;
  gap: 8px;
  max-width: 460px;
}
.rank-measurement-eyebrow {
  color: #9b7540;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.rank-measurement-copy h2 {
  max-width: 9ch;
  font-size: 36px;
  line-height: 1.04;
  letter-spacing: -1.2px;
}
.rank-measurement-copy > p:last-of-type {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}
.rank-measurement-cta {
  position: relative;
  display: grid;
  gap: 10px;
  max-width: 220px;
}
.rank-measurement-cta .btn {
  width: 100%;
}
.rank-all-entry {
  width: fit-content;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #4f617f;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

@media (min-width: 720px) {
  .mbti-home-actions {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: stretch;
    gap: 16px;
  }

  .test-entry-panel {
    gap: 18px;
  }

  .test-entry-subactions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test-entry-panel--mbti .test-entry-subactions {
    grid-template-columns: 1fr;
  }

  .test-entry-subactions .btn {
    min-height: 64px;
    align-items: center;
    justify-content: flex-start;
    border-radius: 18px;
    font-size: 15px;
  }

  .test-entry-panel--intimacy .test-entry-subactions {
    grid-template-columns: 1fr;
  }
}

.rank-start-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(14px);
}
.rank-start-sheet {
  width: min(720px, 100%);
  height: min(72vh, 760px);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 16px 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 30px 30px 24px 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(243, 205, 129, 0.18), transparent 28%),
    radial-gradient(circle at 90% 4%, rgba(184, 58, 75, 0.1), transparent 20%),
    linear-gradient(180deg, rgba(255, 250, 242, 0.99), rgba(247, 238, 223, 0.95));
  box-shadow: 0 28px 72px rgba(24, 39, 75, 0.2);
  animation: rankSheetRise 180ms ease-out;
}
.rank-start-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid rgba(132, 99, 46, 0.12);
}
.rank-start-sheet-kicker {
  color: #9b7540;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.rank-start-sheet-head h3 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.6px;
}
.rank-start-sheet-hint {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}
.rank-start-sheet-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(26, 36, 54, 0.06);
  color: #51617a;
  cursor: pointer;
  flex-shrink: 0;
}
.rank-start-sheet-sections {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 2px 2px;
}
.rank-start-sheet-group {
  display: grid;
  gap: 10px;
}
.rank-start-sheet-group-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rank-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.rank-start-sheet-body {
  display: grid;
  gap: 14px;
  min-height: 0;
}
.rank-start-sheet-state {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(154, 120, 64, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.96), rgba(250, 239, 218, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.rank-start-sheet-state-copy {
  display: grid;
  gap: 4px;
}
.rank-start-sheet-state-copy p {
  color: #9b7540;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.rank-start-sheet-state-copy strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
}
.rank-start-sheet-state span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}
.rank-start-tile {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 15px 14px 14px;
  border: 1px solid rgba(110, 89, 50, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(251, 245, 233, 0.94));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  box-shadow: 0 10px 24px rgba(71, 55, 28, 0.05);
}
.rank-start-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 58, 75, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248, 241, 229, 0.98));
  box-shadow: 0 14px 30px rgba(61, 83, 118, 0.1);
}
.rank-start-tile.is-disabled,
.rank-start-tile:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}
.rank-start-tile.is-disabled:hover,
.rank-start-tile:disabled:hover {
  transform: none;
  border-color: rgba(110, 89, 50, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(251, 245, 233, 0.94));
  box-shadow: none;
}
.rank-start-tile:active {
  transform: translateY(0);
}
.rank-start-tile strong {
  font-size: 16px;
  line-height: 1.2;
}
.rank-start-tile-copy {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.rank-switch-confirm {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}
.rank-switch-confirm-card {
  width: min(360px, 100%);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(184, 58, 75, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.94));
  box-shadow: 0 24px 70px rgba(24, 39, 75, 0.24);
}
.rank-switch-confirm-card h3 {
  font-size: 18px;
  line-height: 1.5;
}
.rank-switch-confirm-card p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}
.rank-switch-confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.rank-switch-confirm-actions .btn {
  flex: 1;
}

.rank-board-toolbar {
  display: grid;
  gap: 10px;
}
.rank-board-toolbar-copy {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}
.rank-board-group-select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: 1px solid rgba(21, 25, 34, 0.12);
  border-radius: 16px;
  background:
    rgba(255, 255, 255, 0.82)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path fill='%238b97aa' d='M5 7L1 3h8z'/></svg>")
    no-repeat right 14px center;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  appearance: none;
}
.rank-board-group-select:focus {
  outline: none;
  border-color: rgba(184, 58, 75, 0.3);
  box-shadow: 0 0 0 3px rgba(184, 58, 75, 0.12);
}
.rank-board-my-position {
  display: grid;
  gap: 6px;
}
.rank-board-my-position-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rank-board-my-position strong {
  font-size: 18px;
  line-height: 1.2;
}
.rank-board-my-position p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.rank-search-result-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.rank-search-result-copy strong {
  font-size: 15px;
}
.rank-search-result-copy span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}
.rank-user-board-summary {
  display: grid;
  gap: 14px;
}
.rank-user-board-head {
  display: grid;
  gap: 6px;
}
.rank-user-board-head strong {
  font-size: 22px;
  line-height: 1.2;
}
.rank-user-board-head span {
  color: var(--text-secondary);
  font-size: 13px;
}

.rank-match-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(10px);
}
.rank-match-modal {
  position: relative;
  width: min(320px, 92vw);
  padding: 22px 18px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.62);
  background:
    radial-gradient(circle at 18% 0%, rgba(80, 128, 255, 0.18), transparent 38%),
    rgba(255,255,255,0.92);
  box-shadow: 0 24px 70px rgba(24, 39, 75, 0.24);
  text-align: center;
  animation: modalScaleIn 180ms ease-out;
}
.rank-match-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(15,23,42,0.06);
  color: var(--text-secondary);
  cursor: pointer;
}
.rank-match-radar {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(184, 58, 75,0.12), rgba(65,217,166,0.14));
  overflow: hidden;
}
.rank-match-radar::after {
  content: '';
  position: absolute;
  inset: 30px;
  border-radius: 999px;
  background: var(--primary-dark);
  box-shadow: 0 0 0 8px rgba(184, 58, 75,0.1);
}
.rank-match-radar span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(184, 58, 75,0.32);
  animation: rankRadarPulse 1.4s ease-out infinite;
}
.rank-match-radar span:nth-child(2) { animation-delay: .28s; }
.rank-match-radar span:nth-child(3) { animation-delay: .56s; }
.rank-match-modal h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.rank-match-modal p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 12px;
}
.rank-match-modal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.68);
  color: var(--text-secondary);
  font-size: 12px;
}
.rank-match-modal-summary strong {
  color: var(--text);
  font-size: 13px;
}
.rank-match-modal-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(184, 58, 75,0.08);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}
@keyframes rankRadarPulse {
  0% { transform: scale(.42); opacity: .78; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes rankSheetRise {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 860px) {
  .rank-layout,
  .rank-board-summary,
  .rank-board-summary-grid,
  .rank-total-strip,
  .rank-asset-grid {
    grid-template-columns: 1fr;
  }

  .rank-hero,
  .rank-entry-card {
    flex-direction: column;
    align-items: stretch;
  }

  .rank-hero-actions {
    align-items: flex-start;
  }

  .rank-board-grid {
    grid-template-columns: 1fr;
  }

  .rank-search-row,
  .rank-search-bar,
  .rank-submit-bar,
  .rank-board-actions,
  .rank-search-result,
  .rank-share-actions,
  .rank-asset-group-head {
    flex-direction: column;
    align-items: stretch;
  }

  .rank-start-grid {
    grid-template-columns: 1fr;
  }

.rank-switch-confirm-actions {
    flex-direction: column;
  }
}

.connected-objects-page {
  display: grid;
  gap: 14px;
}

.connected-shell-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.connected-shell-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.connected-shell-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.connected-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.connected-shell-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.connected-quick-add {
  width: auto;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.connected-object-list-shell {
  display: grid;
  gap: 10px;
}

.connection-capability-notice:empty {
  display: none;
}

.connection-capability-notice {
  display: grid;
  gap: 10px;
}

.connected-search-status {
  font-size: 12px;
  color: var(--text-muted);
  white-space: normal;
  text-align: right;
}

.connection-search-sheet-overlay,
.connection-analysis-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(14px);
}

.connection-search-sheet-overlay {
  z-index: 10030;
  align-items: center;
  padding: 18px;
}

.connection-analysis-modal-overlay {
  z-index: 10040;
}

.connection-search-sheet,
.connection-analysis-modal {
  width: min(760px, 100%);
  border-radius: 30px 30px 24px 24px;
  border: 1px solid rgba(255,255,255,0.7);
  background:
    radial-gradient(circle at 18% 0%, rgba(243, 205, 129, 0.16), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(184, 58, 75, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.94));
}

.connection-search-sheet {
  width: min(520px, 100%);
  max-height: min(64vh, 560px);
  display: grid;
  gap: 12px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.96));
}

.connection-analysis-modal {
  max-height: min(84vh, 860px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.connection-sheet-head,
.connection-analysis-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.connection-sheet-head h3,
.connection-analysis-modal-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.connection-sheet-head p,
.connection-analysis-modal-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.connection-sheet-close,
.connection-analysis-modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.connected-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, .52fr) auto;
  gap: 8px;
}

.connected-search-form input,
.connected-search-form select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(21, 25, 34, 0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.82);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.connected-search-form input:focus,
.connected-search-form select:focus {
  border-color: rgba(21, 25, 34, 0.34);
  box-shadow: 0 0 0 3px rgba(21, 25, 34, 0.08);
}

.connected-search-form button {
  min-height: 42px;
  border-radius: 999px;
  white-space: nowrap;
}

.connected-search-results {
  display: grid;
  gap: 10px;
}

.connection-search-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.connection-search-pagination .btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
}

.connection-search-empty {
  padding: 2px 0 0;
  border: 0;
  background: transparent;
}

.connection-result-card,
.connection-object-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 22px rgba(74, 92, 141, .06);
}

.connection-result-card {
  cursor: default;
}

.connection-object-card {
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.connection-object-card:hover {
  transform: translateY(-1px);
  border-color: rgba(104, 131, 204, .28);
}

.connection-object-card.is-active {
  border-color: rgba(104, 131, 204, .72);
  box-shadow: 0 12px 24px rgba(104, 131, 204, .14);
}

.connection-result-copy,
.connection-object-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.connection-result-copy strong,
.connection-object-copy strong {
  font-size: 15px;
  color: var(--text);
}

.connection-result-copy span,
.connection-object-copy span {
  font-size: 12px;
  color: var(--text-secondary);
}

.connection-result-actions,
.connection-object-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.connection-object-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.connection-object-status {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.connection-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.connection-state-pill[data-state="is-ready"] {
  color: #106d4a;
  background: rgba(81, 207, 167, .18);
}

.connection-state-pill[data-state="is-pending"] {
  color: #8a5a00;
  background: rgba(255, 189, 89, .18);
}

.connection-state-pill[data-state="is-idle"] {
  color: #4f5f7d;
  background: rgba(120, 139, 177, .14);
}

.connection-object-remove {
  color: var(--text-secondary);
}

.relationship-friend-card {
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
}

.relationship-friend-card .connection-object-copy {
  gap: 1px;
}

.relationship-friend-bio {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.relationship-friend-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.relationship-friend-preview.is-message {
  color: var(--text-secondary);
}

.relationship-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b6b, #ff865d);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
  box-shadow: 0 8px 18px rgba(255, 107, 107, 0.28);
}

.relationship-friend-card.is-read-only {
  border-color: rgba(120, 139, 177, .18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(244,247,251,0.92)),
    var(--bg-card);
}

.relationship-friend-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.relationship-bubble-action {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(104, 131, 204, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(74, 92, 141, .08);
}

.relationship-bubble-action.is-primary {
  background: rgba(184, 58, 75, .12);
  border-color: rgba(184, 58, 75, .2);
  color: var(--primary);
}

.connection-mode-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.connection-mode-tabs::-webkit-scrollbar {
  display: none;
}

.connection-mode-tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(21, 25, 34, 0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.connection-mode-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(184, 58, 75, 0.18);
}

.connection-analysis-modal-body {
  overflow: auto;
  padding-right: 4px;
}

.relationship-drawer-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(14px);
  z-index: 10035;
}

#friendChatSheetOverlay {
  z-index: 10036;
}

.relationship-drawer {
  width: min(560px, 100%);
  max-height: min(82vh, 840px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border-radius: 30px 30px 24px 24px;
  border: 1px solid rgba(255,255,255,0.7);
  background:
    radial-gradient(circle at 18% 0%, rgba(243, 205, 129, 0.16), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(184, 58, 75, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.94));
}

.relationship-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.relationship-drawer-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.relationship-drawer-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.relationship-drawer-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.relationship-drawer-body {
  overflow: auto;
  padding-right: 4px;
}

.relationship-detail-card {
  display: grid;
  gap: 16px;
}

.relationship-detail-section {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(104, 131, 204, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .68);
}

.relationship-detail-section h4 {
  margin: 0;
  font-size: 15px;
}

.relationship-detail-section p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.relationship-detail-meta,
.relationship-status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.relationship-detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(104, 131, 204, .12);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.relationship-detail-actions {
  display: flex;
  gap: 10px;
}

.relationship-detail-actions .btn {
  flex: 1;
}

.relationship-delete-button {
  color: var(--danger);
}

.relationship-chat-shell {
  display: grid;
  gap: 14px;
}

.relationship-chat-shell.is-read-only {
  opacity: 0.96;
}

.relationship-chat-hero {
  display: flex;
  align-items: center;
  gap: 10px;
}

.relationship-chat-hero-copy {
  display: grid;
  gap: 2px;
}

.relationship-chat-hero-copy strong {
  font-size: 15px;
}

.relationship-chat-hero-copy span {
  color: var(--text-muted);
  font-size: 12px;
}

.relationship-chat-thread {
  display: grid;
  gap: 10px;
  min-height: 220px;
  max-height: min(48vh, 420px);
  padding: 4px 2px 8px;
  overflow: auto;
  align-content: start;
}

.relationship-chat-message {
  display: grid;
  gap: 6px;
}

.relationship-chat-bubble {
  max-width: min(84%, 320px);
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 8px 22px rgba(74, 92, 141, .06);
}

.relationship-chat-bubble.is-friend {
  justify-self: start;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(104, 131, 204, .12);
  color: var(--text);
}

.relationship-chat-bubble.is-self {
  justify-self: end;
  background: rgba(184, 58, 75, .12);
  border: 1px solid rgba(184, 58, 75, .18);
  color: var(--primary-strong);
}

.relationship-chat-message.is-self {
  justify-items: end;
}

.relationship-chat-meta {
  display: flex;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.relationship-chat-meta.is-self {
  justify-content: flex-end;
}

.relationship-chat-banner,
.relationship-chat-receipt,
.relationship-chat-empty {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.6;
}

.relationship-chat-banner {
  border: 1px solid rgba(120, 139, 177, .18);
  background: rgba(120, 139, 177, .12);
  color: var(--text-secondary);
}

.relationship-chat-receipt {
  padding: 0;
  color: var(--text-muted);
}

.relationship-chat-empty {
  border: 1px dashed rgba(104, 131, 204, .16);
  background: rgba(255, 255, 255, .72);
  color: var(--text-secondary);
  text-align: center;
}

.relationship-chat-composer-shell {
  display: grid;
  gap: 10px;
}

.relationship-chat-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.relationship-chat-emoji-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(104, 131, 204, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  font-size: 20px;
  cursor: pointer;
}

.relationship-chat-composer textarea {
  min-width: 0;
  min-height: 42px;
  max-height: 120px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .82);
  color: var(--text);
  resize: vertical;
  font: inherit;
}

.relationship-chat-composer textarea:disabled,
.relationship-chat-emoji-toggle:disabled,
.relationship-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.relationship-chat-send {
  min-width: 74px;
}

.relationship-chat-emoji-tray {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(104, 131, 204, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
}

.relationship-chat-emoji-tray.is-open {
  display: flex;
}

.relationship-chat-emoji {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(184, 58, 75, .08);
  font-size: 20px;
  cursor: pointer;
}
.connection-detail-empty {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 6px 2px;
}

.connection-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.connection-detail-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 12px;
}

.connection-missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connection-missing-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 189, 89, 0.16);
  color: #8a5a00;
  font-size: 12px;
  font-weight: 700;
}

.connection-analysis-card {
  display: grid;
  gap: 16px;
}

.connection-analysis-hero {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(94, 124, 214, .12), rgba(255, 255, 255, .82));
  border: 1px solid rgba(94, 124, 214, .16);
}

.connection-analysis-hero h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.connection-analysis-hero-summary {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
}

.connection-analysis-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connection-analysis-hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(104, 131, 204, .14);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.connection-analysis-score {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.connection-analysis-score strong {
  font-size: 28px;
  line-height: 1;
}

.connection-analysis-score span {
  font-size: 14px;
  font-weight: 600;
}

.connection-analysis-section {
  display: grid;
  gap: 10px;
}

.connection-analysis-section-head {
  display: grid;
  gap: 4px;
}

.connection-analysis-section-head h4 {
  margin: 0;
  font-size: 16px;
}

.connection-analysis-grid {
  display: grid;
  gap: 10px;
}

.connection-analysis-row {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(104, 131, 204, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .68);
}

.connection-analysis-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.connection-analysis-row-level {
  font-size: 12px;
  color: var(--text-muted);
}

.connection-analysis-row p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.connection-analysis-row-hint {
  font-size: 12px;
}

.connection-analysis-section-copy {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
  margin-top: -2px;
}

.connection-analysis-subsection {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.connection-analysis-subsection-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.connection-analysis-subgrid {
  display: grid;
  gap: 8px;
}

.connection-analysis-subrow {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(104, 131, 204, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}

.connection-analysis-subrow.is-preview {
  border-style: dashed;
  background: rgba(255, 255, 255, .54);
}

.connection-analysis-subrow-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 12px;
  font-weight: 700;
}

.connection-analysis-subrow-head span {
  color: var(--text-muted);
  font-weight: 600;
}

.connection-analysis-subrow p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.connection-analysis-subrow-mask {
  display: inline-block;
  margin-left: 2px;
  filter: blur(4px);
  opacity: .72;
  user-select: none;
}

.connection-pairing-grid {
  display: grid;
  gap: 10px;
}

.connection-pairing-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(104, 131, 204, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .68);
}

.connection-pairing-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.connection-pairing-head strong {
  font-size: 14px;
}

.connection-pairing-head span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.connection-pairing-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.connection-empty-state {
  padding: 16px;
  border: 1px dashed rgba(104, 131, 204, .2);
  border-radius: 14px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, .6);
}

.connection-empty-state h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.connection-empty-state p {
  margin: 0;
  line-height: 1.65;
}

.connection-empty-state.connection-search-empty {
  padding: 2px 0 0;
  border: 0;
  background: transparent;
}

.connection-detail-empty h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.connection-detail-empty p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.connection-empty-state-quiet {
  padding: 14px 16px;
  background: rgba(255, 255, 255, .5);
}

.connection-empty-state-quiet .connection-detail-actions {
  margin-top: 12px;
}

.connection-empty-hint {
  padding: 6px 2px 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.friend-actions-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 860px) {
  .connected-shell-head,
  .connection-sheet-head,
  .connection-analysis-modal-head,
  .relationship-drawer-head {
    flex-direction: column;
  }

  .connected-shell-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .connected-quick-add {
    min-width: 0;
  }

  .connection-search-sheet .connection-sheet-head {
    flex-direction: row;
    align-items: flex-start;
  }

  .connected-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connected-search-form button {
    grid-column: 1 / -1;
  }

  .admin-user-analysis-overlay {
    padding: 12px;
    align-items: stretch;
  }

  .admin-user-share-card-overlay {
    padding: 12px;
    align-items: stretch;
  }

  .admin-user-analysis-modal {
    max-height: calc(100vh - 24px);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    padding: 16px;
    border-radius: 24px;
  }

  .admin-user-share-card-modal {
    max-height: calc(100vh - 24px);
    padding: 16px;
    border-radius: 24px;
  }

  .admin-user-analysis-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-user-analysis-history {
    max-height: 300px;
  }

  .admin-user-analysis-kv-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-share-card-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-switch {
    gap: 8px;
    margin-top: 14px;
    margin-bottom: 14px;
  }

  .home-switch-btn {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 14px;
  }

  .mbti-home-panel {
    gap: 14px;
    margin-bottom: 14px;
    padding: 18px 16px;
    border-radius: 22px;
  }

  .mbti-home-copy {
    gap: 6px;
  }

  .mbti-home-copy h2 {
    font-size: 22px;
    line-height: 1.12;
    letter-spacing: -0.6px;
  }

  .mbti-home-copy p:last-child {
    font-size: 13px;
    line-height: 1.6;
  }

  .mbti-home-action {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .connected-shell-card,
  .connection-search-sheet,
  .connection-analysis-modal,
  .relationship-drawer {
    padding: 16px;
    border-radius: 26px 26px 20px 20px;
  }

  .connection-search-sheet-overlay {
    align-items: flex-end;
    padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .connection-search-sheet {
    max-height: min(72vh, 560px);
    padding: 14px;
    border-radius: 20px;
  }

.connected-shell-copy h2 {
    font-size: 22px;
    line-height: 1.12;
  }

  .connected-search-form {
    grid-template-columns: 1fr;
  }

  .connection-result-card,
  .connection-object-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .connection-result-actions,
  .connection-object-card-actions {
    width: 100%;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .connection-search-pagination {
    align-items: stretch;
  }

  .relationship-friend-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .relationship-bubble-action {
    flex: 0 0 auto;
    justify-content: center;
  }

  .relationship-chat-composer {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: stretch;
  }

  .relationship-chat-composer textarea {
    width: 100%;
    min-height: 48px;
    resize: none;
  }

  .relationship-chat-emoji-toggle {
    width: 42px;
    height: 48px;
    align-self: stretch;
  }

  .relationship-chat-send {
    grid-column: 1 / -1;
    width: 100%;
  }

  .relationship-detail-actions {
    flex-direction: column;
  }

  .admin-user-analysis-modal-head {
    flex-direction: column;
  }

  .admin-user-share-card-head {
    flex-direction: column;
  }

  .admin-user-analysis-header-main {
    flex-direction: column;
  }

  .admin-user-share-card-summary-head {
    flex-direction: column;
  }

  .admin-user-analysis-detail-head {
    flex-direction: column;
  }

  .admin-user-analysis-detail-meta {
    justify-items: start;
  }

  .admin-user-analysis-detail-switch {
    width: 100%;
  }

  .admin-user-analysis-detail-switch-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .admin-user-analysis-preview-frame {
    min-height: 760px;
  }

  .admin-user-analysis-tab {
    padding: 9px 12px;
  }

  .admin-user-share-card-actions {
    justify-content: stretch;
  }

  .admin-user-share-card-actions .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .intimacy-persona-overview-overlay {
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    align-items: center;
  }

  .intimacy-persona-overview-sheet {
    grid-template-rows: auto auto auto;
    padding: 8px;
    height: auto;
    max-height: calc(100dvh - 12px - env(safe-area-inset-bottom, 0px));
    border-radius: 18px;
    gap: 8px;
  }

  .intimacy-persona-overview-head {
    align-items: center;
    gap: 8px;
  }

  .intimacy-persona-overview-head h3 {
    font-size: 16px;
  }

  .intimacy-persona-overview-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(4, 84px);
    grid-auto-rows: 84px;
    align-content: start;
    gap: 4px;
    padding-right: 0;
    overflow: hidden;
  }

  .intimacy-persona-card {
    justify-items: center;
    padding: 6px 4px 5px;
    gap: 4px;
    border-radius: 5px;
  }

  .intimacy-persona-visual {
    width: 40px;
    border-radius: 4px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  }

  .intimacy-persona-image-frame {
    width: 34px;
    border-radius: 8px;
  }

  .intimacy-persona-card h4 {
    width: 100%;
    font-size: 10px;
    line-height: 1.08;
    text-align: center;
    white-space: nowrap;
  }

  .intimacy-persona-card p,
  .intimacy-persona-card p:not(.intimacy-persona-axis) {
    display: none;
  }

  .intimacy-persona-overview-footer {
    margin-top: 0;
    font-size: 10px;
    line-height: 1.1;
  }
}

@media (max-width: 420px) and (max-height: 760px) {
  .intimacy-persona-overview-overlay {
    padding: 4px;
  }

  .intimacy-persona-overview-sheet {
    padding: 7px;
    height: auto;
    max-height: calc(100dvh - 8px - env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
    gap: 6px;
  }

  .intimacy-persona-overview-head h3 {
    font-size: 15px;
  }

  .intimacy-persona-overview-close {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .intimacy-persona-overview-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(4, 76px);
    grid-auto-rows: 76px;
    align-content: start;
    gap: 3px;
  }

  .intimacy-persona-card {
    padding: 5px 3px 4px;
    gap: 3px;
  }

  .intimacy-persona-visual {
    width: 34px;
    border-radius: 4px;
  }

  .intimacy-persona-image-frame {
    width: 30px;
    border-radius: 7px;
  }

  .intimacy-persona-card h4 {
    font-size: 9px;
  }

  .intimacy-persona-card p,
  .intimacy-persona-card p:not(.intimacy-persona-axis) {
    display: none;
  }

  .intimacy-persona-overview-footer {
    font-size: 9px;
  }
}

#testsStatusPanel .test-status-next-card {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(21, 25, 34, 0.94);
  color: #fff;
}

#testsStatusPanel .test-status-next-card span {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

#testsStatusPanel .test-status-next-card strong {
  font-size: 20px;
}

#testsStatusPanel .test-status-grid {
  display: grid;
  gap: 12px;
}

#testsStatusPanel .test-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(21,25,34,0.1);
}

#testsStatusPanel .test-status-card strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 16px;
}

#testsStatusPanel .test-status-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

#testsStatusPanel .test-status-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(184,58,75,0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

#testsStatusPanel .test-status-card .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.tests-hub-panel {
  min-height: 0;
}

.tests-hub-actions {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.tests-hub-actions #testsStatusPanel {
  width: 100%;
}

.tests-hub-actions .test-entry-meta {
  justify-content: flex-start;
  min-height: 0;
  margin-top: 2px;
}

@media (min-width: 720px) {
  #testsStatusPanel .test-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tests-hub-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 960px) {
  #testsStatusPanel .test-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tests-hub-actions .test-entry-meta {
    justify-content: flex-end;
  }
}

.next-step-card {
  display: grid;
  gap: 10px;
  border-color: rgba(184, 58, 75, 0.2);
}

.next-step-card > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.next-step-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.next-step-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.relationship-invite-share-sheet {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.42);
}

.relationship-invite-share-sheet[hidden] {
  display: none;
}

.relationship-invite-share-panel {
  width: min(100%, 420px);
  max-height: min(92vh, 760px);
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,253,248,0.94);
  border: 1px solid rgba(21,25,34,0.1);
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.24);
  backdrop-filter: blur(18px);
}

.relationship-invite-share-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.relationship-invite-share-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.relationship-invite-share-head h3 {
  margin: 3px 0;
  font-size: 20px;
}

.relationship-invite-share-head p,
.relationship-invite-limit {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.relationship-invite-poster-display-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #f8f3eb;
  border: 1px solid rgba(21,25,34,0.1);
}

.relationship-invite-poster-source-canvas {
  display: none !important;
}

.relationship-invite-poster-display-image[hidden] {
  display: none;
}

.relationship-invite-poster-display-image {
  display: block;
  -webkit-touch-callout: default;
  user-select: auto;
}

.relationship-invite-poster-save-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(184,58,75,0.08);
  color: #7f2937;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.relationship-invite-poster-save-notice[hidden] {
  display: none;
}

.relationship-invite-share-actions {
  margin-top: 12px;
}

.relationship-invite-copy-feedback {
  margin: 10px 0 0;
  color: #7f2937;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.relationship-invite-copy-feedback[hidden] {
  display: none;
}

.relationship-invite-copy-link-button.is-copied {
  border-color: rgba(184,58,75,0.28);
  background: rgba(184,58,75,0.08);
  color: #7f2937;
}

.relationship-invite-image-download,
.relationship-invite-image-download:hover,
.relationship-invite-image-download:focus,
.relationship-invite-image-download:active,
.relationship-invite-image-download:visited,
.share-card-save-link,
.share-card-save-link:hover,
.share-card-save-link:focus,
.share-card-save-link:active,
.share-card-save-link:visited {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  text-decoration: none;
}

.relationship-invite-poster-display-image.is-save-target,
.share-card-preview.is-save-target {
  box-shadow: 0 0 0 4px rgba(184, 58, 75, 0.2), 0 18px 42px rgba(21, 25, 34, 0.16);
}

.relationship-invite-image-download:disabled,
.share-card-save-link:disabled,
.relationship-invite-image-download[aria-disabled="true"],
.share-card-save-link[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.intimacy-top-invite-button {
  flex-shrink: 0;
  min-height: 42px;
  border-radius: 14px;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(21, 25, 34, 0.16);
}

.relationship-invite-landing {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.relationship-invite-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(21, 25, 34, 0.98), rgba(74, 36, 51, 0.98) 58%, rgba(184, 58, 75, 0.95));
  box-shadow: 0 18px 48px rgba(21, 25, 34, 0.2);
  min-width: 0;
  max-width: 100%;
}

.relationship-invite-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 92px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 18px
  );
  opacity: 0.34;
  pointer-events: none;
}

.relationship-invite-eyebrow,
.relationship-invite-hero h2,
.relationship-invite-summary,
.relationship-invite-progress {
  position: relative;
  z-index: 1;
}

.relationship-invite-eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.relationship-invite-hero h2 {
  margin: 0;
  max-width: 760px;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: 0;
}

.relationship-invite-summary,
.relationship-invite-progress {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.7;
}

.relationship-invite-progress {
  color: rgba(255, 255, 255, 0.9);
}

.relationship-invite-visual {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(21, 25, 34, 0.09);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 16px 42px rgba(21, 25, 34, 0.08);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.relationship-invite-visual-head {
  display: grid;
  gap: 5px;
}

.relationship-invite-visual-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.relationship-invite-visual-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.relationship-invite-visual-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

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

.relationship-invite-type-tile {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 68px;
  padding: 9px 6px;
  border: 1px solid color-mix(in srgb, var(--invite-type-color, #151922) 22%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 246, 240, 0.78)),
    color-mix(in srgb, var(--invite-type-color, #151922) 10%, transparent);
  text-align: center;
}

.relationship-invite-type-tile strong {
  color: var(--invite-type-color, #151922);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0;
}

.relationship-invite-type-tile em {
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  white-space: nowrap;
}

.relationship-invite-persona-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.relationship-invite-persona-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  min-height: 92px;
  padding: 7px 4px 6px;
  border: 1px solid rgba(21, 25, 34, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.relationship-invite-persona-card.is-secure {
  background: rgba(244, 247, 253, 0.9);
}

.relationship-invite-persona-card.is-anxious {
  background: rgba(250, 247, 240, 0.92);
}

.relationship-invite-persona-card.is-avoidant {
  background: rgba(242, 248, 246, 0.92);
}

.relationship-invite-persona-card.is-fearful {
  background: rgba(249, 244, 247, 0.92);
}

.relationship-invite-persona-card .relationship-invite-persona-visual,
.relationship-invite-persona-dot {
  display: block;
  width: 34px;
  aspect-ratio: 1;
  border-radius: 10px;
  box-shadow: 0 7px 16px rgba(21, 25, 34, 0.08);
}

.relationship-invite-persona-dot {
  background: #f7e8ea;
}

.relationship-invite-persona-dot.is-secure {
  background: #eef2fb;
}

.relationship-invite-persona-dot.is-anxious {
  background: #f8efe3;
}

.relationship-invite-persona-dot.is-avoidant {
  background: #eaf2ef;
}

.relationship-invite-persona-dot.is-fearful {
  background: #f7e8ef;
}

.relationship-invite-persona-card strong {
  width: 100%;
  color: var(--text);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.relationship-invite-persona-card em {
  width: 100%;
  color: var(--text-secondary);
  font-size: 9px;
  font-style: normal;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.relationship-invite-landing .relationship-invite-limit {
  padding: 0 2px;
  line-height: 1.5;
}

.relationship-invite-landing .home-summary-actions {
  margin-top: 0;
}

@media (max-width: 560px) {
  .app-shell.app-shell-report .relationship-invite-landing {
    margin-inline: -4px;
  }

  .relationship-invite-hero {
    padding: 20px;
    border-radius: 22px;
  }

  .relationship-invite-hero h2 {
    font-size: 26px;
  }

  .relationship-invite-summary,
  .relationship-invite-progress {
    font-size: 13px;
  }

  .relationship-invite-visual {
    padding: 13px;
    border-radius: 20px;
  }

  .relationship-invite-landing .home-summary-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .relationship-invite-mbti-grid {
    gap: 6px;
  }

  .relationship-invite-type-tile {
    min-height: 60px;
    padding: 8px 4px;
    border-radius: 12px;
  }

  .relationship-invite-type-tile strong {
    font-size: 15px;
  }

  .relationship-invite-type-tile em {
    font-size: 10px;
  }

  .relationship-invite-persona-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }

  .relationship-invite-persona-card {
    min-height: 68px;
    padding: 5px 3px;
    border-radius: 10px;
  }

  .relationship-invite-persona-card .relationship-invite-persona-visual,
  .relationship-invite-persona-dot {
    width: 30px;
    border-radius: 9px;
  }

  .relationship-invite-persona-card strong {
    font-size: 9px;
  }

  .relationship-invite-persona-card em {
    display: none;
  }
}

.profile-asset-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(21,25,34,0.09);
}

.profile-asset-strip > div {
  min-width: 0;
}

.profile-asset-strip span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.profile-asset-strip strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.profile-asset-strip-action {
  margin-left: auto;
}
