/* =====================================================================
   Projnana — mobile / PWA layout (< 768px). Loaded only on small screens.
   A dedicated layout, not the desktop page shrunk down.
   ===================================================================== */
:root { --header-h: 58px; }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.d-header, .article-side, .most-read { display: none !important; }
.wrap, .wrap-wide, .wrap-narrow { padding-inline: 16px; }

/* Header */
.m-header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 4px;
  height: calc(var(--header-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0 4px;
  background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); transition: transform .25s var(--ease);
}
.m-header.is-hidden { transform: translateY(-100%); }
.brand--m { flex: 1; gap: 7px; }
.brand--m .brand-name { font-size: 1.2rem; }
.brand--m .brand-tag { font-size: .64rem; }
.m-header-actions { display: flex; align-items: center; gap: 2px; }
.m-header .lang-switch--pill { height: 30px; }
.m-header .lang-switch--pill a { padding: 0 8px; font-size: .78rem; }

/* Drawer */
.m-drawer { position: fixed; inset: 0; z-index: 80; background: rgba(14,22,40,.45); }
.m-drawer[hidden] { display: none; }
.m-drawer-panel {
  position: absolute; inset: 0 auto 0 0; width: min(86vw, 340px); background: var(--paper); overflow-y: auto;
  padding: calc(12px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  animation: drawer-in .22s var(--ease);
}
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
.m-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.m-drawer-search input { min-height: 46px; }
.m-drawer-nav, .m-drawer-cats { list-style: none; margin: 14px 0; padding: 0; }
.m-drawer-nav a { display: block; padding: 12px 4px; font-size: 1.05rem; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.m-drawer-nav a[aria-current] { color: var(--flame-text); }
.m-drawer-label { margin: 18px 0 4px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.m-drawer-cats a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; color: var(--text); text-decoration: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: none; }

/* Bottom navigation */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px;
  color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 600; border: 0; background: none; cursor: pointer; line-height: 1.2;
}
.bottom-nav [aria-current="page"] { color: var(--ink); }
.bottom-nav [aria-current="page"] .icon { color: var(--flame); }
.bottom-nav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }

/* Hero as a rounded card */
.hero { padding: 14px 16px 0; }
.hero-track { gap: 12px; border-radius: var(--r-lg); }
.hero-slide { border-radius: var(--r-lg); min-height: 420px; }
.hero-body { padding: 18px 18px 20px; min-height: 420px; }
.hero-title { font-size: 1.6rem; }
html[lang="kn"] .hero-title { font-size: 1.45rem; }
.hero-dek { display: none; }
.hero-go { right: 16px; bottom: 18px; width: 42px; height: 42px; }
.hero-body .card-meta { padding-right: 52px; }
.hero-dots { padding-top: 8px; }

/* Category strip: horizontal scroll of round icons */
.cat-strip-wrap { padding: 18px 0 4px; }
.cat-strip { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.cat-strip::-webkit-scrollbar { display: none; }
.cat-strip li { flex: 0 0 auto; scroll-snap-align: start; }
.cat-tile { width: 74px; }
.cat-tile .cat-ico { width: 56px; height: 56px; border-radius: 50%; }
.cat-name { font-size: .76rem; margin-top: 6px; }
.cat-count { display: none; }

/* Sections */
.section { padding-block: 20px; }
.section-head h2 { font-size: 1.25rem; }
.section--popular { background: var(--mist); }

/* Cards become rows: image left, text right */
.card-grid { gap: 0; }
.card { flex-direction: row; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.card-grid > .card:last-child { border-bottom: 0; }
.card-img { width: 112px; aspect-ratio: 1; }
.card-title { font-size: 1.02rem; }
html[lang="kn"] .card-title { font-size: .98rem; }
.card-excerpt { display: none; }
.card-meta .avatar, .card-meta .avatar-initials { display: none; }
.card-tags { margin-bottom: 4px; }
.card-grid--feature .card { flex-direction: column; }
.card-grid--feature .card-img { width: 100%; aspect-ratio: 16 / 9; }
.section--popular .card { border-color: #E2E6EE; }
.row-grid { margin-top: 4px; }

.author-grid { gap: 10px; }
.author-card { padding: 12px; }

/* Article */
.article-head { padding-top: 12px; }
.article-hero { padding-inline: 0; margin-bottom: 20px; }
.article-hero img { border-radius: 0; }
.article-hero figcaption { padding-inline: 16px; }
.byline { margin-bottom: 18px; }
.prose { font-size: 1.08rem; }
.prose[lang="kn"], .article[lang="kn"] .prose { font-size: 1.04rem; }
.prose figure.align-left, .prose figure.align-right, .prose figure.w-25, .prose figure.w-50, .prose figure.w-75 { float: none; width: 100%; margin: 1.4em 0; }
.adjacent { grid-template-columns: 1fr; }
.adj-next { text-align: left; align-items: flex-start; }
.author-box { flex-direction: column; gap: 10px; }
.share-label { width: 100%; }
.author-hero-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
.author-photo { width: 110px; height: 110px; }
.search-big { padding-left: 12px; }
.search-big .btn { padding: 0 14px; }
.toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
.sw-update, .install-btn { bottom: calc(76px + env(safe-area-inset-bottom)); }
.listing-head .chip-row { position: relative; flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 6px; scrollbar-width: none; }
.listing-head .chip-row::-webkit-scrollbar { display: none; }
.footer-grid { grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
