﻿:root {
      color-scheme: dark;
      --bg: #0d1014;
      --panel: #151922;
      --panel-2: #1b202b;
      --line: #2a3140;
      --muted: #98a2b3;
      --text: #f3f6fa;
      --soft: #c8d0dc;
      --green: #4ade80;
      --cyan: #38bdf8;
      --rose: #fb7185;
      --amber: #fbbf24;
      --radius: 8px;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    * { box-sizing: border-box; }

    [hidden],
    .nav button[hidden] {
      display: none !important;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background: linear-gradient(180deg, #11151c 0%, #0d1014 55%, #090b0f 100%);
      color: var(--text);
    }

    button, input, textarea {
      font: inherit;
    }

    button {
      color: inherit;
      border: 1px solid var(--line);
      background: #202633;
      border-radius: 7px;
      min-height: 36px;
      padding: 0 12px;
      cursor: pointer;
      transition: transform .15s ease, background .15s ease, border-color .15s ease;
    }

    button:hover {
      transform: translateY(-1px);
      border-color: #465064;
      background: #273041;
    }

    button:disabled,
    button:disabled:hover {
      cursor: not-allowed;
      opacity: .55;
      transform: none;
    }

    button.primary {
      background: #e6f8ef;
      border-color: #e6f8ef;
      color: #0c1210;
      font-weight: 760;
    }

    button.primary:disabled,
    button.primary:disabled:hover {
      background: #202633;
      border-color: var(--line);
      color: var(--soft);
      box-shadow: none;
    }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 248px minmax(0, 1fr) 340px;
    }

    .sidebar {
      border-right: 1px solid var(--line);
      background: rgba(15, 18, 25, .96);
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 760;
    }

    .brand-logo {
      width: 24px;
      height: 24px;
      display: grid;
      place-items: end start;
      border-left: 2px solid #f3f6fa;
      border-bottom: 2px solid #f3f6fa;
      position: relative;
      flex: 0 0 auto;
    }

    .brand-logo::before,
    .brand-logo::after {
      content: "";
      position: absolute;
      bottom: 3px;
      width: 3px;
      background: #f3f6fa;
      border-radius: 2px 2px 0 0;
    }

    .brand-logo::before {
      left: 6px;
      height: 8px;
    }

    .brand-logo::after {
      left: 12px;
      height: 14px;
    }

    .brand-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .brand-name {
      font-size: 16px;
      line-height: 1;
      color: #fff;
    }

    .brand-subtitle {
      color: var(--muted);
      font-size: 12px;
      font-weight: 500;
    }

    .mark {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      background: #e6f8ef;
      color: #0c1210;
      border-radius: 8px;
      font-weight: 900;
    }

    .nav {
      display: grid;
      gap: 6px;
    }

    .nav button {
      width: 100%;
      text-align: left;
      background: transparent;
      border-color: transparent;
      color: var(--soft);
      display: flex;
      align-items: center;
      gap: 12px;
      justify-content: flex-start;
      font-weight: 700;
    }

    .nav-icon {
      width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      color: var(--soft);
      flex: 0 0 auto;
    }

    .nav-icon svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .nav button.active {
      background: #202633;
      color: #fff;
      border-color: var(--line);
    }

    .nav button:disabled {
      opacity: .42;
      cursor: not-allowed;
      transform: none;
    }

    .sidebar-note {
      margin-top: auto;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel);
      padding: 12px;
      color: var(--soft);
      font-size: 13px;
      line-height: 1.5;
    }

    .login-chip {
      border: 1px solid #26364d;
      border-radius: 14px;
      background: #101827;
      margin-top: auto;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
    }

    .login-avatar {
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: #f3f6fa;
      color: #0c1210;
      font-size: 12px;
      font-weight: 900;
      flex: 0 0 auto;
    }

    .login-name {
      min-width: 0;
      flex: 1;
      color: #fff;
      font-size: 14px;
      font-weight: 760;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .login-gear {
      width: 18px;
      height: 18px;
      color: var(--muted);
      flex: 0 0 auto;
    }

    .login-gear svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .main {
      min-width: 0;
      display: grid;
      grid-template-rows: auto 1fr;
      background: rgba(12, 15, 20, .72);
    }

    .topbar {
      border-bottom: 1px solid var(--line);
      padding: 18px 22px;
    }

    .topbar h1 {
      margin: 0;
      font-size: 20px;
      letter-spacing: 0;
    }

    .topbar p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .workspace {
      min-height: 0;
      overflow: auto;
      padding: 22px;
      display: grid;
      gap: 16px;
      align-content: start;
    }

    .right {
      border-left: 1px solid var(--line);
      background: rgba(15, 18, 25, .96);
      padding: 16px;
      overflow: auto;
      display: grid;
      gap: 14px;
      align-content: start;
    }

    .right-dashboard {
      display: grid;
      gap: 14px;
    }

    .right-chat-panel {
      display: none;
    }

    .chat-page-active .right-dashboard {
      display: none;
    }

    .chat-page-active .right-chat-panel {
      display: grid;
    }

    .chat-page-active .right {
      padding: 12px;
    }

    .right-chat-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 2px 4px 10px;
    }

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

    .chat-count {
      min-width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      color: #fff;
      font-size: 12px;
      font-weight: 860;
      background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
      box-shadow: 0 10px 22px rgba(255, 95, 148, .22);
    }

    .right h2 {
      margin: 0;
      font-size: 15px;
    }

    .page {
      display: none;
      gap: 16px;
      align-content: start;
    }

    .page.active {
      display: grid;
    }

    .deck {
      display: grid;
      gap: 12px;
    }

    .page-title {
      border-bottom: 1px solid var(--line);
      padding-bottom: 12px;
    }

    .page-title h2 {
      margin: 0;
      font-size: 20px;
    }

    .page-title p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .panel,
    .card,
    .form-card,
    .chat-room {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(21, 25, 34, .92);
    }

    .panel,
    .card,
    .form-card {
      padding: 16px;
      display: grid;
      gap: 12px;
    }

    .panel h3,
    .card h3 {
      margin: 0;
      font-size: 16px;
    }

    .panel p,
    .card p {
      margin: 0;
      color: #e4e9f1;
      line-height: 1.58;
    }

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

    .flow-step {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #111720;
      padding: 13px;
      min-height: 142px;
      display: grid;
      gap: 8px;
      align-content: start;
    }

    .step-kicker {
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      background: #223045;
      color: #dce7f5;
      font-weight: 760;
      font-size: 12px;
    }

    .flow-step strong {
      display: block;
      font-size: 14px;
    }

    .flow-step span {
      color: var(--soft);
      font-size: 13px;
      line-height: 1.45;
    }

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

    .field {
      display: grid;
      gap: 6px;
    }

    .field label {
      color: var(--soft);
      font-size: 13px;
    }

    .slider-field {
      display: grid;
      gap: 8px;
    }

    .slider-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: var(--soft);
      font-size: 13px;
    }

    .slider-value {
      color: #fff;
      font-weight: 760;
    }

    input,
    textarea,
    select {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: #10151e;
      color: var(--text);
      padding: 10px;
      outline: 0;
    }

    input[type="range"] {
      appearance: none;
      height: 8px;
      padding: 0;
      border: 0;
      border-radius: 999px;
      background: #252b38;
      accent-color: var(--green);
    }

    input[type="range"]::-webkit-slider-thumb {
      appearance: none;
      width: 20px;
      height: 20px;
      border-radius: 999px;
      background: #e6f8ef;
      border: 3px solid #0c1210;
      box-shadow: 0 0 0 1px rgba(255,255,255,.16);
      cursor: pointer;
    }

    textarea {
      min-height: 96px;
      resize: vertical;
      line-height: 1.5;
    }

    .date-grid {
      display: grid;
      grid-template-columns: 1.25fr 1fr 1fr;
      gap: 8px;
    }

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

    .choice-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .choiceBtn {
      min-height: 34px;
      color: var(--soft);
      background: #1c2330;
    }

    .choiceBtn.active,
    .questionBtn.primary {
      background: #e6f8ef;
      border-color: #e6f8ef;
      color: #0c1210;
      font-weight: 760;
    }

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

    .tag {
      color: #d7deea;
      background: #202838;
      border: 1px solid #30384a;
      border-radius: 999px;
      padding: 4px 8px;
      font-size: 12px;
    }

    .tag.match {
      color: #ddf7ea;
      background: #123326;
      border-color: #245a43;
    }

    .tag.off {
      color: #ffe4e6;
      background: #351821;
      border-color: #6b2b3a;
    }

    .question-card {
      transition: opacity .22s ease, transform .22s ease, max-height .28s ease, margin .28s ease, padding .28s ease, border-width .28s ease;
      overflow: hidden;
      max-height: 560px;
    }

    .question-textarea {
      min-height: 132px;
      margin: 4px 0 10px;
    }

    .question-card .hint-line {
      display: block;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
      margin: -2px 0 10px;
    }

    .question-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin: 6px 0 10px;
    }

    .question-meta span {
      display: inline-flex;
      align-items: center;
      min-height: 26px;
      padding: 5px 9px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-2);
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.1;
      white-space: nowrap;
    }

    .question-card.answered {
      opacity: 0;
      transform: translateY(-8px);
      max-height: 0;
      margin: 0;
      padding-top: 0;
      padding-bottom: 0;
      border-width: 0;
      pointer-events: none;
    }

    .completion-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: var(--soft);
      font-size: 13px;
      flex-wrap: wrap;
    }

    .admin-panel {
      display: grid;
      gap: 16px;
    }

    .admin-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
    }

    .admin-head h3 {
      margin: 4px 0 0;
    }

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

    .admin-stat {
      min-height: 86px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 22px;
      background: rgba(255, 255, 255, .48);
      box-shadow: 0 12px 30px rgba(31, 41, 55, .06), inset 0 1px 0 rgba(255, 255, 255, .65);
    }

    .admin-stat span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 760;
      margin-bottom: 8px;
    }

    .admin-stat strong {
      color: var(--text);
      font-size: 28px;
      line-height: 1;
    }

    .admin-note {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .admin-demo-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
    }

    .admin-filters {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .admin-filters button {
      min-height: 36px;
      padding: 8px 13px;
      border-radius: 999px;
      font-size: 12px;
      color: var(--soft);
      background: rgba(255, 255, 255, .34);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 10px 24px rgba(72, 65, 58, .06);
    }

    .admin-filters button.active {
      color: #fff;
      border-color: transparent;
      background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
      box-shadow: 0 12px 26px rgba(255, 95, 148, .22);
    }

    .admin-bulk-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      padding: 10px 12px;
      border-radius: 20px;
      background: rgba(255, 255, 255, .28);
      border: 1px solid rgba(255, 255, 255, .48);
    }

    .admin-bulk-actions .ghost-btn,
    .admin-bulk-actions .primary {
      min-height: 36px;
      padding: 8px 13px;
      border-radius: 999px;
      font-size: 12px;
    }

    .admin-bulk-actions span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 780;
      margin-right: auto;
    }

    .admin-detail-backdrop {
      position: fixed;
      inset: 0;
      z-index: 60;
      display: none;
      place-items: center;
      padding: 24px;
      background: rgba(37, 34, 32, .28);
      backdrop-filter: blur(18px);
    }

    .admin-detail-backdrop.show {
      display: grid;
    }

    .admin-detail-card {
      display: grid;
      gap: 14px;
      padding: 18px;
      border-radius: 26px;
      border: 1px solid rgba(255, 255, 255, .62);
      background:
        radial-gradient(circle at 92% 8%, rgba(255, 95, 148, .2), transparent 30%),
        radial-gradient(circle at 6% 96%, rgba(79, 132, 255, .16), transparent 34%),
        rgba(255, 255, 255, .48);
      box-shadow: 0 18px 46px rgba(31, 41, 55, .08), inset 0 1px 0 rgba(255, 255, 255, .7);
    }

    .admin-detail-backdrop .admin-detail-card {
      width: min(720px, calc(100vw - 32px));
      max-height: calc(100vh - 48px);
      overflow: auto;
      position: relative;
    }

    .admin-detail-card h4 {
      margin: 4px 0 4px;
      font-size: 20px;
    }

    .admin-detail-card p {
      margin: 0;
      max-width: none;
    }

    .admin-detail-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .admin-detail-grid div,
    .admin-vibe-preview {
      border-radius: 18px;
      padding: 12px;
      background: rgba(255, 255, 255, .36);
      box-shadow: inset 5px 5px 14px rgba(198, 190, 184, .28), inset -5px -5px 14px rgba(255, 255, 255, .72);
    }

    .admin-detail-grid span {
      display: block;
      margin-bottom: 5px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 780;
    }

    .admin-detail-grid strong {
      font-size: 14px;
    }

    .admin-vibe-preview {
      color: var(--text);
      line-height: 1.65;
      min-height: 58px;
    }

    .admin-detail-actions {
      display: flex;
      justify-content: flex-end;
    }

    .admin-table-wrap {
      overflow-x: auto;
      border-radius: 22px;
      border: 1px solid rgba(255, 255, 255, .58);
      background: rgba(255, 255, 255, .34);
    }

    .admin-table {
      width: 100%;
      min-width: 780px;
      border-collapse: collapse;
      color: var(--text);
      font-size: 13px;
    }

    .admin-table th,
    .admin-table td {
      padding: 14px;
      text-align: left;
      border-bottom: 1px solid rgba(130, 124, 118, .16);
      vertical-align: middle;
    }

    .admin-table th {
      color: var(--muted);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .admin-table td span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-top: 3px;
      max-width: 150px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .admin-table .admin-user-cell strong {
      display: block;
      max-width: 150px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .admin-row-actions {
      display: flex;
      justify-content: flex-end;
      white-space: nowrap;
    }

    .admin-row-actions .ghost-btn {
      min-height: 34px;
      padding: 8px 12px;
      border-radius: 999px;
      font-size: 12px;
    }

    .admin-table tr:last-child td {
      border-bottom: 0;
    }

    .admin-table tr.selected td {
      background: rgba(255, 95, 148, .06);
    }

    .admin-table tbody tr {
      cursor: pointer;
    }

    .admin-select-cell {
      width: 42px;
    }

    .admin-user-select {
      width: 18px;
      height: 18px;
      accent-color: var(--app-pink);
      cursor: pointer;
    }

    .admin-status-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-weight: 820;
    }

    .admin-status-pill::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: #b9b2ac;
      box-shadow: 0 0 0 4px rgba(185, 178, 172, .12);
    }

    .admin-status-pill.available::before {
      background: #63c17a;
      box-shadow: 0 0 0 4px rgba(99, 193, 122, .16);
    }

    .profile-summary {
      display: none;
      gap: 14px;
      position: relative;
      overflow: hidden;
    }

    .profile-summary.show {
      display: grid;
    }

    .profile-summary::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 16% 8%, rgba(197, 222, 168, .52), transparent 27%),
        radial-gradient(circle at 86% 18%, rgba(237, 186, 138, .34), transparent 28%);
      opacity: .7;
      pointer-events: none;
    }

    .profile-summary > * {
      position: relative;
      z-index: 1;
    }

    .summary-head {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: flex-start;
    }

    .summary-tools {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .summary-head h3 {
      margin-bottom: 6px;
    }

    .ghost-btn {
      min-height: 34px;
      padding: 8px 12px;
      border-radius: 999px;
      color: #625c57;
      background: rgba(255, 255, 255, .34);
      border: 1px solid rgba(255, 255, 255, .58);
      font-size: 12px;
      font-weight: 780;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 12px 28px rgba(74, 65, 56, .08);
    }

    .ghost-btn:hover {
      color: #2f2b29;
    }

    .lock-pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 8px 11px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, .6);
      background: rgba(255, 255, 255, .42);
      color: #55504d;
      font-size: 12px;
      font-weight: 720;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 12px 28px rgba(74, 65, 56, .08);
      white-space: nowrap;
      justify-self: start;
      align-self: flex-start;
    }

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

    .summary-tile {
      min-height: 82px;
      padding: 12px;
      border: 1px solid rgba(255, 255, 255, .58);
      border-radius: 22px;
      background: rgba(255, 255, 255, .3);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
      display: grid;
      align-content: space-between;
      gap: 8px;
      position: relative;
      overflow: hidden;
    }

    .summary-tile::after {
      content: "";
      position: absolute;
      right: -24px;
      top: -24px;
      width: 70px;
      height: 70px;
      border-radius: 999px;
      background: rgba(197, 222, 168, .36);
      filter: blur(2px);
    }

    .summary-tile:nth-child(3n)::after {
      background: rgba(237, 186, 138, .3);
    }

    .summary-tile:nth-child(4n)::after {
      background: rgba(211, 205, 226, .34);
    }

    .summary-tile span {
      color: #8f8b89;
      font-size: 12px;
      position: relative;
      z-index: 1;
    }

    .summary-tile strong {
      color: #2d2928;
      font-size: 15px;
      line-height: 1.2;
      position: relative;
      z-index: 1;
    }

    #profileForm.locked {
      display: none;
    }

    #profileForm {
      padding: 20px;
      gap: 18px;
    }

    #profileForm::before {
      background:
        radial-gradient(circle, rgba(180, 212, 255, .24), rgba(255, 255, 255, .16) 42%, transparent 72%);
    }

    .profile-form-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      padding: 4px 2px 10px;
    }

    .profile-form-head h3 {
      margin: 5px 0 6px;
      color: #292624;
      font-size: 21px;
      letter-spacing: 0;
    }

    .profile-form-head p {
      max-width: 520px;
      margin: 0;
      color: #7b7672;
      font-size: 14px;
      line-height: 1.55;
    }

    .step-eyebrow,
    .privacy-pill {
      display: inline-flex;
      align-items: center;
      border: 1px solid rgba(255, 255, 255, .64);
      border-radius: 999px;
      background: rgba(255, 255, 255, .42);
      color: #6d6864;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
      font-size: 12px;
      font-weight: 720;
    }

    .step-eyebrow {
      padding: 7px 10px;
    }

    .privacy-pill {
      flex: 0 0 auto;
      padding: 9px 12px;
    }

    #profileForm .field,
    #profileForm .slider-field {
      padding: 13px;
      border: 1px solid rgba(255, 255, 255, .54);
      border-radius: 24px;
      background:
        linear-gradient(145deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .2)),
        rgba(255, 255, 255, .28);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .78),
        0 12px 26px rgba(76, 70, 66, .055);
    }

    #profileForm .field label,
    #profileForm .slider-head label {
      color: #77716d;
      font-size: 12px;
      font-weight: 730;
    }

    #profileForm input:not([type="range"]),
    #profileForm select {
      height: 44px;
      border-radius: 18px;
      background: rgba(255, 255, 255, .58);
      border-color: rgba(255, 255, 255, .74);
      color: #292624;
      font-weight: 760;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
    }

    #profileForm .slider-value {
      min-width: 58px;
      justify-content: center;
      padding: 6px 9px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .54);
      color: #292624;
      font-weight: 800;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
    }

    #profileForm input[type="range"] {
      height: 10px;
      background:
        linear-gradient(90deg, rgba(79, 132, 255, .32), rgba(238, 169, 190, .26)),
        rgba(255, 255, 255, .42);
      box-shadow: inset 0 1px 2px rgba(76, 70, 66, .1);
    }

    #profileForm input[type="range"]::-webkit-slider-thumb {
      width: 26px;
      height: 26px;
      border: 1px solid rgba(255, 255, 255, .86);
      background: rgba(255, 255, 255, .92);
      box-shadow:
        0 10px 22px rgba(76, 70, 66, .18),
        inset 0 1px 0 rgba(255, 255, 255, .96);
    }

    #profileForm .choice-grid {
      gap: 9px;
    }

    #profileForm [data-choice-group="gender"],
    #profileForm [data-choice-group="lookingFor"] {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #profileForm .choiceBtn {
      min-height: 42px;
      justify-content: center;
      gap: 8px;
      border-radius: 18px;
      background: rgba(255, 255, 255, .42);
      border-color: rgba(255, 255, 255, .66);
      color: #4b4744;
      font-weight: 720;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .78),
        0 10px 22px rgba(76, 70, 66, .045);
    }

    #profileForm [data-choice-group="gender"] .choiceBtn,
    #profileForm [data-choice-group="lookingFor"] .choiceBtn {
      min-height: 72px;
      flex-direction: column;
      border-radius: 24px;
      font-size: 13px;
    }

    #profileForm .choiceBtn::before {
      content: "";
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      border-radius: 999px;
      background: rgba(255, 255, 255, .62);
      color: #6c6763;
      font-size: 15px;
      font-weight: 850;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
    }

    #profileForm .choiceBtn[data-value="Male"]::before {
      content: "\2642";
      color: #3977e8;
      background: rgba(217, 230, 255, .84);
    }

    #profileForm .choiceBtn[data-value="Female"]::before {
      content: "\2640";
      color: #d6578b;
      background: rgba(255, 224, 235, .9);
    }

    #profileForm .choiceBtn[data-value="Other"]::before {
      content: "\25CB";
      color: #7b6ee6;
      background: rgba(230, 226, 255, .86);
    }

    #profileForm .choiceBtn[data-value="Open"]::before {
      content: "\221E";
      color: #7b6ee6;
      background: rgba(230, 226, 255, .86);
    }

    #profileForm .choiceBtn[data-value="Hong Kong Island"]::before,
    #profileForm .choiceBtn[data-value="Kowloon"]::before,
    #profileForm .choiceBtn[data-value="New Territories"]::before {
      content: "\2302";
      color: #78614a;
      background: rgba(245, 231, 212, .86);
    }

    #profileForm .choiceBtn[data-value="Slim"]::before,
    #profileForm .choiceBtn[data-value="Average"]::before,
    #profileForm .choiceBtn[data-value="Athletic"]::before,
    #profileForm .choiceBtn[data-value="Curvy"]::before {
      content: "\25C7";
      color: #746e68;
      background: rgba(238, 235, 231, .88);
    }

    #profileForm .choiceBtn[data-value="Dating / see how it goes"]::before,
    #profileForm .choiceBtn[data-value="Serious relationship"]::before,
    #profileForm .choiceBtn[data-value="Friends first"]::before {
      content: "\2661";
      color: #d36d86;
      background: rgba(255, 229, 235, .86);
    }

    #profileForm .choiceBtn.active {
      color: #2a2725;
      background:
        linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .4)),
        rgba(255, 255, 255, .5);
      border-color: rgba(255, 255, 255, .9);
      box-shadow:
        0 14px 28px rgba(76, 70, 66, .08),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    }

    #profileForm .choiceBtn[data-value="Male"].active {
      background:
        radial-gradient(circle at 85% 16%, rgba(89, 142, 255, .32), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(219, 232, 255, .46));
    }

    #profileForm .choiceBtn[data-value="Female"].active {
      background:
        radial-gradient(circle at 85% 16%, rgba(245, 133, 176, .34), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 226, 236, .5));
    }

    #profileForm .choiceBtn[data-value="Open"].active,
    #profileForm .choiceBtn[data-value="Other"].active {
      background:
        radial-gradient(circle at 85% 16%, rgba(129, 113, 236, .26), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(230, 226, 255, .46));
    }

    #profileForm .primary {
      min-height: 50px;
      padding-inline: 22px;
      border-radius: 20px;
      color: #fffdf9;
      background:
        linear-gradient(145deg, rgba(65, 60, 56, .96), rgba(34, 31, 29, .96));
      border-color: rgba(255, 255, 255, .36);
      box-shadow:
        0 18px 34px rgba(42, 37, 33, .18),
        inset 0 1px 0 rgba(255, 255, 255, .18);
    }

    #profileForm .primary:hover {
      background:
        linear-gradient(145deg, rgba(76, 70, 65, .98), rgba(39, 36, 34, .98));
      border-color: rgba(255, 255, 255, .48);
    }

    #profileForm .status-line {
      padding: 10px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .34);
      color: #77716d;
    }

    #profileForm .actions {
      justify-content: flex-end;
    }

    .summary-person {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      border: 1px solid rgba(255, 255, 255, .62);
      border-radius: 24px;
      background:
        radial-gradient(circle at 90% 16%, rgba(180, 212, 255, .28), transparent 30%),
        rgba(255, 255, 255, .36);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
    }

    .summary-person > div {
      min-width: 0;
      flex: 1;
    }

    .profile-card-edit {
      flex: 0 0 auto;
      min-height: 32px;
      padding: 7px 11px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
    }

    .summary-avatar {
      width: 48px;
      height: 48px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      color: #fffdf9;
      background: linear-gradient(145deg, #3f3a36, #211f1d);
      font-weight: 850;
      box-shadow: 0 14px 28px rgba(42, 37, 33, .16);
    }

    .summary-person strong {
      display: block;
      color: #292624;
      font-size: 18px;
      line-height: 1.2;
    }

    .summary-person span:last-child {
      display: block;
      margin-top: 3px;
      color: #7b7672;
      font-size: 13px;
    }

    .status-line {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .analysis-output {
      display: grid;
      gap: 14px;
      min-height: 150px;
      border-radius: 24px;
      padding: 20px;
      color: #332f2b;
      background: rgba(255, 255, 255, .28);
      box-shadow: inset 8px 8px 18px rgba(196, 189, 181, .55), inset -8px -8px 18px rgba(255, 255, 255, .82);
    }

    .vibe-summary {
      margin: 0;
      color: #312d29;
      font-size: 17px;
      line-height: 1.65;
      font-weight: 680;
    }

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

    .vibe-tags span {
      border-radius: 999px;
      padding: 8px 11px;
      color: #5b5550;
      background: rgba(255, 255, 255, .35);
      box-shadow: 5px 5px 12px rgba(196, 189, 181, .36), -5px -5px 12px rgba(255, 255, 255, .72);
      font-size: 12px;
      font-weight: 760;
    }

    .me-vibe-card {
      display: none;
      gap: 14px;
      margin-top: 18px;
      border-radius: 24px;
      padding: 18px;
      background: rgba(255, 255, 255, .24);
      box-shadow: inset 7px 7px 16px rgba(196, 189, 181, .48), inset -7px -7px 16px rgba(255, 255, 255, .78);
    }

    .me-vibe-card.show {
      display: grid;
    }

    .mobile-logout-btn {
      display: none;
    }

    .meter {
      height: 8px;
      background: #252b38;
      border-radius: 999px;
      overflow: hidden;
    }

    .meter span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--cyan), var(--green));
    }

    .result-card {
      display: grid;
      gap: 12px;
    }

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

    .person {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .avatar {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: #283244;
      display: grid;
      place-items: center;
      font-weight: 800;
      flex: 0 0 auto;
    }

    .name {
      font-weight: 760;
    }

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

    .score {
      border: 1px solid rgba(74, 222, 128, .4);
      background: rgba(74, 222, 128, .1);
      color: #bbf7d0;
      border-radius: 999px;
      padding: 5px 9px;
      font-size: 12px;
      white-space: nowrap;
    }

    .score-large {
      font-size: 34px;
      font-weight: 850;
      color: #bbf7d0;
      line-height: 1;
    }

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

    .signal-row {
      display: grid;
      grid-template-columns: 92px 1fr 38px;
      gap: 8px;
      align-items: center;
      color: var(--soft);
      font-size: 12px;
    }

    .chat-room {
      overflow: hidden;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      height: 100%;
      min-height: 0;
    }

    .chat-shell {
      display: grid;
      grid-template-rows: minmax(0, 1fr);
      height: min(68vh, 680px);
      min-height: 520px;
      min-height: min(520px, calc(100vh - 190px));
    }

    .chat-list-inline {
      display: none !important;
    }

    .chat-list {
      display: grid;
      align-content: start;
      gap: 4px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(21, 25, 34, .92);
    }

    .chat-contact {
      width: 100%;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      text-align: left;
      padding: 11px 10px;
      border-radius: 16px;
      position: relative;
    }

    .chat-contact span:last-child {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .chat-contact strong,
    .chat-contact em {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .chat-contact em {
      color: var(--muted);
      font-size: 12px;
      font-style: normal;
    }

    .chat-contact.active {
      color: #fff;
      background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
      border-color: transparent;
    }

    .chat-contact.active em {
      color: rgba(255, 255, 255, .82);
    }

    .unread-dot {
      width: 9px;
      height: 9px;
      border-radius: 999px;
      background: #ff3b5f;
      box-shadow: 0 0 0 4px rgba(255, 59, 95, .12), 0 4px 10px rgba(255, 59, 95, .32);
    }

    .chat-empty {
      padding: 14px;
      color: var(--muted);
      font-size: 13px;
      text-align: center;
    }

    .right-chat-panel {
      gap: 8px;
      padding: 14px;
    }

    .right-chat-panel .chat-list {
      padding: 0;
      gap: 2px;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      overflow: auto;
    }

    .right-chat-panel .chat-contact {
      min-height: 64px;
      border: 0;
      border-radius: 18px;
      background: transparent;
      box-shadow: none;
    }

    .right-chat-panel .chat-contact:hover {
      background: rgba(255, 255, 255, .34);
    }

    .right-chat-panel .chat-contact.active {
      color: var(--text);
      background:
        radial-gradient(circle at 92% 8%, rgba(255, 95, 148, .18), transparent 32%),
        radial-gradient(circle at 12% 100%, rgba(79, 132, 255, .16), transparent 34%),
        rgba(255, 255, 255, .5);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72), 0 12px 26px rgba(72, 65, 58, .06);
    }

    .right-chat-panel .chat-contact.active em {
      color: var(--muted);
    }

    .chat-head {
      padding: 13px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border-bottom: 1px solid var(--line);
      background: #111720;
    }

    .chat-back-btn {
      display: none;
    }

    .chat-body {
      padding: 14px;
      display: grid;
      align-content: start;
      gap: 10px;
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    .bubble {
      width: fit-content;
      max-width: min(76%, 520px);
      padding: 10px 12px;
      border-radius: 8px;
      line-height: 1.45;
      color: #e7edf6;
      background: #202838;
      border: 1px solid #30384a;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .bubble.me {
      justify-self: end;
      background: #e6f8ef;
      color: #0c1210;
      border-color: #e6f8ef;
    }

    .bubble.system {
      justify-self: center;
      max-width: 86%;
      color: var(--muted);
      background: rgba(255, 255, 255, .28);
      border-style: dashed;
      font-size: 12px;
    }

    .chat-tools {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      padding: 12px;
      border-top: 1px solid var(--line);
    }

    .toast {
      position: fixed;
      left: 50%;
      bottom: 18px;
      transform: translateX(-50%) translateY(20px);
      opacity: 0;
      pointer-events: none;
      background: #f3f6fa;
      color: #111827;
      border-radius: 8px;
      padding: 10px 14px;
      font-weight: 720;
      box-shadow: 0 12px 34px rgba(0,0,0,.35);
      transition: opacity .2s ease, transform .2s ease;
    }

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

    /* Apple-style light theme */
    :root {
      color-scheme: light;
      --bg: #f5f5f7;
      --panel: #ffffff;
      --panel-2: #f9fafb;
      --line: #e5e5ea;
      --muted: #6e6e73;
      --text: #1d1d1f;
      --soft: #3a3a3c;
      --green: #34c759;
      --cyan: #007aff;
      --rose: #ff3b30;
      --amber: #ff9f0a;
      --radius: 14px;
    }

    body {
      background:
        radial-gradient(circle at 18% 12%, rgba(0, 122, 255, .16), transparent 28%),
        radial-gradient(circle at 80% 8%, rgba(52, 199, 89, .12), transparent 24%),
        linear-gradient(145deg, #fbfbfd 0%, #f5f5f7 44%, #eef2f7 100%);
      color: var(--text);
    }

    button {
      color: var(--text);
      border-color: rgba(255, 255, 255, .72);
      background: rgba(255, 255, 255, .58);
      border-radius: 999px;
      backdrop-filter: blur(18px);
      box-shadow: 0 8px 20px rgba(31, 41, 55, .06), inset 0 1px 0 rgba(255, 255, 255, .7);
    }

    button:hover {
      border-color: rgba(0, 122, 255, .28);
      background: rgba(255, 255, 255, .82);
      transform: translateY(-1px);
    }

    button:disabled,
    button:disabled:hover {
      cursor: not-allowed;
      opacity: .55;
      transform: none;
      border-color: rgba(255, 255, 255, .72);
      background: rgba(255, 255, 255, .58);
      box-shadow: 0 8px 20px rgba(31, 41, 55, .06), inset 0 1px 0 rgba(255, 255, 255, .7);
    }

    button.primary,
    .choiceBtn.active,
    .questionBtn.primary {
      color: #ffffff;
      background: #007aff;
      border-color: #007aff;
      box-shadow: 0 6px 16px rgba(0, 122, 255, .18);
    }

    button.primary:disabled,
    button.primary:disabled:hover {
      color: #7b7b82;
      background: rgba(255, 255, 255, .58);
      border-color: rgba(255, 255, 255, .72);
      box-shadow: 0 8px 20px rgba(31, 41, 55, .06), inset 0 1px 0 rgba(255, 255, 255, .7);
    }

    .app {
      background: transparent;
    }

    .sidebar,
    .right {
      background: rgba(255, 255, 255, .54);
      backdrop-filter: blur(26px) saturate(1.45);
      border-color: rgba(255, 255, 255, .72);
      box-shadow: inset -1px 0 0 rgba(255, 255, 255, .45);
    }

    .brand-logo {
      border-left-color: #1d1d1f;
      border-bottom-color: #1d1d1f;
    }

    .brand-logo::before,
    .brand-logo::after {
      background: #1d1d1f;
    }

    .brand-name,
    .login-name,
    .slider-value {
      color: #1d1d1f;
    }

    .brand-subtitle,
    .nav button,
    .nav-icon,
    .field label,
    .slider-head,
    .completion-row,
    .signal-row,
    .status-line,
    .meta {
      color: #6e6e73;
    }

    .nav button.active {
      color: #1d1d1f;
      background: rgba(255, 255, 255, .72);
      border-color: rgba(255, 255, 255, .86);
      box-shadow: 0 10px 22px rgba(31, 41, 55, .08), inset 0 1px 0 rgba(255, 255, 255, .75);
    }

    .nav button.active .nav-icon {
      color: #007aff;
    }

    .sidebar-note,
    .login-chip,
    .panel,
    .card,
    .form-card,
    .chat-room,
    .flow-step {
      background: rgba(255, 255, 255, .62);
      border-color: rgba(255, 255, 255, .82);
      backdrop-filter: blur(24px) saturate(1.25);
      box-shadow:
        0 20px 60px rgba(31, 41, 55, .08),
        0 2px 10px rgba(31, 41, 55, .04),
        inset 0 1px 0 rgba(255, 255, 255, .78);
    }

    .sidebar-note {
      color: #6e6e73;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .64);
    }

    .login-chip {
      border-radius: 18px;
      background: rgba(255, 255, 255, .68);
      box-shadow: 0 18px 40px rgba(31, 41, 55, .1), inset 0 1px 0 rgba(255, 255, 255, .8);
    }

    .login-avatar,
    .step-kicker {
      color: #ffffff;
      background: #1d1d1f;
    }

    .main {
      background: rgba(255, 255, 255, .16);
    }

    .topbar,
    .page-title,
    .chat-head,
    .chat-tools {
      border-color: rgba(255, 255, 255, .64);
    }

    .topbar {
      background: rgba(255, 255, 255, .38);
      backdrop-filter: blur(22px) saturate(1.25);
    }

    .topbar p,
    .page-title p,
    .panel p,
    .card p,
    .flow-step span {
      color: #6e6e73;
    }

    .chat-head {
      background: rgba(255, 255, 255, .52);
      backdrop-filter: blur(18px);
    }

    input,
    textarea {
      color: #1d1d1f;
      border-color: rgba(255, 255, 255, .78);
      background: rgba(255, 255, 255, .58);
      border-radius: 12px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
    }

    input:focus,
    textarea:focus {
      border-color: #007aff;
      box-shadow: 0 0 0 4px rgba(0, 122, 255, .12);
    }

    input[type="range"] {
      background: rgba(120, 120, 128, .22);
      accent-color: #007aff;
      box-shadow: none;
    }

    input[type="range"]::-webkit-slider-thumb {
      background: #ffffff;
      border-color: #007aff;
      box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    }

    .choiceBtn {
      color: #1d1d1f;
      background: rgba(255, 255, 255, .54);
    }

    .tag {
      color: #3a3a3c;
      background: rgba(255, 255, 255, .48);
      border-color: rgba(255, 255, 255, .74);
    }

    .tag.match {
      color: #007aff;
      background: rgba(0, 122, 255, .1);
      border-color: rgba(0, 122, 255, .18);
    }

    .tag.off {
      color: #ff3b30;
      background: #fff1f0;
      border-color: #ffd6d2;
    }

    .meter {
      background: rgba(120, 120, 128, .22);
    }

    .meter span {
      background: linear-gradient(90deg, #007aff, #34c759);
    }

    .score,
    .score-large {
      color: #007aff;
    }

    .score {
      background: #eef6ff;
      border-color: #cfe7ff;
    }

    .avatar {
      color: #ffffff;
      background: #1d1d1f;
    }

    .bubble {
      color: #1d1d1f;
      background: rgba(255, 255, 255, .58);
      border-color: rgba(255, 255, 255, .76);
      backdrop-filter: blur(18px);
    }

    .bubble.me {
      color: #ffffff;
      background: #007aff;
      border-color: #007aff;
    }

    .toast {
      color: #ffffff;
      background: #1d1d1f;
      box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
    }

    /* Soft iOS device-inspired theme */
    :root {
      --app-pink: #ff5f8f;
      --app-blue: #4f8cff;
      --app-ink: #2b2928;
      --app-muted: #8b8580;
      --app-card: rgba(255, 251, 248, .78);
      --bg: #d8d9d2;
      --panel: rgba(248, 242, 239, .72);
      --panel-2: rgba(255, 255, 255, .52);
      --line: rgba(255, 255, 255, .62);
      --muted: #8f8b89;
      --text: #2d2928;
      --soft: #5f5a57;
      --green: #b9d89a;
      --cyan: #f0b17f;
      --radius: 26px;
    }

    body {
      background:
        radial-gradient(circle at 18% 4%, rgba(255, 128, 165, .22), transparent 26%),
        radial-gradient(circle at 82% 0%, rgba(85, 144, 255, .18), transparent 28%),
        radial-gradient(circle at 50% 88%, rgba(255, 186, 132, .16), transparent 32%),
        linear-gradient(180deg, #f2ede7 0%, #deded6 100%);
    }

    .app {
      min-height: 100vh;
      padding: 34px;
      gap: 22px;
      grid-template-columns: 280px minmax(560px, 1fr) 300px;
      align-items: stretch;
      background: transparent;
    }

    .sidebar,
    .main,
    .right {
      border: 1px solid rgba(255, 255, 255, .58);
      border-radius: 36px;
      background: rgba(246, 240, 237, .64);
      backdrop-filter: blur(30px) saturate(1.08);
      box-shadow:
        0 28px 70px rgba(69, 67, 62, .22),
        inset 0 1px 0 rgba(255, 255, 255, .74),
        inset 0 -16px 36px rgba(255, 255, 255, .24);
      overflow: hidden;
    }

    .sidebar,
    .right {
      padding: 18px;
    }

    .main {
      min-height: calc(100vh - 68px);
      max-height: calc(100vh - 68px);
    }

    .brand-logo {
      width: 22px;
      height: 22px;
      border-left-color: #2d2928;
      border-bottom-color: #2d2928;
    }

    .brand-logo::before,
    .brand-logo::after {
      background: #2d2928;
    }

    .brand-name {
      color: #2d2928;
      font-size: 17px;
      letter-spacing: -.01em;
    }

    .brand-subtitle {
      color: #8f8b89;
    }

    .nav {
      gap: 8px;
    }

    .nav button {
      min-height: 44px;
      border-radius: 18px;
      color: #77716e;
      background: transparent;
      box-shadow: none;
    }

    .nav button.active {
      color: #2d2928;
      background: rgba(255, 255, 255, .48);
      border-color: rgba(255, 255, 255, .62);
      box-shadow:
        0 12px 28px rgba(76, 70, 66, .08),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    }

    .nav button.active .nav-icon {
      color: #2d2928;
    }

    .topbar {
      padding: 22px 26px 14px;
      background: transparent;
      border-bottom: 0;
      backdrop-filter: none;
    }

    .topbar h1 {
      max-width: 520px;
      font-size: clamp(28px, 4vw, 44px);
      line-height: .98;
      letter-spacing: -.04em;
      font-weight: 760;
      color: #2d2928;
    }

    .topbar p,
    .page-title p,
    .panel p,
    .card p,
    .flow-step span {
      color: #8f8b89;
    }

    .workspace {
      padding: 14px 22px 24px;
    }

    .page-title {
      border-bottom: 0;
      padding-bottom: 0;
    }

    .page-title h2 {
      color: #2d2928;
      font-size: 24px;
      letter-spacing: -.025em;
    }

    .panel,
    .card,
    .form-card,
    .chat-list,
    .chat-room,
    .flow-step,
    .sidebar-note,
    .login-chip {
      border: 1px solid rgba(255, 255, 255, .54);
      border-radius: 28px;
      background: rgba(255, 255, 255, .4);
      backdrop-filter: blur(22px) saturate(1.05);
      box-shadow:
        0 18px 40px rgba(76, 70, 66, .09),
        inset 0 1px 0 rgba(255, 255, 255, .72);
    }

    .panel,
    .card,
    .form-card {
      padding: 18px;
    }

    .card h3,
    .panel h3,
    .right h2 {
      color: #2d2928;
      letter-spacing: -.015em;
    }

    .flow-step {
      min-height: 150px;
      background: rgba(255, 255, 255, .34);
    }

    .step-kicker,
    .avatar,
    .login-avatar {
      color: #2d2928;
      background: rgba(255, 255, 255, .72);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 8px 18px rgba(76, 70, 66, .08);
    }

    button,
    input,
    textarea,
    .choiceBtn {
      border-color: rgba(255, 255, 255, .58);
      background: rgba(255, 255, 255, .38);
      color: #2d2928;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 10px 24px rgba(76, 70, 66, .06);
    }

    button:hover,
    .choiceBtn:hover {
      background: rgba(255, 255, 255, .6);
      border-color: rgba(255, 255, 255, .78);
    }

    button.primary,
    .choiceBtn.active,
    .questionBtn.primary {
      color: #fff;
      background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
      border-color: rgba(255, 255, 255, .8);
      box-shadow:
        0 16px 28px rgba(79, 140, 255, .18),
        inset 0 1px 0 rgba(255, 255, 255, .32);
    }

    input[type="range"] {
      height: 9px;
      background: rgba(115, 110, 105, .16);
    }

    input[type="range"]::-webkit-slider-thumb {
      width: 24px;
      height: 24px;
      border: 0;
      background: #fbf8f5;
      box-shadow: 0 8px 18px rgba(76, 70, 66, .2), inset 0 1px 0 rgba(255, 255, 255, .9);
    }

    .tag {
      color: #5f5a57;
      background: rgba(255, 255, 255, .34);
      border-color: rgba(255, 255, 255, .58);
    }

    .tag.match {
      color: #476326;
      background: rgba(216, 238, 178, .48);
      border-color: rgba(255, 255, 255, .62);
    }

    .meter {
      height: 9px;
      background: rgba(115, 110, 105, .14);
    }

    .meter span {
      background: linear-gradient(90deg, var(--app-pink), var(--app-blue));
    }

    .score,
    .score-large {
      color: #2d2928;
    }

    .score {
      background: rgba(216, 238, 178, .46);
      border-color: rgba(255, 255, 255, .7);
    }

    .score-large {
      font-size: 42px;
      letter-spacing: -.045em;
    }

    .bubble {
      background: rgba(255, 255, 255, .46);
      border-color: rgba(255, 255, 255, .62);
      color: #2d2928;
    }

    .bubble.me {
      background: rgba(216, 238, 178, .72);
      border-color: rgba(255, 255, 255, .72);
      color: #2d2928;
    }

    .toast {
      color: #2d2928;
      background: rgba(255, 255, 255, .82);
      backdrop-filter: blur(18px);
      box-shadow: 0 20px 44px rgba(76, 70, 66, .2);
    }

    /* Reference-tuned glass: neutral cards with small internal glows */
    .main {
      border-radius: 42px;
      box-shadow:
        0 34px 90px rgba(69, 67, 62, .26),
        inset 0 1px 0 rgba(255, 255, 255, .78),
        inset 0 -22px 42px rgba(255, 255, 255, .22);
    }

    .panel,
    .card,
    .form-card,
    .flow-step,
    .chat-room,
    .login-chip,
    .sidebar-note {
      position: relative;
      overflow: hidden;
      background:
        linear-gradient(145deg, rgba(255, 255, 255, .56), rgba(246, 238, 233, .24)),
        rgba(250, 246, 242, .38);
      border-color: rgba(255, 255, 255, .68);
    }

    .panel::after,
    .card::after,
    .form-card::after,
    .flow-step::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, .38), transparent 34%),
        linear-gradient(90deg, rgba(255, 255, 255, .18), transparent 46%);
      mix-blend-mode: screen;
    }

    .panel > *,
    .card > *,
    .form-card > *,
    .flow-step > * {
      position: relative;
      z-index: 1;
    }

    .right .panel:nth-child(1)::before {
      content: "";
      position: absolute;
      width: 170px;
      height: 170px;
      right: -42px;
      top: -48px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(190, 222, 139, .86), rgba(190, 222, 139, .22) 48%, transparent 70%);
      filter: blur(2px);
      pointer-events: none;
    }

    .right .panel:nth-child(2)::before {
      content: "";
      position: absolute;
      width: 150px;
      height: 150px;
      left: -50px;
      top: -38px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(239, 173, 124, .7), rgba(239, 173, 124, .18) 48%, transparent 72%);
      pointer-events: none;
    }

    .form-card::before {
      content: "";
      position: absolute;
      width: 220px;
      height: 180px;
      right: -90px;
      top: -80px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(255, 255, 255, .58), rgba(220, 235, 205, .18) 45%, transparent 72%);
      pointer-events: none;
    }

    .question-card::before {
      content: "";
      position: absolute;
      width: 124px;
      height: 124px;
      right: -42px;
      top: -50px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(245, 190, 145, .22), transparent 70%);
      pointer-events: none;
    }

    .question-card:nth-child(even)::before {
      background: radial-gradient(circle, rgba(190, 222, 139, .26), transparent 70%);
    }

    .question-meta span {
      border-color: rgba(255, 255, 255, .58);
      background: rgba(255, 255, 255, .34);
      color: #6d6864;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    }

    .signal-row {
      padding: 7px;
      border-radius: 18px;
      background: rgba(255, 255, 255, .28);
      border: 1px solid rgba(255, 255, 255, .42);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .46);
    }

    .signal-row strong {
      color: var(--text);
      font-size: 12px;
      white-space: nowrap;
    }

    .score-large {
      padding: 6px 0;
      text-shadow: 0 1px 0 rgba(255, 255, 255, .58);
    }

    .ai-budget-panel {
      justify-items: start;
    }

    .ai-budget-chart {
      --ai-budget-used: 0%;
      width: min(160px, 100%);
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      border-radius: 999px;
      background:
        radial-gradient(circle, rgba(255, 251, 248, .94) 0 55%, transparent 56%),
        conic-gradient(var(--app-pink) 0 var(--ai-budget-used), rgba(79, 140, 255, .2) var(--ai-budget-used) 100%);
      box-shadow:
        0 18px 38px rgba(72, 65, 58, .1),
        inset 0 1px 0 rgba(255, 255, 255, .72);
    }

    .ai-budget-chart > div {
      width: 74%;
      height: 74%;
      display: grid;
      place-items: center;
      align-content: center;
      gap: 2px;
      text-align: center;
      border-radius: 999px;
      background: rgba(255, 251, 248, .78);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    }

    .ai-budget-chart strong {
      color: var(--text);
      font-size: 28px;
      font-weight: 900;
      letter-spacing: -.03em;
      line-height: 1;
    }

    .ai-budget-chart span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 760;
      line-height: 1.15;
    }

    .tag,
    .choiceBtn,
    .questionBtn,
    .score {
      backdrop-filter: blur(14px) saturate(1.08);
    }

    .tag.match {
      background:
        linear-gradient(135deg, rgba(221, 243, 184, .62), rgba(255, 255, 255, .2)),
        rgba(255, 255, 255, .18);
    }

    .meter {
      box-shadow: inset 0 1px 2px rgba(76, 70, 66, .12), inset 0 -1px 0 rgba(255, 255, 255, .44);
    }

    .meter span {
      box-shadow: 0 4px 14px rgba(186, 156, 118, .22);
    }

    #profileForm {
      padding: 20px;
      gap: 18px;
    }

    #profileForm::before {
      background: radial-gradient(circle, rgba(180, 212, 255, .24), rgba(255, 255, 255, .16) 42%, transparent 72%);
    }

    .profile-form-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      padding: 4px 2px 10px;
    }

    .profile-form-head h3 {
      margin: 5px 0 6px;
      color: #292624;
      font-size: 21px;
      letter-spacing: 0;
    }

    .profile-form-head p {
      max-width: 520px;
      margin: 0;
      color: #7b7672;
      font-size: 14px;
      line-height: 1.55;
    }

    .step-eyebrow,
    .privacy-pill {
      display: inline-flex;
      align-items: center;
      border: 1px solid rgba(255, 255, 255, .64);
      border-radius: 999px;
      background: rgba(255, 255, 255, .42);
      color: #6d6864;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
      font-size: 12px;
      font-weight: 720;
    }

    .step-eyebrow {
      padding: 7px 10px;
    }

    .privacy-pill {
      flex: 0 0 auto;
      padding: 9px 12px;
    }

    #profileForm .field,
    #profileForm .slider-field {
      padding: 13px;
      border: 1px solid rgba(255, 255, 255, .54);
      border-radius: 24px;
      background:
        linear-gradient(145deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .2)),
        rgba(255, 255, 255, .28);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .78),
        0 12px 26px rgba(76, 70, 66, .055);
    }

    #profileForm input:not([type="range"]),
    #profileForm select {
      height: 44px;
      border-radius: 18px;
      background: rgba(255, 255, 255, .58);
      border-color: rgba(255, 255, 255, .74);
      color: #292624;
      font-weight: 760;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
    }

    #profileForm .slider-value {
      min-width: 58px;
      justify-content: center;
      padding: 6px 9px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .54);
      color: #292624;
      font-weight: 800;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
    }

    #profileForm input[type="range"] {
      height: 10px;
      background:
        linear-gradient(90deg, rgba(79, 132, 255, .32), rgba(238, 169, 190, .26)),
        rgba(255, 255, 255, .42);
      box-shadow: inset 0 1px 2px rgba(76, 70, 66, .1);
    }

    #profileForm input[type="range"]::-webkit-slider-thumb {
      width: 26px;
      height: 26px;
      border: 1px solid rgba(255, 255, 255, .86);
      background: rgba(255, 255, 255, .92);
      box-shadow: 0 10px 22px rgba(76, 70, 66, .18), inset 0 1px 0 rgba(255, 255, 255, .96);
    }

    #profileForm [data-choice-group="gender"],
    #profileForm [data-choice-group="lookingFor"] {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #profileForm .choiceBtn {
      min-height: 42px;
      justify-content: center;
      gap: 8px;
      border-radius: 18px;
      background: rgba(255, 255, 255, .42);
      border-color: rgba(255, 255, 255, .66);
      color: #4b4744;
      font-weight: 720;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78), 0 10px 22px rgba(76, 70, 66, .045);
    }

    #profileForm [data-choice-group="gender"] .choiceBtn,
    #profileForm [data-choice-group="lookingFor"] .choiceBtn {
      min-height: 72px;
      flex-direction: column;
      border-radius: 24px;
      font-size: 13px;
    }

    #profileForm .choiceBtn::before {
      content: "";
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      border-radius: 999px;
      background: rgba(255, 255, 255, .62);
      color: #6c6763;
      font-size: 15px;
      font-weight: 850;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
    }

    #profileForm .choiceBtn[data-value="Male"]::before {
      content: "\2642";
      color: #3977e8;
      background: rgba(217, 230, 255, .84);
    }

    #profileForm .choiceBtn[data-value="Female"]::before {
      content: "\2640";
      color: #d6578b;
      background: rgba(255, 224, 235, .9);
    }

    #profileForm .choiceBtn[data-value="Other"]::before {
      content: "\25CB";
      color: #7b6ee6;
      background: rgba(230, 226, 255, .86);
    }

    #profileForm .choiceBtn[data-value="Open"]::before {
      content: "\221E";
      color: #7b6ee6;
      background: rgba(230, 226, 255, .86);
    }

    #profileForm .choiceBtn[data-value="Hong Kong Island"]::before,
    #profileForm .choiceBtn[data-value="Kowloon"]::before,
    #profileForm .choiceBtn[data-value="New Territories"]::before {
      content: "\2302";
      color: #78614a;
      background: rgba(245, 231, 212, .86);
    }

    #profileForm .choiceBtn[data-value="Slim"]::before,
    #profileForm .choiceBtn[data-value="Average"]::before,
    #profileForm .choiceBtn[data-value="Athletic"]::before,
    #profileForm .choiceBtn[data-value="Curvy"]::before {
      content: "\25C7";
      color: #746e68;
      background: rgba(238, 235, 231, .88);
    }

    #profileForm .choiceBtn[data-value="Dating / see how it goes"]::before,
    #profileForm .choiceBtn[data-value="Serious relationship"]::before,
    #profileForm .choiceBtn[data-value="Friends first"]::before {
      content: "\2661";
      color: #d36d86;
      background: rgba(255, 229, 235, .86);
    }

    #profileForm .choiceBtn.active {
      color: #2a2725;
      background: linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .4)), rgba(255, 255, 255, .5);
      border-color: rgba(65, 60, 56, .24);
      box-shadow:
        0 14px 28px rgba(76, 70, 66, .08),
        inset 0 1px 0 rgba(255, 255, 255, .9),
        inset 0 0 0 1px rgba(255, 255, 255, .46);
    }

    #profileForm .choiceBtn[data-value="Male"].active {
      background: radial-gradient(circle at 85% 16%, rgba(89, 142, 255, .32), transparent 34%), linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(219, 232, 255, .46));
    }

    #profileForm .choiceBtn[data-value="Female"].active {
      background: radial-gradient(circle at 85% 16%, rgba(245, 133, 176, .34), transparent 34%), linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 226, 236, .5));
    }

    #profileForm .choiceBtn[data-value="Open"].active,
    #profileForm .choiceBtn[data-value="Other"].active {
      background: radial-gradient(circle at 85% 16%, rgba(129, 113, 236, .26), transparent 34%), linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(230, 226, 255, .46));
    }

    #profileForm .primary {
      min-height: 50px;
      padding-inline: 22px;
      border-radius: 20px;
      color: #fffdf9;
      background: linear-gradient(145deg, rgba(65, 60, 56, .96), rgba(34, 31, 29, .96));
      border-color: rgba(255, 255, 255, .36);
      box-shadow: 0 18px 34px rgba(42, 37, 33, .18), inset 0 1px 0 rgba(255, 255, 255, .18);
    }

    #profileForm .primary:hover {
      background: linear-gradient(145deg, rgba(76, 70, 65, .98), rgba(39, 36, 34, .98));
      border-color: rgba(255, 255, 255, .48);
    }

    #profileForm .status-line {
      padding: 10px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .34);
      color: #77716d;
    }

    .summary-person {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      border: 1px solid rgba(255, 255, 255, .62);
      border-radius: 24px;
      background: radial-gradient(circle at 90% 16%, rgba(180, 212, 255, .28), transparent 30%), rgba(255, 255, 255, .36);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
    }

    .summary-avatar {
      width: 48px;
      height: 48px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      color: #fffdf9;
      background: linear-gradient(145deg, #3f3a36, #211f1d);
      font-weight: 850;
      box-shadow: 0 14px 28px rgba(42, 37, 33, .16);
    }

    .summary-person strong {
      display: block;
      color: #292624;
      font-size: 18px;
      line-height: 1.2;
    }

    .summary-person span:last-child {
      display: block;
      margin-top: 3px;
      color: #7b7672;
      font-size: 13px;
    }

    #profileForm [data-choice-group="location"],
    #profileForm [data-choice-group="gender"],
    #profileForm [data-choice-group="lookingFor"],
    #profileForm [data-choice-group="purpose"] {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #profileForm [data-choice-group="bodyType"] .choiceBtn::before,
    #profileForm [data-choice-group="purpose"] .choiceBtn::before,
    #profileForm [data-choice-group="location"] .choiceBtn::before {
      display: none;
    }

    #profileForm [data-choice-group="bodyType"] .choiceBtn,
    #profileForm [data-choice-group="purpose"] .choiceBtn,
    #profileForm [data-choice-group="location"] .choiceBtn {
      min-height: 46px;
      padding-inline: 16px;
    }

    #profileForm [data-choice-group="gender"] .choiceBtn::before,
    #profileForm [data-choice-group="lookingFor"] .choiceBtn::before {
      display: inline-grid;
    }

    #profileForm [data-choice-group="purpose"] .choiceBtn[data-value="Relationship"].active {
      background:
        radial-gradient(circle at 88% 18%, rgba(245, 133, 176, .24), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 231, 238, .42));
    }

    #profileForm [data-choice-group="purpose"] .choiceBtn[data-value="Friend only"].active {
      background:
        radial-gradient(circle at 88% 18%, rgba(180, 212, 255, .25), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(222, 234, 255, .42));
    }

    /* Profile neumorphism pass: same surface color, raised buttons, inset inputs */
    #profilePage,
    #questionsPage {
      --neo-surface: #eeeae4;
      --neo-text: #292624;
      --neo-muted: #68625d;
      --neo-shadow: rgba(132, 124, 113, .34);
      --neo-light: rgba(255, 255, 255, .82);
      --male: #4f84ff;
      --female: #ef6fa2;
    }

    #profileForm,
    #profileSummary {
      background: var(--neo-surface);
      border: 0;
      box-shadow:
        -14px -14px 28px var(--neo-light),
        16px 16px 34px var(--neo-shadow);
    }

    #profileForm::before,
    #profileForm::after,
    #profileSummary::before,
    #profileSummary::after {
      display: none;
    }

    #profileForm .profile-form-head h3,
    #profileSummary h3 {
      color: var(--neo-text);
    }

    #profileForm .profile-form-head p,
    #profileSummary p,
    #profileForm .field label,
    #profileForm .slider-head label,
    #profileForm .status-line,
    .summary-tile span {
      color: var(--neo-muted);
    }

    #profileForm .field,
    #profileForm .slider-field,
    .summary-person,
    .summary-tile {
      background: var(--neo-surface);
      border: 0;
      box-shadow:
        -8px -8px 18px var(--neo-light),
        9px 9px 20px rgba(132, 124, 113, .22);
    }

    #profileForm input:not([type="range"]),
    #profileForm select {
      background: var(--neo-surface);
      border: 0;
      box-shadow:
        inset 7px 7px 14px rgba(132, 124, 113, .22),
        inset -7px -7px 14px rgba(255, 255, 255, .82);
    }

    #profileForm .step-eyebrow,
    #profileForm .privacy-pill,
    #profileForm .slider-value,
    #profileForm .status-line,
    #profileSummary .lock-pill {
      background: var(--neo-surface);
      border: 0;
      box-shadow:
        -5px -5px 12px rgba(255, 255, 255, .78),
        6px 6px 14px rgba(132, 124, 113, .2);
    }

    #profileForm input[type="range"] {
      height: 16px;
      border-radius: 999px;
      background: #e1dcd5;
      box-shadow:
        inset 6px 6px 11px rgba(118, 110, 100, .26),
        inset -6px -6px 11px rgba(255, 255, 255, .82);
    }

    #profileForm input[type="range"]::-webkit-slider-thumb {
      width: 32px;
      height: 32px;
      background:
        linear-gradient(145deg, #fbf8f3, #ddd7cf);
      border: 0;
      box-shadow:
        -6px -6px 12px rgba(255, 255, 255, .92),
        8px 8px 16px rgba(104, 96, 87, .38);
    }

    #profileForm .choiceBtn {
      background: var(--neo-surface);
      border: 0;
      color: var(--neo-text);
      box-shadow:
        -7px -7px 15px rgba(255, 255, 255, .82),
        8px 8px 17px rgba(132, 124, 113, .23);
    }

    #profileForm .choiceBtn:hover {
      background: var(--neo-surface);
      box-shadow:
        -5px -5px 12px rgba(255, 255, 255, .82),
        6px 6px 14px rgba(132, 124, 113, .24);
    }

    #profileForm .choiceBtn.active {
      background: var(--neo-surface);
      border: 0;
      box-shadow:
        inset 7px 7px 14px rgba(132, 124, 113, .23),
        inset -7px -7px 14px rgba(255, 255, 255, .82);
    }

    #profileForm .choiceBtn[data-value="Male"].active {
      color: #245fca;
      background:
        linear-gradient(145deg, rgba(219, 230, 255, .78), rgba(238, 241, 245, .4)),
        var(--neo-surface);
      box-shadow:
        inset 7px 7px 14px rgba(62, 103, 188, .2),
        inset -7px -7px 14px rgba(255, 255, 255, .82);
    }

    #profileForm .choiceBtn[data-value="Female"].active {
      color: #ba3f73;
      background:
        linear-gradient(145deg, rgba(255, 222, 235, .86), rgba(238, 241, 245, .42)),
        var(--neo-surface);
      box-shadow:
        inset 7px 7px 14px rgba(187, 68, 112, .18),
        inset -7px -7px 14px rgba(255, 255, 255, .82);
    }

    #profileForm [data-choice-group="purpose"] .choiceBtn[data-value="Friend only"].active,
    #profileForm [data-choice-group="purpose"] .choiceBtn[data-value="Relationship"].active,
    #profileForm [data-choice-group="location"] .choiceBtn.active,
    #profileForm [data-choice-group="bodyType"] .choiceBtn.active {
      color: var(--neo-text);
      background: #e7e2db;
      box-shadow:
        inset 7px 7px 14px rgba(118, 110, 100, .28),
        inset -7px -7px 14px rgba(255, 255, 255, .8),
        inset 0 0 0 1px rgba(92, 84, 76, .08);
    }

    #profileForm .choiceBtn::before {
      background: var(--neo-surface);
      box-shadow:
        inset 3px 3px 7px rgba(132, 124, 113, .18),
        inset -3px -3px 7px rgba(255, 255, 255, .85);
    }

    #profileForm .choiceBtn[data-value="Male"]::before {
      color: var(--male);
    }

    #profileForm .choiceBtn[data-value="Female"]::before {
      color: var(--female);
    }

    #profileForm .primary {
      color: #fffdf9;
      background: linear-gradient(145deg, #403b37, #282522);
      box-shadow:
        -7px -7px 15px rgba(255, 255, 255, .55),
        10px 10px 20px rgba(92, 84, 76, .35);
    }

    #profileForm .primary:hover {
      background: linear-gradient(145deg, #49443f, #2d2926);
      box-shadow:
        -5px -5px 12px rgba(255, 255, 255, .52),
        8px 8px 18px rgba(92, 84, 76, .38);
    }

    .summary-tile::after {
      opacity: .28;
    }

    @media (max-width: 1080px) {
      .app {
        grid-template-columns: 248px minmax(0, 1fr);
      }
      .right {
        display: none;
      }
      .flow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .grid-2 {
        grid-template-columns: 1fr;
      }
      .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    @media (max-width: 760px) {
      .app {
        grid-template-columns: 1fr;
      }
      .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
      }
      .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .sidebar-note {
        display: none;
      }
      .flow-grid {
        grid-template-columns: 1fr;
      }
      .workspace {
        padding: 14px;
      }
      .summary-head {
        display: grid;
      }
      .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .snapshot-name-row {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .snapshot-gender {
      display: inline-block;
      color: #245fca;
      background: transparent;
      font-size: 18px;
      font-weight: 850;
      line-height: 1;
      box-shadow: none;
    }

    .snapshot-gender.female {
      color: #ba3f73;
      background: transparent;
      box-shadow: none;
    }

    .preference-form {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
    }

    .preference-form.saved {
      display: none;
    }

    .preference-snapshot {
      display: none;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      align-items: stretch;
      position: relative;
      padding: 46px 14px 14px;
      border-radius: 26px;
      background:
        radial-gradient(circle at 92% 10%, rgba(255, 95, 143, .13), transparent 34%),
        radial-gradient(circle at 6% 0%, rgba(79, 140, 255, .12), transparent 38%),
        rgba(255, 251, 248, .48);
      box-shadow:
        -8px -8px 18px rgba(255, 255, 255, .62),
        9px 9px 20px rgba(132, 124, 113, .12),
        inset 0 1px 0 rgba(255, 255, 255, .72);
    }

    .preference-snapshot.show {
      display: grid;
    }

    .preference-snapshot-head {
      position: absolute;
      top: 10px;
      left: 14px;
      right: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .preference-snapshot-head span {
      color: var(--neo-muted);
      font-size: 12px;
      font-weight: 820;
    }

    .preference-snapshot-head .ghost-btn {
      min-height: 30px;
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 850;
    }

    .preference-chip {
      min-width: 0;
      padding: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .pref-icon {
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      margin-bottom: 7px;
      border-radius: 999px;
      font-style: normal;
      font-size: 17px;
      font-weight: 900;
      color: #fff;
      background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
      box-shadow: 0 10px 18px rgba(79, 140, 255, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    }

    .pref-icon.male {
      background: linear-gradient(135deg, #4f8cff, #7a9dff);
    }

    .pref-icon.female {
      background: linear-gradient(135deg, var(--app-pink), #ff83ad);
    }

    .pref-icon.age-icon {
      background: linear-gradient(135deg, #ffb066, #ff5f8f);
    }

    .preference-chip span {
      display: block;
      margin-bottom: 7px;
      color: var(--neo-muted);
      font-size: 12px;
      font-weight: 760;
    }

    .preference-chip strong {
      color: var(--neo-text);
      font-size: 15px;
      line-height: 1.2;
    }

      #preferenceForm.saved {
        display: none;
      }

    #profileSummary .preference-field {
      min-width: 0;
      padding: 14px;
      border-radius: 24px;
      background: var(--neo-surface);
      border: 0;
      box-shadow:
        -8px -8px 18px var(--neo-light),
        9px 9px 20px rgba(132, 124, 113, .22);
    }

    #profileSummary .preference-field label {
      display: block;
      margin-bottom: 11px;
      color: var(--neo-muted);
      font-size: 12px;
      font-weight: 760;
    }

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

    #profileSummary .choiceBtn {
      min-height: 58px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
      padding-inline: 10px;
      border: 0;
      border-radius: 20px;
      background: var(--neo-surface);
      color: var(--neo-text);
      font-weight: 780;
      line-height: 1.15;
      text-align: center;
      white-space: normal;
      overflow-wrap: anywhere;
      box-shadow:
        -7px -7px 15px rgba(255, 255, 255, .82),
        8px 8px 17px rgba(132, 124, 113, .23);
    }

    #profileSummary .choiceBtn::before {
      display: none;
      content: none;
    }

    #profileSummary .choiceBtn.active {
      color: #fff;
      background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
      box-shadow:
        0 16px 28px rgba(79, 140, 255, .18),
        inset 0 1px 0 rgba(255, 255, 255, .32);
    }

    #profileSummary .choiceBtn[data-value="Male"].active {
      color: #fff;
      background: linear-gradient(135deg, #4f8cff, #7a9dff);
    }

    #profileSummary .choiceBtn[data-value="Female"].active {
      color: #fff;
      background: linear-gradient(135deg, var(--app-pink), #ff83ad);
    }

    #profileSummary [data-choice-group="purpose"] .choiceBtn.active {
      color: #fff;
      background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
    }

    #profileSummary .primary {
      min-height: 48px;
      padding-inline: 22px;
      border-radius: 20px;
      color: #fffdf9;
      background: linear-gradient(135deg, var(--app-pink), #ff7a59);
      box-shadow:
        0 16px 28px rgba(255, 95, 143, .24),
        inset 0 1px 0 rgba(255, 255, 255, .32);
    }

    #profileSummary .primary:hover {
      background: linear-gradient(135deg, #ff6d9b, #ff8668);
    }

    #profileSummary .actions {
      justify-content: flex-end;
    }

    #profileSummary #preferenceStatus {
      order: -1;
      margin-right: auto;
    }

    .summary-grid.compact {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .login-chip {
      margin-top: auto;
      background: #ebe6e0;
      border: 0;
      cursor: pointer;
      min-height: 48px;
      box-shadow:
        -6px -6px 14px rgba(255, 255, 255, .82),
        7px 7px 16px rgba(132, 124, 113, .22);
    }

    .login-chip:focus-visible {
      outline: 2px solid rgba(36, 95, 202, .75);
      outline-offset: 3px;
    }

    .login-chip.signed-in .login-avatar {
      background: linear-gradient(145deg, #2f73f0, #ba4a7d);
    }

    .login-avatar {
      color: #ffffff;
      background: linear-gradient(145deg, #34302d, #1f1d1b);
      box-shadow:
        0 8px 16px rgba(76, 70, 66, .22),
        inset 0 1px 0 rgba(255, 255, 255, .22);
    }

    .login-avatar svg {
      width: 15px;
      height: 15px;
      stroke: currentColor;
      stroke-width: 2.4;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .login-name {
      color: #333333;
    }

    .login-gear svg {
      color: #7a7570;
      stroke: currentColor;
    }

    .brand .brand-logo {
      width: 150px;
      max-width: 100%;
      max-height: 74px;
      height: auto;
      display: block;
      flex: 0 0 auto;
      border: 0 !important;
      border-radius: 0;
      object-fit: contain;
      box-shadow: none;
    }

    .brand-wordmark {
      min-height: 76px;
      padding: 0 0 6px;
    }

    .brand .brand-logo::before,
    .brand .brand-logo::after {
      display: none !important;
      content: none !important;
    }

    .auth-backdrop {
      position: fixed;
      inset: 0;
      z-index: 40;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(45, 41, 40, .22);
      backdrop-filter: blur(18px);
    }

    .auth-backdrop.show {
      display: flex;
    }

    .auth-dialog {
      width: min(420px, 100%);
      border: 1px solid rgba(255, 255, 255, .62);
      border-radius: 30px;
      background: #ebe6e0;
      box-shadow:
        -14px -14px 28px rgba(255, 255, 255, .66),
        18px 18px 48px rgba(92, 84, 76, .32);
      padding: 20px;
      display: grid;
      gap: 16px;
    }

    .auth-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
    }

    .auth-head h2 {
      margin: 0;
      color: #2d2928;
      font-size: 24px;
      letter-spacing: -.03em;
    }

    .auth-head p,
    .auth-status {
      margin: 5px 0 0;
      color: #7a7570;
      font-size: 13px;
      line-height: 1.45;
    }

    .auth-status:empty {
      display: none;
    }

    .auth-close {
      width: 38px;
      min-height: 38px;
      padding: 0;
      border-radius: 999px;
      font-size: 20px;
      line-height: 1;
    }

    .modal-close {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 38px;
      min-height: 38px;
      padding: 0;
      border-radius: 999px;
      font-size: 20px;
      line-height: 1;
      background: rgba(255, 255, 255, .52);
    }

    .auth-form {
      display: grid;
      gap: 12px;
    }

    .auth-mode-switch {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding: 6px;
      border-radius: 999px;
      background: #ebe6e0;
      box-shadow:
        inset 5px 5px 12px rgba(132, 124, 113, .18),
        inset -5px -5px 12px rgba(255, 255, 255, .78);
    }

    .auth-mode-switch button {
      min-height: 38px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      box-shadow: none;
      color: #7a7570;
      font-weight: 780;
    }

    .auth-mode-switch button.active {
      background: #ebe6e0;
      color: #2d2928;
      box-shadow:
        -5px -5px 12px rgba(255, 255, 255, .82),
        6px 6px 14px rgba(132, 124, 113, .22);
    }

    .auth-form label {
      display: grid;
      gap: 7px;
      color: #6d6864;
      font-size: 12px;
      font-weight: 760;
    }

    .auth-form input {
      min-height: 48px;
      border: 0;
      border-radius: 18px;
      background: #ebe6e0;
      box-shadow:
        inset 6px 6px 14px rgba(132, 124, 113, .22),
        inset -6px -6px 14px rgba(255, 255, 255, .82);
      padding: 0 14px;
    }

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

    .auth-gender-btn {
      min-height: 48px;
      border: 0;
      border-radius: 18px;
      background: #ebe6e0;
      color: #2d2928;
      font-weight: 780;
      box-shadow:
        -6px -6px 14px rgba(255, 255, 255, .78),
        7px 7px 16px rgba(132, 124, 113, .2);
    }

    .auth-gender-btn.active[data-value="male"] {
      color: #245fca;
      background:
        linear-gradient(145deg, rgba(219, 230, 255, .82), rgba(235, 230, 224, .5)),
        #ebe6e0;
      box-shadow:
        inset 6px 6px 12px rgba(62, 103, 188, .18),
        inset -6px -6px 12px rgba(255, 255, 255, .78);
    }

    .auth-gender-btn.active[data-value="female"] {
      color: #ba3f73;
      background:
        linear-gradient(145deg, rgba(255, 222, 235, .86), rgba(235, 230, 224, .5)),
        #ebe6e0;
      box-shadow:
        inset 6px 6px 12px rgba(187, 68, 112, .16),
        inset -6px -6px 12px rgba(255, 255, 255, .78);
    }

    .auth-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .auth-dialog .primary {
      color: #fffdf9;
      background: linear-gradient(145deg, #403b37, #282522);
      border: 0;
      box-shadow:
        -7px -7px 15px rgba(255, 255, 255, .55),
        10px 10px 20px rgba(92, 84, 76, .35);
    }

    .auth-dialog [hidden] {
      display: none !important;
    }

    @media (max-width: 1080px) {
      .summary-grid.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    @media (max-width: 760px) {
      .preference-form {
        grid-template-columns: 1fr;
      }

      .preference-snapshot {
        grid-template-columns: 1fr;
      }

      .login-chip {
        margin-top: 0;
      }

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

    /* Final responsive app shell pass */
    @media (max-width: 1320px) and (min-width: 821px) {
      .app {
        grid-template-columns: 238px minmax(0, 1fr);
        padding: 24px;
        gap: 18px;
      }

      .right {
        display: none;
      }

      .main {
        min-height: calc(100svh - 48px);
        max-height: calc(100svh - 48px);
      }

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

    @media (max-width: 1180px) {
      body {
        min-height: 100svh;
      }

      .app {
        grid-template-columns: 232px minmax(0, 1fr);
        padding: 22px;
        gap: 16px;
      }

      .right {
        display: none;
      }

      .sidebar {
        border-radius: 30px;
        padding: 16px;
      }

      .brand .brand-logo {
        width: 132px;
        max-height: 64px;
      }

      .brand-wordmark {
        min-height: 66px;
      }

      .main {
        min-height: calc(100svh - 44px);
        max-height: calc(100svh - 44px);
      }

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

    @media (max-width: 820px) {
      html {
        scroll-behavior: smooth;
      }

      body {
        overflow-y: auto;
        -webkit-text-size-adjust: 100%;
      }

      .app {
        display: block;
        min-height: 100svh;
        width: 100%;
        padding: 12px;
      }

      .sidebar {
        position: sticky;
        top: 8px;
        z-index: 20;
        margin: 0 0 12px;
        padding: 12px;
        border-radius: 28px;
        gap: 10px;
        overflow: visible;
      }

      .brand-wordmark {
        min-height: 0;
        padding: 0;
        justify-content: center;
      }

      .brand .brand-logo {
        width: 118px;
        max-height: 54px;
      }

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

      .nav button {
        min-height: 44px;
        padding: 8px 7px;
        border-radius: 17px;
        gap: 6px;
        justify-content: center;
        text-align: center;
        font-size: 12px;
        line-height: 1.1;
      }

      .nav-icon {
        width: 18px;
        height: 18px;
      }

      .nav-icon svg {
        width: 17px;
        height: 17px;
      }

      .login-chip {
        margin-top: 0;
        min-height: 42px;
        padding: 8px 10px;
        border-radius: 18px;
      }

      .login-avatar {
        width: 24px;
        height: 24px;
      }

      .login-name {
        font-size: 13px;
      }

      .login-gear {
        width: 17px;
        height: 17px;
      }

      .sidebar-note {
        display: none;
      }

      .main {
        min-height: auto;
        max-height: none;
        border-radius: 30px;
        overflow: visible;
      }

      .topbar {
        display: none;
      }

      .workspace {
        overflow: visible;
        min-height: auto;
        padding: 16px;
        gap: 14px;
      }

      .page {
        gap: 14px;
      }

      .page-title h2 {
        font-size: 25px;
        line-height: 1.05;
      }

      .page-title p {
        font-size: 13px;
      }

      .panel,
      .card,
      .form-card {
        padding: 15px;
        border-radius: 26px;
      }

      .flow-grid {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .flow-step {
        min-height: 96px;
        grid-template-columns: auto 1fr;
        align-items: center;
        align-content: center;
        column-gap: 12px;
      }

      .flow-step span {
        grid-column: 2;
      }

      .step-kicker {
        grid-row: span 2;
      }

      .grid-2,
      .summary-grid,
      .summary-grid.compact,
      .preference-snapshot {
        grid-template-columns: 1fr;
      }

      #profileForm {
        padding: 14px;
        gap: 14px;
      }

      .profile-form-head,
      .summary-head {
        display: grid;
        gap: 10px;
      }

      .privacy-pill,
      .summary-tools {
        justify-self: start;
      }

      .summary-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
      }

      .summary-tools .lock-pill {
        display: none;
      }

      #profileForm .field,
      #profileForm .slider-field,
      #profileSummary .preference-field {
        padding: 12px;
        border-radius: 22px;
      }

      .date-grid {
        grid-template-columns: 1.1fr .9fr .9fr;
        gap: 7px;
      }

      input,
      select,
      textarea,
      #profileForm input:not([type="range"]),
      #profileForm select {
        min-height: 46px;
        font-size: 16px;
      }

      textarea,
      .question-textarea {
        min-height: 118px;
      }

      #profileForm [data-choice-group="gender"],
      #profileForm [data-choice-group="lookingFor"],
      #profileSummary .choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

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

      #profileSummary .preference-field {
        padding: 10px;
      }

      #profileSummary .preference-field:nth-child(3) {
        grid-column: 1 / -1;
      }

      #profileForm .choice-grid,
      #profileSummary .choice-grid {
        display: grid;
        gap: 9px;
      }

      .choiceBtn,
      #profileSummary .choiceBtn {
        width: 100%;
        min-height: 42px;
        padding: 9px 7px;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.18;
        font-size: 13px;
      }

      #profileForm [data-choice-group="gender"] .choiceBtn,
      #profileForm [data-choice-group="lookingFor"] .choiceBtn {
        min-height: 60px;
      }

      [data-choice-group="ageGapPreference"] {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .mobile-logout-btn {
        display: block;
      }

      .actions,
      #profileForm .actions,
      #profileSummary .actions,
      .auth-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: stretch;
      }

      .actions .primary,
      .actions button,
      .auth-actions button {
        width: 100%;
      }

      .status-line {
        order: 2;
        width: 100%;
        text-align: left;
      }

      .summary-person {
        align-items: center;
        border-radius: 22px;
      }

      .summary-avatar {
        width: 44px;
        height: 44px;
        border-radius: 16px;
      }

      .summary-person strong {
        font-size: 17px;
      }

      .completion-row {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
      }

      .completion-row .ghost-btn {
        width: 100%;
      }

      .question-card {
        max-height: none;
      }

      .question-card h3 {
        font-size: 17px;
        line-height: 1.25;
      }

      .question-meta {
        gap: 6px;
      }

      .question-meta span {
        white-space: normal;
        overflow-wrap: anywhere;
        max-width: 100%;
      }

      .question-card .actions {
        grid-template-columns: 1fr;
      }

      .question-card .questionBtn {
        min-height: 48px;
      }

      .result-head,
      .chat-head {
        display: grid;
        justify-content: stretch;
      }

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

      .bubble {
        max-width: 92%;
      }

      .auth-backdrop {
        align-items: end;
        padding: 12px;
      }

      .auth-dialog {
        width: 100%;
        max-height: calc(100svh - 24px);
        overflow: auto;
        padding: 18px;
        border-radius: 28px;
      }
    }

    @media (max-width: 420px) {
      .app {
        padding: 9px;
      }

      .sidebar {
        top: 6px;
        padding: 10px;
        border-radius: 24px;
      }

      .brand .brand-logo {
        width: 104px;
        max-height: 46px;
      }

      .nav {
        gap: 6px;
      }

      .nav button {
        min-height: 42px;
        padding: 7px 5px;
        font-size: 11px;
      }

      .nav-icon {
        display: none;
      }

      .workspace {
        padding: 14px;
      }

      .panel,
      .card,
      .form-card {
        border-radius: 24px;
      }

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

      #profileForm [data-choice-group="ageGapPreference"],
      #profileForm .preference-field .choice-grid {
        grid-template-columns: 1fr;
      }

      .score-large {
        font-size: 36px;
      }
    }

    /* Mobile dating-app shell direction */
    @media (max-width: 820px) {
      :root {
        --app-pink: #ff5f8f;
        --app-blue: #4f8cff;
        --app-ink: #2b2928;
        --app-muted: #8b8580;
        --app-card: rgba(255, 251, 248, .78);
      }

      body {
        background:
          radial-gradient(circle at 18% 4%, rgba(255, 128, 165, .22), transparent 26%),
          radial-gradient(circle at 82% 0%, rgba(85, 144, 255, .18), transparent 28%),
          linear-gradient(180deg, #f2ede7 0%, #deded6 100%);
      }

      .app {
        max-width: 460px;
        margin: 0 auto;
        padding: 10px 10px 86px;
      }

      .main {
        min-height: calc(100svh - 96px);
        border-radius: 34px;
        box-shadow:
          0 26px 70px rgba(72, 65, 58, .18),
          inset 0 1px 0 rgba(255, 255, 255, .78);
      }

      .topbar {
        display: none;
        position: sticky;
        top: 0;
        z-index: 12;
        align-items: center;
        justify-content: space-between;
        padding: 18px 18px 10px;
        border: 0;
        background:
          linear-gradient(180deg, rgba(246, 240, 237, .92), rgba(246, 240, 237, .64) 70%, transparent);
        backdrop-filter: blur(18px);
      }

      .topbar h1 {
        font-size: 30px;
        letter-spacing: -.04em;
      }

      .topbar p {
        display: none;
      }

      .topbar::after {
        content: none;
        display: none;
        width: 42px;
        height: 42px;
        border-radius: 999px;
        background:
          url("assets/triangel-mark.svg") center / 30px 30px no-repeat,
          rgba(255, 255, 255, .58);
        box-shadow:
          0 12px 24px rgba(72, 65, 58, .1),
          inset 0 1px 0 rgba(255, 255, 255, .82);
      }

      .workspace {
        padding: 14px 14px 18px;
      }

      .page-title {
        display: none;
      }

      .sidebar {
        position: fixed;
        left: max(10px, calc((100vw - 440px) / 2 + 10px));
        right: max(10px, calc((100vw - 440px) / 2 + 10px));
        bottom: 10px;
        top: auto;
        z-index: 30;
        width: auto;
        transform: none;
        margin: 0;
        padding: 8px;
        border-radius: 28px;
        background: rgba(255, 251, 248, .82);
        backdrop-filter: blur(26px) saturate(1.18);
        box-shadow:
          0 22px 54px rgba(72, 65, 58, .22),
          inset 0 1px 0 rgba(255, 255, 255, .82);
      }

      .brand-wordmark {
        display: none;
      }

      .nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
      }

      .nav button {
        width: 100%;
        min-width: 0;
        flex: 1 1 0;
        min-height: 54px;
        max-height: 54px;
        padding: 6px 4px;
        border: 1px solid transparent;
        border-radius: 20px;
        font-size: 10px;
        font-weight: 800;
        color: #9b938e;
        background: transparent;
        box-shadow: none;
        transform: none !important;
        touch-action: manipulation;
      }

      .nav button:hover,
      .nav button:active,
      .nav button:focus-visible {
        transform: none !important;
      }

      .nav button > span:last-child {
        display: none;
      }

      .nav button.active {
        color: var(--app-ink);
        border-color: rgba(255, 255, 255, .7);
        background:
          linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(255, 232, 239, .62));
        box-shadow:
          0 12px 22px rgba(255, 95, 143, .12),
          inset 0 1px 0 rgba(255, 255, 255, .92);
      }

      .nav button.active .nav-icon {
        color: var(--app-pink);
      }

      .nav-icon {
        display: grid;
        width: 21px;
        height: 21px;
      }

      .nav-icon svg {
        width: 20px;
        height: 20px;
      }

      #adminNavBtn {
        display: none !important;
      }

      .login-chip {
        display: none;
      }

      .login-avatar {
        width: 30px;
        height: 30px;
      }

      .login-name,
      .login-gear {
        display: none;
      }

      .panel,
      .card,
      .form-card,
      .chat-list,
      .chat-room,
      .flow-step {
        background: var(--app-card);
        border-color: rgba(255, 255, 255, .76);
        box-shadow:
          0 18px 42px rgba(72, 65, 58, .11),
          inset 0 1px 0 rgba(255, 255, 255, .82);
      }

      #dashboardPage .panel {
        min-height: 138px;
        align-content: end;
        padding: 20px;
        background:
          radial-gradient(circle at 85% 12%, rgba(255, 95, 143, .32), transparent 28%),
          radial-gradient(circle at 12% 0%, rgba(79, 140, 255, .22), transparent 30%),
          linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 241, 245, .54));
      }

      #dashboardPage .panel h3 {
        font-size: 24px;
        letter-spacing: -.035em;
      }

      #dashboardPage .panel p {
        max-width: 280px;
        font-size: 16px;
      }

      .flow-grid {
        display: grid;
        gap: 12px;
      }

      .flow-step {
        min-height: 82px;
        border-radius: 30px;
        transform: none;
      }

      .flow-step strong {
        font-size: 16px;
      }

      .step-kicker {
        color: #fff;
        background: linear-gradient(145deg, var(--app-pink), var(--app-blue));
      }

      #profileForm,
      #profileSummary,
      #questionsPage .card,
      .question-card,
      .result-card,
      .chat-room {
        border-radius: 32px;
      }

      .profile-form-head h3,
      .summary-head h3,
      .question-card h3,
      .result-card .name {
        font-size: 22px;
        letter-spacing: -.035em;
      }

      .summary-person {
        border-radius: 28px;
        background:
          radial-gradient(circle at 100% 0%, rgba(255, 95, 143, .18), transparent 32%),
          rgba(255, 255, 255, .52);
      }

      .summary-avatar,
      .avatar {
        color: #fff;
        background: linear-gradient(145deg, var(--app-pink), var(--app-blue));
      }

      #profileForm .primary,
      #profileSummary .primary,
      .auth-dialog .primary,
      button.primary {
        min-height: 52px;
        color: #fff;
        background: linear-gradient(135deg, var(--app-pink), #ff7a59);
        box-shadow:
          0 16px 28px rgba(255, 95, 143, .24),
          inset 0 1px 0 rgba(255, 255, 255, .32);
      }

      .choiceBtn.active,
      .questionBtn.primary {
        color: #fff;
        background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
        box-shadow:
          0 16px 28px rgba(79, 140, 255, .18),
          inset 0 1px 0 rgba(255, 255, 255, .32);
      }

      .question-card {
        min-height: 320px;
        padding: 18px;
        background:
          radial-gradient(circle at 90% 8%, rgba(255, 95, 143, .2), transparent 28%),
          radial-gradient(circle at 10% 0%, rgba(79, 140, 255, .16), transparent 30%),
          rgba(255, 251, 248, .8);
      }

      .question-card .actions {
        margin-top: auto;
      }

      .question-card .questionBtn {
        min-height: 54px;
        border-radius: 999px;
        font-size: 15px;
      }

      .question-meta {
        margin-top: 8px;
      }

      .question-meta span {
        font-size: 10px;
        border-radius: 999px;
      }

      .completion-row .ghost-btn,
      .ghost-btn {
        min-height: 44px;
        border-radius: 999px;
      }

      .score {
        color: #fff;
        background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
        border: 0;
      }

      .chat-body {
        min-height: 0;
      }

      .bubble {
        border-radius: 22px 22px 22px 8px;
      }

      .bubble.me {
        border-radius: 22px 22px 8px 22px;
        color: #fff;
        background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
      }
    }

    @media (min-width: 961px) {
      .app {
        grid-template-columns: 280px minmax(560px, 880px) 300px;
        justify-content: center;
      }

      .main {
        width: 100%;
        max-width: 880px;
      }

      .right {
        display: grid;
      }

      .workspace {
        padding: 28px 24px 34px;
      }

      .page-title {
        border-bottom: 0;
        padding-bottom: 2px;
      }

      .page-title h2 {
        font-size: 34px;
        letter-spacing: -.045em;
      }

      .page-title p {
        max-width: 360px;
      }

      #analysisPage .panel {
        gap: 16px;
        border-radius: 34px;
        padding: 20px;
      }

      #analysisPage .grid-2 {
        grid-template-columns: 1fr;
      }

      #analysisPage .card {
        border-radius: 28px;
      }

      #analysisPage .actions {
        justify-content: flex-end;
      }

      #analysisPage .primary {
        min-height: 52px;
        padding-inline: 22px;
      }
    }

    @media (max-width: 820px) {
      .admin-head {
        align-items: stretch;
        flex-direction: column;
      }

      .admin-head .primary {
        width: 100%;
        min-height: 48px;
      }

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

      .admin-stat {
        min-height: 76px;
        border-radius: 20px;
      }

      .admin-stat strong {
        font-size: 24px;
      }

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

      .admin-detail-actions .primary {
        width: 100%;
      }

      .admin-table-wrap {
        margin-inline: -2px;
        border-radius: 20px;
      }

      .chat-shell {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr);
        height: calc(100svh - 112px);
        min-height: 0;
        position: relative;
      }

      .chat-list-inline {
        display: none !important;
      }

      .chat-page-active:not(.chat-thread-open) .chat-list-inline {
        display: grid !important;
        height: 100%;
        min-height: 0;
        grid-auto-flow: row;
        grid-auto-columns: auto;
        align-content: start;
        overflow: auto;
        padding: 16px 14px;
        border: 1px solid rgba(255, 255, 255, .68);
        border-radius: 34px;
        background:
          radial-gradient(circle at 85% 0%, rgba(255, 95, 143, .16), transparent 34%),
          radial-gradient(circle at 10% 100%, rgba(79, 140, 255, .12), transparent 32%),
          rgba(255, 251, 248, .76);
        backdrop-filter: blur(24px) saturate(1.12);
        box-shadow: none;
      }

      .chat-page-active:not(.chat-thread-open) .chat-list-inline::before {
        content: "Chats";
        display: block;
        margin: 2px 4px 10px;
        color: var(--app-ink);
        font-size: 22px;
        font-weight: 900;
        letter-spacing: -.02em;
      }

      .chat-page-active:not(.chat-thread-open) .chat-list-inline .chat-contact {
        min-height: 72px;
        padding: 12px;
        border-radius: 24px;
        background: rgba(255, 255, 255, .54);
        box-shadow:
          0 12px 24px rgba(72, 65, 58, .08),
          inset 0 1px 0 rgba(255, 255, 255, .85);
      }

      .chat-page-active:not(.chat-thread-open) .chat-list-inline .chat-contact.active {
        color: var(--app-ink);
        background:
          radial-gradient(circle at 92% 8%, rgba(255, 95, 143, .18), transparent 32%),
          rgba(255, 255, 255, .68);
      }

      .right-chat-panel {
        display: none !important;
      }

      .chat-list {
        grid-auto-flow: column;
        grid-auto-columns: minmax(180px, 1fr);
        overflow-x: auto;
      }

      .chat-page-active:not(.chat-thread-open) .chat-list-inline {
        grid-auto-flow: row;
        grid-auto-columns: auto;
      }

      .chat-page-active .workspace {
        height: calc(100svh - 96px);
        overflow: hidden;
        padding: 0;
        align-content: stretch;
      }

      .chat-page-active #chatPage.active {
        height: 100%;
        min-height: 0;
        display: grid;
        align-content: stretch;
        grid-template-rows: minmax(0, 1fr);
      }

      .chat-page-active .chat-shell {
        height: 100%;
        min-height: 0;
      }

      .chat-page-active:not(.chat-thread-open) .chat-room {
        display: none;
      }

      .chat-page-active .chat-room {
        min-height: 0;
        height: 100%;
        border: 0;
        border-radius: 34px;
        background:
          radial-gradient(circle at 85% 0%, rgba(255, 95, 143, .18), transparent 34%),
          radial-gradient(circle at 10% 100%, rgba(79, 140, 255, .14), transparent 32%),
          rgba(255, 251, 248, .76);
        box-shadow: none;
      }

      .chat-page-active:not(.chat-thread-open) .chat-room {
        display: none !important;
      }

      .chat-page-active .chat-head {
        min-height: 72px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, .58);
        background: rgba(255, 251, 248, .72);
        backdrop-filter: blur(22px) saturate(1.15);
      }

      .chat-page-active .chat-head .person {
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 10px;
      }

      .chat-page-active .chat-head .name,
      .chat-page-active .chat-head .meta {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .chat-page-active .chat-head .name {
        font-size: 15px;
        font-weight: 850;
      }

      .chat-page-active .chat-head .meta {
        font-size: 12px;
      }

      .chat-page-active #openerBtn {
        display: none;
      }

      .chat-page-active .chat-back-btn {
        display: inline-grid;
        place-items: center;
        order: -1;
        min-width: 38px;
        min-height: 38px;
        padding: 0;
        border-radius: 999px;
        font-size: 18px;
        font-weight: 850;
        color: var(--app-ink);
        background: rgba(255, 255, 255, .72);
        border-color: rgba(255, 255, 255, .82);
        box-shadow:
          0 10px 22px rgba(72, 65, 58, .1),
          inset 0 1px 0 rgba(255, 255, 255, .9);
      }

      .chat-page-active .chat-head .person {
        flex: 1 1 auto;
      }

      .chat-page-active .chat-body {
        padding: 14px 14px 12px;
        gap: 8px;
        min-height: 0;
        overflow-y: auto;
        background:
          linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 38%),
          transparent;
      }

      .chat-page-active .bubble {
        max-width: 78%;
        padding: 9px 12px;
        border-radius: 18px 18px 18px 6px;
        font-size: 14px;
        line-height: 1.42;
        box-shadow: 0 8px 18px rgba(72, 65, 58, .08);
      }

      .chat-page-active .bubble.me {
        border-radius: 18px 18px 6px 18px;
        background: linear-gradient(135deg, var(--app-pink), var(--app-blue));
        color: #fff;
      }

      .chat-page-active .bubble.system {
        max-width: 90%;
        box-shadow: none;
      }

      .chat-page-active .chat-tools {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 255, 255, .58);
        background: rgba(255, 251, 248, .74);
        backdrop-filter: blur(22px) saturate(1.15);
      }

      .chat-page-active .chat-tools input {
        min-height: 44px;
        border-radius: 999px;
        padding: 0 16px;
        background: rgba(255, 255, 255, .72);
        box-shadow: inset 0 1px 4px rgba(72, 65, 58, .08);
      }

      .chat-page-active .chat-tools .primary {
        min-width: 56px;
        min-height: 44px;
        padding: 0 16px;
        border-radius: 999px;
      }

      #preferenceForm.saved {
        display: none !important;
      }

      #preferenceSnapshot.show {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 42px 12px 12px;
      }

      .preference-chip {
        min-width: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
      }

      .pref-icon {
        width: 25px;
        height: 25px;
        margin-bottom: 5px;
        font-size: 14px;
      }

      .preference-chip span {
        margin-bottom: 4px;
        font-size: 9px;
        white-space: nowrap;
      }

      .preference-chip strong {
        display: block;
        font-size: clamp(9px, 2.25vw, 12px);
        line-height: 1.15;
        overflow-wrap: anywhere;
      }

      .preference-snapshot-head .ghost-btn {
        min-height: 28px;
        padding: 5px 10px;
      }

      .profile-card-edit {
        min-height: 30px;
        padding: 7px 10px;
        font-size: 11px;
      }
    }

    @media (max-width: 420px) {
      #preferenceSnapshot.show {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
      }

      .preference-chip {
        padding: 9px 7px;
      }

      .pref-icon {
        width: 23px;
        height: 23px;
        font-size: 13px;
      }

      .preference-chip span {
        font-size: 8.5px;
      }

      .preference-chip strong {
        font-size: clamp(8.5px, 2.5vw, 11px);
      }
    }

    .daily-hero {
      position: relative;
      overflow: hidden;
      gap: 14px;
      background:
        radial-gradient(circle at 92% 6%, rgba(255, 95, 143, .22), transparent 34%),
        radial-gradient(circle at 8% 0%, rgba(79, 140, 255, .18), transparent 38%),
        rgba(255, 251, 248, .66);
    }

    .daily-hero h3 {
      margin: 0;
      font-size: clamp(26px, 4vw, 44px);
      letter-spacing: 0;
      color: #2f2a27;
    }

    .daily-hero p {
      max-width: 620px;
      margin: 0;
      color: rgba(47, 42, 39, .68);
      line-height: 1.65;
    }

    .daily-primary {
      align-self: flex-start;
      min-width: 160px;
      border: 0;
      border-radius: 999px;
      color: #fff;
      background: linear-gradient(135deg, #ff5f8f, #6b8cff);
      box-shadow: 0 18px 32px rgba(255, 95, 143, .22);
    }

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

    .daily-task {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 9px 12px;
      align-items: center;
      min-height: 112px;
      padding: 18px;
      border: 1px solid rgba(255, 255, 255, .72);
      border-radius: 28px;
      text-align: left;
      color: #312b28;
      background:
        linear-gradient(145deg, rgba(255, 255, 255, .68), rgba(255, 250, 246, .44)),
        rgba(255, 251, 248, .54);
      box-shadow: 0 18px 38px rgba(72, 65, 58, .1), inset 0 1px 0 rgba(255, 255, 255, .8);
      cursor: pointer;
    }

    .daily-task .step-kicker {
      grid-row: 1 / span 2;
      width: 36px;
      height: 36px;
      margin: 0;
      border-radius: 13px;
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 900;
      background: linear-gradient(135deg, #ff5f8f, #6b8cff);
      box-shadow: 0 12px 20px rgba(107, 140, 255, .22);
    }

    .daily-task strong {
      font-size: 16px;
      line-height: 1.2;
    }

    .daily-task span:not(.step-kicker) {
      color: rgba(49, 43, 40, .58);
      line-height: 1.35;
    }

    .daily-task.is-done {
      background:
        radial-gradient(circle at 90% 10%, rgba(157, 220, 112, .22), transparent 38%),
        rgba(255, 251, 248, .56);
    }

    .daily-task.is-locked {
      opacity: .52;
      cursor: not-allowed;
    }

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

      .daily-hero {
        border-radius: 30px;
      }

      .daily-task {
        min-height: 92px;
        border-radius: 24px;
      }
    }

    .analysis-panel {
      gap: 18px;
    }

    .analysis-head {
      display: grid;
      gap: 8px;
    }

    .analysis-head h3 {
      margin: 0;
      font-size: clamp(26px, 4vw, 42px);
      letter-spacing: 0;
      color: #2f2a27;
    }

    .daily-complete-card {
      display: grid;
      gap: 14px;
      min-height: 220px;
      align-content: center;
      background:
        radial-gradient(circle at 88% 12%, rgba(157, 220, 112, .24), transparent 36%),
        radial-gradient(circle at 4% 0%, rgba(79, 140, 255, .16), transparent 38%),
        rgba(255, 251, 248, .58);
    }

    .daily-complete-card h3 {
      margin: 0;
      font-size: clamp(24px, 4vw, 36px);
      color: #2f2a27;
    }

    .daily-complete-card p {
      max-width: 520px;
      margin: 0;
      color: rgba(47, 42, 39, .68);
      line-height: 1.65;
    }

    #questionsPage > .card {
      background:
        radial-gradient(circle at 94% 8%, rgba(255, 95, 143, .14), transparent 34%),
        rgba(255, 251, 248, .54);
    }

    #matchingPage .panel > p {
      max-width: 680px;
      margin: 0;
      color: rgba(47, 42, 39, .68);
      line-height: 1.65;
    }

    #matchStatus {
      color: rgba(47, 42, 39, .72);
      font-weight: 760;
    }
