/* Manbo Micheline Paul — black, white, Haiti red & dark blue, a touch of gold */
:root {
  --red: #d21034;
  --red-2: #a50c28;
  --blue: #00209f;
  --blue-2: #1438d6;
  --gold: #f5c518;
  --ink: #0a0e1f;
  --night: #05070f;
  --paper: #ffffff;
  --mist: #f3f4f8;
  --line: #e4e6ee;
  --text: #11131c;
  --muted: #5d6275;
  --ok: #17a34a;
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(5, 7, 15, .35);
  --serif: 'Cinzel', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
button { font: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; border-radius: 999px; padding: .9em 1.5em; font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-red { background: linear-gradient(135deg, #e5203f, var(--red-2)); color: #fff; box-shadow: 0 10px 26px -10px rgba(210, 16, 52, .7); }
.btn-red:hover { box-shadow: 0 14px 30px -10px rgba(210, 16, 52, .85); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-2); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: rgba(127, 127, 127, .1); }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn.busy { opacity: .6; pointer-events: none; }

/* ---------- landing ---------- */
.landing { background: var(--paper); }
.topbar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 4vw, 48px); color: #fff; transition: background .3s, box-shadow .3s; }
.topbar.solid { background: rgba(5, 7, 15, .86); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), #000c47); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(245, 197, 24, .35); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .04em; }
.brand-text b { color: var(--red); font-weight: 700; }
.topbar .brand-text b { color: #ff3f5e; }
.topnav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 26px); }
.topnav a { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 500; font-size: .95rem; }
.topnav a:hover { color: #fff; }
.topnav .btn { color: #fff; }
@media (max-width: 640px) { .topnav a:not(.btn):not(.nav-link-strong) { display: none; } }

.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 600px at 75% 30%, rgba(20, 56, 214, .45), transparent 60%), radial-gradient(800px 500px at 10% 90%, rgba(210, 16, 52, .35), transparent 60%), linear-gradient(180deg, #05070f, #0a1236 70%, #0a0e1f); padding: 120px clamp(16px, 4vw, 48px) 120px; }
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.hero-sky i { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .2; transform: scale(var(--s)); animation: twinkle 4s ease-in-out var(--d) infinite; }
@keyframes twinkle { 50% { opacity: .95; } }
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; text-align: center; } .hero-art { order: -1; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 600; color: var(--red); margin: 0 0 14px; }
.hero .eyebrow { color: var(--gold); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(210, 16, 52, .25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(210, 16, 52, 0); } }
.eyebrow.center { display: flex; justify-content: center; }
.eyebrow.gold { color: var(--gold); }
.hero h1 { font-family: var(--serif); font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: 1.08; margin: 0 0 18px; letter-spacing: .01em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--gold), #ff6b81); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255, 255, 255, .78); max-width: 560px; margin: 0 0 28px; }
@media (max-width: 900px) { .lead { margin-inline: auto; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .hero-cta { justify-content: center; } }
.hero-proof { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: rgba(255, 255, 255, .7); font-size: .9rem; }
@media (max-width: 900px) { .hero-proof { justify-content: center; } }
.hero-proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof svg { color: var(--gold); width: 18px; height: 18px; }

.hero-art { position: relative; width: min(460px, 86vw); aspect-ratio: 1; margin: 0 auto; }
.big-veve { position: absolute; inset: 6%; width: 88%; height: 88%; color: rgba(245, 197, 24, .2); animation: spin 90s linear infinite; }
.big-veve .draw, .veve-draw .draw { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 3.2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.portrait { position: absolute; inset: 22%; border-radius: 50%; padding: 6px; background: conic-gradient(from 0deg, var(--red), var(--gold), var(--blue-2), #ffffff, var(--red)); box-shadow: 0 0 70px rgba(245, 197, 24, .25), 0 0 140px rgba(20, 56, 214, .4); animation: glow 5s ease-in-out infinite; }
.portrait img { width: 100%; height: 100%; border-radius: 50%; border: 4px solid #05070f; object-fit: cover; }
@keyframes glow { 50% { box-shadow: 0 0 100px rgba(245, 197, 24, .38), 0 0 170px rgba(20, 56, 214, .5); } }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .14); animation: spin 40s linear infinite; }
.orbit-2 { inset: 11%; animation-duration: 28s; animation-direction: reverse; border-color: rgba(245, 197, 24, .18); }
.orb { position: absolute; display: grid; place-items: center; width: 54px; height: 54px; margin: -27px; border-radius: 16px; background: rgba(10, 14, 31, .82); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(6px); animation: counter 40s linear infinite; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.orbit-2 .orb { animation: counter-r 28s linear infinite; }
.orb svg { width: 30px; height: 30px; }
@keyframes counter { to { transform: rotate(-360deg); } }
@keyframes counter-r { to { transform: rotate(360deg); } }
.o1 { left: 50%; top: 0; color: var(--gold); }
.o2 { left: 100%; top: 50%; color: #ff6b81; }
.o3 { left: 50%; top: 100%; color: #7fa2ff; }
.o4 { left: 0; top: 50%; color: var(--gold); }
.o5 { left: 85%; top: 15%; color: #ff4d6a; }
.o6 { left: 15%; top: 85%; color: #8fb0ff; }
.o7 { left: 12%; top: 18%; color: var(--gold); }
.o2 .flame, .card-ico .flame, .empty .flame { transform-origin: 32px 20px; animation: flicker 1.4s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12, .92) rotate(3deg); } }
.flames { position: absolute; left: 50%; bottom: -2%; transform: translateX(-50%); display: flex; gap: 28px; }
.flames span { width: 14px; height: 22px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff6c9, var(--gold) 45%, var(--red) 90%); filter: blur(.3px); box-shadow: 0 0 22px rgba(245, 197, 24, .8); animation: flicker 1.2s ease-in-out infinite; }
.flames span:nth-child(2) { animation-delay: .3s; transform: translateY(8px); }
.flames span:nth-child(3) { animation-delay: .6s; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; background: var(--paper); clip-path: ellipse(70% 100% at 50% 100%); }

.section { padding: clamp(64px, 9vw, 110px) clamp(16px, 4vw, 48px); }
.wrap { max-width: 1180px; margin: 0 auto; }
.section h2 { font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; }
.center { text-align: center; }
.sub { color: var(--muted); max-width: 620px; margin: 0 auto 44px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 1px 0 rgba(0, 0, 0, .02); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { margin: 16px 0 6px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; }
.card-ico svg { width: 30px; height: 30px; }
.c-red { background: #fde8ec; color: var(--red); }
.c-blue { background: #e6ebff; color: var(--blue); }
.c-gold { background: #fff6d6; color: #a37f00; }
.card:hover .card-ico svg { animation: bob 1s ease-in-out; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-6deg); } }

.section-dark { background: linear-gradient(180deg, #05070f, #0b1336); color: #fff; }
.section-dark .sub { color: rgba(255, 255, 255, .7); }
.veves { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.veve-card { margin: 0; padding: 30px 24px; text-align: center; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); transition: background .3s, transform .3s; }
.veve-card:hover { background: rgba(255, 255, 255, .07); transform: translateY(-4px); }
.veve-draw { width: 150px; height: 150px; color: var(--gold); filter: drop-shadow(0 0 14px rgba(245, 197, 24, .35)); }
.veve-draw.red { color: #ff4d6a; filter: drop-shadow(0 0 14px rgba(210, 16, 52, .45)); }
.veve-draw.blue { color: #8fb0ff; filter: drop-shadow(0 0 14px rgba(20, 56, 214, .5)); }
.veve-card .draw { animation-play-state: paused; }
.veve-card.in .draw { animation-play-state: running; }
.veve-card figcaption { margin-top: 14px; display: grid; gap: 4px; }
.veve-card b { font-family: var(--serif); font-size: 1.2rem; }
.veve-card span { color: rgba(255, 255, 255, .68); font-size: .93rem; }

.about { display: grid; grid-template-columns: 340px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; text-align: center; } .about-img { margin: 0 auto; } }
.about-img { width: min(320px, 70vw); border-radius: 50%; padding: 8px; background: conic-gradient(var(--red), var(--gold), var(--blue), #ffffff, var(--red)); }
.about-img img { border-radius: 50%; border: 6px solid #fff; }
.about p { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

.footer { background: var(--night); color: rgba(255, 255, 255, .7); padding: 34px clamp(16px, 4vw, 48px); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.foot p { margin: 0; font-size: .9rem; }
.foot nav { display: flex; gap: 18px; }
.foot a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.footer .brand { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- auth ---------- */
.auth { background: var(--paper); }
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-side { position: relative; overflow: hidden; color: #fff; background: radial-gradient(700px 500px at 70% 20%, rgba(20, 56, 214, .55), transparent 60%), radial-gradient(600px 500px at 20% 90%, rgba(210, 16, 52, .45), transparent 60%), #05070f; display: grid; place-items: center; padding: 40px; }
.auth-veve { position: absolute; color: rgba(245, 197, 24, .16); }
.auth-veve .draw { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 4s ease forwards; }
.auth-veve.v1 { width: 380px; height: 380px; top: -60px; left: -80px; animation: spin 120s linear infinite; }
.auth-veve.v2 { width: 260px; height: 260px; bottom: -40px; right: -30px; color: rgba(255, 77, 106, .2); animation: float 7s ease-in-out infinite; }
.auth-veve.v3 { width: 200px; height: 200px; top: 40%; right: 12%; color: rgba(143, 176, 255, .18); animation: float 9s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-18px) rotate(4deg); } }
.auth-side-copy { position: relative; max-width: 380px; text-align: center; }
.auth-side-copy img { margin: 0 auto 22px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(245, 197, 24, .5), 0 0 60px rgba(210, 16, 52, .5); }
.quote { font-family: var(--serif); font-size: 1.5rem; line-height: 1.35; margin: 0 0 10px; }
.quote-tr { color: rgba(255, 255, 255, .7); margin: 0 0 14px; }
.sig { color: var(--gold); letter-spacing: .1em; font-size: .9rem; margin: 0; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 16px; gap: 26px; }
.auth-main .brand { color: var(--ink); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-family: var(--serif); font-size: 2rem; margin: 0 0 6px; }
.muted { color: var(--muted); margin: 0; }
.alert { background: #fde8ec; color: #8a0a22; border: 1px solid #f6b9c5; border-radius: 12px; padding: 12px 14px; margin: 18px 0 0; font-size: .93rem; }
.form { display: grid; gap: 16px; margin-top: 22px; }
.field { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.field input { width: 100%; font: inherit; font-weight: 400; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 32, 159, .12); }
.pw { position: relative; display: block; }
.pw input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.pw-toggle svg { width: 20px; height: 20px; }
.pw-toggle.on { color: var(--blue); }
.switch { text-align: center; color: var(--muted); margin: 20px 0 0; }
.switch a { color: var(--red); font-weight: 600; text-decoration: none; }

/* ---------- chat ---------- */
html[data-theme] { --c-bg: #ffffff; --c-head: rgba(255, 255, 255, .9); --c-text: #11131c; --c-muted: #6b7083; --c-line: #eceef4; --c-chip: #f3f4f8; --c-bubble: #000000; --c-bubble-text: #ffffff; --c-sheet: #ffffff; --c-note: #f1f3f8; --c-accent: var(--blue); --c-veve: rgba(0, 32, 159, .045); }
html[data-theme="dark"] { color-scheme: dark; --c-bg: #07090f; --c-head: rgba(10, 12, 20, .9); --c-text: #f2f3f7; --c-muted: #9aa0b4; --c-line: #1d2130; --c-chip: #141826; --c-bubble: #000000; --c-bubble-text: #ffffff; --c-sheet: #0e111b; --c-note: #171b29; --c-accent: var(--gold); --c-veve: rgba(245, 197, 24, .05); }
.chat-page { background: var(--c-bg); color: var(--c-text); overflow: hidden; transition: background .3s, color .3s; }
.chat-app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; max-width: 860px; margin: 0 auto; position: relative; background: var(--c-bg); transition: background .3s; }
@media (min-width: 900px) { .chat-app { border-inline: 1px solid var(--c-line); } }
.chat-head { position: relative; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--c-head); backdrop-filter: blur(14px); border-bottom: 1px solid var(--c-line); }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--c-text); display: grid; place-items: center; text-decoration: none; transition: background .2s; position: relative; }
.icon-btn:hover { background: var(--c-chip); }
.icon-btn svg { width: 22px; height: 22px; }
html[data-theme="dark"] .icon-btn { color: var(--gold); }
.group-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.group-avatar { position: relative; flex: none; }
.group-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.group-avatar .ring { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; background: conic-gradient(var(--red), var(--gold), var(--blue), #ffffff, var(--red)) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 8s linear infinite; }
.group-txt { min-width: 0; }
.group-txt h1 { margin: 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.1; letter-spacing: .08em; }
.group-txt h1::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--red); vertical-align: middle; }
.group-txt p { margin: 2px 0 0; color: var(--c-muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.online-pill { border: 0; background: rgba(23, 163, 74, .12); color: var(--ok); border-radius: 999px; padding: 1px 8px 1px 6px; font-size: .78rem; display: inline-flex; align-items: center; gap: 5px; }
.online-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse-g 2s infinite; }
@keyframes pulse-g { 50% { box-shadow: 0 0 0 4px rgba(23, 163, 74, 0); } 0% { box-shadow: 0 0 0 0 rgba(23, 163, 74, .5); } }
.head-actions { display: flex; align-items: center; gap: 2px; }
.t-sun { display: none; }
html[data-theme="dark"] .t-sun { display: block; }
html[data-theme="dark"] .t-moon { display: none; }
.badge { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.me-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; margin-left: 4px; background: linear-gradient(135deg, var(--blue), #000c47); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; overflow: hidden; padding: 0; }
.me-btn img { width: 100%; height: 100%; object-fit: cover; }
html[data-theme="dark"] .me-btn { background: var(--gold); color: #000; }

.chat-main { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 24px; }
.chat-bg { position: fixed; left: 50%; top: 50%; width: min(520px, 80vw); height: min(520px, 80vw); transform: translate(-50%, -50%); color: var(--c-veve); pointer-events: none; }
.chat-bg svg { width: 100%; height: 100%; }
.feed { position: relative; display: flex; flex-direction: column; gap: 10px; }
.load-older { text-align: center; margin-bottom: 10px; position: relative; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--c-line); background: var(--c-chip); color: var(--c-text); border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 600; }
.chip svg { width: 16px; height: 16px; }
html[data-theme="dark"] .chip { color: var(--gold); }

.sep { display: flex; justify-content: center; margin: 14px 0 4px; position: relative; z-index: 1; }
.sep-pill { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 6px 16px; border-radius: 14px; background: var(--c-head); backdrop-filter: blur(10px); border: 1px solid var(--c-line); box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .3); }
.sep-pill b { font-size: .8rem; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
html[data-theme="dark"] .sep-pill b { color: var(--gold); }
.sep-pill small { font-size: .72rem; color: var(--c-muted); }

.msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.msg-av { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 3.5px var(--red); }
.bubble { position: relative; min-width: 200px; max-width: 620px; background: var(--c-bubble); color: var(--c-bubble-text); border-radius: 20px 20px 20px 6px; padding: 12px 14px 8px; box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .55); overflow: hidden; }
.bubble::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--blue-2) 50%, var(--red) 50%); }
html[data-theme="dark"] .bubble { box-shadow: 0 0 0 1px rgba(245, 197, 24, .22), 0 12px 30px -16px rgba(0, 0, 0, .9); }
.b-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.b-name { font-size: .8rem; color: var(--gold); letter-spacing: .03em; }
.b-paid { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-size: .72rem; font-weight: 700; color: #000; background: var(--gold); border-radius: 999px; padding: 2px 8px; }
.b-paid svg { width: 13px; height: 13px; }
.b-body { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; font-size: .98rem; line-height: 1.55; }
.num { display: inline-block; padding: 0 .38em; margin: 0 .05em; border-radius: 6px; font-weight: 700; color: #fff; line-height: 1.4; font-variant-numeric: tabular-nums; }
.n-red { background: var(--red); }
.n-blue { background: var(--blue); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.b-stamp { display: block; margin-top: 6px; text-align: right; font-size: .7rem; color: rgba(255, 255, 255, .55); }
.b-acts { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px -6px 0; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); }
.act { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: rgba(255, 255, 255, .78); border-radius: 999px; padding: 5px 9px; font-size: .78rem; font-weight: 600; transition: background .2s, color .2s; }
.act:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.act svg { width: 17px; height: 17px; }
.act.like.on { color: #ff4d6a; }
.act.like.pop svg { animation: pop .45s ease; }
@keyframes pop { 40% { transform: scale(1.45); } }
.act.hot { color: var(--gold); }
.act.danger:hover { color: #ff4d6a; }
.muted-act { cursor: default; color: rgba(255, 255, 255, .55); }
.muted-act:hover { background: transparent; color: rgba(255, 255, 255, .55); }
.msg-row.flash .bubble { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--gold); } }
.locked { position: relative; min-height: 150px; }
.locked-lines { position: absolute; inset: 4px 0; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .16) 0 10px, transparent 10px 22px); filter: blur(3px); border-radius: 6px; }
.locked-copy { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px 8px; }
.locked-copy svg { width: 30px; height: 30px; color: var(--gold); }
.locked-copy span { font-size: .85rem; color: rgba(255, 255, 255, .78); max-width: 280px; }

.empty { text-align: center; color: var(--c-muted); padding: 60px 20px; position: relative; }
.empty svg { width: 54px; height: 54px; color: var(--red); }
.jump { position: absolute; right: 18px; bottom: 120px; z-index: 6; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--red); color: #fff; font-weight: 700; box-shadow: var(--shadow); }

.composer { padding: 8px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--c-line); background: var(--c-head); backdrop-filter: blur(14px); }
.composer-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-date input { border: 0; background: transparent; color: inherit; font: inherit; font-size: .82rem; padding: 0; max-width: 190px; }
.chip-date.custom { border-color: var(--red); color: var(--red); }
html[data-theme="dark"] .chip-date input { color-scheme: dark; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle { cursor: pointer; }
.chip-toggle span { display: inline-flex; align-items: center; gap: 5px; }
.chip-toggle:has(input:checked) { background: var(--gold); border-color: var(--gold); color: #000; }
.chip-price input { width: 70px; border: 0; background: transparent; color: inherit; font: inherit; font-size: .85rem; }
.composer-row, .thread-form { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea, .thread-form textarea { flex: 1; resize: none; font: inherit; font-size: 1rem; padding: 11px 14px; border-radius: 22px; border: 1.5px solid var(--c-line); background: var(--c-bg); color: var(--c-text); max-height: 180px; line-height: 1.4; overflow-y: hidden; }
.composer textarea:focus, .thread-form textarea:focus { outline: none; border-color: var(--c-accent); }
.send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #e5203f, var(--red-2)); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(210, 16, 52, .8); transition: transform .15s; }
.send:hover { transform: scale(1.06); }
.send:disabled { opacity: .6; }
.send svg { width: 20px; height: 20px; margin-left: 2px; }
.readonly-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--c-line); background: var(--c-head); color: var(--c-muted); font-size: .85rem; }
.readonly-bar svg { flex: none; width: 18px; height: 18px; color: var(--red); }
html[data-theme="dark"] .readonly-bar svg { color: var(--gold); }

/* sheets */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(5, 7, 15, .55); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .22s; }
.sheet.open { opacity: 1; }
.sheet-card { width: 100%; max-width: 620px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; background: var(--c-sheet, #fff); color: var(--c-text, var(--text)); border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .35); transform: translateY(30px); transition: transform .25s ease; padding-bottom: env(safe-area-inset-bottom); }
.sheet.open .sheet-card { transform: none; }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-card { border-radius: 24px; } }
.sheet-card.narrow { max-width: 440px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--c-line); }
.sheet-head > div { flex: 1; min-width: 0; }
.sheet-head h2 { margin: 0; font-size: 1.05rem; }
.sheet-head .muted { font-size: .8rem; color: var(--c-muted); }
.thread-quote { margin: 12px 14px 0; padding: 10px 12px; border-left: 4px solid var(--red); background: #000; color: #fff; border-radius: 10px; font-size: .88rem; white-space: pre-wrap; max-height: 110px; overflow: auto; }
.thread-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.thread-empty { text-align: center; color: var(--c-muted); font-size: .9rem; margin: auto; padding: 20px; }
.note { display: flex; flex-direction: column; align-items: flex-start; max-width: 85%; }
.note.mine { align-self: flex-end; align-items: flex-end; }
.note-b { padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: var(--c-note); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; }
.note.manbo .note-b { background: #000; color: #fff; }
.note.mine .note-b { border-radius: 16px 16px 4px 16px; }
.note.mine:not(.manbo) .note-b { background: var(--blue); color: #fff; }
.note.req .note-b { background: var(--gold); color: #000; }
.note-meta { display: flex; align-items: center; gap: 6px; font-size: .7rem; color: var(--c-muted); margin-top: 3px; }
.note-del { border: 0; background: transparent; color: var(--c-muted); padding: 6px; margin: -4px -2px; border-radius: 8px; display: grid; }
.note-del:hover { color: var(--red); background: var(--c-chip); }
.note-del svg { width: 16px; height: 16px; }
.confirm { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 7, 15, .6); opacity: 0; transition: opacity .18s; }
.confirm.open { opacity: 1; }
.confirm-box { width: 100%; max-width: 360px; text-align: center; background: var(--c-sheet, #fff); color: var(--c-text, var(--text)); border-radius: 22px; padding: 22px 20px 18px; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); transform: scale(.95); transition: transform .18s; }
.confirm.open .confirm-box { transform: none; }
.confirm-ic { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: #fde8ec; color: var(--red); }
.confirm-ic svg { width: 24px; height: 24px; }
.confirm-box h3 { margin: 0 0 6px; font-size: 1.1rem; }
.confirm-box p { margin: 0 0 18px; color: var(--c-muted, var(--muted)); font-size: .9rem; }
.notice .confirm-ic { background: #fff6d6; color: var(--red); width: 64px; height: 64px; box-shadow: 0 0 0 6px rgba(245, 197, 24, .18); }
.notice .confirm-ic svg { width: 34px; height: 34px; }
.notice .flame { transform-origin: 32px 20px; animation: flicker 1.4s ease-in-out infinite; color: var(--gold); }
.notice-tag { display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; background: var(--gold); color: #000; font-size: .72rem; font-weight: 700; }
.notice h3 { font-family: var(--serif); font-size: 1.25rem; }
.confirm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-row .btn { padding: .75em 1em; }
.thread-form { padding: 10px 12px; border-top: 1px solid var(--c-line); }
.inbox-list, .member-list { overflow-y: auto; padding: 6px 8px 14px; }
.inbox-item { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; color: inherit; border-radius: 14px; padding: 10px; position: relative; }
.inbox-item:hover { background: var(--c-chip); }
.inbox-item.unread .inbox-top b { color: var(--red); }
html[data-theme="dark"] .inbox-item.unread .inbox-top b { color: var(--gold); }
.inbox-item .badge { position: static; }
.inbox-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.inbox-top { display: flex; justify-content: space-between; gap: 8px; }
.inbox-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.inbox-top time { flex: none; font-size: .72rem; color: var(--c-muted); }
.inbox-last, .inbox-on { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .84rem; color: var(--c-muted); }
.inbox-on { font-size: .75rem; opacity: .8; }
.req-tag { flex: none; font-size: .68rem; font-weight: 700; background: var(--gold); color: #000; border-radius: 999px; padding: 2px 7px; }
.mini-av { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: var(--blue); }
.member:nth-child(even) .mini-av, .inbox-item:nth-child(even) .mini-av { background: var(--red); }
.mini-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.presence { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #9aa0b4; box-shadow: 0 0 0 2px var(--c-sheet); }
.presence.on { background: var(--ok); }
.tabs { display: flex; gap: 6px; padding: 10px 14px 0; }
.tab { border: 1px solid var(--c-line); background: transparent; color: var(--c-text); border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 600; }
.tab.on { background: var(--blue); border-color: var(--blue); color: #fff; }
html[data-theme="dark"] .tab.on { background: var(--gold); border-color: var(--gold); color: #000; }
.search { margin: 10px 14px 0; font: inherit; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--c-line); background: var(--c-bg); color: var(--c-text); }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; }
.member-tx { display: grid; min-width: 0; }
.member-tx b { font-size: .92rem; }
.member-tx small { color: var(--c-muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-item { display: flex; align-items: center; gap: 8px; padding: 9px 8px; border-bottom: 1px solid var(--c-line); font-size: .88rem; }
.log-item time { margin-left: auto; color: var(--c-muted); font-size: .75rem; white-space: nowrap; }
.log-dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa0b4; flex: none; }
.log-item.enter .log-dot { background: var(--ok); }
.log-item.leave .log-dot { background: var(--red); }
#profileSheet .form { padding: 0 16px; margin-top: 16px; }
#profileSheet .field input { background: var(--c-bg); color: var(--c-text); border-color: var(--c-line); }
.form-sep { margin: 6px 0 -6px; font-weight: 700; font-size: .9rem; }
.form-sep small { font-weight: 400; color: var(--c-muted); }
.form-msg { margin: 0; min-height: 1.2em; font-size: .88rem; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--red); }
.logout-form { padding: 10px 16px 18px; }
.logout-form .btn { color: var(--c-text); }
.logout-form svg { width: 18px; height: 18px; }
.avatar-pick { display: flex; align-items: center; gap: 14px; cursor: pointer; font-weight: 600; color: var(--c-accent); }
.avatar-pick img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--gold); }
.avatar-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
/* language switch (footers + profile sheet) */
.lang-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid rgba(127, 127, 127, .3); font-size: .85rem; }
.lang-switch svg { width: 16px; height: 16px; margin: 0 4px 0 6px; opacity: .7; }
.lang-switch a { padding: 5px 12px; border-radius: 999px; text-decoration: none; color: inherit; font-weight: 600; opacity: .75; transition: background .2s, opacity .2s; }
.lang-switch a:hover { opacity: 1; background: rgba(127, 127, 127, .14); }
.lang-switch a.on { opacity: 1; background: var(--red); color: #fff; }
.footer .lang-switch { color: #fff; border-color: rgba(255, 255, 255, .2); }
.auth-foot { display: flex; justify-content: center; }
.auth-foot .lang-switch { color: var(--text); }
.sheet-lang { display: flex; justify-content: center; padding: 0 16px 18px; }
.sheet-lang .lang-switch { color: var(--c-text); }
html[data-theme="dark"] .sheet-lang .lang-switch a.on { background: var(--gold); color: #000; }
.settings-entry { padding: 4px 16px 0; display: grid; gap: 6px; text-align: center; }
.settings-entry svg { width: 18px; height: 18px; }
.settings-entry .muted { font-size: .78rem; color: var(--c-muted); }
html[data-theme="dark"] #statsBtn { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); }
.stats-list { overflow-y: auto; padding: 10px 14px 18px; display: grid; gap: 12px; }
.stat-card { border: 1px solid var(--c-line); border-radius: 16px; padding: 12px; display: grid; gap: 8px; background: var(--c-bg); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--c-muted); }
.stat-text { margin: 0; font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-field { display: grid; gap: 4px; }
.stat-label { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; }
.stat-label svg { width: 15px; height: 15px; color: var(--red); }
html[data-theme="dark"] .stat-label svg { color: var(--gold); }
.stat-field input { width: 100%; font: inherit; font-weight: 700; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--c-line); background: var(--c-sheet); color: var(--c-text); }
.stat-field input:focus { outline: none; border-color: var(--c-accent); }
.stat-field small { font-size: .7rem; color: var(--c-muted); }
.stat-card .btn { justify-self: end; }
.ghost-input { position: fixed; left: 50%; bottom: 80px; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 60; transform: translate(-50%, 20px); background: #000; color: #fff; border: 1px solid rgba(245, 197, 24, .4); padding: 10px 16px; border-radius: 999px; font-size: .88rem; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.sheet-open { overflow: hidden; }

/* payments: drawing conditions, waiting / ready / paid popup, admin requests */
.pay-modal { z-index: 85; }
.pay-box { max-width: 400px; }
.pay-ic { width: 64px; height: 64px; box-shadow: 0 0 0 6px rgba(210, 16, 52, .1); }
.pay-ic svg { width: 30px; height: 30px; }
.pay-ic.ready { background: #fff6d6; color: #000; box-shadow: 0 0 0 6px rgba(245, 197, 24, .25); animation: pay-pulse 1.8s ease-in-out infinite; }
.pay-ic.paid { background: #e3f7ea; color: #17a34a; box-shadow: 0 0 0 6px rgba(23, 163, 74, .15); }
@keyframes pay-pulse { 50% { box-shadow: 0 0 0 12px rgba(245, 197, 24, 0); } }
.terms { display: grid; gap: 10px; margin: 0 0 18px; text-align: left; }
.term { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--c-line, var(--line)); border-radius: 14px; cursor: pointer; transition: border-color .2s, background .2s; position: relative; }
.term input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.term-box { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 2px solid var(--c-muted, var(--muted)); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.term-box::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px) scale(0); transition: transform .15s; }
.term input:checked + .term-box { background: var(--red); border-color: var(--red); }
.term input:checked + .term-box::after { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.term input:focus-visible + .term-box { outline: 3px solid var(--gold); outline-offset: 2px; }
.term:has(input:checked) { border-color: var(--red); background: rgba(210, 16, 52, .05); }
.term-tx { font-size: .92rem; font-weight: 500; line-height: 1.4; }
.pay-spin { position: relative; width: 72px; height: 72px; margin: 0 auto 12px; display: grid; place-items: center; color: var(--red); }
.pay-spin i { position: absolute; inset: 0; border-radius: 50%; border: 4px solid rgba(210, 16, 52, .14); border-top-color: var(--red); border-right-color: var(--gold); animation: spin 1s linear infinite; }
.pay-spin svg { width: 28px; height: 28px; animation: pay-bob 1.6s ease-in-out infinite; }
@keyframes pay-bob { 50% { transform: translateY(-3px) scale(1.06); } }
.pay-steps { list-style: none; margin: 0 0 14px; padding: 12px 14px; display: grid; gap: 8px; text-align: left; font-size: .85rem; border-radius: 14px; background: var(--c-note, #f1f3f8); counter-reset: s; }
.pay-steps li { display: flex; align-items: center; gap: 10px; color: var(--c-muted, var(--muted)); counter-increment: s; }
.pay-steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--c-line, var(--line)); color: var(--c-text, var(--text)); }
.pay-steps li.done { color: var(--c-text, var(--text)); }
.pay-steps li.done::before { content: '✓'; background: #17a34a; color: #fff; }
.pay-steps li.now { color: var(--c-text, var(--text)); font-weight: 600; }
.pay-steps li.now::before { background: var(--red); color: #fff; animation: pay-pulse-r 1.6s ease-in-out infinite; }
@keyframes pay-pulse-r { 0% { box-shadow: 0 0 0 0 rgba(210, 16, 52, .5); } 70% { box-shadow: 0 0 0 7px rgba(210, 16, 52, 0); } }
.pay-amount { display: grid; gap: 2px; margin: 0 0 14px; padding: 12px; border-radius: 14px; border: 1.5px dashed var(--gold); }
.pay-amount small { color: var(--c-muted, var(--muted)); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.pay-amount b { font-size: 1.9rem; font-family: var(--serif); line-height: 1.1; }
.pay-now { font-size: 1.05rem; padding: 1em 1.5em; margin-bottom: 14px; }
.pay-hint { font-size: .8rem !important; margin: 0 !important; }
.link-btn { border: 0; background: transparent; color: var(--c-muted, var(--muted)); font-size: .82rem; text-decoration: underline; padding: 6px; }
.link-btn:hover { color: var(--red); }
html[data-theme="dark"] .pay-ic.ready { background: rgba(245, 197, 24, .15); color: var(--gold); }
html[data-theme="dark"] .pay-ic.paid { background: rgba(23, 163, 74, .16); }
html[data-theme="dark"] .pay-ic { background: rgba(210, 16, 52, .16); }
html[data-theme="dark"] .pay-amount b { color: var(--gold); }
#payBtn.ring-hot { box-shadow: 0 0 0 2px var(--red); animation: pay-pulse-r 1.6s ease-in-out infinite; }
.tab-n:empty { display: none; }
.tab-n { margin-left: 4px; font-size: .75rem; }
.pay-list { overflow-y: auto; padding: 12px 14px 18px; display: grid; gap: 10px; align-content: start; }
.pay-card { border: 1px solid var(--c-line); border-radius: 16px; padding: 12px; display: grid; gap: 8px; background: var(--c-bg); }
.pay-card.is-new { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.pay-top { display: flex; align-items: center; gap: 10px; }
.pay-top .mini-av { width: 36px; height: 36px; }
.pay-who { flex: 1; min-width: 0; display: grid; }
.pay-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-who small { color: var(--c-muted); font-size: .75rem; }
.pay-amt { font-weight: 700; font-size: 1.1rem; }
.pay-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-st { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.st-new { background: var(--red); color: #fff; }
.st-wait { background: #fff6d6; color: #000; }
.st-paid { background: #e3f7ea; color: #0f7a35; }
.st-off { background: var(--c-chip); color: var(--c-muted); }
.pay-field { display: grid; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--c-muted); }
.pay-field input { width: 100%; font: inherit; font-size: .9rem; font-weight: 400; padding: 10px 12px; border: 1.5px solid var(--c-line); border-radius: 12px; background: var(--c-sheet); color: var(--c-text); }
.pay-field input:focus { outline: none; border-color: var(--c-accent); }
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-actions .btn { flex: 1 1 auto; }
.pay-linkline { margin: 0; font-size: .78rem; color: var(--c-muted); word-break: break-all; }
.pay-when { color: #17a34a; font-size: .78rem; font-weight: 600; }
html[data-theme="dark"] .pay-actions .btn-blue { background: var(--gold); color: #000; }

/* app shell: install card, update banner, profile app panel, email switch */
html.is-app body { overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
.app-card { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70; width: min(420px, calc(100% - 32px)); transform: translate(-50%, 24px); opacity: 0; transition: transform .26s ease, opacity .26s ease; background: linear-gradient(160deg, #0e1530, #05070f 70%); color: #f2f3f7; border: 1px solid rgba(245, 197, 24, .28); border-radius: 22px; padding: 16px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset; }
.app-card.open { transform: translate(-50%, 0); opacity: 1; }
.app-card.update { bottom: auto; top: max(14px, env(safe-area-inset-top)); transform: translate(-50%, -24px); border-color: rgba(23, 163, 74, .45); z-index: 90; }
.app-card.update.open { transform: translate(-50%, 0); }
.chat-page .app-card.install { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 64px); }
.app-card-head { display: flex; align-items: center; gap: 12px; }
.app-card-head img { flex: none; width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 0 0 3px rgba(245, 197, 24, .2); }
.app-card-head > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.app-card-head b { font-size: 1rem; }
.app-card-head span { font-size: .84rem; color: #b8bdcf; line-height: 1.35; }
.app-card-x { flex: none; align-self: flex-start; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.3rem; line-height: 1; }
.app-card-x:hover { background: rgba(255, 255, 255, .16); }
.app-perks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; color: #dfe2ec; }
.app-perks li { display: flex; gap: 8px; align-items: flex-start; }
.app-perks li::before { content: ''; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.app-card-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.app-card .btn-ghost { color: #fff; }
.btn-ic { width: 18px; height: 18px; }
.ios-steps { margin: 12px 0 14px; padding: 12px 14px 12px 34px; border-radius: 14px; background: rgba(255, 255, 255, .06); display: grid; gap: 10px; font-size: .88rem; }
.ios-steps li { line-height: 1.5; }
.ios-steps li::marker { color: var(--gold); font-weight: 700; }
.ios-ic { display: inline-block; width: 20px; height: 20px; margin: 0 5px; vertical-align: -5px; color: #4ea1ff; }
.ios-steps b { margin: 0 3px; }
#profileSheet .sheet-card { overflow-y: auto; }
.pref-row, .app-box { display: flex; align-items: center; gap: 12px; margin: 0 16px 12px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-bg); }
.pref-tx, .app-box-tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pref-tx b, .app-box-tx b { font-size: .92rem; }
.pref-tx small, .app-box-tx small { color: var(--c-muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-box img { flex: none; border-radius: 12px; }
.app-box-btns { display: grid; gap: 6px; }
.app-box-btns .btn { padding: .5em 1em; font-size: .82rem; }
.app-msg:empty { display: none; }
.app-msg { color: #17a34a !important; font-weight: 600; white-space: normal !important; }
.switch-ui { position: relative; flex: none; width: 50px; height: 30px; }
.switch-ui input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-ui span { position: absolute; inset: 0; border-radius: 999px; background: var(--c-line); transition: background .2s; }
.switch-ui span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch-ui input:checked + span { background: #17a34a; }
.switch-ui input:checked + span::after { transform: translateX(20px); }
.switch-ui input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.unsub { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 50% 25%, #0b1a5c, #05070f 70%); }
.unsub-card { width: 100%; max-width: 400px; text-align: center; background: #0e111b; color: #f2f3f7; border: 1px solid rgba(245, 197, 24, .25); border-radius: 22px; padding: 28px 22px; box-shadow: 0 30px 70px rgba(0, 0, 0, .5); }
.unsub-card img { border-radius: 18px; }
.unsub-card h1 { font-family: var(--serif); font-size: 1.3rem; margin: 16px 0 8px; color: var(--gold); }
.unsub-card p { color: #b8bdcf; margin: 0 0 18px; font-size: .92rem; }
.unsub-card form { margin-bottom: 12px; }
.unsub-card .btn-ghost { color: #fff; }
.unsub-back { color: #9aa0b4; font-size: .88rem; }
