/* استوديو فائق: calm, white, gold. Self-contained (no site theme dependency). */
:root { --ink: #1c1914; --ink2: #4a453a; --ink3: #7a7466; --paper: #faf8f3; --card: #fff; --gold: #a07d2e; --rule: rgba(160, 125, 46, .18); --ok: #3f7d4e; --bad: #b4572f; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif; }
button, input, select, textarea { font: inherit; }
.st { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 860px) { .st { grid-template-columns: 1fr; } .st > * { min-width: 0; } }
.st-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 24px 18px; background: var(--card); border-inline-end: 1px solid var(--rule); }
@media (max-width: 860px) { .st-side { position: static; height: auto; } }
.st-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.st-brand img { border-radius: 50%; object-fit: cover; }
.st-brand b { display: block; font-family: 'Reem Kufi', serif; font-weight: 600; font-size: 1.15rem; }
.st-brand small { color: var(--ink3); font-size: 12px; }
.st-nav { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 860px) { .st-nav { flex-direction: row; overflow-x: auto; } }
.st-nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: none; color: var(--ink2); cursor: pointer; text-align: start; white-space: nowrap; }
.st-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.st-nav button:hover { background: rgba(160, 125, 46, .07); }
.st-nav button[aria-current="page"] { background: var(--ink); color: var(--paper); }
.st-folder { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--rule); font-size: 13px; color: var(--ink2); }
.st-folder .ok { color: var(--ok); } .st-folder .no { color: var(--bad); }
.st-folder button { min-height: 38px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); cursor: pointer; }
.st-folder .st-save { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; }
.st-folder .st-save:disabled { background: none; color: var(--ink3); border-color: var(--rule); font-weight: 400; cursor: default; }
.st-main { padding: 32px clamp(16px, 4vw, 48px) 80px; outline: none; max-width: 1180px; }
.st-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.st-h h1 { margin: 0 0 6px; font-family: 'Reem Kufi', serif; font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.st-h p { margin: 0; color: var(--ink3); }
.st-crumb { font-size: 13px; color: var(--ink3); margin-bottom: 14px; }
.st-crumb button { border: 0; background: none; color: var(--gold); cursor: pointer; padding: 0; }
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none; font-size: 14px; white-space: nowrap; }
.st-btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.st-btn.danger { background: transparent; color: var(--bad); border-color: rgba(180, 87, 47, .35); }
.st-btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.st-btn:focus-visible, .st-icon:focus-visible, .st-nav button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.st-icon { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--rule); background: var(--card); cursor: pointer; color: var(--ink2); }
.st-icon:disabled { opacity: .3; cursor: default; }
.st-icon.danger { color: var(--bad); }
.st-row { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.st-card { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 22px 24px; margin-bottom: 16px; }
.st-card h2 { margin: 0 0 12px; font-family: 'Reem Kufi', serif; font-weight: 500; font-size: 1.2rem; }
.st-card p { color: var(--ink2); line-height: 1.8; }
.st-warn { border-color: rgba(180, 87, 47, .35); background: #fffaf6; }
.st-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .st-stats { grid-template-columns: repeat(2, 1fr); } }
.st-stats div { background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 18px; }
.st-stats b { display: block; font-family: 'Reem Kufi', serif; font-weight: 500; font-size: 2rem; color: var(--gold); line-height: 1; }
.st-stats span { color: var(--ink3); font-size: 13px; }
.st-steps { margin: 0; padding-inline-start: 22px; line-height: 2.1; color: var(--ink2); }
.st-steps b { color: var(--ink); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.st-course { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 20px; }
.st-course h3 { margin: 10px 0 4px; font-family: 'Reem Kufi', serif; font-weight: 500; font-size: 1.25rem; }
.st-course p { margin: 0 0 12px; color: var(--ink3); font-size: 14px; }
.st-course small { color: var(--ink3); font-size: 12px; }
.st-course .st-row { margin-top: 14px; }
.st-course-top { display: flex; justify-content: space-between; }
.st-pill { font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.st-pill.pub { background: rgba(63, 125, 78, .12); color: var(--ok); } .st-pill.hid { background: rgba(122, 116, 102, .12); color: var(--ink3); }
.st-badge { font-size: 12px; color: var(--gold); }
.st-ready { height: 6px; border-radius: 6px; background: rgba(28, 25, 20, .07); overflow: hidden; margin-bottom: 4px; }
.st-ready i { display: block; height: 100%; background: var(--gold); }
.st-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.st-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); }
.st-form label.wide { grid-column: 1 / -1; }
.st-form input, .st-form select, .st-form textarea, .st-sec-title { min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.st-form textarea { resize: vertical; line-height: 1.8; }
.st-form :focus, .st-sec-title:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.st-sec-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.st-sec-title { flex: 1; font-family: 'Reem Kufi', serif; font-size: 1.1rem; }
.st-lessons { list-style: none; margin: 0 0 12px; padding: 0; }
.st-lessons li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
@media (max-width: 760px) { .st-lessons li { grid-template-columns: 30px 1fr; } .st-lessons li > .st-langs, .st-lessons li > .st-row { grid-column: 2; } }
.st-n { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--rule); display: grid; place-items: center; font-size: 13px; color: var(--ink3); }
.st-lesson { border: 0; background: none; text-align: start; cursor: pointer; padding: 6px 4px; border-radius: 10px; color: var(--ink); }
.st-lesson:hover b { color: var(--gold); }
.st-lesson small { display: block; color: var(--ink3); font-size: 12px; }
.st-langs { display: inline-flex; gap: 4px; }
.st-langs i { font-style: normal; font-size: 11px; padding: 3px 7px; border-radius: 8px; border: 1px dashed var(--rule); color: var(--ink3); }
.st-langs i.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.st-legend { background: var(--paper); border-radius: 14px; padding: 12px 16px; font-size: 14.5px; }
.st-media { display: grid; gap: 10px; }
.st-mrow { display: grid; grid-template-columns: 150px repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
@media (max-width: 900px) { .st-mrow { grid-template-columns: 1fr; } .st-mhead { display: none; } }
.st-mhead span { font-weight: 600; font-size: 14px; padding: 0 4px; }
.st-mhead small { display: block; font-weight: 400; font-size: 12px; color: var(--ink3); }
.st-lang { display: flex; flex-direction: column; justify-content: center; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: var(--paper); }
.st-lang b { font-family: 'Reem Kufi', serif; font-weight: 500; font-size: 1.1rem; }
.st-lang small { opacity: .7; font-size: 12px; }
.st-slot { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 14px; border: 1.5px dashed var(--rule); background: var(--paper); min-height: 96px; }
.st-slot.has { border-style: solid; border-color: rgba(63, 125, 78, .45); background: rgba(63, 125, 78, .05); }
.st-file { font-size: 13px; color: var(--ok); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-empty { font-size: 13px; color: var(--ink3); }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th, .st-table td { text-align: start; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
.st-table th { color: var(--ink3); font-weight: 500; }
.st-toast { position: fixed; bottom: 20px; left: 50%; translate: -50% 20px; opacity: 0; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; transition: opacity .3s ease, translate .3s ease; pointer-events: none; z-index: 10; max-width: calc(100vw - 32px); }
.st-toast.on { opacity: 1; translate: -50% 0; }

/* portal: my journey (mandala + points) — site 4 */
.jr { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 54px; }
.jr .thread { position: relative; margin: 0 auto; display: grid; place-items: center; flex: none; }
.jr #threadCanvas { display: block; pointer-events: none; }
.jr .thread-hold { position: absolute; top: 50%; left: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 0; background: transparent; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.jr .thread-cap { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none; }
.jr #threadHint { display: block; font-family: 'Amiri', serif; font-size: 1rem; color: var(--gold); transition: opacity .25s; }
.jr-info { flex: 1 1 240px; }
.jr-k { color: var(--gold); font-size: 13px; margin: 0 0 4px; }
.jr-t { font-family: 'Amiri', serif; font-size: 1.9rem; margin: 0 0 6px; color: var(--ink); }
.jr-act { font-family: inherit; font-size: 13px; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 2px 10px; vertical-align: middle; }
.jr-p { margin: 0 0 8px; } .jr-p b { font-size: 1.3rem; color: var(--gold); }
.jr-bar { height: 7px; border-radius: 7px; background: var(--rule); overflow: hidden; max-width: 340px; }
.jr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b8902f, #e2c25e); border-radius: 7px; }
.jr-s { margin: 12px 0 6px; } .jr-s a { color: var(--gold); }
.jr-how { font-size: 13px; color: var(--ink3); margin: 0; }
details.jr-how { margin-top: 6px; line-height: 1.9; }
details.jr-how summary { cursor: pointer; color: var(--gold, #b8902f); font-weight: 600; }
details.jr-how p { margin: 8px 0 0; }
.jr-gift { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--gold, #b8902f); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.jr-gift b { width: 100%; }

/* agenda (جدولي) */
.ag-list, .ag-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ag-day { padding: 12px 0; border-top: 1px solid var(--rule); } .ag-day:first-of-type { border-top: 0; }
.ag-day h3 { margin: 0 0 8px; font-size: 15px; color: var(--ink2); } .ag-day.on h3 { color: var(--gold); }
.ag-s, .ag-m, .ag-p { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border-inline-start: 4px solid var(--gold); background: rgba(160,125,46,.07); }
.ag-m { border-color: #7a5fb0; background: rgba(122,95,176,.08); } .ag-p { border-color: #3f7d4e; background: rgba(63,125,78,.07); }
.ag-p.done { opacity: .5; } .ag-p.done span { text-decoration: line-through; }
.ag-s b, .ag-m b, .ag-p b { min-width: 52px; font-variant-numeric: tabular-nums; }
.ag-s span, .ag-m span, .ag-p span { flex: 1; display: grid; } .ag-s small, .ag-m small, .ag-p small { color: var(--ink3); }
.st-alert { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: min(720px, 92vw); z-index: 9999; margin: 0; padding: 12px 16px; border-radius: 14px; background: #fff7e3; border: 1px solid var(--gold); box-shadow: 0 8px 24px rgba(160,125,46,.18); }
.st-alert p { margin: 4px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink); }
