/* Revision 25: shared desktop/mobile project workspace. */
.mskw-editor .msk-a4{aspect-ratio:var(--msk-paper-ratio,210/297)!important}
.mskw-editor .msku-top-actions{border:1px solid var(--msk-line);border-radius:12px;padding:3px;gap:0!important;background:var(--msk-surface)}
.mskw-editor .msku-top-actions>*,.mskw-editor .msku-theme{margin:0!important;border:0;border-inline-start:1px solid var(--msk-line);border-radius:0;padding-inline:3px}
.mskw-editor .msku-top-actions>button,.mskw-editor .msku-top-actions .msku-theme button,.mskw-editor .msku-top-actions .msku-language{width:34px!important;height:34px!important;min-height:34px!important;min-width:34px!important;display:grid;place-items:center;box-shadow:none!important;background:transparent!important;padding:7px!important;border-radius:8px;font-size:11px}
.mskw-editor .msku-top-actions>button svg{width:19px;height:19px}.mskw-editor .msku-theme{display:contents}
.mskw-editor .msku-top-actions [data-header-info]{order:98}.mskw-editor .msku-top-actions .mskr-logout{order:99;color:#dc6444!important}
.mskw-editor .msku-top-actions .msku-trial-clock{display:flex;align-items:center;justify-content:center;gap:4px;min-height:34px;height:34px;padding:4px 6px;border-radius:8px;font-size:10px;box-shadow:none}.msku-top-actions .msku-trial-clock>span{display:none}.msku-top-actions .msku-trial-clock>svg{width:13px;height:13px}.msku-top-actions .msku-trial-clock strong{font-size:11px}
.mskw-editor .msku-brand{cursor:pointer;position:relative;isolation:isolate;overflow:hidden;border-radius:8px}.mskr-shine:after{content:'';position:absolute;inset:-50%;background:linear-gradient(110deg,transparent 35%,#fff9 50%,transparent 65%);animation:mskr-shine .7s ease both;pointer-events:none}@keyframes mskr-shine{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.mskw-editor .mskp-toolbar .mskw-tool,.mskw-editor .mskw-tool{background:transparent!important;color:var(--msk-ink)!important;box-shadow:none!important;text-transform:none;border-radius:12px}
.mskw-editor .mskw-tool[aria-pressed=true]{background:var(--msk-soft)!important;border-color:#ae97e4!important}.mskw-editor .mskp-toolbar .mskw-tool{border:1px solid transparent!important;min-width:73px;min-height:68px!important;display:inline-flex!important;flex-direction:column!important;font-weight:500!important;padding:5px 8px!important}
.mskw-editor .mskw-tool small{white-space:nowrap!important;font-size:10px!important;line-height:1.5!important}.mskw-editor .msku-ribbon-panel{overflow:visible!important;max-height:none!important}
.mskr-ribbon{position:relative;display:flex;align-items:center;gap:5px;width:100%;min-width:0}.mskw-editor .mskr-ribbon-row{flex:1;min-width:0;display:flex!important;flex-wrap:nowrap!important;gap:6px!important;align-items:center;overflow:hidden;margin:0;padding:0}
.mskw-editor .mskr-ribbon .mskw-tool,.mskw-editor .mskr-field{width:77px!important;min-width:77px!important;max-width:77px;min-height:77px!important;height:77px;box-sizing:border-box;flex:0 0 77px;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center;gap:3px!important;padding:5px!important;background:var(--msk-bg)!important;border:1px solid var(--msk-line)!important;border-radius:11px;font-size:10px}
.mskw-editor .mskr-field>small{font-size:9px;line-height:1.25;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.mskw-editor .mskr-field .mskw-glyph{width:23px;height:23px;border-radius:7px}.mskw-editor .mskr-field .mskw-glyph svg{width:15px;height:15px}
.mskw-editor .mskr-field input:not([type=checkbox]),.mskw-editor .mskr-field select{width:64px!important;min-height:22px!important;height:22px!important;padding:0 3px!important;font-size:11px!important;text-align:center;border-radius:6px}.mskw-editor .mskr-field input[type=checkbox]{width:17px;height:17px;margin:2px;accent-color:#557ce0}
.mskr-more{flex:0 0 32px!important;width:32px!important;height:77px!important;min-height:77px!important;border:1px solid var(--msk-line)!important;background:var(--msk-soft)!important;color:var(--msk-blue)!important;padding:5px!important;border-radius:10px!important}.mskr-more svg{width:20px;height:20px}.mskr-more[hidden]{display:none!important}
.mskr-overflow{position:absolute;top:calc(100% + 7px);inset-inline-end:0;z-index:600;max-width:calc(100vw - 45px);width:max-content;display:grid;grid-template-columns:repeat(4,77px);gap:7px;padding:12px;background:var(--msk-surface);border:1px solid var(--msk-line);border-radius:15px;box-shadow:0 16px 40px #0b224e30;max-height:50dvh;overflow:auto}.mskr-overflow[hidden]{display:none}
.mskr-rights{margin-top:9px;font:10px/1.8 Arial,sans-serif;direction:ltr}.mskr-rights a{color:var(--msk-blue);text-decoration:none;font-weight:700}
.mskw-editor .msk-a4[data-border]:not([data-border=none]):after,.mskr-border-preview:after{content:'';position:absolute;inset:1.8%;pointer-events:none;border:1px solid #27364b;z-index:1}.mskw-editor .msk-a4[data-border=double]:after,.mskr-border-preview[data-border=double]:after{border:3px double #27364b}.mskw-editor .msk-a4[data-border=classic]:after,.mskr-border-preview[data-border=classic]:after{border:2px solid #27364b;outline:1px solid #27364b;outline-offset:3px}.mskw-editor .msk-a4[data-border=corners]:after,.mskr-border-preview[data-border=corners]:after{border:0;background:linear-gradient(#27364b,#27364b) left top/22px 1px no-repeat,linear-gradient(#27364b,#27364b) left top/1px 22px no-repeat,linear-gradient(#27364b,#27364b) right top/22px 1px no-repeat,linear-gradient(#27364b,#27364b) right top/1px 22px no-repeat,linear-gradient(#27364b,#27364b) left bottom/22px 1px no-repeat,linear-gradient(#27364b,#27364b) left bottom/1px 22px no-repeat,linear-gradient(#27364b,#27364b) right bottom/22px 1px no-repeat,linear-gradient(#27364b,#27364b) right bottom/1px 22px no-repeat}.mskr-border-preview[data-border=none]:after{display:none}.mskr-border-preview{position:relative;display:grid;place-items:center;aspect-ratio:210/297;width:110px;margin:18px auto;background:white;color:#27364b;font-size:10px}
.mskr-correction-ribbon{display:flex;flex-wrap:nowrap;align-items:stretch;overflow-x:auto;padding:8px 0;gap:7px;margin:7px 0}.mskr-correction-ribbon>section{flex:none;display:flex;flex-direction:column;align-items:stretch;border-inline-end:1px solid var(--msk-line);padding-inline-end:8px}.mskr-correction-ribbon>section:last-child{border:0}.mskr-correction-ribbon>section>small{font-size:9px;color:var(--msk-muted);text-align:center;margin-bottom:4px}.mskw-editor .mskr-correction-ribbon .mskp-edit-actions,.mskw-editor .mskr-correction-ribbon .mskp-presets{display:flex!important;flex-wrap:nowrap!important;gap:4px!important;margin:0!important}.mskw-editor .mskr-correction-ribbon button{flex:none!important;min-width:57px!important;max-width:70px;min-height:54px!important;padding:4px!important;margin:0!important}.mskw-editor .mskr-correction-ribbon button>svg{width:25px;height:25px;padding:5px}.mskw-editor .mskr-correction-ribbon button>small{font-size:8px!important;white-space:nowrap}.mskw-editor .mskp-edit{width:min(1060px,calc(100% - 20px))}
.mskr-layout-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.mskw-body .mskr-layout-choice{display:flex;flex-direction:column;align-items:stretch;padding:8px;gap:8px;border:1px solid var(--msk-line);background:var(--msk-bg);color:var(--msk-ink)}.mskr-layout-choice>small{font-size:10px}.mskr-sheet{position:relative;aspect-ratio:210/297;width:100%;background:#fff;border:1px solid #d6deeb;box-shadow:0 3px 12px #10203a10;overflow:hidden}.mskr-placeholder{position:absolute;border:1px solid #4d85b8;border-radius:2px;display:flex;align-items:center;justify-content:center;overflow:hidden;text-align:center;font:8px/1.35 MSKCairo,Arial,sans-serif;color:#1d4b70;background:#dcebf6;padding:2px;box-sizing:border-box}.mskr-placeholder[data-tone="1"]{background:#e9e0ff;border-color:#9583c2;color:#4b377c}.mskr-placeholder[data-tone="2"]{background:#dbf2e8;border-color:#74bca1;color:#2c7258}.mskr-placeholder[data-tone="3"]{background:#ffebcf;border-color:#d1ad76;color:#876027}.mskr-placeholder img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:.4}
.mskr-drawer{position:fixed;inset:0 auto 0 0!important;margin:0!important;max-height:100dvh!important;height:100dvh!important;width:min(440px,94vw)!important;border-radius:0 20px 20px 0!important}.mskr-project-list{display:flex;flex-direction:column;gap:8px}.mskw-body .mskr-project-row{display:grid!important;grid-template-columns:45px 1fr;align-items:center;justify-content:start!important;gap:5px 12px;width:100%;padding:12px!important;text-align:start;background:var(--msk-bg)!important;color:var(--msk-ink)!important}.mskr-project-row>.mskr-sheet{grid-row:span 2;width:42px}.mskr-project-row strong{font-size:12px;overflow-wrap:anywhere}.mskr-project-row small{font-size:10px;color:var(--msk-muted)}.mskr-project-row .mskr-placeholder{font-size:2px;padding:0}
.mskr-share .mskr-sheet,.mskr-share-image{display:block;width:150px;max-height:240px;object-fit:contain;margin:0 auto 18px}.mskr-share .mskr-sheet[hidden]{display:none}.mskr-cloud-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.mskr-cloud-list{display:flex;flex-direction:column;gap:7px;font-size:12px;line-height:1.9}.mskr-cloud-list .mskr-project-row{display:block!important}
.msku-pending{padding:20px!important;border:1px solid #b8c9eb;border-radius:18px;background:linear-gradient(140deg,var(--msk-soft),var(--msk-surface));text-align:start!important}.msku-pending>svg{width:46px;height:46px;padding:11px;background:linear-gradient(140deg,#7198ec,#5365c4);color:white;border-radius:15px;box-shadow:0 6px 16px #4a69b92a}.msku-pending h3{margin:13px 0 7px;font-size:20px}.msku-pending p{font-size:12px;line-height:1.9;color:var(--msk-muted)}.mskr-pending-details{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px 12px;margin:15px 0;padding:12px;border:1px solid var(--msk-line);border-radius:12px;background:var(--msk-surface);font-size:11px}.mskr-pending-details dt{color:var(--msk-muted)}.mskr-pending-details dd{margin:0;overflow-wrap:anywhere;unicode-bidi:plaintext}.msku-pending>button{width:100%;margin-top:9px}.msku-pending [data-pending-support]{background:linear-gradient(120deg,#118b72,#208c9d);color:white}
@media(max-width:760px){.mskw-editor .msku-topbar{gap:7px}.mskw-editor .msku-topbar .msku-brand{flex:1}.mskw-editor .msku-top-actions{order:3;width:100%;justify-content:space-between}.mskw-editor .mskw-project-name{order:2;flex-basis:40%;width:40%;max-width:48%;min-width:0}.mskw-editor .msku-top-actions>button,.mskw-editor .msku-top-actions .msku-theme button,.mskw-editor .msku-top-actions .msku-language{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;padding:6px!important}.mskw-editor .msku-ribbon-tabs{display:flex!important;justify-content:space-between;padding:0 3px}.mskw-editor .msku-ribbon-tabs button{font-size:9px;padding-inline:5px}.mskw-editor .msku-ribbon-tabs button:last-child{font-size:8px}.mskw-editor .mskw-home-tools{display:flex;flex-wrap:wrap;gap:4px}.mskw-editor .mskw-home-tools>.mskw-tool{display:inline-flex!important;min-width:calc(20% - 4px);flex:1 0 calc(20% - 4px);padding:4px 2px}.mskw-editor .mskw-home-tools>.mskw-tool:nth-child(7),.mskw-editor .mskw-home-tools>.mskw-tool:nth-child(8),.mskw-editor .mskw-home-tools>.mskw-tool:nth-child(9),.mskw-editor .mskw-home-tools>.mskw-tool:nth-child(10){display:none!important}.mskw-editor .mskp-toolbar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.mskw-editor .mskp-toolbar .mskw-tool{min-width:0;min-height:59px!important;padding:4px!important}.mskr-overflow{grid-template-columns:repeat(3,77px)}.mskw-editor .mskr-ribbon .mskw-tool,.mskw-editor .mskr-field{font-size:10px!important}.mskr-layout-options{grid-template-columns:repeat(2,minmax(0,1fr))}.mskr-layout-dialog{width:calc(100% - 20px)!important}.mskr-correction-ribbon{margin-inline:-3px}.mskw-editor .msku-top-actions .msku-trial-clock{height:30px;min-height:30px;padding:3px}.mskr-rights{font-size:9px}.mskw-editor .mskr-correction-ribbon button{min-width:54px!important}}
@media(prefers-reduced-motion:reduce){.mskr-shine:after{animation:none}}
@media print{.mskr-rights,.mskr-ribbon,.mskr-correction-ribbon,.mskr-drawer,.mskr-overflow{display:none!important}}

.mskw-editor .msku-top-actions>button{color:var(--msk-blue)!important}.mskw-editor .msku-top-actions>button[hidden]{display:none!important}.mskw-editor .msku-top-actions .mskr-logout{color:#df633d!important}.mskw-editor .msku-top-actions button svg{color:inherit!important;fill:none!important}.mskr-correction-ribbon{scrollbar-width:thin;scrollbar-color:#afbee0 transparent}.mskw-editor .mskr-field:has(input[type=checkbox]){flex-direction:column!important}.mskw-editor .mskr-field input[type=checkbox]{order:1}.mskw-editor .mskr-field:has(input[type=checkbox]) small{order:2}
.mskw-editor .msku-top-actions>button{border:0!important;border-inline-start:1px solid var(--msk-line)!important}.mskw-editor .msku-top-actions>button svg,.mskw-editor .msku-top-actions>button svg *{stroke:currentColor!important}

/* Project gallery uses the existing saved projects, including recovery drafts. */
.mskw-dialog.mskr-drawer{inset:0!important;margin:auto!important;width:min(1040px,calc(100vw - 28px))!important;height:fit-content!important;max-height:calc(100dvh - 32px)!important;border-radius:20px!important}
.mskr-drawer .mskr-project-search{box-sizing:border-box;width:100%;min-height:44px;padding:10px 14px;border:1px solid var(--msk-line);border-radius:12px;background:var(--msk-bg);color:var(--msk-ink);font:inherit}
.mskr-project-status{font-size:12px;color:var(--msk-muted);margin:10px 0 18px}
.mskr-project-groups>h3{margin:22px 0 12px}
.mskr-drawer .mskr-project-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.mskr-drawer .mskr-project-row{display:flex!important;flex-direction:column;align-items:stretch!important;gap:7px;min-width:0;padding:12px!important;border-radius:15px!important;transition:border-color .15s,box-shadow .15s}
.mskr-drawer .mskr-project-row:hover,.mskr-drawer .mskr-project-row:focus-visible{border-color:var(--msk-blue);box-shadow:0 5px 18px #174c8920}
.mskr-drawer .mskr-project-row>.mskr-sheet{width:100%;max-height:170px;aspect-ratio:210/180;flex:none;background:#fff}
.mskr-drawer .mskr-project-row>.mskr-sheet{aspect-ratio:210/297;width:110px;align-self:center}
.mskr-drawer .mskr-project-row .mskr-placeholder{font-size:4px}
.mskr-drawer .mskr-project-row strong{font-size:14px}
.mskr-project-source{font-size:11px;color:var(--msk-blue)}
.mskr-drawer .mskr-project-row small{font-size:11px}
.mskr-project-open{display:block;margin-top:4px;padding-top:8px;border-top:1px solid var(--msk-line);font-size:12px;font-weight:700;color:var(--msk-blue)}
.mskr-project-cloud{display:grid;place-items:center;height:156px;color:var(--msk-blue)}
.mskr-project-cloud svg{width:54px;height:54px}
.mskr-project-empty{padding:32px 12px;text-align:center;line-height:1.8;color:var(--msk-muted)}
@media(max-width:760px){.mskr-drawer .mskr-project-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mskr-drawer .mskr-project-row{padding:10px!important}.mskr-drawer .mskr-project-row strong{font-size:12px}}
