/* 7arif round-based games (games/retro/rounds.js): the frame the five round-based games share
   (فين الكدبة؟, الحلقة الناقصة, سنة كام؟, لعبوا سوا, الصفقة). Loaded after kit.css, before the game's own game.css.
   Same parts as مين الغريب؟ (oddone): issue strip with day arrows, round pips + score tag, the question card, the reveal on
   the facing page (verdict stamp + what it was), the back page with the day's recap.
   Rules: logical properties only, Lalezar >= 24 px, Arabic body >= 16 px, every control >= 44 px, only transform /
   opacity animate, no blur. Phone: one column, Next pinned to the bottom. Desktop >= 1024: the two-page spread. */

html.sheet-open, html.sheet-open body { overflow: hidden; overscroll-behavior: none; }
main { display: block; }

/* ---- issue strip ---- */
.rd-issue { padding: 4px 0; }
.rd-issue__mid { flex: 1 1 auto; min-width: 0; text-align: center; }
.rd-issue .r-issue__meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.rd-issue .r-modetag { font-size: 14px; }
.rd-cover .r-kicker, .rd-side .r-kicker { font-size: 16px; line-height: 1.6; }

/* ---- round pips + score tag ---- */
.rd-progress { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.rd-pips { display: flex; gap: 6px; flex: 1 1 auto; max-width: 260px; }
.rd-pips i { display: block; flex: 0 1 22px; aspect-ratio: 1; max-width: 22px; border: 2px solid var(--ink); background: var(--paper-clip); }
.rd-pips i.ok { background: var(--lime); }
.rd-pips i.close { background: var(--yellow); background-image: repeating-linear-gradient(90deg, rgba(26,26,26,.35) 0 2px, transparent 2px 6px); }
.rd-pips i.bad { background: var(--red); background-image: repeating-linear-gradient(-45deg, rgba(251,247,236,.45) 0 2px, transparent 2px 5px); }
.rd-pips i.cur { background: var(--yellow); transform: rotate(-8deg); box-shadow: 2px 2px 0 var(--ink); }
.rd-score { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 6px; background: var(--yellow); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
            padding: 0 10px; transform: rotate(-3deg); margin-inline-end: 4px; white-space: nowrap; }
.rd-score small { font: 800 16px/1.6 var(--font-ui); }
.rd-score b { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.3; padding-top: 3px; }

/* ---- the question ---- */
.rd-q { font-size: 28px; margin-bottom: 8px; }
#card, #reveal { scroll-margin-bottom: calc(84px + var(--ib)); }

/* ---- option buttons (lie, missing, teammates, transfer): paper cards, hard shadow ---- */
.rd-opts { display: grid; gap: 10px; padding: 2px 4px 6px; }
.rd-opt { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 56px;
          padding: 8px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper-clip); color: var(--ink); text-align: start;
          box-shadow: var(--shadow-hard); transition: transform 60ms; }
.rd-opt:not(:disabled):active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.rd-opt:focus-visible { outline: 3px solid var(--blue, #0072B2); outline-offset: 3px; }
.rd-opt:disabled { cursor: default; opacity: 1; color: var(--ink); }
@media (hover: hover) { .rd-opt:not(:disabled):hover { background: #fff; } }
.rd-num { width: 32px; height: 32px; display: grid; place-items: center; background: var(--ink); color: var(--paper-clip); font: 800 18px/1 var(--font-ui); transform: rotate(-5deg); }
.rd-txt { min-width: 0; overflow-wrap: break-word; word-break: normal; }   /* UI sweep C12: a word moves to the next line whole; only a word longer than the line breaks */
.rd-nm { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.2; padding-top: 3px; }
.rd-tag { font-size: 15px; line-height: 1.4; max-width: 8.5em; text-align: center; border: 2px solid var(--ink); padding: 1px 8px; transform: rotate(-4deg); }
.rd-opt.r-clip { padding: 12px 14px; box-shadow: 3px 3px 0 var(--ink); background: var(--paper-clip); }
.rd-opt.r-clip { padding-inline-end: 46px; }
.rd-opt.r-clip::after { top: 50%; margin-top: -13px; inset-inline-end: 10px; }   /* the seal inside the card, clear of the tag */
.rd-opt.r-bad { box-shadow: 3px 3px 0 var(--ink); padding: 8px 12px; background-color: #F7D4CF;
                background-image: repeating-linear-gradient(-45deg, rgba(215,38,46,.09) 0 6px, transparent 6px 13px); border-color: var(--red); }
.rd-opt.r-bad .rd-num { background: var(--red); }
.rd-opt.is-missed { outline: 3px dashed var(--ink); outline-offset: 3px; }
.rd-opt.is-other { background: var(--paper-2); box-shadow: 2px 2px 0 rgba(26,26,26,.55); }
.rd-other { display: inline-flex; align-items: center; gap: 4px; font: 800 14px/1.5 var(--font-ui); color: var(--ink); white-space: nowrap; }
.rd-other svg { width: 20px; height: 20px; padding: 2px; border-radius: 50%; background: var(--lime); border: 1.5px solid var(--ink); }
.rd-stamp { font-size: 24px; padding: 0 8px; justify-self: end; margin-inline-end: 2px; }

/* ---- crest: the club's generic crest (assets/clubs-icons.js), or a drawn shield with the initials ---- */
.rd-crest { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; }
.rd-crest img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.rd-crest b { display: grid; place-items: center; width: 84%; height: 92%; background: var(--navy); color: var(--paper-clip); border: 2px solid var(--ink);
              clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%); font: 900 14px/1 var(--font-ui); padding-bottom: 18%; }

/* ---- facing page: the reveal ---- */
.rd-side { margin-top: 18px; }
.rd-wait { display: none; }
.rd-reveal, .rd-recapbox { position: relative; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-navy); padding: 14px; }
.rd-verdict { display: flex; align-items: center; gap: 14px; margin: 2px 0 12px; padding-inline-start: 4px; }
.rd-vstamp { flex: 0 0 auto; }
.rd-vstamp.close { background: var(--yellow); color: var(--ink); outline-color: var(--yellow); border-color: var(--ink); }
.rd-vstamp.close::before { content: "\0642\0631\0651\0628\062A"; }
html[lang="en"] .rd-vstamp.close::before { content: "CLOSE"; }
.rd-vtxt { font-family: var(--font-display); font-size: 24px; line-height: 1.25; padding-top: 3px; }
html[lang="en"] .rd-vtxt { font-family: var(--font-ui); font-weight: 900; }
.rd-verdict.bad .rd-vtxt { color: var(--red-ink); }
.rd-body { font-size: 16px; line-height: 1.6; font-weight: 700; color: var(--ink-meta); }
.rd-body b { color: var(--ink); }
.rd-next { width: 100%; margin-top: 16px; min-height: 56px; font-size: 18px; }
@media (max-width: 1023px) {
  .rd-next { position: fixed; z-index: 30; inset-inline: max(14px, var(--il)) max(14px, var(--ir)); inset-block-end: calc(12px + var(--ib)); width: auto; margin: 0; }
  body:has(#reveal:not(.hidden)) .r-poster { padding-block-end: calc(96px + var(--ib)); }
}

/* ---- the back page ---- */
.rd-result { text-align: center; padding: 6px 0 4px; }
.rd-result__label { font-family: var(--font-display); font-size: 26px; line-height: 1.2; }
.rd-share { width: 100%; margin-top: 16px; font-size: 18px; }
.r-share.flash { animation: r-drop 220ms ease-out; }
.rd-recaphead { margin: 0 0 6px; }
.rd-recap { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.rd-recap li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1.5px solid var(--ink); }
.rd-recap .n { font: 800 16px/1 var(--font-ui); width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); color: var(--paper-clip); }
.rd-recap .l { font: 800 17px/1.4 var(--font-ui); }
.rd-recap .w { font-size: 16px; font-weight: 600; color: var(--ink-soft); line-height: 1.6; }
.rd-recap .m { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; font-size: 16px; box-shadow: 2px 2px 0 var(--ink); }
.rd-recap li.ok .m { background: var(--lime); color: var(--ink); }
.rd-recap li.close .m { background: var(--yellow); color: var(--ink); }
.rd-recap li.bad .m { background: var(--red); color: var(--paper-clip); }
.rd-recap li.bad .l { color: var(--red-ink); }

/* ---- help sheet ---- */
.rd-sheetwrap { animation: rd-fade .18s ease-out; }
@keyframes rd-fade { from { opacity: 0; } to { opacity: 1; } }
.rd-sheet { outline: none; }
.rd-tagline { margin: 4px 0 14px; color: var(--ink-meta); font-size: 16px; line-height: 1.6; font-weight: 700; }
.rd-howto { list-style: none; counter-reset: s; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; }
.rd-howto li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; font-size: 16px; line-height: 1.6; font-weight: 700; }
.rd-howto li::before { content: counter(s, arabic-indic); width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; border: 2.5px solid var(--ink);
                       box-shadow: 2px 2px 0 var(--ink); display: grid; place-items: center; font: 800 18px/1 var(--font-ui); transform: rotate(-6deg); }
html[lang="en"] .rd-howto li::before { content: counter(s); }
.rd-fine { margin: 6px 0 0; font-size: 16px; line-height: 1.6; font-weight: 600; color: var(--ink-soft); }
.rd-helpgo { width: 100%; margin-top: 14px; }

/* ---- toast ---- */
.rd-toast { position: fixed; z-index: 50; inset-inline: 16px; inset-block-end: calc(22px + var(--ib)); width: fit-content; max-width: calc(100% - 32px); margin-inline: auto;
            background: var(--ink); color: var(--paper-clip); border: 2px solid var(--paper-clip); box-shadow: 3px 3px 0 var(--red); padding: 10px 16px; font-weight: 800; font-size: 16px; text-align: center; }

@media (min-width: 600px) { .rd-q { font-size: 32px; } }

/* ---- desktop: the spread ---- */
@media (min-width: 1024px) {
  .rd-spread { margin-top: 6px; }
  .r-cover__rule { padding: 14px 18px 20px; }
  .rd-score b { font-size: 30px; }
  .rd-q { font-size: 36px; }
  .rd-opts { gap: 14px; }
  .rd-opt { min-height: 66px; }
  .rd-nm { font-size: 26px; }
  .rd-side { margin-top: 0; position: sticky; top: 16px; }
  .rd-wait { display: block; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-navy); padding: 14px; text-align: center; }
  .rd-wait__panel { height: 300px; display: grid; place-items: center; border: 3px dashed var(--ink); background: var(--paper-2);
                    background-image: repeating-linear-gradient(-45deg, rgba(26,26,26,.06) 0 6px, transparent 6px 13px); }
  .rd-wait__q { display: grid; place-items: center; width: 120px; aspect-ratio: 1; border-radius: 50%; background: var(--red); color: var(--paper-clip); border: 4px solid var(--ink);
                box-shadow: 4px 4px 0 var(--ink); font-family: var(--font-display); font-size: 80px; line-height: 1; padding-top: 14px; transform: rotate(-8deg); }
  .rd-wait__txt { margin: 12px 0 2px; font-family: var(--font-display); font-size: 24px; line-height: 1.3; }
  .rd-reveal, .rd-recapbox { padding: 18px; }
  .rd-vtxt { font-size: 28px; }
  .rd-result { padding: 40px 0 20px; }
}

body.is-done .rd-progress { display: none; }
html.sheet-open .rd-next { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .rd-opt, .rd-next { transition: none; }
  .rd-opt:not(:disabled):active, .rd-next:active { transform: none; }
}
/* alignment pass 2026-11-12: the right pick's tick seal sits on the inline-end corner; room for it, so the tag
   ("Odd one" / "الغريب", "Team-mate") stays clear of the seal and inside the frame */
.rd-opt.r-clip { padding-inline-end: 46px; }
/* phones: a smaller verdict stamp on a wrong pick leaves the fact its width ("Manchester United" no longer splits) */
@media (max-width: 420px) { .rd-stamp { font-size: 20px; padding: 0 6px; } }   /* Lalezar never under 20 px (E1) */
/* UI sweep C12: on narrow phones the right / missed / other tag drops under the option's text instead of squeezing it */
@media (max-width: 380px) {
  /* list-style options only (lie, teammates, transfer); the card grids (missing .ms-opts) place their tag themselves */
  .rd-opts:not(.ms-opts) > .rd-opt { row-gap: 4px; }
  .rd-opts:not(.ms-opts) > .rd-opt > .rd-tag, .rd-opts:not(.ms-opts) > .rd-opt > .rd-other { grid-column: 2 / -1; grid-row: 2; justify-self: start; max-width: none; transform: rotate(-2deg); }
  .rd-opts:not(.ms-opts) > .rd-opt:has(> .rd-tag, > .rd-other) > .rd-num { grid-row: 1 / span 2; }
}
/* a pair of players in a recap line (لعبوا سوا: the star + his team-mate), each name dual in the Arabic UI */
.rd-pair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.rd-plus { font-weight: 900; }
