/* Lumorra – belépett app (feed) stílusok, a styles.css tokenekre építve */

.app-body { background: var(--bg-soft); }

.app-shell {
  display: grid; grid-template-columns: 240px 1fr; gap: 1.6rem;
  padding-block: 1.6rem; align-items: start;
}

/* FONTOS: a rács-elemek alapértelmezett min-width értéke „auto", ezért NEM
   tudnak a tartalmuknál keskenyebbek lenni. Emiatt a széles tartalom (pl. a
   vízszintesen görgethető sztori-sor vagy egy hosszú, tördelhetetlen szó)
   szétfeszítette az egész oldalt, és telefonon oldalra lehetett görgetni —
   a kártyák jobb széle levágódott. A min-width:0 ezt oldja fel. */
.app-shell > * { min-width: 0; }
.app-feed { min-width: 0; }

/* Biztonsági háló: hosszú szó/URL se tudja szétfeszíteni a kártyát */
.app-feed .explain, .fcard .body, .fname, .convo-last { overflow-wrap: anywhere; }

/* Oldalsáv */
.app-side { position: sticky; top: 88px; }
.side-nav { display: flex; flex-direction: column; gap: .2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.side-item { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: .95rem; }
.side-item:hover { background: var(--brand-light); text-decoration: none; }
.side-item.active { background: var(--brand-light); color: var(--brand-darker); font-weight: 700; }
.si-ic { width: 22px; text-align: center; }

/* Hírfolyam */
.feed-head h1 { font-size: 1.6rem; color: var(--ink); margin: 0 0 .2rem; }
.feed-head p { margin: 0 0 1.2rem; }
.feed-banner { background: #fff; border: 1px solid var(--brand-mint); border-left: 4px solid var(--brand); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1.2rem; font-size: .92rem; }

/* Felső sztori-sor */
.stories { display: flex; gap: 1rem; overflow-x: auto; padding: .3rem .2rem 1.1rem; margin-bottom: .2rem; }
.story { flex: 0 0 auto; width: 78px; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.story-av { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.5rem; transition: transform .15s ease; }
.story:hover .story-av { transform: scale(1.06); }
.story-name { font-size: .74rem; color: var(--ink); font-weight: 600; text-align: center; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 78px; }

.fcard.flash { animation: flashcard 1.2s ease; }
@keyframes flashcard { 0%, 100% { box-shadow: var(--shadow-soft); } 30% { box-shadow: 0 0 0 3px var(--brand); } }

.feed-list { display: grid; gap: 1.4rem; }

/* Match-kártya (feed) – fejléc: avatar + név + % */
.fcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden; }
.fhead { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.favatar { position: relative; width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.7rem; box-shadow: var(--shadow-soft); }
.favatar .crown { position: absolute; top: -8px; right: -6px; font-size: 1.1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.premium-chip { display: inline-flex; align-items: center; font-size: .7rem; font-weight: 800; color: #8a6300; background: linear-gradient(135deg,#ffe9a8,#ffd35c); padding: .15rem .5rem; border-radius: 999px; letter-spacing: .02em; }
.fcard.premium { border-color: #f2d68a; box-shadow: 0 0 0 1px #f2d68a, var(--shadow-soft); }
.fmeta { flex: 1 1 auto; min-width: 0; }
.fname { font-weight: 800; font-size: 1.15rem; color: var(--ink); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.verified-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; font-weight: 700; color: var(--brand-dark); background: var(--brand-light); padding: .15rem .5rem; border-radius: 999px; }
.verified-chip svg { width: 11px; height: 11px; }
.fcity { color: var(--ink-soft); font-size: .9rem; margin-top: .15rem; }
.fscore { flex: 0 0 auto; width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--brand); display: grid; place-items: center; text-align: center; line-height: 1.05; background: #fff; }
.fscore b { font-size: 1.05rem; }
.fscore small { font-size: .48rem; display: block; color: var(--ink-soft); font-weight: 600; }

.fcard .body { padding: 1.2rem 1.3rem 1.3rem; }
.fcard .tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.fcard .tags span { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; color: var(--ink-soft); }

/* A felhasználó SAJÁT bemutatkozása — vizuálisan elkülönül az AI-magyarázattól,
   hogy egyértelmű legyen, melyik az ő hangja és melyik a rendszeré. */
.fcard .fbio {
  margin: 0 0 .9rem; padding: .7rem 0 .7rem 1rem;
  border-left: 3px solid var(--brand-mint);
  font-size: .95rem; color: var(--ink); font-style: italic;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

.fcard .explain { background: var(--brand-light); border-radius: 12px; padding: .8rem .9rem; font-size: .92rem; color: var(--ink); margin-bottom: .9rem; }
.fcard .whychips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.fcard .whychips span { background: #fff; border: 1px solid var(--brand-mint); color: var(--brand-darker); border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; font-weight: 600; }

/* Titkos fotók – blokk a kártyán (a fotó demó, a hozzáférés valós) */
.fcard .titkos-foto { display: flex; align-items: center; gap: .8rem; background: var(--bg-soft); border: 1px dashed var(--line); border-radius: 12px; padding: .7rem .85rem; margin-bottom: .9rem; }
.fcard .titkos-foto.feloldva { background: #e9f7f4; border-style: solid; border-color: #bfe8e0; }
.fcard .titkos-foto .tf-blur, .fcard .titkos-foto .tf-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; background: #dfe6e4; }
.fcard .titkos-foto.feloldva .tf-ic { background: var(--brand-mint); }
.fcard .titkos-foto .tf-info { display: flex; flex-direction: column; gap: .15rem; }
.fcard .titkos-foto .tf-info b { font-size: .92rem; color: var(--ink); }
.fcard .titkos-foto .tf-info small { font-size: .8rem; color: var(--ink-soft); }
.fcard .titkos-foto .tf-keres { margin-top: .35rem; align-self: flex-start; padding: .3rem .7rem; font-size: .82rem; }

/* "Ami közös bennetek" – konkrét közös pontok + kompatibilitás */
.fcard .kozos { background: var(--brand-light); border: 1px solid var(--brand-mint); border-radius: 12px; padding: .8rem .95rem; margin-bottom: 1rem; }
.fcard .kozos h4 { margin: 0 0 .5rem; font-size: .9rem; font-weight: 800; color: var(--brand-darker); }
.fcard .kozos ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.fcard .kozos li { display: flex; align-items: flex-start; gap: .45rem; font-size: .9rem; color: var(--ink); line-height: 1.35; }
.fcard .kozos li .ki { flex: 0 0 auto; width: 15px; height: 15px; color: var(--brand-dark); margin-top: .1rem; }
.fcard .kozos li .ki svg { width: 100%; height: 100%; }

/* "Akit keres" – elvárások, zöld pipával ott, ahol a néző megfelel */
.fcard .akit-keres { margin-bottom: 1rem; }
.fcard .akit-keres h4 { margin: 0 0 .5rem; font-size: .82rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-soft); }
.fcard .akit-keres ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.fcard .akit-keres li { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .3rem .75rem; font-size: .82rem; font-weight: 600; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-soft); }
.fcard .akit-keres li.kok { background: #e9f7f4; border-color: #bfe8e0; color: var(--brand-darker); }
.fcard .akit-keres li .kic { display: inline-flex; width: 15px; height: 15px; }
.fcard .akit-keres li .kic svg { width: 100%; height: 100%; }
.fcard .akit-keres li.kok .kic { color: var(--brand-dark); }
.fcard .akit-keres li.kno .kic { display: none; }

/* "Többet a tagokról" – prémium néző tag-infója */
.fcard .taginfo { font-size: .82rem; color: var(--ink-soft); margin-bottom: .8rem; }
.fcard .taginfo .ti-on { color: var(--brand-dark); font-weight: 700; }

/* Közös prémium-zár panel (riport + akadémia) */
.premium-lock { text-align: center; background: var(--brand-light); border: 1px solid var(--brand-mint); border-radius: 16px; padding: 1.8rem 1.4rem; margin: 1.4rem 0; }
.premium-lock .pl-ic { font-size: 2.4rem; line-height: 1; }
.premium-lock h3 { margin: .6rem 0 .3rem; color: var(--brand-darker); font-size: 1.15rem; }
.premium-lock p { margin: 0 auto 1.1rem; max-width: 460px; color: var(--ink-soft); font-size: .95rem; }

.fcard .report-link { display: inline-block; margin-bottom: 1rem; font-size: .86rem; font-weight: 700; color: var(--brand-dark); }
.fcard .report-link:hover { text-decoration: underline; }

.fcard .actions { display: flex; gap: .8rem; align-items: center; }
.act { flex: 1 1 0; display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; border: 0; background: none; cursor: pointer; color: var(--ink-soft); font-size: .78rem; font-weight: 600; }
.act .circle { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); background: #fff; transition: transform .12s ease, background .15s ease, border-color .15s ease; }
.act:hover .circle { transform: translateY(-2px); }
.act-pass:hover .circle { border-color: #e6a23c; color: #e6a23c; }
.act-star:hover .circle, .act-star.on .circle { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
.act-msg .circle { background: var(--brand); border-color: var(--brand); color: #fff; }
.act-msg:hover .circle { background: var(--brand-dark); }
.act .circle svg { width: 22px; height: 22px; }

/* Kedvelés és kacsintás */
.act-like:hover .circle, .act-like.on .circle { border-color: #e0433f; background: #fdeceb; color: #e0433f; }
.act-like.on .circle svg { fill: #e0433f; }
.act-wink:hover .circle, .act-wink.on .circle { border-color: #e6a23c; background: #fdf6e9; color: #b8801f; }
.act.on { color: var(--ink); font-weight: 700; }
.act:disabled { cursor: default; }

/* Öt gomb szűk telefonon: kisebb körök és rés */
@media (max-width: 560px) {
  .fcard .actions { gap: .4rem; }
  .act { font-size: .7rem; }
  .act .circle { width: 42px; height: 42px; }
  .act .circle svg { width: 19px; height: 19px; }
}

.feed-empty { text-align: center; color: var(--ink-soft); padding: 2rem; }

/* Profil gyorslinkek */
.profil-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.4rem; }
.plink { display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow-soft); color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.plink:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.plink .pl-ic { font-size: 1.6rem; flex: 0 0 auto; }
.plink b { display: block; color: var(--ink); }
.plink small { color: var(--ink-soft); font-size: .85rem; }
@media (max-width: 560px) { .profil-links { grid-template-columns: 1fr; } }

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-side { display: none; }            /* a régi felső ikonsor helyett alsó fül-sáv */
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- Alsó fül-sáv (mobil) ----
   FIGYELEM a sorrendre: a „display:none" alap és a mobilos „display:flex"
   azonos specifikusságú, ezért a KÉSŐBBI nyer. A bekapcsoló media query emiatt
   csak e blokk UTÁN állhat — korábban fordítva volt, és a fül-sáv telefonon
   sosem jelent meg. */
.tabbar { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: #fff; border-top: 1px solid var(--line);
  padding: .35rem .2rem calc(.35rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(20,40,46,.08);
}
.tab {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: .35rem 0; background: none; border: 0; cursor: pointer; text-decoration: none;
  color: var(--ink-soft); font-family: inherit; font-size: .66rem; position: relative; min-width: 0;
}
.tab .tab-ic { font-size: 1.35rem; line-height: 1; }
.tab .tab-ic svg { width: 24px; height: 24px; display: block; }
.sheet a.s-logout { color: #e0433f; }
.tab.active { color: var(--brand-dark); font-weight: 700; }
.tab .tab-badge {
  position: absolute; top: 0; left: 55%; background: #e0433f; color: #fff;
  font-size: .58rem; font-weight: 700; min-width: 15px; height: 15px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 3px;
}

/* ---- Felugró lap (bottom sheet) ---- */
.sheet-overlay { position: fixed; inset: 0; background: rgba(20,40,46,.4); z-index: 250; display: none; }
.sheet-overlay.open { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 251; background: #fff;
  border-radius: 18px 18px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%); transition: transform .2s ease; box-shadow: 0 -6px 30px rgba(0,0,0,.2);
}
.sheet.open { transform: translateY(0); }
.sheet h3 { margin: .2rem 0 .8rem; color: var(--ink); font-size: 1.05rem; text-align: center; }
.sheet a { display: flex; align-items: center; gap: .8rem; padding: .85rem .6rem; border-radius: 12px; color: var(--ink); font-weight: 600; }
.sheet a:hover, .sheet a.cur { background: var(--brand-light); color: var(--brand-darker); text-decoration: none; }
.sheet a .s-ic { font-size: 1.4rem; }

/* A fül-sáv bekapcsolása mobilon — a fenti alapstílusok UTÁN kell állnia,
   különben a „.tabbar { display: none }" felülírná (lásd a fenti megjegyzést). */
@media (max-width: 820px) {
  .tabbar { display: flex; }
}

/* --- Profilfotó a match-kártya avatarjában ---
   A kép a monogram FÖLÉ kerül, nem helyette: ha a betöltés elbukik (lejárt
   hivatkozás, törölt fájl), a script leveszi a képet, és a monogram
   automatikusan előtűnik. Így sosem marad üres kör. */
.favatar.has-foto > span[aria-hidden] { visibility: hidden; }
.favatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
