/* مدار — هوية «نور الفجر»: كريمي دافئ، أخضر زمردي، ذهب، وسماء تتغير مع وقت اليوم.
   مستوحاة من روح عرض Unleash Your Life، والخط من عائلة ثمانية. */

@font-face { font-family: 'Thmanyah Sans'; src: url('/fonts/thmanyahsans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('/fonts/thmanyahsans-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('/fonts/thmanyahsans-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('/fonts/thmanyahsans-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif'; src: url('/fonts/thmanyahserifdisplay-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif'; src: url('/fonts/thmanyahserifdisplay-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --sans: 'Thmanyah Sans', system-ui, -apple-system, sans-serif;
  --serif: 'Thmanyah Serif', 'Thmanyah Sans', serif;

  --bg: #F6EEE3;
  --paper: #FDFAF6;
  --card: rgba(253, 250, 246, .74);
  --card-solid: #FDFAF6;
  --ink: #2B2925;
  --ink-2: #5A5248;
  --muted: #8A7A66;
  --line: rgba(143, 105, 27, .18);
  --line-2: rgba(43, 41, 37, .08);
  --emerald: #065D55;
  --emerald-deep: #0B3F39;
  --teal: #3E8C7F;
  --gold: #8F691B;
  --gold-soft: #C29E65;
  --glow: #F7CE84;
  --shadow: 0 1px 2px rgba(60, 40, 10, .05), 0 10px 30px -12px rgba(90, 60, 15, .22);
  --shadow-lg: 0 2px 6px rgba(60, 40, 10, .06), 0 24px 60px -20px rgba(90, 60, 15, .35);

  /* المجالات السبعة */
  --work: #0E8A78;
  --money: #C99419;
  --spirit: #4C8DD6;
  --body: #EE6B3B;
  --purpose: #8B57C9;
  --relations: #E2557F;
  --self: #57A845;

  --r: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

/* الليل: الثيم الغامق (تلقائي بالوقت، أو يدوي من الإعدادات) */
:root[data-theme="dark"] {
  --bg: #0A1F1C;
  --paper: #102925;
  --card: rgba(18, 44, 40, .72);
  --card-solid: #122C28;
  --ink: #F4EDE4;
  --ink-2: #CFC4B4;
  --muted: #94A79F;
  --line: rgba(194, 158, 101, .22);
  --line-2: rgba(244, 237, 228, .08);
  --emerald: #3FD1B9;
  --emerald-deep: #9BE8DA;
  --teal: #5FC2AF;
  --gold: #E3B866;
  --gold-soft: #C29E65;
  --glow: #F3C77A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 30px -12px rgba(0, 0, 0, .55);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 60px -20px rgba(0, 0, 0, .7);
  --work: #2FC7AE;
  --money: #F2C14E;
  --spirit: #7FB2F0;
  --body: #FF8A5C;
  --purpose: #B48BEE;
  --relations: #FF7FA3;
  --self: #85D16B;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  transition: background-color .8s ease;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { display: block; }
[hidden] { display: none !important; }

/* ——— السماء ——— */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--bg) 78%); transition: background 1.2s ease; }
:root { --sky-top: #FBE6C4; --sky-mid: #F8EBDB; --sun-x: 22%; --sun-y: 16%; --sun: #FFE2A6; --sun-core: #FFF6E2; --hill-1: #9DBFAF; --hill-2: #6E9F8E; --hill-3: #E9DCC8; }
body[data-sky="dawn"] { --sky-top: #F9D9B8; --sky-mid: #F9E7D6; --sun-x: 80%; --sun-y: 22%; --sun: #FFC98A; }
body[data-sky="day"] { --sky-top: #F2E9D7; --sky-mid: #F7EFE3; --sun-x: 50%; --sun-y: 6%; --sun: #FFE7B0; }
body[data-sky="dusk"] { --sky-top: #F6C9A9; --sky-mid: #F6E1D2; --sun-x: 18%; --sun-y: 24%; --sun: #FFB582; --hill-1: #B29C8A; --hill-2: #8E7766; }
:root[data-theme="dark"] { --sky-top: #06201D; --sky-mid: #0B2622; --sun: #E7D7AF; --sun-core: #FFF7E2; --hill-1: #123832; --hill-2: #0E2E29; --hill-3: #0A1F1C; --sun-x: 78%; --sun-y: 9%; }

.sun { position: absolute; left: var(--sun-x); top: var(--sun-y); width: 46vmax; height: 46vmax; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--sun-core) 0 4%, var(--sun) 10%, color-mix(in srgb, var(--sun) 40%, transparent) 26%, transparent 60%);
  opacity: .95; animation: breathe 9s ease-in-out infinite; transition: left 1.5s, top 1.5s; }
:root[data-theme="dark"] .sun { width: 22vmax; height: 22vmax; opacity: .55;
  background: radial-gradient(circle, var(--sun-core) 0 7%, color-mix(in srgb, var(--sun) 50%, transparent) 14%, transparent 55%); }
.rays { position: absolute; left: var(--sun-x); top: var(--sun-y); width: 140vmax; height: 140vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--sun) 22%, transparent) 0 3deg, transparent 3deg 14deg);
  mask: radial-gradient(circle, #000 0, transparent 45%); -webkit-mask: radial-gradient(circle, #000 0, transparent 45%);
  opacity: .5; animation: spin 140s linear infinite; }
:root[data-theme="dark"] .rays { opacity: 0; }
.stars { position: absolute; inset: 0 0 40% 0; opacity: 0; transition: opacity 1.2s;
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent), radial-gradient(1px 1px at 34% 8%, #fff 50%, transparent),
    radial-gradient(1.4px 1.4px at 58% 22%, #fff 50%, transparent), radial-gradient(1px 1px at 72% 12%, #fff 50%, transparent),
    radial-gradient(1.2px 1.2px at 88% 30%, #fff 50%, transparent), radial-gradient(1px 1px at 22% 36%, #fff 50%, transparent),
    radial-gradient(1px 1px at 46% 42%, #fff 50%, transparent), radial-gradient(1.3px 1.3px at 92% 6%, #fff 50%, transparent); }
:root[data-theme="dark"] .stars { opacity: .7; animation: twinkle 5s ease-in-out infinite; }
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26vh; opacity: .55; }
.hills .h1 { fill: var(--hill-1); opacity: .45; } .hills .h2 { fill: var(--hill-2); opacity: .35; } .hills .h3 { fill: var(--hill-3); opacity: .9; }
.mist { position: absolute; left: -10%; right: -10%; bottom: 8vh; height: 16vh; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--paper) 80%, transparent), transparent 70%);
  filter: blur(8px); animation: drift 26s ease-in-out infinite alternate; }

@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.06); opacity: .8; } }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes twinkle { 50% { opacity: .35; } }
@keyframes drift { to { transform: translateX(6%); } }

/* ——— الهيكل ——— */
main { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 18px) 16px calc(var(--safe-b) + 118px); }
.view { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.date { font-size: 13px; color: var(--muted); letter-spacing: .2px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

h1.greet { font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 8.5vw, 40px); line-height: 1.15; margin: 4px 0 6px; color: var(--emerald); letter-spacing: -.3px; }
.lead { margin: 0 0 18px; color: var(--ink-2); font-size: 16px; max-width: 34ch; }
h2.sec { font-family: var(--serif); font-weight: 700; font-size: 21px; margin: 26px 2px 12px; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h2.sec small { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--muted); }
h2.sec a, h2.sec button.link { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--gold); text-decoration: none; }
.page-title { font-family: var(--serif); font-weight: 900; font-size: 34px; margin: 6px 2px 4px; color: var(--emerald); }
.page-sub { color: var(--muted); margin: 0 2px 16px; font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }

/* ——— المدار: شمس في المنتصف وسبع حلقات حولها ——— */
.orbit { position: relative; aspect-ratio: 1; width: min(100%, 380px); margin: 8px auto 4px; }
.orbit .path { position: absolute; inset: 13%; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--gold-soft) 55%, transparent); animation: spinr 90s linear infinite; }
.orbit .path::after { content: ''; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--glow); }
@keyframes spinr { to { transform: rotate(360deg); } }
.core { position: absolute; inset: 31%; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 50% 38%, #FFF8E8, #FBE3B1 55%, #F0C27A); color: #5B3F0B;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--glow) 25%, transparent), 0 0 50px 8px color-mix(in srgb, var(--glow) 55%, transparent);
  animation: pulse 4.5s ease-in-out infinite; }
:root[data-theme="dark"] .core { background: radial-gradient(circle at 50% 38%, #FFF3D6, #EBC77E 60%, #C99A45); }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--glow) 12%, transparent), 0 0 70px 14px color-mix(in srgb, var(--glow) 45%, transparent); } }
.core b { display: block; font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 9vw, 42px); line-height: 1; }
.core span { font-size: 12px; font-weight: 500; opacity: .85; }
.planet { position: absolute; width: 23%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 50%;
  background: var(--card-solid); box-shadow: var(--shadow); transition: transform .25s; }
.planet:active { transform: translate(-50%, -50%) scale(.94); }
.planet svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.planet .track { fill: none; stroke: color-mix(in srgb, var(--c) 16%, transparent); stroke-width: 7; }
.planet .val { fill: none; stroke: var(--c); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); }
.planet .lbl { position: relative; text-align: center; line-height: 1.15; }
.planet .lbl i { display: block; width: 18px; height: 18px; margin: 0 auto 2px; }
.planet .lbl i svg { width: 100%; height: 100%; fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.planet .lbl em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink); }
.planet.full { box-shadow: var(--shadow), 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.stat { padding: 12px 10px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 900; line-height: 1.1; color: var(--emerald); }
.stat span { font-size: 12px; color: var(--muted); }
.stat.fire b { color: var(--body); }
.stat.gold b { color: var(--gold); }

/* ——— خانة «اللي في بالك» ——— */
.capture { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 8px; margin: 4px 0 0; }
.capture input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; padding: 8px 10px; }
.capture input::placeholder { color: var(--muted); }
.capture .go { width: 40px; height: 40px; border-radius: 14px; background: linear-gradient(135deg, var(--emerald), var(--teal)); display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--emerald) 70%, transparent); }
.capture .go svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); }
.capture .spark { width: 22px; height: 22px; margin-inline-start: 6px; flex: none; }
.capture .spark svg { width: 100%; height: 100%; fill: var(--gold); }
.capture.busy .go { animation: busy 1s linear infinite; }
@keyframes busy { 50% { opacity: .5; } }

/* ——— المهام ——— */
.list { display: flex; flex-direction: column; gap: 8px; }
.task { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; position: relative; overflow: hidden; }
.task::before { content: ''; position: absolute; inset-inline-start: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--c); opacity: .9; }
.check { width: 26px; height: 26px; border-radius: 50%; flex: none; border: 2px solid var(--c); display: grid; place-items: center; margin-top: 1px; transition: background .2s, transform .2s; }
.check svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: .25s; }
.task.done .check { background: var(--c); }
.task.done .check svg { opacity: 1; transform: scale(1); }
.check:active { transform: scale(.85); }
.task .body { flex: 1; min-width: 0; }
.task .t { font-weight: 500; font-size: 15.5px; line-height: 1.45; word-wrap: break-word; }
.task.done .t { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--c) 70%, transparent); color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--c, var(--gold)) 12%, transparent); color: color-mix(in srgb, var(--c, var(--gold)) 85%, var(--ink)); white-space: nowrap; }
.chip.alarm { --c: var(--body); }
.chip.ai { --c: var(--purpose); }
.chip svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.star { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; margin-top: -2px; }
.star svg { width: 20px; height: 20px; fill: none; stroke: var(--gold-soft); stroke-width: 1.7; stroke-linejoin: round; }
.star.on svg { fill: var(--gold); stroke: var(--gold); filter: drop-shadow(0 0 6px var(--glow)); }

.empty { text-align: center; padding: 26px 18px; color: var(--muted); }
.empty b { display: block; font-family: var(--serif); color: var(--ink); font-size: 18px; margin-bottom: 4px; }
.empty .sunlet { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 12px; background: radial-gradient(circle, #FFF6E2, var(--glow) 60%, transparent 70%); animation: breathe2 4s ease-in-out infinite; }
@keyframes breathe2 { 50% { transform: scale(1.12); } }

.top3 { padding: 14px; }
.top3-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.top3-head b { font-family: var(--serif); font-size: 19px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--gold); box-shadow: 0 0 8px var(--glow); }
.top3 .list { gap: 6px; }
.top3 .task { background: color-mix(in srgb, var(--paper) 70%, transparent); border-radius: 16px; border: 1px solid var(--line-2); box-shadow: none; }

/* ——— المشاريع ——— */
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 16px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; padding: 8px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--emerald); color: #fff; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--emerald) 60%, transparent); }
:root[data-theme="dark"] .seg button.on { color: #06201D; }
.seg button span { opacity: .7; font-size: 12px; margin-inline-start: 4px; }

.projects { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 520px) { .projects { grid-template-columns: 1fr 1fr; } }
.proj { padding: 16px; position: relative; overflow: hidden; text-align: start; width: 100%; display: block; }
.proj::after { content: ''; position: absolute; top: 0; inset-inline: 0; height: 4px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 40%, var(--glow))); }
.proj .row { display: flex; gap: 12px; align-items: center; }
.mini { width: 52px; height: 52px; flex: none; position: relative; }
.mini svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mini .track { fill: none; stroke: color-mix(in srgb, var(--c) 15%, transparent); stroke-width: 6; }
.mini .val { fill: none; stroke: var(--c); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.mini b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.proj h3 { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.3; }
.proj .area-name { font-size: 12.5px; color: var(--c); font-weight: 700; }
.proj .next { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 8%, transparent); font-size: 14px; }
.proj .next small { display: block; font-size: 11.5px; color: var(--muted); }
.proj .why { margin-top: 8px; font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; }
.proj .why::before { content: '✦'; color: var(--gold); }
.proj .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.idle-warn { color: var(--body); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.idle-warn::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--body); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.focus-badge { position: absolute; top: 14px; inset-inline-end: 14px; font-size: 11px; font-weight: 700; color: var(--gold); display: flex; gap: 4px; align-items: center; }
.focus-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--glow); animation: blink 2.4s infinite; }

.strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x mandatory; }
.strip::-webkit-scrollbar { display: none; }
.strip .proj { flex: 0 0 78%; scroll-snap-align: start; }

/* ——— المجالات ——— */
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.area { padding: 14px; position: relative; overflow: hidden; text-align: start; }
.area::before { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; top: -50px; inset-inline-end: -40px; background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); }
.area .mini { width: 58px; height: 58px; }
.area .mini i { position: absolute; inset: 0; display: grid; place-items: center; }
.area .mini i svg { width: 22px; height: 22px; fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transform: none; }
.area h3 { margin: 10px 0 0; font-family: var(--serif); font-size: 20px; color: var(--ink); }
.area .pts { font-size: 13px; color: var(--muted); }
.area .pts b { color: var(--c); font-size: 15px; }
.area .log { margin-top: 10px; width: 100%; padding: 8px; border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 11%, transparent); }
.area .log:active { transform: scale(.97); }
.area.wide { grid-column: 1 / -1; }

/* ——— الشريط السفلي ——— */
.tabs { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 12px); width: min(calc(100% - 24px), 460px);
  display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr; align-items: center; padding: 6px; border-radius: 26px;
  background: color-mix(in srgb, var(--card-solid) 82%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; border-radius: 18px; transition: color .2s; }
.tabs a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--emerald); }
.tabs a.on svg { stroke-width: 2.2; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--emerald) 35%, transparent)); }
.fab { justify-self: center; width: 60px; height: 60px; margin-top: -30px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #FFE7AE, #E5B259 55%, #B88327); box-shadow: 0 0 0 6px var(--bg), 0 10px 26px -6px rgba(184, 131, 39, .75); transition: transform .2s; }
.fab svg { width: 28px; height: 28px; fill: none; stroke: #4A3208; stroke-width: 2.4; stroke-linecap: round; }
.fab:active { transform: scale(.92) rotate(90deg); }

/* ——— الورقة السفلية ——— */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 8, .38); animation: fade .25s both; backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; background: var(--paper); border-radius: 28px 28px 0 0;
  padding: 8px 18px calc(var(--safe-b) + 22px); box-shadow: var(--shadow-lg); animation: up .35s cubic-bezier(.2, .9, .25, 1) both; max-width: 640px; margin: 0 auto; overscroll-behavior: contain; }
@keyframes up { from { transform: translateY(100%); } }
.grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet h3 { font-family: var(--serif); font-size: 24px; margin: 4px 0 4px; color: var(--emerald); }
.sheet p.hint { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.input, textarea.input, select.input { width: 100%; border: 1px solid var(--line); background: var(--card-solid); border-radius: 14px; padding: 12px 14px; outline: none; font-size: 16px; }
.input:focus { border-color: var(--gold-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--glow) 35%, transparent); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.6; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 500; border: 1px solid var(--line); background: var(--card-solid); color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--gold)); }
.pill.on { background: var(--c, var(--emerald)); border-color: transparent; color: #fff; }
.pill.on i { background: #fff; }
:root[data-theme="dark"] .pill.on { color: #0A1F1C; }
:root[data-theme="dark"] .pill.on i { background: #0A1F1C; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 16px; font-weight: 700; font-size: 16px; width: 100%;
  background: linear-gradient(135deg, var(--emerald), var(--teal)); color: #fff; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--emerald) 80%, transparent); }
:root[data-theme="dark"] .btn { color: #06201D; }
.btn.gold { background: linear-gradient(135deg, #E9BC63, #B88327); color: #3A2705; box-shadow: 0 10px 22px -10px rgba(184, 131, 39, .8); }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; border: 1px solid var(--line); }
.btn.danger { background: transparent; color: #C2412D; box-shadow: none; border: 1px solid color-mix(in srgb, #C2412D 30%, transparent); }
.btn:disabled { opacity: .6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack { display: grid; gap: 10px; margin-top: 8px; }
input[type="range"] { width: 100%; accent-color: var(--emerald); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.switch b { font-weight: 500; }
.switch small { display: block; color: var(--muted); font-size: 12.5px; }
.switch input[type="time"] { width: 112px; padding: 6px 8px; font-size: 15px; }
.toggle { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: .2s; }
.toggle::after { content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: .2s; }
.toggle:checked { background: var(--emerald); }
.toggle:checked::after { right: 23px; }
.note { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--glow) 22%, transparent); font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.note b { color: var(--ink); }

.created { display: grid; gap: 8px; margin: 12px 0 16px; }
.created .task { background: var(--card-solid); border-radius: 16px; border: 1px solid var(--line-2); }

/* ——— الدخول ——— */
.login { min-height: 82dvh; display: grid; place-items: center; text-align: center; }
.login .core { position: relative; inset: auto; width: 150px; height: 150px; margin: 0 auto 26px; }
.login h1 { font-family: var(--serif); font-size: 46px; font-weight: 900; margin: 0; color: var(--emerald); }
.login p { color: var(--ink-2); margin: 4px 0 24px; }
.login form { width: min(320px, 86vw); margin: 0 auto; display: grid; gap: 10px; }
.login .err { color: #C2412D; font-size: 14px; min-height: 20px; }

/* ——— تنبيه + احتفال ——— */
.toast { position: fixed; z-index: 60; left: 50%; top: calc(var(--safe-t) + 14px); transform: translate(-50%, -150%); padding: 11px 18px; border-radius: 16px;
  background: var(--emerald-deep); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); transition: transform .45s cubic-bezier(.2, .9, .25, 1.3); max-width: calc(100% - 32px); text-align: center; }
:root[data-theme="dark"] .toast { color: #06201D; }
.toast.show { transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; z-index: 55; pointer-events: none; width: 100%; height: 100%; }

.quote { margin-top: 26px; padding: 18px 20px; text-align: center; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--emerald-deep), var(--emerald)); color: #F4EDE4; border: 0; }
:root[data-theme="dark"] .quote { background: linear-gradient(135deg, #0F3A34, #14524A); }
.quote::before { content: ''; position: absolute; inset: auto -30% -60% auto; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(247, 206, 132, .35), transparent 65%); }
.quote small { display: block; color: var(--gold-soft); letter-spacing: 1.5px; font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.quote p { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.5; position: relative; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
