/* Own Games - shared look.
   Nov 29: follows Mendy's redesign boards (Play step, Quiz question, Quiz results, Practice round):
   light page #F4F6FB, navy #1E2A5E, gold #F5B301, white cards with a navy border and a gold "step" shadow,
   Baloo 2 for headings and main buttons, Nunito for everything else, every button at least 48 px tall.
   Each game keeps its own play in the middle. */
@font-face { font-family: "og-n"; src: url("../fonts/Nunito-Regular.ttf"); font-weight: 400; }
@font-face { font-family: "og-n"; src: url("../fonts/Nunito-ExtraBold.ttf"); font-weight: 800; }
@font-face { font-family: "og-n"; src: url("../fonts/Nunito-Black.ttf"); font-weight: 900; }
/* Baloo 2 (free OFL font, from Google Fonts, added Dec 1): headings and main buttons, as on the boards. One file holds all its weights. */
@font-face { font-family: "og-b"; src: url("../fonts/Baloo2-wght.ttf"); font-weight: 400 800; }
@font-face { font-family: "og-he"; src: url("../fonts/vilna.ttf"); unicode-range: U+0590-05FF, U+FB1D-FB4F; }

:root {
  --navy: #1E2A5E; --gold: #F5B301; --gold-d: #C68F00; --page: #F4F6FB; --card: #FFFFFF; --line: #DCE2EF; --track: #E6EAF4;
  --muted: #56607F; --ink: #1E2A5E; --cream: #FFF8E1; --pick: #FFF4D1;
  --good: #0F7F5E; --good-bg: #E3F4EC; --bad: #B42318; --bad-bg: #FDECEA; --bad-ink: #8A1C12; --soft: #E9826F; --soft-bg: #FFF8F5;
  --blue: #2C6FD1;
  /* one colour per game, as on the Play board */
  --g-timed: #4B2BB3; --g-quiz: #0E7C86; --g-gameshow: #C73D63; --g-maze: #2F6BD8; --g-wheel: #B9530F; --g-winlose: #187A49;
  --head: "og-he", "og-b", "og-n", "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --body: "og-he", "og-n", "Segoe UI", system-ui, sans-serif;
  --r: 18px;
  --fs: clamp(15px, 2.1vmin + 0.35vw, 24px);
  --btn: max(48px, 2.6em); /* smallest height of anything you can tap */
}
html, body { margin: 0; height: 100%; background: var(--page); }
body { overflow: hidden; -webkit-tap-highlight-color: transparent; }
* { box-sizing: border-box; }

.og-root { position: relative; height: 100vh; height: 100dvh; width: 100%; display: flex; flex-direction: column;
  font: 800 var(--fs)/1.3 var(--body); color: var(--navy); background: var(--page);
  user-select: none; -webkit-user-select: none; overflow: hidden; touch-action: manipulation; }
.og-root:fullscreen { height: 100%; }
.og-root button { font-family: var(--body); }

/* Hebrew: never bold, own font, right-to-left inside English lines */
.og-q, .og-a, .og-feedback, .og-review { direction: ltr; }
.og-root .he { font-family: "og-he", serif; font-weight: 400 !important; font-size: 1.12em; unicode-bidi: isolate; }

/* Top bar: the site header look (navy with a gold line) */
.og-top { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px; font-size: max(15px, .8em);
  background: var(--navy); border-bottom: 4px solid var(--gold); color: #fff; }
.og-title { font: 800 1.05em/1.1 var(--head); color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; letter-spacing: .3px; }
.og-pill { background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 14px; font-weight: 800; white-space: nowrap; min-height: 36px; display: flex; align-items: center; gap: .35em; }
.og-pill b { color: var(--gold); font-weight: 900; }
.og-ico { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: transparent; color: #fff; cursor: pointer;
  display: grid; place-items: center; padding: 0; text-decoration: none; }
.og-ico:hover { background: rgba(255,255,255,.16); }
.og-ico svg { width: 24px; height: 24px; fill: currentColor; }
.og-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.og-clock { font-variant-numeric: tabular-nums; min-width: 3.6em; justify-content: center; }
/* phone: no title and no full-screen button (phones don't offer it), so the bar stays on one line */
@media (max-width: 620px) { .og-title, .og-fs { display: none; } .og-top { justify-content: space-between; gap: 4px; padding: 6px; font-size: 14px; } .og-pill { padding: 6px 9px; } .og-clock { min-width: 0; }
  /* the maze has one more thing in the bar (hearts): on a phone its clock is left out so the bar stays on one line; the time still shows at the end */
  .og-tight .og-clock { display: none !important; }
  /* games with the "i" button and a "Question 3 of 10" line on the card: on a phone the "3 of 10" pill is left out, so the bar stays on one line */
  .og-cardprog .og-prog { display: none !important; } }
/* very narrow phones (320-380 px): the top bar must stay on ONE line (Dec 2). The count-up clock is left out (the time
   still shows at the end; the Gameshow keeps its time bar on the card) and the pills get tighter. Speed Quiz shows
   "Question N of 10" on its get-ready card, so its "N of 10" pill goes too. Every button stays 48 px. */
@media (max-width: 380px) {
  .og-top { gap: 3px; padding: 6px 4px; font-size: 13px; }
  .og-pill { padding: 6px 7px; }
  .og-clock { display: none !important; }
  .og-tight .og-score { display: none !important; } /* Maze (hearts in the bar): the tick count shows at the end */
}
@media (max-width: 400px) { .og-tq .og-prog { display: none !important; } }

/* Generic blocks */
.og-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 16px; gap: 14px; min-height: 0; overflow: auto; }
.og-center > * { flex: none; }
.og-center > :first-child { margin-top: auto; } .og-center > :last-child { margin-bottom: auto; }
.og-big { font: 800 2em/1.05 var(--head); color: var(--navy); }
.og-sub { font-weight: 800; color: var(--muted); max-width: 34em; }
.og-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }

/* Buttons. Main = gold with a darker gold step. Second = white with a grey line. Both at least 48 px. */
.og-btn { font: 800 1.05em/1.1 var(--head); border: 0; border-radius: 16px; padding: 12px 26px; cursor: pointer; color: var(--navy);
  background: var(--gold); box-shadow: 0 5px 0 var(--gold-d); transition: transform .08s; min-height: var(--btn); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.og-root .og-btn { font-family: var(--head); }
.og-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-d); }
.og-btn.alt { font: 800 .9em/1.1 var(--body); background: #fff; border: 2px solid var(--line); border-radius: 14px; box-shadow: none; padding: 10px 20px; }
.og-root .og-btn.alt { font-family: var(--body); }
.og-btn.alt:hover { border-color: var(--navy); }
.og-btn.alt:active { transform: none; box-shadow: none; }
.og-btn:disabled { opacity: .45; cursor: default; }
.og-btn svg { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* The white card with the navy border and the gold step (question card, start card, end card) */
.og-card { background: var(--card); border: 3px solid var(--navy); border-radius: 26px; box-shadow: 0 8px 0 var(--gold); padding: clamp(14px, 2.6vmin, 28px) clamp(14px, 3vmin, 30px);
  display: flex; flex-direction: column; gap: clamp(10px, 1.8vmin, 18px); width: 100%; max-width: 62em; margin: 0 auto 8px; }
.og-card.mid { align-items: center; text-align: center; max-width: 44em; }
.og-step { display: flex; align-items: center; gap: 14px; font-size: max(14px, .75em); color: var(--muted); }
.og-step span { flex: none; }
.og-step div { flex: 1; height: 12px; border-radius: 999px; background: var(--track); overflow: hidden; }
.og-step i { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .3s; }

/* coloured square with the game's picture (Play board) */
.og-tile { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 5px 0 rgba(30,42,94,.18); }
.og-tile svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Question. On its own it is a small white card; inside .og-card it is just the words. */
.og-q { font-weight: 800; line-height: 1.35; text-align: left; background: var(--card); color: var(--navy); border: 2px solid var(--line); border-radius: var(--r);
  padding: .6em .9em; max-width: 62em; width: 100%; margin: 0 auto; }
.og-card .og-q { border: 0; border-radius: 0; padding: 0; background: none; font-size: 1.15em; }
.og-q .tag { display: inline-block; font-size: .65em; background: var(--blue); color: #fff; border-radius: 999px; padding: .2em .8em; margin-bottom: .35em; vertical-align: middle; }

/* Answers: white buttons in a column, as on the Quiz question board */
.og-ans { display: grid; gap: 12px; width: 100%; max-width: 62em; margin: 0 auto; grid-template-columns: 1fr; }
@media (min-aspect-ratio: 5/4) and (max-height: 820px) {
  .og-ans.n3:not(.long), .og-ans.n5:not(.long), .og-ans.n6:not(.long) { grid-template-columns: 1fr 1fr; }
  .og-ans.long { gap: 8px; }
}
/* Dec 2 (Chananya): 4 answers are ALWAYS 2 over 2, and 2 answers ALWAYS side by side, on every screen */
.og-ans.n2, .og-ans.n4 { grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) {
  .og-ans.n2, .og-ans.n4 { gap: 8px; }
  .og-ans.n2 .og-a, .og-ans.n4 .og-a { padding: .4em 10px; gap: 4px 8px; flex-wrap: wrap; border-radius: 14px; }
  .og-ans.n2 .og-a .m, .og-ans.n4 .og-a .m { white-space: normal; }
}
@media (max-width: 360px) { .og-ans.n2 .og-a .m, .og-ans.n4 .og-a .m { font-size: 12px; gap: 3px; } .og-ans.n2 .og-a .m svg, .og-ans.n4 .og-a .m svg { width: 16px; height: 16px; } }
.og-a { font: 800 1em/1.25 var(--body); color: var(--navy); background: #fff; border: 3px solid var(--line); border-radius: 18px; cursor: pointer;
  padding: .45em 22px; min-height: max(48px, 2.9em); display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; transition: opacity .2s; }
.og-ans.long .og-a { min-height: max(48px, 2.4em); padding-top: .3em; padding-bottom: .3em; }
.og-a:hover:not(:disabled), .og-a:focus-visible { border-color: var(--navy); background: var(--pick); box-shadow: 0 4px 0 var(--gold); outline: none; }
.og-a:disabled { cursor: default; }
.og-a .k { display: none; }
.og-a .t { flex: 1; min-width: 0; overflow-wrap: break-word; }
.og-a .m { flex: none; display: none; align-items: center; gap: 6px; font-size: max(14px, .7em); white-space: nowrap; }
.og-a .m svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.og-a.ok { border-color: var(--good); background: var(--good-bg); color: var(--navy); }
.og-a.ok .m { display: flex; width: 30px; height: 30px; border-radius: 50%; background: var(--good); color: #fff; justify-content: center; }
.og-a.ok .m svg { width: 18px; height: 18px; }
.og-a.bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad-ink); }
.og-a.bad .m { display: flex; }
.og-a.dim { background: var(--page); color: var(--muted); }
.og-a.gone { visibility: hidden; }
.og-a.cover { background: var(--track) !important; border-style: dashed; color: transparent; }
.og-a.cover .t { visibility: hidden; }

/* Dec 2 (Chananya): coloured answer tiles with a letter badge in every game, the same colours as the Speed Quiz
   (A pink, B teal, C gold, D purple, E green, F blue). Right = green with a tick, wrong pick = red, the rest faded. */
.og-a { color: #fff; border: 0; box-shadow: 0 5px 0 rgba(30,42,94,.22); justify-content: flex-start; padding-left: 12px; padding-right: 14px; }
.og-a.c0 { background: #C73D63; } .og-a.c1 { background: #0E7C86; } .og-a.c2 { background: #F5B301; color: var(--navy); }
.og-a.c3 { background: #4B2BB3; } .og-a.c4 { background: #187A49; } .og-a.c5 { background: #2F6BD8; }
.og-a .k { display: inline-grid; place-items: center; flex: none; width: 1.75em; height: 1.75em; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--navy); font: 800 .85em/1 var(--body); }
.og-a:hover:not(:disabled), .og-a:focus-visible { background-image: linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)); box-shadow: 0 5px 0 rgba(30,42,94,.35); border: 0; outline: 3px solid var(--navy); outline-offset: 2px; }
.og-a:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 rgba(30,42,94,.3); }
.og-a .m { margin-left: auto; }
.og-a.ok { background: var(--good); color: #fff; outline: 4px solid #fff; box-shadow: 0 0 0 8px var(--good); }
.og-a.ok .m { background: #fff; color: var(--good); }
.og-a.bad { background: var(--bad); color: #fff; }
.og-a.dim { opacity: .35; filter: grayscale(.6); color: #fff; } .og-a.c2.dim { color: var(--navy); }
.og-a.cover { box-shadow: none; border: 3px dashed var(--line); }
.og-a.cover .k { visibility: hidden; }
/* phones: in the 2-column tiles the letter sits on top and the words get the whole width (no words broken in half) */
@media (max-width: 620px) {
  .og-ans.n2 .og-a, .og-ans.n4 .og-a { flex-direction: column; align-items: flex-start; justify-content: center; flex-wrap: nowrap; gap: 4px; }
  .og-ans.n2 .og-a .t, .og-ans.n4 .og-a .t { flex: none; width: 100%; }
  .og-ans.n2 .og-a .m, .og-ans.n4 .og-a .m { margin-left: 0; }
  .og-ans.n2 .og-a .k, .og-ans.n4 .og-a .k { width: 1.5em; height: 1.5em; }
}

/* Short message in the middle (right / keep going) */
.og-toast, .og-stamp { position: absolute; left: 50%; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; z-index: 31; text-align: center;
  transition: transform .22s cubic-bezier(.2,1.6,.4,1), opacity .2s; background: #fff; border: 3px solid var(--line); border-radius: 20px; padding: 10px 22px;
  font: 800 1.5em/1.1 var(--head); box-shadow: 0 6px 0 rgba(30,42,94,.12); max-width: 92%; }
.og-toast { top: 42%; z-index: 30; white-space: nowrap; }
.og-stamp { top: 14%; display: flex; align-items: center; gap: 12px; }
.og-toast.show, .og-stamp.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.og-toast.good, .og-stamp.good { border-color: var(--good); background: var(--good-bg); color: var(--good); }
.og-toast.soft, .og-stamp.soft { border-color: var(--soft); background: var(--soft-bg); color: var(--bad-ink); }
.og-toast small { display: block; font: 800 .5em var(--body); }
.og-stamp i { flex: none; width: 1.5em; height: 1.5em; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; }
.og-stamp.good i { background: var(--good); } .og-stamp.soft i { background: var(--bad); }
.og-stamp i svg { width: 60%; height: 60%; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.og-stamp small { font: inherit; }

.og-feedback { text-align: center; font-weight: 900; font-size: 1.1em; min-height: 1.4em; }
.og-feedback.good { color: var(--good); } .og-feedback.soft { color: var(--bad-ink); }
.og-feedback .ans { display: block; font-weight: 800; font-size: .8em; color: var(--navy); }

/* Timer bar */
.og-timer { height: 12px; background: var(--track); border-radius: 999px; overflow: hidden; width: 100%; max-width: 62em; margin: 0 auto; flex: none; }
.og-timer > div { height: 100%; width: 100%; background: var(--gold); transform-origin: left; }

.og-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 25; }

/* pause */
.og-pause { position: absolute; inset: 0; z-index: 40; background: rgba(244,246,251,.96); display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; }

/* "How it works" (the "i" button): a card over the game */
.og-infobox { justify-content: flex-start; overflow: auto; padding: 16px; }
.og-infobox > .og-card { margin: auto; max-width: 36em; }
.og-how { text-align: left; font-weight: 400; font-size: max(15px, .85em); line-height: 1.45; color: var(--navy); }
.og-how ul { margin: 0; padding-left: 1.2em; } .og-how li { margin: .35em 0; } .og-how b { font-weight: 800; }
.og-i { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--navy); color: #fff; font: 800 .85em/1 Georgia, serif; font-style: italic; }
.og-note { font-size: .85em; }
.gs-lb.off { background: #9AA3BD; box-shadow: none; }

/* bottom bar: "3 of 10" with arrows */
.og-nav { flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 800; padding: 2px 0 8px; color: var(--muted); font-size: max(15px, .8em); }
.og-nav button { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: #fff; color: var(--navy); font: 900 16px var(--body); cursor: pointer; }
.og-nav button:hover:not(:disabled) { border-color: var(--navy); }
.og-nav button:disabled { opacity: .35; cursor: default; }

/* End of a game (Quiz results board) */
.og-cup { width: 88px; height: 88px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 0 var(--gold-d); flex: none; }
.og-cup svg { width: 46px; height: 46px; fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.og-card.mid .og-big { font-size: clamp(30px, 2em, 48px); }
.og-done { display: flex; flex-wrap: wrap; gap: 16px; width: 100%; max-width: 620px; justify-content: center; }
.og-done div { flex: 1 1 180px; display: flex; flex-direction: column; align-items: center; background: var(--page); border: 3px solid var(--line); border-radius: 20px; padding: 12px 20px; }
.og-done div:first-child { background: var(--good-bg); border-color: var(--good); }
.og-done span { font-size: 13px; font-weight: 800; letter-spacing: .8px; color: var(--muted); text-transform: uppercase; }
.og-done b { font: 800 clamp(34px, 2.4em, 56px)/1.05 var(--head); }
.og-done b small { font-size: .55em; color: var(--muted); }
.og-review { text-align: left; width: 100%; max-width: 44em; font-size: max(15px, .8em); background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 6px 18px; margin: 0 auto 8px; }
.og-review > div { padding: 10px 0; border-bottom: 2px dashed var(--line); }
.og-review > div:last-child { border-bottom: 0; }
.og-review b { font-weight: 900; }
.og-review .yours, .og-review .right { display: block; font-weight: 800; padding-left: 1.4em; }
.og-review .ok .yours { color: var(--good); } .og-review .no .yours { color: var(--bad-ink); } .og-review .right { color: var(--navy); }

@media (max-width: 520px) { .og-card { border-radius: 20px; } }
