/* Famileo's own visual language: dark-teal chrome, white feed cards, cyan
   dates, orange accents. Mobile-first — this lives on a phone home screen. */
:root {
  --teal: #134b58;
  --teal-deep: #0e3a44;
  --cyan: #2a8aa5;
  --cyan-soft: #41a7c6;
  --orange: #ee7f5b;
  --ink: #173a46;
  --muted: #5a6d74;
  --line: #e3e7e8;
  --bg: #eef1f2;
  --card: #ffffff;
  --warn: #ee7f5b;
  --ok: #2f9e6f;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--cyan); text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---- app shell ---- */
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; padding: .55rem .8rem; border-bottom: 1px solid var(--line);
}
.topbar .burger { background: none; border: 0; font-size: 1.3rem; color: var(--teal); line-height: 1; }
.logo { font-weight: 800; font-size: 1.35rem; color: var(--cyan); letter-spacing: .01em; }
.logo b { color: var(--cyan); position: relative; }
.logo b::after { content: ""; position: absolute; top: .12em; left: .06em; width: .22em; height: .22em; border-radius: 50%; background: var(--orange); }
.logo .sub { font-weight: 600; font-size: .8rem; color: var(--orange); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--cyan-soft); border: 2px solid #cfe9f2; }

/* ---- gazette banner ---- */
.banner {
  margin: .7rem .7rem 0; background: var(--teal); color: #fff;
  border-radius: 999px; font-size: .8rem; padding: .5rem 1rem; text-align: center;
}
.banner.warn { background: var(--orange); }

/* ---- feed ---- */
.feed { padding: 0 0 5rem; }
.card { background: var(--card); margin: .6rem 0; padding: .6rem 0 .5rem; }
.card .author { display: flex; gap: .55rem; align-items: center; padding: 0 .8rem .5rem; }
.card .author img, .card .author .ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--cyan-soft); }
.card .author b { display: block; font-size: .9rem; }
.card .author i { font-style: normal; font-size: .74rem; color: var(--cyan); }
.card .author .del { margin-left: auto; background: none; border: 0; color: #b0bcc0;
  font-size: 1.5rem; line-height: 1; padding: 0 .5rem; border-radius: 8px; align-self: flex-start; }
.card .author .del:hover { color: #d9534f; background: #f7eceb; }
.card .photo { width: 100%; display: block; background: #dfe6e8; }
.card .dupwarn {
  margin: 0 .8rem .5rem; background: #fdeee8; color: #c85a37; border: 1px solid #f4c9b8;
  border-radius: 8px; padding: .4rem .6rem; font-size: .78rem; font-weight: 600;
}
.card .caption { padding: .5rem .8rem .3rem; font-size: .92rem; line-height: 1.4; }
.card .textonly { padding: .9rem .8rem; font-size: .95rem; line-height: 1.45; }

/* ---- chips ---- */
.chips { display: flex; gap: .4rem; padding: .35rem .8rem 0; flex-wrap: wrap; }
.chip { border: 0; border-radius: 999px; font-size: .72rem; padding: .3rem .72rem; background: var(--cyan); color: #fff; }
.chip.sent { background: #e6ecee; color: var(--muted); }
.chip.dup { background: var(--orange); }
.chip:disabled { opacity: .8; }

/* ---- FAB ---- */
.fab {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--orange);
  color: #fff; font-size: 1.5rem; box-shadow: 0 4px 14px rgba(0,0,0,.28); z-index: 30;
}
@media (min-width: 640px) { .fab { left: auto; right: calc(50% - 320px + 18px); } }

/* ---- drawer ---- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(80%, 320px);
  background: var(--teal); color: #fff; z-index: 41; padding: 1.1rem; overflow-y: auto;
}
.drawer h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin: .2rem 0 .8rem; }
.drawer .fam { display: block; width: 100%; text-align: left; background: none; border: 0; color: #fff; padding: .6rem .4rem; border-radius: 8px; font-weight: 600; }
.drawer .fam.active { background: rgba(255,255,255,.12); }
.drawer .fam span { display: block; font-weight: 400; font-size: .74rem; color: var(--cyan-soft); }
.drawer .sep { border: 0; border-top: 1px solid rgba(255,255,255,.18); margin: .9rem 0; }
.drawer .link { display: block; color: #cfe9f2; padding: .5rem .4rem; font-size: .9rem; background: none; border: 0; text-align: left; width: 100%; }
.drawer .foot { margin-top: 1rem; font-size: .72rem; color: var(--cyan-soft); }

/* ---- sheet (bottom modal) ---- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: #fff; width: 100%; max-width: 640px; border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 24px rgba(0,0,0,.22); padding: 1rem 1rem 1.4rem; max-height: 88vh; overflow-y: auto;
}
.sheet h3 { margin: .1rem 0 .3rem; font-size: 1.05rem; }
.sheet .warn-title { color: var(--warn); font-weight: 700; }
.sheet .duo { display: flex; gap: .5rem; margin: .6rem 0; }
.sheet .duo figure { margin: 0; flex: 1; }
.sheet .duo img { width: 100%; border-radius: 8px; display: block; background: #dfe6e8; }
.sheet .duo figcaption { font-size: .72rem; color: var(--muted); text-align: center; margin-top: .25rem; }
.sheet textarea, .sheet input[type=text] { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .55rem; font: inherit; resize: vertical; }
.sheet label.fam-check { display: flex; align-items: flex-start; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.sheet label.fam-check .meta { font-size: .76rem; color: var(--muted); }
.sheet label.fam-check .meta.warn { color: var(--warn); }
.sheet .actions { display: flex; gap: .6rem; align-items: center; margin-top: .9rem; }
.btn-primary { background: var(--orange); color: #fff; border: 0; border-radius: 999px; padding: .55rem 1.3rem; font-weight: 600; }
.btn-ghost { background: none; border: 0; color: var(--teal); padding: .55rem .4rem; }
.filepick { display: block; border: 1px dashed #b8c4c8; border-radius: 10px; padding: 1rem; text-align: center; color: var(--muted); margin: .5rem 0; }
.note { background: #f4f8f9; border-radius: 10px; padding: .6rem .7rem; font-size: .82rem; color: var(--muted); margin: .5rem 0; }

/* ---- centered pages (landing, reconnect) ---- */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.panel { background: #fff; border-radius: 18px; box-shadow: 0 10px 40px rgba(19,75,88,.12); max-width: 440px; width: 100%; padding: 2rem 1.8rem; text-align: center; }
.panel h1 { font-size: 1.2rem; margin: 1.2rem 0 .5rem; }
.panel p { color: #42555c; line-height: 1.5; font-size: .95rem; }
.panel ul { text-align: left; color: #42555c; font-size: .92rem; line-height: 1.6; }
.panel .cta { display: inline-block; margin-top: 1.3rem; background: var(--orange); color: #fff; border-radius: 999px; padding: .7rem 1.6rem; font-weight: 700; border: 0; }
.panel .foot { margin-top: 1.4rem; font-size: .75rem; color: #8aa0a7; }

.toast { text-align: center; padding: .8rem; color: var(--ok); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
[hidden] { display: none !important; }
