/* حروف — "Candy Gloss" skin. Art by Claude Design. The game works without this file; it only swaps looks.
   Asset choices are variables, so light, dark and each world change them in one place. */
:root{
  --a-bg:url(/art/worlds/bg-letters-light.svg); --a-pat:url(/art/worlds/pattern-letters-light.svg);
  --a-cell:url(/art/tiles/tile-empty-light.svg); --a-gear:url(/art/ui/icon-settings-ink.svg); --a-lock:url(/art/ui/icon-lock-ink.svg);
  --a-star0:url(/art/celebration/star-empty-light.svg); --a-word:url(/art/wordmark/wordmark-light-bg.svg);
  --a-frame:#EEF3F8; --a-lip:#B4C4D5; --a-rim:rgba(255,255,255,.85);
}
:root[data-world="sea"]{--a-bg:url(/art/worlds/bg-sea-light.svg);--a-pat:url(/art/worlds/pattern-sea-light.svg)}
:root[data-world="desert"]{--a-bg:url(/art/worlds/bg-desert-light.svg);--a-pat:url(/art/worlds/pattern-desert-light.svg)}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --a-bg:url(/art/worlds/bg-letters-dark.svg); --a-pat:url(/art/worlds/pattern-letters-dark.svg);
    --a-cell:url(/art/tiles/tile-empty-dark.svg); --a-gear:url(/art/ui/icon-settings-white.svg); --a-lock:url(/art/ui/icon-lock-white.svg);
    --a-star0:url(/art/celebration/star-empty-dark.svg); --a-word:url(/art/wordmark/wordmark-dark-bg.svg);
    --a-frame:#1C3651; --a-lip:#07131F; --a-rim:rgba(255,255,255,.1);
  }
  :root[data-world="sea"]:not([data-theme="light"]){--a-bg:url(/art/worlds/bg-sea-dark.svg);--a-pat:url(/art/worlds/pattern-sea-dark.svg)}
  :root[data-world="desert"]:not([data-theme="light"]){--a-bg:url(/art/worlds/bg-desert-dark.svg);--a-pat:url(/art/worlds/pattern-desert-dark.svg)}
}
:root[data-theme="dark"]{
  --a-bg:url(/art/worlds/bg-letters-dark.svg); --a-pat:url(/art/worlds/pattern-letters-dark.svg);
  --a-cell:url(/art/tiles/tile-empty-dark.svg); --a-gear:url(/art/ui/icon-settings-white.svg); --a-lock:url(/art/ui/icon-lock-white.svg);
  --a-star0:url(/art/celebration/star-empty-dark.svg); --a-word:url(/art/wordmark/wordmark-dark-bg.svg);
  --a-frame:#1C3651; --a-lip:#07131F; --a-rim:rgba(255,255,255,.1);
}
:root[data-theme="dark"][data-world="sea"]{--a-bg:url(/art/worlds/bg-sea-dark.svg);--a-pat:url(/art/worlds/pattern-sea-dark.svg)}
:root[data-theme="dark"][data-world="desert"]{--a-bg:url(/art/worlds/bg-desert-dark.svg);--a-pat:url(/art/worlds/pattern-desert-dark.svg)}
/* the night sky is always dark */
:root:root[data-world="night"]{
  --a-bg:url(/art/worlds/bg-night-dark.svg); --a-pat:url(/art/worlds/pattern-night-dark.svg);
  --a-cell:url(/art/tiles/tile-empty-dark.svg); --a-gear:url(/art/ui/icon-settings-white.svg); --a-lock:url(/art/ui/icon-lock-white.svg);
  --a-star0:url(/art/celebration/star-empty-dark.svg); --a-word:url(/art/wordmark/wordmark-dark-bg.svg);
  --a-frame:#1C3651; --a-lip:#07131F; --a-rim:rgba(255,255,255,.1);
}

/* Ramadan nights are always dark too */
:root:root[data-world="ramadan"]{
  --a-bg:url(/art/worlds/bg-ramadan-dark.svg); --a-pat:url(/art/worlds/pattern-ramadan-dark.svg);
  --a-cell:url(/art/tiles/tile-empty-dark.svg); --a-gear:url(/art/ui/icon-settings-white.svg); --a-lock:url(/art/ui/icon-lock-white.svg);
  --a-star0:url(/art/celebration/star-empty-dark.svg); --a-word:url(/art/wordmark/wordmark-dark-bg.svg);
  --a-frame:#2A1D5C; --a-lip:#0D0A26; --a-rim:rgba(255,255,255,.1);
}

/* ---------- backgrounds: the world painting behind the game, its pattern beyond it on wide screens ---------- */
body{background-image:var(--a-pat) !important;background-size:256px 256px}
.app{background:var(--a-bg) center top/cover no-repeat}

/* ---------- board frame and cells ---------- */
.board{--line:var(--a-lip);background:var(--a-frame);box-shadow:0 5px 0 var(--a-lip),inset 0 0 0 2px var(--a-rim)}
.cell{background:var(--a-cell) center/100% 100% no-repeat}

/* ---------- letter tiles: glossy candy, letters centred above the darker bottom edge ---------- */
.tile{box-shadow:none;padding-bottom:calc(var(--cs,40px) * .13)}
.piece .tile{box-shadow:none;padding-bottom:calc(var(--ps) * .13)}
.tile[data-c="1"]:where(:not(.hint):not(.pow)){background:url(/art/tiles/tile-gold.svg?4) center/100% 100% no-repeat}
.tile[data-c="2"]:where(:not(.hint):not(.pow)){background:url(/art/tiles/tile-teal.svg?4) center/100% 100% no-repeat}
.tile[data-c="3"]:where(:not(.hint):not(.pow)){background:url(/art/tiles/tile-coral.svg?4) center/100% 100% no-repeat}
.tile[data-c="4"]:where(:not(.hint):not(.pow)){background:url(/art/tiles/tile-sky.svg?4) center/100% 100% no-repeat}
.tile[data-c="5"]:where(:not(.hint):not(.pow)){background:url(/art/tiles/tile-lavender.svg?4) center/100% 100% no-repeat}
.tile[data-c="6"]:where(:not(.hint):not(.pow)){background:url(/art/tiles/tile-lime.svg?4) center/100% 100% no-repeat}
.tile.hint{padding-bottom:calc(var(--cs,40px) * .08)}

/* ---------- power tiles: rocket and bomb on a gold tile ---------- */
.tile.pow{font-size:0;padding-bottom:0;box-shadow:0 0 14px 4px rgba(255,213,74,.8);
  background:url(/art/power/power-rocket.svg) center 40%/76% no-repeat,url(/art/tiles/tile-gold.svg?4) center/100% 100% no-repeat}
.tile.pow[data-pow="bomb"]{background-image:url(/art/power/power-bomb.svg),url(/art/tiles/tile-gold.svg?4)}

/* ---------- celebration: stars, coin, trophy, confetti ---------- */
.stars{letter-spacing:0;font-size:0;display:flex;justify-content:center;gap:6px;margin:4px 0}
.stars span,.stars i{width:48px;height:48px;font-size:0;text-shadow:none;background:url(/art/celebration/star-filled.svg) center/contain no-repeat}
.stars i{background-image:var(--a-star0)}
.stars span:nth-child(2),.stars i:nth-child(2){width:58px;height:58px;margin-top:-8px}
.coin{font-size:0;box-shadow:none;background:url(/art/celebration/coin.svg) center/contain no-repeat}
#overTrophy:not(:empty){font-size:0;height:104px;background:url(/art/celebration/trophy.svg) center/contain no-repeat}
.cf:not(.cl){width:16px;height:16px;border-radius:0;background:url(/art/celebration/confetti-1.svg) center/contain no-repeat !important}
.cf:not(.cl):nth-child(8n+2){background-image:url(/art/celebration/confetti-2.svg) !important}
.cf:not(.cl):nth-child(8n+3){background-image:url(/art/celebration/confetti-3.svg) !important}
.cf:not(.cl):nth-child(8n+4){background-image:url(/art/celebration/confetti-4.svg) !important}
.cf:not(.cl):nth-child(8n+5){background-image:url(/art/celebration/confetti-5.svg) !important}
.cf:not(.cl):nth-child(8n+6){background-image:url(/art/celebration/confetti-6.svg) !important}
.cf:not(.cl):nth-child(8n+7){background-image:url(/art/celebration/confetti-7.svg) !important}
.cf:not(.cl):nth-child(8n){background-image:url(/art/celebration/confetti-8.svg) !important}

/* ---------- world emblems ---------- */
#wIcon[data-w]{font-size:0;height:120px;background:center/contain no-repeat}
#wIcon[data-w="sea"]{background-image:url(/art/worlds/emblem-sea.svg)}
#wIcon[data-w="desert"]{background-image:url(/art/worlds/emblem-desert.svg)}
#wIcon[data-w="night"]{background-image:url(/art/worlds/emblem-night.svg)}
#wIcon[data-w="ramadan"]{background-image:url(/art/worlds/emblem-ramadan.svg)}
.lvworld{display:flex;align-items:center;gap:8px}
.lvworld .we{display:inline-block;flex:none;width:34px;height:34px;font-size:0;background:center/contain no-repeat}
.we[data-w="letters"]{background-image:url(/art/worlds/emblem-letters.svg)}
.we[data-w="sea"]{background-image:url(/art/worlds/emblem-sea.svg)}
.we[data-w="desert"]{background-image:url(/art/worlds/emblem-desert.svg)}
.we[data-w="night"]{background-image:url(/art/worlds/emblem-night.svg)}
.we[data-w="ramadan"]{background-image:url(/art/worlds/emblem-ramadan.svg)}

/* ---------- interface: settings, locks, wordmark ---------- */
.gear{font-size:0;background:var(--panel) var(--a-gear) center/56% no-repeat}
.lv:disabled span{display:block;width:22px;height:22px;font-size:0;background:var(--a-lock) center/contain no-repeat}
#menuT{font-size:0;height:96px;margin:0 0 4px;background:var(--a-word) center/contain no-repeat}

/* ---------- top bar: the stage / best-score label sits on a pill so it reads on any painting ---------- */
.crown{background:var(--panel);border-radius:999px;padding:5px 14px 4px;box-shadow:0 2px 0 var(--line);min-height:42px}
