:root {
  --teal: #2fa36b;
  --teal-deep: #1e7a4f;
  --yellow: #f0bc00;        /* megtartva a literál arany elemekhez (érme) */
  --yellow-light: #ffd75e;
  --bg: #f1ffee;
  --card: #ffffff;
  --card-todo: #eaf7e3;
  --ink: #12241b;
  --ink-soft: #4f6459;
  --border: rgba(18, 36, 27, 0.12);
  --shadow: 0 14px 40px rgba(24, 72, 48, 0.12);
  --done-bg: #e4f7db;
  --done-border: #2fa36b;
  --link: #1a6b45;          /* chat-linkek világos kártyán — erős kontraszt */
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1a12; --card: #16271d; --card-todo: #122519;
    --ink: #eafff1; --ink-soft: #9fc3ad; --border: rgba(234, 242, 238, 0.14);
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.4); --done-bg: #163024; --done-border: #54c98c;
    --link: #8fe0b4;        /* sötét kártyán világos zöld — a #1a6b45 itt olvashatatlan lenne */
  }
}

*, *::before, *::after { box-sizing: border-box; }
/* A `hidden` attribútum mindig győzzön a display fölött (modál, nézetek, listbar) */
[hidden] { display: none !important; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%; color: var(--ink); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; border: 0; cursor: pointer; color: inherit; background: none; }

/* ── Fejléc ──────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--teal); color: #fff;
  padding: max(12px, env(safe-area-inset-top)) 14px 8px;
  box-shadow: 0 4px 18px rgba(15, 89, 70, 0.25);
}
/* Signature hullám — a zöld fejléc lágy, íves alsó pereme (microsite arculat) */
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 13px;
  background: var(--teal); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='13' viewBox='0 0 1440 13' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M0,0 H1440 V5 C1200,12 960,12 720,7.5 C480,3 240,3 0,8.5 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='13' viewBox='0 0 1440 13' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M0,0 H1440 V5 C1200,12 960,12 720,7.5 C480,3 240,3 0,8.5 Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.topbar-inner { width: min(100%, 680px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.brand-btn { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; padding: 4px 8px 4px 4px; border-radius: 12px; transition: background 0.15s ease; }
.brand-btn:hover { background: rgba(255,255,255,0.12); }
.brand-btn img { border-radius: 8px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); flex: none; }
.brand-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: clamp(18px, 5vw, 22px); font-weight: 900; letter-spacing: -0.01em; color: #fff; }
.brand-sub { font-size: 11px; opacity: 0.85; font-weight: 600; letter-spacing: 0.02em; }

.actions { flex: none; display: flex; align-items: center; gap: 7px; }
.icon-btn {
  flex: none; min-width: 38px; height: 38px; padding: 0 9px; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; line-height: 1; border-radius: 999px;
  background: rgba(255,255,255,0.16); transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}
.icon-btn:hover { background: rgba(255,255,255,0.28); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.is-off { opacity: 0.65; }
.login-btn {
  flex: none; padding: 9px 14px; font-size: 14px; font-weight: 700; border-radius: 999px;
  background: #ffffff; color: var(--teal-deep); transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.login-btn:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.login-btn:active { transform: scale(0.96); }
/* Belépő kód-blokk (Apple/PWA ág): elkülönül a „kód kérése" gombtól, a mező és a Belépés gomb közt térköz */
#login-code-wrap { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
#login-code { text-align: center; letter-spacing: 0.32em; font-size: 20px; font-weight: 800; }
.login-btn.is-auth { background: rgba(255,255,255,0.22); color: #fff; }
.login-btn.is-auth:hover { background: rgba(255,255,255,0.32); }

/* ── Kontextus-sáv: típus-pill (🎒 Pakolós / 💰 Költséges) + név ──────
   Letisztult, alacsony fejléc — a műveletek a nézet törzsében élnek. */
.ctxbar { width: min(100%, 680px); margin: 9px auto 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; }
.ctx-type {
  flex: none; align-self: center; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; font-size: 11px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  border-radius: 999px; background: rgba(255,255,255,0.18); color: #fff;
}
.ctx-name { min-width: 0; font-size: clamp(15px, 4.2vw, 18px); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }

/* ── Nézet-törzs műveletsor (lista + költség) ──────────────────────── */
.viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0 0 14px; }
.vbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; font-size: 13px; font-weight: 700;
  border-radius: 999px; background: var(--card); color: var(--ink-soft); border: 1.5px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.vbtn:hover { border-color: var(--teal); color: var(--teal); }
.vbtn:active { transform: scale(0.96); }
.viewbar-count { margin-left: auto; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.exp-actions .vbtn { flex: 1 1 150px; justify-content: center; }
.exp-actions .vbtn.vbtn-wide { flex: 1 1 100%; }   /* lezárás gomb: teljes szélesség, saját sor */

.progress-wrap { width: min(100%, 680px); margin: 9px auto 0; height: 7px; border-radius: 999px; background: rgba(255,255,255,0.22); overflow: hidden; }
.progress-bar { height: 100%; width: 0%; border-radius: 999px; background: rgba(255,255,255,0.92); transition: width 0.4s ease; }

/* ── Betöltés-jelző (felhő-lekérdezés folyamatban) ── */
.busybar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; background: rgba(31,125,99,0.18); overflow: hidden; pointer-events: none; }
.busybar-fill { position: absolute; top: 0; height: 100%; width: 35%; border-radius: 999px; background: #54c98c; animation: busy-slide 1.05s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes busy-slide { 0% { left: -40%; width: 35%; } 50% { width: 55%; } 100% { left: 100%; width: 35%; } }
@media (prefers-reduced-motion: reduce) { .busybar-fill { animation-duration: 1.8s; } }
.ctx-edit {
  flex: none; align-self: center; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255,255,255,0.18); color: #fff; transition: background 0.15s ease, transform 0.1s ease;
}
.ctx-edit:hover { background: rgba(255,255,255,0.28); }
.ctx-edit:active { transform: scale(0.92); }
.contact-del--labeled { width: auto; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }

/* ── Tartalom ────────────────────────────────────── */
.wrap { width: min(100%, 680px); margin: 0 auto; padding: 16px 14px 8px; }
.block { margin-bottom: 22px; }
.block-title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
/* v168 — A FŐ LAPCÍM. Külön osztály, mert a `.block-title` az appban 29 helyen
   szerepel általános szekció-címkeként; azt megnövelni mindenhol elrontaná.
   A méret az Üzenetek korábbi címéhez igazodik (az 32 px volt), de reszponzívan:
   szűk kijelzőn sem tör ki egy hosszabb szó, mint a „Költségvetéseim”. */
.view-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
  font-size: clamp(25px, 7vw, 32px); line-height: 1.12; font-weight: 800;
  letter-spacing: -0.015em; text-transform: none; color: var(--ink); }
/* A súgógomb a 13 px-es szekció-címkéhez van méretezve — a nagy lapcím mellett
   arányosan nagyobb, de nem versenyez a szöveggel. */
.view-title .title-help { width: 26px; height: 26px; font-size: 15px; margin-left: 2px; }
.block-count { font-size: 12px; font-weight: 700; background: var(--border); color: var(--ink-soft); border-radius: 999px; padding: 1px 9px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-todo { background: var(--ink-soft); } .dot-done { background: var(--teal); } .dot-skip { background: #b3261e; opacity: 0.55; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.empty-note { margin: 4px 2px; font-size: 14px; color: var(--ink-soft); }

.back-link { margin: 2px 0 14px; padding: 8px 12px; font-size: 14px; font-weight: 700; color: var(--ink-soft); border-radius: 999px; }
.back-link:hover { color: var(--ink); background: var(--border); }

/* Saját tétel hozzáadása */
.add-bar { display: flex; gap: 9px; margin: 2px 0 20px; }
.add-input { flex: 1; min-width: 0; padding: 12px 14px; font: inherit; font-size: 15px; color: var(--ink); background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.add-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,125,99,0.18); }
.add-input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.add-btn { flex: none; width: 48px; border-radius: var(--radius); background: var(--teal); color: #fff; font-size: 26px; font-weight: 700; line-height: 1; box-shadow: var(--shadow); transition: background 0.15s ease, transform 0.1s ease; }
.add-btn:hover { background: var(--teal-deep); } .add-btn:active { transform: scale(0.95); }

/* ── Tétel-kártya ────────────────────────────────── */
.item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--card-todo); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform 0.12s ease, border-color 0.15s ease, background 0.2s ease, opacity 0.2s ease; }
.item:active { transform: scale(0.99); }
.check { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink-soft); background: transparent; display: grid; place-items: center; transition: background 0.15s ease, border-color 0.15s ease; }
.check-mark { font-size: 17px; font-weight: 900; color: #fff; opacity: 0; transform: scale(0.4); transition: opacity 0.15s ease, transform 0.15s ease; }
.item-main { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.item-name { font-weight: 600; color: var(--ink); }
.chip { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--border); color: var(--ink-soft); }
.chip-sajat { background: rgba(120,80,200,0.16); color: #6a40b0; }
@media (prefers-color-scheme: dark) { .chip-sajat { background: rgba(150,110,230,0.22); color: #c4adf0; } }
/* v161: ceruza a saját tétel neve mellett. Az .item-main tördel, ezért nem
   szorítja ki a jegyzet-mezőt a szűk mobil-soron. Token-alapú színek → a sötét
   téma külön szabály nélkül is helyes. */
.item-edit { flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
             background: transparent; color: var(--ink-soft); font-size: 13px; line-height: 1;
             display: grid; place-items: center; cursor: pointer; opacity: 0.75;
             transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease; }
.item-edit:hover { background: var(--border); color: var(--ink); opacity: 1; }
.item-edit:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
/* Szerkesztés közben a mező a név helyét veszi át, és a sorban marad. */
.item-name-input { flex: 1 1 120px; min-width: 0; padding: 5px 8px; font-size: 14px; font-weight: 600;
                   color: var(--ink); background: var(--card); border: 1.5px solid var(--teal);
                   border-radius: 8px; }
.item-name-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(47,163,107,0.22); }
.reason { font-size: 11px; font-weight: 700; color: #b3261e; background: rgba(179,38,30,0.10); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.packer { flex: none; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.note { flex: none; width: 96px; padding: 7px 9px; font-size: 13px; color: var(--ink); background: var(--card); border: 1.5px solid var(--border); border-radius: 10px; }
.note:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,163,107,0.22); }
.note::placeholder { color: var(--ink-soft); opacity: 0.7; }
.skip { flex: none; width: 28px; height: 28px; border-radius: 50%; background: transparent; color: var(--ink-soft); font-size: 15px; line-height: 1; display: grid; place-items: center; border: 1.5px solid var(--border); transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.skip:hover { background: rgba(179,38,30,0.10); color: #b3261e; border-color: rgba(179,38,30,0.4); }
.skip:active { transform: scale(0.92); }

.item.is-done { background: var(--done-bg); border-color: var(--done-border); }
.item.is-done .check { background: var(--teal); border-color: var(--teal); }
.item.is-done .check-mark { opacity: 1; transform: scale(1); color: #fff; }
.item.is-skipped { background: transparent; border-style: dashed; opacity: 0.7; box-shadow: none; }
.item.is-skipped .item-name { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-soft); }
.item.is-skipped .check, .item.is-skipped .note { display: none; }
.item.is-skipped .skip { border-style: solid; color: var(--teal); }
.item.is-disabled { opacity: 0.5; filter: grayscale(0.4); }
.item.is-disabled .check { pointer-events: none; border-style: dashed; }
.item.is-disabled .item-name { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.item.is-disabled .note { display: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Galéria-kártyák ─────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
.lcard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; min-height: 112px; text-align: left; background: var(--card); border: 2px solid var(--border); border-left: 6px solid var(--accent, var(--teal)); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform 0.1s ease, border-color 0.15s ease; }
.lcard:hover { transform: translateY(-2px); }
.lcard-main { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%;
  /* v141: hely a függőleges gombsornak, és a TÖRDELT név is balra igazodjon
     (a <button> alapértelmezése középre igazít — hosszú névnél ez látszott) */
  padding-right: 36px; text-align: left; }
.lcard-emoji { font-size: 26px; line-height: 1; }
.lcard-name { font-weight: 700; color: var(--ink); }
.lcard-prog { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
/* Kártyatípus-jelző (pakolós vs. költséges) — a fejléc-pillel azonos nyelv */
.lcard-type { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; background: rgba(127,127,127,0.16); color: var(--ink-soft); }
.lcard-type.is-packing { background: rgba(31,125,99,0.16); color: var(--teal); }
.lcard-type.is-budget { background: rgba(176,106,31,0.20); color: #c2781f; }
/* v141: FÜGGŐLEGES gombsor a jobb szélen — vízszintesen ráfutott az emojira/névre.
   Így a szöveg és az ikon szabadon marad, és a 4. gomb (húzó-fogantyú) is elfér. */
.lcard-tools { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.lcard-edit, .lcard-del, .lcard-leave, .lcard-copy { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; display: grid; place-items: center; background: var(--card-todo); border: 1px solid var(--border); }
.lcard-edit:hover, .lcard-del:hover, .lcard-leave:hover, .lcard-copy:hover { background: var(--border); }
.lcard-add { align-items: center; justify-content: center; border-style: dashed; border-left-style: dashed; color: var(--ink-soft); }
.lcard-add .lcard-emoji { font-size: 30px; }
.tcard { cursor: pointer; }
/* QR-kapcsolat: saját QR-blokk + beolvasó modál */
.qr-block { margin: 4px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-align: center; }
.qr-title { margin: 0 0 4px; font-size: 15px; }
.qr-card { display: inline-block; margin: 8px auto 10px; padding: 10px; background: #fff; border: 1px solid rgba(0,0,0,0.10); border-radius: 12px; box-shadow: var(--shadow); }
.qr-card .qr-img { width: 200px; height: 200px; display: grid; place-items: center; background: #fff; }
.qr-card .qr-img img, .qr-card .qr-img svg { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qr-scan-wrap { position: relative; width: 100%; max-width: 320px; margin: 6px auto 4px; aspect-ratio: 1 / 1; background: #000; border-radius: 14px; overflow: hidden; }
.qr-scan-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Nyitóképernyő-kártya kivezetett részletei: kikkel közös + saját egyenleg */
.lcard-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.lcard-mem { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.lcard-mem .mc-mem-stack .mc-mem-badge { width: 22px; height: 22px; margin-left: -6px; border: 2px solid var(--card); }
.lcard-mem .mc-mem-stack .mc-mem-badge:first-child { margin-left: 0; }
.lcard-mem-names { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard-bal { font-size: 12.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--border); color: var(--ink-soft); }
.lcard-bal.is-plus { background: rgba(31,125,99,.14); color: #1f7d63; }
.lcard-bal.is-minus { background: rgba(179,38,30,.12); color: #b3261e; }
.lcard-bal.is-even { background: var(--border); color: var(--ink-soft); }
@media (prefers-color-scheme: dark) {
  .lcard-bal.is-plus { background: rgba(76,197,158,.16); color: #4cc59e; }
  .lcard-bal.is-minus { background: rgba(255,138,128,.16); color: #ff8a80; }
}

/* ── Nyitóképernyő ───────────────────────────────── */
.home-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 18px 16px; min-height: 124px; text-align: left;
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform 0.12s ease, border-color 0.15s ease;
}
.choice:hover { transform: translateY(-2px); border-color: var(--teal); }
.choice:active { transform: scale(0.98); }
.choice-emoji { font-size: 34px; line-height: 1; margin-bottom: 6px; }
/* Nyitóképernyő kézzel rajzolt ikonjai: kicsit nagyobb + korong-keret, hogy elkülönüljenek a háttértől (világos+sötét) */
img.choice-emoji { width: 60px; height: 60px; border-radius: 50%; background: #fff6ee; border: 1.5px solid var(--border); box-shadow: 0 3px 10px rgba(24,72,48,.14); }
.choice-label { font-weight: 800; font-size: 16px; color: var(--ink); }
.choice-sub { font-size: 12px; font-weight: 600; color: var(--ink-soft); }

/* ── Aloldal-bevezető szövegek ───────────────────── */
.page-lead { margin: -2px 2px 14px; font-size: 14px; color: var(--ink-soft); }
.soon-note { margin-top: 14px; font-style: italic; opacity: 0.85; }

/* ── Oldalsó menü (drawer) ───────────────────────── */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer::before { content: ''; position: absolute; inset: 0; background: rgba(10,18,15,0.5); animation: drawer-fade 0.2s ease; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(82%, 320px);
  background: var(--card); box-shadow: -12px 0 40px rgba(0,0,0,0.3);
  padding: max(18px, env(safe-area-inset-top)) 16px 0;
  display: flex; flex-direction: column; gap: 4px; animation: drawer-slide 0.22s ease;
  overflow-y: auto;   /* sok menüpontnál görgethető — a verzió ne csússzon le */
}
@keyframes drawer-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes drawer-fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-title { margin: 4px 4px 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.drawer-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; color: var(--ink-soft); }
.drawer-close:hover { background: var(--border); }
.drawer-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 12px;
  font-size: 16px; font-weight: 700; color: var(--ink); text-align: left;
  border-radius: 12px; transition: background 0.15s ease, transform 0.1s ease;
}
.drawer-item:hover { background: rgba(47,163,107,0.12); box-shadow: inset 3px 0 0 var(--teal); }
.drawer-item:active { transform: scale(0.98); }
.drawer-item span:first-child { font-size: 22px; width: 28px; text-align: center; flex: none; }
.drawer-item .di-ico { width: 30px; height: 30px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(47,163,107,0.42); }
/* Verzió: MINDIG látható, kipinnelt lábléc a menü alján (fejlesztői jelző) */
.drawer-ver {
  position: sticky; bottom: 0; margin: 8px -16px 0; flex: none;
  padding: 11px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-align: center;
  color: var(--ink-soft); opacity: 1;
}

/* ── Kapcsolatok (Fázis C) ───────────────────────── */
.contacts { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.contact-row { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contact-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-sub { font-size: 12px; color: var(--ink-soft); }
.contact-del { flex: none; width: 30px; height: 30px; border-radius: 8px; font-size: 14px; display: grid; place-items: center; background: var(--card-todo); border: 1px solid var(--border); color: var(--ink-soft); }
.contact-del:hover { background: rgba(179,38,30,0.10); color: #b3261e; border-color: rgba(179,38,30,0.4); }
.contact-invite { flex: none; padding: 8px 14px; font-size: 13px; font-weight: 800; border-radius: 999px; background: var(--teal); color: #fff; transition: background 0.15s ease, transform 0.1s ease; }
.contact-invite:hover { background: var(--teal-deep); } .contact-invite:active { transform: scale(0.96); }
.contact-invite:disabled { background: var(--border); color: var(--ink-soft); }
.share-contacts { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.share-contacts-title { margin: 0 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
#share-contacts-list { display: flex; flex-direction: column; gap: 8px; }
#share-contacts-list .contact-row { padding: 9px 11px; }

/* ── Profil (Fázis D) ────────────────────────────── */
.pf-group { margin: 22px 2px 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.pf-group:first-of-type { margin-top: 4px; }
.pf-field { margin-bottom: 14px; }
.pf-label { display: block; font-weight: 700; font-size: 14px; margin: 0 2px 6px; color: var(--ink); }
#view-profile .add-input { width: 100%; box-shadow: none; }
#view-profile textarea.add-input { resize: vertical; min-height: 44px; font-family: inherit; }
.pf-share { display: inline-flex; align-items: center; gap: 7px; margin: 8px 2px 0; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.pf-share input { width: 18px; height: 18px; accent-color: var(--teal); }
.pf-shareall { display: flex; align-items: center; gap: 9px; margin: 4px 2px 6px; padding: 12px 14px; font-size: 14px; font-weight: 700; color: var(--teal-deep); background: rgba(31,125,99,0.10); border: 1.5px solid rgba(31,125,99,0.28); border-radius: var(--radius); cursor: pointer; }
.pf-shareall input { width: 20px; height: 20px; accent-color: var(--teal); flex: none; }
.modal-msg.pf-saved { color: #fff; background: var(--teal); padding: 10px 14px; border-radius: var(--radius); font-weight: 800; }
.modal-msg.pf-save-err { color: #fff; background: #b3261e; padding: 10px 14px; border-radius: var(--radius); font-weight: 800; }
/* Lebegő toast — mindig látható, függetlenül attól, hol tart a felhasználó az oldalon */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px);
  z-index: 4000; max-width: min(92vw, 420px); padding: 13px 20px; border-radius: 999px;
  background: var(--teal); color: #fff; font-size: 15px; font-weight: 800; text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,0.28); opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease; }
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-err { background: #b3261e; }
.pf-hint { margin: 6px 2px 0; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
#pf-save { width: 100%; margin-top: 8px; }

/* ── Vészkártya (tag megosztott adatai) ──────────── */
#member-card { margin-top: 4px; }
.mc-row { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.mc-row:last-child { border-bottom: 0; }
.mc-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.mc-val { font-size: 15px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.mc-pay { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; margin-top: 2px; padding: 8px 13px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 14px; font-weight: 800; text-decoration: none; }
.mc-pay:active { opacity: 0.85; }

/* ── Belépés modál ───────────────────────────────── */
/* z-index: 65 — a #chat-thread/.drawer (60) FÖLÉ, hogy egy modal (pl. a chat-
   szálból nyitott profilkártya) sose kerüljön a teljes-képernyős nézetek mögé. */
.modal-bg { position: fixed; inset: 0; z-index: 65; background: rgba(10,18,15,0.55); display: grid; place-items: center; padding: 18px; }
.modal { position: relative; width: min(100%, 380px); background: var(--card); border-radius: 20px; padding: 26px 22px 22px; box-shadow: 0 24px 60px rgba(0,0,0,0.35); max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
/* a bezáró gomb a modál görgetése közben is a jobb felső sarokban marad */
.modal .modal-close { position: sticky; top: 0; float: right; margin: -14px -8px 0 0; }
/* Push értesítés blokk a profilban */
.pf-notify { margin: 16px 0; padding-top: 16px; border-top: 1px solid var(--border); }
.pf-notify #pf-notify-toggle { margin-top: 6px; }
.pf-notify .pf-hint { margin-top: 8px; }
.pf-notify-prefs { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pf-notify-prefs .pf-label { margin: 0 0 2px; }
/* Kiadás-integritás: attribúció + törölt tételek */
.expense-attr { color: var(--muted); font-size: 12px; opacity: .8; margin-top: 1px; }
.exp-deleted { margin-top: 14px; }
.exp-deleted-toggle { width: 100%; text-align: left; background: none; border: 0; color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 700; padding: 8px 2px; cursor: pointer; }
.exp-deleted-list .expense-del .expense-desc, .exp-deleted-list .expense-del .expense-amt { text-decoration: line-through; opacity: .65; }
.exp-restore { margin-top: 6px; font-size: 13px; padding: 6px 12px; align-self: flex-start; }
.exp-history-btn { margin-top: 8px; width: 100%; }
#history-list { margin-top: 4px; }
.hist-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.hist-item:last-child { border-bottom: 0; }
.hist-head { font-size: 13px; font-weight: 700; color: var(--ink); }
.hist-body { font-size: 13px; color: var(--ink-soft); margin-top: 2px; word-break: break-word; }
/* SW frissítés-sáv */
/* A felső padding tartalmazza az iOS safe-area-t (notch/status bar), hogy a
   szöveg a bevágás ALÁ kerüljön és kattintható legyen (viewport-fit=cover kell). */
.update-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; border: 0; width: 100%; padding: calc(11px + env(safe-area-inset-top, 0px)) 14px 11px; background: var(--teal); color: #fff; font: inherit; font-size: 14px; font-weight: 800; text-align: center; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.update-bar:active { opacity: .9; }
.modal h2 { margin: 0 0 8px; font-size: 20px; }
.modal-hint { margin: 0 0 16px; color: var(--ink-soft); font-size: 14px; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; color: var(--ink-soft); }
.modal-close:hover { background: var(--border); }
.modal #login-email { width: 100%; box-shadow: none; margin-bottom: 12px; }
.btn-primary { width: 100%; padding: 13px; font-size: 16px; font-weight: 800; border-radius: var(--radius); background: var(--teal); color: #fff; transition: background 0.15s ease, transform 0.1s ease; }
.btn-primary:hover { background: var(--teal-deep); } .btn-primary:active { transform: scale(0.98); }
.modal-msg { margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--teal); }

/* ── Költségek nézet ─────────────────────────────── */
.exp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.exp-head .block-title { margin: 0; }
.maincur-pick { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.mini-select { font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--card); border: 2px solid var(--border); border-radius: 10px; padding: 5px 8px; }
.mini-select:focus { outline: none; border-color: var(--teal); }
.fx-rate { margin: 0 0 12px; font-size: 12px; color: var(--ink-soft); }
.fx-warn { margin: 8px 2px 0; font-size: 12.5px; font-weight: 600; color: #b3261e; background: rgba(179,38,30,0.10); padding: 7px 10px; border-radius: 10px; }

.balance-list { display: flex; flex-direction: column; gap: 7px; }
.bal-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.bal-who { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 700; }
.bal-amt { font-size: 13.5px; font-weight: 800; white-space: nowrap; text-align: right; }
.bal-amt.is-plus { color: #1f7d63; } .bal-amt.is-minus { color: #b3261e; } .bal-amt.is-even { color: var(--ink-soft); font-weight: 700; }
@media (prefers-color-scheme: dark) { .bal-amt.is-plus { color: #4cc59e; } .bal-amt.is-minus { color: #ff8a80; } }

.settle-list { margin-top: 16px; }
.settle-head { margin: 0 0 9px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.settle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; border: 1.5px dashed var(--border); border-radius: 12px; margin-bottom: 7px; font-weight: 600; }
.settle-amt { font-weight: 800; white-space: nowrap; color: var(--teal); }
@media (prefers-color-scheme: dark) { .settle-amt { color: #4cc59e; } }
/* Elszámolás „Fizetve" jelölő (F2) */
.settle-block { margin-bottom: 4px; }
.settle-pay-row { flex-wrap: wrap; }
.settle-pay-row .settle-who { flex: 1 1 auto; min-width: 0; }
.settle-paid-btn { flex: 0 0 auto; background: transparent; border: 1.5px solid var(--teal); color: var(--teal); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.15s ease, opacity 0.15s ease; }
.settle-paid-btn:hover:not(:disabled) { background: rgba(31,125,99,.12); }
.settle-paid-btn.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.settle-paid-btn:disabled { cursor: default; opacity: 0.7; }
.settle-remind-btn { flex: 0 0 auto; background: transparent; border: 1.5px solid var(--border); border-radius: 999px; padding: 5px 10px; font-size: 14px; line-height: 1; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.settle-remind-btn:hover:not(:disabled) { border-color: var(--teal); background: rgba(31,125,99,.10); }
.settle-remind-btn:disabled { opacity: 0.5; cursor: default; }
.settle-pay-row.is-paid { border-style: solid; border-color: var(--teal); opacity: 0.85; }
.settle-pay-row.is-paid .settle-who { text-decoration: line-through; text-decoration-color: var(--ink-soft); }

/* Pénzfeldobás */
.coin-stage { display: flex; align-items: center; justify-content: center; height: 150px; perspective: 800px; margin: 6px 0 12px; }
.coin { position: relative; width: 116px; height: 116px; transform-style: preserve-3d; transition: transform 1.15s cubic-bezier(.18,.7,.2,1); will-change: transform; }
.coin-face { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; backface-visibility: hidden; box-shadow: inset 0 0 0 5px rgba(255,255,255,.35), inset 0 -8px 14px rgba(0,0,0,.25), 0 8px 18px rgba(0,0,0,.3); }
.coin-heads { background: radial-gradient(circle at 35% 30%, #ffe6a1, #f0bc00 55%, #b8860b); color: #5a3d00; }
.coin-tails { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #ffd0e0, #e879a6 55%, #b03b6b); color: #5a0030; }
.coin-result { text-align: center; font-size: 18px; font-weight: 800; min-height: 24px; margin: 0 0 12px; }
#coin-flip { width: 100%; }
@media (prefers-reduced-motion: reduce) { .coin { transition: transform .25s linear; } }

/* Palackpörgető */
.wheel-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 10px; }
.wheel-count-label { font-size: 14px; font-weight: 700; }
.wheel-stepper { display: flex; align-items: center; gap: 10px; }
.wheel-stepper button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--teal); background: transparent; color: var(--teal); font-size: 22px; font-weight: 800; line-height: 1; cursor: pointer; transition: background 0.15s ease; }
.wheel-stepper button:hover { background: rgba(31,125,99,.12); }
.wheel-stepper #wheel-count { min-width: 28px; text-align: center; font-size: 20px; font-weight: 800; }
.wheel-stage { position: relative; width: 220px; height: 220px; margin: 10px auto 14px; }
.wheel-circle { width: 100%; height: 100%; border-radius: 50%; position: relative; transform: rotate(0deg); transition: transform 1.4s cubic-bezier(.17,.67,.16,1); will-change: transform; box-shadow: inset 0 0 0 6px rgba(255,255,255,.25), 0 8px 20px rgba(0,0,0,.3); }
.wheel-num { position: absolute; left: 50%; top: 50%; color: #fff; font-size: 17px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; }
.wheel-pointer { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 22px solid #1a1a1a; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); z-index: 2; }
@media (prefers-color-scheme: dark) { .wheel-pointer { border-top-color: #f2f2f2; } }
#wheel-spin { width: 100%; }
@media (prefers-reduced-motion: reduce) { .wheel-circle { transition: transform .25s linear; } }

/* Helymegosztás */
.loc-list { display: flex; flex-direction: column; gap: 16px; }
.loc-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--card); }
.loc-card-title { display: block; font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.loc-share-btn { width: 100%; margin-bottom: 10px; }
.loc-rows { display: flex; flex-direction: column; gap: 8px; }
.loc-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.loc-row:first-child { border-top: none; }
.loc-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.loc-name { font-weight: 700; font-size: 14px; }
.loc-coords { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.loc-maps { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--teal); text-decoration: none; }
.loc-maps:hover { text-decoration: underline; }
.loc-fresh { font-size: 12px; color: var(--muted); }

/* Profilkép */
.pf-avatar-block { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 4px 0 18px; }
.pf-avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--line); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 38px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.pf-avatar.has-avatar .pf-avatar-ph { display: none; }
.pf-avatar-actions { display: flex; align-items: center; gap: 10px; }
.packer.has-avatar { background-color: transparent !important; color: transparent; }
.mc-avatar-wrap { display: flex; justify-content: center; margin: 2px 0 14px; }
.mc-avatar { width: 96px; height: 96px; font-size: 40px; }
.mc-sec { margin: 14px 0 4px; }
.mc-sec-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
.mc-sec-body { display: flex; flex-direction: column; gap: 4px; }
.mc-line { font-size: 14px; }
.mc-line-btn { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; font: inherit; font-size: 14px; color: inherit; cursor: pointer; transition: background 0.15s ease; }
.mc-line-btn:hover { background: rgba(31,125,99,.10); }
.mc-line-btn::after { content: '›'; float: right; color: var(--muted); font-weight: 700; }

/* Közös projekt-kártya a kapcsolat-kártyán */
.mc-proj { border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; background: var(--card); display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.mc-proj-head { display: flex; align-items: center; gap: 8px; }
.mc-proj-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.mc-proj-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-proj-acts .mc-line-btn { width: auto; flex: 1 1 auto; min-width: 120px; padding: 7px 10px; font-size: 13px; }
.mc-proj-mem { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-mem-stack { display: flex; }
.mc-mem-stack .mc-mem-badge { margin-left: -6px; border: 2px solid var(--card); width: 24px; height: 24px; }
.mc-mem-stack .mc-mem-badge:first-child { margin-left: 0; }
.mc-mem-badge.has-avatar { background-size: cover; background-position: center; }
.mc-mem-names { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 0; }
.mc-proj-bal { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-bal-chip { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--line); color: var(--ink-soft); }
.mc-bal-chip.is-plus { background: rgba(31,125,99,.14); color: #1f7d63; }
.mc-bal-chip.is-minus { background: rgba(179,38,30,.12); color: #b3261e; }
.mc-bal-chip.is-even { background: var(--line); color: var(--muted); }
.mc-bal-meta { font-size: 12px; color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .mc-bal-chip.is-plus { background: rgba(76,197,158,.16); color: #4cc59e; }
  .mc-bal-chip.is-minus { background: rgba(255,138,128,.16); color: #ff8a80; }
}

/* Ötletláda / visszajelzés */
.fb-type { display: flex; gap: 8px; margin: 4px 0 10px; }
.fb-type-btn { flex: 1; padding: 10px; border-radius: var(--radius); border: 1.5px solid var(--line); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.fb-type-btn.is-active { border-color: var(--teal); background: rgba(31,125,99,.12); }
#view-feedback .add-input { width: 100%; box-shadow: none; }
#view-feedback textarea.add-input { resize: vertical; }
#fb-send { width: 100%; margin-top: 10px; }
.fb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.fb-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--card); }
.fb-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.fb-item-msg { font-size: 14px; white-space: pre-wrap; }
.fb-status { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.fb-status-done { background: rgba(31,125,99,.18); color: var(--teal); }

/* Archivált utak */
.arch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.arch-restore { background: transparent; border: 1.5px solid var(--teal); color: var(--teal); border-radius: var(--radius); padding: 6px 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.15s ease; }
.arch-restore:hover { background: rgba(31,125,99,.12); }
.arch-card.is-clickable { cursor: pointer; transition: transform 0.12s ease, border-color 0.15s ease; }
.arch-card.is-clickable:hover { border-color: var(--teal); transform: translateY(-1px); }
.arch-body .trip { border: none; box-shadow: none; background: transparent; padding: 2px 0; cursor: inherit; }
.arch-body .trip:hover { transform: none; border-color: transparent; }
.arch-older { color: var(--teal); font-weight: 700; }

/* Utazás-archívum */
.btn-archive { width: 100%; margin-top: 12px; padding: 11px; font-size: 14px; font-weight: 800; border-radius: var(--radius); background: transparent; color: var(--teal); border: 1.5px solid var(--teal); transition: background 0.15s ease; }
.btn-archive:hover { background: rgba(31,125,99,0.08); }
.exp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.exp-actions .btn-archive { flex: 1 1 140px; margin-top: 0; }
.trips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.trip { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: transform 0.12s ease, border-color 0.15s ease; }
.trip:hover { border-color: var(--teal); transform: translateY(-1px); }
.trip-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trip-name { font-weight: 800; font-size: 15px; }
.trip-sub { font-size: 12px; color: var(--ink-soft); }
.trip-amt { font-weight: 800; color: var(--teal); white-space: nowrap; }
.expense-ro { cursor: default; }
#trip-body .exp-total { margin-top: 4px; }
#trip-body .settle-head { margin-top: 14px; }

.exp-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 11px 14px; background: rgba(31,125,99,0.08); border: 1.5px solid var(--teal); border-radius: var(--radius); font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.exp-total strong { font-size: 18px; font-weight: 800; color: var(--teal); }
.btn-wide { width: 100%; padding: 12px; margin-bottom: 14px; font-size: 15px; font-weight: 800; border-radius: var(--radius); background: var(--card); color: var(--teal); border: 2px dashed var(--teal); transition: background 0.15s ease, transform 0.1s ease; }
.btn-wide:hover { background: rgba(31,125,99,0.08); } .btn-wide:active { transform: scale(0.99); }

.expenses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.expense { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: transform 0.12s ease, border-color 0.15s ease; }
.expense:hover { border-color: var(--teal); } .expense:active { transform: scale(0.99); }
.expense .packer { width: 30px; height: 30px; font-size: 13px; }
.expense-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.expense-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.expense-desc { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-amt { font-weight: 800; white-space: nowrap; }
.expense-sub { font-size: 12px; color: var(--ink-soft); }

/* Kiadás modál mezők */
#expense-form .add-input { width: 100%; box-shadow: none; }
#expense-form > .add-input { margin-bottom: 12px; }
.exp-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }

/* ── Egyenlőtlen megosztás ─────────────────────────────────────── */
.exp-split { margin-bottom: 12px; }
.split-toggle { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.split-toggle input { width: 16px; height: 16px; accent-color: var(--teal); }
.split-body { margin-top: 12px; }
.seg { display: flex; gap: 4px; padding: 3px; background: var(--border); border-radius: 999px; }
.seg-btn { flex: 1; padding: 7px 6px; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); border-radius: 999px; background: transparent; transition: background 0.15s ease, color 0.15s ease; }
.seg-btn.is-on { background: var(--card); color: var(--teal); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.split-rows { list-style: none; margin: 12px 0 0; padding: 0; }
.split-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 7px 0; }
.split-row .split-chk { width: 16px; height: 16px; accent-color: var(--teal); flex: none; }
.split-row .packer { flex: none; }
.split-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.split-name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Teljes szélességű második sor; 54px = checkbox 16 + gap 8 + avatar 22 + gap 8 → a név alá igazítva. */
.split-prev { flex: 1 1 100%; min-width: 0; padding-left: 54px; font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-prev:empty { display: none; }
.split-in { flex: none; display: flex; align-items: center; gap: 5px; }
.split-in .split-val { width: 92px; padding: 9px 10px; text-align: right; box-shadow: none; }
.split-unit { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); width: 20px; }
.split-row.is-off { opacity: 0.5; }
.split-row.is-off .split-val { background: var(--border); }
.split-status { margin: 10px 0 0; font-size: 13px; font-weight: 700; min-height: 18px; color: var(--ink-soft); }
.split-status.is-ok { color: var(--teal); }
.split-status.is-warn { color: #b3261e; }
.split-reset { margin-top: 8px; padding: 4px 0; font-size: 12.5px; font-weight: 700; color: var(--teal); background: transparent; }

.btn-del { width: 100%; margin-top: 10px; padding: 11px; font-size: 14px; font-weight: 700; border-radius: var(--radius); background: transparent; color: #b3261e; border: 1.5px solid rgba(179,38,30,0.4); }
.btn-del:hover { background: rgba(179,38,30,0.08); }

/* ── Lábléc ──────────────────────────────────────── */
.foot { width: min(100%, 680px); margin: 6px auto 0; padding: 16px 16px max(20px, env(safe-area-inset-bottom)); text-align: center; font-size: 11.5px; color: var(--ink-soft); }
.credit { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--ink-soft); opacity: .7; transition: opacity .15s ease; }
.credit:hover { opacity: 1; }
.credit-logo { display: block; flex: none; }
.credit-name { font-weight: 700; letter-spacing: .01em; }

@media (max-width: 380px) { .note { width: 74px; } .login-btn { padding: 8px 11px; } }
@media (prefers-reduced-motion: reduce) { .item, .check, .check-mark, .progress-bar, .lcard { animation: none; transition: none; } }

/* ── Hívj meg egy kávéra (donation) ───────────────────────────── */
.donate { text-align: center; }
.donate-title { font-size: 22px; margin: 6px 0 8px; }
.donate-lead { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.donate-body { font-size: 15px; color: var(--ink-soft); line-height: 1.5; max-width: 30em; margin: 0 auto 18px; }
.donate-btn { display: inline-flex; align-items: center; gap: 8px; width: auto; padding: 13px 22px; font-size: 16px; text-decoration: none; }
.donate-note { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }

/* gőzölgő kávéscsésze — tisztán CSS */
.coffee { position: relative; width: 150px; height: 150px; margin: 14px auto 22px; }
.coffee .cup { position: absolute; left: 18px; bottom: 22px; width: 96px; height: 78px;
  background: linear-gradient(#ffffff, #efe7da); border: 3px solid var(--teal-deep);
  border-radius: 10px 10px 30px 30px; box-shadow: var(--shadow); }
.coffee .cup-coffee { position: absolute; top: 8px; left: 8px; right: 8px; height: 16px;
  background: radial-gradient(ellipse at 50% 40%, #6f4326, #3c2414); border-radius: 50%; }
.coffee .cup-handle { position: absolute; right: -22px; top: 16px; width: 26px; height: 34px;
  border: 7px solid var(--teal-deep); border-left: none; border-radius: 0 16px 16px 0; }
.coffee .saucer { position: absolute; left: 6px; bottom: 12px; width: 120px; height: 16px;
  background: linear-gradient(#ffffff, #e6ddcf); border: 3px solid var(--teal-deep); border-radius: 50%; box-shadow: var(--shadow); }
.coffee .steam { position: absolute; bottom: 96px; width: 7px; height: 34px; border-radius: 8px;
  background: linear-gradient(to top, rgba(150,150,150,0), rgba(180,180,180,.55));
  filter: blur(2px); opacity: 0; transform-origin: bottom center; animation: steam 3s ease-in-out infinite; }
.coffee .steam1 { left: 46px; animation-delay: 0s; }
.coffee .steam2 { left: 64px; animation-delay: .6s; height: 42px; }
.coffee .steam3 { left: 82px; animation-delay: 1.2s; }
@media (prefers-color-scheme: dark) {
  .coffee .cup, .coffee .saucer { background: linear-gradient(#eadfce, #cdbfa6); }
  .coffee .steam { background: linear-gradient(to top, rgba(200,220,210,0), rgba(220,235,228,.5)); }
}
@keyframes steam {
  0% { opacity: 0; transform: translateY(6px) scaleY(.7); }
  35% { opacity: .8; }
  70% { opacity: .3; }
  100% { opacity: 0; transform: translateY(-22px) scaleY(1.2) translateX(4px); }
}
@media (prefers-reduced-motion: reduce) { .coffee .steam { animation: none; opacity: .4; } }

/* a kávé-menüpont apró melegség */
.drawer-item-coffee { color: var(--ink); }

/* ── Adatkezelési hozzájárulás (belépés modál) ─────────────────────── */
.consent-row { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 14px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); cursor: pointer; }
.consent-row input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--teal); }
.link-inline { display: inline; padding: 0; font: inherit; font-weight: 700; color: var(--teal); text-decoration: underline; background: none; border: none; cursor: pointer; }
.link-inline:hover { opacity: 0.8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Drawer: diszkrét jogi link ────────────────────────────────────── */
.drawer-legal { display: block; width: 100%; margin: 2px 0 0; padding: 6px 4px; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft); text-decoration: underline; background: none; border: none; cursor: pointer; }
.drawer-legal:hover { color: var(--ink); }

/* ── Jogi / tájékoztató aloldal ────────────────────────────────────── */
.legal-body { color: var(--ink); font-size: 14px; line-height: 1.6; }
.legal-body h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 800; color: var(--ink); }
.legal-body p, .legal-body ul { margin: 0 0 10px; }
.legal-body ul { padding-left: 20px; }
.legal-body li { margin-bottom: 5px; }
.legal-body a { color: var(--teal); font-weight: 700; }
.legal-upd { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
/* Kétnyelvű váltás: az <html lang> alapján (I18N.apply állítja) */
.privacy-en { display: none; }
html[lang="en"] .privacy-hu { display: none; }
html[lang="en"] .privacy-en { display: block; }

/* ── Meghívás-kártya (nyitóképernyő — elfogadás előtt) ─────────────── */
.invite-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; margin-bottom: 10px; border-radius: var(--radius); background: var(--card); border: 2px solid var(--teal); box-shadow: var(--shadow); }
.invite-text { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.invite-actions { display: flex; gap: 9px; }
.invite-accept, .invite-decline { flex: 1 1 0; padding: 9px 12px; font-size: 13px; font-weight: 800; border-radius: 999px; transition: transform 0.1s ease, opacity 0.15s ease; }
.invite-accept { background: var(--teal); color: #fff; }
.invite-decline { background: var(--card); color: var(--ink-soft); border: 1.5px solid var(--border); }
.invite-accept:active, .invite-decline:active { transform: scale(0.96); }
.invite-accept:disabled, .invite-decline:disabled { opacity: 0.5; }

/* ── Vonalas maszk-ikonok (currentColor → téma-adaptív, fehér a fejlécen) ── */
.ico{display:inline-block;width:1.2em;height:1.2em;flex:none;background:currentColor;
 -webkit-mask:var(--u) center/contain no-repeat;mask:var(--u) center/contain no-repeat;
 vertical-align:-0.22em}
.ico-lg{width:1.5em;height:1.5em;vertical-align:-0.3em}
.icon-btn{color:#fff}
.lcard-type .ico{width:1em;height:1em;vertical-align:-0.12em;margin-right:3px}

/* ── TORPEDÓ (rejtett játék) ───────────────────────────────────────
   Színek: a víz és a hajó saját tokent kap, hogy sötét módban is
   olvasható maradjon a tábla. A hajó SOSEM látszik az ellenfél tábláján —
   azt a szerver (RLS) zárja ki, itt csak a saját vizünkön rajzoljuk. */
:root {
  --sea: #cfeae6;          /* víz */
  --sea-line: #b3dbd5;     /* rács */
  --ship: #46606f;         /* saját hajó */
  --hit: #d4622f;          /* találat */
  --sunk: #9d2f26;         /* elsüllyedt */
  --miss: #7fa8a2;         /* mellé */
}
@media (prefers-color-scheme: dark) {
  :root {
    --sea: #123039;
    --sea-line: #1b414c;
    --ship: #7fa3b5;
    --hit: #e8763c;
    --sunk: #c4453a;
    --miss: #4d7079;
  }
}

.game-cta { width: 100%; margin: 4px 0 6px; }
.game-sub { margin: 22px 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.game-empty { margin: 0; font-size: 14px; color: var(--ink-soft); }

.game-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.game-contact { padding: 9px 14px; font-size: 14px; font-weight: 700; color: var(--teal-deep); background: rgba(47,163,107,0.12); border: 1.5px solid rgba(47,163,107,0.3); border-radius: 999px; }
.game-contact:disabled { opacity: 0.5; }

.game-rows { display: flex; flex-direction: column; gap: 8px; }
.game-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 13px 15px; text-align: left; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.game-row.is-turn { border-color: var(--teal); box-shadow: inset 3px 0 0 var(--teal), var(--shadow); }
.game-row-opp { font-size: 15px; font-weight: 800; color: var(--ink); }
.game-row-st { flex: none; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.game-row.is-turn .game-row-st { color: var(--teal); }

/* Meccs-fejléc */
.game-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.game-status { font-size: 14px; font-weight: 800; color: var(--ink-soft); text-align: right; }
.game-status.is-turn { color: var(--teal); }
.game-status.is-won { color: var(--teal); }
.game-status.is-lost { color: #b3261e; }

.game-hint { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.game-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.game-tools .vbtn, .game-tools .btn-primary { flex: 1 1 auto; min-width: 84px; }

.game-board-title { margin: 18px 0 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }

/* A tábla: N×N négyzetrács, mindig négyzet alakú */
.game-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n, 10), 1fr);
  gap: 2px;
  padding: 4px;
  aspect-ratio: 1 / 1;
  background: var(--sea-line);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.gcell {
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--sea);
  transition: background 0.14s ease, transform 0.1s ease;
}
.gcell:disabled { cursor: default; }

/* Saját hajó */
.gcell.is-ship { background: var(--ship); }
/* Mellé — halvány pötty */
.gcell.is-miss { background: var(--sea); box-shadow: inset 0 0 0 2px var(--miss); opacity: 0.75; }
/* Találat / elsüllyedt */
.gcell.is-hit { background: var(--hit); }
.gcell.is-sunk { background: var(--sunk); }
/* Csak a FRISS becsapódás robban — a régiek nem animálnak újra minden rendernél */
.gcell.is-new { animation: gboom 0.34s ease-out; }
@keyframes gboom {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.gcell.is-firing { animation: gping 0.5s ease-out infinite; }
@keyframes gping {
  0%, 100% { box-shadow: inset 0 0 0 0 var(--teal); }
  50% { box-shadow: inset 0 0 0 3px var(--teal); }
}

/* Az ellenfél táblája élesítve: a rács halkan világít + szonár-pásztázás */
.game-board.is-enemy .gcell:not(:disabled) { cursor: crosshair; }
.game-board.is-armed { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,163,107,0.2); }
.game-board.is-armed::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: conic-gradient(from 0deg, rgba(47,163,107,0.20), rgba(47,163,107,0) 32%);
  animation: gsweep 4s linear infinite;
}
@keyframes gsweep { to { transform: rotate(360deg); } }
/* „Kevesebb mozgás" beállításnál nincs pásztázás, csak a keret jelzi a kört */
@media (prefers-reduced-motion: reduce) {
  .game-board.is-armed::after { animation: none; background: none; }
  .gcell.is-new, .gcell.is-firing { animation: none; }
}

.game-foot { display: flex; gap: 8px; margin-top: 20px; }
.game-foot .vbtn, .game-foot .btn-primary { flex: 1; }
.game-danger { color: #b3261e; }

/* A rejtett menüpont ikonja emoji — a többi ikon SVG, ezt igazítjuk hozzájuk */
.di-ico-game { display: inline-grid; place-items: center; width: 26px; height: 26px; font-size: 15px; border-radius: 50%; background: rgba(47,163,107,0.12); box-shadow: 0 0 0 1.5px rgba(47,163,107,0.42); }

/* A hang-gomb hosszú nyomása közben — vizuális visszajelzés, hogy „történik valami" */
#sound-btn.is-pressing { transform: scale(0.88); transition: transform 0.7s ease; }

/* ── Torpedó v2: flotta-sáv a lerakó képernyőn ─────────────────────
   Minden hajó alakzata látszik; a lerakottak halványan, az épp következő
   zöld kerettel, az aktuális forgatási állapotában. */
.gfleet { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 14px; }
.gship { display: grid; grid-template-columns: repeat(var(--w), 13px); grid-template-rows: repeat(var(--h), 13px); gap: 2px; padding: 6px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card); opacity: 0.85; }
.gship-c { background: var(--ship); border-radius: 2.5px; }
.gship.is-current { border-color: var(--teal); box-shadow: 0 0 0 2.5px rgba(47,163,107,0.25); opacity: 1; }
.gship.is-done { opacity: 0.35; }
.gship.is-done .gship-c { background: var(--miss); }

/* ── Térképem (privát felfedezés-térkép) ───────────────────────────
   A meglátogatott terület brand-zöld, a többi kártya-fehér/sötét — a határ
   a token-border. Sötét/világos automatikus a meglévő változókból. */
.tm-tabs { max-width: 340px; margin: 4px 0 0; }
.tm-count { margin: 14px 0 8px; font-size: 14px; font-weight: 800; color: var(--teal); }
.tm-map { border-radius: var(--radius); overflow: hidden; }
.tm-svg { display: block; width: 100%; height: auto; }
.tm-area { fill: var(--card); stroke: var(--border); stroke-width: 1.4; cursor: pointer; transition: fill 0.25s ease; }
.tm-area:hover { fill: var(--card-todo); }
.tm-area.is-visited { fill: var(--teal); stroke: rgba(255,255,255,0.5); }
.tm-area.is-visited:hover { fill: var(--teal-deep); }
.tm-info { margin: 10px 0 0; min-height: 18px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.tm-locate { width: 100%; margin-top: 14px; }
.tm-attrib { margin: 10px 0 0; font-size: 11px; color: var(--ink-soft); opacity: 0.75; }

/* ── Lista-import modál ────────────────────────────────────────────
   A meglévő .modal alapokra épül; a textarea és a gombsor a sajátja. */
.import-text { width: 100%; box-shadow: none; resize: vertical; font-size: 14px; line-height: 1.5; }
.import-name { width: 100%; box-shadow: none; margin-bottom: 10px; }
.import-actions { display: flex; gap: 8px; margin-top: 12px; }
.import-actions .vbtn, .import-actions .btn-primary { flex: 1; }
.import-file-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.import-count { margin: 8px 0 0; font-size: 13px; font-weight: 800; color: var(--teal); }
.modal-msg.is-err { color: #b3261e; }

/* ── Vegyes mód: privát tételek a közös listán (v89) ──────────────
   Tartalom-zóna tokenek (--border/--ink-soft) → mindkét témán jó. */
.block-private { margin-top: 26px; padding-top: 16px; border-top: 1.5px dashed var(--border); }
.private-hint { margin: -6px 2px 12px; font-size: 13px; color: var(--ink-soft); }
.addtarget-btns { display: grid; gap: 10px; margin-top: 14px; }
.addtarget-btn { font-size: 15px; padding: 12px 10px; }
.lcard-pair { font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--border); border-radius: 999px; padding: 1px 8px; margin-left: 8px; }

/* ── Üzenetek / 1:1 chat (v90) ────────────────────────────────────
   Tartalom-zóna tokenek; saját buborék --teal + fehér. Mindkét téma. */
.chat-nudge { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0 14px; font-size: 13.5px; color: var(--ink-soft); }
.chat-nudge .arch-restore { align-self: flex-start; }
/* v147: meghívó-sáv az Üzenetek tetején. Szándékosan a .chat-row rokona (ugyanaz a
   magasság, ikon-hely és tipográfia), de szaggatott kerettel — így egy sorba tartozik
   a beszélgetésekkel, mégis látszik, hogy nem beszélgetés, hanem művelet. */
.chat-invite {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: var(--card); border: 1.5px dashed var(--teal); border-radius: var(--radius);
  padding: 10px 12px; margin: 0 0 10px; cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.chat-invite:hover { background: var(--card-todo); }
.chat-invite:active { transform: scale(0.99); }
.chat-invite-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(47,163,107,0.42); }
.chat-invite-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-invite-txt strong { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.chat-invite-txt span { font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); }
.chat-invite-go { flex: none; display: grid; place-items: center; color: var(--teal); }
/* v159: megosztás-sáv. Csak akkor látszik, ha a telefon megosztás-paneljéről
   érkezett tartalom vár címzettre — ezért folyamatos teal keret és bal oldali
   csík: aktív állapotot jelez, nem egy újabb választható műveletet. A színek
   mind token-alapúak, így a sötét téma külön szabály nélkül is helyes. */
.chat-sharebar {
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border: 1.5px solid var(--teal);
  border-left-width: 5px; border-radius: var(--radius);
  padding: 10px 12px; margin: 0 0 10px;
}
.chat-sharebar-thumb {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  object-fit: cover; background: var(--card-todo);
}
.chat-sharebar-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-sharebar-mid strong { font-size: 14px; font-weight: 700; color: var(--ink); }
/* A megosztott szöveg tetszőleges hosszú lehet (egy egész cikk is) — két sor
   után elvágjuk, különben a sáv kitolná a beszélgetés-listát a képernyőről. */
.chat-sharebar-txt {
  font-size: 12.5px; line-height: 1.35; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.chat-sharebar-x {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  padding: 0; border: 0; border-radius: 50%; background: none;
  color: var(--ink-soft); cursor: pointer;
}
.chat-sharebar-x:hover { background: var(--card-todo); color: var(--ink); }
/* A modálban a QR-blokknak nem kell saját keret és háttér — az már doboz a dobozban.
   A kód is kisebb: így a három gomb görgetés nélkül a képernyőn marad telefonon. */
#chat-invite-modal .qr-block { margin: 0; padding: 0; border: 0; background: none; }
#chat-invite-modal .qr-card .qr-img { width: 168px; height: 168px; }
#chat-invite-modal .qr-actions { flex-wrap: wrap; }

#chat-inbox-list { display: flex; flex-direction: column; gap: 8px; }
.chat-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.chat-row:hover { border-color: var(--teal); }
.chat-row-ava { position: relative; flex: none; }
/* Olvasatlan-jelzés: piros pötty az avatar sarkán — az app meglévő
   figyelem-felkeltő színe (ld. .menu-dot), hogy azonnal kitűnjön a listában. */
.chat-row-dot { position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; border-radius: 999px; background: #ff5a4d; border: 2px solid var(--card); }
.chat-row-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-row-name { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.chat-row-prev { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.is-unread .chat-row-prev { color: var(--ink); font-weight: 700; }
.chat-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-row-time { font-size: 11px; color: var(--ink-soft); }
.chat-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ── Beszélgetés (thread) — teljes-képernyős, dedikált chat-héj ────────
   Rögzített fejléc + EGYETLEN görgethető üzenetterület + rögzített beviteli
   sáv. A héj PONTOSAN a vizuális viewportot fedi (--vv-top = offsetTop,
   --vv-h = height, a JS állítja a visualViewport-ból; fallback 100dvh). A
   billentyűzet felnyílása így csak összenyomja a görgethető részt — az utolsó
   üzenet + a sáv mindig látszik, minden virtuális billentyűzetes eszközön. */
body.chat-open .topbar { display: none; }
body.chat-open { overflow: hidden; }

#chat-thread {
  position: fixed; top: var(--vv-top, 0px); left: 0; right: 0;
  height: 100dvh; height: var(--vv-h, 100dvh);
  display: flex; flex-direction: column; background: var(--bg);
  z-index: 60; overflow: hidden;
}

/* Fejléc — FIX zöld+fehér (nem témaváltós), a Go7 fejléc-zóna mintájára.
   A sáv teljes oldalszélességű (desktopon ne szakadjon meg 680px-nél), a
   tartalma (.cthread-top-inner) a .topbar/.topbar-inner mintát követve
   680px-re korlátozott, középre igazított — ld. docs/DEEPLINKS.md-hez
   hasonlóan a chat asztali nézet-javítása (v115). */
.cthread-top {
  flex: none; background: var(--teal); color: #fff;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  box-shadow: 0 3px 14px rgba(15, 89, 70, 0.28);
}
.cthread-top-inner {
  width: min(100%, 680px); margin: 0 auto;
  display: flex; align-items: center; gap: 11px;
}
/* v167 — kiút a szálból: a partner neve után, jobbra igazítva. A globális fejléc
   a szálban rejtve marad (teljes képernyős élmény), ezért kell ide a két gomb. */
.cthread-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.cthread-tool { width: 34px; height: 34px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.cthread-tool:hover { background: rgba(255,255,255,0.16); }
.cthread-tool img { width: 21px; height: 21px; display: block; }
/* A maszkolást a .ico alaposztály végzi — itt csak a méret kell. */
.cthread-tool .ico { width: 21px; height: 21px; vertical-align: 0; }
/* A partner neve ne tolja ki a gombokat egy hosszú névnél. */
.cthread-peer-btn { min-width: 0; }
.cthread-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cthread-back { flex: none; width: 38px; height: 38px; margin-left: -6px; display: grid; place-items: center; border-radius: 999px; color: #fff; }
.cthread-back:active { background: rgba(255,255,255,0.16); }
/* A név+avatar gombja a profilhoz — az elrendezés változatlan, csak kattintható */
.cthread-peer-btn { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; text-align: left; border-radius: 10px; padding: 4px 6px; margin: -4px -6px; }
.cthread-peer-btn:active { background: rgba(255,255,255,0.14); }
.cthread-ava { flex: none; }
.cthread-ava .mc-mem-badge { width: 34px; height: 34px; font-size: 14px; border: 1.5px solid rgba(255,255,255,0.5); }
.cthread-name { margin: 0; font-size: 16.5px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Görgethető terület — az EGYETLEN scroll a beszélgetésben */
.chat-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 12px 12px 6px;
}
.chat-older { display: block; width: min(100%, 680px); margin: 2px auto 14px; }

.chat-msgs { width: min(100%, 680px); margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }

/* Nap-elválasztó chip */
.chat-day { align-self: center; margin: 6px 0 2px; }
.chat-day span {
  background: var(--card); border: 1px solid var(--border); color: var(--ink-soft);
  font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
}

/* Üzenet-sor: partnernél avatar-hely balra, sajátnál jobbra igazítva */
.cmsg-line { display: flex; align-items: flex-end; gap: 8px; }
.cmsg-line.is-mine { justify-content: flex-end; }
.cmsg-ava { flex: none; width: 28px; align-self: flex-end; }
.cmsg-ava .mc-mem-badge { width: 28px; height: 28px; font-size: 12px; }
.cmsg-line.grp-tight { margin-top: -7px; }        /* csoporton belüli szoros térköz */

.chat-msg {
  max-width: 78%; background: var(--card); border: 1.5px solid var(--border);
  border-radius: 18px; padding: 8px 12px; display: flex; flex-direction: column; gap: 3px;
}
.chat-msg.is-mine { background: var(--teal); border-color: var(--teal); }
/* „farok" csak a csoport utolsó buborékánál — letisztult, modern */
.cmsg-line.grp-last:not(.is-mine) .chat-msg { border-bottom-left-radius: 6px; }
.cmsg-line.grp-last.is-mine .chat-msg { border-bottom-right-radius: 6px; }
.chat-msg-body { font-size: 15px; line-height: 1.42; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.chat-msg.is-mine .chat-msg-body { color: #fff; }
/* Kattintható linkek az üzenetekben (v126). A saját (teal hátterű) buborékban FEHÉR,
   a fogadottban a téma-függő --link — sose a háttérrel azonos színű. A hosszú URL
   törhet, hogy ne lógjon ki a buborékból. */
.chat-link { color: var(--link); text-decoration: underline; overflow-wrap: anywhere; }
.chat-msg.is-mine .chat-link { color: #fff; text-decoration-color: rgba(255,255,255,0.7); }
.chat-link:hover { text-decoration-thickness: 2px; }

/* Link-előnézet kártya (v127) — cím + domén, kép nélkül. A saját (teal) buborékban
   áttetsző fehér réteg, a fogadottban halvány szürke; a szöveg mindkettőn kontrasztos. */
.chat-preview {
  display: block; margin-top: 7px; padding: 8px 10px; border-radius: 12px;
  background: rgba(18, 36, 27, 0.05); border: 1px solid var(--border);
  text-decoration: none; transition: background 0.15s ease;
}
.chat-preview:hover { background: rgba(18, 36, 27, 0.09); }
.chat-preview-title {
  display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.chat-preview-site { display: block; margin-top: 3px; font-size: 11.5px; color: var(--ink-soft); }
.chat-msg.is-mine .chat-preview { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.32); }
.chat-msg.is-mine .chat-preview:hover { background: rgba(255,255,255,0.24); }
.chat-msg.is-mine .chat-preview-title { color: #fff; }
.chat-msg.is-mine .chat-preview-site { color: rgba(255,255,255,0.85); }

/* ── Idézetes válasz (v129) ────────────────────────────────────────────── */
/* Idézet a buborékban: behúzott, halvány blokk a szöveg fölött. Kattintható —
   az eredeti üzenethez ugrik. */
.chat-quote {
  display: block; width: 100%; text-align: left; margin: 0 0 6px;
  padding: 5px 9px; border-left: 3px solid currentColor; border-radius: 7px;
  background: rgba(18, 36, 27, 0.06); color: var(--teal-deep); cursor: pointer;
}
.chat-quote:hover { background: rgba(18, 36, 27, 0.11); }
.chat-quote-who { display: block; font-size: 11.5px; font-weight: 800; opacity: 0.95; }
.chat-quote-body {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 12.5px; line-height: 1.35; color: var(--ink-soft);
}
.chat-msg.is-mine .chat-quote { background: rgba(255,255,255,0.18); color: #fff; }
.chat-msg.is-mine .chat-quote:hover { background: rgba(255,255,255,0.26); }
.chat-msg.is-mine .chat-quote-body { color: rgba(255,255,255,0.9); }

/* Felvillanás: hosszú nyomásnál és az idézetre ugráskor jelzi, melyik üzenetről van szó */
@keyframes chat-flash { 0% { box-shadow: 0 0 0 0 rgba(47,163,107,0.55); } 100% { box-shadow: 0 0 0 12px rgba(47,163,107,0); } }
.chat-msg.is-flash { animation: chat-flash 0.7s ease-out; }
@media (prefers-reduced-motion: reduce) { .chat-msg.is-flash { animation: none; outline: 2px solid var(--teal); } }

/* Válasz-csík a beviteli mező fölött */
.chat-replybar {
  flex: none; align-self: center; width: calc(min(100%, 680px) - 24px);
  margin: 0 0 -4px; padding: 7px 10px 11px;
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1.5px solid var(--border); border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.chat-replybar-txt { flex: 1; min-width: 0; border-left: 3px solid var(--teal); padding-left: 8px; }
.chat-replybar-who { display: block; font-size: 11.5px; font-weight: 800; color: var(--teal-deep); }
.chat-replybar-body {
  display: block; font-size: 12.5px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-replybar-x {
  flex: none; width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center; font-size: 15px; color: var(--ink-soft);
}
.chat-replybar-x:hover { background: rgba(18,36,27,0.08); color: var(--ink); }
.chat-msg-time { font-size: 10.5px; color: var(--ink-soft); align-self: flex-end; }
.chat-msg.is-mine .chat-msg-time { color: rgba(255,255,255,0.85); }

/* Új üzenet finom belépője */
@keyframes cmsg-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.cmsg-line.is-new { animation: cmsg-in 0.18s ease-out; }
@media (prefers-reduced-motion: reduce) { .cmsg-line.is-new { animation: none; } }

/* ── v151: „Írhatsz nekik" + üres szál bevezetője ──────────────────────
   A jelölt-sor szándékosan a .chat-row rokona (azonos magasság, avatar, tipográfia),
   de szaggatott kerettel: egy sorba tartozik a beszélgetésekkel, mégis látszik,
   hogy még nincs mit olvasni benne. */
.chat-cands { margin-top: 18px; }
.chat-cands-h { margin: 0 0 3px; font-size: 13px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-soft); }
.chat-cands-lead { margin: 0 0 10px; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
#chat-cands-list { display: flex; flex-direction: column; gap: 8px; }
.chat-row.chat-cand { border-style: dashed; border-color: var(--teal); }
.chat-cand-go { flex: none; font-size: 15px; opacity: 0.75; }

/* Üres szál nyitó sora — a nap-elválasztó chip rokona, hogy rendszer-üzenetnek
   olvasódjon, ne valakinek a mondatának. */
.chat-intro { align-self: center; margin: 10px 0 4px; max-width: 90%; }
.chat-intro span {
  display: block; background: var(--card); border: 1px dashed var(--border);
  color: var(--ink-soft); font-size: 12.5px; line-height: 1.4; text-align: center;
  padding: 8px 14px; border-radius: 14px;
}

/* ══ Költségtervező (v149) ═══════════════════════════════════════════════
   Döntési pontok → lehetőségek → a rendszer által generált változatok.
   A változat-lista SOSEM görgetheti vízszintesen az oldalt: a hosszú
   lehetőség-neveket tördeljük, nem táblázatba tesszük. */

/* Összegzés-csipek a terv tetején */
.cp-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cp-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 999px;
  padding: 6px 13px; font-size: 13px;
}
.cp-chip-l { color: var(--ink-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.cp-chip strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.cp-chip.is-best { border-color: var(--teal); background: var(--card-todo); }

/* Egy döntés (csoport) kártyája */
.cp-group {
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 12px 13px; margin: 0 0 11px;
}
.cp-group-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.cp-group-name { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--ink); }
.cp-group-kind {
  flex: 1; font-size: 11.5px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-icon-btn {
  flex: none; width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center; color: var(--ink-soft); font-size: 14px;
}
.cp-icon-btn:hover { background: rgba(18,36,27,0.08); color: var(--ink); }

.cp-opts { display: flex; flex-direction: column; gap: 6px; }
.cp-opt {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  background: var(--card-todo); border: 1px solid var(--border); border-radius: 12px;
  padding: 9px 11px; cursor: pointer;
}
.cp-opt:hover { border-color: var(--teal); }
.cp-opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-opt-txt strong { font-size: 14px; color: var(--ink); }
.cp-opt-note { font-size: 12px; line-height: 1.35; color: var(--ink-soft); }
.cp-opt-amt { flex: none; font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.cp-add-opt {
  align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--teal-deep);
  padding: 6px 4px;
}
.cp-add-opt:hover { text-decoration: underline; }

/* Egy változat */
.cp-combo {
  position: relative; background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; margin: 0 0 9px;
}
.cp-combo.is-best { border-color: var(--teal); }
/* Az elvetett változat nem tűnik el — csak visszahalkul, és a lista végére kerül */
.cp-combo.is-out { opacity: 0.55; }
.cp-combo-head {
  display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; cursor: pointer;
}
.cp-combo-names { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.cp-combo-total { flex: none; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cp-badge {
  display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 999px;
  background: var(--teal); color: #fff; font-size: 11px; font-weight: 800;
}
.cp-combo-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cp-stars { display: flex; gap: 1px; }
.cp-star { font-size: 17px; line-height: 1; color: var(--ink-soft); padding: 2px 1px; }
.cp-star.is-on { color: #e8a33d; }
.cp-drop {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink-soft);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px;
}
.cp-drop:hover { color: var(--ink); border-color: var(--ink-soft); }
.cp-drop.is-on { color: var(--teal-deep); border-color: var(--teal); }

/* Kinyitott tétel-bontás */
.cp-combo-det { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 7px; }
.cp-det-row { display: flex; align-items: flex-start; gap: 10px; }
.cp-det-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-det-l strong { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.cp-det-note { font-size: 12px; line-height: 1.35; color: var(--ink-soft); }
.cp-det-r { flex: none; display: flex; flex-direction: column; align-items: flex-end;
  font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cp-det-conv { font-size: 11.5px; color: var(--ink-soft); }

/* ══ v143: állapotjelek — „hullám és gyűrűk" ═══════════════════════════
   A megszokott pipák helyett vizes képnyelv, a Go7 világához igazítva:
   küldés közben fényhullám fut át a szövegen · kézbesítve = hullámvonal ·
   elolvasva = a hullám gyűrűvé simul (csepp + gyűrű).
   Csak a SAJÁT buborékokon jelenik meg, a csoport utolsó darabján — a partner
   olvasás-bélyege monoton nő, így az egyben a csoport állapota is. */

/* Csak képernyőolvasónak szánt szöveg */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Idő + állapotjel egy sorban, a buborék jobb alján */
.cmsg-meta { display: flex; align-items: center; gap: 5px; align-self: flex-end; }
.cmsg-status { display: inline-flex; align-items: center; line-height: 0; color: rgba(255,255,255,0.9); }
/* A gyűrű kifuthat a 16-os dobozból — de CSAK a read állapotnál. A „kézbesítve"
   hullámnál a vágás KELL: az útvonal szándékosan hosszabb a látható doboznál. */
.cmsg-status[data-state="read"] svg { overflow: visible; }
/* A hullám lassan csordogál — „még úton van, még nem simult el”. Pontosan egy
   hullámhossz (14 egység) az elmozdulás, ezért a ciklus varrat nélkül ismétlődik.
   A kiindulás fél hullámhossz (-7): ez a legteltebb fázis, így animáció nélkül
   (prefers-reduced-motion) is egy szép, kétdombos hullám marad állóképnek. */
@keyframes cs-wave-flow { from { transform: translateX(-7px); } to { transform: translateX(-21px); } }
.cs-wave { transform: translateX(-7px); animation: cs-wave-flow 2.4s linear infinite; }
.cmsg-status[data-state="sending"] { opacity: 0.5; animation: cs-breathe 1.2s ease-in-out infinite; }
@keyframes cs-breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.8; } }

/* A kifutó gyűrű alapból láthatatlan — csak az „elsimulás" pillanatában villan fel */
.cs-ripple { opacity: 0; }
.cmsg-status.is-settle .cs-ripple,
.cmsg-status.is-settle .cs-ring,
.cmsg-status.is-settle .cs-drop { transform-box: fill-box; transform-origin: center; }
.cmsg-status.is-settle .cs-ripple { animation: cs-ripple-out 0.8s ease-out; }
.cmsg-status.is-settle .cs-ring { animation: cs-ring-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.35); }
.cmsg-status.is-settle .cs-drop { animation: cs-drop-in 0.35s ease-out; }
@keyframes cs-ripple-out { 0% { opacity: 0.8; transform: scale(0.4); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes cs-ring-in { 0% { opacity: 0.15; transform: scale(0.3); } 100% { opacity: 1; transform: scale(1); } }
@keyframes cs-drop-in { 0% { transform: scale(0.2); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Küldés alatt: fényhullám fut át a szövegen.
   FONTOS: a technika átlátszóra állítja a betűszínt, és a látható szöveget a
   háttér-átmenet adja (background-clip: text). Ahol ez nem támogatott, a szöveg
   LÁTHATATLAN lenne — ezért @supports-ban van, tartalékként marad a sima szöveg.
   Régi Safari csak a -webkit- előtagot ismeri, ezért az is szerepel a feltételben. */
.chat-msg.is-sending .chat-msg-body { opacity: 0.82; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .chat-msg.is-mine.is-sending .chat-msg-body {
    opacity: 1;
    background-image: linear-gradient(100deg, rgba(255,255,255,0.55) 34%, #ffffff 50%, rgba(255,255,255,0.55) 66%);
    background-size: 260% 100%; background-repeat: no-repeat;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: cs-shimmer 1.4s linear infinite;
  }
  /* A linkeknek saját (fehér) színük van — azok a csillanás alatt is olvashatók. */
  .chat-msg.is-mine.is-sending .chat-link { -webkit-text-fill-color: #fff; color: #fff; }
}
@keyframes cs-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ── „A partner gépel" — fodrozódó víz a partner oldalán ─────────────── */
.chat-typing { width: min(100%, 680px); margin: 10px auto 2px; display: flex; align-items: flex-end; gap: 8px; }
.ctyping-bubble {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 18px 18px 18px 6px; padding: 7px 14px;
  display: flex; align-items: center; color: var(--teal);
}
.ctyping-wave { display: block; width: 40px; height: 18px; }
/* A hullám-útvonalak két teljes hullámhossznyival (20 egység) tolódnak el, ezért a
   ciklus varrat nélkül ismétlődik. Két réteg, eltérő sebességgel = mélység. */
@keyframes ctw-flow { from { transform: translateX(0); } to { transform: translateX(-20px); } }
.ctw-front { animation: ctw-flow 1.6s linear infinite; }
.ctw-back { opacity: 0.42; animation: ctw-flow 2.7s linear infinite; }

@media (prefers-color-scheme: dark) {
  /* Sötét kártyán a #2fa36b tompa — világosabb zöld a hullámnak */
  .ctyping-bubble { color: #6fd7a2; }
}

@media (prefers-reduced-motion: reduce) {
  /* Mozgás nélkül is minden állapot LÁTHATÓ marad, csak nem animált. */
  .cmsg-status[data-state="sending"] { animation: none; opacity: 0.6; }
  .cs-wave { animation: none; }
  .cmsg-status.is-settle .cs-ripple,
  .cmsg-status.is-settle .cs-ring,
  .cmsg-status.is-settle .cs-drop { animation: none; }
  .chat-msg.is-mine.is-sending .chat-msg-body {
    animation: none; background-image: none;
    -webkit-text-fill-color: #fff; color: #fff; opacity: 0.7;
  }
  .ctw-front, .ctw-back { animation: none; }
}

/* „↓ legújabb" ugrás-gomb — csak ha a felhasználó feljebb görgetett */
.chat-jump {
  position: absolute;
  right: calc((100% - min(100%, 680px)) / 2 + 14px);
  bottom: 92px;
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
  background: var(--card); color: var(--teal); border: 1.5px solid var(--border);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18); z-index: 5;
}
.chat-jump:active { transform: scale(0.94); }

/* Beviteli sáv — lekerekített, árnyékolt "sziget" a héj alján, középre
   igazítva, a 680px-es tartalmi oszlophoz igazodva (v115 asztali javítás) */
.chat-form {
  flex: none; align-self: center;
  display: flex; align-items: flex-end; gap: 9px;
  width: calc(min(100%, 680px) - 24px);
  margin: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 9px 12px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.chat-input {
  flex: 1; min-width: 0; resize: none; overflow-y: auto; max-height: 128px;
  padding: 10px 15px; font: inherit; font-size: 15px; line-height: 1.35;
  color: var(--ink); background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 21px; font-family: inherit;
}
.chat-input:focus { outline: none; border-color: var(--teal); }
.chat-input::placeholder { color: var(--ink-soft); opacity: 0.85; }
.chat-send {
  flex: none; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  background: var(--teal); color: #fff; box-shadow: var(--shadow);
  transition: background 0.15s ease, transform 0.1s ease;
}
.chat-send:hover { background: var(--teal-deep); }
.chat-send:active { transform: scale(0.92); }
.chat-send:disabled { opacity: 0.4; cursor: default; }
.chat-send:disabled:active { transform: none; }
/* Rejtett diagnosztika (?kbdebug=1) — egyetlen képből olvasható valós számok */
#kb-debug { position: fixed; top: 0; left: 0; z-index: 9999; background: rgba(12,36,27,0.92); color: #7CFFB2; font: 11px/1.4 ui-monospace, Menlo, monospace; padding: 6px 9px; border-bottom-right-radius: 8px; white-space: pre; pointer-events: none; }

/* fejléc-zóna: piros olvasatlan-pötty a menü-gombon (mindig zöld fejléc) */
.menu-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 999px; background: #ff5a4d; border: 1.5px solid var(--teal); }
.icon-btn { position: relative; }
/* drawer olvasatlan-szám */
.drawer-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.mc-msg-btn { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 12px; }

/* ── UX v91: menü-szekciók + testreszabható gyorsindító ────────────── */
.drawer-section {
  margin: 14px 6px 2px; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-soft); opacity: 0.75;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.drawer-panel > .drawer-section:first-of-type { border-top: none; padding-top: 0; margin-top: 6px; }

/* Gyorsindító fejléc + szerkesztő-ceruza (tartalom-zóna) */
.home-choices-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-edit-btn {
  flex: none; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  color: var(--ink-soft); background: var(--border); transition: background 0.15s ease, transform 0.1s ease;
}
.home-edit-btn:hover { background: var(--teal); color: #fff; }
.home-edit-btn[aria-pressed="true"] { background: var(--teal); color: #fff; }
.home-edit-btn:active { transform: scale(0.92); }
.home-edit-btn .ico { width: 17px; height: 17px; }
.home-edit-hint { margin: -4px 2px 12px; font-size: 13px; color: var(--ink-soft); }

/* Szerkesztő mód: csempe-jelölők */
.choice { position: relative; }
.choice-toggle {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 999px;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
  background: var(--border); color: var(--ink-soft);
}
.choice-toggle.is-on { background: var(--teal); color: #fff; }
.choice.is-off { opacity: 0.5; border-style: dashed; }
.choice-lock { position: absolute; top: 8px; left: 8px; font-size: 13px; }
.choice-order { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 4px; }
.choice-ord-btn {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font-size: 10px; background: var(--border); color: var(--ink-soft);
}
.choice-ord-btn:hover { background: var(--teal); color: #fff; }
.home-editing .choice { cursor: pointer; }
.home-editing .choice:hover { transform: none; border-color: var(--teal); }

/* ── UX v92: húzható csempe-átrendezés ────────────────────────────── */
/* v170 JAVÍTÁS: itt korábban `.home-editing .choice { touch-action: none }` állt,
   ami MINDEN csempére kiterjedt — és mivel a csempék kitöltik a képernyőt,
   szerkesztés közben sehol nem maradt görgethető felület. A húzás viszont
   kizárólag a fogantyúról indul (onDragDown: `e.target.closest('.choice-drag')`),
   ezért a csempén nincs mit védeni. A `touch-action: none` a fogantyún marad,
   és a húzás alatt a pointer-capture + preventDefault fogja a görgetést. */
.choice-drag {
  position: absolute; bottom: 8px; left: 8px; width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center; font-size: 15px; line-height: 1; cursor: grab;
  background: var(--border); color: var(--ink-soft); touch-action: none;
}
.choice-drag:active { cursor: grabbing; }
.choice.is-dragging {
  position: relative; z-index: 30; opacity: 0.92;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28); border-color: var(--teal);
}
.choice.placeholder {
  border: 2px dashed var(--teal); background: transparent; box-shadow: none;
  min-height: 124px;
}

/* ── UX v93: buborékos súgó (coachmark) ────────────────────────────── */
.home-head-btns { display: inline-flex; align-items: center; gap: 6px; }
.home-help-btn {
  flex: none; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  font-size: 16px; font-weight: 800; color: var(--ink-soft); background: var(--border);
  transition: background 0.15s ease, transform 0.1s ease;
}
.home-help-btn:hover { background: var(--teal); color: #fff; }
.home-help-btn:active { transform: scale(0.92); }

.hint-bubble {
  position: fixed; z-index: 200; max-width: min(300px, 88vw);
  background: var(--card); color: var(--ink); border: 1.5px solid var(--border);
  border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,0.24);
  padding: 13px 34px 13px 15px;
}
.hint-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.hint-close {
  position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; border-radius: 999px;
  display: grid; place-items: center; font-size: 13px; color: var(--ink-soft);
}
.hint-close:hover { background: var(--border); }
/* nyíl (alul mutat, ha a buborék az anchor ALATT van → felfelé mutat) */
.hint-arrow { position: absolute; top: -8px; width: 14px; height: 14px; background: var(--card);
  border-left: 1.5px solid var(--border); border-top: 1.5px solid var(--border);
  transform: translateX(-50%) rotate(45deg); }
.hint-bubble.is-above .hint-arrow { top: auto; bottom: -8px;
  border-left: none; border-top: none;
  border-right: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border); }

/* ── UX v94: listák összeolvasztása húzással ──────────────────────── */
/* v140: a fogantyú a .lcard-tools gombsor ELSŐ eleme (nem abszolút a sarokban) —
   így sosem fedheti a törlés gombot. Mérete a szomszédos gombokkal egyezik. */
.lcard-drag {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 15px; line-height: 1; cursor: grab;
  color: var(--ink-soft); background: var(--card-todo); border: 1px solid var(--border);
  touch-action: none;
}
.lcard-drag:hover { background: var(--border); }
/* v141: a gombsor abszolút pozíciójú, ezért NEM növeli a kártya magasságát. Négy gomb
   függőlegesen 8+4*28+3*4+8 = 140 px — enélkül a kuka kilógna a kártya aljából. */
.lcard.has-drag { min-height: 140px; }
.lcard-drag:active { cursor: grabbing; }
.lcard.is-dragging { z-index: 40; opacity: 0.92; box-shadow: 0 12px 30px rgba(0,0,0,0.3); border-color: var(--teal); }
.lcard.drop-target { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,163,107,0.28); }
.lcard.drop-target::after {
  content: '＋'; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 40px; font-weight: 800; color: var(--teal); background: rgba(47,163,107,0.10);
  border-radius: var(--radius); pointer-events: none;
}

/* ── UX v95: „?" súgó a funkció címe után ─────────────────────────── */
.title-help {
  flex: none; width: 22px; height: 22px; border-radius: 999px; display: inline-grid; place-items: center;
  vertical-align: middle; margin-left: 8px; font-size: 13px; font-weight: 800; line-height: 1;
  text-transform: none; letter-spacing: 0; color: var(--ink-soft); background: var(--border);
  transition: background 0.15s ease, transform 0.1s ease;
}
.title-help:hover { background: var(--teal); color: #fff; }
.title-help:active { transform: scale(0.9); }
/* fejléc-sávban (ctxbar, mindig zöld): fehér áttetsző, mint a többi fejléc-gomb */
.ctx-help {
  flex: none; align-self: center; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; background: rgba(255,255,255,0.18); color: #fff;
  transition: background 0.15s ease, transform 0.1s ease;
}
.ctx-help:hover { background: rgba(255,255,255,0.30); }
.ctx-help:active { transform: scale(0.9); }

/* ── Partnerek térképe (v96, Leaflet) ─────────────────────────────── */
#pm-map, #loc-map { height: 58vh; min-height: 320px; max-height: 640px; border-radius: var(--radius); overflow: hidden; margin-top: 10px; z-index: 0; }
/* v174: a Helymegosztás lapon a térkép a saját vezérlők ALATT ül; a szekciócím
   elválasztja a kettőt, a .block-title bevált tipográfiájával. */
.loc-map-cap { margin: 18px 0 2px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
/* A túra-térkép a listával EGY oldalon van, ezért alacsonyabb (nem tölti ki a képernyőt).
   Külön id (tourmap-map), hogy a „Térképem" #tm-map-jével NE ütközzön. */
#tourmap-map { height: 42vh; min-height: 240px; max-height: 420px; border-radius: var(--radius); overflow: hidden; margin-top: 4px; z-index: 0; }
.pm-people { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; margin-top: 4px; -webkit-overflow-scrolling: touch; }
.pm-person { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--border); cursor: pointer; }
.pm-person:hover { border-color: var(--teal); }
.pm-person.is-off { opacity: 0.45; }
.pm-person .packer { width: 26px; height: 26px; font-size: 12px; flex: none; }
.pm-person-name { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pm-person-eye { font-size: 13px; opacity: 0.7; }
.pm-all { display: inline-block; margin: 2px 0 0; }

/* Leaflet divIcon marker — a saját jelvényünkkel (nincs default fehér doboz) */
.pm-pin { background: transparent; border: 0; }
.pm-pin .packer { width: 32px; height: 32px; font-size: 14px; border: 2px solid #fff; box-shadow: 0 2px 7px rgba(0,0,0,0.4); }
.pm-pin--me .packer { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal), 0 2px 7px rgba(0,0,0,0.4); }
.pm-pin--stale { opacity: 0.5; }
.pm-popup b { font-size: 14px; }
.pm-popup-when { font-size: 12px; opacity: 0.75; }
.pm-actions { display: flex; gap: 8px; margin-top: 8px; }
.pm-act { flex: 1; text-align: center; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 9px; text-decoration: none; }
a.pm-act { background: var(--border); color: var(--ink); }
a.pm-act:hover { background: var(--teal); color: #fff; }
.pm-msg-btn { background: var(--teal); color: #fff; border: 0; cursor: pointer; }
.pm-msg-btn:hover { background: var(--teal-deep, #1e7a4f); }
/* Hívás gomb — a név alatt, elsőként; kiemelt (telt teal), tel: link */
a.pm-call-btn { background: var(--teal); color: #fff; }
a.pm-call-btn:hover { background: var(--teal-deep, #1e7a4f); }

/* Sötét téma: csak a Leaflet-chrome (a raszter-csempe világos marad) */
@media (prefers-color-scheme: dark) {
  .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--ink); }
  .leaflet-popup-content a { color: var(--teal); }
  .leaflet-bar a { background: var(--card); color: var(--ink); border-color: var(--border); }
  .leaflet-bar a:hover { background: var(--border); }
  .leaflet-control-attribution { background: rgba(0,0,0,0.55); color: var(--ink-soft); }
  .leaflet-control-attribution a { color: var(--ink-soft); }
}

/* ── Túra (v98): csoport lista/költségvetés nélkül ───────────────── */
.tour-list { display: grid; gap: 10px; margin-top: 12px; }
.tour-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  width: 100%; text-align: left; padding: 14px; border-radius: var(--radius);
  background: var(--card); border: 1.5px solid var(--border); cursor: pointer; }
.tour-card:hover { border-color: var(--teal); }
.tour-card-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.tour-card-sub { font-size: 13px; color: var(--ink-soft); }
/* v163 — a túra-kártya borítóképpel és hangsúlyos fejjel (jegyek 761ae138 + 0cb2eeea).
   A kép fix méretű bélyeg, a szöveg mellette tördel; token-alapú színek, így a sötét
   téma külön szabály nélkül is helyes. */
.tour-card { flex-direction: row; align-items: center; gap: 12px; }
.tour-cover { flex: none; width: 62px; height: 62px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; background: var(--card-todo); }
.tour-cover.is-empty { color: #fff; font-size: 24px; font-weight: 800; }
.tour-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tour-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.tour-card-desc { font-size: 12.5px; line-height: 1.35; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tour-dates.is-muted { opacity: .7; font-style: italic; }
/* „Folyamatban”: bal oldali teal csík — ránézésre kiemelkedik a listából. */
.tour-card.is-ongoing { border-left: 4px solid var(--teal); }
.tour-card.is-past { opacity: .72; }
.tour-grp { margin-top: 14px; }
.invite-sec:first-child { margin-top: 4px; }
/* A lezajlott túrák összecsukva: a lista tetején az legyen, amivel dolga van. */
.tour-past { margin: 0; }
.tour-past > summary { cursor: pointer; padding: 8px 2px; font-size: 13.5px; font-weight: 700;
  color: var(--teal-deep); list-style: none; }
.tour-past > summary::-webkit-details-marker { display: none; }
.tour-past > summary::before { content: '▸ '; }
.tour-past[open] > summary::before { content: '▾ '; }
@media (prefers-color-scheme: dark) { .tour-past > summary { color: #7fe0ab; } }
/* v164 — TÚRA-LAP HERO. A név, a helyszín és az időpont a lap legerősebb eleme.
   Borítóképpel: a kép a háttér, fölötte sötétedő átmenet, hogy a fehér szöveg minden
   fotón olvasható maradjon. Kép nélkül: a névből képzett állandó szín. Mindkét
   esetben ugyanaz a tipográfia — nem lesz „két különböző oldal”. */
.tour-hero { position: relative; overflow: hidden; border-radius: var(--radius);
  margin: 0 0 12px; min-height: 132px; display: flex; align-items: flex-end;
  cursor: pointer; box-shadow: var(--shadow); }
.tour-hero-img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; }
.tour-hero-shade { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.22) 45%, rgba(0,0,0,0.66) 100%); }
.tour-hero-body { position: relative; padding: 14px 15px 13px; width: 100%; }
.tour-hero-name { margin: 0 0 4px; font-size: 23px; line-height: 1.15; font-weight: 800;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.45); word-break: break-word; }
.tour-hero-place, .tour-hero-when { margin: 0; font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,0.94); text-shadow: 0 1px 3px rgba(0,0,0,0.45); }
.tour-hero-place { margin-bottom: 2px; }
.tour-hero-when.is-empty { font-weight: 600; opacity: 0.85; font-style: italic; }
.tour-hero-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; z-index: 2; }
.tour-hero-btn { width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0,0,0,0.34); color: #fff;
  font-size: 14px; font-weight: 800; cursor: pointer; }
.tour-hero-btn:hover { background: rgba(0,0,0,0.5); }
.tour-desc { display: block; width: 100%; text-align: left; margin: 0 0 12px; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer; white-space: pre-wrap; }
/* Szekció-fejlécek a túra-lapon: cím + egy mondat magyarázat + élő összegzés. */
.tour-sec-h { margin: 18px 0 2px; font-size: 15px; font-weight: 800; color: var(--ink); }
.tour-sec-lead { margin: 0 0 8px; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.tour-map-sum { margin: 0 0 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 700;
  color: var(--teal-deep); background: var(--card-todo); border-radius: 999px;
  display: inline-block; }
@media (prefers-color-scheme: dark) { .tour-map-sum { color: #7fe0ab; } }
/* A szerkesztő borítókép-blokkja */
.caledit-desc { resize: vertical; min-height: 62px; font-family: inherit; }
.caledit-cover { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.caledit-cover-img { width: 76px; height: 56px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border); }
.caledit-cover-txt { font-size: 13px; color: var(--ink-soft); }
.caledit-cover-x { color: #b3261e; }
/* Fő teendők (résztvevő): két gomb egy sorban. A HELYMEGOSZTÁS az elsődleges
   (tömör) — enélkül üres a térkép; a „Beszálltam" a körvonalas másodlagos. */
.tour-primary { display: flex; gap: 8px; margin: 4px 0 8px; }
.tour-pbtn { flex: 1; padding: 12px 10px; border-radius: var(--radius);
  border: 1.5px solid var(--teal); background: transparent; color: var(--teal);
  font-size: 14.5px; font-weight: 800; cursor: pointer; text-align: center; }
.tour-pbtn:hover { background: var(--teal); color: #fff; }
/* Bekapcsolt („Mégsem szálltam be") = visszavett */
.tour-pbtn.is-on { color: var(--ink-soft); border-color: var(--border); }
.tour-pbtn.is-on:hover { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
/* Elsődleges: tömör teal */
#tour-loc-btn { background: var(--teal); color: #fff; }
#tour-loc-btn:hover { filter: brightness(0.96); }

/* Másodlagos (szervező): halványabb, kisebb */
.tour-secondary { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.tour-sbtn { flex: 1; padding: 8px 10px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--card); color: var(--ink-soft);
  font-size: 13px; font-weight: 700; cursor: pointer; }
.tour-sbtn:hover { border-color: var(--teal); color: var(--teal); }

/* Résztvevő-sor: a státusz a lényeg, ezért az kap színt, nem a név */
.tour-roster { display: grid; gap: 8px; }
.tour-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius); background: var(--card);
  border: 1.5px solid var(--border); border-left-width: 5px; }
.tour-row.is-tappable { cursor: pointer; }
.tour-row.is-tappable:hover { border-color: var(--teal); }
.tour-row .packer { width: 34px; height: 34px; font-size: 14px; flex: none; }
.tour-row-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tour-row-name { font-size: 15px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-row-state { font-size: 13px; color: var(--ink-soft); }
.tour-row-mark { flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent; color: var(--ink);
  font-size: 15px; cursor: pointer; }
.tour-row-mark:hover { border-color: var(--teal); color: var(--teal); }

/* Státusz-színek — a bal szegély hordozza, hogy egy pillantásra olvasható legyen */
.tour-row.is-waiting    { border-left-color: #e0972f; }
.tour-row.is-live       { border-left-color: var(--teal); }
.tour-row.is-stalled    { border-left-color: #c98a2b; }
.tour-row.is-picked-up  { border-left-color: #3fa46a; }
.tour-row.is-picked-up  { opacity: 0.65; }
.tour-row.is-stale      { border-left-color: #b9b3aa; }
.tour-row.is-no-location{ border-left-color: #cf5b45; }
.tour-row.is-live .tour-row-state { color: var(--teal); font-weight: 700; }
.tour-row.is-stalled .tour-row-state { color: #c98a2b; font-weight: 700; }
.tour-row.is-no-location .tour-row-state { color: #cf5b45; }

@media (prefers-color-scheme: dark) {
  .tour-row.is-waiting     { border-left-color: #e8b45c; }
  .tour-row.is-stalled     { border-left-color: #e8b45c; }
  .tour-row.is-stalled .tour-row-state { color: #e8b45c; }
  .tour-row.is-picked-up   { border-left-color: #4cc59e; }
  .tour-row.is-stale       { border-left-color: #6b6660; }
  .tour-row.is-no-location { border-left-color: #ff8a80; }
  .tour-row.is-no-location .tour-row-state { color: #ff8a80; }
}

/* ── Élő helymegosztás (v98) ─────────────────────────────────────── */
.live-card { margin-top: 12px; }
.live-card.is-live { border-color: var(--teal); }
.live-lead { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.45; }
.live-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.live-preset { flex: 1 1 auto; min-width: 64px; }
.live-custom { display: flex; gap: 8px; margin-top: 10px; }
.live-mins { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 9px;
  border: 1.5px solid var(--border); background: var(--card); color: var(--ink); font-size: 15px; }
.live-status { font-size: 13px; color: var(--ink-soft); margin: 12px 0 0; }
.live-status.is-on { color: var(--teal); font-weight: 700; }
/* A „szünetel" NEM lehet halk: a felhasználó azt hihetné, megy a követés */
.live-status.is-paused { color: #cf5b45; font-weight: 700; }
.live-stop { margin-top: 12px; width: 100%; }

/* Térkép-jelölő: élő = telt + lüktet, tű = üreges, szaggatott keret */
.pm-pin--live .packer { box-shadow: 0 0 0 3px rgba(47,163,107,0.55), 0 2px 7px rgba(0,0,0,0.4);
  animation: pmPulse 2s ease-in-out infinite; }
.pm-pin--pin .packer { border-style: dashed; opacity: 0.9; }
/* Megállt élő pozíció: tömör borostyán gyűrű, DE nem lüktet (nem hazudik mozgást) */
.pm-pin--stalled .packer { box-shadow: 0 0 0 3px rgba(201,138,43,0.6), 0 2px 7px rgba(0,0,0,0.4); }
@keyframes pmPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(47,163,107,0.55), 0 2px 7px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(47,163,107,0.16), 0 2px 7px rgba(0,0,0,0.4); }
}
@media (prefers-reduced-motion: reduce) { .pm-pin--live .packer { animation: none; } }
.pm-popup-mode { font-size: 12px; }
.pm-popup-mode.is-live { color: #2fa36b; font-weight: 700; }
.pm-popup-mode.is-stalled { color: #c98a2b; font-weight: 700; }
.pm-popup-mode.is-pin { color: #8a8178; }

@media (prefers-color-scheme: dark) {
  .live-status.is-paused { color: #ff8a80; }
  .pm-popup-mode.is-live { color: #4cc59e; }
  .pm-popup-mode.is-stalled { color: #e8b45c; }
  .pm-popup-mode.is-pin { color: #9a938b; }
}

/* A .seg-btn szegmens-vezérlőhöz készült (átlátszó, keret nélkül). Az „+ Új túra"
   és az élő-megosztás gombjai önállóan állnak, ezért explicit keretet kapnak. */
.live-preset, .live-custom .seg-btn, #tour-new-btn {
  border: 1.5px solid var(--border); background: var(--card); color: var(--ink);
  padding: 10px 14px; border-radius: 999px; cursor: pointer;
}
.live-preset:hover, .live-custom .seg-btn:hover,
#tour-new-btn:hover { border-color: var(--teal); color: var(--teal); }
.live-custom .seg-btn { flex: 0 0 auto; }
#tour-new-btn { flex: 0 0 auto; margin-top: 4px; }
.tm-attrib { font-size: 11px; color: var(--ink-soft); margin: 6px 0 0; text-align: right; }

/* ── Profil: varázsló-CTA + vészhelyzeti szekció-jegyzet (v101) ───── */
.pf-wizard-cta { display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 14px; margin: 4px 0 16px; border-radius: var(--radius);
  background: var(--card); border: 1.5px solid var(--teal); }
.pf-wizard-cta.is-subtle { border-color: var(--border); }
.pf-wizard-cta-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-wizard-cta-txt strong { font-size: 15px; color: var(--ink); }
.pf-wizard-cta-txt span { font-size: 13px; color: var(--ink-soft); }
.pf-wizard-cta .btn-primary { flex: 0 0 auto; width: auto; padding: 10px 18px; margin: 0; }
.pf-group-note { font-size: 13px; color: var(--ink-soft); margin: -4px 0 10px; line-height: 1.45; }

/* ── Vezetett profil-kitöltő (varázsló) ──────────────────────────── */
.pw-wrap { max-width: 620px; }
.pw-progress { height: 6px; border-radius: 999px; background: rgba(47,163,107,0.16);
  overflow: hidden; margin: 4px 0 8px; }
.pw-progress-bar { height: 100%; width: 0; background: var(--teal); border-radius: 999px;
  transition: width 0.4s ease; }
.pw-step { display: none; padding: 24px 4px 12px; }
.pw-step.is-active { display: block; animation: pwIn 0.4s ease; }
@keyframes pwIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.pw-step.pw-anim-back.is-active { animation: pwInBack 0.4s ease; }
@keyframes pwInBack { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pw-step.is-active, .pw-step.pw-anim-back.is-active { animation: none; } }
.pw-section-note { font-size: 13px; font-weight: 700; color: var(--teal); margin: 0 0 14px; line-height: 1.45; }
.pw-title { font-size: clamp(21px, 5vw, 27px); font-weight: 800; color: var(--ink); margin: 0 0 8px; line-height: 1.25; }
.pw-lead { font-size: 15px; color: var(--ink-soft); margin: 0 0 20px; line-height: 1.5; }
.pw-input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--ink); font-size: 16px; }
.pw-input:focus { outline: none; border-color: var(--teal); }
.pw-textarea { resize: vertical; min-height: 90px; }
.pw-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.pw-btn { padding: 12px 22px; border-radius: 999px; font-size: 15px; font-weight: 800; cursor: pointer; border: 1.5px solid transparent; }
.pw-btn-primary { background: var(--teal); color: #fff; }
.pw-btn-primary:hover { filter: brightness(0.96); }
.pw-btn-ghost { background: transparent; color: var(--ink-soft); border: 0; text-decoration: underline; }
.pw-btn-ghost:hover { color: var(--ink); }
.pw-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.pw-back { background: transparent; border: 0; color: var(--ink-soft); font-size: 14px; font-weight: 700; cursor: pointer; }
.pw-back:hover { color: var(--ink); }
.pw-counter { font-size: 13px; font-weight: 700; color: var(--ink-soft); }

@media (prefers-color-scheme: dark) {
  .pw-progress { background: rgba(76,197,158,0.18); }
}

/* ── Varázsló: Igen/Nem kártyák + kép-lépés (v102) ───────────────── */
.pw-cards { display: flex; gap: 12px; }
.pw-card { flex: 1; padding: 16px 14px; border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--ink); font-size: 16px; font-weight: 800; cursor: pointer; }
.pw-card:hover { border-color: var(--teal); }
.pw-card.is-selected { background: var(--teal); border-color: var(--teal); color: #fff; }
.pw-image { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pw-image-preview { width: 100%; max-width: 320px; aspect-ratio: 3 / 2; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--card) center/cover no-repeat; }
.pw-image-status { font-size: 13px; color: var(--ink-soft); }

/* ── Profil: siklóernyős összecsukható szekció + fotó (v102) ─────── */
.pf-paraglides-row { margin: 4px 0 8px; }
.pf-pilot { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 6px 12px 12px; margin: 0 0 14px; }
.pf-pilot > summary { cursor: pointer; font-size: 15px; font-weight: 800; color: var(--ink); padding: 8px 0; list-style: none; }
.pf-pilot > summary::-webkit-details-marker { display: none; }
.pf-pilot > summary::before { content: '▸ '; color: var(--teal); }
.pf-pilot[open] > summary::before { content: '▾ '; }
.pf-glider-photo { width: 100%; max-width: 320px; aspect-ratio: 3 / 2; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--card) center/cover no-repeat; margin: 4px 0 8px; }

/* Tag-kártya: siklóernyős al-szekció */
.mc-pilot { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.mc-pilot > summary { cursor: pointer; font-weight: 800; color: var(--ink); padding: 4px 0; list-style: none; }
.mc-pilot > summary::-webkit-details-marker { display: none; }
.mc-pilot > summary::before { content: '▸ '; color: var(--teal); }
.mc-pilot[open] > summary::before { content: '▾ '; }
.mc-glider-photo { width: 100%; aspect-ratio: 3 / 2; border-radius: 10px; background: center/cover no-repeat;
  border: 1px solid var(--border); margin: 8px 0; }

/* ── NAPTÁR (v134) — dátumozott utak gördülő hetes nézete ────────────── */
/* v165 — a naptár „arca”. A mai nap száma a domináns elem; körülötte a
   hagyományos falinaptár-adatok: névnap, napkelte–napnyugta, holdfázis, ünnep. */
.cal-hero { position: relative; background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px 14px 11px; margin: 10px 0 12px; box-shadow: var(--shadow); }
/* v166 — a dátum hármas kompozíciója: nap neve · nagy szám · hónap, egymás alatt,
   középre rendezve. A sorközök szűkek, hogy egy tömör blokként olvasódjon. */
.cal-hero-date { display: flex; flex-direction: column; align-items: center; text-align: center;
  margin: 2px 0 12px; }
.cal-hero-dow { font-size: 19px; font-weight: 800; letter-spacing: .10em; line-height: 1.1;
  text-transform: uppercase; color: var(--teal-deep); }
/* A „hatalmas betű”: a mai nap száma. tabular-nums, hogy az egy- és kétjegyű
   számok azonos optikai súlyúak legyenek. */
.cal-hero-day { font-size: 92px; line-height: 0.9; font-weight: 800; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em; margin: 2px 0 0; }
.cal-hero-month { font-size: 24px; font-weight: 700; line-height: 1.15; color: var(--ink);
  text-transform: lowercase; margin-top: 1px; }
/* A hét sorszáma nem része a hármasnak — diszkréten a sarokba. */
.cal-hero-week { position: absolute; top: 10px; right: 12px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-soft); opacity: .8; }
@media (max-width: 360px) { .cal-hero-day { font-size: 78px; } .cal-hero-dow { font-size: 17px; } }
.cal-hero-facts { display: flex; flex-direction: column; gap: 4px;
  border-top: 1px solid var(--border); padding-top: 8px; }
.cal-fact { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; line-height: 1.35;
  color: var(--ink-soft); }
.cal-fact-ic { flex: none; width: 17px; text-align: center; }
.cal-fact-tx { min-width: 0; }
.cal-fact.is-holiday .cal-fact-tx { color: #b3261e; font-weight: 800; }
@media (prefers-color-scheme: dark) {
  .cal-hero-week { color: var(--ink-soft); }
  .cal-hero-dow { color: #7fe0ab; }
  .cal-fact.is-holiday .cal-fact-tx { color: #ff8a80; }
}
/* Munkaszüneti nap a rácsban — a hagyományos naptárak piros száma. Az „is-today”
   keretét NEM írja felül, a kettő megfér egymás mellett. */
.cal-day.is-holiday { color: #b3261e; font-weight: 800; }
@media (prefers-color-scheme: dark) { .cal-day.is-holiday { color: #ff8a80; } }
.cal-bar { display: flex; align-items: center; gap: 8px; margin: 10px 0 8px; }
.cal-nav { width: 32px; height: 32px; border-radius: 10px; font-size: 18px; font-weight: 800;
  background: var(--card-todo); border: 1px solid var(--border); color: var(--ink); display: grid; place-items: center; }
.cal-nav:hover { background: var(--border); }
.cal-month { flex: 1; text-align: center; font-weight: 800; font-size: 15px; color: var(--ink); }
.cal-today { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: var(--teal); color: #fff; border: none; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 4px; }
.cal-dow-c { text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft); }
.cal-weeks { display: flex; flex-direction: column; gap: 6px; }
.cal-sep { margin: 10px 0 2px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); border-bottom: 1px solid var(--border); padding-bottom: 3px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 3px; }
.cal-day { min-height: 40px; padding: 5px 0 0; border-radius: 10px; font-size: 13px; font-weight: 700;
  text-align: center; background: var(--card); border: 1px solid var(--border); color: var(--ink);
  align-self: start; }
.cal-day.is-weekend { background: var(--card-todo); }
/* v162 — hónaphatár egy folyamatosan gördülő naptárban.
   A szekción kívüli napok halványak (klasszikus „szomszéd hónap” minta), az elseje
   pedig kiírja a hónap nevét és jelzőcsíkot kap, hogy a törés a soron belül is
   látszódjon. A hónapnév miatt a cella szűkebb, ezért ott kisebb a betű. */
.cal-day.is-other-month { opacity: 0.45; }
.cal-day.is-month-start { font-size: 11px; letter-spacing: -0.01em;
  border-left: 3px solid var(--teal); }
.cal-day.is-month-start.is-other-month { border-left-color: var(--border); }
.cal-day.is-today { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; color: var(--teal-deep); }
@media (prefers-color-scheme: dark) { .cal-day.is-today { color: #7fe0ab; } }
.cal-day:hover { border-color: var(--teal); }
/* Út-sáv: a hét napjait átívelő csík; a hét határán elvágva nem lekerekített */
.cal-bar-ev { min-height: 22px; margin-top: 2px; padding: 3px 8px; border-radius: 8px;
  font-size: 11.5px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; background: var(--teal); color: #fff; border: none; }
.cal-bar-ev:hover { background: var(--teal-deep); }
.cal-bar-ev.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-bar-ev.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-more { width: 100%; margin-top: 12px; padding: 10px; border-radius: 12px; font-size: 13px;
  font-weight: 700; background: var(--card-todo); border: 1px dashed var(--border); color: var(--ink-soft); }
.cal-more:hover { border-style: solid; color: var(--ink); }
.cal-range { display: flex; gap: 10px; }
.cal-range .exp-field { flex: 1; min-width: 0; }
/* Túra-kártya / -fejléc dátumsora */
.tour-dates { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  font-weight: 700; color: var(--teal-deep); }
@media (prefers-color-scheme: dark) { .tour-dates { color: #7fe0ab; } }

/* ── CSEVEGÉS-KÉP (v135) ─────────────────────────────────────────────── */
/* Csatolás-csík a beviteli sáv fölött — a válasz-csík (.chat-replybar) mintájára */
.chat-attachbar {
  flex: none; align-self: center; width: calc(min(100%, 680px) - 24px);
  margin: 0 0 -4px; padding: 7px 10px 11px;
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1.5px solid var(--border); border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.chat-attach-thumb {
  flex: none; width: 38px; height: 38px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); background: var(--card-todo);
}
.chat-attach-txt { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-attach-x {
  flex: none; width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center; font-size: 15px; color: var(--ink-soft);
}
.chat-attach-x:hover { background: rgba(18,36,27,0.08); color: var(--ink); }

/* Kép-hozzáadás gomb a beviteli sávban (a küldés gomb halványabb párja) */
.chat-attach {
  flex: none; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  background: var(--bg); color: var(--ink-soft); border: 1.5px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.chat-attach:hover { color: var(--teal); border-color: var(--teal); }
.chat-attach:active { transform: scale(0.92); }

/* Kép a buborékban.
   v148 JAVÍTÁS — a képarány eltorzult, ha a buborékban a képnél SZÉLESEBB tartalom is
   volt (jellemzően hosszú képaláírás). Ok: a .chat-msg oszlop-irányú flex konténer,
   és a flex alapértelmezése `align-items: stretch` — ez a `width: auto`-t felülírva
   ráfeszítette a képet a buborék teljes szélességére. Utána a `max-height: 320px`
   levágta a magasságot, DE a szélességet már nem igazította vissza → nyúlt kép.
   Ráadásul a kicsi képeket fel is nagyította a natív méretük fölé (elmosódás).
   Asztali gépen volt a legrondább, mert ott a buborék 500 px fölé is nőhet.
   Az `align-self` bármely nem-stretch értéke kikapcsolja a nyújtást: a kép a saját
   méretéből indul, a böngésző pedig a max-width és a max-height párost már
   képarány-helyesen kezeli. A `center` azért jobb a `flex-start`-nál, mert ha a
   képaláírás szélesebb a képnél, a maradék hely két oldalt oszlik el — így
   szándékosnak hat, nem elcsúszott elrendezésnek. */
.chat-img {
  display: block; align-self: center;
  max-width: 100%; max-height: 320px; width: auto; height: auto;
  border-radius: 12px; margin: 2px 0 4px; cursor: zoom-in;
  background: var(--card-todo);
}
.chat-msg-body:empty { display: none; }

/* Teljes képernyős nagyítás */
.imgview {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6, 14, 10, 0.94);
  display: grid; place-items: center; padding: 20px;
  /* v148: a `grid-template-rows` nélkül a sor magassága TARTALOM-függő volt, ezért a
     képen lévő `max-height: 100%` egy határozatlan magassághoz próbált igazodni, és a
     böngésző egyszerűen figyelmen kívül hagyta. Következmény: álló képnél a fotó
     magasabb lett a képernyőnél, a teteje-alja levágódott — és mivel a háttér görgetése
     ilyenkor tiltott, oda sem lehetett görgetni. Asztalin volt látható, mobilon nem,
     mert ott a max-width korlátoz előbb. A minmax(0,1fr) definiált magasságot ad. */
  grid-template-rows: minmax(0, 1fr);
}
.imgview-img { max-width: 100%; max-height: 100%; border-radius: 8px; cursor: zoom-out; }
.imgview-x {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 14px;
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
  font-size: 18px; color: #fff; background: rgba(255,255,255,0.16);
}
.imgview-x:hover { background: rgba(255,255,255,0.28); }
body.imgview-open { overflow: hidden; }

/* ── Élő háttér (v146) ───────────────────────────────────────────────────
   Három színes csepp lassan sodródik és összeolvad — „festékpatron a vízben".
   A rajz egy 56x112-es canvasra megy (ld. bgfx.js); itt csak felnagyítjuk és
   ellágyítjuk. A kis blur a felskálázás éleit simítja el, nem ez adja a formát —
   ezért marad olcsó akkor is, amikor a canvas frissül.
   A body háttere a viewport-canvasra terjed, ezért a z-index:-1 réteg fölötte,
   de MINDEN tartalom alatt van. */
.bgfx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bgfx canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: blur(22px); opacity: 0.62; transform: scale(1.18); transform-origin: center;
}
@media (prefers-color-scheme: dark) {
  /* Sötétben visszafogottabb, hogy a folyó szöveg kontrasztja ne romoljon */
  .bgfx canvas { opacity: 0.40; filter: blur(24px); }
}

/* ── PWA-TELEPÍTÉS (v138) ────────────────────────────────────────────── */
/* Nyitóképernyő-sáv — a chat-nudge doboz rokona, de vízszintes és van CTA-ja */
.install-bar {
  display: flex; align-items: center; gap: 11px;
  background: var(--card-todo); border: 1.5px solid var(--done-border);
  border-radius: var(--radius); padding: 11px 12px; margin: 0 0 14px;
}
/* v145: a telepítés is a kézzel rajzolt készletből kap ikont (volt: 📲 emoji) —
   ez volt az utolsó menüpont, ami kilógott a sorból. A korong-keret ugyanaz,
   mint a menü többi ikonján (.drawer-item .di-ico). */
.install-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(47,163,107,0.42); }
.install-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-txt strong { font-size: 14px; color: var(--ink); }
.install-txt span { font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); }
.install-cta {
  flex: none; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 800;
  background: var(--teal); color: #fff; border: none; box-shadow: var(--shadow);
}
.install-cta:hover { background: var(--teal-deep); }
.install-cta:active { transform: scale(0.95); }
.install-x {
  flex: none; width: 28px; height: 28px; border-radius: 999px; align-self: flex-start;
  display: grid; place-items: center; font-size: 13px; color: var(--ink-soft); background: none; border: none;
}
.install-x:hover { background: rgba(18,36,27,0.10); color: var(--ink); }
/* Keskeny kijelzőn a gomb kerüljön külön sorba, ne szoruljon össze a szöveg */
@media (max-width: 420px) {
  .install-bar { flex-wrap: wrap; }
  .install-txt { flex: 1 1 100%; order: 1; }
  .install-ico { order: 0; }
  .install-x { order: 0; margin-left: auto; }
  .install-cta { order: 2; width: 100%; }
}
/* Útmutató-modál lépései */
.install-steps { margin: 4px 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.install-steps li { font-size: 14px; line-height: 1.45; color: var(--ink); }
.install-url {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700;
  text-align: center; user-select: all;
}

/* v152: nevek a palackpörgetőben. Ha megadsz neveket, azok adják a létszámot is,
   ezért a számláló sor eltűnik — nem lehet két, egymásnak ellentmondó forrás. */
.wheel-names-field { margin: 0 0 10px; }
.wheel-names-wrap { position: relative; display: block; width: 100%; }
/* a mező töltse ki a burkot, különben a törlés-gomb kilóg mellé */
.wheel-names-wrap .add-input { width: 100%; text-align: center; padding-right: 38px; }
/* v153: törlés gomb a mező végén — csak akkor látszik, ha van mit törölni */
.wheel-names-x {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  font-size: 13px; color: var(--ink-soft); background: none; border: 0;
}
.wheel-names-x:hover { background: rgba(18,36,27,0.10); color: var(--ink); }

/* ══ v153 (P2): lapozás a fő funkciók között ═══════════════════════════════
   A nézetek NEM lettek egyetlen lapozható vászon — maradtak külön oldalak, csak
   kaptak egy sorrendet, egy húzás-gesztust és ezt a jelzőt. Így a lapozás
   felismerhető (látod, hány oldal van és hol tartasz), és nem kellett átépíteni
   az egész nézet-rendszert. */
.viewdots {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 30;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(15, 60, 40, 0.18);
  backdrop-filter: blur(6px);
}
.viewdot {
  width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0;
  background: var(--ink-soft); opacity: 0.38; cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.viewdot:hover { opacity: 0.7; }
.viewdot.is-on { background: var(--teal); opacity: 1; transform: scale(1.35); }
/* v167 — a menü pöttye. Szándékosan MÁS alakú (fekvő pálcika), hogy ránézésre
   látszódjon: ez nem egy újabb oldal, hanem a fiók. Előtte egy hajszálvonal
   választja el a nézet-pöttyöktől. */
.viewdot.is-menu { width: 16px; height: 7px; border-radius: 4px;
  margin-left: 5px; position: relative; }
.viewdot.is-menu::before { content: ''; position: absolute; left: -6px; top: -4px;
  width: 1px; height: 15px; background: var(--border); }
.viewdot.is-menu:hover { opacity: 0.85; }
/* Ujjal is el kell találni: a pötty kicsi, a koppintható terület nem */
.viewdot::after { content: ''; position: absolute; width: 30px; height: 34px;
  transform: translate(-50%, -50%); margin-left: 4px; }
.viewdot { position: relative; }
@supports not (backdrop-filter: blur(6px)) { .viewdots { background: var(--card); } }
/* Nyitott modál alatt a pöttyök átderengenének a fátyolon — elrejtjük. A syncViewDots
   csak nézetváltáskor fut, a modál nyitása pedig nem az; ezért CSS-ből is kezeljük. */
body:has(.modal-bg:not([hidden])) .viewdots,
body.chat-open .viewdots { display: none; }
/* v154: a jelző FIXEN ül a lap alján, tehát kitakarta a lap végét — a Delta7-feliratot,
   a hosszabb csempe-listát, a sablonokat, a naptárt. Amikor látszik, a lábléc alá
   annyi helyet foglalunk, amennyit a pötty-sáv elvesz. A body-osztályt a syncViewDots
   állítja, hogy az aloldalakon (ahol nincs jelző) ne maradjon üres sáv. */
body.has-viewdots .foot { padding-bottom: calc(56px + max(20px, env(safe-area-inset-bottom))); }

/* Lapozás-animáció. prefers-reduced-motion esetén a JS meg sem hívja. */
@keyframes view-slide-l { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes view-slide-r { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
.slide-l { animation: view-slide-l 0.22s ease-out; }
.slide-r { animation: view-slide-r 0.22s ease-out; }

/* ══ v155: személyes köszöntés + haladás-alapú tipp ════════════════════════
   A tipp mindig arra mutat, amit a felhasználó MÉG NEM használ. Ha mindent
   használ, a doboz eltűnik — nem hagyunk üres helyet, és nem beszélünk feleslegesen. */
.hello { margin: 0 0 16px; }
.hello-greet {
  margin: 2px 0 10px; font-size: clamp(21px, 6vw, 26px); font-weight: 900;
  letter-spacing: -0.015em; color: var(--ink); text-wrap: balance;
}
.hello-tip {
  display: grid; align-items: center; gap: 4px 11px;
  grid-template-columns: auto 1fr auto;
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 12px 12px 12px 13px;
}
.hello-tip-ico {
  grid-row: 1 / span 2; width: 42px; height: 42px; border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(47,163,107,0.42);
}
.hello-tip-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hello-tip-txt strong { font-size: 15px; font-weight: 800; color: var(--ink); }
.hello-tip-txt span { font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.hello-tip-go {
  grid-column: 2 / span 2; justify-self: start; margin-top: 8px;
  padding: 8px 16px; border-radius: 999px; border: 0;
  background: var(--teal); color: #fff; font-size: 13.5px; font-weight: 800;
}
.hello-tip-go:hover { background: var(--teal-deep); }
.hello-tip-go:active { transform: scale(0.96); }
/* Az elvetés halkabb, mint a cselekvés — nem versenyeznek egymással */
.hello-tip-x {
  grid-row: 1; grid-column: 3; align-self: start;
  width: 28px; height: 28px; border-radius: 999px; border: 0; background: none;
  display: grid; place-items: center; font-size: 13px; color: var(--ink-soft);
}
.hello-tip-x:hover { background: rgba(18,36,27,0.10); color: var(--ink); }

/* ══ v157: egységes belépés-kapu ═══════════════════════════════════════════
   Nem tiltjuk le a nézetet — a felhasználó lássa, mi van az appban. De ELŐRE
   megmondjuk, hogy ehhez belépés kell, és rögtön fel is kínáljuk. A művelet-
   vezérlők közben tiltottak, hogy ne utólag derüljön ki a kudarc. */
.auth-gate {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px;
  align-items: center; margin: 0 0 16px;
  background: var(--card-todo); border: 1.5px solid var(--done-border);
  border-radius: var(--radius); padding: 13px 14px;
}
.auth-gate-ico { grid-row: 1 / span 2; font-size: 22px; line-height: 1; }
.auth-gate-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.auth-gate-txt strong { font-size: 15px; font-weight: 800; color: var(--ink); }
.auth-gate-txt span { font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.auth-gate-btn {
  grid-column: 2; justify-self: start; margin-top: 9px;
  padding: 8px 18px; border-radius: 999px; border: 0;
  background: var(--teal); color: #fff; font-size: 13.5px; font-weight: 800;
}
.auth-gate-btn:hover { background: var(--teal-deep); }
.auth-gate-btn:active { transform: scale(0.96); }
/* A letiltott vezérlők halványak, de OLVASHATÓK maradnak — a lényeg, hogy lásd,
   mi van itt, ne az, hogy eltűnjön. */
.is-locked button[disabled], .is-locked input[disabled],
.is-locked textarea[disabled], .is-locked select[disabled] {
  opacity: 0.45; cursor: not-allowed;
}

/* v158: e-mail / telefon váltó a belépő modálban */
.login-seg { margin: 0 0 12px; }
.login-phone-hint { margin: -4px 0 10px; font-size: 12px; }

/* v176 — Telefonszám bekötése a belépéshez (Profilom).
   Vizuálisan elkülönül a profil-mezőktől: ez nem adat, hanem BEÁLLÍTÁS. */
.pf-authphone { margin-top: 12px; padding: 12px; border: 1px dashed var(--border);
  border-radius: var(--radius); background: var(--card-todo); }
.pf-authphone-title { margin: 0 0 6px; font-size: 13.5px; font-weight: 800; color: var(--ink); }
.pf-authphone .pf-hint { margin: 0 0 8px; }
.pf-authphone .add-input { margin: 6px 0 8px; }
.pf-authphone .modal-msg.is-err { color: #b3261e; }
/* A levélből érkezve kiemeljük a gombot, hogy rögtön látszódjon, hova jött. */
#pf-authphone-add.is-nudged { box-shadow: 0 0 0 3px rgba(47,163,107,.35); }

/* v177 — Névkérő. Szándékosan NINCS bezáró ✕: a döntést a két gomb egyike zárja le
   (mentés vagy kihagyás), így nem lehet véletlenül eldobni a kérdést. */
#askname-modal .add-input { margin: 12px 0 10px; }
#askname-modal .btn-primary { width: 100%; }
#askname-modal .arch-restore { display: block; width: 100%; margin-top: 8px; text-align: center; }
