.gstart-trigger{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;position:relative;flex:none;
  min-height:36px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,#e69a39 50%,var(--line-2));
  background:linear-gradient(180deg,color-mix(in srgb,#f5a83e 10%,var(--surface-2)),var(--surface-2));color:inherit;font:inherit;font-size:.8rem;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .2s,border-color .2s
}
.gstart-trigger:hover,.gstart-trigger[aria-expanded=true]{background:color-mix(in srgb,#f5a83e 16%,var(--surface-2))}
.gstart-gift{display:block;flex:none;inline-size:18px;block-size:18px;background:linear-gradient(160deg,#ffd27a,#ee7d33);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1.2'/%3E%3Cpath d='M5 12v7.5A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5V12M12 8v13M12 8H8.4a2.2 2.2 0 1 1 0-4.4C10.8 3.6 12 5.6 12 8Zm0 0h3.6a2.2 2.2 0 1 0 0-4.4C13.2 3.6 12 5.6 12 8Z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1.2'/%3E%3Cpath d='M5 12v7.5A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5V12M12 8v13M12 8H8.4a2.2 2.2 0 1 1 0-4.4C10.8 3.6 12 5.6 12 8Zm0 0h3.6a2.2 2.2 0 1 0 0-4.4C13.2 3.6 12 5.6 12 8Z'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .2s ease}
.gstart-trigger:hover .gstart-gift{transform:rotate(-8deg) scale(1.08)}
@media (prefers-reduced-motion:reduce){.gstart-trigger:hover .gstart-gift{transform:none}}
.gstart-badge{display:inline-grid;place-items:center;min-inline-size:1.25rem;block-size:1.25rem;padding:0 5px;border-radius:999px;background:linear-gradient(160deg,#ffd27a,#f0a03c);color:#2d1a0c;font-size:.7rem;font-weight:800;font-variant-numeric:tabular-nums;line-height:1;box-shadow:0 1px 0 #ffffff55 inset,0 2px 6px #e6862c55}
.gstart-badge[hidden]{display:none}
.gstart-dialog{
  --gstart-gold:#e68f27;
  position:fixed;inset:auto;inset-inline-end:clamp(12px,3vw,42px);inset-block-start:clamp(54px,10vh,90px);
  inline-size:min(420px,calc(100vw - 24px));max-inline-size:none;max-block-size:calc(100dvh - clamp(54px,10vh,90px) - 16px);
  margin:0;padding:0;overflow:auto;border:1px solid var(--line-2);border-radius:20px;background:var(--surface);color:inherit;
  box-shadow:0 24px 65px #08070b66
}
.gstart-shell{position:relative}
.gstart-close{
  position:absolute;z-index:1;inset-inline-end:12px;inset-block-start:12px;inline-size:34px;block-size:34px;
  border:1px solid var(--line-2);border-radius:50%;background:var(--surface-2);color:inherit;font-size:1.25rem;cursor:pointer
}
.gstart{display:grid;gap:12px;padding:16px}
.gstart-head{
  display:grid;gap:8px;margin:-16px -16px 0;padding:20px 56px 14px 17px;padding-inline:17px 56px;
  background:radial-gradient(ellipse at top right,#f9a25324,transparent 75%),linear-gradient(135deg,#f46a291c,transparent),var(--surface-2)
}
[dir=rtl] .gstart-head{background:radial-gradient(ellipse at top left,#f9a25324,transparent 75%),var(--surface-2)}
.gstart h2{margin:0;font-size:1.15rem;line-height:1.3}
.gstart>.gstart-loading-title{padding-inline-end:44px}
.gstart-head p{margin:2px 0 0;font-size:.8rem}
.gstart-earned{justify-self:start;font-size:.8rem;font-weight:700;font-variant-numeric:tabular-nums}
.gstart-meter{block-size:5px;border-radius:999px;background:var(--surface-2);overflow:hidden}
.gstart-meter i{display:block;block-size:100%;border-radius:inherit;background:linear-gradient(90deg,#e86a29,#ffc55e);transition:width .3s ease-out}
.gstart-list{display:grid;align-content:start;gap:6px;list-style:none;margin:0;padding:0 2px 0 0;padding-inline:0 2px;max-block-size:min(44dvh,350px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.gstart-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:2px 9px;padding:8px;border:1px solid var(--line-2);border-radius:11px;background:var(--surface-2)}
.gstart-row.is-ready{border-color:var(--gstart-gold);background:color-mix(in srgb,var(--gstart-gold) 12%,var(--surface-2))}
.gstart-mark{grid-area:1/1/3;display:grid;place-items:center;inline-size:23px;block-size:23px;border-radius:50%;border:1px solid var(--line-2);font-size:.7rem;font-variant-numeric:tabular-nums}
.gstart-mark svg{inline-size:15px;block-size:15px}
.gstart-text{grid-area:1/2;font-size:.81rem;line-height:1.35;min-inline-size:0;overflow-wrap:anywhere}
.gstart-text small{display:block}
.gstart-reward{grid-area:2/2;font-size:.72rem;font-weight:650}
.gstart-btn,.gstart-done{grid-area:1/3/3;white-space:nowrap;font-size:.73rem}
.gstart-btn{min-block-size:32px;padding-inline:9px}
.gstart-done{font-weight:650}
.gstart-msg,.gstart-all{margin:0;font-size:.8rem}
.gstart-msg.bad{color:var(--danger)}
.gstart-row:focus-visible,.gstart-trigger:focus-visible,.gstart-close:focus-visible{outline:2px solid var(--gstart-gold,#e68f27);outline-offset:-2px}
@media(max-width:640px){
  .gstart-trigger{padding:0;inline-size:36px}
  .gstart-trigger-label{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)}
  .gstart-badge{position:absolute;inset-inline-end:-4px;inset-block-start:-5px}
  .gstart-dialog{inset-inline-end:12px}
}
@media(prefers-reduced-motion:reduce){.gstart-meter i{transition:none}}
/* Desktop: the gift lives in the sidebar footer and the checklist opens centred, like a welcome panel. */
.gstart-trigger.in-side{inline-size:100%;justify-content:flex-start;min-block-size:40px;padding-inline:14px}
.gstart-trigger.in-side .gstart-badge{margin-inline-start:auto}
body:has(.gstart-trigger.in-side) .gstart-dialog{inset:0;margin:auto;max-block-size:min(640px,calc(100dvh - 32px));inline-size:min(460px,calc(100vw - 24px))}
/* Gift: looping animated icon, spotlight + fly-out opening, staged panel entrance */
.gstart-dialog::backdrop{background:#08060c8f;backdrop-filter:blur(3px)}
.gstart-catch{position:fixed;inset:0;z-index:8999;background:transparent;cursor:pointer}
.gstart-spot{position:fixed;z-index:9000;pointer-events:none;box-shadow:0 0 0 2px #ffbf63,0 0 0 200vmax #08060cb8,0 0 40px 8px #f5a83e55;animation:gs-spot-in .5s ease-out backwards;transition:opacity .35s}
.gstart-spot::after{content:"";position:absolute;inset:-2px;border-radius:inherit;border:2px solid #ffbf63;animation:gs-pulse 1.4s ease-out infinite}
.gstart-spot-tip{position:fixed;z-index:9001;max-inline-size:min(230px,calc(100vw - 24px));padding:10px 14px;border-radius:14px;background:linear-gradient(160deg,#ffd98c,#f0a03c);color:#2d1a0c;font-size:.82rem;font-weight:750;line-height:1.3;box-shadow:0 12px 32px #0009,0 1px 0 #fff6 inset;pointer-events:none;animation:gs-tip .55s .3s cubic-bezier(.2,.9,.25,1.2) backwards;transition:opacity .3s}
.gstart-spot-tip::before{content:"";position:absolute;inline-size:12px;block-size:12px;background:#f7b551;transform:rotate(45deg);border-radius:2px}
.gstart-spot-tip.r::before{left:-5px;top:calc(50% - 6px)}
.gstart-spot-tip.l::before{right:-5px;top:calc(50% - 6px)}
.gstart-spot-tip.b::before{top:-5px;left:var(--ax,20px)}
.gstart-spot.out,.gstart-spot-tip.out{opacity:0}
.gstart-fxlayer{position:fixed;inset:0;inline-size:100vw;block-size:100vh;margin:0;padding:0;border:0;background:none;overflow:visible;pointer-events:none}
.gstart-fx{position:absolute;display:block}
.gstart-hero{display:none}
@keyframes gs-spot-in{from{opacity:0}}
@keyframes gs-pulse{from{transform:scale(1);opacity:.9}to{transform:scale(1.18,1.7);opacity:0}}
@keyframes gs-tip{from{opacity:0;transform:scale(.8) translateY(6px)}}
@keyframes gs-row{from{opacity:0;transform:translateY(14px)}}
@keyframes gs-fill{from{transform:scaleX(0)}}
@keyframes gs-bd{from{opacity:0}}
@keyframes gs-halo{0%{box-shadow:0 0 0 0 #f5a83e66}70%,100%{box-shadow:0 0 0 10px #f5a83e00}}
@media(prefers-reduced-motion:no-preference){
 .gstart-gift{inline-size:36px;block-size:36px;margin-block:-10px;margin-inline:-7px -3px;background:url(/app/gift-loop-v1.svg) center/contain no-repeat;-webkit-mask:none;mask:none;filter:drop-shadow(0 3px 5px #e6862c44)}
 .gstart-trigger:hover .gstart-gift{transform:scale(1.12)}
 .gstart-trigger:has(.gstart-badge:not([hidden])){animation:gs-halo 2.6s ease-out infinite}
 .gstart-dialog[open]::backdrop{animation:gs-bd .45s ease-out both}
 .gstart-dialog.is-closing::backdrop{animation:gs-bd .24s ease-in reverse both}
 .gstart-head{grid-template-columns:auto minmax(0,1fr)}
 .gstart-head>.gstart-hero{display:block;grid-area:1/1;inline-size:54px;block-size:54px;margin-block:-8px -4px;margin-inline:-6px 0;filter:drop-shadow(0 4px 8px #e6862c55)}
 .gstart-head>div{grid-area:1/2;align-self:center}
 .gstart-head>.gstart-earned{grid-area:2/1/3/3}
 .gs-enter .gstart-head>div,.gs-enter .gstart-earned{animation:gs-row .5s .12s cubic-bezier(.2,.8,.2,1) backwards}
 .gs-enter .gstart-row{animation:gs-row .45s cubic-bezier(.2,.8,.2,1) backwards;animation-delay:calc(200ms + var(--i,0)*55ms)}
 .gs-enter .gstart-meter i{transform-origin:left;animation:gs-fill .9s .35s cubic-bezier(.2,.8,.2,1) backwards}
 [dir=rtl] .gs-enter .gstart-meter i{transform-origin:right}
}
@media(max-width:720px) and (prefers-reduced-motion:no-preference){.gstart-gift{inline-size:32px;block-size:32px;margin:0}}

/* ==========================================================================
   POPUP LAYER HARMONY: Keep sidebar Gift, Help card & Nour Guide ALWAYS visible!
   Only pause the pulsing halo ring while another top-layer dialog is open so
   animations never fight, while keeping every widget visible and accessible.
   ========================================================================== */
html:has(dialog[open]:not(#gstart-dialog)) .gstart-trigger:has(.gstart-badge:not([hidden])){
 animation-play-state:paused;
}

/* Focus strategy: one task is lit (the next thing to do), the others step back so the click is obvious. */
.gstart-row{transition:opacity .25s,border-color .25s,box-shadow .25s}
.gstart-row.is-dim{opacity:.42}
.gstart-row.is-dim:hover,.gstart-row.is-dim:focus-within{opacity:.85}
.gstart-row.is-claimed{opacity:.55}
.gstart-row.is-focus{border-color:var(--gstart-gold,#e68f27);background:color-mix(in srgb,var(--gstart-gold,#e68f27) 14%,var(--surface-2));box-shadow:0 0 0 1px var(--gstart-gold,#e68f27),0 8px 26px #e6862c33;padding-block:12px}
.gstart-row.is-focus .gstart-name{font-weight:750;font-size:.9rem}
.gstart-row.is-focus .gstart-mark{border-color:var(--gstart-gold,#e68f27);background:var(--gstart-gold,#e68f27);color:#2d1a0c;font-weight:800}
.gstart-next{display:block;margin-block-end:2px;color:var(--gstart-gold,#e68f27);font-size:.66rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.gstart-row.is-focus .gstart-btn{min-block-size:38px;padding-inline:16px;font-size:.8rem;font-weight:750}
@media(prefers-reduced-motion:no-preference){.gstart-row.is-focus .gstart-btn{animation:gs-halo 2s ease-out infinite}}
