:root {
  color-scheme: light;
  --bg: #FBF6EC; --bg2: #FBF3E4; --card: #FFFFFF; --line: #EADFCB; --line-strong: #CDBFA6; --text: #2E2620; --ink: #2E2620; --muted: #6A6053;
  --gold: #0B7A66; --gold-soft: rgba(11, 122, 102, .11); --sun: #F59E2E; --green: #15803D; --red: #C93F27; --blue: #2563EB;
  --radius: 14px; --font: "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.55; }
a { color: var(--gold); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.3; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--red); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-inline-start: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side .brand { font-weight: 800; font-size: 1.2rem; padding: 4px 10px 16px; display: flex; gap: 8px; align-items: center; }
.side a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; margin-bottom: 2px; }
.side a:hover { background: var(--card); }
.side a.on { background: var(--gold-soft); color: var(--gold); font-weight: 700; }
.side .sep { height: 1px; background: var(--line); margin: 10px 4px; }
main.page { padding: 22px clamp(14px, 3vw, 36px) 110px; max-width: 1100px; width: 100%; }
.tabbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .tabbar { display: flex; position: fixed; bottom: 0; inset-inline: 0; background: var(--bg2); border-top: 1px solid var(--line);
            padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 50; justify-content: space-around; }
  .tabbar a { flex: 1; text-align: center; color: var(--muted); text-decoration: none; font-size: .72rem; padding: 4px 0; }
  .tabbar a span { display: block; font-size: 1.3rem; line-height: 1.2; }
  .tabbar a.on { color: var(--gold); }
  main.page { padding-top: 14px; }
}

/* ---------- pieces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card.gold { border-color: rgba(11, 122, 102, .45); background: linear-gradient(160deg, rgba(11,122,102,.10), var(--card) 60%); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.pill.gold { color: var(--gold); border-color: rgba(11,122,102,.4); background: var(--gold-soft); }
.pill.green { color: var(--green); border-color: rgba(21,128,61,.4); }
.pill.red { color: var(--red); border-color: rgba(201,63,39,.4); }

.btn { border: 1px solid var(--line); background: var(--bg2); padding: 8px 14px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 700; }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 8px; }
.btn.ghost:hover { color: var(--text); }
.btn.sm { padding: 4px 10px; font-size: .85rem; }
.btn.big { padding: 12px 18px; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: default; }

input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=month], input:not([type]), textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); }
textarea { resize: vertical; min-height: 70px; }
label { display: block; font-size: .9rem; color: var(--muted); margin: 10px 0 4px; }
label.row { display: flex; }
label.row input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--gold); }

/* ---------- the ONE thing ---------- */
.one { text-align: center; padding: 22px 16px; }
.one .q { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.one .one-input { text-align: center; font-size: 1.45rem; font-weight: 800; line-height: 1.4; background: transparent; border: none; border-bottom: 2px dashed var(--line); border-radius: 0; padding: 8px; resize: none; min-height: 0; color: var(--gold); }
.one .one-input:focus { border-bottom-color: var(--gold); }
.one .title { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.one.done .title, .one.done .one-input { text-decoration: line-through; opacity: .7; }
.chain { display: flex; flex-direction: column; gap: 6px; }
.chain .lnk { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.chain .lnk b { color: var(--gold); min-width: 74px; font-size: .82rem; }
.chain .lnk.empty { color: var(--muted); border-style: dashed; }
.chain .arrow { text-align: center; color: var(--muted); font-size: .8rem; line-height: 1; }

.check { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: none; }
.check input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--gold); flex: none; cursor: pointer; }
.check.done .t { text-decoration: line-through; color: var(--muted); }
.check .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.streak { font-weight: 800; color: var(--gold); }
.bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.bar.green > i { background: var(--green); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .v { font-size: 1.6rem; font-weight: 800; }
.kpi .l { color: var(--muted); font-size: .82rem; }
.kpi.gold .v { color: var(--gold); }

.heat { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; direction: ltr; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--bg); border: 1px solid var(--line); }
.heat i.on { background: var(--green); border-color: var(--green); }
.heat i.today { outline: 2px solid var(--gold); }

.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbars .r { display: grid; grid-template-columns: 130px 1fr 54px; gap: 8px; align-items: center; font-size: .9rem; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 70px; direction: ltr; }
.hours i { background: var(--red); border-radius: 2px 2px 0 0; min-height: 1px; opacity: .85; }
.hours-l { display: grid; grid-template-columns: repeat(24, 1fr); font-size: .6rem; color: var(--muted); direction: ltr; text-align: center; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; font-size: .9rem; }
.chip.on { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
.scale { display: flex; gap: 4px; direction: ltr; }
.scale button { flex: 1; padding: 8px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; }
.scale button.on { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 800; }

.goal { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--bg2); }
.goal.is-one { border-color: var(--gold); background: var(--gold-soft); }
.goal.done .gt { text-decoration: line-through; color: var(--muted); }
.goal .gt { font-weight: 700; }
.goal .why { color: var(--muted); font-size: .85rem; white-space: pre-wrap; }
.levels { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.levels a { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--bg2); font-size: .92rem; }
.levels a.on { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 700; }
.pager { display: flex; align-items: center; gap: 8px; }
.pager .lbl { font-weight: 700; min-width: 120px; text-align: center; }

.rule { padding: 10px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 6px; }
.rule b { color: var(--gold); }
.lesson { padding: 12px 14px; border-inline-start: 3px solid var(--gold); background: var(--bg2); border-radius: 8px; margin-bottom: 8px; white-space: pre-wrap; }

.timer { font-size: 3rem; font-weight: 800; text-align: center; direction: ltr; letter-spacing: 2px; }
.timer.run { color: var(--gold); }

/* ---------- vision board ---------- */
.vboard { columns: 3 220px; column-gap: 12px; }
.vitem { break-inside: avoid; margin-bottom: 12px; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); position: relative; }
.vitem img { width: 100%; display: block; }
.vitem .cap { padding: 10px 12px; font-weight: 700; }
.vitem.quote { padding: 22px 16px; text-align: center; font-size: 1.15rem; font-weight: 800; color: var(--gold); background: linear-gradient(160deg, rgba(11,122,102,.13), var(--card)); }
.vitem.goal { padding: 16px; border-color: rgba(21,128,61,.4); }
.vitem .tools { position: absolute; top: 6px; inset-inline-start: 6px; display: none; gap: 4px; }
.vitem:hover .tools { display: flex; }
.vitem .tools button { background: rgba(0,0,0,.65); border: none; color: #fff; border-radius: 8px; padding: 3px 8px; cursor: pointer; }
@media (hover: none) { .vitem .tools { display: flex; position: static; justify-content: flex-end; padding: 6px; } .vitem.quote .tools { padding: 10px 0 0; } }

/* ---------- modal + toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; width: min(520px, 100%); max-height: 90vh; overflow: auto; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-start; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 99px; z-index: 200; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.fabs { position: fixed; bottom: 86px; inset-inline-start: 18px; z-index: 60; display: flex; gap: 8px; align-items: center; }
.fab { background: var(--red); color: #fff; border: none; border-radius: 99px; padding: 12px 18px; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.45); cursor: pointer; }
.fab.cap { background: var(--card); border: 1px solid var(--line); padding: 12px 14px; }
@media (min-width: 861px) { .fabs { bottom: 24px; } }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.auth-card .logo { font-size: 2.4rem; }
.empty { text-align: center; color: var(--muted); padding: 18px 8px; }
.loading { text-align: center; color: var(--muted); padding: 40px; }

/* ---------- v2: ONE Thing focus page ---------- */
body.on-one main.page { max-width: 1400px; }
.onegrid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .onegrid { grid-template-columns: minmax(0, 1fr); } }
.onegrid .col { min-width: 0; }
.brief .pre, .pre { white-space: pre-wrap; margin-top: 6px; }
.w-auto { width: auto !important; }
.w-num { width: 74px !important; }
.w-year { width: 96px !important; }
.pomo { text-align: center; }
.phases { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.phases button { border: 1px solid var(--line); background: var(--bg2); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: .88rem; }
.phases button.on { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); font-weight: 700; }
.pomo-time { font-size: clamp(3.4rem, 9vw, 5.6rem); font-weight: 800; direction: ltr; letter-spacing: 2px; line-height: 1.1; margin: 6px 0; font-variant-numeric: tabular-nums; }
.pomo-time.run.focus { color: var(--red); }
.pomo-time.run.short, .pomo-time.run.long { color: var(--green); }
.pomo-bar { height: 10px; }
.pomo-bar > i { background: var(--red); transition: width .25s linear; }
.pomo-dots { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 12px 0 4px; }
.pomo-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); display: inline-block; }
.pomo-dots i.done { background: var(--red); border-color: var(--red); }
.pomo-dots i.cur { border-color: var(--red); }
.pomo-set { text-align: start; margin-top: 10px; }
.pomo-set summary, details summary { cursor: pointer; color: var(--muted); }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.grid4 label { margin: 6px 0 0; }
.slide { display: grid; grid-template-columns: 110px 1fr 54px; gap: 10px; align-items: center; margin: 10px 0; }
.slide input[type=range] { width: 100%; accent-color: var(--gold); }
.slide b { text-align: center; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; inset-inline-start: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::before { transform: translateX(-20px); }
#energyNow button { font-size: 1.3rem; }
.check.now { background: rgba(201,63,39,.08); border-radius: 10px; padding-inline: 8px; }
.goal-title { font-size: 1.2rem; font-weight: 800; margin-top: 6px; }
.why-box { background: var(--bg2); border-radius: 10px; padding: 8px 12px; margin-top: 8px; white-space: pre-wrap; }
.chain-line { margin-top: 10px; color: var(--muted); font-size: .85rem; line-height: 1.8; }
.chain-card .chain { margin-top: 8px; }
.banner { display: block; text-decoration: none; color: var(--gold); font-weight: 700; border-color: rgba(11,122,102,.45); }
.one-link { display: block; text-decoration: none; color: var(--text); text-align: center; }
.one-link .title { font-size: 1.4rem; font-weight: 800; color: var(--gold); margin: 4px 0; }
.mini-timer { position: fixed; top: 12px; inset-inline-start: 14px; z-index: 70; background: var(--card); border: 1px solid var(--red); color: var(--text); border-radius: 99px; padding: 6px 14px; font-weight: 800; text-decoration: none; direction: ltr; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.mini-timer[hidden] { display: none; }
@media (max-width: 860px) { .mini-timer { top: auto; bottom: 146px; } }

/* ---------- v2: inbox ---------- */
.inbox-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--bg2); }
.inbox-item.has-ai { border-color: rgba(11,122,102,.35); }
.inbox-item .t { overflow-wrap: anywhere; }
.reason { color: var(--muted); font-size: .88rem; margin: 4px 0; }
.inbox-ctl { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; margin-top: 6px; }
@media (max-width: 760px) { .inbox-ctl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .inbox-ctl input { grid-column: 1 / -1; } }
.levels a.add { padding: 8px 12px; }
.goal-cb { width: 22px; height: 22px; accent-color: var(--gold); margin-top: 2px; flex: none; }

/* ---------- v2: lessons / patterns / energy ---------- */
.pattern { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.bar.red > i { background: var(--red); }
.chip.red { color: var(--red); border-color: rgba(201,63,39,.45); cursor: default; }
.ehours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 90px; direction: ltr; }
.ehours > div { position: relative; display: flex; align-items: flex-end; gap: 1px; }
.ehours i { flex: 1; border-radius: 2px 2px 0 0; min-height: 1px; }
.ehours i.en { background: var(--gold); }
.ehours i.fo { background: var(--blue); opacity: .8; }

/* ---------- v2: compass ---------- */
.decision { margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); }
.decision.green { border-color: var(--green); } .decision.red { border-color: var(--red); } .decision.gold { border-color: var(--gold); }
.decision ul { margin: 6px 0; padding-inline-start: 20px; }
.wheel-wrap { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 700px) { .wheel-wrap { grid-template-columns: minmax(0, 1fr); } .slide { grid-template-columns: 1fr 1fr 40px; } }
.radar { width: 100%; max-width: 260px; display: block; margin: 0 auto; }
.radar text { fill: var(--text); }

/* ---------- v2: ritual + settings ---------- */
.stepper { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 4px; }
.stepper a { flex: none; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: .9rem; }
.stepper a.on { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 700; }
.stepper a.past { color: var(--green); border-color: rgba(21,128,61,.4); }
.ritual-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rd { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg2); display: flex; flex-direction: column; gap: 6px; }
.code { direction: ltr; text-align: left; font-family: ui-monospace, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; overflow-x: auto; white-space: nowrap; user-select: all; }
.hz { margin-bottom: 6px; flex-wrap: nowrap; }
.hz span { font-size: .85rem; white-space: nowrap; }

/* ---------- v3: decide now / pulls ---------- */
.strip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.strip .pill { text-decoration: none; padding: 5px 12px; font-size: .88rem; }
.decide-btn { text-decoration: none; }
.decide { max-width: 760px; margin: 0 auto; }
.decide h1 { font-size: 1.35rem; }
.decide .chips { margin-bottom: 4px; }
.decide .chip { padding: 9px 14px; font-size: .95rem; }
.verdict { text-align: center; padding: 26px 18px; }
.v-title { font-size: clamp(1.5rem, 4.5vw, 2.2rem); font-weight: 800; color: var(--gold); margin: 8px 0 10px; line-height: 1.35; overflow-wrap: anywhere; }
.forced { margin-top: 12px; padding: 12px; border: 1px dashed var(--gold); border-radius: 12px; }
.big-input { font-size: 1.2rem; font-weight: 700; text-align: center; padding: 12px; }
.pull { max-width: 760px; margin: 0 auto 14px; }
.pq { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.yn { display: flex; gap: 6px; }
.yn button { border: 1px solid var(--line); background: var(--bg2); border-radius: 10px; padding: 6px 16px; cursor: pointer; }
.yn button.on { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 700; }
.pull-link { display: inline-block; margin-bottom: 10px; text-decoration: none; }

/* ---------- v3: GTD lists ---------- */
.filters .chip { font-size: .85rem; }
.banner-red { border-color: rgba(201,63,39,.5) !important; color: var(--text); }
.banner-red a { color: var(--red); }
.inbox-ctl2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin-top: 6px; }
.inbox-more summary { margin-top: 6px; }
.inbox-item .g-cal, .inbox-item .g-wait, .inbox-item .g-proj { display: none; }
.inbox-item[data-gtd=calendar] .g-cal, .inbox-item[data-gtd=waiting] .g-wait, .inbox-item[data-gtd=project] .g-proj { display: block; }
.inbox-item[data-gtd=trash] .g-act, .inbox-item[data-gtd=someday] .g-act, .inbox-item[data-gtd=reference] .g-act, .inbox-item[data-gtd=waiting] select.g-act[name=when] { display: none; }

/* ---------- v3: Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 860px) { .kanban { grid-template-columns: minmax(0, 1fr); } }
.kcol { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.kcard.stuck { border-color: var(--red); }
.next-act { margin-top: 6px; font-size: .9rem; color: var(--gold); }
.next-act.warn { color: var(--red); }

/* ---------- v3: reference notes ---------- */
.note { cursor: pointer; }
.note:hover { border-color: var(--muted); }
.note-body { color: var(--muted); font-size: .88rem; white-space: pre-wrap; margin-top: 6px; max-height: 6.5em; overflow: hidden; }

/* ---------- v3: 12 weeks ---------- */
.wbars { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 140px; align-items: end; direction: ltr; padding-bottom: 18px; }
.wbars a { position: relative; height: 100%; display: flex; align-items: flex-end; text-decoration: none; border-radius: 6px; }
.wbars a i { display: block; width: 100%; border-radius: 6px 6px 0 0; min-height: 3px; }
.wbars a span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: .75rem; color: var(--muted); }
.wbars a.on { outline: 2px solid var(--gold); outline-offset: 2px; }
.wbars a.cur span { color: var(--gold); font-weight: 800; }
.line85 { position: absolute; left: 0; right: 0; bottom: calc(18px + (100% - 18px) * .85); border-top: 2px dashed var(--green); pointer-events: none; }
.cgoal { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--bg2); }
.tcount { min-width: 44px; text-align: center; direction: ltr; }

/* ---------- v3: time blocking ---------- */
.timeline { display: flex; flex-direction: column; gap: 6px; }
.tb { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); border-inline-start: 4px solid var(--blue); background: var(--bg2); }
.tb.deep { border-inline-start-color: var(--gold); }
.tb.shallow { border-inline-start-color: var(--blue); }
.tb.break { border-inline-start-color: var(--green); }
.tb.now { background: var(--gold-soft); border-color: var(--gold); }
.tb .tt { direction: ltr; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; min-width: 92px; }

/* ---------- v4: Selfbook (كتاب المستقبل) ---------- */
.book { max-width: 820px; margin: 0 auto; }
.bpage { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px clamp(16px, 4vw, 34px); margin-bottom: 16px; }
.bpage h2 { font-size: 1.3rem; color: var(--gold); margin-bottom: 12px; }
.principle { font-size: 1.08rem; line-height: 1.95; margin: 0 0 14px; }
.belief-cycle { width: 100%; max-width: 560px; display: block; margin: 0 auto; color: var(--text); }
.book-words { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.book-words span { font-size: 1.15rem; font-weight: 800; padding: 6px 14px; border-radius: 99px; background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(11,122,102,.4); }
.book-imgs { columns: 3 160px; column-gap: 10px; margin: 10px 0; }
.book-imgs figure { break-inside: avoid; margin: 0 0 10px; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); position: relative; }
.book-imgs img { width: 100%; display: block; }
.book-imgs figcaption { padding: 6px 10px; font-weight: 700; font-size: .9rem; }
.book-imgs figure.q { padding: 16px; text-align: center; font-weight: 800; color: var(--gold); }
.book-imgs.edit figure button { position: absolute; top: 4px; inset-inline-start: 4px; background: rgba(0,0,0,.6); color: #fff; }
.bio, .manifesto { font-size: 1.08rem; line-height: 1.9; white-space: pre-wrap; }
.manifesto { font-style: italic; border-inline-start: 3px solid var(--gold); padding-inline-start: 14px; }
.affirm { font-size: 1.3rem; font-weight: 800; line-height: 1.6; margin: 0 0 12px; }
.ach { list-style: none; padding: 0; margin: 8px 0; } .ach li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.bgoal { padding: 8px 0; border-bottom: 1px solid var(--line); } .bgoal .bar { margin-top: 6px; }
.ritual-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 14px; }
.ritual-steps div { background: var(--bg2); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.book-done { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 20px 0 30px; }
.book-pill { text-decoration: none; }
.sheet-wrap { overflow-x: auto; padding: 8px; }
.sheet { border-collapse: collapse; width: 100%; min-width: 860px; font-size: .9rem; }
.sheet th { background: var(--bg); color: var(--gold); padding: 8px 6px; position: sticky; top: 0; font-weight: 700; white-space: nowrap; }
.sheet td { border-top: 1px solid var(--line); padding: 4px; text-align: center; white-space: nowrap; }
.sheet tr.today td { background: var(--gold-soft); }
.sheet tr.future td { opacity: .45; }
.sheet input[type=time], .sheet select { width: 108px; padding: 4px 6px; font-size: .85rem; }
.yn1 { border: 1px solid var(--line); background: var(--bg2); border-radius: 8px; padding: 4px 10px; cursor: pointer; min-width: 52px; font-weight: 700; }
.yn1.y { background: var(--green); color: #fff; border-color: var(--green); }
.yn1.n { background: rgba(201,63,39,.18); color: var(--red); border-color: var(--red); }
.dream { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.yrs { display: flex; gap: 4px; direction: ltr; }
.yrs button { border: 1px solid var(--line); background: var(--bg2); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.yrs button.on { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 800; }
.dream-why { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; background: var(--bg2); }
.dream-why.kept { border-color: var(--gold); }

main.page { min-width: 0; }
.sheet-wrap { max-width: 100%; }

/* ---------- v5: recovery, prayer, journal ---------- */
.rec-card { text-align: center; }
.rec-days { font-size: clamp(3.5rem, 12vw, 5.5rem); font-weight: 800; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0 0; }
.kpis.mini .v { font-size: 1.2rem; }
.sos { margin: 8px 0; padding-inline-start: 22px; font-weight: 700; line-height: 1.9; }
.rec-ev { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.rec-ev.fall { border-color: rgba(201,63,39,.4); }
.rec-ev.urge { border-color: rgba(21,128,61,.4); }
.rec-ev p { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.link-row b { flex: 1; min-width: 180px; }
.wstreaks { display: flex; gap: 3px; align-items: flex-end; height: 90px; direction: ltr; }
.wstreaks i { flex: 1; max-width: 26px; background: var(--green); border-radius: 3px 3px 0 0; min-height: 3px; }
.pr-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pr-btns { display: flex; gap: 4px; }
.pr-btns button { border: 1px solid var(--line); background: var(--bg2); border-radius: 10px; padding: 6px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; min-width: 62px; font-size: 1rem; }
.pr-btns button span { font-size: .68rem; color: var(--muted); }
.pr-btns button.on.mosque, .pr-btns button.on.ontime { border-color: var(--green); background: rgba(21,128,61,.15); }
.pr-btns button.on.late { border-color: var(--gold); background: var(--gold-soft); }
.pr-btns button.on.missed { border-color: var(--red); background: rgba(201,63,39,.15); }
.pr-wrap { overflow-x: auto; }
.pr-grid { border-collapse: collapse; width: 100%; font-size: .85rem; }
.pr-grid th { color: var(--gold); padding: 4px; font-weight: 700; }
.pr-grid td { border-top: 1px solid var(--line); padding: 4px 6px; text-align: center; white-space: nowrap; }
.pr-grid td:first-child { text-align: start; }
.pr-grid td a { color: var(--text); text-decoration: none; }
.pr-grid td.c-none { color: var(--line); }
.j-entry { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.j-entry:last-child { border-bottom: none; }

/* ---------- v6: "sunrise" light theme — warm, hopeful, clear buttons ---------- */
html, body { background: var(--bg); }
body { background: linear-gradient(180deg, #FFE9C9 0, var(--bg) 300px) no-repeat, var(--bg); min-height: 100vh; }
h1, h2, .v-title, .goal-title, .one .title, .hero-hi { font-family: "El Messiri", var(--font); }
h1 { font-size: 1.7rem; color: var(--ink); }
h2 { font-size: 1.22rem; color: var(--ink); }
a { color: var(--gold); }
.muted { color: var(--muted); }
::selection { background: #FFD58A; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* cards */
.card, .bpage, .kpi { background: var(--card); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(92, 62, 20, .06); }
.card { border-radius: 18px; padding: 18px; }
.kpi { border-radius: 14px; }
.card.gold, .bpage:first-child { background: linear-gradient(135deg, #FFF4DA, #FFE7CF 60%, #FFF9EE); border-color: #F5CB8E; }
.kcol { background: #F6EFE2; }
.kcard, .goal, .inbox-item, .rd, .cgoal, .dream-why, .rule, .chain .lnk, .why-box, .ritual-steps div, .tb, .decision { background: #FFFDF8; }
.goal.is-one { background: #FFF3D9; border-color: #F2B866; }
.lesson { background: #FFF7E6; }

/* buttons: always look like buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #fff; color: var(--ink); border: 1.5px solid var(--line-strong);
       border-radius: 12px; padding: 9px 16px; min-height: 42px; font-weight: 700; text-decoration: none; box-shadow: 0 1px 2px rgba(92, 62, 20, .08); transition: transform .08s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #fff; box-shadow: 0 3px 10px rgba(11, 122, 102, .28); }
.btn.primary:hover { background: #09614F; border-color: #09614F; color: #fff; }
.btn.danger { color: var(--red); border-color: rgba(201, 63, 39, .55); background: #fff; }
.btn.danger:hover { background: #FDEDE9; color: var(--red); border-color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: #5B5145; padding: 6px 8px; min-width: 36px; min-height: 36px; }
.btn.ghost:hover { background: #F3EADB; color: var(--ink); border-color: transparent; }
.btn.sm { padding: 6px 12px; min-height: 36px; font-size: .9rem; }
.btn.big { padding: 12px 22px; min-height: 52px; font-size: 1.08rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.fab { background: var(--red); box-shadow: 0 6px 18px rgba(201, 63, 39, .35); }
.fab.cap { background: #fff; color: var(--ink); border: 1.5px solid var(--line-strong); box-shadow: 0 6px 18px rgba(92, 62, 20, .18); }

/* inputs */
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=month], input:not([type]), textarea, select {
  background: #fff; border: 1.5px solid var(--line-strong); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #8B8071; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(11, 122, 102, .15); }
label { color: #5B5145; font-weight: 500; }

/* chips, scales, tabs */
.chip, .levels a, .stepper a, .scale button, .yn button, .yrs button, .phases button, .pr-btns button, .yn1 { background: #fff; border: 1.5px solid var(--line-strong); color: var(--ink); }
.levels { scrollbar-width: none; } .levels::-webkit-scrollbar { display: none; }
.levels a { font-weight: 600; }
.pill { background: #fff; border-color: var(--line-strong); color: #5B5145; font-weight: 600; text-decoration: none; }
.pr-btns button span { color: #5B5145; }

/* navigation */
.side { background: rgba(255, 255, 255, .85); border-inline-start: 1px solid var(--line); }
.side a { color: var(--ink); font-weight: 500; }
.side a:hover { background: #FFF1DA; }
.side a.on { background: var(--gold); color: #fff; font-weight: 700; }
.tabbar { background: #fff; box-shadow: 0 -2px 12px rgba(92, 62, 20, .1); }
.tabbar a { color: #6F6558; min-height: 48px; }
.tabbar a.on { color: var(--gold); font-weight: 700; }
.mini-timer { background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(92, 62, 20, .2); }

/* the morning hero */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 14px; border-radius: 20px;
        background: linear-gradient(115deg, #FFD27F, #FFB578 50%, #FF9272); color: #3B1E08; box-shadow: 0 6px 20px rgba(226, 120, 60, .25); }
.hero-hi { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.hero-q { margin-top: 2px; font-size: 1.02rem; max-width: 62ch; overflow-wrap: anywhere; }
.hero .btn { background: #fff; border-color: #fff; color: #3B1E08; }
.hero .btn:hover { background: #FFF3DF; color: #3B1E08; }
.one .one-input { color: var(--gold); border-bottom-color: #E9BE7E; }

/* login */
.auth { background: linear-gradient(160deg, #FFD27F, #FFB578 45%, #FF9272); }
.auth-card { background: #fff; border: none; box-shadow: 0 14px 40px rgba(120, 60, 20, .25); }
.auth-card h1 { font-size: 2rem; }

/* room for the floating buttons, phones, small screens */
.page-end { height: 1px; }
.sheet tr.today td { background: #FFF1D6; }
.yn1.y { color: #fff; }
.pr-grid td { color: var(--ink); }
.hours i, .wstreaks i { opacity: 1; }
@media (max-width: 860px) {
  main.page { padding: 14px 12px 170px; }
  .side { display: none; }
  h1 { font-size: 1.45rem; }
  .card, .bpage { padding: 14px; }
  .hero { padding: 16px; } .hero-hi { font-size: 1.3rem; }
  .fabs { bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline-start: 12px; }
  .strip .decide-btn { width: 100%; }
  .modal-bg { padding: 8px; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 12px 12px; }
  .actions { position: sticky; bottom: -18px; background: var(--card); padding: 10px 0; }
}
@media (max-width: 480px) {
  .hbars .r { grid-template-columns: minmax(0, 96px) minmax(0, 1fr) 46px; }
  .slide { grid-template-columns: 88px minmax(0, 1fr) 46px; }
  .pr-row { flex-direction: column; align-items: stretch; }
  .pr-btns button { flex: 1; min-width: 0; }
  .pomo-time { font-size: 3.6rem; }
  .row .w-auto { flex: 1 1 120px; }
}
@media (pointer: coarse) {
  .btn { min-height: 44px; } .btn.sm { min-height: 40px; } .btn.ghost { min-width: 40px; min-height: 40px; }
  .chip { padding: 8px 14px; }
  .check input[type=checkbox] { width: 26px; height: 26px; }
}

.nav-group { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 12px 12px 4px; }
.side { padding-top: 12px; }
.side a { padding: 7px 12px; margin-bottom: 1px; }
.side .brand { padding-bottom: 4px; font-family: "El Messiri", var(--font); }
@media (min-width: 861px) { .fabs { inset-inline-start: auto; inset-inline-end: 22px; } }
@media (max-width: 360px) { .scale { flex-wrap: wrap; } .scale button { flex: 1 0 17%; } }
@media (max-width: 480px) { .one .row > .muted.small:first-child { flex-basis: 100%; text-align: center; } .one .row input[type=time] { flex: 1 1 110px; min-width: 0; width: auto; } }

/* ---------- start here ---------- */
.start-next { text-align: center; padding: 24px 18px; }
.start-step { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.start-step:hover { background: #FFF7E6; }
.start-step .grow { display: flex; flex-direction: column; gap: 2px; }
.start-step .tick { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; background: #fff; }
.start-step.done .tick { background: var(--gold); border-color: var(--gold); }
.start-step.done b { color: var(--muted); text-decoration: line-through; }
.how { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
@media (max-width: 480px) { .how { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- reminders ---------- */
.push-card { text-align: center; }
.rem { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rem .grow { display: flex; flex-direction: column; gap: 1px; flex: 1 1 110px; min-width: 0; }
.rem.off b { color: var(--muted); }
.rem input[type=time] { max-width: 130px; }

/* ---------- security ---------- */
.qr-box { display: flex; justify-content: center; margin: 10px 0; }
.qr { width: min(240px, 70vw); height: auto; border-radius: 8px; border: 1px solid var(--line); }
.ltr { direction: ltr; unicode-bidi: isolate; word-break: break-all; }
.otp { font-size: 1.6rem; letter-spacing: .3em; text-align: center; direction: ltr; }
.rec-codes { background: var(--bg2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; font-size: 1.05rem; line-height: 1.7; text-align: center; }
.badge { display: inline-block; background: var(--gold-soft); color: var(--gold); border-radius: 99px; padding: 0 8px; font-size: .75rem; font-weight: 700; }
.rem-dev { flex-basis: 100%; }

/* ---------- vision video ---------- */
.vvideo { margin-bottom: 14px; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line-strong); }
.vvideo video, .book-imgs .vid video { width: 100%; max-height: 72vh; display: block; background: #000; }
.vvideo .cap { padding: 10px 12px 0; font-weight: 800; text-align: center; }
.vv-tools { justify-content: flex-end; padding: 8px 10px; }
.book-imgs .vid { grid-column: 1 / -1; }

/* ---------- game ---------- */
.g-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 1040px; margin: 0 auto; font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif; }
.g-hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.g-lv { width: 62px; height: 62px; flex: none; position: relative; display: grid; place-items: center; font: 700 26px "El Messiri", serif; color: #0B7A66; }
.g-lv svg { position: absolute; inset: 0; transform: rotate(-90deg); } .g-lv span { position: relative; }
.g-xp { flex: 1 1 180px; min-width: 0; } .g-t { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.g-track { height: 14px; border-radius: 99px; background: #F3E3C4; overflow: hidden; margin-top: 5px; } .g-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0B7A66, #36C2A0); transition: width .6s cubic-bezier(.2, .9, .3, 1); }
.g-flame { font-weight: 800; color: #B85F0B; font-size: 14px; }
.g-pill { background: #FFFDF8; border: 1px solid #EADFCB; border-radius: 99px; padding: 6px 14px; font: 700 13px "Tajawal", sans-serif; color: #2E2620; cursor: pointer; }
.g-stage { position: relative; border-radius: 22px; overflow: hidden; }
.g-world { display: block; width: 100%; height: auto; }
.g-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.g-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.g-flash.on { animation: gflash .28s; } .g-flash.big { animation: gflash2 .6s; }
.g-lb { position: absolute; inset-inline: 0; height: 0; background: #2A1F3D; z-index: 3; transition: height .7s cubic-bezier(.7, 0, .2, 1); } .g-lb.t { top: 0; } .g-lb.b { bottom: 0; }
.g-stage.ego .g-lb { height: 13%; }
.g-tint { opacity: 0; transition: opacity .7s; } .ego .g-tint { opacity: .55; }
.g-cape { transform: scale(0); transform-box: fill-box; transform-origin: 0 0; transition: transform .7s cubic-bezier(.3, 1.6, .5, 1); } .ego .g-cape { transform: scale(1); }
.g-aura { opacity: 0; transition: opacity .7s; transform-box: fill-box; transform-origin: center; } .ego .g-aura { opacity: 1; animation: gaura 1.1s ease-in-out infinite alternate; } .ego .g-aura.g2 { animation-delay: .25s; }
.g-say { position: absolute; inset-inline: 0; bottom: 3%; z-index: 4; text-align: center; color: #FFE9B8; font: 700 clamp(16px, 3vw, 28px) "El Messiri", serif; padding: 0 16px; pointer-events: none; }
.g-tip { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(255, 253, 248, .92); border-radius: 10px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: #7A6A58; z-index: 2; max-width: 70%; }
.g-up { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 5; visibility: hidden; }
.g-up.on { visibility: visible; } .g-up.on div { animation: gpop .6s cubic-bezier(.3, 1.8, .5, 1); }
.g-up div { background: #FFFDF8; border: 3px solid #F59E2E; border-radius: 22px; padding: 18px 40px; text-align: center; } .g-up b { display: block; font: 700 clamp(30px, 6vw, 54px) "El Messiri", serif; color: #0B7A66; } .g-up span { color: #7A6A58; font-weight: 700; }
.g-pop { direction: ltr; position: absolute; font-weight: 800; font-size: clamp(16px, 2.6vw, 26px); color: #0B7A66; pointer-events: none; z-index: 2; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; animation: gpopup 1.15s ease-out forwards; }
.g-panels { display: grid; grid-template-columns: 1.15fr 1.15fr 1fr; gap: 12px; }
.g-p { background: #FFFDF8; border: 1px solid #EADFCB; border-radius: 18px; padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.g-p h2 { margin: 0; font: 700 19px "El Messiri", serif; } .g-p small { color: #7A6A58; font-size: 13.5px; line-height: 1.5; }
.g-lane { position: relative; height: 26px; border-bottom: 3px solid #36C2A0; } .g-lane.gh { border-bottom: 3px dashed #B9AB97; }
.g-lane i { position: absolute; bottom: 3px; width: 20px; height: 20px; border-radius: 50%; background: #0B7A66; } .g-lane.gh i { background: #CFC4B4; }
.g-lab { font-size: 12.5px; font-weight: 700; color: #7A6A58; }
.g-hp { background: #F6DDD4; } .g-hp i { background: linear-gradient(90deg, #C93F27, #F59E2E); }
.g-btn { margin-top: auto; border: none; border-radius: 14px; padding: 13px 14px; font: 800 16px "Tajawal", sans-serif; cursor: pointer; background: #0B7A66; color: #fff; box-shadow: 0 5px 0 #075647; transition: transform .08s, box-shadow .08s; }
.g-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #075647; } .g-btn.alt { background: #4B3F72; box-shadow: 0 5px 0 #2F2650; }
.g-link { background: none; border: none; color: #7A6A58; font: 700 13px "Tajawal", sans-serif; cursor: pointer; text-decoration: underline; padding: 4px; }
.g-how { margin: 0; color: #7A6A58; font-size: 12.5px; text-align: center; }
.g-isl { cursor: pointer; } .g-isl:focus { outline: none; }
.g-bob { animation: gbob 2.6s ease-in-out infinite alternate; } .g-hero { animation: gbob2 1.1s ease-in-out infinite alternate; } .g-boss { animation: gbob3 1.7s ease-in-out infinite alternate; }
.g-rays { animation: gspin 90s linear infinite; } .g-cld { animation: gdrift 14s ease-in-out infinite alternate; }
#gSun { transition: transform .9s cubic-bezier(.3, 1.6, .5, 1); } #gSun.big { transform: scale(1.32); }
.g-drop { stroke-dasharray: 9 17; animation: grain .55s linear infinite; }
.g-rain { transition: transform .9s ease-in, opacity .9s ease-in; } .g-rain.gone { transform: translateY(-240px); opacity: 0; }
.g-shake { animation: gshake .4s; } .g-lunge { animation: glunge .45s; } .g-tap { animation: gtap .28s; }
.g-sq { animation: gsq .6s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes gbob { to { translate: 0 -9px; } } @keyframes gbob2 { to { translate: 0 -5px; } } @keyframes gbob3 { to { translate: 0 -12px; } }
@keyframes gspin { to { rotate: 360deg; } } @keyframes gdrift { to { translate: 40px 0; } } @keyframes grain { to { stroke-dashoffset: -26; } }
@keyframes gflash { from { opacity: .55; } to { opacity: 0; } } @keyframes gflash2 { from { opacity: .9; } to { opacity: 0; } }
@keyframes gshake { 0%, 100% { transform: none; } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@keyframes glunge { 25% { translate: -18px 0; } } @keyframes gtap { 50% { scale: 1.06; } }
@keyframes gsq { 0% { scale: 1.28 .74; } 100% { scale: 1 1; } }
@keyframes gaura { to { scale: 1.2; } }
@keyframes gpop { from { transform: scale(.3) rotate(-6deg); } }
@keyframes gpopup { from { transform: translateY(10px) scale(.6); opacity: 1; } 70% { opacity: 1; } to { transform: translateY(-60px) scale(1.15); opacity: 0; } }
@media (max-width: 760px) { .g-panels { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .g-bob, .g-hero, .g-boss, .g-rays, .g-cld, .g-drop, .ego .g-aura { animation: none; } }

/* ---------- coach ---------- */
.cc-list { display: flex; flex-direction: column; gap: 10px; max-height: 58vh; overflow-y: auto; }
.cc { display: flex; flex-direction: column; gap: 6px; max-width: 88%; align-items: flex-start; }
.cc.me { align-self: flex-start; } .cc.ai { align-self: flex-end; }
.cc .txt { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 14px; border-radius: 14px; line-height: 1.6; }
.cc.me .txt { background: var(--gold-soft); } .cc.ai .txt { background: var(--bg2); border: 1px solid var(--line); }
.wk { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.ai-task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.ai-task .grow { display: flex; flex-direction: column; min-width: 0; }

/* ---------- inside a goal ---------- */
.g-crumb { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; overflow-wrap: anywhere; }
.g-part { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.g-part .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.g-part.done b { text-decoration: line-through; color: var(--muted); }
.g-map { margin-top: 10px; } .g-map summary { cursor: pointer; font-weight: 700; }
.g-tree { list-style: none; margin: 4px 0; padding-inline-start: 16px; border-inline-start: 2px solid var(--line); overflow-wrap: anywhere; }
.g-tree li { padding: 3px 0; } .g-tree li.done > a { text-decoration: line-through; color: var(--muted); }
a.gt { color: inherit; text-decoration: none; display: block; } a.gt:hover { color: var(--gold); }

/* ---------- «خطتي» ---------- */
.tree-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.tree-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-weight: 700; text-align: center; font-size: .92rem; }
.tree-tabs a span { font-size: .75rem; color: var(--muted); font-weight: 500; }
.tree-tabs a.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.tree-chain { text-align: center; margin: 4px 0 10px; }
.tn { margin-inline-start: calc(var(--d) * 14px); border-inline-start: 2px solid var(--line); padding-inline-start: 6px; }
.tn-row { display: flex; align-items: flex-start; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tn-tog { background: none; border: none; font-size: 1rem; width: 24px; cursor: pointer; color: var(--muted); padding: 2px 0; }
.tn-main { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; overflow-wrap: anywhere; }
.tn-k { font-size: .75rem; color: var(--muted); font-weight: 700; }
.tn-meta { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tn-bar { display: inline-block; width: 60px; height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; } .tn-bar i { display: block; height: 100%; background: var(--gold); }
.tn-act { display: flex; gap: 2px; flex-wrap: nowrap; }
.tn.done > .tn-row b { text-decoration: line-through; color: var(--muted); }
.tn-kids { padding-inline-start: 6px; }
.tn-task { display: flex; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px dashed var(--line); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.tn-task.done span { text-decoration: line-through; color: var(--muted); }
.ns-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ns-row .grow { display: flex; flex-direction: column; min-width: 160px; flex: 1; overflow-wrap: anywhere; } .ns-row input { width: 180px; max-width: 100%; }
.banner-gold { border-color: rgba(245, 158, 46, .55) !important; }
.today-one { display: block; padding: 10px 0; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
@media (max-width: 600px) { .tn { margin-inline-start: calc(var(--d) * 8px); } .tn-act .btn { padding: 4px 7px; } }

/* ---------- «خدمتي» ---------- */
.w-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
@media (max-width: 700px) { .w-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.w-steps a { text-align: center; padding: 9px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font-weight: 700; font-size: .88rem; }
.w-steps a.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.w-steps a.off { opacity: .45; pointer-events: none; }
.w-goal b { display: block; font-size: 1.15rem; margin: 4px 0; overflow-wrap: anywhere; }
.w-month { padding: 10px 0; border-bottom: 1px solid var(--line); }
.w-month.now { background: var(--gold-soft); border-radius: 12px; padding: 10px; }
.w-month label { font-weight: 800; }
.w-tasks { padding-inline-start: 10px; margin-top: 6px; }
.w-rt { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.w-rt input[type=time] { width: 112px; } .w-rt input[type=number] { width: 70px; } .w-rt .grow { min-width: 140px; flex: 1; }
.w-at { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--gold); min-width: 46px; }
.w-pool { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.w-switch { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.w-chain { display: grid; gap: 6px; margin-top: 10px; }
.w-chain a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.w-missing { color: var(--red); font-size: .85rem; font-weight: 700; }
.w-qhead { margin: 14px 0 4px; font-weight: 800; color: var(--gold); overflow-wrap: anywhere; }
.w-month select { width: auto; }
.w-chain a { padding: 6px 10px; } .w-chain a b { font-size: .95rem; }
.w-goal b { font-size: 1.05rem; }

/* ---------- «دفتري» ---------- */
.v-grid { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.v-list { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.v-item.on { border-color: var(--gold); background: var(--gold-soft); }
.v-edit { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.v-title { font-size: 1.3rem; font-weight: 800; border: none; background: transparent; padding: 6px 0; }
.v-body { min-height: 46vh; font-size: 1rem; line-height: 1.8; }
.v-view { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; line-height: 1.8; overflow-wrap: anywhere; }
.v-view p { margin: 0 0 6px; } .v-li.done { color: var(--muted); text-decoration: line-through; }
.v-wiki { color: var(--gold); font-weight: 700; } .v-wiki.new { color: var(--muted); border-bottom: 1px dashed var(--muted); }
.v-tag { color: var(--sun); font-weight: 700; }
.v-side h3 { margin: 0 0 8px; } .v-side .pill { display: inline-flex; gap: 4px; align-items: center; margin: 2px; overflow-wrap: anywhere; }
.v-x { background: none; border: none; cursor: pointer; color: var(--muted); }
.v-place { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.v-place select { width: auto; max-width: 100%; }
.v-back { display: none; } .v-empty { padding: 30px 0; text-align: center; }
@media (max-width: 760px) { .v-grid { grid-template-columns: minmax(0, 1fr); } .v-hide-phone { display: none; } .v-back { display: inline-flex; } .v-empty { display: none; } }

/* ---------- «الرئيسية» ---------- */
.h-year { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; }
.h-year b { font-size: 1.3rem; overflow-wrap: anywhere; }
.h-pct { display: flex; align-items: center; gap: 8px; } .h-pct .bar { flex: 1; } .h-pct > span { font-weight: 800; font-size: .85rem; color: var(--gold); min-width: 36px; }
.h-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.h-goal { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.h-goal.missing { border-style: dashed; }
.h-proj { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.h-today { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0; }
.h-today a { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); color: var(--text); text-decoration: none; }
.h-today b { font-size: 1.2rem; }
.h-vault { display: block; color: var(--text); text-decoration: none; }
@media (max-width: 700px) { .h-goals { grid-template-columns: minmax(0, 1fr); } }
