/* Inter self-hosted (variable font; avoids sending visitor IPs to Google Fonts) */
@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext.ad4eb06671be.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin.8e433c0592f7.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Libellula "Luminous Agency" design tokens and components.
   Source: libelula/luminous_agency/DESIGN.md. Mobile-first; desktop from 768px. */
:root {
  --canvas: #0b1b2b;
  --card: #112338;
  --overlay: #172e49;
  --primary: #8c76c4;
  --primary-text: #b3a4e2; /* primary for TEXT on dark surfaces: >= 6:1 (AA needs 4.5) */
  --primary-bg: #6f58aa; /* primary behind WHITE text: 5.75:1 */
  --secondary: #fce941;
  --white: #ffffff;
  --text: #d4e4fa;
  --muted: #cbc4d1;
  --error: #ffb4ab;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --gutter: 1rem;
  --margin: 1.25rem;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (min-width: 768px) {
  :root { --gutter: 1.5rem; --margin: 3rem; }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas); color: var(--text); font: 400 16px/24px var(--font);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--primary-text); }
h1, h2 { color: var(--white); letter-spacing: -0.02em; margin: 0 0 0.5rem; }
h1 { margin-bottom: 1rem; }
h1 { font-size: 32px; line-height: 40px; font-weight: 700; }
h2 { font-size: 24px; line-height: 32px; font-weight: 600; }
@media (min-width: 768px) { h1 { font-size: 48px; line-height: 56px; } }
.site-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 0.5rem 1.5rem; border-bottom: 1px solid var(--border);
  /* align with the content column of <main> (max-width 72rem + same side margin) */
  padding: 1rem max(var(--margin), calc((100vw - 72rem) / 2 + var(--margin)));
}
.brand { flex: 0 0 auto; color: var(--white); font-weight: 800; font-size: 20px; text-decoration: none; }
.brand span { color: var(--secondary); }
.site-nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { font: 600 14px/20px var(--font); color: var(--white); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--primary-text); }
.site-nav .btn { width: auto; }
main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 2rem var(--margin) 4rem; }
.narrow { max-width: 28rem; margin: 0 auto; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: var(--gutter);
}
.field { margin-bottom: 1rem; }
.field label { display: block; font: 600 14px/20px var(--font); margin-bottom: 0.25rem; color: var(--white); }
.field .help { font-size: 14px; color: var(--muted); margin-top: 0.25rem; }
.field .errors, .errorlist { color: var(--error); font-size: 14px; list-style: none; padding: 0; margin: 0.25rem 0 0; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; min-height: 48px; padding: 12px 16px; color: var(--white);
  background: rgba(11, 27, 43, 0.6); border: 1px solid var(--border-strong);
  border-radius: var(--radius); font: 400 16px/24px var(--font);
}
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(140, 118, 196, 0.2);
}
input[type=checkbox] { accent-color: var(--secondary); width: 20px; height: 20px; margin-right: 0.5rem; vertical-align: middle; }
.check { display: flex; align-items: flex-start; gap: 0.25rem; margin-bottom: 1rem; }
.check label { font-weight: 400; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 12px 28px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 16px/24px var(--font); border-radius: 9999px; width: 100%;
}
.btn-primary { background: var(--secondary); color: var(--canvas); }
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 0 24px rgba(252, 233, 65, 0.3); }
.btn-ghost {
  background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius); font-weight: 600;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-text); background: rgba(140, 118, 196, 0.08); }
@media (min-width: 768px) { .btn { width: auto; } .stack .btn { width: 100%; } }
.stack > * + * { margin-top: 0.75rem; }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: 14px; margin: 1.5rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li { padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--overlay); margin-bottom: 0.5rem; }
.messages li.error { border: 1px solid var(--error); color: var(--error); }
.messages .flash { display: flex; align-items: center; gap: 0.75rem; border-left: 4px solid var(--primary); transition: opacity 0.3s ease, transform 0.3s ease; animation: flash-in 0.3s ease; }
.messages .flash.success { border-left-color: #3ddc84; }
.messages .flash.error { border-left-color: var(--error); }
.messages .flash.warning { border-left-color: #ff9f43; }
.flash-icon { flex: 0 0 auto; font-weight: 800; }
.flash.success .flash-icon { color: #3ddc84; }
.flash-text { flex: 1 1 auto; overflow-wrap: anywhere; }
.flash-close { flex: 0 0 auto; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.flash-close:hover { background: rgba(255, 255, 255, 0.1); }
.messages .flash.flash-hiding { opacity: 0; transform: translateY(-6px); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .messages .flash { animation: none; transition: none; } }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 9999px; font: 700 12px/16px var(--font);
  letter-spacing: 0.04em; text-transform: uppercase; background: rgba(140, 118, 196, 0.15); color: var(--primary-text);
}
.notice { font-size: 14px; color: var(--muted); }
.hero { padding: 2rem 0 1rem; }
.hero p { font-size: 18px; line-height: 28px; max-width: 40rem; }
.telegram-widget { display: flex; justify-content: center; min-height: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.link-card { display: block; text-decoration: none; color: var(--text); }
.link-card:hover { border-color: rgba(140, 118, 196, 0.4); transform: translateY(-4px); }
.btn-google {
  background: var(--white); color: #1f1f1f; border: 1px solid var(--white);
  border-radius: 9999px; font-weight: 600; gap: 0.75rem;
}
.btn-google:hover { background: #f2f2f2; color: #1f1f1f; }
.btn-google .g-logo { flex: 0 0 auto; }
.chat-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.chat-head h1 { margin: 0; overflow-wrap: anywhere; }
.presence-dot { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 50%; margin-right: 0.4rem; background: #8a8f98; vertical-align: middle; }
.presence-dot.presence-online { background: #3ddc84; }
.presence-dot.presence-busy { background: #ff9f43; }
.presence-dot.presence-offline { background: #8a8f98; }
.presence-line { margin: 0; font-size: 0.875rem; color: var(--muted); }
.avatar { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary-bg); color: var(--white); font-weight: 700; font-size: 1.25rem; }
.messages-box { display: flex; flex-direction: column; gap: 0.375rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; height: clamp(10rem, calc(100vh - 23rem), 34rem); height: clamp(10rem, calc(100dvh - 23rem), 34rem); overflow-y: auto; margin-bottom: 0.75rem; scroll-behavior: smooth; }
.bubble { align-self: flex-start; max-width: 82%; padding: 0.5rem 0.875rem; border-radius: 1.125rem 1.125rem 1.125rem 0.25rem; background: var(--overlay); overflow-wrap: anywhere; line-height: 1.4; }
.bubble.mine { align-self: flex-end; border-radius: 1.125rem 1.125rem 0.25rem 1.125rem; background: rgba(140, 118, 196, 0.35); }
.bubble.system { align-self: center; max-width: 100%; text-align: center; background: transparent; color: var(--muted); font-size: 0.875rem; padding: 0.25rem 0.5rem; }
.bubble .who { font-weight: 700; color: var(--primary-text); font-size: 0.8125rem; }
.bubble.mine .who { color: var(--secondary); }
.bubble .time { display: block; text-align: right; font-size: 0.6875rem; color: var(--muted); margin-top: 0.125rem; }
.chat-form { display: flex; gap: 0.5rem; align-items: center; }
.chat-form input[type=text] { border-radius: 9999px; padding-left: 1.25rem; }
.chat-form .btn { width: auto; }
.send-btn { border-radius: 9999px; min-width: 3rem; }
.send-icon { display: none; }
@media (max-width: 480px) {
  .send-label { display: none; }
  .send-icon { display: inline; }
  .send-btn { width: 3rem; padding: 0; }
}
.btn-telegram { background: #54a9eb; color: #fff; border-radius: 9999px; }
.btn-telegram:hover { background: #4a9bdb; }
.chat-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chat-actions .btn { width: auto; }
/* allauth pages without their own card (reset password, email confirm, ...) */
main.allauth > h1, main.allauth > p, main.allauth > form, main.allauth > section { max-width: 28rem; margin-left: auto; margin-right: auto; }
main.allauth > form p { margin: 0 0 1rem; }
main.allauth > form label { display: block; font: 600 14px/20px var(--font); color: var(--white); margin-bottom: 0.25rem; }
main.allauth > form .btn { margin-top: 0.5rem; }

.wide { max-width: 48rem; margin: 0 auto; }
.wide > .btn { margin-top: 1rem; }
@media (min-width: 768px) { .wide > .btn { width: auto; } }
.hero .badge { margin-bottom: 0.75rem; }
.site-footer { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: center; padding: 1.5rem var(--margin); border-top: 1px solid var(--border); font-size: 14px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary-text); }
.legal h1 { margin-bottom: 0.5rem; }
.legal h2 { margin-top: 1.5rem; font-size: 20px; line-height: 28px; }
.legal ul { padding-left: 1.25rem; }
.draft-banner { background: rgba(252, 233, 65, 0.12); border: 1px solid var(--secondary); color: var(--secondary); border-radius: var(--radius); padding: 0.75rem 1rem; font-weight: 600; }
.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 14px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 0.5rem; border-bottom: 1px solid var(--border); }
/* checkbox groups: legend on top, one option per row (labels wrap inside their own row) */
.check-group { border: 0; padding: 0; margin: 0 0 0.25rem; min-width: 0; }
.check-group legend { font: 600 14px/20px var(--font); color: var(--white); padding: 0; margin-bottom: 0.5rem; }
.check-group .check { margin-bottom: 0.5rem; }
.check-group .check label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; margin: 0; }
.check-group input[type=checkbox] { flex: 0 0 auto; margin: 0; }
.pager { display: flex; gap: 0.75rem; margin-top: 1rem; }
.pager .btn { width: auto; }

/* --- Android-style bottom navigation: on EVERY page for signed-in users --- */
.account-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.account-actions .btn, .account-actions form { width: auto; }
body.has-bottom-nav main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
body.has-bottom-nav .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex;
  background: rgba(23, 46, 73, 0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1 1 0; min-height: 56px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; color: var(--muted); text-decoration: none;
  font: 600 12px/16px var(--font); -webkit-tap-highlight-color: transparent;
}
.bottom-nav a svg { padding: 4px 18px; box-sizing: content-box; border-radius: 9999px; transition: background 0.15s; }
.bottom-nav a.active { color: var(--white); }
.bottom-nav a.active svg { background: rgba(140, 118, 196, 0.35); color: var(--secondary); }
.bottom-nav .icon-wrap { position: relative; display: inline-flex; }
.nav-badge {
  position: absolute; top: 0; right: 8px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9999px; background: var(--secondary); color: var(--canvas);
  font: 700 11px/18px var(--font); text-align: center;
}
@media (min-width: 768px) {
  /* desktop: same bar, centred and narrower (there is no other navigation) */
  .bottom-nav { left: 50%; right: auto; width: min(30rem, 100%); transform: translateX(-50%);
    border: 1px solid var(--border); border-bottom: 0; border-radius: 16px 16px 0 0; }
}
.count-badge { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 0.4rem; border-radius: 9999px; background: var(--secondary); color: var(--canvas); font: 700 13px/22px var(--font); text-align: center; vertical-align: middle; }
.env-banner { background: var(--secondary); color: #1f1f1f; text-align: center; font: 700 13px/1 var(--font); padding: 0.5rem 1rem; }
.hero-split { display: grid; gap: 1.5rem; align-items: center; }
.hero-art { display: flex; justify-content: center; }
.dragonfly { width: min(15rem, 60%); height: auto; filter: drop-shadow(0 8px 24px rgba(140, 118, 196, 0.35)); }
.df-wings { transform-origin: 120px 92px; animation: df-flutter 3.2s ease-in-out infinite; }
@keyframes df-flutter { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .df-wings { animation: none; } }
.pillars { display: grid; gap: var(--gutter); margin: 1rem 0 2rem; }
.pillar h2 { margin: 0.25rem 0; font-size: 1.125rem; }
.pillar p { margin: 0; color: var(--muted); }
.pillar-icon { font-size: 1.75rem; }
@media (min-width: 768px) {
  .hero-split { grid-template-columns: 1.3fr 1fr; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-actions .btn { width: auto; }
.error-page { text-align: center; padding: 2rem 0; max-width: 32rem; margin: 0 auto; }
.error-art .dragonfly { width: min(10rem, 50%); }
.error-code { font: 800 3.5rem/1 var(--font); color: var(--secondary); margin: 0.5rem 0 0; letter-spacing: 0.05em; }
.error-page .hero-actions { justify-content: center; margin-top: 1rem; }
.empty-state { text-align: center; padding: 1.5rem 1rem; color: var(--muted); }
.empty-art .dragonfly { width: 6rem; opacity: 0.85; }
.empty-art .df-wings { animation-duration: 5s; }
.empty-state p { margin: 0.5rem auto 1rem; max-width: 26rem; }
.empty-state ul { list-style: none; padding: 0; max-width: 26rem; margin: 0 auto 1rem; text-align: left; }
.empty-state .btn { width: auto; }
/* keyboard focus: visible on every interactive element (WCAG 2.4.7) */
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.skip-link { position: absolute; left: 0.5rem; top: -4rem; z-index: 20; background: var(--secondary); color: #1f1f1f; padding: 0.5rem 1rem; border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 0.5rem; }
main:focus { outline: none; }
.auth-head { text-align: center; margin-bottom: 1rem; }
.auth-head h1 { margin: 0.25rem 0 0.5rem; }
.auth-mark .dragonfly { width: 4.5rem; }
.auth-head .notice { margin: 0; }
.auth-switch { text-align: center; margin: 1.25rem 0 0; color: var(--muted); }
.progress-block { margin-bottom: 1.25rem; }
.progress-bar { height: 0.625rem; border-radius: 9999px; background: var(--overlay); overflow: hidden; }
.progress-bar span { display: block; height: 100%; border-radius: 9999px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width 0.4s ease; }
.progress-block .notice { margin: 0.5rem 0 0; }
@media (prefers-reduced-motion: reduce) { .progress-bar span { transition: none; } }
.link-card h2 { margin-bottom: 0.125rem; }
.chat-when { margin: 0; font-size: 13px; color: var(--muted); }
.link-card.has-unread { border-color: rgba(252, 233, 65, 0.55); box-shadow: inset 4px 0 0 var(--secondary); }
.link-card.has-unread h2 { font-weight: 800; }
.link-card.has-unread .count-badge { animation: unread-pulse 2s ease-out 2; }
@keyframes unread-pulse { 0% { box-shadow: 0 0 0 0 rgba(252, 233, 65, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(252, 233, 65, 0); } }
@media (prefers-reduced-motion: reduce) { .link-card.has-unread .count-badge { animation: none; } }
.quota { margin: 0 0 1rem; }
.quota-empty { color: var(--error); }
.request-box { margin: 0.75rem 0; }
.request-box summary { list-style: none; cursor: pointer; display: flex; }
.request-box summary::-webkit-details-marker { display: none; }
.request-box[open] summary { display: none; }
.request-box form { margin-top: 0.5rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; border-radius: var(--radius); }
.table-scroll:focus-visible { outline: 2px solid var(--secondary); }
.table-scroll .legal-table { margin: 0; min-width: 34rem; }
.legal-table td, .legal-table th { overflow-wrap: anywhere; }
/* user-written text (bio, intro, aliases, messages) may contain very long unbroken strings */
main { overflow-wrap: anywhere; }
.btn, button, summary { overflow-wrap: normal; }  /* labels must wrap at spaces only, never mid-word */
.chat-jump { width: auto; min-height: 36px; padding: 0.25rem 1rem; margin: -0.25rem auto 0.75rem; display: block; background: var(--card); }
.chat-jump[hidden] { display: none; }

/* Profile photos (shown only inside an open conversation and on the owner's own page) */
.avatar-img { object-fit: cover; background: var(--surface-2, #222); display: block; }
.avatar-sm-img { display: inline-block; width: 2rem; height: 2rem; vertical-align: middle; margin-right: 0.25rem; }
.photo-report { flex-basis: 100%; font-size: 0.875rem; }
.avatar-own { width: 4rem; height: 4rem; margin-bottom: 0.5rem; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.photo-thumb { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 0.75rem; background: var(--surface-2, #222); }
.photo-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.75rem; }
.photo-list li { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.photo-list li form { margin-left: auto; }
.alias-link { color: inherit; text-decoration: none; }
.alias-link:hover, .alias-link:focus-visible { text-decoration: underline; }
.chat-head-link { display: flex; text-decoration: none; }
.partner-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.partner-head .avatar-own { margin-bottom: 0; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.photo-grid .photo-thumb { width: calc(50% - 0.25rem); height: auto; aspect-ratio: 1; }
@media (min-width: 640px) { .photo-grid .photo-thumb { width: 160px; } }
.photo-tiles { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.5rem; }
.photo-tile { position: relative; display: block; cursor: pointer; }
.photo-tile .photo-thumb { width: 100%; height: auto; aspect-ratio: 1; }
.photo-tile input { position: absolute; top: 0.35rem; left: 0.35rem; width: 1.25rem; height: 1.25rem; margin: 0; z-index: 1; accent-color: var(--primary-bg, #7c5cff); }
.photo-tile input:checked ~ .photo-thumb { outline: 3px solid var(--secondary, #ffe14a); outline-offset: -3px; opacity: 0.7; }
.photo-badge { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.15rem 0.35rem; font-size: 0.7rem; line-height: 1.2; background: rgba(0, 0, 0, 0.65); color: #fff; border-radius: 0 0 0.75rem 0.75rem; }
.photo-gone { background: var(--surface-2, #222); }
.photo-delete-form { margin-bottom: 1.25rem; }
.video-mark { position: absolute; top: 0.35rem; right: 0.35rem; padding: 0.1rem 0.4rem; font-size: 0.7rem; font-weight: 700; background: rgba(0, 0, 0, 0.65); color: #fff; border-radius: 999px; }
.video-section-title { margin-top: 2rem; }
.carousel { position: relative; margin: 0 0 1rem; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 0.75rem; background: var(--surface-2, #111826); }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--secondary, #ffe14a); outline-offset: 2px; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; margin: 0; height: min(70vh, 32rem); display: grid; place-items: center; }
.carousel-slide img, .carousel-slide video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.carousel-btn { position: absolute; top: calc(min(70vh, 32rem) / 2 - 1.25rem); width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.carousel-btn:hover, .carousel-btn:focus-visible { background: rgba(0, 0, 0, 0.8); }
.carousel-prev { left: 0.5rem; }
.carousel-next { right: 0.5rem; }
.carousel-count { position: absolute; top: 0.5rem; right: 0.5rem; margin: 0; padding: 0.1rem 0.6rem; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.8rem; }
.carousel-thumbs { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.5rem 0 0; }
.carousel-thumb { position: relative; flex: 0 0 auto; width: 3.5rem; height: 3.5rem; padding: 0; border: 2px solid transparent; border-radius: 0.5rem; overflow: hidden; background: none; cursor: pointer; opacity: 0.6; }
.carousel-thumb.active { border-color: var(--secondary, #ffe14a); opacity: 1; }
.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-thumb .video-mark { top: auto; bottom: 0.15rem; right: 0.15rem; padding: 0 0.3rem; }
.carousel-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 0.3rem 0.6rem; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.8rem; }
.avatar-mark { position: absolute; left: 0; right: 0; top: 0; padding: 0.15rem 0.35rem 0.15rem 1.9rem; font-size: 0.7rem; font-weight: 700; background: rgba(0, 0, 0, 0.65); color: #ffe14a; border-radius: 0.75rem 0.75rem 0 0; }
.edit-actions { display: grid; gap: 0.5rem; }
.photo-notes { padding-left: 1.1rem; margin: 0 0 1rem; }
.upload-form { margin-top: 1rem; }
.carousel-slide { position: relative; }
.presence-switch { margin: 0 0 1rem; }
.presence-switch-label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.35rem; }
.segmented { display: flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: var(--surface-2, #111826); border: 1px solid var(--border, #23304a); }
.segmented .seg { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 0.1rem; padding: 0.5rem 0.4rem; border: 0; border-radius: 999px; background: transparent; color: var(--white); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.segmented .seg.active { background: var(--primary-bg, #3b3f8f); }
.segmented .seg:focus-visible { outline: 2px solid var(--secondary, #fce941); outline-offset: 1px; }
.presence-switch-help { margin: 0.35rem 0 0; font-size: 0.75rem; }
.action-stack { display: grid; gap: 0.6rem; }
.action-stack .btn { width: 100%; }
.fold { margin-top: 1rem; border-top: 1px solid var(--border, #23304a); padding-top: 0.25rem; }
.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem 0; font-size: 1.1rem; font-weight: 700; color: var(--white); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "›"; font-size: 1.5rem; line-height: 1; transition: transform 0.15s; }
.fold[open] > summary::after { transform: rotate(90deg); }
.fold > summary:focus-visible { outline: 2px solid var(--secondary, #fce941); outline-offset: 2px; }
/* Legal tables on a phone: one card per row, each cell labelled (no hidden columns to scroll to). */
@media (max-width: 640px) {
  .table-scroll { overflow: visible; }
  .table-scroll .legal-table { min-width: 0; }
  .legal-table tr:first-child { display: none; }
  .legal-table, .legal-table tbody { display: block; }
  .legal-table tr { display: block; margin: 0 0 0.75rem; padding: 0.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
  .legal-table td { display: block; border: 0; padding: 0.35rem 0.5rem; }
  .legal-table td::before { display: block; margin-bottom: 0.1rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
  .legal-table--privacy td:nth-child(1)::before { content: "Date"; }
  .legal-table--privacy td:nth-child(2)::before { content: "Scop"; }
  .legal-table--privacy td:nth-child(3)::before { content: "Cât timp se păstrează"; }
  .legal-table--cookies td:nth-child(1)::before { content: "Cookie"; }
  .legal-table--cookies td:nth-child(2)::before { content: "Rol"; }
  .legal-table--cookies td:nth-child(3)::before { content: "Durată"; }
}
a.btn.btn-primary + .card, a.btn.btn-primary + .link-card { margin-top: 1rem; }
.card > p:first-child, form.card > input[type="hidden"] + p { margin-top: 0; }
