/* Ashra Ala Ashra (عشرة على عشرة) · 7arif daily quiz, retro magazine look.
   Base look comes from ../retro/kit.css (linked first); this file only lays out the quiz column:
   question number in Lalezar + category panel kicker, options as print buttons, right = lime clipping, wrong = red stamp,
   score sticker on the back page. Desktop (>= 1024 px): the cover on one side, the issue contents / answers on the other. */


/* ---- cover + issue strip ---- */
.q-cover { margin-top: 4px; }
.q-issue { padding: 4px 0; margin-bottom: 10px; }
.q-issue__mid { flex: 1 1 auto; text-align: center; min-width: 0; }
.q-issue__row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.q-issue .r-issue__meta { margin-top: 1px; }

/* ---- progress: ten small print boxes ---- */
.q-dots { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.q-dots .dot { height: 26px; display: grid; place-items: center; border: 1.5px dashed rgba(26,26,26,.45); background: var(--paper-2); color: var(--ink-soft);
               font: 800 12px/1 var(--font-ui); }
.q-dots .dot.cur { border: 2px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.q-dots .dot.ok { border: 2px solid var(--ink); background: var(--lime); color: var(--ink); font-size: 15px; }
.q-dots .dot.bad { border: 2px solid var(--red); background: var(--red); color: var(--paper-clip); font-size: 15px; }

/* ---- the question column ---- */
.q-head { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; }
.q-num { display: flex; flex-direction: column; justify-content: flex-end; }
.q-kicker { margin: 0; }
.q-num__of { display: block; font-family: var(--font-display); line-height: .9; color: var(--ink); white-space: nowrap; }
.q-num__of b { font-weight: 400; font-size: 76px; color: var(--red-ink); }
.q-num__of small { font-size: 30px; color: var(--ink); }
.q-panel { flex: 0 0 auto; width: 112px; box-shadow: var(--shadow-hard); }
.q-panel .r-panel { min-height: 0; aspect-ratio: 1; }
.q-panel .r-panel__art { padding: 10% 14% 4%; }
.q-panel .r-panel__ico { width: 54cqi; }
.q-num .r-kicker { order: -1; }
.q-text { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.35; margin: 12px 0 14px; padding-top: 10px;
          border-top: 3px solid var(--ink); }
html[lang="en"] .q-text { line-height: 1.25; }

.q-opts { display: grid; gap: 12px; }
.q-opt { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 12px; text-align: start;
         border: 2px solid var(--ink); border-radius: 2px; background: var(--paper-clip); color: var(--ink); box-shadow: var(--shadow-hard);
         font: 800 17px/1.5 var(--font-ui); transition: translate 60ms; touch-action: manipulation; }
.q-opt:not(:disabled):is(:active, .is-pressed) { translate: 2px 2px; box-shadow: 1px 1px 0 var(--ink); }   /* same property as feel.js .is-pressed: never 4 px */
@media (hover: hover) { .q-opt:not(:disabled):hover { background: #fff; } }
.q-opt .k { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); color: var(--paper-clip);
            font: 400 24px/1 var(--font-display); padding-top: 4px; }
html[lang="en"] .q-opt .k { padding-top: 0; font: 800 17px/1 var(--font-ui); }
.q-opt .v { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.q-opt:disabled { cursor: default; }
.q-opt.dim { opacity: .5; box-shadow: none; border-style: dashed; background: var(--paper-2); }
/* right = taped clipping, lime frame, tick seal (kit .r-clip); the kit draws its outline inside, keep the ink border */
.q-opt.right { padding-inline-end: 46px; }
.q-opt.right::after { top: 50%; margin-top: -13px; inset-inline-end: 10px; }   /* the seal inside the card */
.q-opt.right .k { background: var(--lime); color: var(--ink); border: 2px solid var(--ink); }
.q-opt.right .v { font-weight: 900; }
/* wrong = red hatched card + big stamp */
.q-opt.wrong { border-color: var(--red); box-shadow: 3px 3px 0 var(--red); padding-inline-end: 96px; overflow: visible;
               background-color: #F7D4CF; background-image: repeating-linear-gradient(-45deg, rgba(215,38,46,.09) 0 6px, transparent 6px 13px); }
.q-opt.wrong .k { background: var(--red); }
.q-opt.wrong .v { color: var(--red-ink); text-decoration: line-through; text-decoration-thickness: 2px; }
.q-stamp { position: absolute; inset-inline-end: 8px; top: 50%; margin-top: -21px; font-size: 24px; pointer-events: none; }
html[lang="en"] .q-stamp { font-size: 30px; }   /* the kit draws "WRONG" at .8em: 24 px, the Lalezar floor */

.q-explain { margin-top: 14px; background: var(--paper-clip); border: 1.5px dashed var(--ink); padding: 10px 12px; font: 700 16px/1.6 var(--font-ui); }
.q-explain b { display: inline-block; background: var(--lime); color: var(--ink); border: 2px solid var(--ink); padding: 0 8px; margin-inline-end: 6px;
               font: 400 24px/1.2 var(--font-display); padding-top: 3px; transform: rotate(-3deg); }
.q-explain.bad b { background: var(--red-ink); color: #fff; border-color: var(--red-ink); }
.q-next { margin-top: 14px; }
.q-next .r-btn { width: 100%; }
/* phones: once answered, the next button stays on screen at the bottom (rule 17: primary actions in the bottom 40 %) */
@media (max-width: 1023px) { .q-next { position: sticky; bottom: 0; z-index: 3; margin-inline: -10px; padding: 8px 10px calc(8px + var(--ib));
  background: var(--paper); border-top: 2px solid var(--ink); } }

/* ---- the back page: score sticker, verdict, ten tiles, share ---- */
.q-result { text-align: center; padding-top: 2px; }
.q-result__kicker { margin: 0 0 6px; }
.q-result__top { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.q-result__head { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.2; margin: 0; flex: 1 1 160px; padding-top: 4px; }
.q-tiles { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; padding: 10px 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.q-tiles i { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-style: normal; border: 2px solid var(--ink); font-size: 18px; }
.q-tiles i span { position: absolute; top: 1px; inset-inline-start: 3px; font: 800 9px/1 var(--font-ui); }
.q-tiles i.ok { background: var(--lime); color: var(--ink); }
.q-tiles i.bad { border-color: var(--red); color: var(--red-ink); background-color: #F7D4CF;
                 background-image: repeating-linear-gradient(-45deg, rgba(215,38,46,.18) 0 4px, transparent 4px 8px); }
.q-result .r-btn { min-width: 0; }
.q-result .q-tiles { margin-bottom: 4px; }
.q-another { width: 100%; margin-top: 14px; }
.q-result .r-btn svg { font-size: 20px; }

/* ---- side column: the issue contents while playing, the answers on the back page ---- */
.q-side { margin-top: 16px; }
.q-contents { display: none; }
.q-side__head { margin: 0 0 6px; border-top-color: var(--paper); border-bottom-color: var(--paper); color: var(--paper); }
.q-side__head .r-issue__title { color: var(--paper); margin: 0; font-weight: 400; }
.q-review, .q-contents { background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-navy); padding: 12px 14px 14px; }
.q-review .q-side__head, .q-contents .q-side__head { border-top-color: var(--ink); border-bottom-color: var(--ink); color: var(--ink); }
.q-review .r-issue__title, .q-contents .r-issue__title { color: var(--ink); }

.q-rlist { list-style: none; margin: 0; padding: 0; }
.q-rlist li { display: grid; grid-template-columns: 30px 1fr 30px; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1.5px solid var(--ink); }
.q-rlist li:last-child { border-bottom: 0; }
.q-rlist__n { font-size: 26px; line-height: 1; padding-top: 4px; text-align: center; }
.q-rlist .rq { font-weight: 800; font-size: 16px; line-height: 1.6; }
.q-rlist .ra { font-size: 16px; font-weight: 600; line-height: 1.6; color: var(--ink-meta); margin-top: 2px; }
.q-rlist .ra b { color: var(--ink); font-weight: 800; }
.q-rlist .ra.yours s { color: var(--red-ink); font-weight: 800; text-decoration-thickness: 2px; }
.q-rlist .mk { width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--ink); font-size: 16px; margin-top: 2px; }
.q-rlist li.ok .mk { background: var(--lime); }
.q-rlist li.bad .mk { background: var(--red); color: var(--paper-clip); border-color: var(--red); }
.q-rlist li.bad .q-rlist__n { color: var(--red-ink); }

.q-toc { list-style: none; margin: 0; padding: 0; }
.q-toc li { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1.5px solid var(--ink); }
.q-toc li:last-child { border-bottom: 0; }
.q-toc__n { font-size: 24px; text-align: center; padding-top: 4px; }
.q-toc__k { font-weight: 800; font-size: 16px; }
.q-toc__m { width: 26px; height: 26px; display: grid; place-items: center; font-size: 15px; }
.q-toc li.cur { background: var(--yellow); }
.q-toc li.ok .q-toc__m { background: var(--lime); border: 2px solid var(--ink); }
.q-toc li.bad .q-toc__m { background: var(--red); color: var(--paper-clip); }
.q-toc li.bad .q-toc__k { color: var(--red-ink); text-decoration: line-through; }
.q-toc li:not(.cur):not(.ok):not(.bad) { color: var(--ink-soft); }

/* ---- help sheet ---- */
.q-sheet__title { font-size: 30px; margin: 0 0 4px; }
.q-sheet__tag { font-weight: 800; font-size: 16px; line-height: 1.6; margin: 0 0 12px; }
.q-howto { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.q-howto li { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: start; font-weight: 700; font-size: 16px; line-height: 1.6; }
.q-howto__n { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: var(--paper-clip); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
              display: grid; place-items: center; font: 400 24px/1 var(--font-display); padding-top: 4px; }
html[lang="en"] .q-howto__n { padding-top: 0; font: 800 17px/1 var(--font-ui); }
.q-sheet__fine { font-size: 16px; line-height: 1.6; font-weight: 600; color: var(--ink-soft); margin: 0 0 14px; }
.q-sheet__go { width: 100%; }
html.sheet-open, html.sheet-open body { overflow: hidden; }

/* ---- narrow phones ---- */
@media (max-width: 359px) {
  .q-panel { width: 92px; }
  .q-num__of b { font-size: 62px; }
  .q-opt { font-size: 16px; gap: 8px; }
  .q-dots .dot { height: 22px; font-size: 11px; }
  .q-result__head { font-size: 27px; }
}

/* ---- short phones (360x640 class): a one-line head (number + the category panel as a chip), so the four options start
   in the bottom half and all four fit on screen. iPhone SE class (<= 600 px tall): the ten progress boxes and the date
   go too (the head's "3/10" says where you are). ---- */
@media (max-width: 1023px) and (max-height: 760px) {
  .q-issue { margin-bottom: 6px; padding: 2px 0; }
  .q-dots { margin-bottom: 8px; }
  .q-dots .dot { height: 22px; }
  .q-head { align-items: center; }
  .q-num { flex-direction: row; align-items: baseline; gap: 10px; }
  .q-num .r-kicker { order: 0; }
  .q-num__of b { font-size: 44px; }
  .q-num__of small { font-size: 24px; }
  .q-panel { width: auto; max-width: 62%; }
  .q-panel .r-panel { flex-direction: row; aspect-ratio: auto; min-height: 0; height: 44px; container-type: normal; }
  .q-panel .r-panel__art { flex: 0 0 44px; padding: 5px; }
  .q-panel .r-panel__ico { width: 32px; max-width: none; }
  .q-panel .r-panel__art img { max-height: 32px; max-width: 34px; height: auto; width: auto; }
  .q-panel .r-band { display: flex; align-items: center; font-size: 14px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .q-text { margin: 8px 0 10px; padding-top: 8px; }
  .q-opts { gap: 10px; }
}
@media (max-width: 1023px) and (max-height: 600px) {
  .q-dots, .q-issue .r-issue__meta { display: none; }
  .q-issue { padding: 0; margin-bottom: 4px; }
  .q-text, html[lang="en"] .q-text { margin: 6px 0 8px; padding-top: 6px; font: 800 19px/1.4 var(--font-ui); }   /* Cairo: Lalezar stays >= 24 px */
  .q-num__of b { font-size: 38px; }
  .q-cover { margin-top: 0; }
  .q-cover .r-cover__rule { padding-top: 4px; }
  .q-panel .r-panel { height: 40px; }
  .q-panel .r-panel__art { flex-basis: 40px; }
  .q-opts { gap: 8px; }
}

/* ---- desktop: a two-page spread ---- */
@media (min-width: 1024px) {
  .q-spread { grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 32px; }
  .q-cover .r-cover__rule { padding: 14px 22px 22px; }
  .q-panel { width: 150px; }
  .q-num__of b { font-size: 104px; }
  .q-num__of small { font-size: 38px; }
  .q-text { font-size: 28px; }
  html[lang="en"] .q-text { font-size: 27px; }
  .q-opts { grid-template-columns: 1fr 1fr; gap: 14px; }
  .q-opt { min-height: 76px; }
  .q-side { margin-top: 4px; position: sticky; top: 16px; }
  .q-contents { display: block; }
  .q-contents.hidden { display: none; }
  .q-review { transform: none; }
  .q-result__head { font-size: 38px; }
}

/* finished: the ten tiles on the back page replace the progress row; the help "?" reads as "؟" in Arabic */
.q-finished .q-dots { display: none; }
.q-help { position: fixed; inset: 0; z-index: 40; }
/* the English name after a player's Arabic name in a sentence (owner 2026-11-12) */
.q-en { font-family: var(--font-ui); font-weight: 700; font-size: .82em; opacity: .8; white-space: nowrap; }
/* very short phones, Arabic: the question can carry a player's English name too, keep the four options on screen */
@media (max-width: 1023px) and (max-height: 600px) {
  html[lang="ar"] .q-opts { gap: 6px; }
  html[lang="ar"] .q-text .q-en { font-size: .75em; }
}

/* ---- UI sweep 2026-11-16 (P2-gamesB) ----
   short phones: the category chip shrinks with the line (its name ellipsized) instead of pushing the page wider
   (320 x 568 English, "Question 6/10" + "Champions League" overflowed by 4 px) */
@media (max-width: 1023px) and (max-height: 760px) {
  .q-head { min-width: 0; }
  .q-num { flex: 0 0 auto; }
  .q-panel { flex: 0 1 auto; min-width: 0; }
  .q-panel .r-panel { min-width: 0; max-width: 100%; }
  .q-panel .r-band { flex: 1 1 auto; min-width: 0; }
}
/* E2: the English name in a sentence: full ink-meta, no opacity */
.q-en { opacity: 1; color: var(--ink-meta); }
.q-text .q-en { color: inherit; }
/* B3: with end.js the score's ■ □ shape sits under the verdict, so the ten tiles above the back page step aside */
.q-result:has(#endBox .r-end) #emojiRow { display: none; }
/* P3 cold CLS: the progress dots are written by game.js; the empty row keeps a dot's height so the question card under
   it does not move down 22-26 px when they land (quiz en CLS 0.098 on slow 4G) */
.q-dots:empty { min-height: 26px; }
@media (max-width: 359px) { .q-dots:empty { min-height: 22px; } }
@media (max-width: 1023px) and (max-height: 760px) { .q-dots:empty { min-height: 22px; } }
