/* مين الغريب؟ / Meen El Ghareeb (odd one out): the retro-magazine look. Loaded after ../retro/kit.css (tokens, r-* parts);
   this file only lays out the game: issue strip with day arrows, round pips + score sticker, five player cards,
   the reveal (verdict stamp + the link as a category panel in its family colour), the back page with the day's recap.
   Phone: one column. Desktop >= 1024: a spread, cards on the cover, the link panel / recap on the facing page. */

html.sheet-open, html.sheet-open body { overflow: hidden; overscroll-behavior: none; }
main { display: block; }


/* ---- issue strip: previous day · "العدد N" + date + mode tag · next day ---- */
.oo-issue { padding: 4px 0; }
.oo-issue__mid { flex: 1 1 auto; min-width: 0; text-align: center; }
.oo-issue .r-issue__meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.oo-issue .r-modetag { font-size: 14px; }
.oo-cover .r-kicker, .oo-side .r-kicker { font-size: 16px; line-height: 1.6; }

/* ---- round pips + score sticker ---- */
.oo-progress { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; }
.oo-pips { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; flex: 1 1 auto; max-width: 260px; }
.oo-pips i { display: block; aspect-ratio: 1; max-width: 22px; border: 2px solid var(--ink); background: var(--paper-clip); }
.oo-pips i.ok { background: var(--lime); }
.oo-pips i.bad { background: var(--red); background-image: repeating-linear-gradient(-45deg, rgba(251,247,236,.45) 0 2px, transparent 2px 5px); }
.oo-pips i.cur { background: var(--yellow); transform: rotate(-8deg); box-shadow: 2px 2px 0 var(--ink); }
/* the running score: a small yellow tag ("النتيجة ٣"), so the five cards fit above the fold at 360x640 */
.oo-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; }
.oo-score small { font: 800 16px/1.6 var(--font-ui); }
.oo-score b { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.3; padding-top: 3px; }

/* ---- the question + five player cards ---- */
.oo-q { font-size: 28px; margin-bottom: 6px; }
/* after the pick the question line names the link (kicker "الرابط بين الأربعة") */
#card.is-revealed .oo-q { font-size: 26px; }
/* phones: the Next button is pinned to the bottom, keep the cards clear of it when scrolling them into view */
#card { scroll-margin-bottom: calc(84px + var(--ib)); }
.oo-choices { display: grid; gap: 8px; padding: 2px 4px 6px; }
.oo-card { 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; }
.oo-card:not(:disabled):active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.oo-card:focus-visible { outline: 3px solid var(--blue, #0072B2); outline-offset: 3px; }
.oo-card:disabled { cursor: default; opacity: 1; color: var(--ink); }
@media (hover: hover) { .oo-card:not(:disabled):hover { background: #fff; } }
.oo-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); }
.oo-nm { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.2; padding-top: 3px; overflow-wrap: anywhere; }
.oo-tag { font-size: 16px; white-space: nowrap; border: 2px solid var(--ink); padding: 0 8px; transform: rotate(-4deg); }

/* right pick: the odd one becomes a taped clipping with the lime frame + tick seal (kit .r-clip) */
.oo-card.r-clip { border-color: var(--ink); padding: 12px 14px; box-shadow: 3px 3px 0 var(--ink); }
.oo-card.r-clip { padding-inline-end: 46px; }
.oo-card.r-clip::after { top: 50%; margin-top: -13px; inset-inline-end: 10px; }   /* the seal inside the card, clear of the tag */
/* wrong pick: red hatched card + the big red stamp */
.oo-card.r-bad { box-shadow: 3px 3px 0 var(--ink); padding: 8px 12px; }
.oo-card.r-bad .oo-num { background: var(--red); }
.oo-stamp { font-size: 24px; padding: 0 8px; justify-self: end; margin-inline-end: 2px; }
/* missed: the real odd one, pointed at with a dashed rule and the yellow tag */
.oo-card.is-missed { outline: 3px dashed var(--ink); outline-offset: 3px; }
/* the four that share the link */
.oo-card.is-fits { background: var(--paper-2); box-shadow: 2px 2px 0 rgba(26,26,26,.55); }
.oo-fit { width: 30px; height: 30px; display: grid; place-items: center; font-size: 20px; color: var(--ink); border: 2px solid var(--ink); border-radius: 50%; background: var(--paper-clip); }

/* ---- facing page: before the pick (desktop only) a covered panel, after it the reveal ---- */
.oo-side { margin-top: 18px; }
.oo-wait { display: none; }
.oo-reveal, .oo-recapbox { position: relative; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-navy); padding: 14px; }
.oo-verdict { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; padding-inline-start: 4px; }
.oo-vstamp { flex: 0 0 auto; }
.oo-vtxt { font-family: var(--font-display); font-size: 24px; line-height: 1.25; padding-top: 3px; }
.oo-verdict.bad .oo-vtxt { color: var(--red-ink); }
.oo-linkrow { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 14px; align-items: start; }
.oo-panel .r-panel { height: 132px; box-shadow: var(--shadow-hard); }
.oo-panel .r-band { display: none; }   /* phones: the link's name sits right next to the panel */
.oo-linktxt .r-kicker { margin-top: 2px; }
.oo-linkname { font-family: var(--font-display); font-size: 25px; line-height: 1.2; padding-top: 2px; overflow-wrap: anywhere; }
.oo-why { margin: 6px 0 0; font-size: 16px; line-height: 1.6; font-weight: 700; color: var(--ink-meta); }
.oo-next { width: 100%; margin-top: 16px; min-height: 56px; font-size: 18px; }
/* phones: Next is pinned to the bottom of the screen in thumb reach (rule 17), the page keeps room for it */
@media (max-width: 1023px) {
  .oo-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: score headline, share, recap ---- */
.oo-result { text-align: center; padding: 6px 0 4px; }
.oo-result__label { font-family: var(--font-display); font-size: 26px; line-height: 1.2; }
.oo-share { width: 100%; margin-top: 16px; font-size: 18px; }
.oo-share svg { font-size: 22px; }
.r-share.flash { animation: r-drop 220ms ease-out; }
.oo-recaphead { margin: 0 0 6px; }
.oo-recap { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.oo-recap li { display: grid; grid-template-columns: 56px minmax(0, 1fr) 30px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1.5px solid var(--ink); }
.oo-mini .r-panel { width: 56px; height: 56px; min-height: 0; border-width: 2px; }
.oo-mini .r-band { display: none; }
.oo-mini .r-panel__art { padding: 12%; }
.oo-mini .r-panel__art img { max-height: 100%; }
.oo-recap .l { font: 800 17px/1.4 var(--font-ui); }
.oo-recap .w { font-size: 16px; font-weight: 600; color: var(--ink-soft); line-height: 1.6; }
.oo-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); }
.oo-recap li.ok .m { background: var(--lime); color: var(--ink); }
.oo-recap li.bad .m { background: var(--red); color: var(--paper-clip); }
.oo-recap li.bad .l { color: var(--red-ink); }

/* ---- help sheet (kit .r-sheet, torn top edge) ---- */
.oo-sheetwrap { animation: oo-fade .18s ease-out; }
@keyframes oo-fade { from { opacity: 0; } to { opacity: 1; } }
.oo-sheet { outline: none; }
.oo-helptitle { margin: 4px 0 4px; text-align: center; font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1.2;
                color: var(--yellow); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
html[lang="en"] .oo-helptitle { font-size: 32px; }
.oo-tagline { margin: 4px 0 14px; color: var(--ink-meta); font-size: 16px; line-height: 1.6; font-weight: 700; text-align: center; }
.oo-howto { list-style: none; counter-reset: s; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; }
.oo-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; }
.oo-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"] .oo-howto li::before { content: counter(s); }
.oo-fine { margin: 6px 0 0; font-size: 16px; line-height: 1.6; font-weight: 600; color: var(--ink-soft); }
.oo-helpgo { width: 100%; margin-top: 14px; }

/* ---- toast ---- */
.oo-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; }

/* ---- tablets: a little more air ---- */
@media (min-width: 600px) {
  .oo-q { font-size: 32px; }
  .oo-nm { font-size: 24px; }
  .oo-linkrow { grid-template-columns: 150px minmax(0, 1fr); }
  .oo-panel .r-panel { height: 160px; }
}

/* ---- desktop: the spread ---- */
@media (min-width: 1024px) {
  .oo-spread { margin-top: 6px; }
  .r-cover__rule { padding: 14px 18px 20px; }
  .oo-score b { font-size: 30px; }
  .oo-q { font-size: 36px; }
  .oo-choices { gap: 14px; }
  .oo-card { min-height: 66px; }
  .oo-nm { font-size: 26px; }
  .oo-side { margin-top: 0; position: sticky; top: 16px; }
  .oo-wait { display: block; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-navy); padding: 14px; text-align: center; }
  .oo-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); }
  .oo-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); }
  .oo-wait__txt { margin: 12px 0 2px; font-family: var(--font-display); font-size: 24px; line-height: 1.3; }
  .oo-reveal { padding: 18px; }
  .oo-linkrow { grid-template-columns: 1fr; }
  .oo-panel .r-panel { height: 280px; }
  .oo-panel .r-band { display: block; font-size: 18px; padding: 8px 10px 9px; }
  .oo-panel .r-panel__art { padding: 6% 10% 4%; }
  .oo-linkname { font-size: 30px; }
  .oo-why { font-size: 15px; }
  .oo-vtxt { font-size: 26px; }
  .oo-recapbox { padding: 18px; }
  .oo-result__label { font-size: 32px; }
  .oo-result { padding: 40px 0 20px; }
}

/* kit parts that .oo-card's own background/size would otherwise override */
.oo-card.r-bad { background-color: #F7D4CF; background-image: repeating-linear-gradient(-45deg, rgba(215,38,46,.09) 0 6px, transparent 6px 13px); border-color: var(--red); }
.oo-card.r-clip { background: var(--paper-clip); }

/* the back page brings its own score and streak: the round pips and the running score tag step aside */
body.is-done .oo-progress { display: none; }
/* the pinned Next button steps aside while a sheet is open (no overlap with the sheet's own button) */
html.sheet-open .oo-next { visibility: hidden; }
/* reduced motion: no translate on press (opacity-only rule 6); the pressed state still shows through the shadow */
@media (prefers-reduced-motion: reduce) {
  .oo-card, .oo-next { transition: none; }
  .oo-card:not(:disabled):active, .oo-next:active { transform: none; }
}

/* compact phones (owner 2026-11-11): the question and all five cards on one screen down to 320 x 568 */
@media (max-width: 1023px) {
  .oo-issue .r-issue__meta { flex-wrap: nowrap; gap: 6px; }
  .oo-issue .r-modetag { font-size: 13px; }
  .oo-progress { margin: 0 0 2px; }
  .oo-score { padding: 0 8px; }
  .oo-score b { font-size: 24px; line-height: 1.2; }
  .oo-cover .oo-kicker { margin-bottom: 0; }
  .oo-q, #card.is-revealed .oo-q { font-size: 24px; margin-bottom: 4px; }
  .oo-choices { gap: 8px; padding: 2px 4px 4px; }
  .oo-card { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; min-height: 48px; padding: 3px 10px; }
  .oo-card.r-clip { padding: 7px 46px 7px 12px; padding-inline: 12px 46px; }
  .oo-card.r-bad { padding: 3px 10px; }
  .oo-num { width: 28px; height: 28px; font-size: 16px; }
  .oo-side { margin-top: 12px; }
  .oo-reveal, .oo-recapbox { padding: 10px; }
  .oo-verdict { margin-bottom: 8px; }
  .oo-linkrow { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
  .oo-panel .r-panel { height: 100px; }
  .oo-next { min-height: 50px; }
}
/* narrow phones in English: long Latin names in Cairo 800 (two lines of Lalezar pushed the fifth card off a 320 x 568 screen) */
@media (max-width: 420px) {
  html[lang="en"] .oo-nm { font: 800 19px/1.3 var(--font-ui); padding-top: 0; overflow-wrap: normal; }
  html[lang="en"] .oo-issue .r-issue__meta { font-size: 14px; }
}
/* 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 */
.oo-card.r-clip { padding-inline-end: 46px; }
/* the English name after the odd one's Arabic name in the explanation (owner 2026-11-12) */
.oo-en { font-family: var(--font-ui); font-weight: 700; font-size: .85em; opacity: .8; white-space: nowrap; }
/* short phones: the two-line names (Arabic + English) keep all five cards on screen with the question */
@media (max-width: 1023px) and (max-height: 700px) {
  html[lang="ar"] .oo-choices { gap: 4px; }
  html[lang="ar"] .oo-card { min-height: 46px; padding-block: 2px; }
  html[lang="ar"] .oo-card .oo-nm { font-size: 20px; line-height: 1.1; padding-top: 2px; }
  /* 2026-11-14: the fifth card ended 1-2 px under a 320 x 568 screen on days with long names: ~9 px less air above the
     cards (score tag line, kicker line, question gap); type sizes unchanged (Arabic 16 px, Lalezar 24 px) */
  .oo-score b { line-height: 1.05; }
  .oo-cover .oo-kicker { line-height: 1.35; }
  .oo-q, #card.is-revealed .oo-q { margin-bottom: 2px; }
}

/* CLS (kit.css "CLS gate"): the masthead (until it is on its final row) and the round card are unpainted until game.js has filled it (#roundName) and switcher.js has
   labelled the top bar's games button and kit.js fitTopbar() has run (it adds .is-fitted to the masthead) */
.oo-spread:has(#roundName:empty), .r-poster:has(.r-round.games[data-hareef-games="icon"]:not(.has-label), .r-topbar .r-masthead:not(.is-fitted)) .oo-spread,
.r-topbar .r-masthead:not(.is-fitted) { visibility: hidden; animation: r-gate-open 0s 3s forwards; }

/* ---- UI sweep 2026-11-16 (P2-gamesB) ----
   C6: after a pick the reveal (verdict + the link + why) scrolls fully into view above the pinned Next button */
#reveal { scroll-margin-bottom: calc(80px + var(--ib)); }
@media (max-width: 1023px) { body:has(#reveal:not(.hidden)) .oo-side { padding-block-end: 8px; } }
/* E2: the English name in the explanation: full ink-meta, no opacity (only the Arabic goes red in a wrong row) */
.oo-en { opacity: 1; color: var(--ink-meta); font-size: max(12px, .85em); }
/* E1: the mode tag never under 14 px */
@media (max-width: 1023px) { .oo-issue .r-modetag { font-size: 14px; } }
