:root {
  --bg: #121014;
  --card: #1e1b21;
  --well: #1b181e;
  --line: #4a4250;
  --text: #f3eef2;
  --muted: #b9afb8;
  --dim: #7e747d;
  --accent: #ff6a88;
  --good: #8fb2ff;
  --watch: #ffb547;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--body); -webkit-font-smoothing: antialiased; }
a { color: #ff8fa6; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.app { max-width: 440px; margin: 0 auto; min-height: 100dvh; }
.view {
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 20px;
}

.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.5px; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.badge { font-size: 13px; color: var(--muted); }
.spacer { width: 44px; }
.icon-btn { width: 44px; height: 44px; margin-left: -10px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--text); }

.intro { display: flex; flex-direction: column; gap: 8px; }
h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1.05; letter-spacing: -1px; }
.sub { margin: 0; font-size: 15px; line-height: 1.45; color: #c9c0c8; }

.field { display: flex; flex-direction: column; gap: 10px; }
.label { font-size: 14px; font-weight: 700; }
.label em { font-style: normal; font-weight: 400; color: var(--muted); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--well); border-radius: 14px; padding: 4px; }
.seg button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--bg); }

.drop { display: flex; flex-direction: column; gap: 12px; border: 1.5px dashed var(--line); border-radius: 18px; padding: 16px; background: var(--well); cursor: pointer; }
.drop.has { border-style: solid; }
.drop input { display: none; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; }
.thumb { flex: none; width: 92px; height: 132px; border-radius: 12px; background: #26222a center/cover no-repeat; position: relative; }
.thumb.add { border: 1.5px dashed var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 999px; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 15px; line-height: 1; }
.drop-hint { font-size: 13px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; font-size: 14px; }
.chip.on { border-color: var(--accent); background: var(--accent); color: var(--bg); font-weight: 700; }

input[type="text"] { min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--well); color: var(--text); padding: 0 14px; font: inherit; font-size: 16px; }
input[type="text"]:focus { outline: none; border-color: var(--accent); }

.bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.cta { display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 16px; border: 0; background: var(--accent); color: var(--bg); font-weight: 700; font-size: 17px; text-decoration: none; }
.cta:disabled { opacity: .45; cursor: default; }
.ghost-cta { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.fine { margin: 0; font-size: 12px; line-height: 1.45; color: #a79da6; text-align: center; }
.fine a { color: #a79da6; }

/* loading */
.loading { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.loading p { margin: 0; font-family: var(--display); font-weight: 600; font-size: 20px; }
.dots { display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 999px; background: var(--accent); animation: bounce 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-10px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: 1; } }

/* result */
.score-card { background: var(--card); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.score-card .q { font-size: 13px; color: var(--muted); }
.score-row { display: flex; align-items: center; gap: 14px; }
.score { font-family: var(--display); font-weight: 800; font-size: 52px; line-height: 1; color: var(--accent); }
.score small { font-size: 26px; color: var(--muted); }
.verdict { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.15; }
.meter { height: 8px; border-radius: 999px; background: #332e37; }
.meter div { height: 8px; width: 0; border-radius: 999px; background: var(--accent); transition: width .8s ease; }

.block { display: flex; flex-direction: column; gap: 8px; }
.block h2 { margin: 6px 0 0; font-size: 14px; font-weight: 700; }
.block p { margin: 0; font-size: 15px; line-height: 1.5; color: #d6ced5; }

.signals { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sig { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: #d6ced5; }
.sig b { flex: none; margin-top: 2px; font-size: 11px; letter-spacing: .3px; border-radius: 6px; padding: 3px 7px; }
.sig.good b { background: var(--good); color: #0e1630; }
.sig.watch b { background: var(--watch); color: #2a1600; }

.reply { display: flex; align-items: center; gap: 6px; background: var(--card); border-radius: 14px; padding: 10px 4px 10px 14px; margin-bottom: 8px; }
.reply .t { flex: 1; font-size: 15px; line-height: 1.4; }
.reply .why { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.reply button { flex: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.reply.lock { background: var(--well); color: var(--dim); }

.safety { background: #2a1d10; border: 1px solid #6b4a1f; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }

.locked-body { display: flex; flex-direction: column; gap: 10px; }
.locked-body p { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: #c9c0c8; }
.ghost { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #26222a, #2f2a33, #26222a); }
.ghost.short { width: 60%; }

/* paywall */
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.perks li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.perks li::before { content: ""; flex: none; width: 20px; height: 20px; background: no-repeat center/20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF6A88' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
.plans { display: flex; flex-direction: column; gap: 12px; }
.plan { position: relative; display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; }
.plan.on { border: 2px solid var(--accent); background: var(--card); }
.plan input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.plan-name { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.plan-name b { font-size: 16px; }
.plan-name small { font-size: 13px; color: var(--muted); }
.price { font-weight: 700; font-size: 18px; }
.price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.tag { position: absolute; top: -11px; right: 14px; font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--bg); background: var(--accent); border-radius: 6px; padding: 3px 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); background: #f3eef2; color: #121014; font-weight: 700; font-size: 14px; border-radius: 12px; padding: 12px 16px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }

/* legal pages */
.doc { max-width: 680px; margin: 0 auto; padding: 32px 20px 64px; line-height: 1.6; color: #d6ced5; }
.doc h1 { font-size: 30px; color: var(--text); margin-bottom: 8px; }
.doc h2 { font-size: 17px; color: var(--text); margin-top: 28px; }
