/* ADAM+ — شكل الشاشات الجديدة (الرحلات، الطلعات، سؤال اليوم، خطتي، أكلي، تأهيلي) */
body.ap-lock { overflow: hidden; }
.ap { position: fixed; inset: 0; z-index: 75; background: radial-gradient(120% 50% at 80% -10%, rgba(62,240,176,.12), transparent 60%), #07090b; color: #f4f6f8; display: flex; flex-direction: column; font-family: 'Cairo', system-ui, sans-serif; text-align: start; }
.ap.hidden { display: none; }
.ap * { box-sizing: border-box; }
.ap button, .ap input, .ap select, .ap textarea { font-family: inherit; }
.ap-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.ap-head b { font-size: 16px; font-weight: 700; letter-spacing: 1px; color: #3ef0b0; }
.ap-x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: #e8eef3; position: relative; cursor: pointer; padding: 0; }
.ap-x::before, .ap-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transform: translate(-50%,-50%) rotate(45deg); }
.ap-x::after { transform: translate(-50%,-50%) rotate(-45deg); }
.ap-spacer { width: 38px; }
.ap-tabs { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid rgba(255,255,255,.05); }
.ap-tabs::-webkit-scrollbar { display: none; }
.ap-tabs button { flex: none; background: transparent; border: 1px solid rgba(255,255,255,.1); color: #8b97a3; border-radius: 20px; padding: 8px 15px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ap-tabs button.on { color: #3ef0b0; border-color: rgba(62,240,176,.45); background: rgba(62,240,176,.09); }
.ap-body { flex: 1; overflow-y: auto; padding: 14px 14px 90px; -webkit-overflow-scrolling: touch; }
.ap-load, .ap-empty { text-align: center; color: #8b97a3; padding: 30px 10px; font-size: 14px; }
.ap-empty.small { padding: 14px 6px; font-size: 13px; }
.ap-empty p { margin: 0 0 14px; line-height: 1.7; }
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 10px; }
.ap-row b { font-size: 15px; font-weight: 600; }
.ap-sec { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 4px 10px; }
.ap-sec b { font-size: 15px; font-weight: 600; } .ap-sec span { font-size: 12px; color: #8b97a3; }
.mu { color: #8b97a3; } small.mu { font-size: 12px; display: block; margin-top: 6px; }
.ap-card { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 14px; margin-bottom: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.ap-p { font-size: 14px; line-height: 1.8; margin: 6px 0; color: #dfe6ec; }
.ap-note { font-size: 12px; line-height: 1.7; color: #7d8995; margin: 8px 4px 14px; }
.ap-warn { background: rgba(255,171,92,.1); border: 1px solid rgba(255,171,92,.3); color: #ffd2a4; border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.ap-alert { border-color: rgba(255,107,120,.5); background: rgba(255,107,120,.08); }
.ap-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 8px 0 12px; padding-bottom: 2px; flex-wrap: wrap; }
.ap-chips button, .ap-chip { background: transparent; border: 1px solid rgba(255,255,255,.12); color: #9aa7b3; border-radius: 18px; padding: 7px 13px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ap-chips button.on, .ap-chip.on { color: #3ef0b0; border-color: rgba(62,240,176,.5); background: rgba(62,240,176,.1); }
.ap-select, .ap input[type=text], .ap input[type=number], .ap input[type=date], .ap input[type=time], .ap textarea, .ap-form input, .ap-form select, .ap-form textarea { width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: #f4f6f8; border-radius: 14px; padding: 11px 12px; font-size: 14px; margin: 6px 0 10px; }
.ap-select option, .ap-form option { background: #111820; color: #f4f6f8; }
.ap-form label { display: block; font-size: 13px; color: #9aa7b3; }
.ap-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .ap-three { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.ap-goalbox { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ap-goalbox input { margin: 0 !important; flex: 1; }
.ap-goalbox button:not(.ap-mic) { background: #3ef0b0; color: #032016; border: 0; border-radius: 14px; padding: 11px 16px; font-weight: 700; cursor: pointer; font-size: 13px; }
.ap-mic { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); position: relative; cursor: pointer; flex: none; }
.ap-mic::before { content: ''; position: absolute; left: 50%; top: 9px; width: 10px; height: 16px; border: 2px solid #e8eef3; border-radius: 6px; transform: translateX(-50%); }
.ap-mic::after { content: ''; position: absolute; left: 50%; top: 27px; width: 2px; height: 6px; background: #e8eef3; transform: translateX(-50%); }
.ap-mic.on { border-color: #ff6b78; background: rgba(255,107,120,.2); }
.ap-sug { font-size: 12px; color: #3ef0b0; margin: 6px 4px; }
.ap-btn { background: #3ef0b0; color: #032016; border: 0; border-radius: 16px; padding: 12px 20px; font-size: 14px; font-weight: 700; cursor: pointer; }
.ap-btn.small { padding: 8px 14px; font-size: 12px; border-radius: 14px; }
.ap-btn.ghost { background: rgba(255,255,255,.06); color: #e8eef3; border: 1px solid rgba(255,255,255,.12); font-weight: 500; }
.ap-btn.danger { background: rgba(255,107,120,.14); color: #ff9aa4; border: 1px solid rgba(255,107,120,.3); }
.ap-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 16px; }
.ap-back { background: transparent; border: 0; color: #8b97a3; font-size: 13px; padding: 4px 2px 10px; cursor: pointer; }
.ap-list { display: flex; flex-direction: column; gap: 12px; }
.ap-jc { display: flex; flex-direction: column; justify-content: flex-end; text-align: start; position: relative; overflow: hidden; min-height: 150px; border-radius: 26px; padding: 16px; border: 1px solid rgba(255,255,255,.1); color: #fff; cursor: pointer; width: 100%; }
.ap-jc.ev { min-height: 170px; }
.ap-big { position: absolute; top: -6px; inset-inline-end: 14px; font-size: 92px; font-weight: 200; color: rgba(255,255,255,.11); line-height: 1; pointer-events: none; }
.ap-jc b { font-size: 20px; font-weight: 600; } .ap-jc small { font-size: 12px; color: #c4ccd3; margin-top: 4px; }
.ap-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .ap-meta i { font-style: normal; font-size: 11px; padding: 4px 10px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); }
.ap-meta i.hot { background: #3ef0b0; color: #032016; border: 0; }
.ap-tag { position: absolute; top: 14px; inset-inline-start: 14px; font-style: normal; font-size: 11px; padding: 4px 10px; border-radius: 12px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.12); }
.ap-hero { position: relative; overflow: hidden; border-radius: 26px; padding: 20px 18px 16px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,.1); }
.ap-hero h2 { margin: 28px 0 4px; font-size: 24px; font-weight: 600; } .ap-hero p { margin: 0; color: #cfd8df; font-size: 13px; }
.ap-active { width: 100%; text-align: start; display: block; background: linear-gradient(135deg, rgba(62,240,176,.2), rgba(62,240,176,.04) 60%); border: 1px solid rgba(62,240,176,.3); border-radius: 22px; padding: 14px 16px; margin-bottom: 12px; color: #fff; cursor: pointer; }
.ap-active .lbl { font-size: 11px; letter-spacing: 1.4px; color: #8fe9c9; text-transform: uppercase; } .ap-active b { display: block; font-size: 18px; margin: 4px 0 2px; } .ap-active small { color: #a9c4b9; font-size: 12px; }
.ap-bar { display: block; height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin: 10px 0 4px; } .ap-bar i { display: block; height: 100%; background: #3ef0b0; border-radius: 4px; }
.ap-step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); } .ap-step:last-child { border: 0; }
.ap-wk { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 13px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.ap-step.now .ap-wk { border-color: #3ef0b0; color: #3ef0b0; }
.ap-st { flex: 1; } .ap-st b { font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; }
.ap-task { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #cdd6de; padding: 5px 0; cursor: pointer; line-height: 1.6; }
.ap-task input { width: 18px !important; height: 18px; margin: 3px 0 0 !important; flex: none; accent-color: #3ef0b0; padding: 0 !important; }
.ap-task.plain { cursor: default; }
.ap-coaches { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.ap-coach { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 12px 6px; color: #e8eef3; cursor: pointer; text-align: center; font-size: 12px; }
.ap-coach img, .ap-coach i { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; margin: 0 auto 8px; background: #1b2229; font-style: normal; font-size: 20px; color: #3ef0b0; }
.ap-q { margin-bottom: 16px; } .ap-q > b { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.ap-opts { display: flex; gap: 8px; flex-wrap: wrap; } .ap-opts button { flex: 1; min-width: 70px; padding: 10px 6px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #9aa7b3; font-size: 13px; cursor: pointer; }
.ap-opts button.on { background: rgba(62,240,176,.14); border-color: rgba(62,240,176,.5); color: #3ef0b0; }
.ap-score { text-align: center; } .ap-score .lbl { font-size: 11px; letter-spacing: 1.4px; color: #8b97a3; text-transform: uppercase; }
.ap-big2 { font-size: 72px; font-weight: 200; line-height: 1.1; margin: 4px 0 8px; }
.ap-bars { display: flex; align-items: flex-end; justify-content: space-between; height: 110px; gap: 6px; }
.ap-barcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; } .ap-barcol i { width: 100%; max-width: 26px; background: #3ef0b0; border-radius: 6px; } .ap-barcol small { font-size: 10px; color: #8b97a3; }
.ap-ex, .ap-food { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid rgba(255,255,255,.06); background: transparent; color: #e8eef3; font-size: 14px; text-align: start; }
.ap-ex { cursor: pointer; } .ap-ex em, .ap-food em { font-style: normal; color: #3ef0b0; font-size: 13px; flex: none; }
.ap-food .ap-g { width: 80px; margin: 0; padding: 7px 8px; } .ap-del { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); background: transparent; position: relative; cursor: pointer; flex: none; }
.ap-del::before { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; background: #ff9aa4; transform: translate(-50%,-50%); }
.ap-macros { display: flex; justify-content: space-around; text-align: center; } .ap-macros b { display: block; font-size: 24px; font-weight: 300; } .ap-macros small { font-size: 11px; color: #8b97a3; }
.ap-fastring { position: relative; width: 200px; height: 200px; margin: 6px auto 12px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.ap-fastring svg { width: 100%; height: 100%; transform: rotate(-90deg); } .ap-fastring .t { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 6; } .ap-fastring .v { fill: none; stroke: #3ef0b0; stroke-width: 6; stroke-linecap: round; }
.ap-fc { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; } .ap-fc b { font-size: 38px; font-weight: 300; } .ap-fc small { font-size: 12px; color: #8b97a3; }
.ap input[type=range] { width: 100%; accent-color: #3ef0b0; padding: 0; }
.ap-toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 30px); background: #1b2229; color: #fff; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 12px 18px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 5; max-width: 90%; text-align: center; }
.ap-toast.on { opacity: 1; transform: translate(-50%, 0); }
.ap .hidden { display: none; }

/* المكتبة + نافذة سؤال اليوم */
.ap-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ap-exrow { gap: 12px; justify-content: flex-start; text-align: start; }
.ap-exrow .ap-exn, .ap-ex .ap-exn, .ap-food .ap-exn { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: start; }
.ap-exn b { font-weight: 500; font-size: 14px; color: #f4f6f8; } .ap-exn small { font-size: 11.5px; color: #8b98a5; margin-top: 2px; }
.ap-th { width: 52px; height: 52px; border-radius: 12px; background: #fff; object-fit: contain; flex: none; display: inline-block; }
.ap-qc { position: fixed; inset: 0; z-index: 76; background: rgba(4,7,9,.72); display: flex; align-items: flex-end; justify-content: center; padding: 0; font-family: 'Cairo', system-ui, sans-serif; color: #f4f6f8; }
@media (min-width: 700px) { .ap-qc { align-items: center; } }
.ap-qc-box { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: #0d1317; border: 1px solid rgba(255,255,255,.1); border-radius: 26px 26px 0 0; padding: 22px 18px 24px; text-align: start; }
@media (min-width: 700px) { .ap-qc-box { border-radius: 26px; } }
.ap-qc-box .ap-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.ap-qc-t { display: block; font-size: 20px; font-weight: 600; margin-bottom: 2px; padding-inline-end: 46px; }
.ap-qc-s { margin: 0 0 16px; color: #8b98a5; font-size: 13px; }

/* ---------- تحديات / وصفات / إطالة ---------- */
.ap-week { border-color: rgba(62,240,176,.25); background: linear-gradient(160deg, rgba(62,240,176,.08), rgba(255,255,255,.02)); }
.ap-wtitle { font-size: 17px; font-weight: 600; margin: 8px 0 4px; }
.ap-ok { color: #3ef0b0; font-size: 12px; font-weight: 700; }
.ap-trow { display: flex; justify-content: space-between; gap: 6px; text-align: center; }
.ap-trow div { flex: 1; min-width: 0; } .ap-trow small { display: block; font-size: 11px; color: #8b97a3; } .ap-trow b { font-size: 13px; font-weight: 600; }
.ap-win { border-color: rgba(62,240,176,.4); background: rgba(62,240,176,.08); text-align: center; }
.ap-win b { display: block; color: #3ef0b0; }
.ap-today { border-color: rgba(62,240,176,.22); }
.ap-bigt { font-size: 28px; font-weight: 300; margin: 10px 0 4px; line-height: 1.2; }
.ap-mv { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: #b9c4cd; margin-top: 8px; }
.ap-cgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0 8px; }
.ap-cgrid button { aspect-ratio: 1; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #aab5bf; font-size: 12px; cursor: pointer; padding: 0; }
.ap-cgrid button.dn { background: #3ef0b0; color: #032016; border-color: transparent; font-weight: 700; }
.ap-cgrid button.rs { opacity: .45; border-style: dashed; }
.ap-cgrid button.td { border-color: #3ef0b0; }
.ap-cgrid button.fu, .ap-cgrid button:disabled { opacity: .35; cursor: default; }
.ap-wdots { display: flex; justify-content: space-between; margin-top: 12px; }
.ap-wdots div { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.ap-wdots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); display: block; }
.ap-wdots .on i { background: #3ef0b0; border-color: #3ef0b0; } .ap-wdots .td i { border-color: #3ef0b0; }
.ap-wdots small { font-size: 10.5px; color: #8b97a3; }
.ap-num { display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); color: #3ef0b0; font-weight: 700; }
.ap-fart { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(255,255,255,.06); }
.ap-fart svg { width: 100%; height: 100%; }
.ap-fart.big { width: 84px; height: 84px; border-radius: 22px; margin-bottom: 8px; }
.ap-rhero { background: linear-gradient(150deg, #1d3a32, #0a1013 85%); }
.ap-rhero h2 { margin: 6px 0 8px; }
.ap-fav::before { content: "\2605"; color: #ffd166; font-style: normal; }
.ap-step2 { display: inline-flex; align-items: center; gap: 12px; }
.ap-step2 button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #e8eef3; font-size: 18px; cursor: pointer; }
.ap-player { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-top: 4px; }
.ap-ptop { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.ap-pimg { min-height: 150px; display: flex; align-items: center; justify-content: center; } .ap-pimg img { width: 180px; height: 150px; object-fit: contain; background: #fff; border-radius: 18px; }
.ap-plabel { font-size: 13px; font-weight: 700; color: #3ef0b0; } .ap-plabel.rest { color: #ffb36b; }
.ap-pname { font-size: 22px; font-weight: 600; }
.ap-pring { position: relative; width: 150px; height: 150px; } .ap-pring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ap-pring circle { fill: none; stroke-width: 7; } .ap-pring .t { stroke: rgba(255,255,255,.08); } .ap-pring .v { stroke: #3ef0b0; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.ap-pring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 200; }
.ap-pcue { color: #b9c4cd; font-size: 13px; line-height: 1.7; margin: 0; min-height: 44px; max-width: 320px; }
.ap-player .ap-bar { width: 100%; }

/* ---------- زائر / ملفي / تمرين مرتب / نبض ---------- */
.welcome-guest-btn { display: block; width: 100%; margin: 10px 0 0; padding: 14px 20px; border-radius: 18px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.welcome-guest-btn.small { margin-top: 6px; padding: 9px 16px; font-size: 13px; background: transparent; border-color: rgba(255,255,255,.14); }
.welcome-guest-note { font-size: 12px; opacity: .7; text-align: center; margin: 8px 0 0; line-height: 1.6; }
.ap-guest { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(110,193,255,.08); border: 1px solid rgba(110,193,255,.25); border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; font-size: 12.5px; color: #cfe6f7; line-height: 1.6; }
.ap-guest .ap-btn { flex: none; }
.ap-mrow { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); }
.ap-mord { display: inline-flex; flex-direction: column; gap: 4px; }
.ap-mord button { width: 28px; height: 24px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: transparent; color: #cfd8df; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.ap-mord button:disabled { opacity: .3; cursor: default; }
.ap-php { min-height: 34px; display: flex; align-items: center; justify-content: center; }
.ap-hrb { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.ap-hrb i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.ap-hrb b { font-size: 22px; font-weight: 600; } .ap-hrb small { font-size: 11.5px; color: #aab5bf; }
.ap-pbtns { display: inline-flex; gap: 6px; }
.ap-pring b.reps { font-size: 34px; font-weight: 300; }
.ap-ptop .ap-chip { padding: 6px 10px; font-size: 12px; }
.ap-form label { display: block; font-size: 12.5px; color: #aab5bf; margin-bottom: 10px; }
.ap-form label input[type=text] { width: 100%; box-sizing: border-box; }

/* ---------- الشريط العايم: تمرين مصغّر + أغاني ---------- */
.ap-dock { position: fixed; z-index: 100000; right: 12px; bottom: 92px; width: min(92vw, 360px); display: flex; flex-direction: column; gap: 8px; touch-action: none; user-select: none; -webkit-user-select: none; font-family: inherit; }
.ap-dock.hidden { display: none; }
.ap-dock.drag { opacity: .92; }
.ap-dock.chip { width: auto; }
.apd-pill { background: rgba(14,19,23,.94); color: #f4f6f8; border: 1px solid rgba(62,240,176,.45); border-radius: 20px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.apd-pill.hidden, .apd-music.hidden { display: none; }
.apd-grip { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: grab; padding: 2px 2px 8px; }
.apd-grip b { font-size: 13.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apd-grip span { font-size: 22px; font-weight: 300; color: #3ef0b0; flex: none; }
.apd-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.apd-btns button { flex: 1; min-width: 56px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #e8eef3; font: inherit; font-size: 12.5px; cursor: pointer; }
.apd-btns button.on { color: #3ef0b0; border-color: rgba(62,240,176,.5); }
.apd-btns #apd-open { background: #3ef0b0; color: #032016; border: 0; font-weight: 700; }
.apd-btns #apd-x { flex: none; min-width: 38px; font-size: 18px; line-height: 1; }
.apd-music { background: rgba(14,19,23,.96); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); color: #f4f6f8; }
.apd-music.collapsed { position: absolute; left: -9999px; width: 320px; max-height: none; opacity: 0; pointer-events: none; }
.apd-mh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.apd-mh span { display: inline-flex; gap: 6px; }
.apd-mh button { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #e8eef3; border-radius: 10px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.apd-iframe { width: 100%; border: 0; border-radius: 12px; display: block; }
.apd-empty { font-size: 12.5px; color: #aab5bf; line-height: 1.7; padding: 4px 2px 8px; }
.apd-in { display: flex; gap: 8px; margin-top: 8px; }
.apd-in input { flex: 1; min-width: 0; margin: 0; padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 13px; direction: ltr; }
.apd-in button { flex: none; padding: 9px 14px; border-radius: 12px; border: 0; background: #3ef0b0; color: #032016; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.apd-chip { padding: 10px 16px; border-radius: 20px; border: 1px solid rgba(62,240,176,.45); background: rgba(14,19,23,.94); color: #3ef0b0; font: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.ap-pmus-on { color: #3ef0b0; }
a.ap-chip { text-decoration: none; display: inline-block; }

/* ---------- سوبر سيت / محطات / جروب ---------- */
.ap-ssl { border-inline-start: 3px solid #3ef0b0; padding-inline-start: 8px; }
.ap-ssh { font-size: 12px; font-weight: 700; color: #3ef0b0; margin: 10px 0 2px; }
.ap-lnk { display: block; margin-top: 4px; padding: 3px 10px; border-radius: 12px; border: 1px dashed rgba(255,255,255,.25); background: transparent; color: #aab5bf; font: inherit; font-size: 11.5px; cursor: pointer; }
.ap-lnk.on { border-style: solid; border-color: #3ef0b0; color: #3ef0b0; }
.ap-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ap-tmb { text-align: start; cursor: pointer; font: inherit; color: inherit; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ap-form textarea { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; color: inherit; font: inherit; padding: 10px; }
.ap-bigcd { font-size: 54px; font-weight: 200; margin: 8px 0; letter-spacing: 1px; }
.ap-player.ap-xl { gap: 14px; }
.ap-player.ap-xl .ap-pring { width: min(82vw, 52vh); height: min(82vw, 52vh); }
.ap-player.ap-xl .ap-pring b { font-size: clamp(64px, 24vw, 190px); }
.ap-player.ap-xl .ap-pname { font-size: clamp(30px, 8vw, 54px); font-weight: 700; }
.ap-player.ap-xl .ap-plabel { font-size: clamp(16px, 4vw, 26px); }
.ap-player.ap-xl .ap-pcue { font-size: clamp(16px, 4vw, 26px); max-width: 90vw; }
.ap-player.ap-xl .ap-pimg { display: none; }
.ap-ptop { flex-wrap: wrap; gap: 6px; } #ap-pcount { white-space: nowrap; }

/* ===== stage 18: ميكانيكا الحركة + البحث + المكتبة الطبية ===== */
.bio-romrow { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 12px; color: #9aa7b3; }
.bio-romrow b { flex: none; direction: ltr; font-weight: 600; color: #3ef0b0; }
.bio-rom { flex: 1; height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; display: block; }
.bio-rom i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #1d5a8a, #3ef0b0); }
.bio-ul { margin: 6px 0; padding: 0 18px; font-size: 14px; line-height: 1.8; color: #dfe6ec; }
.bio-ul li { margin: 4px 0; }
.bio-mu { cursor: pointer; font-family: inherit; }
.bio-hot { font-style: normal; font-size: 11px; color: #3ef0b0; border: 1px solid rgba(62,240,176,.4); border-radius: 10px; padding: 1px 7px; margin-inline-start: 6px; }
.ap-det { border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.04); margin: 8px 0; padding: 0 14px; }
.ap-det > summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: 15px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ap-det > summary::-webkit-details-marker { display: none; }
.ap-det > summary::after { content: '+'; color: #3ef0b0; font-size: 20px; flex: none; }
.ap-det[open] > summary::after { content: '\2212'; }
.ap-det[open] { padding-bottom: 10px; }
.ap-det .ap-actions { margin-top: 8px; }
#bio-q, #bio-exq, #gs-q { width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 15px; }
.ap-ex small.mu { display: block; font-size: 12px; color: #8b97a3; }

/* المكتبة الطبية: كل مقال ينفتح ويقفل */
#med-library-list > li.ml-art { display: block; list-style: none; padding: 0; margin: 0 0 10px; border-radius: 16px; border: 1px solid rgba(128,138,150,.28); overflow: hidden; }
#med-library-list > li.ml-art.status-draft, #med-library-list > li.ml-art.status-review { border-style: dashed; }
.ml-det { display: block; width: 100%; }
.ml-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; cursor: pointer; list-style: none; }
.ml-sum::-webkit-details-marker { display: none; }
.ml-sum::after { content: '+'; flex: none; font-size: 20px; line-height: 1; opacity: .7; }
.ml-det[open] > .ml-sum::after { content: '\2212'; }
.ml-sumtxt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; text-align: start; }
.ml-title { font-size: 15px; font-weight: 600; line-height: 1.5; }
.ml-badge { flex: none; font-size: 11px; border-radius: 10px; padding: 2px 8px; border: 1px solid rgba(128,138,150,.4); }
.ml-st-approved { color: #1f9d6b; border-color: rgba(31,157,107,.5); }
.ml-body { padding: 0 14px 14px; }
.ml-text { margin: 4px 0 10px; font-size: 14px; line-height: 1.9; white-space: pre-line; text-align: start; }
.ml-foot { font-size: 11px; opacity: .6; margin: 6px 0; text-align: start; }
.ml-body .med-thumb-btn { display: block; margin: 0 0 10px; }
.ml-body .med-thumb-btn img { max-width: 100%; max-height: 220px; border-radius: 12px; }
.exs-bio-btn { margin: 8px 0; }
.ap-card.ap-tmb, button.ap-card { width: 100%; box-sizing: border-box; text-align: start; }

.bio-libcard { margin-bottom: 12px; border-color: rgba(62,240,176,.4); }
.bio-fig-wrap { margin: 8px 0 12px; }
.bio-fig { --surface: #111a18; --surface2: #17221f; --ink: #e6f0ed; --muted: #93a6a0; --line: #22312d; --accent: #3ee6ab; --arm: #ffb24d; --bad: #ff6f7a; --fig: #dbe7e3; --fig2: #5d726c; --body: 'Cairo', system-ui, sans-serif; background: #0f1816; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 8px; margin-bottom: 8px; min-height: 40px; }
.bio-fig .bf-t { font-family: 'Cairo', system-ui, sans-serif; }
/* الرسومات */
.bio-fig svg.bf { width: 100%; height: auto; display: block; }
.bf line, .bf path { stroke-linecap: round; stroke-linejoin: round; }
.bio-fig .bf-limb { stroke: var(--fig); stroke-width: 5; fill: none; }
.bio-fig .bf-limb2 { stroke: var(--fig2); stroke-width: 5; fill: none; }
.bio-fig .bf-limb-bad { stroke: var(--bad); stroke-width: 4; stroke-dasharray: 5 5; fill: none; opacity: .8; }
.bio-fig .bf-trunk { stroke: var(--fig); stroke-width: 7; fill: none; }
.bio-fig .bf-head { fill: var(--fig); }
.bio-fig .bf-torso { fill: var(--surface2); stroke: var(--fig); stroke-width: 2.5; }
.bio-fig .bf-joint { fill: var(--surface); stroke: var(--fig); stroke-width: 2; }
.bio-fig .bf-joint-big { fill: var(--surface); stroke: var(--fig); stroke-width: 3; }
.bio-fig .bf-ground { stroke: var(--line); stroke-width: 3; }
.bio-fig .bf-guide { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 5; fill: none; }
.bio-fig .bf-arm { stroke: var(--arm); stroke-width: 2.5; fill: none; }
.bio-fig .bf-arm-head { fill: var(--arm); }
.bio-fig .bf-call { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.bio-fig .bf-call-head { fill: var(--accent); }
.bio-fig .bf-plate { fill: var(--accent); fill-opacity: .25; stroke: var(--accent); stroke-width: 2.5; }
.bio-fig .bf-plate-in { fill: var(--accent); }
.bio-fig .bf-barbell { stroke: var(--accent); stroke-width: 4; }
.bio-fig .bf-beam { stroke: var(--fig); stroke-width: 4; }
.bio-fig .bf-fulcrum { fill: var(--fig); }
.bio-fig .bf-load { fill: var(--accent); fill-opacity: .3; stroke: var(--accent); stroke-width: 2; }
.bio-fig .bf-axis { stroke: var(--muted); stroke-width: 1.5; }
.bio-fig .bf-curve { stroke: var(--accent); stroke-width: 3; fill: none; }
.bio-fig .bf-curve2 { stroke: var(--arm); stroke-width: 2.5; fill: none; stroke-dasharray: 6 5; }
.bio-fig .bf-peak { fill: var(--arm); }
.bio-fig .bf-s1 { stroke: var(--fig2); stroke-width: 3; fill: none; }
.bio-fig .bf-s2 { stroke: var(--arm); stroke-width: 3; fill: none; }
.bio-fig .bf-s3 { stroke: var(--accent); stroke-width: 3; fill: none; }
.bio-fig .bf-ok { stroke: var(--accent); stroke-width: 3; fill: none; }
.bio-fig .bf-no { stroke: var(--bad); stroke-width: 3; fill: none; }
.bio-fig .bf-hold { fill: var(--accent); }
.bio-fig .bf-orbit { stroke: var(--accent); stroke-width: 2; fill: none; stroke-dasharray: 4 4; }
.bio-fig .bf-com { fill: var(--arm); }
.bio-fig .bf-base { fill: var(--accent); fill-opacity: .55; }
.bio-fig .bf-t { fill: var(--ink); font-family: var(--body); font-size: 12px; font-weight: 600; }
.bio-fig .bf-small { font-size: 10.5px; fill: var(--muted); font-weight: 600; }
.bio-fig .bf-arm-t { fill: var(--arm); font-size: 10.5px; font-weight: 700; }
/* عاداتي اليومية */
.ap-hint { margin: 0 0 8px; font-size: 12.5px; color: #8b97a3; line-height: 1.7; }
.ap-habit span { flex: 1; }
.ap-hstreak { display: inline-block; margin-inline-start: 6px; font-size: 11px; color: #3ef0b0; }

/* رسمات الشاشات (ADAM art) */
.ap-art { width: min(240px, 72%); margin: 6px auto 0; --hairline-plate: #0e1520; --hairline-hi: #2ee07a; --hairline-edge: #6fbf93; --hairline-mid: #3f7a5c; --hairline-lo: #2a4a3a; }
