/* Karim — design system dal mockup "Karim Dashboard - riferimento"
 * Ruoli palette: verde brand #0E4234 (superfici scure, hero, nav; gradiente #0C3A2E→#134A3B)
 * crema #F1ECDF sfondo · card #FBF8F0 (mai bianco puro) · testo #16170F
 * rosso #C23B2E / #E8837A accento identitario · oro #C79A3E/#E7C877 accento caldo secondario
 * Tipografia: Marcellus (titoli/numeri) · Manrope 500-800 (UI) · Amiri (arabo)
 * Regole: niente emoji (icone lineari stroke 1.75) · card r22 bordo rgba(22,23,15,.07)
 * ombra 0 10px 30px -20px · etichette UPPERCASE ls 2px #A29E88 · stella a 8 punte solo texture
 */
:root {
  --verde: #0E4234;
  --verde-g1: #0C3A2E;
  --verde-g2: #134A3B;
  --verde-hover: #1C6B50;
  --crema: #F1ECDF;
  --card: #FBF8F0;
  --ink: #16170F;
  --rosso: #C23B2E;
  --rosso-chiaro: #E8837A;
  --rosso-tenue: #F0A79C;
  --oro: #C79A3E;
  --oro-chiaro: #E7C877;
  --label: #A29E88;
  --muto: #8B8874;
  --bordo: rgba(22, 23, 15, 0.07);
  --tinta-verde: rgba(14, 66, 52, 0.09);
  --tinta-oro: rgba(199, 154, 62, 0.15);
  --tinta-rossa: rgba(194, 59, 46, 0.12);
  --ombra-card: 0 10px 30px -20px rgba(12, 58, 46, 0.5);
  --ombra-hero: 0 24px 60px -24px rgba(12, 58, 46, 0.7);
  --r-card: 22px;
  --font-title: 'Marcellus', serif;
  --font-ui: 'Manrope', system-ui, sans-serif;
  --font-ar: 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', serif;
}

[data-theme="dark"] {
  --crema: #0C1512;
  --card: #132119;
  --ink: #EDEBE0;
  --label: #8F8C77;
  --muto: #9A978A;
  --bordo: rgba(241, 236, 223, 0.08);
  --tinta-verde: rgba(62, 143, 110, 0.16);
  --tinta-oro: rgba(231, 200, 119, 0.13);
  --tinta-rossa: rgba(232, 131, 122, 0.14);
  --ombra-card: 0 10px 30px -20px rgba(0, 0, 0, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-weight: 500;
  background: var(--crema);
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: 118px; /* nav flottante */
  background-image:
    radial-gradient(circle at 12% 18%, rgba(14, 66, 52, 0.06), transparent 38%),
    radial-gradient(circle at 88% 82%, rgba(199, 154, 62, 0.07), transparent 42%);
}

.arabic { font-family: var(--font-ar); direction: rtl; unicode-bidi: isolate; }

.k-ico { width: 24px; height: 24px; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* Etichetta maiuscola ricorrente */
.kicker {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--label); font-weight: 700;
}

/* ---------- Header ---------- */
header.topbar {
  position: relative;
  background: linear-gradient(120deg, #0C3A2E 0%, #12483A 60%, #0E4234 100%);
  color: var(--crema);
  overflow: hidden;
  padding: max(16px, env(safe-area-inset-top)) 18px 16px;
  display: flex; align-items: center; gap: 13px;
}
header.topbar .star-wash {
  position: absolute; inset: 0; opacity: 0.09; pointer-events: none;
}
header.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, #0E4234 0 33%, #F1ECDF 33% 66%, #C23B2E 66% 100%);
}
.logo-badge {
  position: relative; width: 50px; height: 50px; flex: none; border-radius: 14px;
  background: linear-gradient(150deg, #C23B2E, #8E241A);
  border: 1.5px solid rgba(231, 200, 119, 0.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer; padding: 0; font-family: inherit; -webkit-tap-highlight-color: transparent;
}
.logo-badge:active { transform: scale(0.96); }
.header-gear {
  flex: none; margin-inline-start: 12px; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(241, 236, 223, 0.10); border: 1px solid rgba(231, 200, 119, 0.20);
  color: var(--crema); display: grid; place-items: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.header-gear:active { background: rgba(241, 236, 223, 0.20); }
.header-gear .k-ico { width: 21px; height: 21px; stroke: var(--crema); }
.logo-badge svg.star { position: absolute; opacity: 0.4; }
.logo-badge .k { position: relative; font-family: var(--font-title); font-size: 24px; line-height: 1; color: #F1ECDF; margin-bottom: -2px; }
.logo-badge .ar { position: relative; font-family: var(--font-ar); font-size: 10px; line-height: 1; color: rgba(241, 236, 223, 0.85); }
.topbar h1 { position: relative; line-height: 1.15; font-weight: 400; }
.topbar h1 .wordmark { display: flex; align-items: baseline; gap: 8px; }
.topbar h1 .wordmark .lat { font-family: var(--font-title); font-size: 22px; letter-spacing: 0.5px; }
.topbar h1 .wordmark .arabic { font-size: 18px; color: var(--oro-chiaro); }
.topbar h1 small { display: block; font-size: 11.5px; color: rgba(241, 236, 223, 0.62); font-weight: 500; margin-top: 2px; }
.topbar .hijri-badge { position: relative; margin-inline-start: auto; text-align: end; line-height: 1.3; }
.topbar .hijri-badge .arabic { font-size: 16px; color: var(--oro-chiaro); }
.topbar .hijri-badge .lat {
  display: block; font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(241, 236, 223, 0.6); font-weight: 600; margin-top: 3px;
}

/* ---------- Layout ---------- */
main { position: relative; max-width: 1180px; margin: 0 auto; padding: 22px 16px 0; }
.view { display: none; animation: fadein .25s ease; }
.view.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.card {
  background: var(--card);
  border: 1px solid var(--bordo);
  border-radius: var(--r-card);
  box-shadow: var(--ombra-card);
  padding: 20px;
  margin-bottom: 14px;
}
h2.section {
  font-family: var(--font-title); font-weight: 400; font-size: 1.35rem;
  margin: 22px 0 12px; display: flex; align-items: baseline; gap: 10px;
}
h2.section .arabic { font-size: 1.15rem; color: var(--verde); }
[data-theme="dark"] h2.section .arabic { color: var(--oro-chiaro); }
.muted { color: var(--muto); font-size: .82rem; line-height: 1.55; }

/* ---------- Saluto ---------- */
.salam { text-align: center; margin: 4px 0 18px; }
.salam .arabic { font-size: 1.5rem; color: var(--verde); }
[data-theme="dark"] .salam .arabic { color: var(--oro-chiaro); }
.salam .lat { font-size: .85rem; color: var(--muto); font-weight: 500; margin-inline-start: 8px; }

/* ---------- Hero prossima preghiera (home + orari) ---------- */
.hero-prayer {
  position: relative; border-radius: 26px; overflow: hidden;
  background: linear-gradient(130deg, #0C3A2E 0%, #134A3B 55%, #0D4133 100%);
  color: #F1ECDF; padding: 24px 20px;
  box-shadow: var(--ombra-hero);
  border: none; margin-bottom: 16px;
  cursor: pointer;
}
.hero-prayer .geo { position: absolute; right: -60px; top: -80px; opacity: 0.14; pointer-events: none; }
.hero-prayer .hp-label {
  position: relative; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--rosso-tenue); font-weight: 700;
}
.hero-prayer .hp-row { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hero-prayer .hp-name { font-family: var(--font-title); font-size: 38px; line-height: 1; margin-top: 12px; }
.hero-prayer .hp-name .arabic { font-size: 26px; color: var(--oro-chiaro); margin-inline-start: 8px; }
.hero-prayer .hp-sub { font-size: 13px; color: rgba(241, 236, 223, 0.7); margin-top: 10px; font-weight: 500; }
.hero-prayer .hp-time {
  font-family: var(--font-title); font-size: 46px; line-height: 1;
  color: var(--rosso-chiaro); font-variant-numeric: tabular-nums;
}
.hero-prayer .hp-progress { position: relative; margin-top: 20px; }
.hero-prayer .hp-progress .labels {
  display: flex; justify-content: space-between;
  font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(241, 236, 223, 0.55); font-weight: 600; margin-bottom: 8px;
}
.hero-prayer .hp-progress .labels .next { color: var(--rosso-chiaro); }
.hero-prayer .hp-progress .bar { height: 6px; border-radius: 99px; background: rgba(241, 236, 223, 0.14); overflow: hidden; }
.hero-prayer .hp-progress .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3E8F6E, #C23B2E); width: 0; transition: width .6s ease; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.widget {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--bordo); border-radius: var(--r-card);
  box-shadow: var(--ombra-card); padding: 18px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.widget:active { background: var(--tinta-verde); }
.widget .w-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.widget .chip {
  width: 42px; height: 42px; flex: none; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tinta-verde);
}
.widget .chip.oro { background: var(--tinta-oro); }
.widget .chip.rossa { background: var(--tinta-rossa); }
.widget .chip .k-ico { width: 22px; height: 22px; stroke: var(--verde); }
.widget .chip.oro .k-ico { stroke: #B78A2E; }
.widget .chip.rossa .k-ico { stroke: var(--rosso); }
[data-theme="dark"] .widget .chip .k-ico { stroke: #6FBF9A; }
[data-theme="dark"] .widget .chip.oro .k-ico { stroke: var(--oro-chiaro); }
[data-theme="dark"] .widget .chip.rossa .k-ico { stroke: var(--rosso-chiaro); }
.widget .w-kick { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--label); font-weight: 700; text-align: end; }
.widget .w-label { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--label); font-weight: 700; margin-top: 16px; }
.widget .w-val { font-family: var(--font-title); font-size: 1.3rem; margin-top: 5px; line-height: 1.2; }
.widget .w-sub { font-size: .78rem; color: var(--muto); margin-top: 5px; font-weight: 500; }
.widget .ghost-ar {
  position: absolute; right: 14px; bottom: 8px; font-family: var(--font-ar);
  font-size: 34px; color: rgba(14, 66, 52, 0.1); pointer-events: none;
}
[data-theme="dark"] .widget .ghost-ar { color: rgba(231, 200, 119, 0.1); }

/* ---------- Orari ---------- */
.location-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; font-size: .9rem; flex-wrap: wrap; }
.location-row .place { font-weight: 700; display: flex; align-items: center; gap: 7px; }
.location-row .place .k-ico { width: 17px; height: 17px; stroke: var(--rosso); }
.location-row button {
  border: 1px solid var(--bordo); background: var(--card); color: var(--ink);
  border-radius: 99px; padding: 7px 15px; font-family: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--ombra-card);
}
.location-row button:active { background: var(--tinta-verde); }

table.times { width: 100%; border-collapse: collapse; }
table.times td { padding: 12px 6px; border-bottom: 1px solid var(--bordo); font-size: .92rem; }
table.times tr:last-child td { border-bottom: none; }
table.times td.t-name { font-weight: 700; }
table.times td.t-name .arabic { color: var(--label); font-size: 1.05rem; margin-inline-start: 8px; font-weight: 400; }
table.times td.t-val { text-align: end; font-variant-numeric: tabular-nums; font-family: var(--font-title); font-size: 1.15rem; }
table.times tr.current { background: var(--tinta-verde); }
table.times tr.current td.t-val { color: var(--rosso); }
[data-theme="dark"] table.times tr.current td.t-val { color: var(--rosso-chiaro); }
table.times tr.minor td { color: var(--muto); font-weight: 500; }
table.times tr.minor td.t-val { font-family: var(--font-ui); font-size: .92rem; }

/* ---------- Ramadan ---------- */
.ramadan-hero {
  position: relative; overflow: hidden; border: none; text-align: center; padding: 28px 20px;
  border-radius: 26px;
  background: linear-gradient(130deg, #0C3A2E 0%, #134A3B 55%, #0D4133 100%);
  color: #F1ECDF; box-shadow: var(--ombra-hero);
}
.ramadan-hero .geo { position: absolute; right: -60px; top: -70px; opacity: 0.13; pointer-events: none; }
.ramadan-hero .arabic { position: relative; color: var(--oro-chiaro); font-size: 1.6rem; }
.ramadan-hero .big { position: relative; font-family: var(--font-title); font-size: 1.9rem; margin: 6px 0; }
.ramadan-hero .sub { position: relative; color: rgba(241, 236, 223, 0.7); font-size: .85rem; font-weight: 500; }

table.ramadan-cal { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.ramadan-cal th {
  text-align: start; padding: 8px 6px; border-bottom: 1.5px solid var(--verde);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--label); font-weight: 700;
}
[data-theme="dark"] table.ramadan-cal th { border-bottom-color: #3E8F6E; }
table.ramadan-cal td { padding: 8px 6px; border-bottom: 1px solid var(--bordo); font-variant-numeric: tabular-nums; }
table.ramadan-cal tr.friday { background: var(--tinta-verde); }
table.ramadan-cal tr.today-r { background: var(--tinta-rossa); font-weight: 700; }

/* ---------- Feste ---------- */
.festa .f-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.festa h3 { font-family: var(--font-title); font-weight: 400; font-size: 1.15rem; }
.festa .arabic { color: var(--verde); font-size: 1.15rem; }
[data-theme="dark"] .festa .arabic { color: var(--oro-chiaro); }
.festa .f-date { font-size: .8rem; font-weight: 700; color: var(--rosso); white-space: nowrap; }
[data-theme="dark"] .festa .f-date { color: var(--rosso-chiaro); }
.festa .f-hijri { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--label); font-weight: 700; }
.festa p { font-size: .88rem; line-height: 1.65; margin-top: 9px; }
.badge-countdown {
  display: inline-block; background: var(--rosso); color: #F1ECDF;
  font-size: .68rem; font-weight: 700; letter-spacing: .5px; padding: 3px 12px; border-radius: 99px; margin-top: 7px;
}

/* ---------- Sure ---------- */
.sura-list button {
  width: 100%; text-align: start; background: var(--card); border: 1px solid var(--bordo);
  border-radius: var(--r-card); padding: 15px 18px; margin-bottom: 10px; cursor: pointer;
  display: flex; align-items: center; gap: 13px; font-family: inherit; color: var(--ink);
  box-shadow: var(--ombra-card);
}
.sura-list button:active { background: var(--tinta-verde); }
.sura-list .s-num {
  width: 42px; height: 42px; flex: none; border-radius: 13px; background: var(--tinta-verde);
  color: var(--verde); display: grid; place-items: center; font-family: var(--font-title); font-size: .95rem;
}
[data-theme="dark"] .sura-list .s-num { color: #6FBF9A; }
.sura-list .s-name { font-family: var(--font-title); font-size: 1.05rem; }
.sura-list .s-sub { font-size: .72rem; color: var(--muto); font-weight: 500; }
.sura-list .s-ar { margin-inline-start: auto; font-size: 1.5rem; color: var(--verde); }
[data-theme="dark"] .sura-list .s-ar { color: var(--oro-chiaro); }

.sura-reader .back-btn {
  background: none; border: none; color: var(--verde); font-weight: 700; font-family: inherit;
  font-size: .9rem; cursor: pointer; padding: 6px 0; margin-bottom: 6px;
}
[data-theme="dark"] .sura-reader .back-btn { color: #6FBF9A; }
.sura-reader .s-title { text-align: center; margin-bottom: 4px; }
.sura-reader .s-title .arabic { font-size: 2.2rem; color: var(--verde); display: block; }
[data-theme="dark"] .sura-reader .s-title .arabic { color: var(--oro-chiaro); }
.sura-reader .s-title h3 { font-family: var(--font-title); font-weight: 400; font-size: 1.4rem; }
.sura-reader .s-title .muted { margin-top: 2px; }
.sura-reader .s-intro { font-size: .85rem; line-height: 1.6; color: var(--muto); text-align: center; margin: 10px 0 4px; }
.basmala { text-align: center; font-family: var(--font-ar); direction: rtl; font-size: 1.6rem; margin: 14px 0 4px; }
.basmala-tr { text-align: center; font-size: .85rem; font-style: italic; color: var(--verde); margin-bottom: 8px; }
[data-theme="dark"] .basmala-tr { color: #9CD3B4; }
.verse { padding: 16px 0; border-bottom: 1px solid var(--bordo); }
.verse:last-child { border-bottom: none; }
.verse .v-ar { font-size: 1.75rem; line-height: 2.3; text-align: justify; }
.verse .v-ar .v-num {
  font-family: var(--font-ui); font-size: .68rem; font-weight: 700; color: var(--verde); background: var(--tinta-verde);
  border-radius: 99px; padding: 2px 9px; margin-inline-start: 8px; vertical-align: middle; unicode-bidi: plaintext;
}
[data-theme="dark"] .verse .v-ar .v-num { color: #6FBF9A; }
.verse .v-tr { font-size: .88rem; line-height: 1.6; font-style: italic; color: var(--verde); margin-top: 10px; }
[data-theme="dark"] .verse .v-tr { color: #9CD3B4; }
.verse .v-it { font-size: .92rem; line-height: 1.65; color: var(--muto); margin-top: 8px; }
.disclaimer-trad {
  font-size: .75rem; color: var(--muto); background: var(--tinta-verde);
  border-radius: 14px; padding: 12px 14px; line-height: 1.55; margin-top: 14px;
}
body.hide-quran .v-ar, body.hide-quran .basmala, body.hide-quran .ghost-ar { display: none; }

/* ---------- Scienza e Corano ---------- */
.sci-intro { font-size: .9rem; line-height: 1.65; color: var(--muto); margin-bottom: 16px; }
.sci-card .sci-ref {
  font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--label); font-weight: 700;
}
.sci-card .sci-titolo { font-family: var(--font-title); font-weight: 400; font-size: 1.2rem; margin: 4px 0 4px; }
.sci-card .verse { padding: 12px 0; }
.sci-card .verse .v-ar { font-size: 1.5rem; line-height: 2.1; }
.sci-card .sci-spiega {
  font-size: .88rem; line-height: 1.65; color: var(--ink); margin-top: 12px;
  border-top: 1px solid var(--bordo); padding-top: 12px;
}
@media (min-width: 700px) { .sci-card .verse .v-ar { font-size: 1.75rem; } }

/* ---------- FAQ ---------- */
.faq-search input {
  width: 100%; padding: 13px 18px; border-radius: 99px; border: 1px solid var(--bordo);
  background: var(--card); color: var(--ink); font-family: inherit; font-size: .95rem;
  box-shadow: var(--ombra-card); outline: none; font-weight: 500;
}
.faq-search input::placeholder { color: var(--label); }
.faq-search input:focus { border-color: var(--verde); }
.faq-cats { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.faq-cats button {
  border: 1px solid var(--bordo); background: var(--card); color: var(--muto);
  border-radius: 99px; padding: 6px 13px; font-family: inherit; font-size: .72rem; font-weight: 700; cursor: pointer;
}
.faq-cats button.active { background: var(--verde); border-color: var(--verde); color: #F1ECDF; }
.faq-item {
  background: var(--card); border: 1px solid var(--bordo); border-radius: var(--r-card);
  margin-bottom: 9px; overflow: hidden; box-shadow: var(--ombra-card);
}
.faq-item .faq-q {
  width: 100%; text-align: start; background: none; border: none; color: var(--ink);
  font-family: inherit; font-size: .92rem; font-weight: 700; padding: 14px 18px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq-item .faq-q::after { content: '+'; font-family: var(--font-title); color: var(--verde); font-size: 1.25rem; flex: none; }
[data-theme="dark"] .faq-item .faq-q::after { color: #6FBF9A; }
.faq-item.open .faq-q::after { content: '–'; color: var(--rosso); }
.faq-item .faq-a { display: none; padding: 0 18px 15px; font-size: .88rem; line-height: 1.65; color: var(--muto); }
.faq-item.open .faq-a { display: block; }
.faq-item .faq-cat-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--verde);
  font-weight: 800; display: block; padding: 12px 18px 0;
}
[data-theme="dark"] .faq-item .faq-cat-tag { color: #6FBF9A; }
.faq-empty { text-align: center; color: var(--muto); padding: 30px 0; font-size: .9rem; }

/* ---------- Qibla ---------- */
.qibla-wrap { text-align: center; }
.compass { width: 240px; height: 240px; margin: 10px auto; position: relative; }
.compass svg { width: 100%; height: 100%; }
.qibla-deg { font-family: var(--font-title); font-size: 2.2rem; }
.qibla-deg small { font-family: var(--font-ui); font-size: .85rem; color: var(--muto); font-weight: 500; }

/* ---------- Impostazioni ---------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--bordo); }
.setting-row:last-child { border-bottom: none; }
.setting-row label { font-size: .9rem; font-weight: 700; }
.setting-row .hint { display: block; font-size: .72rem; color: var(--muto); font-weight: 500; margin-top: 2px; }
.setting-row select, .setting-row input[type="number"] {
  font-family: inherit; font-size: .85rem; font-weight: 600; padding: 9px 11px; border-radius: 12px;
  border: 1px solid var(--bordo); background: var(--card); color: var(--ink); max-width: 46%;
}
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: rgba(22, 23, 15, 0.15); border-radius: 99px; transition: .2s; cursor: pointer; }
[data-theme="dark"] .switch .slider { background: rgba(241, 236, 223, 0.15); }
.switch .slider::before { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--card); top: 3px; left: 3px; transition: .2s; }
.switch input:checked + .slider { background: var(--verde); }
.switch input:checked + .slider::before { transform: translateX(20px); background: #F1ECDF; }

.btn-primary {
  background: var(--verde); color: #F1ECDF; border: none; border-radius: 14px;
  padding: 13px 20px; font-family: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; width: 100%;
}
.btn-primary:active { background: var(--verde-g1); }

/* ---------- Footer ---------- */
footer.mkc {
  text-align: center; font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--label); padding: 22px 0 10px; font-weight: 700;
}
footer.mkc strong { color: var(--verde); font-weight: 700; }
[data-theme="dark"] footer.mkc strong { color: var(--oro-chiaro); }

/* ---------- Nav flottante ---------- */
nav.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; gap: 2px;
  padding: 8px 9px;
  border-radius: 26px;
  background: linear-gradient(120deg, #0C3A2E, #0F4536);
  box-shadow: 0 20px 40px -14px rgba(12, 58, 46, 0.75);
  border: 1px solid rgba(231, 200, 119, 0.16);
  max-width: calc(100vw - 16px);
}
nav.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 10px; border-radius: 16px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: rgba(241, 236, 223, 0.62); font-size: 10px; font-weight: 600; letter-spacing: 0.3px;
}
nav.tabbar button .k-ico { width: 21px; height: 21px; stroke: currentColor; }
nav.tabbar button.active {
  background: rgba(194, 59, 46, 0.20);
  color: var(--rosso-tenue);
  font-weight: 700;
}

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
  main { padding: 34px 40px 0; }
  header.topbar { padding: 22px 40px; }
  .logo-badge { width: 58px; height: 58px; border-radius: 16px; }
  .logo-badge .k { font-size: 28px; }
  .logo-badge .ar { font-size: 11px; }
  .topbar h1 .wordmark .lat { font-size: 26px; }
  .topbar h1 .wordmark .arabic { font-size: 22px; }
  .topbar h1 small { font-size: 13px; }
  .topbar .hijri-badge .arabic { font-size: 19px; }
  .topbar .hijri-badge .lat { font-size: 12px; }
  .salam .arabic { font-size: 1.75rem; }
  .salam .lat { font-size: 1rem; }
  .hero-prayer { padding: 34px 40px; }
  .hero-prayer .hp-name { font-size: 56px; margin-top: 14px; }
  .hero-prayer .hp-name .arabic { font-size: 34px; }
  .hero-prayer .hp-time { font-size: 64px; }
  .hero-prayer .hp-sub { font-size: 15px; }
  .dash-grid { gap: 20px; }
  .widget { padding: 26px 28px; }
  .widget .chip { width: 46px; height: 46px; }
  .widget .chip .k-ico { width: 24px; height: 24px; }
  .widget .w-label { margin-top: 22px; font-size: 12px; }
  .widget .w-kick { font-size: 12px; }
  .widget .w-val { font-size: 1.75rem; margin-top: 6px; }
  .widget .ghost-ar { font-size: 44px; right: 22px; bottom: 18px; }
  .card { padding: 26px 28px; }
  .verse .v-ar { font-size: 2rem; }
  nav.tabbar { gap: 6px; padding: 10px 14px; bottom: 22px; }
  nav.tabbar button { padding: 9px 18px; font-size: 11px; }
  nav.tabbar button .k-ico { width: 24px; height: 24px; }
}

@media print {
  nav.tabbar, header.topbar, .location-row button, footer.mkc { display: none; }
  body { padding: 0; background: #fff; }
}
