*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none;background:#fff;color:#24352f;font-family:Tahoma,Arial,sans-serif}main{position:fixed;inset:0;overflow:hidden;touch-action:none;background:#f5f6f3}canvas{width:100%;height:100%;display:block;touch-action:none}#hint{display:none}.overlay{position:fixed;top:calc(env(safe-area-inset-top,0px) + 6px);right:calc(env(safe-area-inset-right,0px) + 7px);display:flex;align-items:center;gap:9px;z-index:10;background:transparent;pointer-events:none;color:#294d3e9e;max-width:calc(100vw - 14px);height:40px}.brand{display:flex;align-items:center;gap:5px;pointer-events:none}.brand strong{font-size:19px;font-weight:500}.brand svg{width:14px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}time{font-size:16px;direction:ltr;font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none;font-family:Tahoma,Arial,sans-serif}#saveDot{height:5px;width:5px;border-radius:50%;background:#54806b70}#saveDot.error{background:#b44332;width:8px;height:8px}details{pointer-events:auto}summary{list-style:none;cursor:pointer;width:40px;height:40px;display:grid;place-items:center;font-size:29px;line-height:1;background:transparent;border:0;color:inherit;border-radius:12px;user-select:none}summary::-webkit-details-marker{display:none}summary:focus-visible{outline:2px solid #78998b}details[open] summary{background:#eff3edb3;color:#294d3e}nav{position:absolute;top:46px;right:0;width:min(300px,calc(100vw - 20px));max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 64px);overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:14px;background:#fffffff0;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid #dce2da8f;border-radius:15px;box-shadow:0 8px 30px #17302612;color:#294d3e}nav .menu-title{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-bottom:5px}nav #closeTools{border:0;background:transparent;font-size:22px;padding:0 8px}nav label{margin:0;font-size:11px;display:flex;flex-direction:column;gap:6px}nav select{width:100%}nav p,nav small{grid-column:1/-1;margin:2px 0;font-size:11px;line-height:1.8}button,select,input{font:inherit}button,select{border:1px solid #d5dad2;border-radius:8px;background:#ffffffb3;color:#24352f;padding:10px 9px;cursor:pointer}nav button{font-size:12px}button.active{background:#294d3e;color:white}button:disabled{opacity:.35;cursor:default}button:hover{border-color:#668575}dialog{border:1px solid #d3dbd2;border-radius:16px;padding:24px;width:min(94vw,480px);max-height:88dvh;overflow:auto;color:#24352f}dialog::backdrop{background:#182b2355}.close{float:left}h2{font-size:21px}p{line-height:1.9}.note{font-size:12px;color:#647268}label{display:block;margin:14px 0;font-size:13px}input:not([type=checkbox]):not([type=range]){max-width:100%;padding:8px;border:1px solid #ccd5cc;border-radius:6px}hr{border:0;border-top:1px solid #e0e5de;margin:24px 0}.reminder{border:1px solid #dfe4dc;border-radius:10px;margin:14px 0;padding:12px}.days{display:flex;gap:8px;flex-wrap:wrap}.days label{font-size:11px;margin:5px 0}#pushStatus,#message,#alarmError{font-size:12px}#alarm{text-align:center}#alarm button{margin:5px}#ack{background:#294d3e;color:white}

#penTestPad{height:200px;display:grid;place-items:center;border:1px dashed #7a9385;border-radius:12px;background:#f5f7f3;touch-action:none;user-select:none}#penTestLog{white-space:pre-wrap;font-size:11px;overflow-wrap:anywhere}.version{opacity:.5}
.quickbar{position:fixed;z-index:8;bottom:calc(env(safe-area-inset-bottom,0px) + 16px);left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:space-around;direction:rtl;width:min(350px,calc(100vw - 32px));height:62px;padding:5px 10px;border-radius:999px;background:rgb(255 255 255 / 25%);border:1px solid rgb(255 255 255 / 65%);box-shadow:0 7px 22px rgb(20 30 25 / 9%),inset 0 1px 0 rgb(255 255 255 / 60%);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);color:var(--floating-ink,#27302be6);touch-action:manipulation}.quickbar>button{display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;padding:10px;border:1px solid transparent;border-radius:50%;color:inherit;background:transparent;position:relative}.quickbar>button[aria-pressed=true],.quickbar>button[aria-expanded=true]{background:rgb(255 255 255 / 38%);border-color:rgb(255 255 255 / 68%);box-shadow:0 1px 6px #27352e0c}.quickbar>button[aria-pressed=true]::after{content:'';position:absolute;bottom:3px;width:3px;height:3px;border-radius:50%;background:currentColor;opacity:.6}.quickbar>button svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.quickbar>button:focus-visible{outline:2px solid currentColor;outline-offset:1px}.palette-panel{position:fixed;z-index:9;bottom:calc(env(safe-area-inset-bottom,0px) + 90px);left:50%;transform:translateX(-50%);width:min(330px,calc(100vw - 32px));padding:17px 20px;border-radius:23px;border:1px solid #ffffffb8;background:rgb(255 255 255 / 74%);box-shadow:0 8px 25px #17302614;backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);max-height:calc(100dvh - 155px);overflow:auto;color:#24352f}.palette-panel[hidden]{display:none}.palette-heading{display:flex;justify-content:space-between;align-items:center;font-size:14px}.palette-heading button{padding:0 6px;font-size:24px;border:0;background:transparent}.palette-panel label{font-size:12px;margin:14px 0 9px}.swatches{display:flex;gap:12px;justify-content:space-between}.swatch{height:29px;width:29px;padding:0;flex-shrink:0;border-radius:50%;background:var(--swatch);border:1px solid #82908555}.swatch[aria-pressed=true]{outline:2px solid #7a9084;outline-offset:3px}.palette-panel .picker-label{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#607168}.palette-panel input[type=color]{width:36px;height:26px;padding:0!important;border:0!important;background:none}.palette-panel .note{font-size:10px;margin:12px 0 0}.overlay{color:var(--floating-ink,#294d3e9e)}

.quickbar{bottom:calc(env(safe-area-inset-bottom,0px) + 42px);width:min(430px,calc(100vw - 16px));padding:5px 6px;gap:0}.quickbar>button{width:44px;height:46px;flex:0 1 44px;min-width:0;padding:8px}.quickbar>button svg{width:26px;height:26px}.quickbar>details{flex:0 0 34px;width:34px;color:inherit}.quickbar summary{width:34px;height:46px;font-size:27px}.quickbar nav{top:auto;bottom:calc(100% + 13px);right:0;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 140px);width:min(300px,calc(100vw - 24px));text-align:right}.quickbar nav svg{width:16px;height:16px}.quickbar details[open] summary{background:rgb(255 255 255 / 35%);color:inherit}.palette-panel{bottom:calc(env(safe-area-inset-bottom,0px) + 116px);max-height:calc(100dvh - 180px)}

#pairCode{display:block;margin:16px 0;font:20px monospace;text-align:center;letter-spacing:1px;user-select:all;color:#294d3e}#syncDevices>div{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid #e1e6df;padding:10px 0;font-size:12px}#syncDevices button{font-size:11px;padding:7px}#syncPanel section[hidden],#syncAlert[hidden]{display:none}#syncConflictPanel{padding:14px;border:1px solid #c9b68a;border-radius:10px;margin:16px 0}#syncConflictPanel button{margin:5px 0}#syncAlert{position:fixed;top:calc(env(safe-area-inset-top,0px) + 52px);right:12px;z-index:11;font-size:11px;padding:8px;background:#fff9e8ed;border-color:#d1bb85;color:#6b5127}#syncStatus{line-height:1.8}#syncPanel button{margin-bottom:5px}

#vectorPaper{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden}#paper{position:relative;background:transparent}

.quickbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));height:108px;width:min(380px,calc(100vw - 16px));border-radius:28px;gap:0;padding:5px 8px}.quickbar>button,.quickbar>details{justify-self:center}.palette-panel{bottom:calc(env(safe-area-inset-bottom,0px) + 164px);max-height:calc(100dvh - 225px)}#selectionActions{position:fixed;z-index:9;bottom:calc(env(safe-area-inset-bottom,0px) + 164px);left:50%;transform:translateX(-50%);width:min(380px,calc(100vw - 20px));padding:10px;border-radius:18px;background:#ffffffd9;backdrop-filter:blur(12px);border:1px solid #ffffffb3;box-shadow:0 5px 20px #24352f17;display:flex;gap:6px;flex-wrap:wrap;justify-content:center}#selectionActions[hidden]{display:none}#selectionActions button{font-size:13px;padding:9px}#selectionMessage{font-size:13px;width:100%;margin:0;text-align:center}textarea{font:16px/1.8 Tahoma,Arial,sans-serif;direction:rtl;display:block;width:100%;padding:12px;border:1px solid #ccd6cd;border-radius:10px;resize:vertical;margin:14px 0}#regionAlarmImage{max-width:100%;max-height:45dvh;object-fit:contain;border:1px solid #dce4dc;border-radius:8px}#regionAlarmImage[hidden]{display:none}#regionList>div{font-size:14px;padding:10px 0;border-bottom:1px solid #e0e5de}.settings-detail{border:1px solid #e0e5de;border-radius:10px;padding:10px;margin:14px 0;font-size:14px;line-height:1.9}.settings-detail>summary{width:auto;height:auto;font-size:14px;display:block;white-space:normal}.settings-detail p{font-size:14px}#ocrSpaceId{overflow-wrap:anywhere;user-select:all;font-family:monospace}#typedMessage,#regionMessage,#ocrStatus{font-size:14px;line-height:1.8}
@media(min-width:650px){.quickbar{display:flex;height:62px;width:min(650px,calc(100vw - 32px));border-radius:999px}.palette-panel,#selectionActions{bottom:calc(env(safe-area-inset-bottom,0px) + 116px)}}

.quickbar nav{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 180px)}#typingPanel .note,#regionPanel .note,#ocrPanel .note{font-size:14px}@media(min-width:650px){.quickbar nav{max-height:calc(100dvh - 140px)}}

/* v11: one glass rail on every screen, horizontal scrolling preserves usable hit targets. */
.quickbar{display:flex!important;height:62px!important;width:min(1200px,calc(100vw - 16px))!important;border-radius:999px!important;padding:5px 8px!important;gap:4px;justify-content:initial;overflow:visible}
.tool-rail{display:flex;align-items:center;gap:3px;min-width:0;flex:1;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;touch-action:pan-x;overscroll-behavior-x:contain;white-space:nowrap}
.tool-rail>button{flex:0 0 auto;min-width:44px;height:46px;padding:8px 10px;border:1px solid transparent;border-radius:24px;background:transparent;color:inherit;font-size:12px;display:grid;place-items:center}
.tool-rail>button[aria-pressed=true]{background:#ffffff70;border-color:#ffffffb3}
.tool-rail>button svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.quickbar>details{flex:0 0 34px}#selectionActions{position:static;transform:none;width:auto;flex:0 0 auto;flex-wrap:nowrap;padding:0;border:0;box-shadow:none;background:transparent;backdrop-filter:none;white-space:nowrap}#selectionActions button{flex:0 0 auto;background:#ffffff55}#selectionMessage{display:none}.palette-panel{bottom:calc(env(safe-area-inset-bottom,0px) + 116px);max-height:calc(100dvh - 180px)}

#selectionMessage{display:block;position:fixed;bottom:calc(env(safe-area-inset-bottom,0px) + 112px);left:50%;transform:translateX(-50%);z-index:9;max-width:90vw;width:auto;padding:4px 12px;border-radius:12px;background:#ffffffb0;pointer-events:none}#selectionMessage:empty{display:none}

.tool-rail>label{flex:0 0 auto;display:flex;align-items:center;gap:5px;font-size:12px;margin:0 8px}.tool-rail select{padding:7px}.quickbar [hidden]{display:none!important}

/* v12 compact glass controls: first ten tools fit on narrow phones; extras stay on the same row. */
.quickbar{height:48px!important;padding:3px 5px!important;gap:0;box-shadow:0 4px 14px rgb(20 30 25 / 14%),0 1px 3px rgb(20 30 25 / 8%);background:rgb(255 255 255 / 30%)}
.tool-rail{gap:0;scrollbar-width:none}.tool-rail::-webkit-scrollbar{display:none}
.tool-rail>button{height:38px;min-width:28px;padding:5px;flex-shrink:0;font-size:11px}
.tool-rail>button svg{width:21px;height:21px}.quickbar>details{flex:0 0 26px;width:26px}.quickbar summary{width:26px;height:38px;font-size:24px}.tool-rail>label{margin:0 4px}
#buildBadge{font:10px Tahoma;opacity:.7}#penMode{font-size:11px;color:#9a4932}#updateMessage{font-size:12px;line-height:1.8}
@media(max-width:359px){.tool-rail>button{min-width:25px;padding:3px}.tool-rail>button svg{width:19px;height:19px}}

/* v13 selection actions are anchored beside the selected region, not in the tool rail. */
#selectionActions{position:fixed;z-index:11;left:8px;top:60px;bottom:auto;transform:none;width:max-content;max-width:calc(100vw - 16px);display:flex;flex-wrap:wrap;gap:4px;padding:7px;border:1px solid #ffffffbb;border-radius:16px;background:#ffffffbd;backdrop-filter:blur(12px);box-shadow:0 3px 14px #24352f24}#selectionActions[hidden]{display:none}#selectionActions button{font-size:12px;padding:8px;background:transparent}#ocrPreview{max-width:100%;max-height:32dvh;object-fit:contain;background:white;border:1px solid #ddd}#ocrPreview:not([src]){display:none}

.brand svg{width:96px;height:49px;stroke-width:initial}.overlay{height:56px;gap:10px}#clock{font-size:22px}#copyPreview{max-width:100%;max-height:60dvh;object-fit:contain;user-select:auto;-webkit-touch-callout:default}#regionDue{font-size:18px}#buildBadge{font-size:10px}

@font-face{font-family:MaksNastaliq;src:url(/fonts/NotoNastaliqUrdu.ttf) format("truetype");font-weight:400 700;font-display:swap}.brand{width:94px;height:62px;justify-content:center;overflow:visible}.brand .calligraphy{font-family:MaksNastaliq,serif;font-size:40px;font-weight:650;line-height:1.6;transform:rotate(-4deg);display:block}.overlay{top:calc(env(safe-area-inset-top,0px) + 5px)}

.brand .calligraphy{font-size:31px;font-weight:750;transform:rotate(-2deg);letter-spacing:-1.5px}.brand{width:78px}#copyPanel p{line-height:1.9}

.brand{width:74px;height:58px;justify-content:center;overflow:hidden}.brand .logo-mark{display:block;width:70px;height:58px;object-fit:contain}.brand .calligraphy{display:none}

/* v17: compact brand above a clearly legible, differently styled live clock. */
.overlay{align-items:flex-start}.brand{width:74px;height:auto;display:flex;flex-direction:column;align-items:center;gap:0;overflow:visible}.brand .logo-mark{width:68px;height:54px;object-fit:contain}.brand #clock{font-family:Georgia,"Noto Nastaliq Urdu",serif;font-size:16px;font-weight:700;line-height:1.45;letter-spacing:.4px;color:#20382fe8;direction:ltr;font-variant-numeric:tabular-nums}
#penMode{display:flex;align-items:center;gap:3px;padding:3px 7px;border-radius:12px;background:#fff8e9e8;color:#a83224;font-weight:bold;box-shadow:0 1px 5px #26151522;margin-top:6px}#penMode[hidden]{display:none}#penMode svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#eraserCursor{position:fixed;z-index:7;width:38px;height:38px;transform:translate(-50%,-50%);pointer-events:none;filter:drop-shadow(0 1px 2px #fff)}#eraserCursor[hidden]{display:none}#eraserCursor svg{display:block;width:100%;height:100%;fill:none;stroke:#d92f20;stroke-width:2.2}#eraserCursor circle:first-child{stroke-dasharray:3 2;fill:#ffffff20}

/* v19: tint clock and use the eraser glyph as the on-paper cursor. */
.brand #clock{align-self:stretch;text-align:center;padding:2px 4px 4px;border:1px solid #758d7d55;border-radius:10px;background:linear-gradient(145deg,#eef4edeb,#dce8dfd9);box-shadow:0 2px 6px #24352f1a;color:#263d32;font-size:15px;line-height:1.45}
#eraserCursor{width:28px;height:28px;transform:translate(-20%,-86%) rotate(-35deg);filter:drop-shadow(0 2px 2px #0007)}#eraserCursor svg{stroke:#28342e;stroke-width:1.6;fill:#f5f5efed}#eraserCursor path+path{stroke:#68766c;fill:none}
#eraserModePanel{position:fixed;z-index:15;display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid #ffffffd6;border-radius:15px;background:#ffffffd9;box-shadow:0 4px 15px #17231b30;backdrop-filter:blur(12px);white-space:nowrap;font-size:12px}#eraserModePanel[hidden]{display:none}#eraserModePanel strong{margin:0 4px}#eraserModePanel button{padding:8px 11px;font-size:12px}#eraserModePanel button[aria-pressed=true]{background:#dceadf;border-color:#65816d}

/* v20: calmer conflict notice, desktop pan-only rail, aligned glass clock. */
#syncAlert{position:static;top:auto;right:auto;z-index:auto;grid-column:1/-1;width:100%;font-size:12px;color:#704d22;background:#fff8e7;border-color:#dfc889;text-align:right}
.brand{transform:translateY(7px)}.brand .logo-mark{width:68px;height:58px}.brand #clock{align-self:center;width:max-content;min-width:58px;max-width:68px;margin-top:2px;padding:0 5px;height:22px;border-radius:8px;background:rgb(223 235 225 / 54%);border:1px solid rgb(104 132 112 / 27%);box-shadow:0 1px 4px #24352f12;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);line-height:20px;font-size:14px;letter-spacing:0}
#buildBadge{display:block;align-self:center;font-size:9px;line-height:13px;opacity:.58}
@media(min-width:650px){.quickbar{width:min(210px,calc(100vw - 28px))!important;height:48px!important}.tool-rail{justify-content:center}.tool-rail>button:not(#quickPan):not(#quickPalette){display:none!important}.tool-rail>button#quickPan{display:grid!important}.quickbar>details{flex:0 0 28px;width:28px}.quickbar summary{width:28px;height:38px}.quickbar #quickPan,.quickbar #quickPalette{min-width:42px}.quickbar{gap:4px}.quickbar .tool-rail{overflow:visible}.quickbar #quickPan[aria-pressed=true]{background:#ffffff75}}

#eraserCursor{transform:translate(-17%,-58%) rotate(0deg)}

/* v21: square hit cursor, vertically stacked context menu at the selection. */
#eraserCursor{width:22px;height:22px;box-sizing:border-box;border:2px solid #d93427;background:rgb(226 53 39 / 13%);border-radius:2px;transform:translate(-50%,-50%);filter:drop-shadow(0 1px 1px #fff);}
#eraserCursor svg{display:none}
#selectionActions{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;min-width:205px;width:max-content;gap:0;padding:5px;border-radius:12px;background:rgb(250 250 248 / 94%);box-shadow:0 5px 18px #17231b30;border-color:#d8ded8}
#selectionActions button{display:block;width:100%;min-height:38px;margin:0;padding:8px 12px;border:0;border-radius:7px;background:transparent;text-align:right;font-size:13px;white-space:nowrap}
#selectionActions button+button{border-top:1px solid #35463c12}#selectionActions button:hover{background:#e8eee9}

/* v23: soften floating controls, keep transient eraser overlays quiet at startup. */
.brand #clock{background:rgb(223 235 225 / 37%);border-color:rgb(104 132 112 / 20%)}
#penMode{background:rgb(35 53 46 / 91%);color:#fff}
#penMode[hidden],#eraserCursor[hidden]{display:none!important}
#quickEraser{background:rgb(35 53 46 / 86%);color:#fff}
#quickEraser[aria-pressed=true]{background:#23352e;color:#fff;border-color:#ffffff80}
#quickEraser svg{stroke:#fff!important;filter:drop-shadow(0 0 1px #17231b)}
#selectionActions{background:rgb(250 250 248 / 83%);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px)}

/* v24: compact date and next solar event below the clock. */
.brand{width:168px;gap:0}
.brand #dayDate{display:block;align-self:center;margin-top:2px;font-size:11px;line-height:17px;white-space:nowrap;color:#263d32}
.brand #nextEvent{display:block;align-self:center;max-width:168px;margin-top:1px;padding:2px 6px;border:1px solid #758d7d28;border-radius:8px;background:rgb(223 235 225 / 34%);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-size:10px;line-height:15px;white-space:nowrap;color:#263d32}

/* v25: completely clear pen and eraser hit areas; keep the eraser glyph white. */
#quickPen,#quickEraser,#quickPen[aria-pressed="true"],#quickEraser[aria-pressed="true"]{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
#quickEraser{color:#fff!important}
#quickEraser svg{stroke:#fff!important;filter:drop-shadow(0 0 1px #17231b)}
.settings-detail[aria-label="اوقات شرعی"] h3{margin:0 0 10px;font-size:15px}
.settings-detail[aria-label="اوقات شرعی"] label{display:flex;align-items:center;justify-content:space-between;gap:8px}
#prayerCity{min-width:135px}

/* v26: prayer time is a vertical side card below the logo. */
#nextEvent{position:fixed;top:calc(env(safe-area-inset-top,0px) + 118px);right:5px;z-index:9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:104px;min-height:64px;padding:6px 5px;border:1px solid rgb(104 132 112 / 24%);border-radius:12px;background:rgb(223 235 225 / 40%);box-shadow:0 2px 8px #24352f12;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);text-align:center;pointer-events:none}
#nextEventName{font-size:10px;line-height:1.45;color:#263d32}
#nextEventCountdown{font-size:10px;line-height:1.4;direction:rtl;color:#263d32}
nav .prayer-menu{display:block;margin:8px 0;padding:8px;border-radius:9px;background:#ffffff24;font-size:12px}
nav .prayer-menu select{display:block;width:100%;margin-top:5px}
@media(min-width:650px){#nextEvent{top:calc(env(safe-area-inset-top,0px) + 118px);right:8px}}

/* v27: compact header with the prayer countdown beside the logo. */
.brand #clock{width:68px;min-width:68px;max-width:68px}
#nextEvent{top:calc(env(safe-area-inset-top,0px) + 7px);right:calc(env(safe-area-inset-right,0px) + 100px);width:82px;min-height:62px;padding:5px 4px;border-radius:11px}
#nextEventName{font-size:10px;line-height:1.5}
#nextEventCountdown{font-size:10px;line-height:1.45}
@media(min-width:650px){#nextEvent{top:calc(env(safe-area-inset-top,0px) + 7px);right:calc(env(safe-area-inset-right,0px) + 100px)}}

/* v29: move the logo left and reserve the right-side column for prayer times. */
.brand{position:fixed;top:calc(env(safe-area-inset-top,0px) + 5px);right:calc(env(safe-area-inset-right,0px) + 78px);width:74px;gap:0}
#nextEvent{top:calc(env(safe-area-inset-top,0px) + 20px);right:calc(env(safe-area-inset-right,0px) + 5px);width:62px;min-height:104px;padding:7px 4px}
#nextEventName,#nextEventCountdown{max-width:100%;white-space:normal;overflow-wrap:anywhere}
@media(min-width:650px){.brand{right:calc(env(safe-area-inset-right,0px) + 78px)}#nextEvent{right:calc(env(safe-area-inset-right,0px) + 5px)}}

/* v30: stack prayer text along a narrow vertical strip. */
#nextEvent{height:152px;min-height:152px;width:38px;flex-direction:row;gap:7px;justify-content:center;padding:7px 3px}
#nextEventName,#nextEventCountdown{writing-mode:vertical-rl;text-orientation:mixed;white-space:nowrap;overflow-wrap:normal;max-width:none;line-height:1.35}
#copyPreview{touch-action:auto;-webkit-touch-callout:default;user-select:auto;-webkit-user-select:auto}

/* v32: rotate prayer lines and keep the logo's exterior fully transparent. */
.brand .logo-mark{background:transparent;border-radius:0}
#nextEvent{display:block;width:32px;min-width:32px;height:162px;min-height:162px;top:calc(env(safe-area-inset-top,0px) + 20px);right:calc(env(safe-area-inset-right,0px) + 5px);padding:0}
#nextEventName,#nextEventCountdown{position:absolute;left:50%;display:block;width:max-content;max-width:none;white-space:nowrap;writing-mode:horizontal-tb;text-orientation:mixed;font-size:10px;line-height:1.3;transform:translate(-50%,-50%) rotate(90deg)}
#nextEventName{top:32%}
#nextEventCountdown{top:70%}
@media(min-width:650px){#nextEvent{right:calc(env(safe-area-inset-right,0px) + 5px)}}

/* v33: preserve the original logo as the base; tint only enclosed transparent counters. */
.brand .logo-mark{background:none!important;border-radius:0!important}
.brand .logo-counter-tint{position:absolute;z-index:1;pointer-events:none;width:auto;height:54px;max-width:68px;left:50%;top:0;transform:translateX(-50%);object-fit:contain}
.brand{right:calc(env(safe-area-inset-right,0px) + 55px)}
@media(min-width:650px){.brand{right:calc(env(safe-area-inset-right,0px) + 55px)}}

/* v34: move the larger countdown under the clock; leave only a small label in the side strip. */
.brand #nextEventCountdown{position:static;left:auto;top:auto;display:block;width:max-content;max-width:110px;align-self:center;margin:0;padding:0 2px;white-space:nowrap;writing-mode:horizontal-tb;transform:none;font-size:14px;font-weight:700;line-height:1.35;direction:rtl;color:#24352f}
#nextEvent{width:30px;min-width:30px}
#nextEventName{top:50%;font-size:8px;line-height:1.2}

/* v35: keep the label and the larger countdown together inside the compact side card. */
.brand{right:calc(env(safe-area-inset-right,0px) + 47px)}
#nextEvent{width:38px;min-width:38px;height:142px;min-height:142px;right:calc(env(safe-area-inset-right,0px) + 5px)}
#nextEventName{top:27%;font-size:8px;line-height:1.15}
#nextEventCountdown{top:72%;font-size:11px;font-weight:700;line-height:1.2;direction:rtl;color:#24352f}
@media(min-width:650px){.brand{right:calc(env(safe-area-inset-right,0px) + 47px)}#nextEvent{right:calc(env(safe-area-inset-right,0px) + 5px)}}

/* v36: the small label and larger countdown form one vertical sentence inside the card. */
.brand{right:calc(env(safe-area-inset-right,0px) + 43px)}
#nextEvent{display:block;width:32px;min-width:32px;height:150px;min-height:150px;right:calc(env(safe-area-inset-right,0px) + 5px);padding:0}
#eventLine{position:absolute;left:50%;top:50%;display:flex;align-items:baseline;gap:3px;width:max-content;white-space:nowrap;direction:rtl;transform:translate(-50%,-50%) rotate(90deg)}
#nextEventName,#nextEventCountdown{position:static;display:inline;left:auto;top:auto;width:auto;max-width:none;white-space:nowrap;writing-mode:horizontal-tb;transform:none;line-height:1.2}
#nextEventName{font-size:8px;font-weight:400}
#nextEventCountdown{font-size:11px;font-weight:700;direction:rtl;color:#24352f}
@media(min-width:650px){.brand{right:calc(env(safe-area-inset-right,0px) + 43px)}#nextEvent{right:calc(env(safe-area-inset-right,0px) + 5px)}}
