/* Kids Learning Arcade home: the same warm paper as the games, big picture tiles, nothing moving. */
:root { --paper: #fff3dc; --card: #fffdf7; --ink: #3b2a1a; --soft: #7a6047; --blue: #3f7fc4; --red: #d65a55; color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; background: var(--paper); color: var(--ink); font: 500 18px/1.4 'Fredoka', system-ui, sans-serif; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.top { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 16px 6px; min-height: 64px; }
.grow { flex: 1; }
.logo { display: inline-flex; gap: 3px; }
.logo b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: #fff; font-size: 20px; box-shadow: inset 0 -3px 0 #0003; }
.logo .c { background: var(--blue); }
.logo .v { background: var(--red); }
.round { min-height: 48px; min-width: 48px; border: 3px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: 0 4px 0 var(--ink); display: inline-grid; place-items: center; padding: 6px; }
main { max-width: 1600px; margin: 0 auto; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
/* Off center on phones (Doug, Oct 3): Google's full-width ad sized itself to the screen inside the padded card and
   pushed the page wider than the phone, so every card ran off the right edge. Nothing in main may be wider than it. */
main > * { min-width: 0; }
.ad-card { overflow: hidden; }
.ad-card ins { max-width: 100%; }
.hero { text-align: center; }
.hero h1 { margin: 4px 0 0; font-size: clamp(30px, 8vw, 46px); line-height: 1.1; }
.lede { margin: 6px 0 0; color: var(--soft); font-size: 20px; }
.soon { display: grid; gap: 10px; }
.soon h2 { margin: 0; font-size: 20px; color: var(--soft); }
.soon-card { opacity: .7; box-shadow: none; border-style: dashed; }
.soon-card img { width: 64px; height: 64px; }
.grownups { background: var(--card); border: 3px solid var(--ink); border-radius: 20px; padding: 14px 16px; }
.grownups summary { font-weight: 700; cursor: pointer; }
.grownups p { margin: 10px 0 0; }
.small { font-size: 17px; color: var(--soft); }
.mission { background: #fff8e6; border: 2px dashed #b98345; border-radius: 18px; padding: 12px 16px; }
.mission h2 { margin: 0 0 4px; font-size: 20px; }
.mission p { margin: 0; }
.mission .dedication { margin-top: 10px; font-style: italic; color: #7a5528; }
/* Until Google fills the ad: a dashed "Ad space" box with its height reserved (Doug, Oct 6). Filled: the label shows. */
.ad-card { position: relative; width: 100%; max-width: 100%; min-height: 280px; background: var(--card); border: 2px dashed #e2d4b8; border-radius: 16px; padding: 8px 12px 12px; }
@media (min-width: 768px) { .ad-card { min-height: 250px; } }
.ad-card[hidden] { display: none; }
/* Between game rows: the whole row, with room above and below so a reach for a tile does not land on the ad. */
.tiles > .ad-row { grid-column: 1 / -1; margin: 18px 0; }
.ad-label { display: none; margin: 0 0 6px; font-size: 17px; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }
.ad-space { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--soft); pointer-events: none; }
.ad-card:has(ins[data-ad-status="filled"]) { border-style: solid; }
.ad-card:has(ins[data-ad-status="filled"]) .ad-space { display: none; }
.ad-card:has(ins[data-ad-status="filled"]) .ad-label { display: block; }
/* SEO pass (Oct 2): brand line over the H1, rows of links by age and skill, and visible questions for grown-ups. */
.kicker { margin: 0; font-weight: 600; color: var(--soft); font-size: 18px; }
.pick-row { display: grid; gap: 8px; }
.pick-row h2 { margin: 0; font-size: 20px; }
.chip-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-links a { display: inline-flex; align-items: center; min-height: 48px; padding: 4px 16px; border: 3px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 600; text-decoration: none; }
.faq { background: var(--card); border: 3px solid var(--ink); border-radius: 20px; padding: 14px 16px; display: grid; gap: 6px; }
.faq h2 { margin: 0; font-size: 22px; }
.faq h3 { margin: 8px 0 0; font-size: 18px; }
.faq p { margin: 0; }
.faq a { color: #24598f; }
/* Helps for every child (ADR-023): a box for grown-ups like the questions, with the switches inside. */
.gu-menu { margin: 8px auto 0; display: grid; justify-items: center; gap: 8px; width: 100%; }
.gu-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 18px; border: 3px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); font: 600 18px/1.1 'Fredoka', system-ui, sans-serif; cursor: pointer; }
.gu-menu > summary::-webkit-details-marker { display: none; }
.gu-menu[open] > summary { background: var(--ink); color: var(--card); }
.gu-menu .helps-link { width: 100%; }
.helps-link { margin: 6px 0 0; display: flex; flex-wrap: nowrap; justify-content: center; gap: 8px; }
.helps-link a { flex: 1 1 0; min-width: 0; max-width: 420px; justify-content: center; display: inline-flex; align-items: center; min-height: 48px; padding: 4px 8px; border: 3px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 600; text-decoration: none; }
.helps-home { background: var(--card); border: 3px solid var(--ink); border-radius: 20px; padding: 14px 16px; display: grid; gap: 8px; }
.helps-home h2 { margin: 0; font-size: 22px; }
.helps-home h3 { margin: 6px 0 0; font-size: 19px; }
.helps-home p, .helps-home ul, .helps-home ol { margin: 0; }
.helps-home ul, .helps-home ol { padding-left: 22px; display: grid; gap: 6px; }
.helps-home a { color: #24598f; }
.helps-home .helps-panel { margin-top: 4px; }
.helps-home .helps-more { display: none; }
/* Short home (Doug, Oct 3): grown-up boxes that open in place, two to a row on wide screens. */
.more-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.more-box { background: var(--card); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 4px 0 var(--ink); }
.more-box[open] { grid-column: 1 / -1; }
.more-box > summary { list-style: none; cursor: pointer; min-height: 56px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 19px; }
.more-box > summary::-webkit-details-marker { display: none; }
.more-box > summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 999px; font-size: 22px; line-height: 1; }
.more-box[open] > summary::after { content: '\2212'; }
.more-in { padding: 0 16px 16px; display: grid; gap: 8px; }
.more-in p, .more-in ul, .more-in ol, .more-in h3 { margin: 0; }
.more-in h3 { margin-top: 6px; font-size: 19px; }
.more-in ul, .more-in ol { padding-left: 22px; display: grid; gap: 6px; }
.more-in .chip-links { padding-left: 0; display: flex; }
.more-in a { color: #24598f; }
.more-in .pick-row h2 { font-size: 18px; }
.more-in .share h2 { display: none; }
.grown-games { background: #eef5ff; border: 2px dashed #3f7fc4; border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; margin-top: 6px; }
.grown-games .go-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 4px 18px; border: 3px solid var(--ink); border-radius: 999px; background: #3f7fc4; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 3px 0 var(--ink); }
.rp-badge { margin: 8px auto 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border: 2px solid #b98345; border-radius: 999px; background: #fff8e6; color: #7a5528; font-weight: 600; font-size: 17px; }
.more-in > .share > h2, .more-in > .my-voice-ad > h2 { display: none; }
.more-in > .share, .more-in > .my-voice-ad { border: 0; padding: 0; background: none; box-shadow: none; }
/* Heart behind the family dedication (Doug, Oct 3: "some kind of cute heart shape outline ... in the background of the
   dedication to the family. Create a few mockup options"). Four looks; the home uses the one Doug picks
   (class heart-a to heart-d on .mission). Still, no motion. */
.mission[class*='heart-'] { position: relative; overflow: hidden; isolation: isolate; }
.mission[class*='heart-'] .dedication { position: relative; }
/* A: one big soft heart outline right behind the dedication */
.mission.heart-a .dedication { max-width: 224px; margin: 12px auto 0; padding: 62px 0 104px; text-align: center; font-size: 17px; line-height: 1.35; }
.mission.heart-a .dedication::before { content: ''; position: absolute; z-index: -1; inset: 0 -64px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'%3E%3Cpath d='M50 84C20 62 6 46 6 28 6 15 16 6 28 6c9 0 16 5 22 13 6-8 13-13 22-13 12 0 22 9 22 22 0 18-14 34-44 56z' fill='%23fff1f3' stroke='%23e8889a' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* B: the dedication in its own heart-outlined note, a small solid heart on top */
.mission.heart-b .dedication { margin-top: 14px; padding: 26px 18px 18px; text-align: center; border: 3px dashed #e8889a; border-radius: 26px; background: #fff1f3; }
.mission.heart-b .dedication::before { content: ''; position: absolute; left: 50%; top: -16px; width: 34px; height: 30px; transform: translateX(-50%); background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'%3E%3Cpath d='M50 84C20 62 6 46 6 28 6 15 16 6 28 6c9 0 16 5 22 13 6-8 13-13 22-13 12 0 22 9 22 22 0 18-14 34-44 56z' fill='%23e05a6f' stroke='%233b2a1a' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E"); }
/* C: a light scatter of tiny heart outlines across the box */
.mission.heart-c { background-color: #fff8e6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23e8889a' stroke-width='2' opacity='.35' stroke-linejoin='round'%3E%3Cpath d='M20 30c-8-6-12-10-12-15 0-4 3-6 6-6 3 0 5 2 6 4 1-2 3-4 6-4 3 0 6 2 6 6 0 5-4 9-12 15z'/%3E%3Cpath d='M64 74c-6-4-9-8-9-11 0-3 2-5 5-5 2 0 3 1 4 3 1-2 2-3 4-3 3 0 5 2 5 5 0 3-3 7-9 11z'/%3E%3C/g%3E%3C/svg%3E"); }
.mission.heart-c .dedication { font-size: 19px; }
/* D: the names wrapped in one heart: a wooden-toy heart (style B) beside the line */
.mission.heart-d .dedication { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.mission.heart-d .dedication::before { content: ''; width: 64px; height: 58px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'%3E%3Cpath d='M50 86C19 63 4 47 4 28 4 14 15 4 28 4c9 0 16 5 22 13 6-8 13-13 22-13 13 0 24 10 24 24 0 19-15 35-46 58z' fill='%23d65a55' stroke='%233b2a1a' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M26 18c-8 1-12 7-12 13' fill='none' stroke='%23fff' stroke-width='6' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E"); }


/* Arcade footer */
.arcade-footer { text-align: center; margin-top: 20px; padding: 16px 0; font-size: 17px; color: var(--soft); }
.arcade-footer a { color: var(--soft); text-decoration: none; }
.arcade-footer a:visited { color: var(--soft); }
/* The RightPlace badge keeps its own colors in the footer, and links to RightPlace's site. */
.arcade-footer a.rp-badge, .arcade-footer a.rp-badge:visited { color: #7a5528; text-decoration: none; min-height: 44px; }

/* TV optimizations: larger text, bigger tiles, increased padding for distance viewing */
@media (min-width: 1400px) {
  body { font-size: 22px; line-height: 1.6; }
  .hero h1 { font-size: 56px; line-height: 1.2; }
  .lede { font-size: 26px; }
  .kicker { font-size: 22px; }
  button { min-height: 52px; padding: 8px 20px; }
  main { padding: 0 20px calc(32px + env(safe-area-inset-bottom)); gap: 24px; }
  .hero { margin-bottom: 10px; }
  .mission { padding: 16px 20px; }
  .mission h2 { font-size: 24px; }
  .chip-links a { min-height: 52px; padding: 6px 20px; font-size: 18px; }
}
/* Game tiles, picture first (Doug, Oct 15: "these should all be clear for non-reading kids, whats behind the button
   they press"; option A). Each tile is one big picture of what the child does and the game's name, nothing else.
   Equal rows (Doug's standing rule): 2 columns on phones, 4 on tablets, 6 on computers, every tile the same size, and a
   part-filled last row sits centered. The grid has two tracks per tile so a tile can start half a tile in; --cols is
   the number of tiles a row (ads.js reads it). */
.tiles { --cols: 2; --gap: 12px; display: grid; grid-template-columns: repeat(calc(var(--cols) * 2), minmax(0, 1fr)); gap: 16px var(--gap); }
.tile-card { grid-column: span 2; min-width: 0; display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 2px; padding: 8px 8px 10px; border: 3px solid var(--ink); border-radius: 22px; background: var(--card); box-shadow: 0 6px 0 var(--ink); color: var(--ink); text-decoration: none; }
.tile-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.tile-card:focus-visible { outline: 5px solid var(--blue); outline-offset: 3px; }
.tile-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.tile-card .n { display: grid; place-items: center; min-height: 2.3em; font-weight: 700; font-size: 19px; line-height: 1.12; text-align: center; text-wrap: balance; }
/* The first tile of a part-filled last row starts (columns - tiles left) tracks in, so that row sits centered. */
@media (max-width: 639px) { .tiles > .tile-card:nth-of-type(2n+1):nth-last-of-type(1) { grid-column: 2 / span 2; } }
@media (min-width: 640px) {
  .tiles { --cols: 4; --gap: 16px; }
  .tile-card .n { font-size: 21px; }
}
@media (min-width: 640px) and (max-width: 1199px) {
  .tiles > .tile-card:nth-of-type(4n+1):nth-last-of-type(1) { grid-column: 4 / span 2; }
  .tiles > .tile-card:nth-of-type(4n+1):nth-last-of-type(2) { grid-column: 3 / span 2; }
  .tiles > .tile-card:nth-of-type(4n+1):nth-last-of-type(3) { grid-column: 2 / span 2; }
}
@media (min-width: 1200px) {
  .tiles { --cols: 6; --gap: 20px; gap: 22px var(--gap); }
  .tile-card { padding: 12px 12px 14px; border-width: 4px; border-radius: 26px; gap: 4px; }
  .tile-card .n { font-size: clamp(20px, 1.75vw, 25px); }
  .tiles > .tile-card:nth-of-type(6n+1):nth-last-of-type(1) { grid-column: 6 / span 2; }
  .tiles > .tile-card:nth-of-type(6n+1):nth-last-of-type(2) { grid-column: 5 / span 2; }
  .tiles > .tile-card:nth-of-type(6n+1):nth-last-of-type(3) { grid-column: 4 / span 2; }
  .tiles > .tile-card:nth-of-type(6n+1):nth-last-of-type(4) { grid-column: 3 / span 2; }
  .tiles > .tile-card:nth-of-type(6n+1):nth-last-of-type(5) { grid-column: 2 / span 2; }
}
/* One For grown-ups button for every game's ages, line and "Learns" (they left the tiles, Oct 15). */
.games-info { justify-self: center; width: fit-content; max-width: 100%; background: var(--card); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); }
.games-info[open] { width: 100%; max-width: 900px; }
.games-info > summary { list-style: none; cursor: pointer; min-height: 64px; padding: 8px 22px; display: grid; align-content: center; justify-items: center; text-align: center; }
.games-info > summary::-webkit-details-marker { display: none; }
.games-info > summary span { font-weight: 700; font-size: 18px; }
.games-info > summary small { font-size: 17px; color: var(--soft); }
.games-info > summary:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; border-radius: 14px; }
.games-list { margin: 0; padding: 0 18px 16px 36px; display: grid; gap: 8px; font-size: 17px; }
.games-list .a { color: var(--soft); }
.games-list .learn { color: #2a7a36; }
.games-list a { color: #24598f; text-decoration: none; font-weight: 600; white-space: nowrap; }
/* Download the app (get-app.js, ADR-046): grown-ups box only, the same blue card as the games-for-you card. */
.get-app { background: #eef5ff; border: 2px solid #3f7fc4; border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; margin: 6px 0 4px; }
.get-app h3 { margin: 0; font-size: 22px; }
.get-app p { margin: 0; }
.get-app .go-btn { display: flex; justify-content: center; align-items: center; width: 100%; max-width: 420px; min-height: 52px; padding: 4px 18px; border: 3px solid var(--ink); border-radius: 999px; background: #3f7fc4; color: #fff; font-weight: 700; font-size: 20px; text-decoration: none; box-shadow: 0 3px 0 var(--ink); }
/* Two equal buttons side by side, stacked on phones (Doug's equal-rows rule); the setup button is the quiet one. */
.get-app-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 860px; }
.get-app-btns .go-btn { max-width: none; }
.get-app .go-btn.quiet-btn { background: #fff; color: var(--ink); }
@media (max-width: 560px) { .get-app-btns { grid-template-columns: 1fr; } }
.setup-card { text-align: left; max-height: 86vh; overflow-y: auto; }
.setup-card h3 { margin: 12px 0 4px; font-size: 18px; }
.setup-card ol { margin: 0; padding-left: 22px; font-size: 17px; line-height: 1.4; }
.setup-card li + li { margin-top: 4px; }
