/* Hallo Emily - mobile-first stylesheet */

:root {
  --pink: #ff6aa2;
  --pink-soft: #ffd4e4;
  --orange: #ffa86a;
  --violet: #8a6aff;
  --ink: #2b2b3a;
  --muted: #8a8195;
  --bg: #fff7fb;
  --card: #ffffff;
  --line: #f0e3ea;
  --ok: #2fb27a;
  --err: #e2456b;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 8px 28px rgba(255, 106, 162, .14);
  --shadow-sm: 0 4px 14px rgba(43, 43, 58, .08);
  --grad: linear-gradient(135deg, var(--pink), var(--orange));
  --maxw: 720px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 110% -10%, rgba(255, 168, 106, .08), transparent),
    radial-gradient(1000px 480px at -10% 0%, rgba(138, 106, 255, .06), transparent);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  font-size: clamp(15px, 2.6vw, 17px);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: clamp(14px, 4vw, 22px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 247, 251, .82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-name {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-wink { font-size: 1.1em; line-height: 1; }

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover { text-decoration: none; background: rgba(255, 106, 162, .1); }
.site-nav a.is-active { background: rgba(255, 106, 162, .16); color: var(--pink); }
.nav-cta { background: var(--grad); color: #fff !important; box-shadow: var(--shadow-sm); }
.nav-cta:hover { filter: brightness(1.03); background: var(--grad); }

/* ---------- Main / sections ---------- */
.site-main { padding-block: 22px 32px; min-height: 60vh; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }

.hero {
  text-align: center;
  padding: 28px 18px 8px;
}
.hero h1 {
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  line-height: 1.2;
  margin: .2em 0;
  color: var(--ink);
  font-weight: 700;
}
.hero p { color: var(--muted); max-width: 30ch; margin: 0 auto; font-size: 1.05rem; }

/* Start page intro (admin HTML) */
.intro {
  text-align: left;
  margin: 0 0 24px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.intro-heading {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.25;
}
.intro-body {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 68ch;
}
.intro-body > :first-child { margin-top: 0; }
.intro-body > :last-child { margin-bottom: 0; }
.intro-body p { margin: 0 0 1em; }
.intro-body p:last-child { margin-bottom: 0; }
.intro-body h2, .intro-body h3 {
  margin: 1.25em 0 .5em;
  line-height: 1.3;
}
.intro-body h2:first-child, .intro-body h3:first-child { margin-top: 0; }
.intro-body ul, .intro-body ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}
.intro-body li { margin: .35em 0; }
.intro-body a { color: var(--pink); text-decoration: underline; text-underline-offset: 2px; }
.intro-body a:hover { color: #d94d82; }
.intro-body blockquote {
  margin: 0 0 1em;
  padding: 10px 14px;
  border-left: 3px solid var(--pink-soft);
  color: var(--muted);
}

.textarea--code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: .88rem;
  line-height: 1.45;
}

.hero--compact { padding: 12px 18px 4px; text-align: left; }
.hero--compact h1 { font-size: 1.35rem; margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(18px, 5vw, 26px);
  margin-block: 18px;
}
.card h2 { margin-top: 0; }

.section-title { display: flex; align-items: center; gap: 8px; margin: 26px 2px 6px; }
.section-title h2 { margin: 0; font-size: 1.3rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .06s ease, filter .15s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.04); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn--block { width: 100%; }
.btn--ghost { background: #fff; color: var(--pink); border: 1.5px solid var(--pink-soft); box-shadow: none; }
.btn--muted { background: #f3eef2; color: var(--ink); box-shadow: none; }
.btn--danger { background: linear-gradient(135deg, #ff6a8a, #e2456b); }
.btn--sm { min-height: 38px; padding: 8px 14px; font-size: .9rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.input, .textarea, select {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px; /* prevents iOS zoom */
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 106, 162, .14);
}
.pw-wrap { position: relative; display: block; }
.pw-wrap > .input { padding-right: 48px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pw-toggle:hover { color: var(--ink); background: var(--pink-soft); }
.pw-toggle:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.pw-toggle svg { display: block; }
.textarea { min-height: 130px; resize: vertical; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 5px; }
.logout-tips {
  margin: 0;
  padding-left: 1.15em;
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.55;
}
.logout-tips li + li { margin-top: 6px; }

/* Honeypot: visually hidden, off-screen, not display:none (some bots skip those). */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* File input as a friendly drop zone */
.filezone {
  border: 2px dashed var(--pink-soft);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}
.filezone input { display: none; }
.file-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-previews .chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pink-soft); color: #8a3a5a;
  border-radius: 999px; padding: 6px 12px; font-size: .85rem;
}

/* ---------- Flash messages ---------- */
.flash { border-radius: 14px; padding: 13px 16px; margin: 14px 0; font-weight: 600; }
.flash--ok { background: #e6f8f0; color: #1d6f4d; border: 1px solid #bdead7; }
.flash--err { background: #fde7ed; color: #a31f43; border: 1px solid #f6c2d1; }
.flash--info { background: #eef0ff; color: #4a40a0; border: 1px solid #d8dbff; }

/* ---------- Blog (social look) ---------- */
.feed { display: grid; gap: 20px; }
.post {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.post-head { padding: 14px 16px 8px; }
.post-date { color: var(--muted); font-size: .82rem; }
/* Blog media carousel */
.post-carousel {
  position: relative;
  background: #faf0f5;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}
.post-carousel-viewport { overflow: hidden; position: relative; }
/* No transform on track – iOS Safari freezes inline video inside transformed parents. */
.post-carousel-track { position: relative; }
.post-carousel-slide {
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
  max-height: 70vh;
  width: 100%;
}
.post-carousel-slide.is-active {
  display: flex;
}
.post-carousel-slide img,
.post-carousel-slide video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  background: #000;
}
.post-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.post-carousel-btn--prev { left: 10px; }
.post-carousel-btn--next { right: 10px; }
.post-carousel-btn[hidden] { display: none; }
.post-carousel-dots {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
  pointer-events: none;
}
.post-carousel-dot {
  pointer-events: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,.55);
  cursor: pointer;
}
.post-carousel-dot.is-active { background: #fff; transform: scale(1.15); }
.post-carousel-expand {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-carousel-expand:hover { background: rgba(0,0,0,.6); }
.post-carousel-slide[data-type="video"] { position: relative; }
.post-carousel-play-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0 4px;
  box-shadow: 0 2px 14px rgba(0,0,0,.25);
}
.post-carousel-play-hint[hidden] { display: none !important; }
.post-carousel-slide.is-playing .post-carousel-play-hint { display: none !important; }

/* Fullscreen lightbox */
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 56px;
}
.media-lightbox[hidden] { display: none !important; }
body.media-lightbox-open { overflow: hidden; }
.media-lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 0;
}
.media-lightbox-stage img,
.media-lightbox-stage video {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
}
.media-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.media-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.media-lightbox-nav--prev { left: 12px; }
.media-lightbox-nav--next { right: 12px; }
.media-lightbox-nav[hidden] { display: none; }
.media-lightbox-dots {
  position: absolute;
  bottom: 16px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.media-lightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,.4);
  cursor: pointer;
}
.media-lightbox-dot.is-active { background: #fff; }

.post-body { padding: 14px 16px 18px; }
.post-body h3 { margin: 0 0 6px; }
.post-actions { display: flex; gap: 16px; padding: 6px 16px 0; color: var(--muted); font-size: 1.3rem; }

/* Admin blog preview (public layout, admin-only URL) */
.blog-preview .site-main { padding-top: 0; }
.preview-banner {
  background: #2d2438; color: #f5eef8;
  font-size: .88rem; line-height: 1.45;
  border-bottom: 3px solid var(--pink);
}
.preview-banner-inner {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  align-items: center; padding: 12px 16px;
}
.preview-banner strong { color: #ffb8d4; }
.preview-banner-text { flex: 1; min-width: 200px; }
.preview-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-banner .btn--ghost {
  background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25);
}
.preview-banner .btn:not(.btn--ghost) { box-shadow: none; }
.feed--preview { max-width: 520px; margin: 0 auto; }

.empty-state { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty-state .big { font-size: 3rem; }

/* ---------- Chat (WhatsApp-like) ---------- */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 60px - env(safe-area-inset-top));
  background:
    linear-gradient(rgba(255,247,251,.7), rgba(255,247,251,.7)),
    radial-gradient(circle at 20% 20%, rgba(255,106,162,.08), transparent 40%);
  margin: -22px calc(50% - 50vw) 0;
  width: 100vw;
}
.chat-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.chat-topbar .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: grid; place-items: center; font-size: 1.2rem;
  flex: none; overflow: hidden;
}
.chat-topbar .avatar.avatar--photo,
.chat-msg-avatar.avatar--photo { padding: 0; display: block; }
.chat-topbar .avatar.avatar--photo img,
.chat-msg-avatar.avatar--photo img {
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.chat-row {
  display: flex; align-items: flex-end; gap: 6px;
  max-width: 88%; align-self: flex-start;
}
.chat-row--visitor {
  align-self: flex-end; max-width: 82%;
}
.chat-row .bubble { max-width: 100%; align-self: auto; }
.chat-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  flex: none; margin-bottom: 2px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 800; overflow: hidden;
}
.chat-topbar .who { font-weight: 800; line-height: 1.1; }
.chat-topbar .who small { display: block; font-weight: 500; opacity: .85; font-size: .75rem; }
.chat-topbar .spacer { flex: 1; }
.chat-topbar a.leave { color: #fff; font-size: .85rem; opacity: .9; }

.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 16px;
  box-shadow: 0 1px 1px rgba(0,0,0,.06);
  position: relative;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.bubble .time { display: block; font-size: .68rem; color: rgba(0,0,0,.4); text-align: right; margin-top: 3px; }
.bubble img { border-radius: 12px; margin-bottom: 4px; }
.bubble.from-visitor { align-self: flex-end; background: #ffe1ec; border-bottom-right-radius: 4px; }
.bubble.from-admin { background: #fff; border-bottom-left-radius: 4px; }
.bubble.from-admin .time { color: var(--muted); }
.chat-day { align-self: center; background: rgba(255,255,255,.85); color: var(--muted); font-size: .72rem; padding: 4px 12px; border-radius: 999px; margin: 6px 0; }

.chat-input {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
}
.chat-input textarea {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 11px 14px;
  font-size: 16px;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  min-height: 44px;
  outline: none;
}
.chat-input textarea:focus { border-color: var(--pink); }
.icon-btn {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  background: #f3eef2; color: var(--ink);
  font-size: 1.25rem; cursor: pointer;
}
.icon-btn.send { background: var(--grad); color: #fff; }
.icon-btn--text { width: auto; min-width: 46px; padding: 0 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.chat-attach-preview { padding: 0 14px; }
.chat-attach-preview .chip { display: inline-flex; gap: 6px; align-items: center; background: var(--pink-soft); color: #8a3a5a; border-radius: 999px; padding: 6px 12px; font-size: .82rem; margin: 6px 0; }

/* Chat entry (gate) */
.gate-tabs { display: flex; gap: 6px; background: #f3eef2; padding: 5px; border-radius: 14px; margin-bottom: 18px; }
.gate-tabs button {
  flex: 1; border: 0; background: transparent; padding: 11px; border-radius: 10px;
  font-weight: 700; color: var(--muted); cursor: pointer; font-size: .95rem; min-height: 44px;
}
.gate-tabs button.active { background: #fff; color: var(--pink); box-shadow: var(--shadow-sm); }

.explainer { display: grid; gap: 10px; margin-top: 6px; }
.explainer .step { display: flex; gap: 12px; align-items: flex-start; }
.explainer .step .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--pink-soft); color: #8a3a5a; display: grid; place-items: center; font-weight: 800;
}

/* Admin: chat profile crop editor */
.avatar-crop { max-width: 360px; }
.avatar-crop-preview {
  width: 160px; height: 160px; border-radius: 50%;
  overflow: hidden; touch-action: none; cursor: grab;
  background: linear-gradient(135deg, #ff6aa2, #ff9ec8);
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  color: #fff; font-size: 3rem; font-weight: 800;
  margin: 0 auto 10px;
}
.avatar-crop-preview:active { cursor: grabbing; }
.avatar-crop-preview .avatar-letter { font-size: 3rem; font-weight: 800; line-height: 1; }
.avatar-crop-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-crop-hint { text-align: center; margin: 0 0 14px; }
.avatar-crop input[type="range"] { width: 100%; }

/* ---------- Admin ---------- */
.admin-body { background: #f6f4f8; }
.admin-header { background: #1f1b2e; color: #fff; }
.admin-header .header-inner {
  align-items: center;
  padding-block: 10px;
  gap: 10px;
}
.admin-header .brand {
  min-height: 40px;
  flex-shrink: 0;
}
.admin-header .brand-name { color: #fff; -webkit-text-fill-color: #fff; }
.admin-header-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  gap: 6px;
}
.admin-header .admin-site-nav {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-header .admin-site-nav::-webkit-scrollbar { display: none; }
.admin-header .admin-site-nav a {
  flex-shrink: 0;
  padding: 7px 10px;
  font-size: .88rem;
  min-height: 36px;
  color: #d9d4e6;
}
.admin-header .admin-site-nav a.is-active { background: rgba(255,255,255,.14); color: #fff; }
.admin-header .admin-logout {
  flex-shrink: 0;
  min-height: 36px;
  padding: 7px 14px;
  font-size: .88rem;
}

.chat-stream .bubble { position: relative; }
.chat-stream .bubble-edit { width: 100%; max-width: min(100%, 320px); }
.chat-stream .bubble-edit .textarea {
  width: 100%;
  font-size: .95rem;
  min-height: 72px;
}
.chat-stream .bubble-edit-link {
  display: inline-block;
  margin-top: 6px;
  font-size: .75rem;
  font-weight: 600;
  color: inherit;
  opacity: .75;
  text-decoration: underline;
}
.chat-stream .bubble-edit-link:hover { opacity: 1; text-decoration: none; }
.chat-stream .bubble.from-visitor .bubble-edit-link { color: #8a3a5a; }

.admin-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.stat .n { font-size: 1.8rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--muted); font-size: .85rem; }

.list { display: grid; gap: 10px; }
.row-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow-sm);
}
.row-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.row-card .top strong { font-size: 1.02rem; }
.row-card .meta { color: var(--muted); font-size: .82rem; word-break: break-word; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge--spam { background: #fde7ed; color: #a31f43; }
.badge--new { background: #e6f8f0; color: #1d6f4d; }
.badge--human { background: #eef0ff; color: #4a40a0; }
.badge--bot { background: #f3eef2; color: #8a8195; }

.tag-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.admin-filters {
  margin: 12px 0 16px;
  padding: 14px;
}
.admin-filters__grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.admin-filters__wide {
  grid-column: 1 / -1;
}
.admin-filters__label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.admin-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 18px 0 8px;
}
.admin-pagination__current {
  pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--pink);
}
.admin-pagination__gap {
  color: var(--muted);
  padding: 0 4px;
  user-select: none;
}

/* Responsive data table -> cards on mobile via .row-card; real tables on desktop */
.kv { display: grid; grid-template-columns: 1fr; gap: 4px; margin-top: 8px; }
.kv div { display: flex; gap: 8px; font-size: .85rem; }
.kv div span:first-child { color: var(--muted); min-width: 120px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 calc(18px + env(safe-area-inset-bottom));
  margin-top: 8px;
  background: rgba(255, 247, 251, .9);
}
.site-footer-inner {
  text-align: center;
  font-size: .88rem;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.site-footer a:hover {
  color: var(--pink);
  text-decoration: underline;
}
.site-footer-sep {
  color: var(--muted);
  margin: 0 8px;
}
.legal-page ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  line-height: 1.65;
}
.legal-page li {
  margin-bottom: .35rem;
}
.legal-page code {
  font-size: .88em;
  background: #f3eef2;
  padding: 2px 6px;
  border-radius: 4px;
}

.legal-page h2 {
  font-size: 1.05rem;
  margin: 1.4rem 0 .5rem;
  color: var(--ink);
}
.legal-page p {
  margin: 0 0 .75rem;
  color: var(--ink);
  line-height: 1.65;
}
.email-obfuscate {
  display: inline;
}
.email-obfuscate__hint abbr {
  text-decoration: none;
  cursor: help;
}
.email-obfuscate__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}
.email-obfuscate__actions .btn {
  margin: 0;
}
.email-obfuscate__revealed {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  word-break: break-all;
}
.email-obfuscate__status {
  display: block;
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

/* ---------- Utilities ---------- */
/* Screen-reader / crawler text without changing the visible layout */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.center { text-align: center; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.pill { display:inline-block; background: var(--pink-soft); color:#8a3a5a; padding:3px 10px; border-radius:999px; font-size:.78rem; font-weight:700; }

/* ---------- Larger screens ---------- */
@media (min-width: 700px) {
  .admin-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .admin-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .admin-filters__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chat-shell { height: 78vh; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); margin: 0 auto; width: 100%; max-width: var(--maxw); }
  .chat-topbar { border-radius: 0; }
  .kv { grid-template-columns: 1fr 1fr; }
}

