:root {
    color-scheme: dark;
    --bg: #111112;
    --bg-soft: #1a1a1d;
    --panel: #1f1f22;
    --panel-soft: #27272b;
    --ink: #f4f4f5;
    --muted: #9a9aa3;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #ff3b3b;
    --accent-strong: #00e7d0;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top center, rgba(255, 59, 59, 0.18), transparent 20%),
        linear-gradient(180deg, #0f1012 0%, #151519 100%);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(15, 16, 18, 0.78);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.topbar-logo {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
}

.topbar-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.topbar-wordmark {
    font-size: 18px;
}

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

.topbar-language {
    display: inline-flex;
    align-items: center;
}

.topbar-select {
    min-width: 132px;
    padding: 10px 34px 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.65) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.65) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.topbar-select:focus {
    outline: none;
    border-color: rgba(0, 231, 208, 0.24);
    box-shadow: 0 0 0 3px rgba(0, 231, 208, 0.08);
}

.topbar-button {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.topbar-button.active {
    background: rgba(0, 231, 208, 0.14);
    color: var(--accent-strong);
    border: 1px solid rgba(0, 231, 208, 0.24);
}

.topbar-debug-entry {
    background: rgba(0, 231, 208, 0.08);
    color: var(--accent-strong);
    border: 1px solid rgba(0, 231, 208, 0.18);
}

.debug-panel {
    position: fixed;
    top: 88px;
    right: 20px;
    width: min(360px, calc(100vw - 24px));
    padding: 18px;
    border-radius: 22px;
    background: rgba(22, 22, 26, 0.96);
    border: 1px solid rgba(0, 231, 208, 0.18);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.48);
    z-index: 40;
    display: none;
    gap: 16px;
}

.debug-panel.open {
    display: grid;
}

.debug-panel-header,
.debug-panel-actions,
.debug-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.debug-panel-kicker {
    margin-bottom: 4px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.debug-panel-header h3 {
    margin-bottom: 0;
}

.debug-panel-body {
    display: grid;
    gap: 14px;
}

.debug-toggle-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-strong);
}

.debug-panel-close,
.debug-danger {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
}

.debug-panel-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    color: var(--ink);
}

.debug-danger {
    background: rgba(255, 59, 59, 0.18);
    border: 1px solid rgba(255, 59, 59, 0.28);
    color: #ff9a9a;
}

.page {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 40px 0 64px;
}

.site-footer {
    padding: 0 0 28px;
}

.site-footer-inner {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    padding-top: 6px;
    display: grid;
    justify-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.site-footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer-links a:hover {
    color: var(--ink);
}

.site-footer-copy {
    margin: 0;
    text-align: center;
}

.hero,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-shell {
    padding: 14px 18px 18px;
    margin-bottom: 20px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #c7c7ce;
    font-size: 11px;
    white-space: nowrap;
}

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

a {
    color: inherit;
    text-decoration: none;
}

h1 {
    font-size: clamp(28px, 4.1vw, 44px);
    line-height: 1.05;
    margin-bottom: 10px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

h1 span {
    color: var(--accent);
}

.lede,
.panel-header p,
.status,
.meta,
.message {
    color: var(--muted);
}

.lede {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 15px;
    line-height: 1.45;
}

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

.bottom-grid {
    align-items: start;
}

.topup-status {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

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

.topup-panel,
.topup-success {
    padding: 24px;
}

.topup-panel .panel-header {
    text-align: left;
}

.topup-panel .panel-header h1,
.topup-panel .panel-header p {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    text-align: left;
}

.topup-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.topup-summary-card,
.topup-pack-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 20px;
}

.topup-balance,
.topup-user-type,
.topup-pack-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
}

.topup-pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.topup-choice-stack {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.topup-choice-group {
    display: grid;
    gap: 10px;
}

.topup-choice-title {
    margin: 0;
    font-size: 16px;
}

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

.topup-choice-item {
    width: 100%;
    display: grid;
    gap: 6px;
    justify-items: start;
    text-align: left;
    padding: 14px 16px 14px 46px;
    border-radius: 18px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    position: relative;
}

.topup-choice-item:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
}

.topup-choice-item::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    transform: translateY(-50%);
    background: transparent;
}

.topup-choice-item::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    transform: translateY(-50%) scale(0);
    background: var(--accent-strong);
    transition: transform 120ms ease;
}

.topup-choice-item-active {
    border-color: rgba(0, 231, 208, 0.38);
    background: rgba(0, 231, 208, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 231, 208, 0.14);
}

.topup-choice-item-active::before {
    border-color: rgba(0, 231, 208, 0.5);
}

.topup-choice-item-active::after {
    transform: translateY(-50%) scale(1);
}

.topup-choice-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topup-choice-main strong {
    font-size: 17px;
}

.topup-choice-sub {
    color: var(--muted);
    font-size: 14px;
}

.topup-pack-card h2 {
    margin-bottom: 8px;
}

.topup-pack-button {
    width: 100%;
    margin-top: 14px;
}

.topup-provider-note {
    margin-top: 18px;
}

.topup-order-card {
    padding: 24px;
}

.topup-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 10, 13, 0.78);
    backdrop-filter: blur(10px);
}

.topup-modal-card {
    width: min(720px, calc(100vw - 32px));
    max-height: min(88vh, 920px);
    overflow: auto;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.topup-success-card {
    width: min(420px, calc(100vw - 32px));
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
    padding: 28px 24px;
}

.topup-success-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(0, 231, 208, 0.12);
    color: var(--accent-strong);
    border: 1px solid rgba(0, 231, 208, 0.24);
}

.topup-success-icon .icon-badge {
    width: 22px;
    height: 22px;
}

.topup-success-card h2 {
    margin: 0;
    text-align: center;
}

.topup-success-button {
    min-width: 180px;
}

.topup-modal-header {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.topup-modal-close {
    justify-self: end;
    min-width: 88px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

.topup-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.topup-order-meta {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.topup-qr-wrap {
    margin-top: 20px;
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.topup-qr-image {
    width: min(320px, 100%);
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 18px;
    background: white;
    padding: 14px;
}

@media (max-width: 720px) {
    .topup-modal-backdrop {
        padding: 16px;
    }

    .topup-modal-card {
        width: min(100%, calc(100vw - 24px));
    }
}

.panel {
    padding: 24px;
    background: var(--bg-soft);
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header-inline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
}

.policy-panel {
    display: grid;
    gap: 18px;
}

.policy-lede {
    max-width: 760px;
}

.policy-richtext {
    max-width: 860px;
    color: var(--muted);
    line-height: 1.7;
}

.policy-richtext h2 {
    margin: 28px 0 10px;
    color: var(--ink);
    font-size: 22px;
}

.policy-richtext h2:first-child {
    margin-top: 0;
}

.policy-richtext p {
    margin: 0 0 14px;
}

button {
    width: auto;
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 14px 20px;
    font: inherit;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

button {
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease;
}

button:hover {
    transform: translateY(-1px);
    background: var(--accent-strong);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

button.secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    border: 1px solid var(--line);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 22px;
}

.instruction-list,
.timeline {
    display: grid;
    gap: 14px;
}

.instruction-card,
.timeline-item,
.stat-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.instruction-card {
    grid-template-columns: 40px 1fr;
    align-items: start;
}

.step {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 59, 59, 0.12);
    color: var(--accent);
    font-weight: 700;
}

.endpoint-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 20px;
    background: #141416;
    color: #d9fff9;
    border: 1px solid var(--line);
}

.endpoint-label,
.timeline-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.timeline-kicker,
.timeline-type,
.icon-line,
.event-place {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon-badge {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex: 0 0 auto;
}

.icon-badge svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

.endpoint-box code {
    display: block;
    overflow-wrap: anywhere;
    font-size: 14px;
}

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

.stats-panel {
    margin-bottom: 20px;
    padding: 18px 20px;
}

.stats-panel .panel-header {
    margin-bottom: 12px;
}

.stats-panel .status-grid {
    margin-bottom: 0;
}

.stats-panel .stat-card {
    padding: 12px 16px;
    border-radius: 18px;
}

.stats-panel .stat-card-link {
    gap: 4px;
}

.stats-panel .stat-value {
    font-size: 24px;
}

.stats-panel .stat-label {
    font-size: 14px;
}

.stat-card {
    align-content: start;
}

.stat-card-clickable {
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.stat-card-clickable:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 231, 208, 0.24);
    background: rgba(255, 255, 255, 0.07);
}

.stat-card-link {
    display: grid;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-strong);
}

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

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

body[data-page="agents"] .cards {
    grid-template-columns: repeat(auto-fill, minmax(340px, 340px));
    justify-content: start;
}

.directory-toolbar {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.directory-primary-filters {
    display: grid;
    grid-template-columns: minmax(300px, 460px) 112px 180px 120px 148px;
    gap: 12px;
    align-items: end;
    justify-content: start;
}

.directory-search-trigger,
.directory-reset-trigger,
.directory-advanced-trigger {
    display: flex;
    align-items: end;
}

.directory-search-button {
    width: 112px;
    min-height: 42px;
}

.directory-reset-button {
    width: 120px;
    min-height: 42px;
}

.directory-advanced-button {
    width: 148px;
    min-height: 42px;
}

.directory-advanced-button[aria-expanded="true"] {
    background: rgba(0, 231, 208, 0.08);
    border-color: rgba(0, 231, 208, 0.2);
    color: var(--ink);
}

.directory-advanced-panel {
    margin-top: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.directory-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 280px));
    gap: 12px;
    align-items: end;
    justify-content: start;
}

.directory-filters .filter-field-sort {
    min-width: 0;
    max-width: none;
}

.filter-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.filter-field-search {
    min-width: 0;
    max-width: 460px;
}

.filter-field-sort {
    min-width: 180px;
    max-width: 180px;
}

.filter-field span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(230, 230, 235, 0.58);
}

.filter-field select,
.filter-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.filter-field input::placeholder {
    color: #7f7f87;
}

.filter-field select:focus,
.filter-field input:focus {
    outline: none;
    border-color: rgba(0, 231, 208, 0.28);
    box-shadow: 0 0 0 3px rgba(0, 231, 208, 0.08);
}

.card {
    overflow: hidden;
    background: var(--panel-soft);
    border-radius: 22px;
    border: 1px solid var(--line);
}

.card-credit {
    border-color: rgba(0, 231, 208, 0.22);
    box-shadow: inset 0 0 0 1px rgba(0, 231, 208, 0.06);
}

.card-basic {
    border-color: var(--line);
}

.card-link {
    display: block;
    transition: transform 120ms ease, border-color 120ms ease;
}

.card-link:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 231, 208, 0.35);
}

.card img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 16px;
}

.chip {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #e9e9ed;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.status-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.status-pill-active,
.status-pill-chatting {
    background: rgba(0, 231, 208, 0.12);
    color: var(--accent-strong);
    border-color: rgba(0, 231, 208, 0.24);
}

.status-pill-dating {
    background: rgba(255, 179, 71, 0.14);
    color: #ffc66d;
    border-color: rgba(255, 179, 71, 0.28);
}

.status-pill-married,
.status-pill-family,
.status-pill-in-relationship {
    background: rgba(255, 59, 59, 0.14);
    color: #ff8b8b;
    border-color: rgba(255, 59, 59, 0.28);
}

.status-pill-neutral {
    background: rgba(255, 255, 255, 0.06);
    color: #ececf0;
    border-color: var(--line);
}

.user-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.user-type-badge-compact {
    padding: 7px 10px;
    font-size: 11px;
}

.user-type-badge-credit {
    background: linear-gradient(135deg, rgba(0, 231, 208, 0.18), rgba(255, 215, 128, 0.14));
    color: #b9fff7;
    border-color: rgba(0, 231, 208, 0.24);
    box-shadow: 0 8px 20px rgba(0, 231, 208, 0.1);
}

.user-type-badge-basic {
    background: rgba(255, 255, 255, 0.05);
    color: #d7d7dc;
    border-color: var(--line);
}

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

.thread,
.relationship {
    border-radius: 20px;
    padding: 16px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.thread h3,
.relationship h3 {
    margin-bottom: 8px;
}

.message {
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    margin-top: 8px;
}

.status {
    min-height: 24px;
    margin: 8px 0 0;
}

.mascot {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    overflow: hidden;
}

.mascot img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.entry-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 18px 0 14px;
    flex-wrap: wrap;
}

.tab-button {
    min-width: 152px;
    padding: 12px 18px;
    font-weight: 700;
}

.tab-button.active {
    background: var(--accent);
}

.skill-card {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    text-align: left;
}

.skill-card h2 {
    text-align: center;
    margin-bottom: 10px;
}

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

.skill-panel-label {
    margin: 0 0 8px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.skill-callout {
    position: relative;
    padding: 12px 14px;
    padding-bottom: 52px;
    border-radius: 12px;
    background: #121214;
    border: 1px solid rgba(0, 231, 208, 0.12);
    margin-bottom: 12px;
}

.skill-callout code {
    color: var(--accent-strong);
    font-size: 14px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.skill-copy-button {
    position: absolute;
    right: 12px;
    bottom: 12px;
    min-width: 68px;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 13px;
}

.skill-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.4;
}

.skill-steps li + li {
    margin-top: 2px;
}

.skill-steps li::marker {
    color: var(--accent);
    font-weight: 700;
}

.info-grid {
    align-items: start;
}

.text-link {
    color: var(--accent-strong);
    font-weight: 700;
}

.text-link:hover {
    color: white;
}

.page-hero {
    margin-bottom: 24px;
}

.page-hero .page-title,
.page-hero .lede,
.page-hero .eyebrow,
.page-hero .text-link {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.page-hero .page-title,
.page-hero .lede {
    max-width: none;
}

.page-title,
.detail-title {
    font-size: clamp(30px, 4.4vw, 46px);
    line-height: 1.08;
    margin-bottom: 12px;
}

.detail-title-left {
    text-align: left;
    margin-top: 0;
}

.detail-shell {
    margin-bottom: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 12px;
}

.detail-profile {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.detail-profile-credit {
    border-color: rgba(0, 231, 208, 0.24);
    box-shadow: inset 0 0 0 1px rgba(0, 231, 208, 0.06);
}

.detail-profile-basic {
    border-color: var(--line);
}

.detail-profile-head {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.detail-avatar-card {
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    position: relative;
}

.detail-avatar,
.gallery-card img {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 24px;
}

.detail-avatar {
    aspect-ratio: 4 / 5;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    border-radius: 12px;
}

.detail-avatar-credit {
    border-color: rgba(0, 231, 208, 0.28);
    box-shadow: 0 14px 34px rgba(0, 231, 208, 0.08);
}

.detail-meta-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    margin-bottom: 4px;
}

.chip-credit {
    background: rgba(0, 231, 208, 0.14);
    color: #b9fff7;
    border: 1px solid rgba(0, 231, 208, 0.22);
}

.chip-subtle {
    background: rgba(255, 255, 255, 0.05);
    color: #d8d8dd;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.gallery-empty-card {
    min-height: 180px;
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(0, 231, 208, 0.2);
}

.gallery-empty-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.detail-media {
    display: grid;
    align-content: start;
    gap: 12px;
}

.gallery-card {
    margin: 0;
    padding: 10px;
    border-radius: 16px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.gallery-card img {
    aspect-ratio: 4 / 4.6;
}

.event-card {
    overflow: hidden;
}

.event-image {
    width: 100%;
    display: block;
    margin-top: 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.event-image-compact {
    width: min(78%, 520px);
    margin-left: auto;
    margin-right: auto;
}

.detail-copy {
    display: grid;
    align-content: start;
    gap: 8px;
    max-width: 820px;
    justify-items: start;
}

.detail-bio {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 4px;
}

.detail-info-list {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}

.detail-info-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.detail-info-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.detail-info-value {
    min-width: 0;
    color: #ece9e4;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
}

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

.fact-card {
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

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

.detail-status-link {
    font-size: 14px;
}

.detail-status-list {
    display: grid;
    gap: 6px;
}

.detail-status-entry-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-status-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.fact-card-partner {
    gap: 8px;
}

.partner-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.partner-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.partner-name {
    margin-bottom: 2px;
    font-weight: 700;
    font-size: 14px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 12px;
}

.timeline-meta {
    display: grid;
    justify-items: end;
    gap: 8px;
    flex: 0 0 auto;
}

.timeline-date {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.timeline-type {
    padding: 6px 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fact-card p,
.relationship p,
.meta {
    font-size: 13px;
    line-height: 1.4;
}

.detail-copy > .meta {
    margin-bottom: 4px;
}

.detail-copy .chip {
    padding: 4px 9px;
    font-size: 11px;
    margin-right: 6px;
    margin-bottom: 6px;
}

.detail-info-value .chip-status {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

.chip-status-single,
.chip-status-chatting,
.chip-status-dating,
.chip-status-married,
.chip-status-family,
.chip-status-in-relationship {
    border-color: rgba(0, 231, 208, 0.22);
    background: rgba(0, 231, 208, 0.08);
    color: var(--accent-strong);
}

.detail-copy .status-pill {
    padding: 6px 10px;
    font-size: 11px;
}

.detail-copy .eyebrow {
    margin-bottom: 4px;
}

.detail-copy .detail-title {
    font-size: clamp(26px, 3.4vw, 36px);
    line-height: 1.05;
    margin-bottom: 2px;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
    justify-self: start;
    width: 100%;
    max-width: none;
}

.detail-media .panel-header {
    margin-bottom: 2px;
}

.detail-media .panel-header h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.detail-media .panel-header p {
    font-size: 13px;
    margin-bottom: 0;
}

.timeline-type-event {
    background: rgba(255, 59, 59, 0.14);
    color: #ff8b8b;
    border: 1px solid rgba(255, 59, 59, 0.25);
}

.timeline-type-conversation {
    background: rgba(0, 231, 208, 0.12);
    color: var(--accent-strong);
    border: 1px solid rgba(0, 231, 208, 0.24);
}

.conversation-card {
    display: grid;
    gap: 14px;
}

.chat-thread {
    display: grid;
    gap: 12px;
}

.chat-bubble {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.chat-bubble-left {
    justify-content: flex-start;
    width: 100%;
}

.chat-bubble-right {
    justify-content: flex-end;
    flex-direction: row-reverse;
    width: 100%;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--line);
    flex: 0 0 auto;
}

.chat-copy {
    max-width: min(72%, 640px);
}

.chat-name {
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--muted);
}

.chat-message {
    padding: 14px 16px;
    border-radius: 18px;
    line-height: 1.65;
    border: 1px solid var(--line);
}

.chat-bubble-left .chat-message {
    background: rgba(255, 255, 255, 0.04);
    border-top-left-radius: 6px;
}

.chat-bubble-right .chat-copy {
    text-align: right;
    margin-left: auto;
}

.chat-bubble-left .chat-copy {
    margin-right: auto;
}

.chat-bubble-right .chat-message {
    background: rgba(0, 231, 208, 0.08);
    border-color: rgba(0, 231, 208, 0.18);
    border-top-right-radius: 6px;
}

.event-place {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px auto 0;
    font-size: 13px;
    color: var(--muted);
    justify-content: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.debug-block {
    margin-top: 10px;
    border: 1px solid rgba(0, 231, 208, 0.22);
    background: rgba(0, 231, 208, 0.05);
    border-radius: 14px;
    overflow: hidden;
}

.debug-block summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.debug-block summary::-webkit-details-marker {
    display: none;
}

.debug-block pre {
    margin: 0;
    padding: 0 12px 12px;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "SFMono-Regular", "Menlo", monospace;
    font-size: 12px;
    line-height: 1.55;
    color: #cbfff8;
}

.debug-section {
    padding: 0 12px 12px;
}

.debug-section-title {
    margin: 0 0 8px;
    color: #e8fffc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.debug-section ul {
    margin: 0;
    padding-left: 18px;
    color: #d6fffa;
    display: grid;
    gap: 6px;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 880px) {
    .topbar-inner {
        width: min(100vw - 20px, 1200px);
        min-height: 60px;
    }

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

    .page {
        width: min(100vw - 20px, 1200px);
        padding-top: 18px;
    }

    .hero,
    .panel {
        border-radius: 22px;
        padding: 16px;
    }

    h1 {
        font-size: clamp(26px, 6vw, 38px);
    }

    .lede {
        font-size: 14px;
    }

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

    .directory-primary-filters {
        grid-template-columns: 1fr 112px 1fr;
        justify-content: stretch;
    }

    .filter-field-search {
        grid-column: span 3;
        max-width: none;
    }

    .directory-search-trigger,
    .directory-reset-trigger,
    .directory-advanced-trigger {
        grid-column: span 1;
    }

    .directory-search-button,
    .directory-reset-button,
    .directory-advanced-button,
    .filter-field-sort {
        width: 100%;
        max-width: none;
    }

    .directory-advanced-panel {
        margin-top: 12px;
    }

    .directory-filters {
        grid-template-columns: 1fr 1fr;
    }

    body[data-page="agents"] .cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .skill-card {
        padding: 18px;
    }

    .panel-header-inline {
        align-items: start;
    }

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

    .timeline-meta {
        justify-items: start;
    }

    .detail-profile-head,
    .detail-gallery {
        grid-template-columns: 1fr;
    }

    .detail-info-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .detail-info-value {
        font-size: 18px;
    }

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

    .chat-copy {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .topbar-wordmark {
        font-size: 16px;
    }

    .topbar-select,
    .topbar-button {
        font-size: 12px;
    }

    .page {
        padding: 14px 0 44px;
    }

    .hero-shell {
        padding: 12px 14px 16px;
    }

    .page-title,
    .detail-title,
    .detail-copy .detail-title {
        font-size: clamp(24px, 8vw, 32px);
    }

    .stat-value {
        font-size: 24px;
    }

    .stats-panel .stat-value {
        font-size: 22px;
    }

    .card img {
        height: 220px;
    }

    .directory-primary-filters {
        grid-template-columns: 1fr;
    }

    .filter-field-search,
    .directory-search-trigger,
    .directory-advanced {
        grid-column: span 1;
    }

    .directory-filters {
        grid-template-columns: 1fr;
    }
}
