/* 7arif games switcher (retro/switcher.js): the "today's issue" bottom sheet, opened from the games button in every
   top bar. Works on the main page (style.css) and the game pages (kit.css): only the shared tokens are used, with fallbacks. */
.hs { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.hs.hidden { display: none !important; }
.hs .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.hs-lock, html.hs-lock body { overflow: hidden; }
.hs-back { position: absolute; inset: 0; background: rgba(8, 11, 38, .62); opacity: 0; transition: opacity 180ms ease-out; }
.hs-box { position: relative; display: flex; flex-direction: column; width: min(560px, 100%); max-height: min(88svh, 760px); background: var(--paper, #EFE6D2); color: var(--ink, #1A1A1A);
          font-family: var(--font-ui, system-ui, sans-serif); outline: none;
          padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
          clip-path: polygon(0 9px, 4% 4px, 8% 8px, 12% 2px, 17% 7px, 21% 3px, 26% 9px, 30% 4px, 35% 7px, 39% 1px, 44% 6px, 48% 3px, 53% 9px, 57% 4px, 62% 7px, 66% 2px, 71% 8px, 75% 3px, 80% 7px, 84% 1px, 89% 6px, 93% 3px, 97% 8px, 100% 4px, 100% 100%, 0 100%);
          transform: translateY(100%); transition: transform 220ms cubic-bezier(.2, .8, .2, 1); }
.hs.is-in .hs-back { opacity: 1; }
.hs.is-in .hs-box { transform: none; }
.hs.is-out .hs-box { transition-duration: 160ms; }
/* reduced motion: no slide, a short fade only */
.hs.no-anim .hs-box { transform: none; opacity: 0; transition: opacity 120ms linear; }
.hs.no-anim.is-in .hs-box { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hs-box { transition: opacity 120ms linear !important; } .hs-back { transition-duration: 120ms; } }

.hs-grab { display: flex; justify-content: center; padding: 10px 0 4px; touch-action: none; }
.hs-grab i { width: 44px; height: 5px; border-radius: 3px; background: var(--ink-soft, #6B5D43); opacity: .55; }
.hs-head { display: flex; align-items: flex-start; gap: 10px; padding: 0 2px 8px; border-bottom: 3px solid var(--ink, #1A1A1A); touch-action: none; }
.hs-titles { flex: 1 1 auto; min-width: 0; }
.hs-kicker { margin: 0; font: 800 12px/1.5 var(--font-ui, sans-serif); color: var(--red-ink, #AE1C23); display: flex; align-items: center; gap: 8px; }
.hs-mode { display: inline-block; font: 800 11px/1.5 var(--font-ui, sans-serif); color: var(--red-ink, #AE1C23); border: 2px solid currentColor; padding: 0 6px; transform: rotate(-4deg); }
.hs-mode.eu { color: var(--blue, #2A4DA0); }
.hs-title { margin: 2px 0 0; font: 400 30px/1.15 var(--font-display, sans-serif); padding-top: 3px; color: var(--ink, #1A1A1A); }
html[lang="en"] .hs-title, .hs[lang="en"] .hs-title { font: 900 26px/1.2 var(--font-ui, sans-serif); padding-top: 0; }
.hs-sub { margin: 0; font: 700 13px/1.5 var(--font-ui, sans-serif); color: var(--ink-meta, #4a3f2c); }
.hs-x { flex: 0 0 auto; position: relative; width: 44px; height: 44px; border: 2px solid var(--ink, #1A1A1A); border-radius: 50%; background: var(--paper-clip, #FBF7EC);
        box-shadow: 2px 2px 0 var(--ink, #1A1A1A); color: var(--ink, #1A1A1A); cursor: pointer; padding: 0; }
.hs-x i::before, .hs-x i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 3px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.hs-x i::after { transform: translate(-50%, -50%) rotate(-45deg); }
.hs-x:active { translate: 1px 1px; box-shadow: 1px 1px 0 var(--ink, #1A1A1A); }

.hs-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.hs-list li { border-bottom: 1.5px solid var(--ink, #1A1A1A); }
.hs-row { display: grid; grid-template-columns: 34px 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 6px 4px; color: var(--ink, #1A1A1A); text-decoration: none;
          -webkit-tap-highlight-color: transparent; }
.hs-row:active { background: var(--paper-2, #E6DAC0); }
@media (hover: hover) { .hs-row:hover { background: var(--paper-2, #E6DAC0); } }
.hs-row:focus-visible { outline: 3px solid var(--yellow, #F4D21F); outline-offset: -3px; background: var(--paper-2, #E6DAC0); }
.hs-pg { display: grid; place-items: center; align-content: center; width: 34px; aspect-ratio: 1; border-radius: 50%; background: var(--yellow, #F4D21F); border: 2px solid var(--ink, #1A1A1A);
         font: 400 16px/1 var(--font-display, sans-serif); padding-top: 2px; transform: rotate(-6deg); }
.hs-pg small { font: 800 8px/1 var(--font-ui, sans-serif); display: block; }
html[lang="en"] .hs-pg, .hs[lang="en"] .hs-pg { font: 900 14px/1 var(--font-ui, sans-serif); padding-top: 0; }
.hs-ico { display: grid; place-items: center; width: 38px; height: 38px; background: var(--ink, #1A1A1A); color: var(--paper-clip, #FBF7EC); border-radius: 2px; }
.hs-ico svg { width: 24px; height: 24px; }
.hs-txt { display: flex; flex-direction: column; min-width: 0; }
.hs-txt b { font: 400 20px/1.2 var(--font-display, sans-serif); padding-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="en"] .hs-txt b, .hs[lang="en"] .hs-txt b { font: 900 16px/1.3 var(--font-ui, sans-serif); padding-top: 0; }
.hs-txt small { font: 700 12.5px/1.4 var(--font-ui, sans-serif); color: var(--ink-meta, #4a3f2c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-tag { font: 800 12px/1.5 var(--font-ui, sans-serif); color: var(--ink, #1A1A1A); background: var(--yellow, #F4D21F); border: 1.5px solid var(--ink, #1A1A1A); padding: 1px 7px; white-space: nowrap; }
.hs-tag.here { background: var(--ink, #1A1A1A); color: var(--paper-clip, #FBF7EC); }
.hs-tick { width: 30px; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--ink, #1A1A1A); box-shadow: 2px 2px 0 var(--ink, #1A1A1A);
  background: var(--lime, #7BC43A) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23141821' stroke-width='3.6' stroke-linecap='square'/%3E%3C/svg%3E") center / 70% no-repeat; }
.hs-row.is-done .hs-txt b { color: var(--ink-meta, #4a3f2c); }
.hs-row.is-here { background: var(--paper-clip, #FBF7EC); box-shadow: inset 5px 0 0 var(--red, #D7262E); }
.hs[dir="rtl"] .hs-row.is-here { box-shadow: inset -5px 0 0 var(--red, #D7262E); }
.hs-all { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 10px; border: 2px solid var(--ink, #1A1A1A); background: var(--paper-clip, #FBF7EC);
          box-shadow: 3px 3px 0 var(--ink, #1A1A1A); color: var(--ink, #1A1A1A); font: 800 15px/1.2 var(--font-ui, sans-serif); text-decoration: none; flex: 0 0 auto; }
.hs-all:active { translate: 2px 2px; box-shadow: 1px 1px 0 var(--ink, #1A1A1A); }
@media (max-height: 660px) { .hs-row { min-height: 52px; padding-block: 4px; } .hs-title { font-size: 26px; } .hs-all { min-height: 44px; margin-top: 8px; } }

/* desktop: a centred dialog with the hard navy shadow, like the other sheets */
@media (min-width: 700px) {
  .hs { align-items: center; }
  .hs-box { width: min(560px, calc(100vw - 48px)); max-height: min(92svh, 860px); padding: 14px 20px 18px; filter: drop-shadow(6px 6px 0 var(--navy-deep, #0D1238)); transform: translateY(24px); opacity: 0;
            transition: transform 200ms cubic-bezier(.2, .8, .2, 1), opacity 160ms ease-out; }
  .hs.is-in .hs-box { opacity: 1; }
  .hs-grab { display: none; }
  .hs-row { min-height: 54px; padding-block: 4px; }
}

/* the games button in the game pages' top bar (kit.css .r-round): four squares, the same glyph as the main page */
.r-round.games svg, .btn-round.games svg { width: 22px; height: 22px; }
.r-round.games { display: inline-grid; place-items: center; }
.hs-versus { background: var(--yellow, #F4D21F); }
