/* Muslim Cosmos — premium Islamic UI (emerald + gold on night sky) */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --ink: #eef7f0; --dim: #9fbeac; --gold: #e8d088; --emerald: #2ea87a;
    --panel: rgba(8, 22, 18, .86); --line: rgba(160, 220, 190, .18);
    --accent: #4fd8a4; --deep: #04120e;
}
html, body { height: 100%; overflow: hidden; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--ink); background: var(--deep);
    -webkit-user-select: none; user-select: none;
    -webkit-tap-highlight-color: transparent; -webkit-app-region: no-drag;
}
body.transparent { background: transparent; }
#app { position: relative; width: 100vw; height: 100vh; }
#bgimg { position: absolute; inset: -4%; background-size: cover; background-position: center; display: none; transition: filter .3s; }
#bg { position: absolute; inset: 0; width: 100%; height: 100%; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }

/* ---------- top bar ---------- */
#topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 30;
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: linear-gradient(180deg, rgba(3,10,7,.75), rgba(3,10,7,0));
    pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-orb {
    width: 15px; height: 15px; border-radius: 50%;
    background: radial-gradient(circle at 60% 40%, transparent 38%, #f2d98a 42%, #f2d98a 55%, #7a5f14);
    box-shadow: 0 0 14px 3px rgba(240, 215, 130, .4);
}
.brand-t { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.brand-t b { color: var(--ink); font-weight: 600; }
.hijri-chip, .np-chip {
    font-size: 11.5px; font-weight: 600; letter-spacing: .04em; padding: 7px 13px;
    border-radius: 20px; border: 1px solid var(--line); white-space: nowrap;
    background: rgba(8, 20, 15, .55); backdrop-filter: blur(8px);
}
.hijri-chip { color: var(--gold); }
.np-chip { color: var(--accent); }
.topbtns { margin-left: auto; display: flex; gap: 8px; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
    background: rgba(8, 20, 15, .6); color: #d3e8db; display: flex; align-items: center;
    justify-content: center; cursor: pointer; backdrop-filter: blur(8px);
    transition: transform .15s, background .2s, box-shadow .2s;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#btnMoments svg path { fill: currentColor; stroke: none; }
.icon-btn:hover { background: rgba(30, 70, 52, .8); transform: scale(1.07); box-shadow: 0 0 16px rgba(79,216,164,.3); }
.icon-btn.sm { width: 28px; height: 28px; font-size: 17px; }

/* ---------- rail ---------- */
#rail {
    position: fixed; left: 10px; top: 50%; transform: translateY(-50%); z-index: 25;
    display: flex; flex-direction: column; gap: 5px; max-height: 86vh; overflow-y: auto;
    background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
    padding: 8px 6px; backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(0,0,0,.4);
    scrollbar-width: none;
}
#rail::-webkit-scrollbar { display: none; }
#rail button {
    width: 56px; padding: 7px 2px 6px; border: 0; border-radius: 12px; cursor: pointer;
    background: transparent; color: var(--dim);
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    transition: background .2s, color .2s;
}
#rail .g { font-size: 16px; line-height: 1; }
#rail i { font-style: normal; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
#rail button:hover { background: rgba(46, 168, 122, .2); color: var(--ink); }
#rail button.on { background: linear-gradient(160deg, rgba(60,170,125,.4), rgba(28,110,80,.35)); color: #fff; box-shadow: inset 0 0 0 1px rgba(140,230,190,.3), 0 0 14px rgba(60,200,150,.25); }

/* ---------- DOM panel (content views) ---------- */
#panel {
    position: fixed; top: 62px; right: 10px; bottom: 96px; left: 84px; z-index: 20;
    overflow-y: auto; display: none; padding: 6px 4px 20px;
    scrollbar-width: thin;
}
#panel.open { display: block; animation: panelIn .3s ease-out; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }
.np-chip.urgent { border-color: rgba(232,208,136,.75); color: var(--gold); animation: npPulse 1.1s infinite; }
@keyframes npPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,208,136,.4); } 50% { box-shadow: 0 0 14px 3px rgba(232,208,136,.28); } }
.hli { padding: 9px 11px; margin-bottom: 6px; background: rgba(46,168,122,.1); border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; line-height: 1.55; }
.salrow { display: flex; gap: 6px; margin-top: 4px; }
.schip { flex: 1; min-width: 0; border: 1px solid var(--line); background: rgba(10,26,19,.6); color: var(--ink); border-radius: 12px; padding: 9px 4px; cursor: pointer; font: 600 11.5px 'Segoe UI'; display: flex; flex-direction: column; gap: 2px; align-items: center; transition: all .15s; }
.schip i { font-style: normal; font-size: 10px; color: var(--dim); }
.schip.done { background: rgba(46,168,122,.32); border-color: rgba(110,230,180,.5); color: #cdf3df; }
.schip:active { transform: scale(.95); }
.wkrow { display: flex; gap: 5px; align-items: flex-end; height: 84px; margin-top: 8px; }
.wkcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; height: 100%; }
.wkcol i { display: block; width: 100%; min-height: 3px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #37b284, #14624a); transition: height .3s; }
.wkcol.today i { background: linear-gradient(180deg, #e8d088, #a8863a); }
.wkcol b { font-size: 10px; color: var(--ink); }
.wkcol s { text-decoration: none; font-size: 9px; color: var(--dim); }
/* quran */
.dt-ar.ayah { animation: ayGlow 4s ease-in-out infinite; }
@keyframes ayGlow { 0%, 100% { text-shadow: 0 0 6px rgba(232,208,136,.12); } 50% { text-shadow: 0 0 20px rgba(232,208,136,.55); } }
.scard { animation: panelIn .35s ease-out both; }
.qtag { font-size: 9.5px; letter-spacing: .06em; padding: 1px 7px; border-radius: 8px; }
.qtag.mak { background: rgba(232,208,136,.15); color: var(--gold); }
.qtag.mad { background: rgba(120,190,255,.14); color: #9ecfff; }
.qintxt { color: var(--gold); font-weight: 600; }
/* in-app quran text */
.qtxt { direction: rtl; margin-top: 10px; padding: 12px 14px; background: rgba(10,26,19,.55); border: 1px solid rgba(232,208,136,.18); border-radius: 12px; max-height: 320px; overflow-y: auto; }
.qtxt-b { text-align: center; color: var(--gold); font-family: Georgia, 'Traditional Arabic', serif; font-size: 16px; margin-bottom: 8px; }
.qtxt-a { font-family: Georgia, 'Traditional Arabic', serif; font-size: 17px; line-height: 2; color: #f3ead0; text-align: right; padding: 2px 0; }
.qtxt-n { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; text-align: center; margin-right: 8px; border: 1px solid rgba(232,208,136,.4); border-radius: 50%; font-size: 10px; color: var(--gold); font-family: 'Segoe UI'; }
/* qada counter + adhkar + sadaqah rows */
.qdgrid { display: grid; gap: 6px; }
.qdrow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.qdrow span { flex: 1; color: var(--ink); }
.qdrow b { min-width: 22px; text-align: center; color: var(--gold); }
.qdb { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: rgba(10,26,19,.6); color: var(--ink); cursor: pointer; font-weight: 700; }
.qdb:active { transform: scale(.9); }
.akchip { margin-top: 8px; border: 1px solid rgba(232,208,136,.35); background: rgba(232,208,136,.08); color: var(--gold); border-radius: 20px; padding: 5px 14px; font: 600 12px 'Segoe UI'; cursor: pointer; transition: all .15s; }
.akchip.done { background: rgba(46,168,122,.3); border-color: rgba(110,230,180,.5); color: #cdf3df; }
.sqrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(160,200,175,.08); font-size: 12px; }
.sqrow span { flex: 1; color: var(--dim); }
.sqrow b { color: var(--gold); }
#iqRow input { flex: 1; min-width: 46px; text-align: center; }
#panel::-webkit-scrollbar { width: 8px; }
#panel::-webkit-scrollbar-thumb { background: rgba(120,170,145,.3); border-radius: 4px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pcard {
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
    padding: 14px 16px; backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0,0,0,.35);
    transition: transform .15s, border-color .2s;
}
.pcard:hover { transform: translateY(-2px); border-color: rgba(160,220,190,.4); }
.pcard h3 { font-size: 14px; font-weight: 600; color: var(--gold); margin-bottom: 5px; }
.pcard .ar { font-size: 19px; font-family: 'Segoe UI', Georgia, serif; direction: rtl; text-align: right; color: #dff3e6; margin: 6px 0; line-height: 1.7; }
.pcard .en { font-size: 12px; color: var(--dim); line-height: 1.45; }
.pcard .ref { font-size: 10px; color: rgba(160,190,170,.55); margin-top: 6px; letter-spacing: .05em; }
.pcard .big { font-size: 22px; font-weight: 700; color: var(--ink); }
.pcard .sub { font-size: 11px; color: var(--dim); }
.pcard.click { cursor: pointer; }
.catrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 4px 14px; }
.catrow button {
    border: 1px solid var(--line); background: rgba(10,26,19,.6); color: var(--dim);
    font: 600 11px 'Segoe UI'; letter-spacing: .04em; padding: 7px 12px; border-radius: 16px; cursor: pointer;
}
.catrow button.on { background: linear-gradient(135deg, #2ea87a, #1d6e52); color: #fff; border-color: transparent; }
.meter { height: 8px; background: rgba(255,255,255,.08); border-radius: 5px; overflow: hidden; margin: 8px 0; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, #2ea87a, #e8d088); border-radius: 5px; transition: width .4s; }
.tasbih-ring { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0; }
.tcount { font-size: 52px; font-weight: 800; color: var(--gold); text-shadow: 0 0 24px rgba(232,208,136,.35); font-variant-numeric: tabular-nums; }
.tapbtn {
    width: 150px; height: 150px; border-radius: 50%; border: 2px solid rgba(232,208,136,.5);
    background: radial-gradient(circle at 35% 30%, #175641, #0a2b20);
    color: var(--gold); font-size: 15px; letter-spacing: .1em; cursor: pointer;
    box-shadow: 0 0 34px rgba(46,168,122,.35), inset 0 0 30px rgba(0,0,0,.5);
    transition: transform .07s; user-select: none;
}
.tapbtn:active { transform: scale(.94); }
.tapbtn small { display: block; font-size: 10px; color: var(--dim); letter-spacing: .2em; margin-top: 4px; }
.dhrow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dhrow button {
    border: 1px solid var(--line); border-radius: 14px; padding: 8px 11px; cursor: pointer;
    background: rgba(10,26,19,.6); color: var(--dim); font-size: 12px;
}
.dhrow button.on { background: rgba(46,168,122,.35); color: #fff; border-color: var(--accent); }
.namecard { text-align: center; padding: 16px 10px; }
.namecard .num { font-size: 9px; color: rgba(160,190,170,.5); letter-spacing: .15em; }
.namecard .nar { font-size: 26px; font-family: Georgia, serif; color: var(--gold); margin: 6px 0 3px; }
.namecard .ntr { font-size: 13px; font-weight: 700; color: var(--ink); }
.namecard .nmn { font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.namecard .fav { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 15px; cursor: pointer; color: rgba(232,208,136,.4); }
.namecard .fav.on { color: var(--gold); }
.namecard { position: relative; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calday {
    background: rgba(10, 24, 18, .7); border: 1px solid var(--line); border-radius: 10px;
    padding: 7px 6px; min-height: 56px; text-align: center; cursor: pointer; position: relative;
}
.calday:hover { background: rgba(30, 70, 52, .5); }
.calday .hd { font-size: 15px; font-weight: 700; color: var(--ink); }
.calday .gd { font-size: 9px; color: var(--dim); }
.calday .ev { position: absolute; bottom: 4px; left: 0; right: 0; font-size: 11px; }
.calday.today { border-color: var(--gold); background: rgba(60, 50, 15, .45); box-shadow: 0 0 12px rgba(232,208,136,.2); }
.calhead { text-align: center; font-size: 10px; letter-spacing: .1em; color: var(--dim); padding: 4px 0; }
.calnav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.calnav button { border: 1px solid var(--line); background: rgba(10,26,19,.7); color: var(--ink); border-radius: 10px; padding: 7px 14px; cursor: pointer; font-size: 15px; }
.calnav .caltitle { font-size: 16px; font-weight: 600; color: var(--gold); min-width: 200px; text-align: center; }
.fastdots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.fastdots .fd {
    width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer;
    background: rgba(10,24,18,.7); color: var(--dim); font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.fd.done { background: linear-gradient(150deg, #2ea87a, #1d6e52); color: #fff; border-color: transparent; }
.fd.today { border-color: var(--gold); box-shadow: 0 0 10px rgba(232,208,136,.35); }
.zrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.zrow label { font-size: 12px; color: var(--dim); flex: 1; }
.zrow input { width: 130px; background: #071810; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; color: var(--ink); font: 13px 'Segoe UI'; color-scheme: dark; }
.zrow input:focus { outline: none; border-color: var(--accent); }
.ztotal { font-size: 24px; font-weight: 800; color: var(--gold); text-align: center; margin: 12px 0 4px; }
.note { font-size: 10.5px; color: rgba(170,200,180,.6); line-height: 1.5; margin-top: 10px; padding: 9px 11px; background: rgba(232,208,136,.07); border-left: 3px solid rgba(232,208,136,.4); border-radius: 6px; }
/* today view — sacred windows & deed checklist */
.win { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid rgba(160,220,190,.09); }
.win:last-of-type { border-bottom: 0; }
.win .wt { font-size: 16px; width: 24px; text-align: center; flex-shrink: 0; }
.win .wb { flex: 1; min-width: 0; }
.win .wn { font-size: 12.5px; color: #e9f2ec; font-weight: 600; }
.win .ww { font-size: 10.5px; color: var(--dim); line-height: 1.45; margin-top: 2px; }
.wst { font-size: 9.5px; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--dim); white-space: nowrap; flex-shrink: 0; letter-spacing: .04em; }
.wst.now { background: rgba(232,208,136,.18); color: var(--gold); box-shadow: 0 0 10px rgba(232,208,136,.25); font-weight: 700; }
.wst.next { color: #4fd8a4; }
.deed { display: flex; gap: 9px; align-items: flex-start; width: 100%; text-align: left; padding: 8px 9px; margin: 4px 0; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--ink); font: 12px 'Segoe UI'; transition: background .15s; }
.deed:hover { background: rgba(46,168,122,.14); }
.deed.done { opacity: .5; }
.deed.done .db b { text-decoration: line-through; }
.deed .dbox { flex-shrink: 0; color: var(--accent); font-size: 14px; }
.deed .di { flex-shrink: 0; font-size: 14px; }
.deed .db { flex: 1; min-width: 0; }
.deed .db b { display: block; font-size: 12px; font-weight: 600; }
.deed .db i { display: block; font-style: normal; font-size: 10.5px; color: var(--dim); margin-top: 2px; line-height: 1.4; }
/* arabic — right-to-left panels & sheets */
body.rtl #panel .pcard, body.rtl .sheet, body.rtl #detail, body.rtl #moments { direction: rtl; }
body.rtl .deed, body.rtl .win { text-align: right; }

/* ---------- drawers ---------- */
#moments, #detail {
    position: fixed; top: 60px; right: 10px; bottom: 96px; z-index: 26;
    width: 310px; max-width: calc(100vw - 90px);
    background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
    backdrop-filter: blur(12px); box-shadow: 0 12px 40px rgba(0,0,0,.5);
    transform: translateX(340px); transition: transform .3s cubic-bezier(.2,.8,.2,1);
    display: flex; flex-direction: column; overflow: hidden;
}
#moments.open, #detail.open { transform: translateX(0); }
.ins-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.ins-head .icon-btn { margin-left: auto; }
#dtBody, #momList { flex: 1; overflow-y: auto; padding: 12px 14px; }
.dt-ar { font-size: 26px; direction: rtl; text-align: right; font-family: Georgia, serif; color: var(--gold); line-height: 1.7; margin: 8px 0; }
.dt-en { font-size: 13.5px; line-height: 1.55; color: #d9ecdf; }
.dt-sub { font-size: 11px; color: var(--dim); margin-top: 8px; letter-spacing: .06em; }
.ins-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed rgba(160,220,190,.12); }
.ins-row span:first-child { color: var(--dim); }
.mom { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 6px; background: rgba(46,168,122,.14); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.mom:hover { background: rgba(46,168,122,.26); }
.mom .ic { font-size: 18px; }
.mom .inf { flex: 1; min-width: 0; }
.mom .lb { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mom .dt { font-size: 11px; color: var(--dim); }
.mom .del { border: 0; background: none; color: var(--dim); font-size: 15px; cursor: pointer; padding: 4px; }

/* ---------- dock ---------- */
#dock {
    position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 30;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
    background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
    padding: 9px 14px; backdrop-filter: blur(12px); box-shadow: 0 10px 34px rgba(0,0,0,.5);
    max-width: calc(100vw - 20px);
}
.dt { border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; display: flex; flex-direction: column; line-height: 1.15; padding: 2px 6px; border-radius: 10px; }
.dt:hover { background: rgba(46,168,122,.18); }
#dtBig { font-size: 14.5px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; }
#dtSmall { font-size: 10px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.units { display: flex; gap: 3px; background: rgba(6,16,12,.6); border-radius: 12px; padding: 3px; }
.units button { border: 0; background: transparent; color: var(--dim); font: 600 11px 'Segoe UI'; padding: 6px 9px; border-radius: 9px; cursor: pointer; }
.units button.on { background: rgba(46,168,122,.4); color: #fff; }
.steppers { display: flex; align-items: center; gap: 6px; }
.stbtn, .speed { border: 1px solid var(--line); background: rgba(14,30,22,.6); color: var(--ink); border-radius: 12px; cursor: pointer; font-size: 17px; padding: 7px 13px; transition: background .15s, transform .1s; }
.stbtn:hover { background: rgba(46,168,122,.4); }
.stbtn:active { transform: scale(.94); }
.speed { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 9px 11px; min-width: 74px; }
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, #37b284, #14624a); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 18px rgba(60,200,150,.4); transition: transform .15s, box-shadow .2s; }
.play:hover { transform: scale(1.08); box-shadow: 0 0 26px rgba(60,200,150,.6); }
.play svg { width: 20px; height: 20px; fill: currentColor; }
.quick { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line); background: rgba(14,30,22,.55); color: var(--dim); font: 700 10px 'Segoe UI'; letter-spacing: .08em; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.chip:hover { color: #fff; background: rgba(46,168,122,.4); }

/* ---------- sheets ---------- */
#sheetWrap { position: fixed; inset: 0; z-index: 40; display: none; align-items: flex-end; justify-content: center; background: rgba(2,8,5,.6); backdrop-filter: blur(4px); }
#sheetWrap.open { display: flex; }
.sheet { display: none; width: 100%; max-width: 460px; max-height: 84vh; overflow-y: auto; background: #0a1a13; border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; padding: 16px 18px 28px; animation: rise .28s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet.open { display: block; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; margin-bottom: 6px; }
.lbl { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); margin: 14px 0 7px; }
.sheet input, .sheet select { width: 100%; background: #071810; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; font: 14px 'Segoe UI'; margin-bottom: 8px; color-scheme: dark; }
.sheet input:focus, .sheet select:focus { outline: none; border-color: rgba(100,220,170,.6); }
.row2 { display: flex; gap: 8px; }
.row2 > * { flex: 1; min-width: 0; }
.btn { display: block; width: 100%; margin-top: 8px; padding: 12px; border: 0; border-radius: 14px; cursor: pointer; background: linear-gradient(135deg, #37b284, #14624a); color: #fff; font: 600 13.5px 'Segoe UI'; letter-spacing: .05em; transition: transform .12s, filter .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn.ghost { background: rgba(46,168,122,.18); border: 1px solid var(--line); color: var(--ink); }
.btn.ghost.on { border-color: var(--accent); color: #fff; box-shadow: 0 0 12px rgba(79,216,164,.25); }
.btn.danger { color: #ff9a92; }
.bgrow { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-bottom: 8px; }
.bgsel { border: 1px solid var(--line); border-radius: 12px; padding: 18px 4px 8px; cursor: pointer; color: var(--dim); font: 600 10.5px 'Segoe UI'; letter-spacing: .05em; position: relative; background: rgba(7,18,12,.7); }
.bgsel::before { content: ''; position: absolute; top: 5px; left: 8px; right: 8px; height: 8px; border-radius: 4px; }
.bgsel[data-bg="cosmic"]::before { background: linear-gradient(90deg, #10331f, #1d5e3a, #0d2b4a); }
.bgsel[data-bg="emerald"]::before { background: linear-gradient(90deg, #0d4a2f, #2ea87a, #0d3a3f); }
.bgsel[data-bg="image"]::before { background: linear-gradient(90deg, #6b5426, #8f7b3a, #3a5a6e); }
.bgsel[data-bg="glass"]::before { background: linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.45)); }
.bgsel[data-snd="off"]::before { background: linear-gradient(90deg, #3a4152, #4a5170); }
.bgsel[data-snd="desert"]::before { background: linear-gradient(90deg, #5e3a1d, #8f6b2b); }
.bgsel[data-snd="pad"]::before { background: linear-gradient(90deg, #1d5e4a, #2b8f6e); }
.bgsel[data-snd="wind"]::before { background: linear-gradient(90deg, #1d5e5a, #2b7a8f); }
.bgsel[data-snd="ney"]::before { background: linear-gradient(90deg, #6e4a1d, #b98a3a); }
.bgsel[data-snd="maqam"]::before { background: linear-gradient(90deg, #3a1d5e, #6e2b8f); }
.bgsel[data-snd="rain"]::before { background: linear-gradient(90deg, #1d3a5e, #2b6e8f); }
.bgsel[data-snd="birds"]::before { background: linear-gradient(90deg, #4a5e1d, #8fb92b); }
.bgsel[data-snd="dhikr"]::before { background: linear-gradient(90deg, #5e4a1d, #c9a83a); }
.bgsel[data-snd="custom"]::before { background: linear-gradient(90deg, #5e1d4a, #8f2b5e); }
.bgsel.on { border-color: var(--accent); color: #fff; box-shadow: 0 0 12px rgba(79,216,164,.3); }
.sliders label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--dim); }
.sliders select { width: auto; padding: 4px 8px; margin: 0; font-size: 11px; border-radius: 8px; }
.sliders input[type="range"] { flex: 1; margin: 0; padding: 0; }
.emojirow { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.emojirow button { border: 1px solid var(--line); background: rgba(7,18,12,.7); border-radius: 10px; font-size: 17px; padding: 7px 9px; cursor: pointer; }
.emojirow button.on { border-color: var(--gold); box-shadow: 0 0 10px rgba(232,208,136,.35); }

/* ---------- hint / status ---------- */
#hint { position: fixed; top: 62px; left: 50%; transform: translate(-50%, -10px); z-index: 35; font-size: 12.5px; color: #e6f2ea; background: rgba(8,20,14,.92); padding: 8px 16px; border-radius: 20px; border: 1px solid rgba(160,220,190,.3); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s; max-width: 88vw; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
#hint.show { opacity: 1; transform: translate(-50%, 0); }
#statusline { position: fixed; left: 14px; bottom: 12px; z-index: 8; font-size: 11px; letter-spacing: .05em; color: rgba(190,225,205,.5); text-shadow: 0 1px 3px rgba(0,0,0,.8); pointer-events: none; }

@media (max-width: 720px) {
    #rail { left: 6px; gap: 3px; padding: 5px 4px; }
    #rail button { width: 44px; }
    #rail i { display: none; }
    #panel { left: 56px; }
    #moments, #detail { top: 56px; right: 6px; bottom: 132px; width: min(320px, calc(100vw - 60px)); }
    #dock { gap: 6px; padding: 8px 10px; bottom: 6px; }
    #dtBig { font-size: 12.5px; }
    .brand-t { display: none; }
    .hijri-chip, .np-chip { font-size: 10px; padding: 6px 9px; }
}
/* live-wallpaper window mode (#live) — pure sky, no chrome */
body.wpchrome #topbar, body.wpchrome #rail, body.wpchrome #dock, body.wpchrome #panel,
body.wpchrome #moments, body.wpchrome #detail, body.wpchrome #sheetWrap,
body.wpchrome #statusline, body.wpchrome #hint, body.wpchrome .np-chip,
body.wpchrome .hijri-chip { display: none !important; }

@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
