/* LoveDesk member portal (login + dashboard) */
.p-nav { border-bottom: 1px solid var(--line); background: rgba(8,9,12,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 40; }
.p-nav .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p-main { padding: 40px 0 80px; }

/* Login */
.login-shell { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: radial-gradient(600px 320px at 50% 10%, rgba(154,140,245,0.14), transparent 70%); }
.login-card { width: 100%; max-width: 400px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--ink-1); padding: 32px; }
.login-card img.heart { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; border: 1px solid rgba(255,255,255,0.16); box-shadow: 0 0 28px rgba(154,140,245,0.4); margin-bottom: 20px; }
.login-card h1 { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 6px; }
.login-card .sub { color: var(--text-3); font-size: 14px; margin-bottom: 24px; }
.login-card form { display: grid; gap: 14px; }
.login-card .field { height: 44px; }
.login-card .btn { height: 46px; width: 100%; margin-top: 6px; }
.login-err { color: var(--bad); font-size: 13px; min-height: 18px; }
.login-foot { margin-top: 20px; font-size: 12.5px; color: var(--text-4); }
.login-foot a { color: var(--text-3); text-decoration: underline; }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 500; letter-spacing: -0.025em; }
.dash-head p { color: var(--text-3); font-size: 14px; margin-top: 4px; }
.preview-badge { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 500; }

.card { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--ink-1); padding: 28px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 4px; }
.card .card-sub { color: var(--text-3); font-size: 14px; margin-bottom: 22px; }
.eyebrow-sm { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; display: block; }

.statusbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: var(--accent-line); background: linear-gradient(180deg, rgba(154,140,245,0.07), var(--ink-1) 70%); }
.status-items { display: flex; gap: 10px 22px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); align-items: center; }
.status-items b { color: var(--text); font-weight: 500; }
.status-note { flex-basis: 100%; font-size: 12.5px; color: var(--text-3); }

/* Demo */
.demo-steps { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.demo-steps button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; color: var(--text-2); }
.demo-steps button.on { background: var(--text); color: var(--ink-0); border-color: var(--text); }
.demo-pane[hidden] { display: none; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.opt:first-child { padding-top: 0; }
.opt b { font-weight: 500; display: block; font-size: 14.5px; }
.opt small { color: var(--text-3); font-size: 13px; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-4); transition: background 0.2s var(--ease); }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.switch input:checked + span { background: var(--accent-strong); }
.switch input:checked + span::after { transform: translateX(18px); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; flex-shrink: 0; }
.seg button { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; color: var(--text-2); }
.seg button.on { background: var(--accent-strong); color: #fff; }
.range-row { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.range-row input { width: 140px; accent-color: var(--accent-strong); }
.range-row output { font-family: var(--font-mono); font-size: 13px; min-width: 32px; text-align: right; }

.mini-phone { border: 1px solid var(--line-strong); border-radius: 28px; padding: 8px; background: linear-gradient(160deg, #2a2e39, #12141a); max-width: 300px; margin: 0 auto; }
.mini-screen { border-radius: 22px; overflow: hidden; background: var(--ink-1); }
.mini-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 12px; border-bottom: 1px solid var(--line); }
.mini-bar .wm { font-size: 13px; }
.mini-card { margin: 12px; height: 260px; border-radius: 16px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 14px; transition: transform 0.35s var(--ease), opacity 0.35s var(--ease); }
.mini-card.out-left { transform: translateX(-120%) rotate(-8deg); opacity: 0; }
.mini-card.out-right { transform: translateX(120%) rotate(8deg); opacity: 0; }
.mini-card .who b { font-size: 17px; font-weight: 500; display: block; }
.mini-card .who small { font-size: 12px; color: rgba(255,255,255,0.75); }
.mini-card .face { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.mini-card.empty .face { display: none; }
.mini-verdict { margin: 0 12px 12px; min-height: 40px; font-size: 12.5px; color: var(--text-2); }
.mini-actions { display: flex; gap: 8px; padding: 0 12px 14px; }
.mini-actions .btn { flex: 1; height: 36px; font-size: 13px; }
.explain { font-size: 14px; color: var(--text-2); display: grid; gap: 12px; }
.explain li { list-style: none; padding-left: 22px; position: relative; }
.explain li::before { content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.chat { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-0); padding: 16px; }
.chat-who { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.chat-who .av { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #c4b5fd, #4c1d95); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.chat-who small { display: block; color: var(--text-3); font-size: 12px; }
.bubble { max-width: 85%; padding: 10px 13px; border-radius: 16px; font-size: 14px; margin-bottom: 8px; }
.bubble.in { background: var(--ink-3); border-bottom-left-radius: 6px; }
.bubble.out { background: var(--accent-strong); color: #fff; margin-left: auto; border-bottom-right-radius: 6px; }
.situation { font-size: 12.5px; color: var(--text-3); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.options { display: grid; gap: 8px; margin-bottom: 14px; }
.option { text-align: left; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--text-2); transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.option small { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); margin-bottom: 4px; text-transform: uppercase; }
.option.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tools .btn { height: 34px; font-size: 13px; }
.editor[hidden], .discuss[hidden] { display: none; }
.editor textarea, .discuss input { width: 100%; margin-bottom: 10px; }
.discuss-reply { font-size: 13px; color: var(--text-2); background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.discuss-reply:empty { display: none; }
.send-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.send-row select { width: auto; flex: 1; min-width: 140px; height: 42px; }
.send-row .btn { height: 42px; }
.sent-note { margin-top: 12px; font-size: 13px; color: var(--ok); min-height: 18px; }

.dl-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.dl-box { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; background: var(--ink-0); }
.dl-box h3 { font-size: 16px; font-weight: 500; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dl-box p { color: var(--text-3); font-size: 13.5px; }
.dl-box .btn { margin-top: 16px; }

.safe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.safe-grid div { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; background: var(--ink-0); }
.safe-grid b { display: block; font-weight: 500; margin-bottom: 6px; }
.safe-grid span { font-size: 13.5px; color: var(--text-2); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 440px; border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: var(--ink-2); padding: 28px; }
.modal-box h3 { font-size: 19px; font-weight: 500; margin-bottom: 8px; }
.modal-box p { color: var(--text-2); font-size: 14px; margin-bottom: 12px; }
.modal-box .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.modal-box .plan-line { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; margin: 16px 0; }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 0 96px; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 500; letter-spacing: -0.03em; margin: 14px 0 8px; }
.legal h2 { font-size: 19px; font-weight: 500; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--text-2); font-size: 15px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal p + p { margin-top: 10px; }
.draft-banner { border: 1px solid rgba(217,178,111,0.3); background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-top: 20px; }

@media (max-width: 860px) {
  .demo-grid, .dl-grid, .safe-grid { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .opt { flex-wrap: wrap; }
  .range-row input { width: 120px; }
}
.usage { flex-basis: 100%; }
.usage-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; }
.usage-top b { color: var(--text); font-weight: 500; }
.support-card { max-width: 480px; }
.support-card textarea.field { min-height: 130px; }
.sent-ok { color: var(--ok); font-size: 15px; padding: 12px 0; }
.support-main { padding: 48px 28px 96px; }
.support-head { text-align: center; max-width: 620px; margin: 0 auto 28px; }
.support-head .h1 { margin-bottom: 12px; }
.support-alt { text-align: center; margin: 22px 0; color: var(--text-3); font-size: 14px; }
.linkish { color: var(--text); text-decoration: underline; font-size: 14px; }
.support-form { margin: 0 auto; max-width: 560px; }
.support-form[hidden] { display: none; }
@media (max-width: 600px) { .support-main { padding: 28px 16px 72px; } }
