/* hakillokids.org shared styles */
:root { --ink: #3b2416; --sky: #8fd3f4; --cream: #fff8ea; --red: #e63946; --blue: #1f6fd1; --muted: #8a7563;
        --ok: #2a8a6a; --ok-bg: #dff3ea; --tan: #9a6b2f; --tan-bg: #f6e6cc; --grey: #8d8174; --grey-bg: #eee7de; --soft: #6b4a33; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Nunito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif; line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; }  /* short pages: the footer stays at the bottom of the screen */
a { color: var(--blue); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
header { background: var(--sky); position: sticky; top: 0; z-index: 20; border-bottom: 3px solid var(--ink); }
header .wrap { display: flex; align-items: center; gap: 14px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.4rem; color: #fff; text-decoration: none; white-space: nowrap;
        text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink); }
.logo img { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--ink); }
.logo span { color: #ffd166; }
nav.courses { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
nav.courses a { font-weight: 900; font-size: 0.95rem; text-decoration: none; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; white-space: nowrap; }
nav.courses a[aria-current] { background: var(--ink); color: #fff; }
nav.courses a.std { background: #ffd166; box-shadow: 0 2px 0 var(--ink); }
nav.courses a.std:hover { background: #ffc233; }
nav.courses a.shop { background: #b9e0b0; box-shadow: 0 2px 0 var(--ink); }
nav.courses a.shop:hover { background: #a3d698; }
nav.courses a.shop[aria-current="page"] { background: var(--ink); color: #fff; }
nav.courses a.std[aria-current="page"] { background: var(--ink); color: #fff; }
a.yt { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; text-decoration: none; white-space: nowrap; }
a.yt i { display: inline-block; width: 22px; height: 16px; border-radius: 5px; background: var(--red); position: relative; }
a.yt i::after { content: ""; position: absolute; left: 8px; top: 4px; border-left: 7px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

/* landing */
.hero { background: var(--sky); border-bottom: 4px solid var(--ink); }
.hero .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.hero-text { padding: 10px 0 16px; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.08; margin: 0 0 8px; font-weight: 900; }
.hero p { font-size: 1.08rem; margin: 0; max-width: 34em; }
.hero img { height: 170px; width: auto; display: block; flex: none; }
h2.pick { font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 900; margin: 18px 0 10px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { display: flex; flex-direction: row; background: #fff; border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; color: inherit; text-decoration: none;
        box-shadow: 0 6px 0 var(--accent); transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.card:focus-visible { outline: 4px dashed var(--blue); outline-offset: 4px; }
.card img { width: 42%; height: auto; min-height: 100%; object-fit: cover; object-position: 30% center; display: block; border-right: 3px solid var(--ink); flex: none; }
.card div { padding: 8px 12px 10px; min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card b { font-size: 1.25rem; font-weight: 900; line-height: 1.1; }
.card small { color: var(--soft); font-size: 0.84rem; line-height: 1.3; }
.card .go { margin-top: auto; padding-top: 6px; font-weight: 900; color: var(--red); }
.about { margin: 18px 0 0; padding: 12px 0; border-top: 3px dashed #e4d3bd; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; font-size: 0.88rem; line-height: 1.35; }
.about b { display: block; font-size: 1.02rem; }
footer { background: var(--ink); color: #f3e9dc; padding: 11px 0; font-size: 0.88rem; margin-top: 14px; }
footer a { color: #ffd166; }

/* course page */
.chead { background: var(--sky); border-bottom: 4px solid var(--ink); padding: 12px 0 14px; }
.chead h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 900; margin: 0; line-height: 1.1; }
.chead p { margin: 2px 0 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 4px 12px; background: #fff; color: var(--ink); text-decoration: none;
        border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--accent); line-height: 1.15; }
.chip b { font-size: 1.15rem; font-weight: 900; }
.chip small { font-size: 0.75rem; color: var(--soft); white-space: nowrap; }
.chip[aria-current] { background: var(--accent); transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.glabel { align-self: center; font-weight: 900; margin-right: 2px; }
.chip:focus-visible { outline: 4px dashed var(--blue); outline-offset: 3px; }
.gpanel { display: none; margin-top: 18px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 5px 0 var(--accent); scroll-margin-top: 80px; }
.gpanel.open { display: block; }
.ghead { display: flex; gap: 16px; align-items: center; padding: 12px 16px; border-bottom: 3px dashed var(--accent); }
.ghead img { width: 160px; height: auto; border-radius: 10px; border: 2px solid var(--ink); flex: none; }
.ghead h2 { margin: 0; font-size: 1.5rem; font-weight: 900; }
.ghead p { margin: 2px 0 0; color: var(--soft); }
.ghead p.free { color: var(--ok); font-weight: 800; font-size: 0.92rem; }
.gscore { display: block; color: var(--ink); }
.gscore:empty { display: none; }
ol.lessons { list-style: none; margin: 0; padding: 4px 16px 8px; }
ol.lessons li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #efe4d6; }
ol.lessons li:last-child { border-bottom: 0; }
.play { flex: none; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 900; font-size: 0.9rem; color: #fff; background: var(--red);
        border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px 4px 10px; cursor: pointer; }
.play.off { background: #e8dfd2; border-color: #c9b9a6; cursor: default; }
.play:hover, .iplay:hover { filter: brightness(1.1); }
.n { flex: none; width: 24px; text-align: right; font-weight: 900; color: var(--muted); }
.t { flex: 1; font-weight: 700; min-width: 0; }
.t small { display: block; font-weight: 700; color: var(--ok); font-size: 0.8rem; }
.acts { flex: none; display: flex; align-items: center; gap: 10px; }
.iplay { font: inherit; font-weight: 900; font-size: 0.9rem; color: #fff; background: var(--ok); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.lock, .soon { color: #a8957f; font-weight: 700; font-size: 0.86rem; white-space: nowrap; }
.guide { font-weight: 800; font-size: 0.88rem; white-space: nowrap; }
.badge { font-size: 0.8rem; font-weight: 800; border-radius: 999px; padding: 2px 10px; white-space: nowrap; background: var(--grey-bg); color: var(--grey); border: 2px solid transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.badge.tan { background: var(--tan-bg); color: var(--tan); border-color: var(--tan); }
.note { margin: 0; padding: 10px 16px 14px; font-size: 0.9rem; color: var(--soft); border-top: 3px dashed var(--accent); }

/* players */
dialog { width: min(980px, 96vw); padding: 0; border: 4px solid var(--ink); border-radius: 18px; background: #000; }
dialog::backdrop { background: rgba(30, 18, 10, .75); }
.pfoot { background: var(--cream); padding: 0 14px; }
.pfoot:has(.turn.show) { padding: 8px 14px 10px; }
.pfoot .turn { display: none; margin: 0; padding: 12px 14px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; text-align: center; }
.pfoot .turn.show { display: block; }
.pfoot .turn b { display: block; font-size: .8rem; letter-spacing: .08em; color: #e63946; }
.pfoot .turn q { display: block; quotes: none; font-weight: 900; font-size: 1.2rem; margin: 4px 0 6px; }
.pfoot .turn span { display: block; color: var(--soft); font-size: .9rem; margin-bottom: 10px; }
.pfoot .turn button { font: inherit; font-weight: 900; font-size: 1.05rem; padding: 8px 26px; border: 3px solid var(--ink); border-radius: 999px; background: #e63946; color: #fff; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
dialog .bar .opt { flex: none; display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: .9rem; cursor: pointer; }
dialog .bar .opt input { width: 18px; height: 18px; margin: 0; accent-color: #e63946; }
@media (max-width: 560px) { dialog#player .bar { flex-wrap: wrap; row-gap: 6px; } dialog#player .bar span { flex: 1 0 100%; } dialog#player .bar .opt { margin-right: auto; } }
dialog .bar { display: flex; align-items: center; gap: 10px; background: var(--cream); padding: 8px 12px; font-weight: 900; }
dialog .bar span { flex: 1; min-width: 0; }
dialog .bar button { border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 900; padding: 4px 14px; cursor: pointer; font: inherit; }
dialog .bar .score { flex: none; background: var(--ok-bg); color: var(--ok); border: 2px solid var(--ok); border-radius: 999px; padding: 2px 12px; font-size: 0.95rem; }
dialog .bar .score:empty { display: none; }
.stage { position: relative; }
dialog video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.ov { position: absolute; inset: auto 0 0 0; display: none; background: rgba(255, 248, 234, .97); border-top: 4px solid var(--ink); padding: 14px 16px 16px; text-align: center; }
.ov.show { display: block; }
.ov.full { inset: 0; display: none; flex-direction: column; justify-content: center; align-items: center; border-top: 0; }
.ov.full.show { display: flex; }
.ov .q { font-weight: 900; font-size: clamp(1rem, 2.4vw, 1.35rem); margin: 0 0 10px; }
.ov .say { color: var(--soft); margin: -4px 0 10px; font-weight: 700; }
.ov .ch { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.ov .ch button { font: inherit; font-weight: 900; font-size: clamp(1rem, 2.4vw, 1.3rem); min-width: 140px; padding: 10px 22px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.ov .ch button:hover { transform: translateY(1px); }
.ov .ch button.right { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); box-shadow: 0 4px 0 var(--ok); }
.ov .ch button.miss { background: var(--tan-bg); border-color: var(--tan); color: var(--tan); box-shadow: 0 4px 0 var(--tan); }
.ov .ch button:disabled { cursor: default; }
.ov .fb { min-height: 1.5em; margin: 10px 0 8px; font-weight: 800; }
.ov .go { font: inherit; font-weight: 900; font-size: 1.1rem; padding: 8px 26px; border: 3px solid var(--ink); border-radius: 999px; background: var(--red); color: #fff; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.ov .big { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 900; margin: 0 0 6px; }
.ov .mb { display: inline-block; font-weight: 900; border-radius: 999px; padding: 4px 16px; margin: 0 0 14px; border: 3px solid; }
.ov .mb.ok { background: var(--ok-bg); color: var(--ok); }
.ov .mb.tan { background: var(--tan-bg); color: var(--tan); }
.ov .more { margin: 14px 0 0; color: var(--soft); font-weight: 700; }

@media (max-width: 860px) {
  header .wrap { flex-wrap: wrap; row-gap: 6px; }
  nav.courses { order: 3; width: 100%; margin-left: 0; }
  a.yt { margin-left: auto; }
  .cards { grid-template-columns: 1fr; }
  .card img { width: 36%; }
  .about { grid-template-columns: 1fr 1fr; }
  ol.lessons li { flex-wrap: wrap; }
  .acts { width: 100%; padding-left: 128px; flex-wrap: wrap; row-gap: 4px; }
}
@media (max-width: 600px) {
  .hero img { height: 120px; margin-right: -8px; }
  .hero .wrap { align-items: center; }
  .hero p { font-size: 0.98rem; }
  .card b { font-size: 1.2rem; }
  .card small { font-size: 0.85rem; }
  .ghead img { width: 92px; }
  .ghead h2 { font-size: 1.25rem; }
  .ghead p:not(.free) { display: none; }
  .chip { min-width: 0; padding: 4px 10px; }
  nav.courses { gap: 5px; }
  nav.courses a { font-size: 0.86rem; padding: 3px 9px; }
  nav.courses a.home span { display: none; }
  nav.courses a.std span { display: none; }
  .chip small { display: none; }
  .play span { display: none; }
  .play { padding: 6px 10px; }
  .acts { padding-left: 76px; }
  .about { grid-template-columns: 1fr; }
  .ov { position: static; }
  .ov.full { position: static; padding: 18px 12px; }
}
@media (max-width: 420px) {
  .logo { font-size: 1.15rem; }
  a.yt span { display: none; }
  .hero img { display: none; }
  .card img { width: 38%; }
  .acts { padding-left: 0; }
}
