@font-face { font-family: Marhey; src: url(/fonts/Marhey.woff2) format("woff2"), url(/fonts/Marhey.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Readex; src: url(/fonts/ReadexPro.woff2) format("woff2"), url(/fonts/ReadexPro.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Caveat; src: url(/fonts/CaveatBrush-Regular.woff2) format("woff2"), url(/fonts/CaveatBrush-Regular.ttf) format("truetype"); font-display: swap; }

:root {
  --paper: #FBF6EA; --rule: #BFD3F2; --margin: #F2A7A7; --ink: #1F2433; --ink2: #6B7084;
  --note: #FFE66D; --hl: rgba(255, 214, 10, .55); --card: rgba(255, 255, 255, .6);
  --blue: #2457D6; --red: #E5484D; --green: #22A861; --orange: #F08C00;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161B2E; --rule: #2A3354; --margin: #5C2E4A; --ink: #EEF0FF; --ink2: #9CA5CC;
    --note: #F2CF4A; --hl: rgba(255, 60, 172, .45); --card: rgba(255, 255, 255, .05);
  }
}
:root[data-theme="dark"] {
  --paper: #161B2E; --rule: #2A3354; --margin: #5C2E4A; --ink: #EEF0FF; --ink2: #9CA5CC;
  --note: #F2CF4A; --hl: rgba(255, 60, 172, .45); --card: rgba(255, 255, 255, .05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 18px/1.8 Readex, system-ui, Tahoma, sans-serif;
  background: repeating-linear-gradient(var(--paper) 0 31px, var(--rule) 31px 32px) var(--paper);
  transition: background-color .3s, color .3s;
}
.margin { position: fixed; top: 0; bottom: 0; inset-inline-start: 44px; width: 2px; background: var(--margin); opacity: .8; }
main { max-width: 1040px; margin: 0 auto; padding: 0 22px 60px; position: relative; }
h1, h2, h3 { font-family: Marhey, Readex, sans-serif; line-height: 1.3; margin: 0; }
[lang="en"] body, [lang="en"] h1, [lang="en"] h2, [lang="en"] h3 { font-family: Readex, system-ui, sans-serif; }
[lang="en"] h1, [lang="en"] h2, [lang="en"] h3 { font-weight: 700; }
a { color: var(--blue); }
.hl { background: linear-gradient(transparent 40%, var(--hl) 40% 88%, transparent 88%); padding: 0 4px; }
.muted { color: var(--ink2); font-size: 15px; }

header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; gap: 10px; flex-wrap: wrap; }
header nav { display: flex; align-items: center; gap: 14px; }
header nav a { color: var(--ink2); text-decoration: none; font-size: 16px; }
header nav a:hover { color: var(--ink); }
.chip {
  border: 2px solid var(--ink); background: var(--card); color: var(--ink); border-radius: 10px;
  padding: 2px 10px; font: 600 15px Readex, sans-serif; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 50px; height: 50px; border-radius: 14px; box-shadow: 0 4px 10px rgba(0, 0, 0, .15); }
.logo { font-family: Caveat, sans-serif; font-size: 40px; letter-spacing: 1px; }
.logo span:nth-child(1) { color: var(--red); } .logo span:nth-child(2) { color: var(--blue); }
.logo span:nth-child(3) { color: var(--green); } .logo span:nth-child(4) { color: var(--orange); }

.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; padding: 26px 0 40px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); }
.lead { font-size: 20px; color: var(--ink2); margin: 14px 0 26px; }
.live {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 2px 14px;
  border-radius: 99px; background: var(--card); border: 2px solid var(--ink); font-size: 15px;
}
/* the counter's place is kept while it loads, so nothing jumps when it shows */
.live[hidden] { display: inline-flex; visibility: hidden; }
.live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }
.cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.play {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 18px; background: #1F2433; color: #fff;
  border-radius: 14px; text-decoration: none; box-shadow: 5px 6px 0 var(--note); transform: rotate(-1deg);
  transition: transform .15s;
}
.play:hover { transform: rotate(0) translateY(-2px); }
.play svg { width: 30px; height: 30px; }
.play span { display: flex; flex-direction: column; line-height: 1.2; }
.play small { font-size: 12px; opacity: .8; }
.play b { font-size: 22px; font-family: Readex, sans-serif; }
.free { color: var(--ink2); font-size: 15px; }

.yazo-wrap { position: relative; justify-self: center; }
.yazo { width: 200px; height: auto; transform: rotate(4deg); animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .18)); }
@keyframes bob { 50% { transform: rotate(-2deg) translateY(-8px); } }
.pupil { transition: transform .08s linear; }
.bubble {
  position: absolute; top: 0; inset-inline-end: -40px; background: var(--note); color: #2A2410; padding: 8px 16px;
  font-family: Marhey, sans-serif; border: 2px solid #1F2433; border-radius: 16px 16px 16px 4px; transform: rotate(-4deg);
}

section { padding: 34px 0; }
section h2 { font-size: 34px; margin-bottom: 22px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; }
.game {
  background: var(--card); border: 2px solid var(--ink); border-radius: 6px 14px 8px 12px; padding: 14px;
  box-shadow: 0 8px 18px rgba(60, 45, 20, .14); transition: transform .2s; position: relative;
}
.game:nth-child(odd) { transform: rotate(-.8deg); } .game:nth-child(even) { transform: rotate(.7deg); }
.game:hover { transform: rotate(0) translateY(-6px); }
.game img { width: 100%; aspect-ratio: 9 / 13; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--rule); background: #FBF6EA; }
.game h3 { font-size: 26px; margin: 10px 0 2px; }
.game p { margin: 0; color: var(--ink2); font-size: 16px; }
.game.new::after {
  content: attr(data-new); position: absolute; top: -12px; inset-inline-end: 14px; background: var(--red); color: #fff;
  padding: 0 12px; border-radius: 99px; font: 700 14px/1.8 Readex, sans-serif; transform: rotate(4deg);
}

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.note {
  background: var(--note); color: #2A2410; padding: 18px; border-radius: 2px 2px 2px 16px;
  box-shadow: 0 10px 18px -8px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 4px;
}
.note b { font-family: Marhey, sans-serif; font-size: 20px; }
[lang="en"] .note b { font-family: Readex, sans-serif; }
.n1, .n4 { transform: rotate(-1.4deg); } .n2, .n5 { transform: rotate(1deg); } .n3, .n6 { transform: rotate(-.4deg); }

footer { border-top: 2px dashed var(--rule); margin-top: 30px; padding-top: 16px; text-align: center; }

/* both languages live in the content pages; one shows */
html[lang="ar"] [data-lang="en"], html[lang="en"] [data-lang="ar"] { display: none !important; }

/* the menu: links in a row, or a ☰ sheet on a phone */
header nav .chips { display: inline-flex; gap: 8px; }
.menu-btn { display: none; font-size: 20px; padding: 2px 12px; }

/* content pages */
.crumbs { font-size: 14px; color: var(--ink2); margin: 0 0 6px; }
.crumbs a { color: var(--ink2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 4px; }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 5.5vw, 46px); margin: 4px 0 18px; }
.doc h2 { font-size: clamp(24px, 4vw, 30px); margin: 34px 0 10px; }
.doc h3 { font-size: 21px; margin: 22px 0 6px; }
.doc p, .doc li { font-size: 18px; }
.doc ul, .doc ol { padding-inline-start: 26px; }
.doc li { margin: 4px 0; }
.doc .lead { font-size: 20px; color: var(--ink2); }
.doc strong { background: linear-gradient(transparent 55%, var(--hl) 55% 90%, transparent 90%); }
.doc .tip {
  background: var(--note); color: #2A2410; padding: 14px 18px; margin: 18px 0; border-radius: 2px 2px 2px 16px;
  box-shadow: 0 10px 18px -8px rgba(0, 0, 0, .35); transform: rotate(-.5deg);
}
.doc .tip strong { background: none; }
.doc details {
  background: var(--card); border: 2px solid var(--ink); border-radius: 8px; padding: 8px 14px; margin: 10px 0;
}
.doc summary { cursor: pointer; font-weight: 700; }
.doc details p { margin: 8px 0 4px; }
.shot { float: inline-end; width: 220px; margin: 4px 0 16px; margin-inline-start: 24px; transform: rotate(1.5deg); }
.shot img { width: 100%; border: 2px solid var(--ink); border-radius: 12px; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .35); }
.get { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; clear: both; padding: 26px 0; }
.get p { margin: 0; color: var(--ink2); }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.mini {
  display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 2px solid var(--ink);
  border-radius: 6px 12px 8px 10px; padding: 10px; text-decoration: none; color: var(--ink); transition: transform .15s;
}
.mini:hover { transform: translateY(-4px) rotate(-.6deg); }
.mini img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--rule); }
.mini b { font-family: Marhey, Readex, sans-serif; font-size: 19px; }
[lang="en"] .mini b { font-family: Readex, sans-serif; }
.mini span { font-size: 14px; color: var(--blue); }
.posts { display: grid; gap: 16px; }
.post {
  display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 2px solid var(--ink);
  border-radius: 8px; padding: 16px 18px; text-decoration: none; color: var(--ink);
}
.post b { font-size: 21px; }
.post span { color: var(--ink2); font-size: 16px; }
.learn .minis { margin-bottom: 18px; }
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; }
.foot a { color: var(--ink2); text-decoration: none; font-size: 15px; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.game .more { display: inline-block; margin-top: 8px; font-size: 15px; text-decoration: none; }
.game h3 a { color: inherit; text-decoration: none; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  /* the notebook's red line stays clear of the text */
  .margin { inset-inline-start: 9px; }
  main { padding: 0 14px 50px; padding-inline-start: 24px; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .cta { justify-content: center; }
  .yazo { width: 150px; }
  .bubble { inset-inline-end: -20px; }
  header { padding: 12px 0; }
  .brand img { width: 42px; height: 42px; }
  .logo { font-size: 34px; }
  .menu-btn { display: inline-block; }
  header nav {
    display: none; flex-direction: column; align-items: stretch; gap: 0; width: 100%;
    background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 6px; margin-top: 4px;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .4);
  }
  .nav-open header nav { display: flex; }
  header nav a { padding: 10px 12px; border-radius: 8px; font-size: 17px; color: var(--ink); }
  header nav a:active { background: var(--hl); }
  header nav .chips { padding: 8px 12px 4px; }
  section h2 { font-size: 28px; }
  .games { grid-template-columns: 1fr; gap: 22px; }
  .why { grid-template-columns: 1fr; }
  .shot { float: none; width: min(240px, 70%); margin: 0 auto 18px; display: block; }
  .doc p, .doc li { font-size: 17px; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

a.chip { text-decoration: none; padding: 6px 16px; display: inline-block; }

/* article extras: byline, contents, figures, sharing, author */
.byline { color: var(--ink2); font-size: 15px; margin: -8px 0 18px; }
.byline a { color: var(--ink2); }
.toc {
  background: var(--card); border: 2px dashed var(--rule); border-radius: 10px; padding: 10px 16px; margin: 18px 0;
}
.toc b { font-family: Marhey, Readex, sans-serif; }
[lang="en"] .toc b { font-family: Readex, sans-serif; }
.toc ol { margin: 6px 0 0; }
.toc li { font-size: 16px; margin: 2px 0; }
.toc a { text-decoration: none; }
.doc h2[id] { scroll-margin-top: 16px; }
.fig { margin: 22px 0; text-align: center; }
.fig svg, .fig img {
  max-width: 100%; height: auto; background: var(--card); border: 2px solid var(--ink); border-radius: 10px;
  padding: 10px; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .3);
}
.fig svg { width: 100%; max-height: 420px; }
.fig img { max-height: 520px; width: auto; padding: 0; }
.fig figcaption { color: var(--ink2); font-size: 15px; margin-top: 8px; }
:root[data-theme="dark"] .fig svg { background: #FBF6EA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fig svg { background: #FBF6EA; } }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 30px 0 18px; clear: both; }
.share .chip { text-decoration: none; padding: 4px 12px; }
.share .wa { background: #25D366; color: #fff; border-color: #128C7E; box-shadow: 2px 2px 0 #128C7E; }
.share .copy.done { background: var(--green); color: #fff; }
.author {
  display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 2px solid var(--ink);
  border-radius: 12px; padding: 14px 16px; margin: 10px 0 0;
}
.author img { border-radius: 14px; flex: none; }
.author b { display: block; font-size: 18px; }
.author div { font-size: 16px; color: var(--ink2); }
.post small { color: var(--ink2); font-size: 13px; }

/* print and play */
.sheet {
  background: #fff; color: #1F2433; border: 2px solid var(--ink); border-radius: 8px; padding: 18px; margin: 20px 0;
}
.sheet-title { font-family: Caveat, Marhey, sans-serif; font-size: 26px; text-align: center; }
.sheet-foot { text-align: center; font-size: 12px; color: #6B7084; margin-top: 8px; direction: ltr; }
.sheet .board { display: block; width: 100%; max-width: 440px; margin: 6px auto 14px; }
.sheet .names { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 6px 18px; font-size: 15px; margin: 8px 0; }
.xo-grids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 460px; margin: 0 auto 12px; }
.xo-grids .board { margin: 0; }
.bank-sheet { width: 100%; border-collapse: collapse; font-size: 15px; }
.bank-sheet th, .bank-sheet td { border: 1.5px solid #1F2433; height: 38px; padding: 2px 6px; text-align: center; }
.bank-sheet th { background: #FFE66D; }
.bank-sheet .total td { font-weight: 700; text-align: end; }
.print-btn { border: 0; cursor: pointer; font: 600 18px Readex, sans-serif; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; color: #000; }
  .margin, header.site, footer, .noprint, .crumbs, .doc > h1, .get, .share, .author, .byline { display: none !important; }
  main { max-width: none; padding: 0; }
  .sheet { border: 0; margin: 0; padding: 0; }
  .sheet .board { max-width: 124mm; margin: 2mm auto 4mm; }
  .sheet .names { margin: 2mm 0; }
  .sheet-title { font-size: 22px; }
  .xo-grids { max-width: 110mm; }
  .sheet .board.dots { max-width: 112mm; }
  .bank-sheet td { height: 19mm; font-size: 18px; }
  .xo-grids .board { margin: 0; }
}

/* width/height attributes only reserve space; CSS decides the size */
.shot img, .mini img, .game img, .fig img { height: auto; }
@media (max-width: 760px) {
  .sheet { padding: 10px; overflow-x: auto; }
  .bank-sheet { font-size: 12px; }
  .bank-sheet th, .bank-sheet td { padding: 2px 3px; height: 32px; }
}

/* ===== notebook typography: text sits on the ruled lines, headings get a
   pen squiggle, lists get hand-drawn marks ===== */
:root {
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10'%3E%3Cpath d='M1 6 Q5.5 1 10 6 T20 6 T30 6 T39 6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --pen1: var(--blue); --pen2: var(--red); --pen3: var(--green); --pen4: var(--orange);
}
.doc { word-spacing: .03em; }
html[lang="en"] .doc { word-spacing: normal; hyphens: auto; }
.doc p, .doc li { line-height: 32px; text-wrap: pretty; }
.doc p { margin: 0 0 16px; }
h1, h2, h3 { text-wrap: balance; }

/* the title: a highlighter swipe across its lines */
.doc h1 > span {
  background: linear-gradient(transparent 60%, var(--hl) 60% 90%, transparent 90%);
  box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 6px;
}
/* the opening paragraph: a note in the margin */
.doc .lead {
  border-inline-start: 4px solid var(--margin); padding-inline-start: 16px; margin: 0 0 24px;
  font-size: 19px; line-height: 32px;
}
/* section headings: a pen squiggle under each, the pen changing colour */
.doc h2 { margin: 56px 0 14px; position: relative; }
.doc h2::after, section h2::after {
  content: ""; display: block; width: min(180px, 55%); height: 10px; margin-top: 6px;
  background: var(--pen1); -webkit-mask: var(--wave) repeat-x 0 0 / 40px 10px; mask: var(--wave) repeat-x 0 0 / 40px 10px;
}
.doc h2:nth-of-type(4n+2)::after, section:nth-of-type(4n+2) h2::after { background: var(--pen2); }
.doc h2:nth-of-type(4n+3)::after, section:nth-of-type(4n+3) h2::after { background: var(--pen3); }
.doc h2:nth-of-type(4n)::after, section:nth-of-type(4n) h2::after { background: var(--pen4); }
.doc h3 { margin: 30px 0 6px; }
.doc h3::before { content: "✎ "; color: var(--ink2); font-size: .85em; }

/* bullets: little hand-drawn rings; numbers: in a highlighter dot */
.doc ul { list-style: none; padding-inline-start: 30px; }
.doc ul > li { position: relative; }
.doc ul > li::before {
  content: ""; position: absolute; inset-inline-start: -22px; top: 11px; width: 9px; height: 9px;
  border: 2.5px solid var(--pen1); border-radius: 55% 45% 50% 40%; transform: rotate(-12deg);
}
.doc ul > li:nth-child(3n+2)::before { border-color: var(--pen2); transform: rotate(20deg); }
.doc ul > li:nth-child(3n)::before { border-color: var(--pen3); }
.doc ol { list-style: none; counter-reset: n; padding-inline-start: 38px; }
.doc ol > li { position: relative; counter-increment: n; }
.doc ol > li::before {
  content: counter(n); position: absolute; inset-inline-start: -36px; top: 3px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 50%; background: var(--note); color: #2A2410;
  font: 700 14px/1 Readex, sans-serif; transform: rotate(-6deg); box-shadow: 1px 2px 0 rgba(0, 0, 0, .15);
}
.toc ol > li::before { width: 22px; height: 22px; font-size: 12px; inset-inline-start: -32px; }
.toc ol { padding-inline-start: 34px; }

/* tips: a sticky note held by tape */
.doc .tip { position: relative; margin: 28px 4px; line-height: 30px; }
.doc .tip::before {
  content: ""; position: absolute; top: -11px; inset-inline-start: 28px; width: 74px; height: 22px;
  background: rgba(143, 196, 220, .65); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
}
/* FAQ: a pencil ring that turns into a minus */
.doc details { padding: 10px 16px; border-radius: 10px 14px 10px 12px; transition: box-shadow .2s; }
.doc details[open] { box-shadow: 3px 3px 0 var(--ink); }
.doc summary { list-style: none; display: flex; align-items: center; gap: 10px; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::before {
  content: "+"; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid var(--ink);
  border-radius: 50%; font: 700 16px/1 Readex, sans-serif;
}
.doc details[open] summary::before { content: "−"; background: var(--note); color: #2A2410; }

/* between the home page's sections: a squiggle, like a line drawn to end a lesson */
main > section + section::before {
  content: ""; display: block; width: 120px; height: 12px; margin: 0 auto 30px; opacity: .5;
  background: var(--ink2); -webkit-mask: var(--wave) repeat-x 0 0 / 40px 12px; mask: var(--wave) repeat-x 0 0 / 40px 12px;
}
section h2::after { margin-inline: 0; }

.cta + .free { margin: 14px 0 0; }
.get { flex-direction: column; align-items: flex-start; }
.get .cta { gap: 14px; }

@media (max-width: 760px) {
  .doc h2 { margin-top: 44px; }
  .cta { gap: 12px; }
  .get { align-items: center; text-align: center; }
  .get .cta { justify-content: center; }
}
@media print { .stores { display: none; } }
/* tablets and small laptops: the text starts after the red margin line
   (it sits 44px from the edge; on wide screens the centred page clears it) */
@media (min-width: 761px) {
  main { padding-inline-start: max(22px, calc(64px - (100vw - 1040px) / 2)); }
}
@media (min-width: 761px) and (max-width: 1060px) { .bubble { inset-inline-end: 0; } }

/* ===== language switch and day/night ===== */
.lang-toggle {
  display: inline-flex; padding: 3px; gap: 2px; border: 2px solid var(--ink); border-radius: 99px;
  background: var(--card); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; font: 700 14px Readex, sans-serif;
  color: var(--ink2);
}
.lang-toggle span { min-width: 34px; height: 28px; display: grid; place-items: center; border-radius: 99px; transition: background .2s, color .2s; }
.lang-toggle[data-on="ar"] [data-l="ar"], .lang-toggle[data-on="en"] [data-l="en"] { background: var(--note); color: #2A2410; }
.lang-toggle:active, .theme-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card);
  box-shadow: 2px 2px 0 var(--ink); cursor: pointer; font-size: 17px; line-height: 1; display: grid; place-items: center;
}
header nav .chips { align-items: center; gap: 10px; }

/* ===== where to get it: three badges in one row ===== */
.stores { display: flex; flex-wrap: wrap; align-items: stretch; gap: 16px 14px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 14px; position: relative;
  border-radius: 14px; text-decoration: none; transition: transform .15s;
}
.store svg { width: 28px; height: 28px; flex: none; }
.store > span { display: flex; flex-direction: column; line-height: 1.2; }
.store small { font-size: 12px; }
.store b { font: 700 20px Readex, sans-serif; }
.store i {
  position: absolute; top: -11px; inset-inline-end: -8px; font: 700 12px/1 Readex, sans-serif; font-style: normal;
  color: #fff; padding: 4px 9px; border-radius: 99px; transform: rotate(6deg); box-shadow: 1px 2px 0 rgba(0, 0, 0, .2);
  white-space: nowrap;
}
.store.live {
  background: #1F2433; color: #fff; border: 2px solid #1F2433; box-shadow: 4px 5px 0 var(--note); transform: rotate(-1deg);
}
.store.live:hover { transform: rotate(0) translateY(-2px); }
.store.live i { background: var(--green); }
.store.soon {
  border: 2px dashed var(--ink2); color: var(--ink2); background: var(--card); transform: rotate(.8deg); cursor: default;
}
.store.soon + .store.soon { transform: rotate(-1deg); }
.store.soon b { color: var(--ink); opacity: .75; }
.store.soon i { background: var(--red); }
/* phones: three equal tiles, icon on top */
@media (max-width: 560px) {
  .stores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
  .store { flex-direction: column; justify-content: center; gap: 4px; padding: 12px 4px 8px; text-align: center; }
  .store > span { align-items: center; }
  .store svg { width: 24px; height: 24px; }
  .store small { font-size: 10.5px; }
  .store b { font-size: 14px; white-space: nowrap; }
  .store i { font-size: 10.5px; padding: 3px 7px; inset-inline-end: -4px; }
}
@media (max-width: 340px) { .store b { font-size: 12.5px; } .store small { font-size: 9.5px; } }
.get .stores { justify-content: flex-start; }
@media (max-width: 760px) { .get .stores { justify-content: center; } }

/* text that sits exactly on a notebook line (site.js nudges it down) */
.on-line { line-height: 32px; margin: 0; font-size: 15px; color: var(--ink2); }

/* "In short" at the top of each game guide */
.tldr {
  background: var(--card); border: 2px solid var(--ink); border-radius: 6px 14px 8px 12px; padding: 12px 18px 4px;
  margin: 0 0 26px; box-shadow: 4px 4px 0 var(--hl); clear: both;
}
.tldr > b { font-family: Marhey, Readex, sans-serif; font-size: 19px; }
[lang="en"] .tldr > b { font-family: Readex, sans-serif; }
.tldr ul { margin: 6px 0 8px; }

/* the big highlighted number in a heading ("6 games") */
.num {
  display: inline-block; font-size: 1.45em; line-height: 1; padding: 0 .18em; margin-inline-end: .12em;
  background: linear-gradient(transparent 38%, var(--hl) 38% 92%, transparent 92%); transform: rotate(-4deg);
  font-family: Marhey, Readex, sans-serif;
}

/* the home page's questions */
.faq details {
  background: var(--card); border: 2px solid var(--ink); border-radius: 10px 14px 10px 12px; padding: 10px 16px; margin: 12px 0;
}
.faq details[open] { box-shadow: 3px 3px 0 var(--ink); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+"; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid var(--ink);
  border-radius: 50%; font: 700 16px/1 Readex, sans-serif;
}
.faq details[open] summary::before { content: "−"; background: var(--note); color: #2A2410; }
.faq details p { margin: 8px 0 4px; color: var(--ink2); }
/* wider screens: the three badges in one row, a size that fits the column */
@media (min-width: 561px) {
  .stores { flex-wrap: nowrap; gap: 12px; }
  .store { padding: 8px 14px 8px 11px; gap: 8px; }
  .store svg { width: 24px; height: 24px; }
  .store small { font-size: 11px; }
  .store b { font-size: 17px; white-space: nowrap; }
}
/* tablets: a narrower Yazo so the three badges fit next to him */
@media (min-width: 761px) and (max-width: 1060px) {
  .hero { grid-template-columns: minmax(0, 1fr) 170px; gap: 20px; }
  .yazo { width: 150px; }
  .store { padding: 7px 11px 7px 9px; gap: 6px; }
  .store svg { width: 22px; height: 22px; }
  .store b { font-size: 15px; }
  .store small { font-size: 10.5px; }
}

/* other names of a game, under "In short" */
.tldr .aka { margin: 10px 0 0; padding-top: 8px; border-top: 1.5px dashed var(--rule, #BFD3F2); font-size: 14.5px; color: var(--ink2, #6B7084); }

/* tables in articles (the letter tables of Atobis complet): a notebook grid that scrolls on small phones */
.tbl { overflow-x: auto; margin: 14px 0 18px; -webkit-overflow-scrolling: touch; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15.5px; background: var(--card); }
.doc th, .doc td { border: 1.5px solid var(--rule); padding: 5px 9px; text-align: start; white-space: nowrap; }
.doc th { background: var(--hl); font-weight: 700; }
.doc td.blank { height: 34px; min-width: 70px; }
.doc caption { caption-side: bottom; font-size: 14px; color: var(--ink2); padding-top: 6px; text-align: start; }
.sister { font-size: 15.5px; }
@media print { .tbl { overflow: visible; } .doc table { font-size: 12pt; } }
