/* Saros v31 — undo, reading comfort, keyboard, search */
#toast.ux-has-undo{pointer-events:auto;display:flex;align-items:center;gap:10px}
.ux-undo{border:0;background:none;padding:2px 6px;min-height:0;color:inherit;font:inherit;font-weight:800;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
/* text size: the whole page grows or shrinks the same way (layouts stay the same) */
/* stronger contrast */
/* v31.1: !important so it also wins over the seasons and «شكلي», which set the same colours */
body[data-contrast="high"]{--muted:color-mix(in srgb,var(--text) 84%,var(--bg))!important;--muted-2:color-mix(in srgb,var(--text) 72%,var(--bg))!important;--border:color-mix(in srgb,var(--text) 38%,var(--bg))!important}
body[data-contrast="high"] :is(.muted,.lg-muted,.health-eyebrow,.v28-set-row small,.sp-date,.fc-sub,.pl-type,.hz-kind){color:color-mix(in srgb,var(--text) 84%,var(--bg))!important}
body[data-contrast="high"] .tiny-muted,body[data-contrast="high"] small{color:color-mix(in srgb,var(--text) 80%,var(--bg))}
/* keys */
.ux-keys dl{display:grid;gap:6px;margin:0}
.ux-keys dl>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid var(--border)}
.ux-keys dt{display:flex;gap:4px;align-items:center}.ux-keys dd{margin:0}
kbd{display:inline-grid;place-items:center;min-width:26px;height:26px;padding:0 6px;border:1px solid var(--border);border-bottom-width:2px;border-radius:7px;background:var(--surface-2);font:600 12px var(--latin,monospace);direction:ltr}
/* search */
.ux-search input{width:100%;min-height:46px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text);padding:0 14px;font-size:15px}
.ux-results{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;max-height:50vh;overflow:auto}
.ux-results button{width:100%;display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:44px;padding:6px 10px;border:0;border-radius:10px;background:none;color:var(--text);text-align:right;font:inherit}
.ux-results button:hover,.ux-results button:focus-visible{background:var(--surface-2)}
.ux-results small{color:var(--muted);font-size:11.5px}.ux-results em{font-style:normal;color:var(--muted);font-size:12px}
.ux-results span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ux-none{padding:12px;color:var(--muted)}
.ux-empty-btn{margin-inline-start:6px;vertical-align:middle}
.ux-phase{margin:2px 0 0;color:var(--muted);font-size:12px}.ux-phase .lib-link{font-size:12px;padding:0 2px;color:var(--muted)}
.d30-untimed .d30-list>.d30-row{cursor:grab}
.d30-row.ux-dragging{opacity:.4}
.ux-ghost{position:fixed;z-index:80;pointer-events:none;transform:translate(-50%,-60%) rotate(-1.5deg);width:min(340px,80vw);padding:10px 14px;border-radius:14px;background:var(--surface);border:1px solid var(--border);box-shadow:0 18px 30px -12px rgba(0,0,0,.4);display:flex;gap:10px;align-items:center}
.ux-ghost[data-time]::before{content:attr(data-time);font:700 13px var(--latin,monospace);padding:2px 8px;border-radius:8px;background:var(--button-bg,var(--text));color:var(--button-text,var(--surface))}
.d30-schedule.ux-drop{position:relative;outline:2px dashed var(--border);outline-offset:4px}
.d30-schedule.ux-drop.is-over{outline-color:var(--text);background:color-mix(in srgb,var(--surface-2) 70%,var(--surface))}
.ux-drop-hint{position:absolute;inset-inline:12px;bottom:10px;display:flex;justify-content:space-between;align-items:center;padding:8px 12px;border-radius:10px;background:var(--surface-2);color:var(--muted);font-size:12.5px}
.ux-drop-hint b{font:700 14px var(--latin,monospace);color:var(--text)}
.ux-after{display:flex;flex-direction:column;gap:16px}
.ux-after-min{margin:0;font-size:15px}.ux-after-min b{font-size:20px}
.ux-after-q,.ux-after-lang{display:flex;flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid var(--border)}
.ux-after-btns{display:flex;gap:8px}
.ux-mem{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.ux-mem li{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border-radius:10px;background:var(--surface-2)}
.ux-mem small{color:var(--muted);font-size:11.5px}.ux-mem span{font-size:13.5px;line-height:1.6;overflow-wrap:anywhere}
.ux-tpls{display:flex;flex-direction:column;gap:10px}
.ux-tpl{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:14px;flex-wrap:wrap}
.ux-tpl strong{display:block;font-size:14.5px}.ux-tpl small{color:var(--muted);font-size:12.5px}
.ux-tpl-done{color:var(--muted);font-size:12px;width:100%;text-align:left}
.ux-welcome{gap:14px}.ux-welcome h3{margin:0;font-size:21px}.ux-welcome p{margin:0;color:var(--muted);line-height:1.8}
.ux-dots{display:flex;gap:6px}.ux-dots i{width:22px;height:5px;border-radius:3px;background:var(--surface-3)}.ux-dots i.is-on{background:var(--text)}.ux-dots i.is-done{background:color-mix(in srgb,var(--text) 40%,var(--surface-3))}
.ux-w-pages{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ux-w-page{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;cursor:pointer}
.ux-w-page:has(input:checked){border-color:var(--text);background:var(--surface-2)}
#modal-root .modal.ux-welcome-modal .modal-head h2:empty{display:none}
.ux-year{display:flex;flex-direction:column;gap:18px}
.ux-year .page-heading{margin-bottom:0}
.ux-y-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.ux-y-tile{display:flex;flex-direction:column;gap:2px;padding:18px 18px 16px;border-radius:var(--radius,18px);background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-soft)}
.ux-y-tile b{font:700 34px var(--latin,inherit);line-height:1.1;text-align:right}
.ux-y-tile span{font-size:13px;color:var(--text)}.ux-y-tile small{font-size:12px;color:var(--muted)}
.ux-y-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;align-items:start}
.ux-y-cols h2{margin:0 0 8px;font-size:16px}.ux-y-best p{margin:0 0 4px}
.ux-y-list ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ux-y-list li{padding:6px 0;border-bottom:1px solid var(--border)}.ux-y-list li:last-child{border-bottom:0}
.ux-y-list small{color:var(--muted)}
.ux-y-empty{text-align:center;padding:40px 20px}.ux-y-empty p{color:var(--muted);margin:6px 0 0}
.ux-ics ul{list-style:none;margin:0;padding:0;max-height:46vh;overflow:auto;display:flex;flex-direction:column;gap:4px}
.ux-ics li label{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border-radius:10px;cursor:pointer}
.ux-ics li label:hover{background:var(--surface-2)}
.ux-ics li span{display:flex;flex-direction:column}.ux-ics small{color:var(--muted);font-size:12px}
.ux-ics-all{display:flex;gap:8px;align-items:center;font-weight:600}
body.ux-is-dragging,body.ux-is-dragging *{user-select:none!important;cursor:grabbing!important}
.ux-after-card{position:fixed;left:24px;bottom:24px;z-index:30;width:min(380px,calc(100vw - 32px));padding:16px 18px;border-radius:18px;background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow)}
.ux-after-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.ux-after-head h2{margin:0;font-size:17px}
.ux-after-card .ux-after{gap:12px}.ux-after-card .ux-after-min{font-size:14px}
/* v31.1: the greeting sits under the vision board, full width */
.v29-home-grid>.ux-hello{grid-column:1/-1;margin:2px 0 0}
.v29-home-grid>.ux-hello .home-hello{margin:0}

.ux-head-acts{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* v31.7 «عاداتي هذا الأسبوع» on the overview: compact — narrow day columns, no boxes, small counts */
.v29-home-habits .v29-mini-habits{gap:0}
.v29-home-habits .v29-mh-row{grid-template-columns:minmax(0,1fr) repeat(var(--days),minmax(26px,40px));gap:2px;padding:3px 0;border-top:1px solid color-mix(in srgb,var(--border) 60%,transparent)}
.v29-home-habits .v29-mh-row.v29-mh-head{border-top:0;padding:0 0 4px}
.v29-home-habits .v29-mh-head span{font-size:9.5px;line-height:1.2}
.v29-home-habits .v29-mh-head b{font-size:11px}
.v29-home-habits .v29-mh-head .is-today b{width:19px;height:19px;font-size:10.5px}
.v29-home-habits .v29-mh-name{font-size:12.5px}
.v29-home-habits .v29-mh-cell,.v29-home-habits .v29-mh-rest{height:24px;border-radius:6px;background:none}
.v29-home-habits .v29-mh-cell input{width:15px!important;height:15px!important;min-width:15px}
.v29-home-habits .v29-mh-cell button{font-size:9.5px!important;padding:1px 2px!important;min-width:0!important;min-height:0!important;line-height:1.3;border-radius:5px}
/* v31.8 the greeting and her line: on one line beside each other, the line as long as the page allows; lines she breaks herself stay broken */
.v29-home-grid>.ux-hello .home-hello{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:16px;row-gap:2px}
.v29-home-grid>.ux-hello .home-motto{max-width:none;flex:1 1 320px;margin:0;white-space:pre-line}
