/* barnajozsef.hu – app-szerű nyilvános felület (pasztell harmónia) */
:root {
    --ink: #1D1D1F;
    --ink2: #3A3A3C;
    --gray: #6E6E73;
    --line: #E5E5EA;
    --sep: #D1D1D6;
    --bg: #F5F5F7;
    --panel: #FBFBFD;
    /* türkiz – élénk, üzleti (a korábbi sötétzöld helyett) */
    --teal: #0D9E99;
    --teal-hover: #0B8A86;
    --teal-dot: #14B8B0;
    --teal-tint: #E3F7F5;
    --coral: #FF6B57;
    --fill: rgba(118, 118, 128, 0.12);
    --topbar: 64px;
    --tabbar: 0px;
    --icon: 76px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
    /* előre elmosott, kicsi háttérkép: nem kell élőben homályosítani (gördülékenyebb) */
    --wall: url("/site/wall.jpg");
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { color: var(--teal); }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- héj ---------- */
.shell { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
/* A Livewire @persist egy saját <div>-be csomagol: ne számítson bele az elrendezésbe. */
[x-persist] { display: contents; }

/* ---------- két oszlop: bal publikációk (fix), jobb menü + tartalom ---------- */
.split { flex: 1; min-height: 0; display: flex; }
.pane-list {
    position: relative; flex: 0 0 33.333%; width: 33.333%; min-width: 320px; max-width: none;
    display: flex; flex-direction: column; min-height: 0;
    background: var(--panel); border-right: 1px solid var(--line);
}
.right-col { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.right-main { position: relative; flex: 1; min-height: 0; display: flex; }
.right-main > * { flex: 1; min-width: 0; min-height: 0; }
.pane-right { position: relative; }
.split { position: relative; }

/* az app/cikk alatt a visszatérési kezdőképernyő: Vissza közben az ikonok már ott vannak */
.home-under { position: absolute; inset: 0; z-index: 0; display: flex; }
.home-under > .home-screen { flex: 1; min-width: 0; }
.right-main > .home-under ~ * { position: relative; z-index: 1; }
.home-under .hs-grid { opacity: 0; transition: opacity .3s ease; }
.shell.is-leaving .home-under .hs-grid { opacity: 1; transition-duration: .22s; }
.shell.is-arriving .home-under .hs-grid { opacity: 1; transition: none; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark {
    width: 32px; height: 32px; border-radius: 10px; background: var(--teal); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; letter-spacing: -0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: -0.01em; }
.brand-text small { font-size: 12px; color: var(--gray); }
.list-brand { height: var(--topbar); padding: 0 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; }
.list-brand .brand { min-width: 0; }
.account-btn {
    flex: none; width: 34px; height: 34px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--gray); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
.account-btn:hover { color: var(--ink); background: #ECECF0; }
.account-btn.is-in { background: var(--teal); color: #fff; }
/* asztalon a fiók gomb a jobb felső sarokban (az óra mellett), keskeny nézetben a lista fejlécében */
.account-list { display: none; }

.topbar {
    height: var(--topbar); flex: none; display: flex; align-items: center; justify-content: flex-start; gap: 16px; padding: 0 16px;
    background: rgba(255, 255, 255, 0.8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line); position: relative; z-index: 5;
}
.topbar-brand { display: none; }
.topnav { display: flex; justify-content: flex-start; min-width: 0; }
.topnav-seg { display: flex; gap: 2px; padding: 4px; background: #EDEDF0; border-radius: 12px; }
.topnav-item {
    padding: 8px 16px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink);
    text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; gap: 6px;
}
.topnav-item:hover { background: rgba(255, 255, 255, 0.6); }
.topnav-item.is-active { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.today { margin-left: auto; display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--gray); white-space: nowrap; min-width: 0; }
.today-date { color: var(--ink); font-weight: 600; }
.today { align-items: center; }
/* digitális óra – Nunito (saját tárhelyről, nem Google Fonts); ha a fájl hiányzik, Apple-en a kerekített rendszerbetű jön */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2'); }
.clock {
    order: 99; margin-left: 6px; display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 12px;
    background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.06);
    font-family: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif; font-weight: 800; font-size: 22px; line-height: 1;
    color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.clock-colon { display: inline-block; margin: 0 1px; transform: translateY(-1px); color: var(--teal); animation: clock-blink 2s steps(1) infinite; }
@keyframes clock-blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .clock-colon { animation: none; } }
.today-short { display: none; }
.today-name { color: var(--teal); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.today-label { color: var(--gray); font-weight: 400; }
@media (max-width: 1399px) { .today-long { display: none; } .today-short { display: inline; } }
@media (max-width: 1099px) { .today-label, .today-sep { display: none; } }
.badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff;
    font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- publikációs lista (iOS Mail) ---------- */
.list-head { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 10px; flex: none; }
.list-title { display: flex; align-items: baseline; justify-content: space-between; }
.list-title h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.025em; }
.list-title span { font-size: 13px; color: var(--gray); }
.search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--fill); color: #8E8E93; }
.search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 16px; color: var(--ink); width: 100%; }
.search input::-webkit-search-cancel-button { opacity: 0.5; }
.segmented { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); }
.segmented button { flex: 1; height: 28px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; }
.segmented button.is-active { background: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04); }
.list-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 90px; overscroll-behavior: contain; }

.featured {
    display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.06); margin: 2px 2px 6px;
}
.featured img { width: 100%; height: 150px; object-fit: cover; display: block; }
.featured-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.featured-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--gray); }
.pill-new { font-size: 11px; font-weight: 700; color: #fff; background: var(--teal); padding: 3px 8px; border-radius: 999px; }
.featured:not(.is-unread) .pill-new { display: none; }
.featured-title { font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.featured-excerpt { font-size: 13px; line-height: 1.45; color: var(--gray); }
.featured.is-active { box-shadow: 0 0 0 2px var(--teal); }

.group-label { display: block; padding: 18px 8px 4px 20px; font-size: 13px; font-weight: 600; color: var(--gray); }
.post-item { display: flex; gap: 6px; padding-left: 4px; text-decoration: none; color: inherit; border-radius: 12px; }
.post-item .dot { width: 10px; height: 10px; border-radius: 999px; background: transparent; margin-top: 15px; flex: none; }
.post-item.is-unread .dot { background: var(--teal-dot); }
.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 11px 4px; border-bottom: 0.5px solid var(--sep); }
.post-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.post-title { font-size: 16px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.post-item.is-unread .post-title { font-weight: 650; }
.post-date { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--gray); white-space: nowrap; }
.post-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--gray); }
.post-excerpt { font-size: 14px; line-height: 1.38; color: var(--gray); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-item:hover { background: rgba(0, 0, 0, 0.03); }
.post-item.is-active { background: var(--teal); }
.post-item.is-active .post-body { border-bottom-color: transparent; }
.post-item.is-active :is(.post-title, .post-date, .post-meta, .post-excerpt) { color: #fff; }
.post-item.is-active .dot { background: transparent; }
.list-empty { text-align: center; color: var(--gray); padding: 30px 0; }

/* ---------- kezdőképernyő ---------- */
.wallpaper { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.wallpaper::before {
    content: ""; position: absolute; inset: 0; background: var(--wall) center / cover no-repeat;
}
.wallpaper::after { content: ""; position: absolute; inset: 0; background: rgba(250, 250, 248, 0.68); }
.home-screen { overflow: hidden; }
.hs-scroll { position: relative; height: 100%; overflow-y: auto; padding: 56px 48px 64px; }
.hs-grid {
    /* az ikonok balra rendeződnek, fix oszlopszélességgel */
    margin: 0; display: grid; grid-template-columns: repeat(auto-fill, 132px); justify-content: start;
    row-gap: 32px; column-gap: 8px; justify-items: center;
}

.app-icon { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; max-width: 140px; text-decoration: none; color: var(--ink); }
.app-tile {
    position: relative; width: var(--icon); height: var(--icon); border-radius: calc(var(--icon) * 0.225);
    background: linear-gradient(180deg, var(--c1), var(--c2)); color: var(--g);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.app-glyph { width: 46%; height: 46%; }
.app-tile.has-image { background: #fff; }
.app-tile.has-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.app-icon:hover .app-tile { transform: translateY(-2px) scale(1.03); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 12px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.app-icon:active .app-tile { transform: scale(0.96); }
.app-badge {
    position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
    background: var(--coral); color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.app-ext {
    position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 999px; background: #fff; color: var(--ink);
    display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.app-label { display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; max-width: 100%; font-size: 13px; font-weight: 500; line-height: 1.25; text-align: center; }
.app-label > span:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.app-new { width: 7px; height: 7px; border-radius: 999px; background: var(--teal); flex: none; }

/* telefonos ikonblokk a lista fölött */
.phone-apps { display: none; position: relative; margin: 6px 2px 12px; border-radius: 26px; overflow: hidden; padding: 18px 6px 16px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1); }
.phone-apps-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; }
.phone-apps .app-icon { --icon: 58px; }
.phone-apps .app-label { font-size: 11px; }

/* ---------- cikkolvasó ---------- */
.reader { overflow-y: auto; background: #fff; }
.reader-bar, .app-bar {
    position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px;
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.back { display: inline-flex; align-items: center; gap: 2px; font-size: 16px; font-weight: 600; text-decoration: none; }
.back-phone { display: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--fill); }
.article { max-width: 760px; margin: 0; padding: 32px 40px 80px; }
.preview-note { background: #FFF4CC; color: #876500; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin: 0 0 16px; }
.article-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--gray); }
.pill { padding: 3px 10px; border-radius: 999px; background: var(--teal-tint); color: var(--teal); font-weight: 600; }
.article h1 { margin: 14px 0 12px; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
.lead { margin: 0 0 24px; font-size: 19px; line-height: 1.5; color: var(--gray); }
.cover { width: 100%; border-radius: 16px; display: block; margin-bottom: 26px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; margin-bottom: 26px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose { font-size: 17px; line-height: 1.68; color: var(--ink2); text-align: justify; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.prose :is(h1, h2, h3, h4) { color: var(--ink); text-align: left; letter-spacing: -0.02em; line-height: 1.25; margin: 1.8em 0 0.6em; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 20px; }
.prose p { margin: 0 0 1.1em; }
.prose img { height: auto; border-radius: 14px; display: block; margin: 1.4em auto; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--teal); color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose ul, .prose ol { padding-left: 1.3em; text-align: left; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.tag { padding: 5px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; color: var(--ink2); }
.follow { margin-top: 28px; padding: 22px; border-radius: 18px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.follow strong { font-size: 18px; }
.follow > span { font-size: 14px; color: var(--gray); }
.follow-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.next { margin-top: 16px; display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; text-decoration: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.next img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.next span { display: flex; flex-direction: column; gap: 4px; }
.next small { font-size: 12px; color: var(--gray); }
.next strong { font-size: 16px; font-weight: 650; }
.comments { margin-top: 36px; }
.comments h2 { font-size: 20px; letter-spacing: -0.01em; }
.comment { padding: 14px 0; border-top: 1px solid var(--line); }
.comment p { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink2); white-space: pre-line; }
.comment-head { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.comment-head span { color: var(--gray); font-size: 13px; }
.comment.reply { margin: 10px 0 0 22px; padding: 10px 0 0 14px; border-top: 0; border-left: 2px solid var(--line); }

/* ---------- gombok, kártyák ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px;
    background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; border: 0;
}
.btn:hover { background: #fafafa; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--teal-hover); color: #fff; }
.btn-light { background: #fff; box-shadow: none; }
.btn-block { width: 100%; height: 52px; border-radius: 14px; font-size: 17px; margin-top: 10px; }
.card { background: #fff; border-radius: 22px; padding: 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06); }

/* ---------- ikonból nyitott oldal ---------- */
.app-stage { overflow: hidden; }
.app-window { position: absolute; inset: 18px; border-radius: 26px; overflow: hidden; background: #F2F2F7; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; }
.app-bar { display: grid; grid-template-columns: 1fr auto 1fr; background: rgba(242, 242, 247, 0.9); }
.app-bar strong { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
/* az app bezárása: X az ablak bal felső sarkában */
.app-bar-side { flex: 0 0 32px; }
.app-close {
    flex: 0 0 32px; width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, 0.06); color: #334155; text-decoration: none; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.app-close:hover { background: rgba(15, 23, 42, 0.11); color: #0F172A; }
.app-close:active { transform: scale(0.92); }
.app-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.app-content { flex: 1; overflow-y: auto; padding-bottom: 40px; }
.app-hero { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.app-inner { max-width: 760px; margin: 0; padding: 24px 40px; display: flex; flex-direction: column; gap: 14px; }
/* a zárolt és a belépés oldal kártyája középen marad */
.app-inner.app-locked, .app-inner.auth { margin: 0 auto; padding: 24px; }
.app-head { display: flex; align-items: center; gap: 14px; }
.app-head .app-icon { --icon: 64px; width: auto; }
.app-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.025em; }
.app-head p { margin: 2px 0 0; color: var(--gray); font-size: 15px; }
.soon { color: var(--gray); }
.app-function { flex: 1; min-height: 0; overflow-y: auto; }
/* a funkció ablak címe ugyanúgy, mint a szöveges appoknál: ikon + név + alcím */
.app-function-head { padding: 24px 40px 0; max-width: 760px; }
/* a keret olyan magas, mint a tartalma (a kalkulátor jelenti), így az ablak egészében gördül */
.app-frame { display: block; width: 100%; height: 70vh; border: 0; background: transparent; }
.app-locked { align-items: center; text-align: center; padding-top: 60px; }
.app-locked > .app-icon { --icon: 80px; width: auto; }
.app-locked > h1 { margin: 6px 0 0; font-size: 26px; letter-spacing: -0.02em; }
.app-locked > p { margin: 0; font-size: 16px; color: var(--ink2); }
.app-lock {
    position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 999px; background: var(--ink); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.app-icon.is-locked .app-tile { filter: saturate(0.7); }

/* ---------- menüoldalak ---------- */
.menu-page { overflow-y: auto; padding: 48px 36px 80px; }
.menu-wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.menu-wrap.narrow { max-width: 760px; gap: 16px; }
.menu-wrap h1 { margin: 0; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.hero-split { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-text { flex: 1 1 440px; display: flex; flex-direction: column; gap: 16px; }
.hero-text .lead, .menu-wrap .lead { margin: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.hero-card { flex: 1 1 360px; display: flex; flex-direction: column; gap: 8px; }
.placeholder { color: var(--gray); font-style: italic; }
.calc { flex: 1 1 380px; display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 20px; }
.calc-title { font-size: 18px; margin-bottom: 4px; }
.calc-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--gray); }
.calc-row span { display: flex; justify-content: space-between; }
.calc-row output { color: var(--ink); font-weight: 650; }
.calc-row input[type="range"] { width: 100%; accent-color: var(--teal); }
.calc-result { padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.calc-result span { font-size: 14px; color: var(--gray); }
.calc-result strong { font-size: clamp(32px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; color: var(--teal); }
.calc-result small { font-size: 12px; color: var(--gray); }
.steps { display: flex; gap: 16px; flex-wrap: wrap; }
.step { flex: 1 1 260px; display: flex; flex-direction: column; gap: 10px; }
.step strong { font-size: 19px; letter-spacing: -0.01em; }
.step p { margin: 0; line-height: 1.55; }
.step-n { width: 34px; height: 34px; border-radius: 999px; background: var(--teal-tint); color: var(--teal); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.cta-band { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 28px 32px; border-radius: 24px; background: var(--ink); color: #fff; }
.cta-band > div { display: flex; flex-direction: column; gap: 6px; }
.cta-band strong { font-size: 24px; letter-spacing: -0.02em; }
.cta-band span { font-size: 15px; color: #D1D1D6; }

/* ---------- belépés ---------- */
.auth, .app-locked:has(.auth-card) { align-items: center; padding-top: 40px; }
.auth-card {
    width: 100%; max-width: 440px; margin: 0 auto; padding: 32px 32px 0; overflow: hidden; border-radius: 24px; background: #fff; text-align: left;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.07);
}
.auth-card > :last-child:not(.join-team):not(.auth-foot) { margin-bottom: 32px; }
.auth-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; }
.auth-head .app-icon { --icon: 64px; width: auto; }
.auth-chip {
    margin-top: 16px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
    background: var(--teal-tint); color: var(--teal); font-size: 12px; font-weight: 650; letter-spacing: 0.01em;
}
.auth-head h1 { margin: 10px 0 8px; font-size: 24px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
.auth-lead { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--gray); }
.auth-lead b { color: var(--ink); font-weight: 650; }
.auth-icon, .auth-avatar { width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; background: var(--teal-tint); color: var(--teal); }
.auth-avatar { border-radius: 999px; background: var(--teal); color: #fff; font-size: 20px; font-weight: 700; }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-label { font-size: 13px; font-weight: 600; color: var(--ink2); }
.auth-field { position: relative; }
.auth-field svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #A1A1A6; pointer-events: none; }
.auth-input {
    width: 100%; height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid #DCDCE0; background: #fff;
    font: inherit; font-size: 16px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.auth-field .auth-input { padding-left: 44px; }
.auth-input::placeholder { color: #B0B0B5; }
.auth-input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13, 158, 153, 0.16); }
.auth-code { text-align: center; font-size: 28px; font-weight: 700; letter-spacing: 0.4em; font-variant-numeric: tabular-nums; padding-left: 0.4em; }
.auth-submit {
    margin-top: 6px; display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; border: 0; border-radius: 14px;
    background: var(--teal); color: #fff; font: inherit; font-size: 16px; font-weight: 650; text-decoration: none; cursor: pointer; transition: background .15s;
}
.auth-submit:hover { background: var(--teal-hover); color: #fff; }
.auth-submit.is-secondary { background: var(--bg); color: var(--ink); }
.auth-submit.is-secondary:hover { background: #ECECF0; color: var(--ink); }
.auth-error { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: #C0362C; }
.auth-ok { margin: 0 0 12px; font-size: 14px; color: var(--teal); font-weight: 600; text-align: center; }
.auth-fine { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--gray); text-align: center; }
.auth-fine a { color: var(--teal); font-weight: 600; }
.auth-dev { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: #FFF4CC; font-size: 13px; color: #6B5200; text-align: center; }
.auth-badge { align-self: center; display: inline-block; margin: 10px 0 0; padding: 5px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; color: var(--gray); }
.auth-badge.is-team { background: var(--teal-tint); color: var(--teal); font-weight: 600; }
.auth-logout { border: 0; background: none; padding: 0; color: #C0362C; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.auth-chip.is-plain { background: var(--bg); color: var(--gray); }
.auth-row { display: flex; gap: 8px; }
.auth-row .auth-field { flex: 1; min-width: 0; }
.auth-save { flex: none; height: 52px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; }
.auth-save:hover { background: #ECECF0; }
.auth-help { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--gray); }
.auth-links { margin-top: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.auth-links a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 550; }
.auth-links a + a { border-top: 1px solid var(--line); }
.auth-links a > svg:first-child { color: var(--teal); }
.auth-links a > span { flex: 1; }
.auth-links a > svg:last-child { color: #C7C7CC; }
.auth-links a:hover { background: #FAFAFB; }
/* a kártya alján, teljes szélességű sáv (kijelentkezés, tájékoztatás) */
.auth-foot { margin: 28px -32px 0; padding: 16px 32px; background: #F7F7F9; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--gray); }
.auth-foot.is-info { display: block; line-height: 1.5; }
.auth-foot b { color: var(--ink); font-weight: 650; }
.join-team + .auth-foot { margin-top: 0; }
.auth-foot .auth-logout { margin: 0; flex: none; }
/* csatlakozás: a kártya alján, teljes szélességű sávban */
.join-team { margin: 28px -32px 0; padding: 20px 32px 24px; background: #F7F7F9; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; text-align: left; }
.join-team strong { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.join-team span { font-size: 13.5px; line-height: 1.5; color: var(--gray); }
.join-link { margin-top: 8px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 650; color: var(--teal); text-decoration: none; }
.join-link svg { transition: transform .15s; }
.join-link:hover svg { transform: translateX(3px); }
@media (max-width: 599px) {
    .auth, .app-locked:has(.auth-card) { padding: 16px 14px 32px; }
    .auth-card { padding: 26px 20px 0; border-radius: 20px; }
    .auth-card > :last-child:not(.join-team):not(.auth-foot) { margin-bottom: 26px; }
    .join-team { margin: 24px -20px 0; padding: 18px 20px 22px; }
    .auth-foot { margin: 24px -20px 0; padding: 14px 20px; }
    .auth-head h1 { font-size: 22px; }
}

/* ---------- felugró belépőablak ---------- */
.login-dialog {
    width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px;
    background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(16, 24, 40, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04); overflow: auto; text-align: left;
}
.login-dialog::backdrop { background: rgba(17, 24, 39, 0.32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.login-dialog[open] { animation: login-in .22s cubic-bezier(.2,.8,.3,1); }
@keyframes login-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.login-head { display: flex; align-items: center; gap: 14px; padding: 22px 22px 18px 26px; border-bottom: 1px solid var(--line); }
.login-badge { flex: none; width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--teal-tint); color: var(--teal); }
.login-titles { flex: 1; min-width: 0; }
.login-titles h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.login-titles p { margin: 2px 0 0; font-size: 13px; color: var(--gray); overflow-wrap: anywhere; }
.login-titles b { color: var(--ink); font-weight: 600; }
.login-close {
    flex: none; align-self: flex-start; width: 32px; height: 32px; border: 0; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--gray); cursor: pointer;
}
.login-close:hover { color: var(--ink); background: #ECECF0; }
.login-body { padding: 22px 26px 24px; gap: 8px; }
.login-lead { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
.login-lead b { color: var(--teal); font-weight: 650; }
.login-note { margin: 6px 0 0; display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--gray); }
.login-note svg { flex: none; margin-top: 2px; color: var(--teal); }
.login-join {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 26px 20px;
    background: var(--teal-tint); border-top: 1px solid rgba(13, 158, 153, 0.18);
}
.login-join div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.login-join strong { font-size: 14px; font-weight: 650; color: var(--ink); }
.login-join span { font-size: 12.5px; line-height: 1.45; color: var(--ink2); }
.login-join-btn {
    flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 11px;
    background: #fff; color: var(--teal); font-size: 14px; font-weight: 650; text-decoration: none; box-shadow: 0 0 0 1px rgba(13, 158, 153, 0.3);
}
.login-join-btn:hover { background: var(--teal); color: #fff; }
.auth-linkbtn { border: 0; padding: 0; background: none; font: inherit; color: var(--teal); font-weight: 600; cursor: pointer; }
@media (max-width: 599px) {
    .login-dialog { border-radius: 20px; }
    .login-head { padding: 18px 16px 14px 20px; }
    .login-body { padding: 18px 20px 20px; }
    .login-join { flex-direction: column; align-items: stretch; padding: 16px 20px 20px; }
    .login-join-btn { justify-content: center; }
}

/* ---------- Signal-közösség (a Signal kékjével) ---------- */
:root { --signal: #3A76F0; --signal-dark: #2C5FD0; --signal-tint: #EEF3FE; }
.community-card { container-type: inline-size; margin-top: 32px; padding: 20px 22px; border-radius: 16px; text-align: left; background: #F4F7FE; border: 1px solid rgba(58, 118, 240, 0.2); }
.community-grid {
    display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon text btn" "why why why"; gap: 12px 14px; align-items: center;
}
/* a kép kék alapjával megegyező szegély: a csésze nem ér a széléhez */
.community-icon { grid-area: icon; width: 84px; height: 84px; box-sizing: border-box; padding: 10px; border-radius: 20px; background: #3B82EA; object-fit: contain; }
.community-text { grid-area: text; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.community-text strong { font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--ink); letter-spacing: -0.01em; text-wrap: balance; }
.community-text span { font-size: 14px; line-height: 1.45; color: var(--ink2); }
.community-perks { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.community-perks li { display: flex; align-items: center; gap: 7px; font-size: 14px; line-height: 1.4; color: var(--ink2); }
.community-perks svg { width: 15px; height: 15px; fill: none; stroke: var(--signal); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.community-btn {
    grid-area: btn; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 20px; border-radius: 12px;
    background: var(--signal); color: #fff; font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(58, 118, 240, 0.3); transition: background .15s, transform .15s;
}
.community-btn:hover { background: var(--signal-dark); transform: translateY(-1px); }
.community-btn svg { transition: transform .15s; }
.community-btn:hover svg { transform: translateX(2px); }
.community-why { grid-area: why; margin: 0; padding-top: 12px; border-top: 1px solid rgba(58, 118, 240, 0.15); display: flex; gap: 6px; align-items: center; font-size: 12px; line-height: 1.4; color: var(--gray); }
.community-why svg { flex: none; }
.community-why b { font-weight: 600; color: var(--ink2); }
/* keskeny dobozban: ikon + cím egy sorban, alattuk teljes szélességben a leírás, a gomb és a magyarázat */
@container (max-width: 520px) {
    .community-grid { grid-template-columns: auto 1fr; grid-template-areas: "icon title" "desc desc" "btn btn" "why why"; gap: 12px; }
    .community-text { display: contents; }
    .community-text strong { grid-area: title; align-self: center; }
    .community-text span, .community-text .community-perks { grid-area: desc; }
    .community-icon { width: 52px; height: 52px; padding: 7px; border-radius: 13px; }
    .community-btn { width: 100%; height: 48px; }
    .community-why { align-items: flex-start; }
    .community-why svg { margin-top: 2px; }
}
.app-locked .community-card { max-width: 460px; width: 100%; margin-top: 18px; }
.community-strip {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink);
    background: var(--signal-tint); border: 1px solid rgba(58, 118, 240, 0.16);
}
.community-strip img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; }
.community-strip > span:not(.community-strip-go) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.community-strip strong { font-size: 13px; line-height: 1.3; }
.community-strip small { font-size: 12px; color: var(--gray); line-height: 1.35; }
.community-strip-go { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--signal); color: #fff; font-size: 13px; font-weight: 650; }
.app-function-foot { padding: 0 18px 14px; }

/* ---------- élő olvasószám ---------- */
.presence {
    position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + var(--tabbar) + env(safe-area-inset-bottom)); z-index: 20; display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); font-size: 13px; color: var(--ink);
}
.presence-dot { width: 10px; height: 10px; border-radius: 999px; background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }

/* ---------- alsó fülsáv (hajtogatható, telefon) ---------- */
.tabbar {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 4px env(safe-area-inset-bottom); background: rgba(250, 250, 252, 0.88);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line);
}
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: #8E8E93; font-size: 10px; font-weight: 500; }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.tab.is-active { color: var(--teal); font-weight: 650; }
.tab-icon { position: relative; display: inline-flex; }
.tab-icon .badge { position: absolute; top: -4px; left: 50%; margin-left: 6px; min-width: 17px; height: 17px; font-size: 10px; }

/* ---------- töréspontok ---------- */
@media (max-width: 1199px) {
    .pane-list { flex-basis: 33.333%; width: 33.333%; min-width: 300px; }
    .topnav-item { padding: 7px 12px; font-size: 13px; }
    .hs-scroll { padding: 36px 24px 56px; }
    .hs-grid { grid-template-columns: repeat(auto-fill, 112px); row-gap: 26px; }
    :root { --icon: 66px; }
}

/* hajtogatható kinyitva és álló tablet: két panel + alsó fülsáv */
@media (max-width: 899px) {
    .app-function-head { padding-left: 18px; padding-right: 18px; }
    :root { --topbar: 52px; --tabbar: 64px; }
    .topbar { display: none; }
    .account-list { display: inline-flex; }
    .account-top { display: none; }
    .list-brand { padding: 0 14px; }
    .brand-mark { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
    .tabbar { display: flex; }
    .split { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
    .pane-list { flex-basis: 42%; width: 42%; min-width: 300px; }
    .list-title h2 { font-size: 28px; }
    .article { padding: 22px 24px 60px; }
    .app-window { inset: 10px; border-radius: 22px; }
    .menu-page { padding: 32px 22px 60px; }
}

/* telefon: egy panel – a Home a lista, a többi menüpont a jobb oldal teljes szélességben */
@media (max-width: 599px) {
    .hs-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .app-inner { padding-left: 18px; padding-right: 18px; }
    .pane-list { flex: 1 1 auto; width: 100%; min-width: 0; max-width: none; border-right: 0; background: var(--bg); }
    .shell:not(.page-home) .pane-list { display: none; }
    .page-home .right-col, .page-post .pane-list { display: none; }
    .page-menu .topbar { display: flex; justify-content: flex-start; }
    .page-menu .topbar .topnav { display: none; }
    .page-menu .topbar-brand { display: flex; }
    .list-head { padding-top: 12px; }
    .back-desktop { display: none; }
    .back-phone { display: inline; }
    .article { padding: 18px 18px 50px; }
    .prose { font-size: 16.5px; }
    .lead { font-size: 17px; }
    .app-window { inset: 0; border-radius: 0; box-shadow: none; }
    .app-stage .wallpaper { display: none; }
    /* telefonon a cikkből a listába térünk vissza: bezáráskor a lista kerül a cikk alá */
    .page-post .home-under { display: none; }
    .page-post.is-leaving .pane-list { display: flex; position: absolute; inset: 0; z-index: 0; }
    .page-post.is-leaving .right-col { position: relative; z-index: 1; background: transparent; }
    .presence { right: calc(12px + env(safe-area-inset-right)); font-size: 12px; padding: 6px 12px 6px 8px; }
    .cta-band { padding: 22px; }
}

/* telefon elfordítva (alacsony, széles képernyő): egy panel, és az egész oldal görgethető */
@media (max-height: 500px) and (orientation: landscape) {
    :root { --topbar: 52px; --tabbar: 56px; }
    .topbar { display: none; }
    .account-list { display: inline-flex; }
    .tabbar { display: flex; height: calc(56px + env(safe-area-inset-bottom)); }
    .shell { height: auto; min-height: 100dvh; overflow: visible; }
    .split { display: block; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
    .pane-list { display: block; width: 100%; min-width: 0; max-width: none; border-right: 0; background: var(--bg); }
    .shell:not(.page-home) .pane-list { display: none; }
    .page-home .right-col, .page-post .pane-list { display: none; }
    .list-scroll, .hs-scroll, .reader, .app-content { overflow: visible; height: auto; }
    .right-col, .right-main, .right-main > *, .home-screen, .app-stage { display: block; height: auto; min-height: 0; overflow: visible; }
    .app-window { position: relative; inset: auto; border-radius: 0; box-shadow: none; }
    .app-function { display: block; }
    .app-function-head { padding-left: 40px; padding-right: 40px; }
    .app-stage .wallpaper, .home-under { display: none; }
    .shell.page-post.is-leaving .pane-list { display: none; }
    .reader-bar, .app-bar { position: sticky; top: 0; z-index: 5; }
    .back-desktop { display: none; }
    .back-phone { display: inline; }
    .list-scroll { padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
    .article, .app-inner { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
}

@media (prefers-reduced-motion: reduce) {
    .app-tile { transition: none; }
}
