/* ==========================================================================
   Lovenest · app styles (on top of Bootstrap 5.3)
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --lm-rose: #ff3d71;
  --lm-coral: #ff7a59;
  --lm-violet: #8e44ff;
  --lm-grad: linear-gradient(135deg, #ffb347 0%, #ff4d79 48%, #8e44ff 100%);
  --lm-grad-soft: linear-gradient(135deg, rgba(255, 179, 71, .16), rgba(255, 77, 121, .16) 50%, rgba(142, 68, 255, .16));
  --lm-bg: #fafafc;
  --lm-surface: #ffffff;
  --lm-surface-2: #f3f3f7;
  --lm-border: #ebebf0;
  --lm-text: #1b1b21;
  --lm-muted: #777783;
  --lm-bubble-in: #efeff4;
  --lm-shadow: 0 6px 24px rgba(35, 20, 60, .07);
  --lm-radius: 18px;
  --topbar-h: 56px;
  --tabbar-h: calc(58px + env(safe-area-inset-bottom, 0px));
  --side-w: 244px;
  --rail-w: 320px;

  --bs-primary: #f0356b;
  --bs-primary-rgb: 240, 53, 107;
  --bs-link-color: #e0245e;
  --bs-link-color-rgb: 224, 36, 94;
  --bs-link-hover-color: #b81a4a;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --bs-body-bg: var(--lm-bg);
  --bs-body-color: var(--lm-text);
  --bs-border-color: var(--lm-border);
  --bs-secondary-color: var(--lm-muted);
}

[data-bs-theme="dark"] {
  --lm-bg: #0b0b10;
  --lm-surface: #14141b;
  --lm-surface-2: #1d1d27;
  --lm-border: #272733;
  --lm-text: #f4f4f8;
  --lm-muted: #9d9dac;
  --lm-bubble-in: #232330;
  --lm-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --bs-body-bg: var(--lm-bg);
  --bs-body-color: var(--lm-text);
  --bs-link-color: #ff6b94;
  --bs-link-hover-color: #ff93b1;
  --bs-border-color: var(--lm-border);
  --bs-secondary-color: var(--lm-muted);
  --bs-modal-bg: var(--lm-surface);
  --bs-modal-border-color: var(--lm-border);
}

*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--lm-bg); color: var(--lm-text); overscroll-behavior-y: none; }
body.no-scroll { overflow: hidden; }
a { text-decoration: none; }
img, video { max-width: 100%; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--lm-rose); outline-offset: 2px; }
.text-muted-lm { color: var(--lm-muted) !important; }
.fw-800 { font-weight: 800; }
.grad-text { background: var(--lm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cursor-pointer { cursor: pointer; }
.no-select { user-select: none; -webkit-user-select: none; }
[hidden] { display: none !important; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: var(--lm-bg); transition: opacity .35s ease, visibility .35s; }
.splash.hide { opacity: 0; visibility: hidden; }
.splash-logo { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font-size: 2.4rem; color: #fff; background: var(--lm-grad); box-shadow: 0 16px 40px rgba(255, 61, 113, .35); animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.07); } }

/* ---------- buttons & form polish ---------- */
.btn { border-radius: 12px; font-weight: 600; }
.btn-brand {
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-color: #fff;
  color: #fff; border: 0; background: var(--lm-grad); background-size: 150% 100%;
  box-shadow: 0 8px 20px rgba(255, 61, 113, .28);
  transition: background-position .3s, transform .15s, box-shadow .2s, opacity .2s;
}
.btn-brand:hover { color: #fff; background-position: 100% 0; transform: translateY(-1px); }
.btn-brand:active { transform: translateY(0); color: #fff; }
.btn-brand:disabled, .btn-brand.disabled { opacity: .55; box-shadow: none; transform: none; color: #fff; }
.btn-soft { background: var(--lm-surface-2); color: var(--lm-text); border: 0; }
.btn-soft:hover, .btn-soft:active { background: var(--lm-border); color: var(--lm-text); }
.btn-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.35rem; transition: background .15s, transform .15s; }
.btn-icon:hover { background: var(--lm-surface-2); }
.btn-icon:active { transform: scale(.92); }
.form-control, .form-select { border-radius: 12px; padding: .65rem .9rem; background-color: var(--lm-surface); border-color: var(--lm-border); color: var(--lm-text); }
.form-control:focus, .form-select:focus { border-color: #ff4d79; box-shadow: 0 0 0 .22rem rgba(255, 61, 113, .15); background-color: var(--lm-surface); color: var(--lm-text); }
.form-control::placeholder { color: var(--lm-muted); opacity: .8; }
.form-label { font-weight: 600; font-size: .86rem; }
.form-check-input:checked { background-color: #f0356b; border-color: #f0356b; }
.input-group > .btn { border-color: var(--lm-border); }
.nav-pills .nav-link { color: var(--lm-muted); border-radius: 10px; font-weight: 600; }
.nav-pills .nav-link.active { background: var(--lm-grad); color: #fff; }

/* ---------- avatar ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; color: #fff; font-weight: 700; flex: none; background: var(--lm-surface-2); user-select: none; }
.avatar-wrap { position: relative; display: inline-block; flex: none; line-height: 0; }
.presence-dot { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; background: #22c55e; border: 2px solid var(--lm-surface); }
.story-ring { display: inline-grid; padding: 3px; border-radius: 50%; background: var(--lm-grad); line-height: 0; flex: none; }
.story-ring > .inner { padding: 2px; border-radius: 50%; background: var(--lm-bg); line-height: 0; }
.story-ring.seen { background: var(--lm-border); }
.story-ring.none { background: transparent; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.side, .rail { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 60; height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) .85rem 0;
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--lm-bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--lm-border);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--lm-text); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-logo { width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 1.05rem; color: #fff; background: var(--lm-grad); box-shadow: 0 6px 14px rgba(255, 61, 113, .3); }
.top-actions { display: flex; align-items: center; gap: .1rem; }

.main { min-width: 0; padding-bottom: calc(var(--tabbar-h) + .75rem); }
.page { width: 100%; max-width: 640px; margin: 0 auto; padding: 1rem .85rem 1.5rem; }
.page-wide { max-width: 940px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 70; height: var(--tabbar-h); padding: 0 .35rem env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--lm-surface) 92%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--lm-border);
}

.nav-item { position: relative; display: flex; align-items: center; justify-content: center; gap: .9rem; color: var(--lm-text); border: 0; background: none; font-size: 1rem; transition: transform .15s; cursor: pointer; }
.nav-item:hover { color: var(--lm-text); }
.nav-item:active .ico { transform: scale(.88); }
.nav-item .ico { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; font-size: 1.55rem; line-height: 1; transition: transform .15s; }
.nav-item .ico .on { display: none; }
.nav-item.active .ico .off { display: none; }
.nav-item.active .ico .on { display: inline-block; }
.nav-item .lbl { display: none; }
.nav-item.active .lbl { font-weight: 800; }
.nav-create .ico { width: 40px; height: 32px; border-radius: 11px; font-size: 1.25rem; color: #fff; background: var(--lm-grad); box-shadow: 0 6px 14px rgba(255, 61, 113, .3); }
.nav-badge { position: absolute; top: -6px; right: -10px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; font-size: .66rem; font-weight: 700; line-height: 16px; text-align: center; color: #fff; background: var(--lm-rose); border: 2px solid var(--lm-bg); box-sizing: border-box; }
.nav-badge:empty, .nav-badge[data-n="0"] { display: none; }
.dot-badge { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--lm-rose); border: 2px solid var(--lm-bg); }

/* chat takes the whole screen on phones */
.app[data-route="chat"] .topbar, .app[data-route="chat"] .tabbar { display: none; }
.app[data-route="chat"] .main { padding-bottom: 0; }

/* ---------- ≥768 · icon rail ---------- */
@media (min-width: 768px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: 1fr; }
  .topbar, .tabbar { display: none !important; }
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 1.25rem .6rem;
    border-right: 1px solid var(--lm-border); background: var(--lm-bg); z-index: 50; align-items: center;
  }
  .side .brand-name { display: none; }
  .side .brand { margin: .25rem 0 1.5rem; }
  .side-nav { display: flex; flex-direction: column; gap: .35rem; width: 100%; align-items: center; }
  .side .nav-item { width: 52px; height: 52px; border-radius: 14px; }
  .side .nav-item:hover { background: var(--lm-surface-2); }
  .side .nav-create .ico { width: 36px; height: 36px; border-radius: 12px; }
  .side-foot { margin-top: auto; }
  .main { padding-bottom: 1.5rem; }
  .page { padding: 1.75rem 1rem 2rem; }
  .app[data-route="chat"] .main { padding-bottom: 0; }
}

/* ---------- ≥1200 · full sidebar + right rail ---------- */
@media (min-width: 1200px) {
  .app { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--rail-w); }
  .side { align-items: stretch; padding: 1.5rem .85rem; }
  .side .brand { padding: 0 .75rem; margin-bottom: 1.75rem; }
  .side .brand-name { display: inline; }
  .side-nav { align-items: stretch; }
  .side .nav-item { width: auto; height: 52px; justify-content: flex-start; padding: 0 .85rem; }
  .side .nav-item .lbl { display: inline; }
  .side .nav-create .ico { width: 28px; height: 28px; border-radius: 9px; font-size: 1rem; }
  .rail { display: block; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding: 2rem 1.5rem; border-left: 1px solid var(--lm-border); }
  .app[data-route="chat"] .rail { display: none; }
  .app[data-route="chat"] { grid-template-columns: var(--side-w) minmax(0, 1fr); }
}
@media (min-width: 1200px) and (max-width: 1399.98px) { :root { --side-w: 220px; --rail-w: 290px; } }

.side-more { position: relative; }
.more-menu { min-width: 230px; border-radius: 16px; border: 1px solid var(--lm-border); box-shadow: var(--lm-shadow); padding: .4rem; background: var(--lm-surface); }
.more-menu .dropdown-item { border-radius: 10px; padding: .6rem .8rem; display: flex; align-items: center; gap: .7rem; color: var(--lm-text); }
.more-menu .dropdown-item:hover { background: var(--lm-surface-2); }
.more-menu .dropdown-item i { font-size: 1.1rem; width: 20px; text-align: center; }

/* right rail */
.rail-card { background: var(--lm-surface); border: 1px solid var(--lm-border); border-radius: var(--lm-radius); padding: 1rem; margin-bottom: 1rem; }
.rail-person { display: flex; align-items: center; gap: .8rem; }
.rail-person .nm { font-weight: 700; line-height: 1.2; }
.rail-person .sub { font-size: .8rem; color: var(--lm-muted); }
.rail-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--lm-muted); margin-bottom: .6rem; }
.counter-big { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }

/* ---------- cards / generic ---------- */
.card-lm { background: var(--lm-surface); border: 1px solid var(--lm-border); border-radius: var(--lm-radius); }
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--lm-muted); }
.empty .ico { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; background: var(--lm-grad-soft); color: var(--lm-rose); }
.empty h3 { font-size: 1.1rem; font-weight: 700; color: var(--lm-text); }
.skel { position: relative; overflow: hidden; background: var(--lm-surface-2); border-radius: 10px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: shimmer 1.3s infinite; }
[data-bs-theme="dark"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }
.pill-new { position: sticky; top: calc(var(--topbar-h) + .5rem); z-index: 30; display: flex; justify-content: center; margin-bottom: .5rem; }
.pill-new button { border: 0; border-radius: 999px; padding: .45rem 1rem; color: #fff; font-weight: 600; font-size: .85rem; background: var(--lm-grad); box-shadow: 0 8px 20px rgba(255, 61, 113, .35); }
@media (min-width: 768px) { .pill-new { top: .75rem; } }

/* ---------- toasts / modals ---------- */
.toast { border-radius: 14px; box-shadow: var(--lm-shadow); border: 0; }
.modal-content { border-radius: 22px; border: 1px solid var(--lm-border); background: var(--lm-surface); }
.modal-header { border-bottom: 0; padding-bottom: .25rem; }
.modal-header .modal-title { font-weight: 800; font-size: 1.1rem; }
.modal-footer { border-top: 0; }
.modal-backdrop.show { opacity: .55; }
@media (max-width: 575.98px) {
  .modal.sheet .modal-dialog { margin: 0; position: fixed; inset: auto 0 0 0; max-width: none; min-height: 0; align-items: flex-end; }
  .modal.sheet .modal-content { border-radius: 24px 24px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal.sheet.fade .modal-dialog { transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
  .modal.sheet.show .modal-dialog { transform: none; }
  .modal.sheet .modal-content::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--lm-border); margin: 8px auto 0; }
}

/* ---------- auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.auth-art { display: none; position: relative; color: #fff; background: var(--lm-grad); overflow: hidden; padding: 3rem; }
.auth-art::before, .auth-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.auth-art::before { width: 460px; height: 460px; right: -160px; bottom: -140px; }
.auth-art::after { width: 260px; height: 260px; left: -90px; top: 30%; }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: 3rem; }
.auth-art ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; }
.auth-art li { display: flex; align-items: center; gap: .8rem; font-weight: 500; }
.auth-art li i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card .brand { font-size: 1.5rem; margin-bottom: 1.75rem; }
.auth-card h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.auth-switch { text-align: center; margin-top: 1.5rem; color: var(--lm-muted); font-size: .92rem; }
@media (min-width: 992px) { .auth { grid-template-columns: 1.05fr 1fr; } .auth-art { display: block; } }

/* ---------- stories tray ---------- */
.tray { display: flex; gap: .9rem; overflow-x: auto; padding: .25rem .1rem .9rem; margin: 0 -.85rem; padding-inline: .85rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.tray::-webkit-scrollbar { display: none; }
.tray-item { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: .35rem; background: none; border: 0; color: var(--lm-text); font-size: .74rem; scroll-snap-align: start; cursor: pointer; padding: 0; }
.tray-item .nm { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-item .add { position: absolute; right: -1px; bottom: -1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; color: #fff; background: var(--lm-grad); border: 3px solid var(--lm-bg); }
.tray-item:active .story-ring { transform: scale(.94); }
.story-ring { transition: transform .15s; }

.story-text { display: grid; place-items: center; text-align: center; padding: 1.5rem; font-weight: 800; color: #fff; line-height: 1.2; word-break: break-word; }
.g1 { background: linear-gradient(135deg, #ff7a59, #ff3d71); }
.g2 { background: linear-gradient(135deg, #8e44ff, #3b82f6); }
.g3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.g4 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.g5 { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.g6 { background: linear-gradient(135deg, #111827, #4b5563); }
.g7 { background: linear-gradient(135deg, #fb7185, #fbbf24); }
.g8 { background: linear-gradient(135deg, #06b6d4, #22c55e); }

/* story viewer */
.sv { position: fixed; inset: 0; z-index: 1800; background: #000; display: flex; align-items: center; justify-content: center; animation: fadeIn .2s ease; }
.sv-stage { position: relative; width: 100%; height: 100%; max-width: 470px; max-height: 100dvh; background: #111; overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 768px) { .sv-stage { height: min(100dvh, 860px); border-radius: 18px; } }
.sv-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
img.sv-media, video.sv-media { background: #000; }
.sv-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 22%, transparent 70%, rgba(0, 0, 0, .6)); }
.sv-bars { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.sv-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.sv-bars span i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bars span.done i { width: 100%; }
.sv-head { position: absolute; top: calc(22px + env(safe-area-inset-top, 0px)); left: 12px; right: 8px; display: flex; align-items: center; gap: .65rem; color: #fff; z-index: 3; }
.sv-head .nm { font-weight: 700; font-size: .92rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.sv-head .tm { font-size: .78rem; opacity: .8; }
.sv-head .btn-icon { color: #fff; margin-left: auto; }
.sv-head .btn-icon + .btn-icon { margin-left: 0; }
.sv-head .btn-icon:hover { background: rgba(255, 255, 255, .15); }
.sv-tap { position: absolute; top: 70px; bottom: 90px; z-index: 2; width: 35%; }
.sv-tap.l { left: 0; } .sv-tap.r { right: 0; width: 65%; }
.sv-caption { position: absolute; left: 0; right: 0; bottom: 90px; padding: 0 1.25rem; text-align: center; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); z-index: 3; font-weight: 500; }
.sv-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: .75rem .85rem calc(.85rem + env(safe-area-inset-bottom, 0px)); z-index: 4; display: flex; gap: .6rem; align-items: center; }
.sv-reply { flex: 1; border: 1.5px solid rgba(255, 255, 255, .6); background: rgba(0, 0, 0, .25); color: #fff; border-radius: 999px; padding: .65rem 1rem; outline: none; backdrop-filter: blur(6px); }
.sv-reply::placeholder { color: rgba(255, 255, 255, .75); }
.sv-reply:focus { border-color: #fff; }
.sv-react { display: flex; gap: .15rem; }
.sv-react button { border: 0; background: none; font-size: 1.5rem; padding: .2rem; transition: transform .15s; }
.sv-react button:active { transform: scale(1.35); }
.sv-viewers { color: #fff; font-size: .88rem; display: flex; align-items: center; gap: .5rem; background: rgba(0, 0, 0, .35); border-radius: 999px; padding: .5rem .9rem; }
.sv-close-d { position: absolute; top: 14px; right: 14px; z-index: 5; display: none; }
@media (min-width: 768px) { .sv-close-d { display: inline-grid; position: fixed; color: #fff; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- posts ---------- */
.post { background: var(--lm-surface); border: 1px solid var(--lm-border); border-radius: var(--lm-radius); margin-bottom: 1.1rem; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: .7rem; padding: .75rem .9rem; }
.post-head .nm { font-weight: 700; font-size: .95rem; line-height: 1.15; }
.post-head .tm { font-size: .76rem; color: var(--lm-muted); }
.post-media { position: relative; background: #000; line-height: 0; user-select: none; -webkit-user-select: none; }
.post-media img, .post-media video { width: 100%; max-height: 78vh; object-fit: cover; display: block; background: var(--lm-surface-2); }
.post-media video { object-fit: contain; background: #000; }
.post-text-only { padding: .25rem .95rem .6rem; font-size: 1.12rem; line-height: 1.45; }
.heart-burst { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #fff; font-size: 6rem; opacity: 0; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
.heart-burst.go { animation: burst .85s ease forwards; }
@keyframes burst { 0% { opacity: 0; transform: scale(.3); } 20% { opacity: 1; transform: scale(1.15); } 40% { transform: scale(.95); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1); } }
.post-actions { display: flex; align-items: center; gap: .1rem; padding: .35rem .5rem 0; }
.post-actions .btn-icon { font-size: 1.5rem; }
.like-btn.liked { color: var(--lm-rose); }
.like-btn.liked i { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.7); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.post-body { padding: .1rem .95rem .9rem; font-size: .95rem; }
.post-body .likes { font-weight: 700; }
.post-body .cap b { margin-right: .35rem; }
.post-body .cap { white-space: pre-wrap; word-break: break-word; }
.post-body .more-c { color: var(--lm-muted); background: none; border: 0; padding: 0; font-size: .9rem; }

.comment { display: flex; gap: .65rem; padding: .55rem 0; }
.comment .body { font-size: .92rem; word-break: break-word; }
.comment .body b { margin-right: .35rem; }
.comment .tm { font-size: .72rem; color: var(--lm-muted); }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 1.25rem; padding: .5rem 0 1.1rem; }
.profile-head .nm { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.profile-stats { display: flex; gap: 1.6rem; margin-top: .55rem; }
.profile-stats b { display: block; font-size: 1.1rem; line-height: 1.1; }
.profile-stats span { font-size: .78rem; color: var(--lm-muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -.85rem; }
.grid3 .cell { position: relative; aspect-ratio: 1; background: var(--lm-surface-2); overflow: hidden; border: 0; padding: 0; cursor: pointer; }
.grid3 .cell img, .grid3 .cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid3 .cell .tag { position: absolute; top: 7px; right: 7px; color: #fff; font-size: 1rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.grid3 .cell.txt { display: grid; place-items: center; padding: .6rem; font-size: .8rem; text-align: center; background: var(--lm-grad-soft); color: var(--lm-text); }
@media (min-width: 768px) { .grid3 { margin: 0; gap: 6px; } .grid3 .cell { border-radius: 8px; } }

/* ---------- together hub ---------- */
.hero-card { position: relative; overflow: hidden; border-radius: 24px; padding: 1.6rem 1.4rem; color: #fff; background: var(--lm-grad); box-shadow: 0 16px 40px rgba(255, 61, 113, .28); }
.hero-card::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .13); right: -70px; top: -80px; }
.hero-card > * { position: relative; z-index: 1; }
.hero-days { font-size: clamp(2.8rem, 12vw, 3.8rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.hero-faces { display: flex; }
.hero-faces .avatar { border: 3px solid rgba(255, 255, 255, .85); }
.hero-faces .avatar + .avatar { margin-left: -14px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.quick { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem .5rem; border: 1px solid var(--lm-border); border-radius: var(--lm-radius); background: var(--lm-surface); color: var(--lm-text); font-weight: 600; font-size: .85rem; transition: transform .15s, box-shadow .2s; cursor: pointer; }
.quick:hover { transform: translateY(-2px); box-shadow: var(--lm-shadow); color: var(--lm-text); }
.quick .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: #fff; background: var(--lm-grad); }
.soon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 576px) { .soon-grid { grid-template-columns: repeat(3, 1fr); } }
.soon { position: relative; padding: 1rem; border: 1px dashed var(--lm-border); border-radius: var(--lm-radius); background: var(--lm-surface); }
.soon .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; margin-bottom: .6rem; background: var(--lm-grad-soft); color: var(--lm-rose); }
.soon b { display: block; font-size: .92rem; }
.soon span { font-size: .78rem; color: var(--lm-muted); }
.soon .tagsoon { position: absolute; top: .7rem; right: .7rem; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lm-muted); background: var(--lm-surface-2); border-radius: 999px; padding: .15rem .5rem; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--lm-muted); margin: 1.6rem 0 .75rem; }

/* ---------- notifications ---------- */
.notif { display: flex; align-items: center; gap: .85rem; padding: .85rem .9rem; border-radius: 16px; cursor: pointer; transition: background .15s; }
.notif:hover { background: var(--lm-surface-2); }
.notif.unread { background: var(--lm-grad-soft); }
.notif .tx { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.3; }
.notif .tx b { font-weight: 700; }
.notif .tm { font-size: .76rem; color: var(--lm-muted); }
.notif .type { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--lm-surface-2); color: var(--lm-rose); flex: none; }

/* ---------- create ---------- */
.dropzone { border: 2px dashed var(--lm-border); border-radius: 20px; padding: 2rem 1rem; text-align: center; color: var(--lm-muted); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.over { border-color: var(--lm-rose); background: var(--lm-grad-soft); }
.dropzone i { font-size: 2.4rem; color: var(--lm-rose); }
.preview-box { position: relative; border-radius: 18px; overflow: hidden; background: #000; line-height: 0; }
.preview-box img, .preview-box video { width: 100%; max-height: 52vh; object-fit: contain; }
.preview-box .rm { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .55); color: #fff; }
.text-story { aspect-ratio: 9 / 13; max-height: 52vh; border-radius: 20px; width: 100%; margin: 0 auto; }
.text-story textarea { width: 100%; height: 100%; background: transparent; border: 0; color: #fff; text-align: center; font-size: 1.6rem; font-weight: 800; resize: none; outline: none; padding: 0; }
.text-story textarea::placeholder { color: rgba(255, 255, 255, .7); }
.swatches { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: .85rem; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--lm-surface); box-shadow: 0 0 0 1.5px var(--lm-border); padding: 0; }
.swatch.on { box-shadow: 0 0 0 2.5px var(--lm-rose); }

/* ==========================================================================
   CHAT
   ========================================================================== */
.chat { position: relative; display: flex; flex-direction: column; height: var(--vvh, 100dvh); max-width: 900px; margin: 0 auto; background: var(--lm-bg); }
@media (min-width: 992px) { .chat { border-inline: 1px solid var(--lm-border); } }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; padding-top: calc(.55rem + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--lm-border); background: color-mix(in srgb, var(--lm-bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 5; }
.chat-head .who { flex: 1; min-width: 0; line-height: 1.2; }
.chat-head .who b { display: block; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-status { font-size: .78rem; color: var(--lm-muted); display: flex; align-items: center; gap: .35rem; min-height: 1.1em; }
.chat-status.live { color: var(--lm-rose); font-weight: 600; }
.chat-status.online { color: #16a34a; }
.back-btn { display: none; }
@media (max-width: 767.98px) { .back-btn { display: inline-grid; } }

.chat-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: .75rem .75rem .25rem; display: flex; flex-direction: column; scroll-behavior: auto; }
.chat-list > :first-child { margin-top: auto; }
.chat-intro { text-align: center; padding: 1.5rem 1rem 1rem; color: var(--lm-muted); font-size: .9rem; }
.chat-intro .avatar { margin-bottom: .6rem; }
.chat-intro b { display: block; color: var(--lm-text); font-size: 1.05rem; }
.day-sep { align-self: center; margin: .9rem 0 .6rem; font-size: .72rem; font-weight: 600; color: var(--lm-muted); background: var(--lm-surface-2); border-radius: 999px; padding: .2rem .7rem; }
.load-older { align-self: center; border: 0; background: var(--lm-surface-2); color: var(--lm-muted); border-radius: 999px; padding: .3rem .9rem; font-size: .78rem; margin-bottom: .5rem; }

.msg-row { display: flex; align-items: flex-end; gap: .45rem; margin-top: 2px; max-width: 100%; animation: msgIn .22s ease both; }
.msg-row.grp-start, .msg-row.grp-single { margin-top: .6rem; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-av { width: 28px; flex: none; align-self: flex-end; }
.msg-col { display: flex; flex-direction: column; max-width: min(78%, 520px); min-width: 0; }
.mine .msg-col { align-items: flex-end; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.bubble { position: relative; padding: .55rem .85rem; border-radius: 20px; font-size: .95rem; line-height: 1.38; word-break: break-word; overflow-wrap: anywhere; white-space: pre-wrap; background: var(--lm-bubble-in); color: var(--lm-text); }
.mine .bubble { background: var(--lm-grad); background-attachment: fixed; color: #fff; }
.bubble a { color: inherit; text-decoration: underline; }
.theirs.grp-mid .bubble, .theirs.grp-end .bubble { border-top-left-radius: 6px; }
.theirs.grp-start .bubble, .theirs.grp-mid .bubble { border-bottom-left-radius: 6px; }
.mine.grp-mid .bubble, .mine.grp-end .bubble { border-top-right-radius: 6px; }
.mine.grp-start .bubble, .mine.grp-mid .bubble { border-bottom-right-radius: 6px; }
.bubble.only-emoji { background: none !important; font-size: 2.4rem; padding: .1rem .2rem; line-height: 1.15; }
.bubble.deleted { background: none !important; border: 1px dashed var(--lm-border); color: var(--lm-muted); font-style: italic; }
.bubble.sel { box-shadow: 0 0 0 2px rgba(255, 61, 113, .45); }
.bubble.media { padding: 3px; background: var(--lm-bubble-in); }
.mine .bubble.media { background: var(--lm-grad); }
.bubble.media img, .bubble.media video { display: block; border-radius: 17px; max-width: min(320px, 68vw); max-height: 380px; width: auto; height: auto; object-fit: cover; background: #000; cursor: zoom-in; }
.bubble.media .cap { padding: .4rem .6rem .25rem; }
.bubble.sending { opacity: .65; }
.bubble.failed { outline: 2px solid #ef4444; }
.media-wrap { position: relative; line-height: 0; }
.upload-prog { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .4); border-radius: 17px; color: #fff; font-weight: 700; font-size: .9rem; }

.reply-q { display: flex; align-items: stretch; gap: .5rem; margin-bottom: 2px; padding: .35rem .65rem; border-radius: 14px; background: var(--lm-surface-2); color: var(--lm-muted); font-size: .8rem; max-width: 100%; cursor: pointer; }
.reply-q::before { content: ""; width: 3px; border-radius: 2px; background: var(--lm-rose); flex: none; }
.reply-q .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-q b { display: block; color: var(--lm-text); font-size: .74rem; }
.story-ref { display: flex; align-items: center; gap: .55rem; margin-bottom: 3px; padding: .35rem; border-radius: 14px; background: var(--lm-surface-2); font-size: .78rem; color: var(--lm-muted); max-width: 100%; }
.story-ref .thumb { width: 38px; height: 54px; border-radius: 8px; object-fit: cover; flex: none; overflow: hidden; }

.react-chips { display: flex; gap: 2px; margin-top: -9px; margin-inline: 8px; position: relative; z-index: 1; }
.react-chips span { background: var(--lm-surface); border: 1px solid var(--lm-border); border-radius: 999px; padding: 0 .35rem; font-size: .8rem; line-height: 1.5; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.msg-meta { display: flex; align-items: center; gap: .3rem; font-size: .68rem; color: var(--lm-muted); margin: 2px 6px 0; }
.tick { font-size: .85rem; line-height: 1; }
.tick.seen { color: #2fa4ff; }
.seen-label { align-self: flex-end; font-size: .72rem; color: var(--lm-muted); margin: 3px 8px 0; display: flex; align-items: center; gap: .3rem; }

.msg-actions { display: flex; align-items: center; gap: .15rem; margin: 4px 2px 2px; padding: .2rem .35rem; border-radius: 999px; background: var(--lm-surface); border: 1px solid var(--lm-border); box-shadow: var(--lm-shadow); flex-wrap: wrap; animation: msgIn .15s ease; }
.msg-actions button { border: 0; background: none; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.1rem; color: var(--lm-text); transition: transform .12s, background .12s; }
.msg-actions button:hover { background: var(--lm-surface-2); transform: scale(1.12); }
.msg-actions .sep { width: 1px; height: 20px; background: var(--lm-border); margin: 0 .15rem; }
.msg-actions .danger { color: #ef4444; }

/* call summary row */
.call-row { align-self: center; display: inline-flex; align-items: center; gap: .55rem; margin: .7rem 0 .3rem; padding: .45rem .95rem; border-radius: 999px; background: var(--lm-surface); border: 1px solid var(--lm-border); font-size: .82rem; color: var(--lm-muted); cursor: pointer; }
.call-row i { font-size: 1rem; color: #16a34a; }
.call-row.missed i { color: #ef4444; }
.call-row b { color: var(--lm-text); font-weight: 600; }

/* voice note */
.voice { display: flex; align-items: center; gap: .6rem; min-width: 210px; padding: .15rem .1rem; }
.voice .play { width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; color: var(--lm-rose); background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.theirs .voice .play { background: var(--lm-rose); color: #fff; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; min-width: 90px; }
.wave i { flex: 1; min-width: 2px; max-width: 4px; border-radius: 2px; height: var(--h, 40%); background: currentColor; opacity: .38; transition: opacity .1s; }
.wave i.on { opacity: 1; }
.voice .dur { font-size: .72rem; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; opacity: .9; }
.voice .spd { border: 0; border-radius: 999px; font-size: .68rem; font-weight: 700; padding: .12rem .45rem; background: rgba(255, 255, 255, .25); color: inherit; }
.theirs .voice .spd { background: rgba(0, 0, 0, .08); }
[data-bs-theme="dark"] .theirs .voice .spd { background: rgba(255, 255, 255, .12); }
.voice-wrap { color: inherit; }

/* link card */
.link-card { display: block; max-width: 300px; border-radius: 16px; overflow: hidden; background: var(--lm-surface); border: 1px solid var(--lm-border); color: var(--lm-text) !important; text-decoration: none !important; white-space: normal; }
.link-card .thumb { position: relative; aspect-ratio: 16 / 9; background: #000 center / cover; }
.link-card .thumb::after { content: "\F4F4"; font-family: bootstrap-icons; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 2.6rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.link-card .meta { padding: .5rem .7rem; font-size: .8rem; color: var(--lm-muted); }
.link-card .meta b { display: block; color: var(--lm-text); font-size: .85rem; }

/* typing */
.typing-row { display: flex; align-items: flex-end; gap: .45rem; padding: 0 .75rem .35rem; min-height: 0; }
.typing-row[hidden] { display: none; }
.typing-bubble { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem .8rem; border-radius: 20px; border-bottom-left-radius: 6px; background: var(--lm-bubble-in); font-size: .8rem; color: var(--lm-muted); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--lm-muted); 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%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: blink 1s infinite; display: inline-block; }
@keyframes blink { 50% { opacity: .25; } }
.mic-pulse { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.mic-pulse i { width: 3px; border-radius: 2px; background: var(--lm-rose); animation: eq 0.9s infinite ease-in-out; }
.mic-pulse i:nth-child(1) { height: 40%; animation-delay: 0s; } .mic-pulse i:nth-child(2) { height: 90%; animation-delay: .15s; } .mic-pulse i:nth-child(3) { height: 60%; animation-delay: .3s; } .mic-pulse i:nth-child(4) { height: 100%; animation-delay: .45s; }
@keyframes eq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }

/* composer */
.composer-wrap { padding: .4rem .65rem calc(.55rem + env(safe-area-inset-bottom, 0px)); background: var(--lm-bg); }
.composer-ctx { display: flex; align-items: center; gap: .6rem; padding: .45rem .8rem; margin-bottom: .4rem; border-radius: 14px; background: var(--lm-surface-2); font-size: .82rem; color: var(--lm-muted); }
.composer-ctx .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-ctx b { color: var(--lm-text); }
.composer { display: flex; align-items: flex-end; gap: .35rem; padding: .3rem; border-radius: 26px; background: var(--lm-surface); border: 1px solid var(--lm-border); }
.composer textarea { flex: 1; border: 0; background: none; resize: none; outline: none; color: var(--lm-text); padding: .55rem .3rem; max-height: 140px; line-height: 1.35; font-size: 1rem; }
.composer .btn-icon { width: 40px; height: 40px; flex: none; font-size: 1.35rem; }
.composer .send { color: #fff; background: var(--lm-grad); box-shadow: 0 6px 14px rgba(255, 61, 113, .3); }
.composer .send:hover { background: var(--lm-grad); filter: brightness(1.05); }
.composer .mic { color: var(--lm-text); }
.recorder { display: flex; align-items: center; gap: .6rem; padding: .3rem; border-radius: 26px; background: var(--lm-surface); border: 1px solid var(--lm-rose); }
.recorder .live { flex: 1; display: flex; align-items: center; gap: .6rem; min-width: 0; }
.recorder .time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 42px; }
.recorder .live-wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 2px; overflow: hidden; justify-content: flex-end; }
.recorder .live-wave i { width: 3px; flex: none; border-radius: 2px; background: var(--lm-rose); height: var(--h, 10%); min-height: 3px; }
.recorder .trash { color: #ef4444; }

.emoji-pop { position: absolute; left: .65rem; right: .65rem; bottom: calc(100% + 4px); max-width: 380px; background: var(--lm-surface); border: 1px solid var(--lm-border); border-radius: 18px; box-shadow: var(--lm-shadow); padding: .5rem; z-index: 10; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 200px; overflow-y: auto; }
.emoji-grid button { border: 0; background: none; font-size: 1.45rem; border-radius: 8px; padding: .2rem 0; line-height: 1.3; }
.emoji-grid button:hover { background: var(--lm-surface-2); }
.new-pill { position: absolute; left: 50%; bottom: 82px; transform: translateX(-50%); z-index: 6; border: 0; border-radius: 999px; padding: .4rem .9rem; color: #fff; font-size: .8rem; font-weight: 600; background: var(--lm-grad); box-shadow: 0 8px 20px rgba(255, 61, 113, .35); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1850; background: rgba(0, 0, 0, .92); display: grid; place-items: center; animation: fadeIn .2s; }
.lightbox img, .lightbox video { max-width: 96vw; max-height: 92dvh; object-fit: contain; border-radius: 6px; }
.lightbox .btn-icon { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; color: #fff; }

/* ==========================================================================
   CALLS
   ========================================================================== */
.call { position: fixed; inset: 0; z-index: 1900; display: flex; flex-direction: column; color: #fff; background: radial-gradient(1000px 600px at 50% 0%, #3a1b57, #0c0b12 70%); animation: fadeIn .25s ease; overflow: hidden; touch-action: manipulation; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call[data-vid="0"] .call-remote { visibility: hidden; }
.call-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 28%, transparent 62%, rgba(0, 0, 0, .65)); }
.call[data-vid="0"] .call-shade { display: none; }
.call-top { position: relative; z-index: 3; padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem 0; display: flex; align-items: center; gap: .6rem; }
.call-top .btn-icon { color: #fff; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); }
.call-top .btn-icon:hover { background: rgba(255, 255, 255, .24); }
.call-top .enc { margin-left: auto; font-size: .76rem; opacity: .8; display: flex; align-items: center; gap: .35rem; }
.call-center { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .35rem; padding: 1rem; }
.call[data-vid="1"][data-state="active"] .call-center { display: none; }
.call-center .nm { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin-top: 1rem; }
.call-center .st { opacity: .85; font-size: 1rem; }
.call-av { position: relative; }
.call-av .avatar { box-shadow: 0 0 0 6px rgba(255, 255, 255, .08); }
.call-av.pulse::before, .call-av.pulse::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); animation: ripple 2s infinite ease-out; }
.call-av.pulse::after { animation-delay: 1s; }
@keyframes ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.call-pip { position: absolute; z-index: 4; top: calc(70px + env(safe-area-inset-top, 0px)); right: 14px; width: 112px; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #222; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); border: 2px solid rgba(255, 255, 255, .25); touch-action: none; cursor: grab; }
.call-pip video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.call-pip.nomirror video { transform: none; }
.call[data-localvid="0"] .call-pip { display: none; }
@media (min-width: 768px) { .call-pip { width: 180px; right: 24px; } }
.call-bar { position: relative; z-index: 3; display: flex; justify-content: center; gap: .9rem; flex-wrap: wrap; padding: 1rem 1rem calc(1.6rem + env(safe-area-inset-bottom, 0px)); transition: opacity .3s, transform .3s; }
.call.idle-ui .call-bar, .call.idle-ui .call-top { opacity: 0; pointer-events: none; }
.cbtn { width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 1.4rem; color: #fff; background: rgba(255, 255, 255, .16); backdrop-filter: blur(10px); transition: transform .15s, background .15s; }
.cbtn:hover { background: rgba(255, 255, 255, .26); }
.cbtn:active { transform: scale(.92); }
.cbtn.on { background: #fff; color: #111; }
.cbtn.end { background: #ef4444; }
.cbtn.end:hover { background: #dc2626; }
.cbtn.accept { background: #22c55e; animation: nudge 1.4s infinite; }
.cbtn.accept:hover { background: #16a34a; }
.cbtn.big { width: 70px; height: 70px; font-size: 1.7rem; }
.cbtn-wrap { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .76rem; opacity: .95; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.call.mini { inset: auto 14px calc(var(--tabbar-h) + 12px) auto; width: 132px; height: 190px; border-radius: 20px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); border: 2px solid rgba(255, 255, 255, .25); cursor: pointer; }
@media (min-width: 768px) { .call.mini { bottom: 18px; width: 180px; height: 250px; } }
.call.mini .call-top, .call.mini .call-bar, .call.mini .call-pip, .call.mini .call-center .nm, .call.mini .call-center .st { display: none; }
.call.mini .call-center { display: flex !important; }
.call.mini .call-av .avatar { width: 64px !important; height: 64px !important; font-size: 26px !important; }
.call.mini::after { content: attr(data-time); position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-weight: 700; font-size: .85rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
@media (max-height: 520px) and (orientation: landscape) { .call-bar { padding-bottom: .8rem; } .cbtn { width: 48px; height: 48px; } .call-center .nm { font-size: 1.2rem; margin-top: .3rem; } .call-center .avatar { width: 64px !important; height: 64px !important; } }

/* ---------- misc ---------- */
.install-banner { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; margin-bottom: 1rem; border-radius: var(--lm-radius); background: var(--lm-grad-soft); border: 1px solid var(--lm-border); }
.install-banner .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--lm-grad); color: #fff; flex: none; }
.settings-group { background: var(--lm-surface); border: 1px solid var(--lm-border); border-radius: var(--lm-radius); padding: 1rem; margin-bottom: 1rem; }
.settings-group h6 { font-weight: 800; margin-bottom: .75rem; }
.invite-box { text-align: center; padding: 1rem; border-radius: 16px; border: 1px dashed #ff9db8; background: var(--lm-grad-soft); }
.invite-box .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.7rem; font-weight: 800; letter-spacing: .14em; }

/* ===================================================================================== games + game night */
.gm-head { display: flex; align-items: center; gap: .35rem; margin: 0 0 1rem -.35rem; }
.gm-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.gm-title h1 { font-size: 1.25rem; font-weight: 800; margin: 0; line-height: 1.2; }
.gm-chip { display: inline-flex; align-items: center; padding: .18rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--lm-surface-2); color: var(--lm-muted); white-space: nowrap; }
.gm-chip.me { color: #fff; background: var(--lm-grad); box-shadow: 0 4px 12px rgba(255, 61, 113, .3); }
.gm-chip.both { color: var(--lm-violet); background: rgba(142, 68, 255, .12); }
.gm-chip.done { color: var(--lm-muted); }
.bar { flex: 1; height: 8px; border-radius: 99px; background: var(--lm-surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--lm-grad); transition: width .35s ease; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; vertical-align: baseline; }
.dot.me { background: var(--lm-rose); }
.dot.them { background: var(--lm-violet); }

.gm-ico { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; color: #fff; font-size: 1.2rem; }
.gm-ico.lg { width: 50px; height: 50px; border-radius: 15px; font-size: 1.45rem; }
.gm-ico.t1 { background: linear-gradient(135deg, #ff9a5a, #ff4d79); }
.gm-ico.t2 { background: linear-gradient(135deg, #ff4d79, #b44cff); }
.gm-ico.t3 { background: linear-gradient(135deg, #8e44ff, #4d7cff); }
.gm-ico.t4 { background: linear-gradient(135deg, #2ec4b6, #4d9cff); }
.gm-ico.t5 { background: linear-gradient(135deg, #ff7a59, #ffb347); }
.gm-ico.t6 { background: linear-gradient(135deg, #f0356b, #ff7a59); }

.gm-score { padding: 1.1rem 1rem; }
.gm-score-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.gm-side { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 76px; font-size: .84rem; }
.gm-nums { display: flex; align-items: baseline; gap: .7rem; font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--lm-muted); }
.gm-nums i { font-style: normal; font-size: 1.6rem; opacity: .5; }
.gm-nums .ahead { background: var(--lm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: .9rem; }
.gm-chip-s { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--lm-surface-2); color: var(--lm-muted); }
.gm-chip-s.hot { color: var(--lm-rose); background: var(--lm-grad-soft); }

.gm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.gm-start { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: 1rem; text-align: left; border: 1px solid var(--lm-border); border-radius: var(--lm-radius); background: var(--lm-surface); color: var(--lm-text); transition: transform .15s, box-shadow .2s, border-color .2s; }
.gm-start:hover { transform: translateY(-2px); box-shadow: var(--lm-shadow); }
.gm-start:active { transform: scale(.98); }
.gm-start.running { border-color: var(--lm-rose); }
.gm-start b { font-size: .95rem; line-height: 1.2; margin-top: .35rem; }
.gm-start span:last-child { font-size: .78rem; color: var(--lm-muted); line-height: 1.35; }
@media (min-width: 576px) { .gm-grid { grid-template-columns: repeat(3, 1fr); } }

.gm-list { display: flex; flex-direction: column; gap: .5rem; }
.gm-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--lm-border); border-radius: 16px; background: var(--lm-surface); color: var(--lm-text); text-decoration: none; transition: background .15s, transform .15s; }
.gm-row:hover { background: var(--lm-surface-2); color: var(--lm-text); }
.gm-row:active { transform: scale(.99); }
.gm-row.quiet { border-color: transparent; background: transparent; padding-inline: .4rem; }
.gm-row.quiet:hover { background: var(--lm-surface-2); }
.gm-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.gm-row-main b { font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-row-main span, .gm-when { font-size: .78rem; color: var(--lm-muted); }
.gm-thumb { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none; background: var(--lm-surface-2); }
.gm-pill { flex: none; padding: .22rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--lm-surface-2); color: var(--lm-muted); }
.gm-pill.me { color: #fff; background: var(--lm-grad); }
.gm-pill.both { color: var(--lm-violet); background: rgba(142, 68, 255, .12); }

.gm-banner { display: flex; align-items: center; flex-wrap: wrap; gap: .9rem; padding: 1rem 1.1rem; margin-bottom: 1rem; border-radius: 20px; border: 1px solid var(--lm-border); background: var(--lm-surface); animation: gm-rise .45s cubic-bezier(.2, .8, .2, 1); }
.gm-banner.win { border-color: transparent; background: var(--lm-grad-soft); box-shadow: inset 0 0 0 1px rgba(255, 61, 113, .25); }
.gm-banner .big { font-size: 2.3rem; line-height: 1; }
.gm-banner .txt { flex: 1; min-width: 150px; display: flex; flex-direction: column; line-height: 1.3; }
.gm-banner .txt b { font-size: 1.05rem; }
.gm-banner .txt span { font-size: .85rem; color: var(--lm-muted); }
.gm-banner .acts { display: flex; gap: .5rem; flex-wrap: wrap; }
@keyframes gm-rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.gm-label { display: block; margin: 1rem 0 .4rem; font-size: .78rem; font-weight: 700; color: var(--lm-muted); text-transform: uppercase; letter-spacing: .06em; }
.gm-label:first-child { margin-top: 0; }
.gm-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
.gm-seg.two { grid-template-columns: 1fr 1fr; }
.gm-seg button { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .6rem .75rem; text-align: left; border: 1.5px solid var(--lm-border); border-radius: 14px; background: var(--lm-surface); color: var(--lm-text); transition: border-color .15s, background .15s; }
.gm-seg button small { color: var(--lm-muted); font-size: .72rem; }
.gm-seg button.on { border-color: var(--lm-rose); background: var(--lm-grad-soft); }
.gm-drop { position: relative; display: block; overflow: hidden; border: 2px dashed var(--lm-border); border-radius: 18px; background: var(--lm-surface-2); cursor: pointer; text-align: center; transition: border-color .15s; }
.gm-drop:hover { border-color: var(--lm-rose); }
.gm-drop-in { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 2rem 1rem; color: var(--lm-muted); }
.gm-drop-in .bi { font-size: 2rem; color: var(--lm-rose); }
.gm-drop-in b { color: var(--lm-text); }
.gm-drop img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.gm-drop.slim { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .9rem; }
.gm-drop.slim .bi { font-size: 1.3rem; color: var(--lm-rose); }
.mm-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin-top: .6rem; }
.mm-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

.gm-shake { animation: gm-shake .42s; }
@keyframes gm-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.gm-confetti { position: fixed; inset: 0; z-index: 3600; pointer-events: none; overflow: hidden; }
.gm-confetti i { position: absolute; top: -24px; border-radius: 2px; font-style: normal; line-height: 1; animation: gm-fall linear forwards; }
@keyframes gm-fall { to { transform: translate(var(--dx), 108vh) rotate(var(--rot)); opacity: .9; } }

.gm-scorestrip { display: flex; justify-content: center; gap: .75rem; margin-bottom: .75rem; }
.gm-sc { display: flex; align-items: center; gap: .55rem; padding: .4rem .9rem .4rem .45rem; border-radius: 999px; background: var(--lm-surface); border: 1.5px solid var(--lm-border); transition: border-color .2s, box-shadow .2s; }
.gm-sc.active { border-color: var(--lm-rose); box-shadow: 0 0 0 4px rgba(255, 61, 113, .12); }
.gm-sc .avatar { width: 30px; height: 30px; font-size: .8rem; }
.gm-sc b { font-size: 1.15rem; line-height: 1; }
.gm-sc small { color: var(--lm-muted); font-size: .72rem; }

/* ---- photo puzzle */
.pz-meta { display: flex; align-items: center; gap: .9rem; }
.pz-prog { flex: 1; display: flex; align-items: center; gap: .7rem; font-size: .8rem; color: var(--lm-muted); white-space: nowrap; }
.pz-time { font-size: .85rem; color: var(--lm-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pz-time b { color: var(--lm-text); }
.pz-board { position: relative; width: min(100%, calc(40vh * var(--ar))); width: min(100%, calc(40dvh * var(--ar))); aspect-ratio: var(--ar); margin: .8rem auto; border-radius: 14px; overflow: hidden; background: var(--lm-surface-2); box-shadow: var(--lm-shadow); touch-action: manipulation; }
@media (min-width: 768px) { .pz-board { width: min(100%, calc(58vh * var(--ar))); width: min(100%, calc(58dvh * var(--ar))); } }
.pz-ghost { position: absolute; inset: 0; background-size: 100% 100%; opacity: 0; transition: opacity .25s; pointer-events: none; }
.pz-board.hint .pz-ghost { opacity: .3; }
.pz-board.peek .pz-ghost { opacity: 1; z-index: 5; }
.pz-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); }
.pz-slot { position: relative; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .32); background-repeat: no-repeat; }
.pz-grid.armed .pz-slot:not(.filled) { background-color: rgba(255, 61, 113, .08); cursor: pointer; }
.pz-slot.over { background-color: rgba(255, 61, 113, .26) !important; box-shadow: inset 0 0 0 2px var(--lm-rose); }
.pz-slot.filled { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.pz-slot.filled::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); }
.pz-slot[data-by="me"]::after { background: var(--lm-rose); }
.pz-slot[data-by="them"]::after { background: var(--lm-violet); }
.pz-slot.pop { animation: gm-pop .35s cubic-bezier(.2, 1.4, .4, 1); z-index: 2; }
@keyframes gm-pop { 0% { transform: scale(.7); opacity: .4; } 100% { transform: none; opacity: 1; } }
.pz.done .pz-slot { box-shadow: none; }
.pz.done .pz-slot::after { display: none; }
.pz.done .pz-board { box-shadow: 0 0 0 3px #fff, 0 12px 40px rgba(255, 61, 113, .35); }
.pz-tools { display: flex; justify-content: center; gap: .5rem; }
.pz-tools .btn.on { background: var(--lm-grad-soft); color: var(--lm-rose); }
.pz-tray-wrap { margin-top: .8rem; border: 1px solid var(--lm-border); border-radius: 16px; background: var(--lm-surface); }
.pz-tray { display: flex; gap: .55rem; overflow-x: auto; padding: .7rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.pz-piece { flex: none; width: var(--pw); aspect-ratio: var(--ar); border-radius: 6px; background-repeat: no-repeat; box-shadow: 0 2px 8px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .25); touch-action: pan-x; cursor: grab; user-select: none; -webkit-user-select: none; transition: transform .12s, box-shadow .12s, opacity .12s; }
.pz-piece:hover { transform: translateY(-2px); }
.pz-piece.sel { outline: 3px solid var(--lm-rose); outline-offset: 2px; transform: translateY(-5px); }
.pz-piece.lifted { opacity: .3; }
.pz-piece.pz-drag { position: fixed; left: 0; top: 0; z-index: 3500; margin: 0; pointer-events: none; cursor: grabbing; transform-origin: center; box-shadow: 0 16px 36px rgba(0, 0, 0, .4); outline: 2px solid #fff; }
.pz-legend { display: flex; justify-content: center; gap: 1.2rem; margin-top: .8rem; font-size: .8rem; color: var(--lm-muted); }

/* ---- memory match */
.mm-turn { width: fit-content; margin: 0 auto .9rem; padding: .3rem .95rem; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--lm-surface-2); color: var(--lm-muted); }
.mm-turn.me { color: #fff; background: var(--lm-grad); box-shadow: 0 6px 16px rgba(255, 61, 113, .3); }
.mm-turn.done { color: var(--lm-rose); background: var(--lm-grad-soft); }
.mm-grid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: .5rem; max-width: 560px; margin: 0 auto; }
.mm-card { padding: 0; border: 0; background: transparent; aspect-ratio: 1; perspective: 700px; -webkit-tap-highlight-color: transparent; }
.mm-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, .7, .3, 1); }
.mm-card.up .mm-in, .mm-card.found .mm-in { transform: rotateY(180deg); }
.mm-face { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mm-front { background: var(--lm-grad); color: rgba(255, 255, 255, .85); font-size: clamp(1rem, 5vw, 1.7rem); box-shadow: 0 4px 12px rgba(255, 61, 113, .22); transition: filter .15s, transform .15s; }
.mm-card:not(:disabled):hover .mm-front { filter: brightness(1.08); transform: scale(1.03); }
.mm-back { transform: rotateY(180deg); background: var(--lm-surface); border: 2px solid var(--lm-border); font-size: clamp(1.5rem, 8vw, 2.6rem); line-height: 1; }
.mm-back img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-card.found { cursor: default; }
.mm-card.found[data-by="me"] .mm-back { border-color: var(--lm-rose); }
.mm-card.found[data-by="them"] .mm-back { border-color: var(--lm-violet); }
.mm-card.found .mm-back { opacity: .82; }
.mm-card.pulse .mm-in { animation: gm-pulse .6s; }
@keyframes gm-pulse { 40% { transform: rotateY(180deg) scale(1.12); } }
.mm-card.wait .mm-front { animation: gm-wait .8s infinite alternate; }
@keyframes gm-wait { to { filter: brightness(1.2); } }

/* ---- hearts & kisses */
.ttt-players { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-bottom: 1rem; }
.ttt-players .vs { font-size: .78rem; color: var(--lm-muted); }
.ttt-pl { display: flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; background: var(--lm-surface); border: 1.5px solid var(--lm-border); transition: border-color .2s, box-shadow .2s; }
.ttt-pl.on { border-color: var(--lm-rose); box-shadow: 0 0 0 4px rgba(255, 61, 113, .12); }
.ttt-pl .m { font-size: 1.3rem; }
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; width: min(100%, 380px); margin: 0 auto; }
.ttt-cell { aspect-ratio: 1; padding: 0; border: 0; border-radius: 18px; background: var(--lm-surface-2); display: grid; place-items: center; transition: background .15s, transform .12s; }
.ttt-cell.open { cursor: pointer; }
.ttt-cell.open:hover { background: var(--lm-grad-soft); transform: scale(1.03); }
.ttt-cell:disabled { opacity: 1; }
.ttt-cell.line { background: var(--lm-grad-soft); box-shadow: inset 0 0 0 2px var(--lm-rose); }
.ttt-mark { font-size: clamp(2.2rem, 14vw, 3.6rem); line-height: 1; }
.ttt-mark.drop { animation: gm-pop .4s cubic-bezier(.2, 1.4, .4, 1); }

/* ---- would you rather / heart to heart */
.qa-prog { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; font-size: .8rem; color: var(--lm-muted); white-space: nowrap; }
.qa-agree { color: var(--lm-rose); font-weight: 700; }
.qa-card { padding: 1.3rem 1.1rem; border: 1px solid var(--lm-border); border-radius: 22px; background: var(--lm-surface); box-shadow: var(--lm-shadow); animation: gm-rise .35s; }
.qa-no { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--lm-rose); margin-bottom: .4rem; }
.qa-q { font-size: 1.2rem; font-weight: 800; line-height: 1.3; margin: 0 0 1rem; }
.qa-opt { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .95rem 1rem; text-align: left; font-weight: 600; border: 1.5px solid var(--lm-border); border-radius: 16px; background: var(--lm-surface); color: var(--lm-text); transition: transform .12s, border-color .15s, background .15s; }
.qa-opt:hover:not(:disabled) { border-color: var(--lm-rose); background: var(--lm-grad-soft); }
.qa-opt:active { transform: scale(.985); }
.qa-opt .l, .qa-ans .l, .qz-opt .l { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: .8rem; font-weight: 800; color: #fff; background: var(--lm-grad); }
.qa-opt.b .l { background: linear-gradient(135deg, #4d7cff, #8e44ff); }
.qa-or { text-align: center; margin: .4rem 0; font-size: .78rem; color: var(--lm-muted); text-transform: uppercase; letter-spacing: .1em; }
.qa-peek { margin: 1rem 0 0; font-size: .8rem; color: var(--lm-muted); }
.qa-wait { display: flex; flex-direction: column; align-items: center; gap: .25rem; margin: 1rem 0; padding: 1.2rem; text-align: center; border: 1.5px dashed var(--lm-border); border-radius: 18px; color: var(--lm-muted); }
.qa-wait .bi { font-size: 1.6rem; color: var(--lm-rose); }
.qa-wait b { color: var(--lm-text); }
.qa-wait span { font-size: .85rem; }
.qa-row { margin-bottom: .6rem; padding: .85rem .95rem; border: 1px solid var(--lm-border); border-radius: 16px; background: var(--lm-surface); }
.qa-row.same { border-color: rgba(255, 61, 113, .45); background: var(--lm-grad-soft); }
.qa-rq { margin-bottom: .55rem; font-size: .84rem; font-weight: 600; color: var(--lm-muted); }
.qa-rq i { font-style: normal; opacity: .6; }
.qa-ans { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .6rem; padding: .4rem 0; font-size: .92rem; }
.qa-ans small { flex: none; min-width: 3.6rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lm-muted); }
.qa-ans.them small { color: var(--lm-violet); }
.qa-ans.me small { color: var(--lm-rose); }
.qa-ans span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qa-ans .l { width: 22px; height: 22px; font-size: .7rem; margin-right: .25rem; vertical-align: middle; }
.qa-ans em { font-style: normal; font-size: .74rem; font-weight: 700; color: var(--lm-rose); }
.qa-ans.lock { color: var(--lm-muted); font-size: .8rem; }

/* ---- how well do you know me */
.qz-intro { display: flex; flex-direction: column; margin-bottom: 1rem; line-height: 1.35; }
.qz-intro b { font-size: 1.1rem; }
.qz-intro span { font-size: .85rem; color: var(--lm-muted); }
.qz-note { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; padding: .7rem .9rem; border-radius: 14px; font-size: .84rem; background: var(--lm-grad-soft); color: var(--lm-text); }
.qz-note .bi { color: var(--lm-rose); font-size: 1.1rem; }
.qz-q, .qz-block { margin-bottom: .8rem; padding: .95rem; border: 1px solid var(--lm-border); border-radius: 18px; background: var(--lm-surface); }
.qz-qt { display: flex; gap: .65rem; margin-bottom: .7rem; font-weight: 700; line-height: 1.3; }
.qz-qt i { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-style: normal; font-size: .75rem; font-weight: 800; color: var(--lm-rose); background: var(--lm-grad-soft); }
.qz-opts { display: grid; gap: .45rem; }
@media (min-width: 480px) { .qz-opts { grid-template-columns: 1fr 1fr; } }
.qz-opt { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; text-align: left; font-size: .9rem; border: 1.5px solid var(--lm-border); border-radius: 13px; background: var(--lm-surface); color: var(--lm-text); transition: border-color .15s, background .15s, transform .1s; }
.qz-opt .l { width: 24px; height: 24px; font-size: .72rem; color: var(--lm-muted); background: var(--lm-surface-2); }
.qz-opt:hover { border-color: var(--lm-rose); }
.qz-opt:active { transform: scale(.985); }
.qz-opt.on { border-color: var(--lm-rose); background: var(--lm-grad-soft); font-weight: 600; }
.qz-opt.on .l { color: #fff; background: var(--lm-grad); }
.qz-submit { position: sticky; bottom: calc(var(--tabbar-h) + .5rem); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; padding: .6rem .7rem .6rem 1rem; border: 1px solid var(--lm-border); border-radius: 18px; background: var(--lm-surface); box-shadow: var(--lm-shadow); font-size: .85rem; color: var(--lm-muted); }
@media (min-width: 768px) { .qz-submit { bottom: .75rem; } }
.qz-bh { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.qz-bh .btn-icon { width: 32px; height: 32px; font-size: 1rem; }
.qz-block .form-control { margin-bottom: .45rem; }
.qz-block .form-control.ok { border-color: rgba(46, 196, 182, .7); }
.qz-scores { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .75rem; }
.qz-tile { display: flex; flex-direction: column; align-items: center; padding: 1rem .5rem; border-radius: 18px; border: 1px solid var(--lm-border); background: var(--lm-surface); }
.qz-tile small { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lm-muted); }
.qz-tile b { font-size: 2.2rem; line-height: 1.1; }
.qz-tile b i { font-style: normal; font-size: 1rem; color: var(--lm-muted); }
.qz-tile span { font-size: .78rem; color: var(--lm-muted); }
.qz-tile.me b { background: var(--lm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qz-tile.them b { color: var(--lm-violet); }
.qz-compat { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; margin-bottom: .5rem; border-radius: 18px; background: var(--lm-grad-soft); }
.qz-compat b { font-size: 2rem; line-height: 1; background: var(--lm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qz-compat span { font-weight: 600; }
.qz-rv { margin-bottom: .55rem; padding: .8rem .9rem; border: 1px solid var(--lm-border); border-radius: 16px; background: var(--lm-surface); }
.qz-rv .qt { margin-bottom: .45rem; font-size: .84rem; font-weight: 600; color: var(--lm-muted); }
.qz-rv .a, .qz-rv .g { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; font-size: .9rem; padding: .15rem 0; }
.qz-rv small { min-width: 6.4rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--lm-muted); }
.qz-rv .g.ok span { color: #1e9e8f; font-weight: 600; }
.qz-rv .g.no span { color: var(--lm-muted); text-decoration: line-through; }
.qz-rv em { font-style: normal; font-weight: 800; }
.qz-rv em.ok { color: #1e9e8f; }
.qz-rv em.no { color: var(--lm-rose); }

/* ---- game nights */
.gn-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 1.6rem 0 .75rem; }
.gn-head .section-title { margin: 0; }
.gn-card { position: relative; margin-bottom: .75rem; padding: .95rem; border: 1px solid var(--lm-border); border-radius: 20px; background: var(--lm-surface); }
.gn-card.ask { border-color: rgba(255, 61, 113, .5); box-shadow: 0 0 0 4px rgba(255, 61, 113, .08); }
.gn-card.live { border-color: transparent; background: var(--lm-grad-soft); box-shadow: inset 0 0 0 1.5px rgba(255, 61, 113, .4); }
.gn-top { display: flex; align-items: flex-start; gap: .75rem; }
.gn-ico { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 1.2rem; color: #fff; background: var(--lm-grad); }
.gn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.gn-main b { font-size: 1rem; overflow-wrap: anywhere; }
.gn-when { font-size: .84rem; color: var(--lm-text); }
.gn-when2 { font-size: .78rem; color: var(--lm-muted); }
.gn-cd { flex: none; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--lm-rose); background: var(--lm-grad-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gn-cd.live { color: #fff; background: var(--lm-grad); }
.gn-games { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; }
.gn-games span { padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--lm-surface-2); color: var(--lm-muted); }
.gn-notes { margin: .6rem 0 0; font-size: .85rem; color: var(--lm-muted); overflow-wrap: anywhere; }
.gn-status { margin-top: .7rem; font-size: .82rem; font-weight: 600; color: var(--lm-muted); }
.gn-status .yes { color: #1e9e8f; }
.gn-status .no { color: var(--lm-rose); }
.gn-status .ask { color: var(--lm-rose); }
.gn-live { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.gn-tally { font-size: .85rem; color: var(--lm-muted); }
.gn-rsvp { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.gn-tools { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--lm-border); }
.gn-tool { padding: .2rem 0; border: 0; background: none; font-size: .8rem; font-weight: 600; color: var(--lm-muted); }
.gn-tool:hover { color: var(--lm-rose); }
.gn-tool.danger:hover { color: #dc3545; }
.gn-empty { display: flex; align-items: center; gap: .9rem; padding: 1rem; border: 1.5px dashed var(--lm-border); border-radius: 20px; }
.gn-empty > span { flex: none; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.3rem; color: var(--lm-rose); background: var(--lm-grad-soft); }
.gn-empty small { display: block; color: var(--lm-muted); line-height: 1.35; }
.gn-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.gn-chips button { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border: 1.5px solid var(--lm-border); border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--lm-surface); color: var(--lm-muted); transition: all .15s; }
.gn-chips button.on { color: var(--lm-rose); border-color: var(--lm-rose); background: var(--lm-grad-soft); }
.gn-prev { min-height: 1.3rem; margin: .45rem 0 0; font-size: .8rem; color: var(--lm-muted); }
.gn-home-wrap:empty { display: none; }
.gn-home { position: relative; margin-bottom: 1rem; }
.gn-home .gn-card { margin-bottom: 0; }
.gn-link { position: absolute; inset: 0; z-index: 1; border-radius: 20px; }
.gn-home .btn, .gn-home .gn-live a { position: relative; z-index: 2; }

@media (max-width: 359.98px) {
  .page { padding-inline: .6rem; }
  .tray-item { width: 66px; }
  .quick-grid { gap: .5rem; }
  .cbtn { width: 52px; height: 52px; }
}
@media (min-width: 1600px) { :root { --side-w: 270px; --rail-w: 360px; } .page { max-width: 680px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print { .side, .rail, .tabbar, .topbar { display: none !important; } }
