/* Mahya P60 Wisdom/Tip component — compact RTL, shared design tokens */
@font-face{font-family:"Mahya Katibeh";src:url("./fonts/Katibeh-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
.mahya-home-dig .mh-i38-topline .mh-p60-quote{
  display:flex;direction:rtl;align-items:center;gap:10px;min-width:0;
  flex:0 1 630px;max-width:min(68vw,630px);padding:2px 0;
  color:var(--mh-home-text,var(--text-primary,#334155));
  text-align:right;background:transparent;border:0;
}
.mahya-home-dig .mh-p60-quote-mark{font:26px/1 Georgia,serif;color:var(--mh-home-primary,#426dba);opacity:.48;align-self:flex-start}
.mahya-home-dig .mh-p60-quote-content{display:grid;gap:0;min-width:0;max-width:100%;align-content:center}
.mahya-home-dig .mh-p60-quote-text{
  font-family:"Mahya Katibeh", "Vazirmatn", Tahoma, sans-serif!important;
  font-size:clamp(20px,1.9vw,25px);font-weight:400;line-height:1.42;
  overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  white-space:normal;unicode-bidi:plaintext;overflow-wrap:anywhere;
}
.mahya-home-dig .mh-p60-quote-meta{font-family:"Vazirmatn",Tahoma,sans-serif;font-size:9.5px;line-height:1.3;color:var(--mh-home-muted,#7a8699);text-align:left}
@media(max-width:850px){
  .mahya-home-dig .mh-i38-topline .mh-p60-quote{flex:1 1 100%;max-width:100%}
  .mahya-home-dig [data-mh-workspace-view="home"] .mh-i38-topline{flex-wrap:wrap;gap:4px 12px}
  .mahya-home-dig .mh-p60-quote-text{font-size:21px}
}
@media(prefers-reduced-motion:no-preference){
 .mahya-home-dig .mh-p60-quote-text{transition:opacity .18s ease}
}
.mh-p60-admin-card{direction:rtl;min-width:0}
.mh-p60-admin-card .settings-card-head-v4254{margin-bottom:10px}
.mh-p60-settings{display:grid;grid-template-columns:minmax(135px,1fr) minmax(130px,1fr) minmax(130px,1fr) minmax(160px,1fr);gap:10px;align-items:end}
.mh-p60-field{display:grid;gap:5px;min-width:0;color:var(--mahya-text,#334155)}
.mh-p60-field>span,.mh-p60-enable>span{font-size:11px;font-weight:700;color:var(--mahya-text,#334155)}
.mh-p60-field>small{font-size:10px;color:var(--mahya-muted,#8491a3)}
.mh-p60-field input,.mh-p60-field textarea{
 width:100%;box-sizing:border-box;min-height:40px;padding:7px 10px;
 border:1px solid var(--mahya-border,#dce4ef);border-radius:9px;
 color:var(--mahya-text,#334155);background:var(--mahya-surface,#fff);
 font:12px/1.65 "Vazirmatn",Tahoma,sans-serif;text-align:right;outline:none;
}
.mh-p60-field input:focus-visible,.mh-p60-field textarea:focus-visible{border-color:var(--mahya-primary,#3978dd);box-shadow:0 0 0 2px rgba(59,130,246,.1)}
.mh-p60-field input[type=time],.mh-p60-field input[type=number]{direction:ltr;text-align:center;max-width:155px;font-variant-numeric:tabular-nums}
.mh-p60-field textarea{resize:vertical;min-height:57px;max-height:130px}
.mh-p60-enable{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px}
.mh-p60-enable button,.mh-p60-toggle-active,.mh-p60-kind-toggle button{
 background:var(--mahya-surface,#fff);border:1px solid var(--mahya-border,#dce4ef);border-radius:8px;
 padding:6px 12px;min-height:32px;cursor:pointer;font:11px "Vazirmatn",Tahoma,sans-serif;color:var(--mahya-muted,#64748b)
}
.mh-p60-enable button[aria-pressed=true],.mh-p60-toggle-active[aria-pressed=true],.mh-p60-kind-toggle button[aria-pressed=true]{
 color:var(--mahya-primary,#2563eb);border-color:rgba(59,130,246,.36);background:rgba(59,130,246,.07)
}
.mh-p60-schedule-help{font-size:10.5px;line-height:1.7;color:var(--mahya-muted,#64748b);margin:8px 0 16px}
.mh-p60-editor-heading{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:3px 0 10px;border-top:1px solid var(--mahya-border,#e2e8f0);padding-top:12px}
.mh-p60-editor-heading strong{font-size:13px}.mh-p60-editor-heading span{font-size:10px;color:var(--mahya-muted,#64748b)}.mh-p60-editor-heading button{margin-inline-start:auto}
.mh-p60-admin-list{display:grid;gap:8px}
.mh-p60-admin-row{padding:11px 12px;border:1px solid var(--mahya-border,#e2e8f0);background:var(--mahya-surface,#fff);border-radius:12px;display:grid;gap:8px}
.mh-p60-admin-row-main{display:grid;grid-template-columns:minmax(0,2fr) minmax(135px,1fr);gap:10px}
.mh-p60-admin-row-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mh-p60-kind-toggle{display:inline-flex;align-items:center;gap:4px}
.mh-p60-delete{margin-inline-start:auto;cursor:pointer;padding:5px 10px;color:var(--mahya-danger,#b42318);background:transparent;border:1px solid transparent;border-radius:7px;font-size:11px}
.mh-p60-delete:hover,.mh-p60-delete:focus-visible{border-color:rgba(180,35,24,.28);background:rgba(180,35,24,.06)}
.mh-p60-admin-row.is-deleted{opacity:.65;border-style:dashed;background:var(--mahya-soft,#f8fafc)}
.mh-p60-admin-row.is-deleted .mh-p60-admin-row-main,.mh-p60-admin-row.is-deleted .mh-p60-kind-toggle,.mh-p60-admin-row.is-deleted .mh-p60-toggle-active{display:none}
.mh-p60-deleted-hint{color:var(--mahya-danger,#b42318);font-size:11px}
.mh-p60-admin-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding-top:10px;border-top:1px solid var(--mahya-border,#e2e8f0)}
.mh-p60-admin-footer p{font-size:10.5px;color:var(--mahya-muted,#64748b);margin:0}
@media(max-width:950px){.mh-p60-settings{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:590px){.mh-p60-settings,.mh-p60-admin-row-main{grid-template-columns:1fr}.mh-p60-admin-footer{flex-direction:column;align-items:stretch}.mh-p60-editor-heading button{margin-inline-start:0}}

/* P60B: on the quote-bank tab, only its dedicated save action should be visible. */
.settings-shell-v4254:has(#settings-quotes-p60.settings-tab-active-v42206) #settings-save-v4254{display:none!important}


/* P60C: ACTIVE v11 workspace Home greeting (not the retired i38 renderer). */
body.mh11-layout.mahya-home-dig .mh11-greeting{min-height:52px;align-items:center;gap:14px;min-width:0}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1{flex:0 0 auto;min-width:0}
body.mh11-layout.mahya-home-dig .mh11-greeting>.mh-p60-quote{
    flex:1 1 560px;max-width:min(66%,700px);width:auto;min-width:0;
    display:flex;align-items:center;gap:10px;justify-content:flex-start;
    margin:0;padding:0 0 1px;background:transparent;border:0;
    text-align:right;direction:rtl;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-mark{
    font:28px/1 Georgia,serif;color:var(--mh11-purple,#6d45f5);opacity:.48;flex:0 0 auto;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-content{
    min-width:0;max-width:100%;display:grid;gap:0;align-items:center;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-text{
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    font-family:"Mahya Katibeh", "Vazirmatn", Tahoma, sans-serif!important;
    font-size:clamp(21px,1.75vw,26px);font-weight:400;line-height:1.4;
    color:var(--mh11-ink,#292b3d);overflow:hidden;overflow-wrap:anywhere;
    white-space:normal;unicode-bidi:plaintext;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-meta{
    font:10px/1.5 MahyaR11IranSans,"Vazirmatn",Tahoma,sans-serif;
    color:var(--mh11-muted,#626575);text-align:left;
}
@media(max-width:880px){
    body.mh11-layout.mahya-home-dig .mh11-greeting{flex-wrap:wrap;gap:4px 12px}
    body.mh11-layout.mahya-home-dig .mh11-greeting>.mh-p60-quote{flex:1 1 100%;max-width:100%}
    body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-text{font-size:22px}
}


/* P61: an understated, hand-painted mark behind the quote, not a card. */
body.mh11-layout.mahya-home-dig .mh11-greeting{
    justify-content:flex-start;align-items:center;gap:clamp(16px,2.2vw,32px);
    min-height:44px;margin-bottom:12px;padding:0;flex-wrap:nowrap;
}
body.mh11-layout.mahya-home-dig .mh11-greeting>h1{flex:0 0 auto}
body.mh11-layout.mahya-home-dig .mh11-greeting>.mh-p60-quote{
    flex:0 1 540px;width:auto;max-width:min(55vw,540px);min-width:0;
    margin:0;padding:0;border:0;background:transparent;display:flex;
    justify-content:flex-start;align-items:center;position:relative;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-content{
    position:relative;isolation:isolate;display:grid;gap:1px;align-content:center;
    width:max-content;max-width:100%;min-width:0;
    padding:5px 14px 6px 17px;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-content::before,
.mh-p61-brush-preview::before{
    content:"";pointer-events:none;position:absolute;z-index:-1;
    inset:3px 0 4px -3px;background:var(--mh-p61-brush-color,#BBA4E8);
    -webkit-mask-image:url("./mahya-quote-brush-p61.svg");
    mask-image:url("./mahya-quote-brush-p61.svg");
    -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
    -webkit-mask-position:center;mask-position:center;
    -webkit-mask-size:100% 100%;mask-size:100% 100%;
    opacity:var(--mh-p61-brush-opacity,.36);transform:rotate(-.7deg);
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote.is-brush-off .mh-p60-quote-content::before,
.mh-p61-brush-preview.is-brush-off::before{display:none}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-mark{display:none!important}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-text{
    font:400 clamp(19px,1.55vw,20px)/1.32 "Mahya Katibeh","Vazirmatn",Tahoma,sans-serif!important;
    color:var(--mh11-ink,#39384c);display:-webkit-box;-webkit-box-orient:vertical;
    -webkit-line-clamp:2;overflow:hidden;white-space:normal;text-align:right;max-width:100%;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-meta{
    display:block;font:10.5px/1.3 MahyaR11IranSans,"Vazirmatn",Tahoma,sans-serif;
    color:var(--mh11-muted,#737489);text-align:right;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote:focus-visible{
    outline:2px solid var(--mahya-primary,#6c58c6);outline-offset:3px;border-radius:5px
}
.mh-p61-brush-editor{
    margin:0 0 14px;padding:12px 14px;background:var(--mahya-soft,#fbfaff);
    border:1px solid var(--mahya-border,#e6e3f1);border-radius:12px;
    display:grid;gap:10px;
}
.mh-p61-brush-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mh-p61-brush-head>div{display:grid;gap:2px}
.mh-p61-brush-head strong{font-size:12px;color:var(--mahya-text,#303044)}
.mh-p61-brush-head small{font-size:10px;color:var(--mahya-muted,#77778a)}
.mh-p61-brush-toggle{min-height:33px;min-width:62px;padding:6px 12px;border-radius:9px;
 border:1px solid var(--mahya-border,#dcd8e9);color:var(--mahya-muted,#666);
 background:var(--mahya-surface,#fff);font:11px MahyaR11IranSans,Tahoma,sans-serif;cursor:pointer}
.mh-p61-brush-toggle[aria-pressed=true]{border-color:#b8a8e1;background:#f2edff;color:#644f9e}
.mh-p61-brush-controls{display:flex;align-items:center;gap:13px;flex-wrap:wrap}
.mh-p61-brush-swatches{display:inline-flex;align-items:center;gap:7px}
.mh-p61-brush-swatch{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;
 border:1px solid var(--mahya-border,#ddd);background:var(--mahya-surface,#fff);
 cursor:pointer;padding:3px}
.mh-p61-brush-swatch>span{display:block;width:22px;height:17px;
 background:var(--swatch);opacity:.8;border-radius:7px 4px 8px 3px;transform:rotate(-4deg)}
.mh-p61-brush-swatch[aria-pressed=true]{outline:2px solid var(--mahya-primary,#7763ce);outline-offset:2px}
.mh-p61-custom-color{display:inline-flex;align-items:center;gap:7px;font-size:10px;color:var(--mahya-muted,#777)}
.mh-p61-custom-color input{width:35px;height:32px;padding:1px;border:1px solid var(--mahya-border,#ddd);border-radius:7px;cursor:pointer;background:transparent}
.mh-p61-brush-preview{position:relative;isolation:isolate;display:inline-block;max-width:100%;margin-inline-start:auto;
 padding:7px 11px;font:400 19px/1.2 "Mahya Katibeh","Vazirmatn",Tahoma,sans-serif;color:var(--mahya-text,#454255);white-space:nowrap}
.mh-p61-brush-preview::before{inset:0 -4px;opacity:var(--mh-p61-brush-opacity,.36)}
.mh-p61-brush-swatch:focus-visible,.mh-p61-brush-toggle:focus-visible,.mh-p61-custom-color input:focus-visible{
    outline:2px solid var(--mahya-primary,#7565cd);outline-offset:3px
}
@media(max-width:850px){
 body.mh11-layout.mahya-home-dig .mh11-greeting{gap:6px 12px;flex-wrap:wrap}
 body.mh11-layout.mahya-home-dig .mh11-greeting>.mh-p60-quote{flex:1 1 100%;max-width:100%}
 body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-text{font-size:19px!important}
 .mh-p61-brush-preview{margin-inline-start:0}
}


/* P62 — welcome stays right, wisdom moves to the LEFT end of the R11 header. */
body.mh11-layout.mahya-home-dig .mh11-greeting{
  justify-content:space-between;column-gap:24px;
}
body.mh11-layout.mahya-home-dig .mh11-greeting>.mh-p60-quote{
  margin-inline-start:auto;max-width:min(55vw,540px);
}
@media(max-width:850px){
  body.mh11-layout.mahya-home-dig .mh11-greeting>.mh-p60-quote{
    margin-inline-start:0;max-width:100%;
  }
}
.mh-p62-opacity-row{display:flex;align-items:center;gap:13px;flex-wrap:wrap;
 padding-top:9px;border-top:1px solid var(--mahya-border,#e8e4f0)}
.mh-p62-opacity-row label{font-size:11px;color:var(--mahya-text,#35364d);font-weight:650}
.mh-p62-opacity-row input[type=range]{width:min(240px,100%);max-width:100%;
 height:6px;accent-color:var(--mahya-primary,#7565cd);cursor:pointer;touch-action:pan-y}
.mh-p62-opacity-row input[type=range]:focus-visible{outline:2px solid var(--mahya-primary,#7565cd);outline-offset:6px}
.mh-p62-opacity-row output{min-width:40px;direction:ltr;font-size:11px;
 color:var(--mahya-muted,#68677b);font-variant-numeric:tabular-nums}
.mh62-quote-page{padding-top:6px}
.mh62-quote-form{display:block;min-width:0}
.mh62-quote-page .mh-p60-admin-card{display:block;width:100%;max-width:100%;box-sizing:border-box}
@media(max-width:600px){.mh-p62-opacity-row input[type=range]{width:min(180px,100%)}}


/* P63 — align the PAINTED CONTENT with the physical left edge of the left workspace column.
   P62 aligned only the quote flex box; its inner content remained RTL/right justified
   and visually floated 150–200px away from the column edge. */
body.mh11-layout.mahya-home-dig .mh11-greeting {
  --mh-p63-quote-ink:#41455B;
}
body.mh11-layout.mahya-home-dig .mh11-greeting > .mh-p60-quote {
  /* A flex box with inline-size 540px may still have a short intrinsic text.
     flex-end in an RTL row pins the PAINTED TEXT to the PHYSICAL LEFT edge. */
  justify-content:flex-end;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-content {
  padding:5px 11px 6px 12px;
  gap:2px;
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-content::before {
  /* Leave the last 23px free so attribution sits BELOW, not inside the stroke.
     A two-line saying naturally grows the mask; a single line stays slender. */
  inset:7px 0 23px -2px;
  transform:rotate(-.45deg);
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-text {
  color:var(--mh-p63-quote-ink);
}
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-meta {
  font-size:11px;
  line-height:1.3;
  margin-block-start:1px;
  color:var(--mh11-muted,#737489);
  position:relative;
  z-index:1;
}
@media(max-width:850px){
  /* In narrow screens the quote has its own row and is naturally RIGHT-aligned
     for Persian reading; desktop-only left-column alignment must not spill over. */
  body.mh11-layout.mahya-home-dig .mh11-greeting > .mh-p60-quote {
    justify-content:flex-start;
  }
}


/* P65: quote attribution is the quiet, physical-LEFT edge of the content,
   OUTSIDE the brush. RTL glyph order remains correct while the box is left-aligned. */
body.mh11-layout.mahya-home-dig .mh11-greeting .mh-p60-quote-meta {
    display:block;justify-self:stretch;width:100%;min-width:0;
    text-align:left;direction:rtl;
    font-size:9px;line-height:1.25;margin-block-start:2px;
    color:var(--mh11-muted,#858a99);
}


/* P66 — make global quote visibility explicit in Communications. */
.mh-p66-quote-toggle-note{font-size:10.5px;color:var(--mahya-muted,#77788b);
 margin:0 0 10px;line-height:1.55}
