/* ==========================================================
   KOOJEH · ألعاب الانتظار / the waiting games
   The EDO game overlay, re-glazed in Koojeh's colours: plaster
   sheet, a strip of kashi tiles on top, arch-topped buttons.
   Copy lives in js/i18n.js; this file is styling only.
   ========================================================== */

[hidden] { display: none !important; }

.playfab, .gmodal {
  --g-bg: var(--plaster);
  --g-card: var(--cream);
  --g-line: rgba(27, 33, 64, .14);
  --g-ink-2: rgba(27, 33, 64, .7);
  --g-r: 18px;
  --g-shadow: 0 10px 24px -12px rgba(21, 44, 117, .45);
}

/* ----------------------------------------------------------
   1. The floating launcher — an arch with a tile star in it
   ---------------------------------------------------------- */
.playfab {
  position: fixed; z-index: 56;
  bottom: calc(1.2rem + env(safe-area-inset-bottom));
  inset-inline-end: 1.2rem;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem; padding-inline-end: 1.1rem;
  border: 0; cursor: pointer;
  border-radius: 999px 999px 10px 10px;
  background: var(--cream); color: var(--lajvard);
  font-family: var(--f-body); font-weight: 600;
  box-shadow: 0 12px 30px -8px rgba(21, 44, 117, .55), inset 0 0 0 2px var(--lajvard);
  opacity: 0; transform: translateY(18px) scale(.9); pointer-events: none; visibility: hidden;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .3, 1), background .3s, color .3s, visibility 0s .5s;
}
html.games-ready .playfab { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
body.gm-open .playfab { opacity: 0; transform: translateY(10px) scale(.92); pointer-events: none; }
.playfab:active { transform: scale(.96); }

.playfab__art {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 999px 999px 6px 6px;
  background: var(--lajvard); color: var(--saffron);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16);
}
.playfab__art svg { width: 26px; height: 26px; }
.playfab__label { font-size: .95rem; line-height: 1; white-space: nowrap; }
html[lang="en"] .playfab__label { letter-spacing: .02em; }

/* a gentle ping a few times after it appears, then it rests */
.playfab::after {
  content: ""; position: absolute; inset: -4px; pointer-events: none;
  border-radius: inherit; border: 2px solid var(--saffron); opacity: 0;
}
html.games-ready .playfab::after { animation: fabping 3.4s ease-out 1.2s 3; }
@keyframes fabping {
  0% { opacity: .7; transform: scale(1); }
  60%, 100% { opacity: 0; transform: scale(1.18); }
}

@media (hover: hover) and (pointer: fine) {
  .playfab:hover { background: var(--lajvard); color: var(--cream); }
  .playfab:hover .playfab__art { background: var(--kashi); }
}

/* the launcher never sits on the last line of the footer */
.footer-inner { padding-bottom: 6rem; }

/* phones: the booking bar owns the bottom edge, so the launcher sits above it */
@media (max-width: 899px) {
  .playfab {
    bottom: calc(var(--fab-h) + var(--fab-gap) + .7rem);
    inset-inline-end: 1rem;
    padding-inline-end: .95rem;
  }
  .playfab__art { width: 36px; height: 36px; }
  .playfab__art svg { width: 23px; height: 23px; }
  .footer-inner { padding-bottom: calc(var(--fab-h) + var(--fab-gap) + 5rem); }
}

/* ----------------------------------------------------------
   2. The overlay sheet
   ---------------------------------------------------------- */
.gmodal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 760px) { .gmodal { align-items: center; } }
.gmodal__scrim {
  position: absolute; inset: 0; background: rgba(21, 44, 117, .62);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0; transition: opacity .35s ease;
}
.gmodal.on .gmodal__scrim { opacity: 1; }

.gmodal__sheet {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  width: min(100%, 760px); max-height: min(94svh, 880px);
  background: var(--g-bg) var(--noise); color: var(--ink);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .3);
  transform: translateY(26px); opacity: 0;
  transition: transform .42s cubic-bezier(.2, .8, .3, 1), opacity .3s ease;
  overflow: hidden;
}
@media (min-width: 760px) {
  .gmodal__sheet { border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .36); }
}
.gmodal.on .gmodal__sheet { transform: none; opacity: 1; }

/* a strip of glazed tiles on top, like the footer and the alley floor */
.gmodal__tiles { height: 22px; flex: none; border-bottom: 5px solid var(--lajvard); background-size: 22px 22px, 22px 22px, 100% 100%; }

.gmodal__head {
  display: flex; align-items: center; gap: .7rem; flex: none;
  padding: .75rem clamp(14px, 4vw, 24px) .8rem;
  border-bottom: 1px solid var(--g-line);
  background-image: var(--star);
}
.gmodal__titles { min-width: 0; flex: 1; }
.gmodal__title {
  margin: 0; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.35rem, 5vw, 1.8rem); line-height: 1.25; color: var(--lajvard);
}
.gmodal__sub { margin: .1rem 0 0; font-size: .85rem; color: var(--g-ink-2); line-height: 1.5; max-width: none; }
.gmodal__ico {
  flex: none; width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--g-card); border: 1.5px solid var(--g-line);
  color: var(--lajvard); transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.gmodal__ico:active { transform: scale(.93); }
.gmodal__ico svg { width: 19px; height: 19px; }
html[dir="rtl"] .gmodal__back svg { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
  .gmodal__ico:hover { background: var(--lajvard); color: var(--cream); border-color: var(--lajvard); }
}

.gmodal__body {
  padding: clamp(14px, 4vw, 24px); padding-bottom: calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}

/* ----------------------------------------------------------
   3. The picker
   ---------------------------------------------------------- */
.glist { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .glist { grid-template-columns: repeat(3, 1fr); } }

.gcard {
  position: relative; display: flex; gap: 14px; text-align: start; align-items: flex-start;
  background: var(--g-card); border: 1.5px solid var(--g-line);
  border-radius: 28px 28px var(--g-r) var(--g-r);
  padding: 16px; cursor: pointer; box-shadow: var(--g-shadow);
  transition: transform .25s cubic-bezier(.2, .8, .3, 1), border-color .25s, box-shadow .25s;
}
@media (min-width: 640px) {
  .gcard { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 22px 16px 18px; border-radius: 999px 999px var(--g-r) var(--g-r); }
  .gcard__best { justify-content: center; }
}
.gcard:active { transform: scale(.98); }
.gcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .gcard:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 36px -14px rgba(21, 44, 117, .5); }
}

.gcard__art {
  flex: none; width: 62px; height: 70px; display: grid; place-items: center;
  border-radius: 999px 999px 10px 10px;
  color: var(--cream); background: var(--accent);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .18), 0 0 0 3px var(--g-card), 0 0 0 4.5px var(--accent);
  margin: 3px;
}
.gcard__art svg { width: 34px; height: 34px; margin-top: 6px; }
.gcard__txt { min-width: 0; }
.gcard__tag {
  display: block; font-size: .72rem; font-weight: 600; color: var(--accent); margin-bottom: 1px;
}
html[lang="en"] .gcard__tag { letter-spacing: .1em; text-transform: uppercase; font-size: .66rem; }
.gcard__name { display: block; font-family: var(--f-display); font-size: 1.3rem; line-height: 1.3; color: var(--ink); }
.gcard__fa { display: block; font-size: .95rem; color: var(--kashi); line-height: 1.5; }
.gcard__desc { display: block; margin-top: 4px; font-size: .85rem; color: var(--g-ink-2); line-height: 1.7; }
html[lang="en"] .gcard__desc { line-height: 1.55; }
.gcard__best { margin-top: 10px; font-size: .78rem; font-weight: 600; color: var(--g-ink-2); display: flex; align-items: center; gap: 6px; }
.gcard__best svg { flex: none; width: 15px; height: 15px; color: var(--saffron); }

/* ----------------------------------------------------------
   4. Shared game furniture
   ---------------------------------------------------------- */
.game { display: flex; flex-direction: column; gap: 12px; }
.game__how { margin: 0 auto; text-align: center; font-size: .84rem; color: var(--g-ink-2); line-height: 1.7; max-width: 34em; }
.hud { display: flex; gap: 8px; }
.hud__i {
  flex: 1; min-width: 0; background: var(--g-card); border: 1.5px solid var(--g-line);
  border-radius: 14px 14px 8px 8px; padding: 6px 8px; text-align: center;
}
.hud__k { display: block; font-size: .72rem; color: var(--firouzeh); font-weight: 600; line-height: 1.4; }
html[lang="en"] .hud__k { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.hud__v { display: block; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.35; color: var(--lajvard); }
.life { display: inline-block; width: 16px; height: 16px; margin-inline: 1px; vertical-align: -2px; fill: var(--kashi); transition: opacity .3s, transform .3s; }
.life svg { width: 100%; height: 100%; display: block; }
.life.gone { opacity: .2; transform: scale(.7) rotate(45deg); }

.gbtns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gbtn {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  min-height: 46px; padding: .55em 1.5em .45em; font-weight: 600; font-size: .98rem;
  border-radius: 999px 999px 8px 8px; transition: transform .2s, background .25s, color .25s;
}
.gbtn--go { background: var(--lajvard); color: var(--cream); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16), 0 10px 22px -10px rgba(21, 44, 117, .7); }
.gbtn--ghost { background: var(--g-card); color: var(--lajvard); box-shadow: inset 0 0 0 1.5px rgba(31, 62, 158, .4); }
.gbtn:active { transform: scale(.97); }
.gbtn:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .gbtn--go:hover { background: var(--kashi); transform: translateY(-2px); }
  .gbtn--ghost:hover { background: var(--lajvard); color: var(--cream); transform: translateY(-2px); }
}

.gwrap { position: relative; }
.gover {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 18px; border-radius: inherit; cursor: pointer;
  background: rgba(241, 229, 207, .9);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: goverin .3s ease;
}
@keyframes goverin { from { opacity: 0; } to { opacity: 1; } }
.gover p { max-width: 28em; }
.gover__title { margin: 0; font-family: var(--f-display); font-size: clamp(1.4rem, 5.5vw, 1.9rem); line-height: 1.3; color: var(--lajvard); }
.gover__line { margin: 0; font-size: .9rem; color: var(--g-ink-2); line-height: 1.6; }
.gover__big { margin: 0; font-family: var(--f-display); font-size: clamp(2.2rem, 10vw, 3rem); color: var(--kashi); line-height: 1.15; font-variant-numeric: tabular-nums; }
.gover__new {
  margin: 0; font-size: .8rem; font-weight: 600; color: var(--ink);
  background: var(--saffron); padding: .15em .9em; border-radius: 999px 999px 6px 6px;
}
.gover .gbtns { margin-top: 6px; }

/* the score that floats up from a tap */
.pop {
  position: absolute; z-index: 5; pointer-events: none; white-space: nowrap;
  font-weight: 600; font-size: .92rem; color: var(--saffron);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
  animation: popup .75s cubic-bezier(.2, .8, .3, 1) forwards;
  font-variant-numeric: tabular-nums;
}
.pop--bad { color: #FF9A7A; }
@keyframes popup {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.7); }
  25% { opacity: 1; transform: translate(-50%, -12px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -44px) scale(1); }
}
.combo {
  position: absolute; z-index: 4; top: 9px; inset-inline-start: 11px;
  font-size: .8rem; font-weight: 600; color: var(--ink); background: var(--saffron);
  padding: 2px 12px; border-radius: 999px 999px 6px 6px; font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s;
}
.combo.on { opacity: 1; transform: none; }

/* ----------------------------------------------------------
   5. Game 1 — the mangal
   ---------------------------------------------------------- */
.mangal {
  position: relative; overflow: hidden; border-radius: 20px;
  padding: 36px 10px 34px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 3px, transparent 3px 26px),
    linear-gradient(180deg, #2B2B33 0%, #1C1B21 100%);
  box-shadow: inset 0 0 0 6px #3B3A44, inset 0 0 0 8px #15141A, var(--g-shadow);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
/* the coals glow up from below the grate */
.mangal__coals {
  position: absolute; inset-inline: 0; bottom: 0; height: 70%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(40% 60% at 20% 100%, rgba(255, 110, 30, .55), transparent 70%),
    radial-gradient(35% 55% at 55% 100%, rgba(255, 150, 40, .5), transparent 70%),
    radial-gradient(40% 60% at 85% 100%, rgba(255, 90, 20, .5), transparent 70%);
  animation: coals 2.6s ease-in-out infinite alternate;
}
.mangal::before {
  content: ""; position: absolute; inset-inline: 8px; bottom: 8px; height: 16px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 8% 60%, #FF7A2A 0 5px, transparent 6px),
    radial-gradient(circle at 23% 40%, #E0541B 0 6px, transparent 7px),
    radial-gradient(circle at 39% 70%, #FFA640 0 4px, transparent 5px),
    radial-gradient(circle at 55% 45%, #E0541B 0 6px, transparent 7px),
    radial-gradient(circle at 71% 65%, #FF7A2A 0 5px, transparent 6px),
    radial-gradient(circle at 88% 45%, #FFA640 0 6px, transparent 7px),
    #2A1712;
  border-radius: 8px;
}
@keyframes coals { from { opacity: .65; } to { opacity: 1; } }
.mangal.is-paused .mangal__coals { animation-play-state: paused; }
.mangal.is-hit::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 5;
  box-shadow: inset 0 0 0 5px #FF6A3A; animation: hitflash .45s ease-out forwards;
}
@keyframes hitflash { from { opacity: 1; } to { opacity: 0; } }

.mangal__rows { position: relative; z-index: 1; display: grid; gap: 10px; max-width: 480px; margin-inline: auto; }
.sk {
  --meat: #D68074; --char: 0; --needle: 0%;
  position: relative; display: block; width: 100%;
  padding: 2px 0 14px; margin: 0; border: 0; border-radius: 12px; background: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  direction: ltr;
}
.sk__art { position: relative; display: block; width: 100%; aspect-ratio: 320 / 44; transition: transform .35s cubic-bezier(.2, .8, .3, 1), opacity .35s; }
.sk__art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.sk-rod { fill: #B8BCC6; }
.sk-ring { fill: none; stroke: #B8BCC6; stroke-width: 4; }
.sk-meat { fill: var(--meat); stroke: rgba(0, 0, 0, .25); stroke-width: 1.2; transition: filter .3s; }
.sk-char { fill: none; stroke: #2A150C; stroke-width: 3; stroke-linecap: round; opacity: var(--char); }
.sk-shine { fill: none; stroke: #fff; stroke-opacity: .55; stroke-width: 2.4; stroke-linecap: round; }
.sk__gauge {
  position: absolute; left: 5%; right: 1.5%; bottom: 3px; height: 6px; border-radius: 3px;
  background: rgba(255, 255, 255, .14); overflow: visible;
}
/* the golden window on the gauge: 0.8–1.0 out of 1.25 */
.sk__gauge b { position: absolute; top: 0; bottom: 0; left: 64%; width: 16%; border-radius: 3px; background: var(--saffron); opacity: .85; }
.sk__gauge i {
  position: absolute; top: -3px; left: var(--needle); width: 4px; height: 12px; margin-left: -2px;
  border-radius: 2px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .6);
}
.sk__key {
  position: absolute; top: 50%; left: -14px; transform: translateY(-80%); z-index: 2;
  font-size: .62rem; font-weight: 600; color: rgba(255, 255, 255, .45); pointer-events: none;
  display: none;
}
@media (hover: hover) and (pointer: fine) { .sk__key { display: block; } }

.sk.is-empty .sk__art, .sk.is-empty .sk__gauge { opacity: 0; }
.sk.is-empty { cursor: default; }
.sk.is-perfect .sk-meat { filter: drop-shadow(0 0 5px rgba(255, 196, 70, .95)); }
.sk.is-perfect .sk__gauge i { background: var(--saffron); }
.sk.is-over .sk__art::after {
  content: ""; position: absolute; left: 30%; right: 20%; top: -6px; height: 22px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(210, 210, 215, .5), transparent);
  animation: smoke 1s ease-out infinite;
}
@keyframes smoke { from { transform: translateY(6px) scale(.8); opacity: .9; } to { transform: translateY(-14px) scale(1.3); opacity: 0; } }
.sk.is-lifted .sk__art { transform: translateY(-40%) scale(.92); opacity: 0; }
.sk.is-lifted .sk__gauge, .sk.is-burnt .sk__gauge { opacity: 0; transition: opacity .2s; }
.sk.is-burnt .sk__art { opacity: 0; transform: scale(.96); filter: grayscale(1); }
.sk.is-nudge .sk__art { animation: nudge .35s ease; }
@keyframes nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.mangal .gover { background: rgba(28, 27, 33, .82); color: var(--cream); }
.mangal .gover__title { color: var(--saffron); }
.mangal .gover__line { color: rgba(251, 245, 234, .8); }
.mangal .gover__big { color: var(--cream); }

/* ----------------------------------------------------------
   6. Game 2 — kashi tiles
   ---------------------------------------------------------- */
.hud__i--peek { display: flex; align-items: center; justify-content: center; gap: 8px; }
.hud__i--peek .hud__k { display: inline; }
.kpeek { width: 34px; height: 34px; border-radius: 4px; display: block; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.kwrap {
  width: min(100%, 440px); margin-inline: auto; padding: 10px; border-radius: 16px;
  background: var(--kashi); box-shadow: inset 0 0 0 3px rgba(255, 215, 170, .35), var(--g-shadow);
}
/* tiles are laid left to right whatever the page direction, or the picture breaks */
.kgrid { direction: ltr; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; transition: gap .6s ease; }
.kt {
  position: relative; aspect-ratio: 1; padding: 0; margin: 0; border: 0; background: #152C75;
  cursor: pointer; border-radius: 3px; overflow: hidden; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
}
.kt__in { position: absolute; inset: 0; display: block; transition: transform .32s cubic-bezier(.3, 1.4, .5, 1); }
.kt__in svg { width: 100%; height: 100%; display: block; }
.kt:focus-visible { outline: 3px solid var(--saffron); outline-offset: 1px; z-index: 1; }
.kt:active .kt__in { filter: brightness(1.12); }
.kt:disabled { cursor: default; }
.kwrap.is-solved .kgrid { gap: 0; }
.kwrap.is-solved .kt { border-radius: 0; box-shadow: none; }
/* a glaze of light runs over the finished panel */
.kglaze { position: absolute; inset: 10px; pointer-events: none; overflow: hidden; border-radius: 2px; }
.kglaze::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-12deg); opacity: 0;
}
.kwrap.is-solved .kglaze::before { animation: glaze 1.1s ease .45s forwards; }
@keyframes glaze { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
.kwrap .gover { border-radius: 16px; }

/* ----------------------------------------------------------
   7. Game 3 — the Haft-Sin sofreh
   ---------------------------------------------------------- */
.hs-sofreh {
  position: relative; padding: 14px 12px; border-radius: 16px; margin-bottom: 12px;
  /* a termeh cloth: saffron field, paisley-ish border in kashi */
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .25), transparent 70%),
    var(--cream);
  box-shadow: inset 0 0 0 6px var(--kashi), inset 0 0 0 8px var(--saffron), inset 0 0 0 11px var(--kashi), var(--g-shadow);
}
.hs-sofreh::before {
  content: ""; position: absolute; inset: 11px; pointer-events: none; border-radius: 6px;
  background-image: var(--star); background-size: 42px 42px; opacity: .8;
}
.hs-slots { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px 4px; }
.hs-slot {
  position: relative; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: 2px dashed rgba(31, 62, 158, .3); background: rgba(255, 255, 255, .4);
}
.hs-slot__sin { font-family: "Aref Ruqaa", serif; font-size: clamp(1rem, 4vw, 1.5rem); color: rgba(31, 62, 158, .35); line-height: 1; }
.hs-slot.is-on { border: 0; background: none; animation: settle .5s cubic-bezier(.2, 1.4, .4, 1); }
.hs-slot.is-on svg { width: 118%; height: 118%; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .2)); }
.hs-slot small {
  position: absolute; bottom: -1.05em; left: 50%; transform: translateX(-50%);
  font-size: clamp(.62rem, 2.3vw, .8rem); color: var(--lajvard); white-space: nowrap; line-height: 1;
}
@keyframes settle { from { transform: translateY(-40px) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.hs-sofreh { padding-bottom: 22px; }
#hsWrap.is-set .hs-sofreh { box-shadow: inset 0 0 0 6px var(--kashi), inset 0 0 0 8px var(--saffron), inset 0 0 0 11px var(--kashi), 0 0 0 4px rgba(224, 161, 27, .45), var(--g-shadow); }

.hs-tray { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 640px) { .hs-tray { grid-template-columns: repeat(6, 1fr); } }
.hs-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 7px; margin: 0; cursor: pointer;
  background: var(--g-card); border: 1.5px solid var(--g-line);
  border-radius: 999px 999px 12px 12px; box-shadow: var(--g-shadow);
  transition: transform .2s, border-color .2s, opacity .3s;
  -webkit-tap-highlight-color: transparent;
}
.hs-item__art { width: 72%; aspect-ratio: 1; display: block; }
.hs-item__art svg { width: 100%; height: 100%; display: block; }
.hs-item__name { font-size: .78rem; font-weight: 600; line-height: 1.3; text-align: center; color: var(--ink); min-height: 2.6em; display: flex; align-items: center; }
html[lang="en"] .hs-item__name { font-size: .74rem; }
.hs-item:active { transform: scale(.95); }
.hs-item:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .hs-item:not(:disabled):hover { transform: translateY(-3px); border-color: var(--firouzeh); }
}
.hs-item:disabled { cursor: default; }
.hs-item.is-right { opacity: .35; border-color: var(--firouzeh); }
.hs-item.is-wrong { opacity: .45; border-color: var(--kashi); animation: nudge .35s ease; }
.hs-item.is-wrong::after {
  content: ""; position: absolute; inset: 22% 22% auto; aspect-ratio: 1; pointer-events: none;
  background:
    linear-gradient(45deg, transparent 45%, var(--kashi) 45% 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--kashi) 45% 55%, transparent 55%);
}

.hs-fact {
  margin: 0 auto; min-height: 3.4em; max-width: 36em; text-align: center;
  font-size: .9rem; line-height: 1.7; color: var(--g-ink-2);
  padding: .5em 1em; border-radius: 14px 14px 8px 8px;
}
.hs-fact b { font-family: "Aref Ruqaa", serif; font-weight: 700; font-size: 1.2em; color: var(--ink); }
.hs-fact .sin { color: var(--kashi); }
.hs-fact__tr { font-style: italic; color: var(--lajvard); }
.hs-fact.is-right { background: rgba(30, 124, 130, .12); color: var(--ink); }
.hs-fact.is-wrong { background: rgba(169, 68, 31, .1); color: var(--ink); }
#hsWrap .gover { border-radius: 16px; gap: 6px; padding: 10px; }
#hsWrap .gover__big { font-size: clamp(1.9rem, 8vw, 2.5rem); }

/* ----------------------------------------------------------
   8. Reduced motion
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .playfab { transition: none; }
  .gmodal__sheet, .gmodal__scrim { transition: none; }
  .kt__in { transition: none; }
}
