/* =========================================================
   LABBAIK — Design system
   Emerald (Ka'bah kiswah green) · Gold (pintu Ka'bah) · Ivory
   ========================================================= */
:root {
  --bg: #f5f0e6;
  --bg2: #ede5d4;
  --card: #fffdf8;
  --ink: #16241f;
  --ink2: #4a5650;
  --muted: #7b7a6c;
  --line: #e4d9c3;
  --em: #0f5c4a;
  --em-d: #0b3d33;
  --em-l: #e3efe9;
  --gold: #b8893a;
  --gold-l: #f6ecd8;
  --red: #b4432f;
  --shadow: 0 1px 2px rgba(22, 36, 31, .05), 0 8px 24px -12px rgba(22, 36, 31, .18);
  --r: 18px;
  --fs: 16px;
  --ff: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fd: "Fraunces", Georgia, "Times New Roman", serif;
  --fa: "Amiri", "Traditional Arabic", "Scheherazade New", serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M28 4l7 17 17 7-17 7-7 17-7-17-17-7 17-7z'/%3E%3Crect x='18' y='18' width='20' height='20' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
}
[data-theme="dark"] {
  --bg: #0c1512; --bg2: #121e1a; --card: #15221d; --ink: #efe9dc; --ink2: #c4c0b2; --muted: #8f9488;
  --line: #24352e; --em: #3fa486; --em-d: #0b3d33; --em-l: #193229; --gold: #d8ab5c; --gold-l: #2a2417; --red: #e07a62;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
}
[data-font="s"] { --fs: 14.5px; }
[data-font="l"] { --fs: 18px; }
[data-font="xl"] { --fs: 20.5px; }

[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: var(--fs); background: var(--bg); color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; font-family: var(--ff); color: var(--ink); background: var(--bg); line-height: 1.5; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: .4em 0; }
img { display: block; }
.ic { width: 22px; height: 22px; flex: none; }

/* ---------- Layout ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); max-width: 620px; margin: 0 auto; }
.topbar h1 { font-family: var(--fd); font-weight: 600; font-size: 1.22rem; flex: 1; text-align: center; letter-spacing: -.01em; }
.topbar .spacer { width: 40px; }
.brand { display: flex; align-items: center; gap: 9px; flex: 1; font-family: var(--fd); font-size: 1.3rem; font-weight: 600; color: var(--em); }
[data-theme="dark"] .brand { color: var(--gold); }
.view { max-width: 620px; margin: 0 auto; padding: 14px 14px calc(96px + var(--safe-b)); }
.view > * + * { margin-top: 12px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 620px; margin: 0 auto; padding: 6px 6px calc(6px + var(--safe-b)); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border-radius: 12px; color: var(--muted); font-size: .7rem; font-weight: 600; }
.tab.on { color: var(--em); }
.tab.on .ic { background: var(--em-l); border-radius: 10px; padding: 3px 12px; width: 48px; height: 28px; }
[data-theme="dark"] .tab.on { color: var(--gold); }

/* ---------- Type ---------- */
.display { font-family: var(--fd); font-size: 2.4rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.08; }
.display em { color: var(--gold); font-style: italic; }
.display-sm { font-family: var(--fd); font-size: 1.7rem; font-weight: 500; margin: 4px 0; }
.eyebrow { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--gold); margin: 0; display: block; }
.eyebrow.light { color: #e8cf9c; }
.lead { font-size: 1.05rem; color: var(--ink2); }
.lead-sm { color: var(--ink2); font-size: .93rem; margin: 2px 2px 0; }
.h2 { font-family: var(--fd); font-size: 1.12rem; font-weight: 600; margin: 22px 2px 8px !important; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.tiny { font-size: .75rem; }
.hint { font-size: .8rem; color: var(--muted); margin: 6px 2px; }
.center { text-align: center; }
.neg { color: var(--red) !important; }
.link { color: var(--em); font-weight: 600; font-size: .88rem; }
.one { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt { margin-top: 12px !important; }
.light-muted { color: #b9c6bf; }

/* ---------- Primitives ---------- */
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.card > * + * { margin-top: 8px; }
.card b { font-weight: 700; }
.card small { display: block; }
.card-gold { background: linear-gradient(135deg, var(--gold-l), var(--card)); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }
.card-em { background: var(--em-l); border-color: color-mix(in srgb, var(--em) 25%, var(--line)); }
.card.info { background: var(--bg2); box-shadow: none; }
.row { display: flex; align-items: center; gap: 10px; }
.row > * + * { margin-top: 0 !important; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.gap { gap: 10px; }
.gap-s { gap: 6px; }
.right { text-align: right; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid2 > *, .grid3 > * { margin-top: 0 !important; min-width: 0; }
.list > * + * { margin-top: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 18px; border-radius: 14px; font-weight: 700; font-size: .95rem; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn-pri { background: var(--em); color: #fff; box-shadow: 0 6px 16px -8px var(--em); }
[data-theme="dark"] .btn-pri { color: #06120e; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .85rem; border-radius: 12px; }
.btn-lg { min-height: 58px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.danger { color: var(--red) !important; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--ink2); flex: none; font-weight: 700; font-size: .8rem; }
.icon-btn:active { background: var(--bg2); }
.icon-btn.flip .ic { transform: scaleX(-1); }
.icon-btn.wa { color: #1f9d55; }
.icon-btn.star.on { color: var(--gold); }
.icon-btn.star.on .ic { fill: var(--gold); }

.inp { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; min-height: 46px; outline: none; transition: border-color .15s; }
textarea.inp { resize: vertical; line-height: 1.55; }
.inp:focus { border-color: var(--em); background: var(--card); }
.inp-sm { min-height: 38px; padding: 7px 10px; font-size: .9rem; }
.inp-flat { border-color: transparent; background: transparent; padding-left: 0; }
.inp-flat:focus { background: var(--bg); padding-left: 10px; }
.inp-hidden { position: absolute; inset: 0; opacity: 0; width: 100%; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.field { display: block; }
.field > span { display: block; font-size: .78rem; font-weight: 600; color: var(--ink2); margin: 0 2px 5px; }
.field + .field, .grid2 + .field, .field + .grid2, .grid2 + .grid2 { margin-top: 10px; }
.add-row { display: flex; gap: 8px; align-items: stretch; }
.add-row > * + * { margin-top: 0 !important; }
.add-row .btn { padding: 0 14px; }

.bar { height: 7px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--em), color-mix(in srgb, var(--em) 60%, var(--gold))); border-radius: inherit; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar-red i { background: var(--red); }
.bar-light { background: rgba(255,255,255,.18); }
.bar-light i { background: linear-gradient(90deg, #e8cf9c, #fff); }

.ring { position: relative; display: grid; place-items: center; margin: 0 auto; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--bg2); }
.ring-fg { stroke: var(--em); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1); }
.ring span { font-weight: 800; font-size: .82rem; position: relative; text-align: center; line-height: 1; }
.ring span small { font-size: .7em; color: var(--muted); }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--bg2); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; min-height: 38px; padding: 6px 12px; border-radius: 10px; font-weight: 600; font-size: .86rem; color: var(--ink2); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--em); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
[data-theme="dark"] .seg button.on { color: var(--gold); }
.seg-sm button { min-height: 34px; font-size: .82rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips > * { margin: 0 !important; }
.scroll-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -14px !important; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.scroll-chips::-webkit-scrollbar { display: none; }
.center-chips { justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); font-size: .84rem; font-weight: 600; white-space: nowrap; color: var(--ink2); }
.chip.on { background: var(--em); border-color: var(--em); color: #fff; }
[data-theme="dark"] .chip.on { color: #06120e; }
.chips-sm .chip { padding: 4px 10px; font-size: .74rem; }
.chip.mood { font-size: 1.3rem; padding: 4px 10px; }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--em-l); color: var(--em); }
.badge-warn { background: var(--gold-l); color: var(--gold); }
.badge-light { background: rgba(255,255,255,.14); color: #f3e6c8; border: 1px solid rgba(255,255,255,.2); }
.tag { display: inline-block !important; font-size: .74rem; color: var(--em); font-weight: 600; margin-top: 2px; }

.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty-ic { font-size: 1.6rem; color: var(--gold); }
.empty p { margin: 6px 0 2px; font-weight: 600; color: var(--ink2); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 90% at 100% 0%, #1b7a62 0%, transparent 55%), linear-gradient(160deg, #0f5c4a 0%, #0b3d33 60%, #0a2e27 100%); border-radius: 24px; padding: 18px; box-shadow: 0 20px 40px -24px #0b3d33; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: .9; pointer-events: none; }
.hero > * { position: relative; }
.hero > * + * { margin-top: 12px; }
.hero-top { display: flex; justify-content: space-between; gap: 10px; }
.hero-name { font-family: var(--fd); font-weight: 500; font-size: 1.6rem; margin-top: 2px; }
.hero-date { text-align: right; font-size: .78rem; color: #cfdcd6; }
.hero-date b { display: block; color: #f0d9a8; font-size: .86rem; }
.hero-count { display: flex; align-items: flex-end; gap: 12px; }
.hc-num { font-family: var(--fd); font-size: 4.2rem; line-height: .9; font-weight: 500; color: #f6e2b5; letter-spacing: -.03em; }
.hc-lbl { font-size: .92rem; color: #dbe6e1; padding-bottom: 6px; line-height: 1.3; }
.hero-meta { font-size: .82rem; color: #c3d3cc; }
.hero-big b { display: block; font-family: var(--fd); font-size: 1.9rem; font-weight: 500; color: #f6e2b5; }
.hero-big span { color: #d5e1dc; font-size: .92rem; }
.hero-mini { background: linear-gradient(160deg, #0f5c4a, #0b3d33); color: #fff; border: 0; }
.hero-mini small, .hero-mini .muted { color: #c3d3cc !important; }
.hero-mini .bar { background: rgba(255,255,255,.18); }
.hero-mini .bar i { background: linear-gradient(90deg, #e8cf9c, #fff); }
.stat small { font-size: .72rem; color: var(--muted); }
.stat b { display: block; font-size: .98rem; font-weight: 800; word-break: break-word; }
.hero-mini .stat b { color: #fff; }
.pill-num { background: var(--gold); color: #fff; border-radius: 14px; padding: 8px 12px; text-align: center; font-weight: 800; font-size: 1.3rem; line-height: 1; }
.pill-num small { display: block; font-size: .65rem; font-weight: 600; margin-top: 3px; }

.rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.rings > * { margin: 0 !important; }
.rings small { display: block; margin-top: 6px; font-size: .74rem; font-weight: 600; color: var(--ink2); }
.mini-task { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line); }
.stat-card b { font-size: 1.15rem; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick > * { margin: 0 !important; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; font-size: .74rem; font-weight: 600; color: var(--ink2); text-align: center; }
.quick a span { font-size: 1.45rem; line-height: 1; }
.quick a:active { transform: scale(.96); }
.quote { background: var(--gold-l); border-color: color-mix(in srgb, var(--gold) 30%, var(--line)); box-shadow: none; }
.quote p { font-family: var(--fd); font-style: italic; font-size: 1.12rem; line-height: 1.4; margin: 0; }
.quote small { color: var(--gold); font-weight: 700; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.quote-list p { font-family: var(--fd); font-size: 1.02rem; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--line) 0 4px, transparent 4px 8px); }
.timeline .dot { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--em-l); color: var(--em); display: grid; place-items: center; font-weight: 800; font-size: .78rem; }
.timeline b { display: block; }
.timeline small { color: var(--muted); }

/* ---------- Tiles ---------- */
.tiles > * + * { margin-top: 8px; }
.tile { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.tile:active { transform: scale(.99); }
.tile-ic { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.4rem; background: var(--bg2); border-radius: 14px; flex: none; }
.tile-body { flex: 1; min-width: 0; }
.tile-body b { display: block; }
.tile-body small { display: block; color: var(--muted); font-size: .8rem; }
.tile-body .bar { height: 5px; margin-bottom: 0; }
.tile-chev { color: var(--muted); width: 18px; }

/* ---------- Checklist ---------- */
.chk { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid color-mix(in srgb, var(--em) 45%, var(--line)); display: grid; place-items: center; transition: all .15s; position: relative; }
.chk::after { content: ""; width: 12px; height: 7px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -3px; transition: transform .15s; }
.done .chk, .chk.on { background: var(--em); border-color: var(--em); }
.done > .chk::after, .done .row > .chk::after { transform: rotate(-45deg) scale(1); }
.chk-item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.chk-item > * { margin: 0 !important; }
.chk-body { flex: 1; min-width: 0; cursor: pointer; padding-top: 3px; }
.chk-body b { display: block; font-weight: 600; }
.chk-body small { display: block; font-size: .8rem; }
.done .chk-body > b { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.chk-detail { flex-basis: 100%; padding: 10px 0 0 40px; border-top: 1px dashed var(--line); }
.chk-detail p { font-size: .88rem; color: var(--ink2); margin: 0 0 10px; }
.sticky-sum { position: sticky; top: 64px; z-index: 5; }
.tip { color: var(--gold) !important; font-size: .78rem !important; }
.loc { font-weight: 700; }
.loc-Kabin { color: var(--em); }
.loc-Bagasi { color: var(--gold); }
.loc-Tas, .loc-Sling { color: #6a5acd; }
.olist, .ulist { margin: 6px 0 0; padding-left: 20px; }
.olist li, .ulist li { margin: 4px 0; font-size: .92rem; }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rules > * { margin: 0 !important; }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.rule span { font-size: 1.3rem; }
.rule b { display: block; font-size: .85rem; margin-top: 4px; }
.rule small { display: block; font-size: .76rem; color: var(--muted); }

/* ---------- Finance ---------- */
.exp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.exp > * { margin: 0 !important; }
.exp-ic { font-size: 1.3rem; }
.exp small { display: block; font-size: .76rem; }
.amt-row { display: flex; gap: 8px; }
.amt-row > * { margin: 0 !important; }
.amt-row select { width: 90px; flex: none; font-weight: 700; }
.amt { font-size: 1.6rem !important; font-weight: 800; font-family: var(--fd); }
.donut-wrap { display: flex; align-items: center; gap: 14px; }
.donut { width: 140px; height: 140px; flex: none; }
.donut-t { font-size: 10px; fill: var(--muted); }
.donut-v { font-size: 16px; font-weight: 800; fill: var(--ink); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; font-size: .78rem; }
.legend li { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; }
.bud .inp { margin-top: 6px; }
.conv { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
.conv > * { margin: 0 !important; }
.conv-eq { font-size: 1.4rem; color: var(--gold); padding-bottom: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tbl td:first-child { font-weight: 600; }
.tbl-num td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- KBIHU ---------- */
.q-item p { margin: 0 0 8px; font-weight: 500; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 2px 14px 10px; }
.hscroll > * { margin: 0 !important; }
.kb-col { flex: 0 0 82%; scroll-snap-align: start; }
.kb-add { flex: 0 0 40%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--em); border-style: dashed; font-weight: 700; }

/* ---------- Manasik ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; gap: 12px; position: relative; padding-bottom: 12px; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 46px; bottom: 0; width: 2px; background: color-mix(in srgb, var(--gold) 40%, transparent); }
.step-n { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: var(--gold-l); border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); }
.step-b { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.step-b b { display: block; font-family: var(--fd); font-size: 1.08rem; font-weight: 600; margin: 2px 0; }
.step-b p { font-size: .9rem; color: var(--ink2); margin: 4px 0 0; }

/* ---------- Ibadah ---------- */
.date-nav { display: flex; align-items: center; gap: 8px; padding: 8px; position: relative; }
.date-nav > * { margin: 0 !important; }
.date-nav label { position: relative; cursor: pointer; }
.date-nav small { display: block; font-size: .76rem; }
.streak { text-align: center; font-weight: 800; font-size: 1.2rem; }
.streak small { font-size: .62rem; color: var(--muted); font-weight: 600; }
.ib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ib-grid > * { margin: 0 !important; }
.ib { display: flex; align-items: center; gap: 8px; text-align: left; padding: 11px 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; font-size: .86rem; font-weight: 600; min-height: 52px; transition: all .15s; }
.ib-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .72rem; color: #fff; }
.ib.on { background: var(--em-l); border-color: color-mix(in srgb, var(--em) 40%, var(--line)); color: var(--em); }
.ib.on .ib-dot { background: var(--em); border-color: var(--em); }
.ib-w { border-left: 4px solid var(--gold); }
.heat { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.heat > * { margin: 0 !important; }
.hc { aspect-ratio: 1; border-radius: 5px; background: var(--bg2); }
.hc.lv1 { background: color-mix(in srgb, var(--em) 30%, var(--bg2)); }
.hc.lv2 { background: color-mix(in srgb, var(--em) 62%, var(--bg2)); }
.hc.lv3 { background: var(--em); }
.hc.cur { outline: 2px solid var(--gold); outline-offset: 1px; }
.heat-leg { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: .7rem; color: var(--muted); margin-top: 8px !important; }
.heat-leg i { width: 12px; height: 12px; border-radius: 3px; background: var(--bg2); }
.heat-leg .lv1 { background: color-mix(in srgb, var(--em) 30%, var(--bg2)); } .heat-leg .lv2 { background: color-mix(in srgb, var(--em) 62%, var(--bg2)); } .heat-leg .lv3 { background: var(--em); }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.agenda b { width: 64px; flex: none; color: var(--em); font-variant-numeric: tabular-nums; }

.hab-wrap { overflow-x: auto; padding: 10px; }
.hab-table { display: grid; grid-template-columns: 128px repeat(var(--d), 30px); gap: 3px; align-items: center; }
.hab-table > * { margin: 0 !important; }
.hab-h { font-size: .7rem; font-weight: 700; color: var(--muted); position: sticky; left: 0; background: var(--card); z-index: 1; }
.hab-dh { font-size: .66rem; text-align: center; color: var(--muted); font-weight: 600; }
.hab-dh.today { color: var(--gold); font-weight: 800; }
.hab-n { font-size: .78rem; font-weight: 600; line-height: 1.2; position: sticky; left: 0; background: var(--card); z-index: 1; padding-right: 6px; }
.hab-n small { color: var(--muted); font-size: .68rem; }
.hab-c { width: 30px; height: 30px; border-radius: 8px; background: var(--bg2); }
.hab-c.on { background: var(--em); }
.hab-c.today { box-shadow: inset 0 0 0 2px var(--gold); }

.q-head .ring { margin: 0; }
.khatam { display: inline-block; background: var(--gold-l); color: var(--gold); padding: 4px 10px; border-radius: 99px; font-size: .82rem; }
.juz-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.juz-grid > * { margin: 0 !important; }
.juz { aspect-ratio: 1; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); font-weight: 800; font-size: 1.15rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; transition: all .15s; }
.juz small { font-size: .58rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.juz.on { background: var(--em); border-color: var(--em); color: #fff; }
.juz.on small { color: #cfe5dc; }

/* Counter */
.counter-wrap > * + * { margin-top: 14px; }
.tap { position: relative; display: grid; place-items: center; width: 240px; height: 240px; margin: 18px auto 10px !important; border-radius: 50%; background: radial-gradient(circle at 50% 35%, var(--card), var(--bg2)); box-shadow: var(--shadow), inset 0 -8px 20px rgba(0,0,0,.04); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.tap:active { transform: scale(.975); }
.tap .ring { position: absolute; inset: 0; }
.tap .ring circle { stroke-width: 10; }
.tap .ring-fg { stroke: var(--gold); }
.tap-n { font-family: var(--fd); font-size: 4.2rem; font-weight: 500; line-height: 1; position: relative; }
.tap-l { position: absolute; bottom: 58px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.lap-ring { position: relative; width: 260px; height: 260px; margin: 10px auto !important; }
.lap { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--card); border: 2px solid var(--line); transform: rotate(calc(var(--i) * 51.43deg - 90deg)) translate(108px) rotate(calc(var(--i) * -51.43deg + 90deg)); transition: all .25s; }
.lap.on { background: var(--em); color: #fff; border-color: var(--em); }
.lap.cur { border-color: var(--gold); box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 25%, transparent); }
.lap-c { position: absolute; inset: 58px; border-radius: 50%; background: linear-gradient(160deg, #1c1c1c, #000); color: #fff; display: grid; place-content: center; text-align: center; box-shadow: inset 0 0 0 3px #b8893a; }
.lap-c b { font-family: var(--fd); font-size: 2.8rem; line-height: 1; font-weight: 500; color: #f0d9a8; }
.lap-c small { font-size: .74rem; color: #ccc; margin-top: 4px; }
.tip-card p { font-size: .92rem; margin: 0; }

.ptimes { list-style: none; margin: 0; padding: 0; }
.ptimes li { display: flex; justify-content: space-between; padding: 12px 6px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.ptimes li:last-child { border: 0; }
.ptimes b { font-variant-numeric: tabular-nums; font-weight: 800; }
.ptimes li.minor { color: var(--muted); font-size: .92rem; }
.ptimes li.next { background: var(--em-l); color: var(--em); border-radius: 12px; border-color: transparent; padding-left: 12px; padding-right: 12px; }

/* ---------- Doa ---------- */
.doa h4 { font-family: var(--fd); font-size: 1.12rem; font-weight: 600; }
.ar { font-family: var(--fa); font-size: 1.75rem; line-height: 2.1; text-align: right; color: var(--ink); margin: 8px 0 !important; }
.ar-xl { font-size: 1.6rem; text-align: center; }
.ar-small { font-family: var(--fa); font-size: 1.05rem; text-align: right; margin-top: 10px !important; }
.lt { font-style: italic; color: var(--em); font-size: .92rem; }
[data-theme="dark"] .lt { color: #8fd1bb; }
.tr { color: var(--ink2); font-size: .92rem; }
.src { color: var(--gold); font-size: .74rem !important; font-weight: 700; }
.dp { position: relative; padding-right: 46px; }
.dp .del { position: absolute; top: 8px; right: 6px; }
.must-ic { color: var(--gold); font-size: 1.2rem; }

.view-dark { background: radial-gradient(100% 60% at 50% 0%, #133a30 0%, transparent 70%); }
.arafah > * + * { margin-top: 12px; }
.arafah .ar { color: #f0d9a8; }
.ar-prog { text-align: center; font-family: var(--fd); font-size: 1.6rem; color: #f0d9a8; }
.ar-item { display: block; width: 100%; text-align: left; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); transition: all .2s; }
.ar-item small { display: block; color: #d8ab5c; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.ar-item span { font-family: var(--fd); font-size: 1.28rem; line-height: 1.5; color: #f3efe4; }
.ar-item.on { opacity: .45; background: rgba(63,164,134,.12); border-color: rgba(63,164,134,.4); }
.ar-item.on span { text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- Jurnal / misc ---------- */
.j-card { width: 100%; text-align: left; }
.j-card p { margin: 6px 0 0; color: var(--ink2); font-size: .92rem; }
.mood-l { font-size: 1.3rem; }
.zi.done { border-color: color-mix(in srgb, var(--em) 35%, var(--line)); }
.ol.done .inp-flat { text-decoration: line-through; color: var(--muted); }
.idcard { background: linear-gradient(150deg, #0f5c4a, #0b3d33 70%); color: #fff; border-radius: 20px; padding: 18px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.idcard::before { content: ""; position: absolute; inset: 0; background: var(--pattern); }
.idcard > * { position: relative; }
.idcard h3 { font-family: var(--fd); font-size: 1.5rem; font-weight: 500; margin: 6px 0 10px; color: #f6e2b5; }
.idcard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .86rem; }
.idcard dt { color: #a9c2b8; }
.idcard dd { margin: 0; font-weight: 600; }
.idcard .ar-small { color: #f0d9a8; }
.big-num { font-family: var(--fd); font-size: 1.6rem; font-weight: 600; color: var(--red); width: 64px; }
.frasa { width: 100%; text-align: left; }
.frasa .ar { font-size: 1.5rem; line-height: 1.8; margin: 4px 0 !important; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--ink2); font-size: .92rem; }

/* ---------- Welcome ---------- */
.welcome { padding-top: 24px; }
.welcome > * + * { margin-top: 14px; }
.welcome-mark img { filter: drop-shadow(0 12px 24px rgba(15, 92, 74, .3)); }

/* ---------- Modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(5, 15, 12, .92); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.big-frasa { text-align: center; color: #fff; width: 100%; }
.big-frasa .ar { font-size: 3.2rem; color: #f6e2b5; text-align: center; line-height: 1.7; }
.big-frasa .lt { font-size: 1.3rem; color: #9fd8c4; }
.big-frasa small { display: block; font-size: 1rem; color: #ccc; margin-top: 10px; }
.close-hint { display: block; margin-top: 40px; font-size: .8rem; color: #777; }
.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-size: .88rem; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 640px) {
  .view { padding-left: 20px; padding-right: 20px; }
  .ib-grid { grid-template-columns: 1fr 1fr 1fr; }
  .rules { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 360px) {
  .quick { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .hc-num { font-size: 3.4rem; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Print ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .tabbar, .topbar .icon-btn, .add-row, .seg, .icon-btn, .btn, .toast { display: none !important; }
  .topbar { position: static; border: 0; background: none; }
  .view { padding: 0; max-width: none; }
  .card, .chk-item, .tile { box-shadow: none !important; break-inside: avoid; border-color: #ccc; }
  .sticky-sum { position: static; }
  .idcard { -webkit-print-color-adjust: exact; print-color-adjust: exact; max-width: 90mm; }
}
