/* Home, Play (equal-height fixes) and Help pages. Uses the base design tokens. */
:root { --navy: #1f2a4d; --pg-radius: 26px; --pg-shadow: 0 10px 26px rgba(38, 48, 77, .14); }
.btn.big { min-height: 60px; padding: 10px 26px; font-size: 1.2rem; border-radius: 20px; letter-spacing: .02em; }
.btn:focus-visible, .navcard:focus-visible, .subcard:focus-visible, .tchip:focus-visible { outline: 4px solid var(--purple); outline-offset: 3px; }
.page.home, .page.help { max-width: 1280px; }
.eyebrow { display: inline-block; margin: 0 0 6px; padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .8); color: #4a2fb0; font-weight: 900; font-size: .85rem; letter-spacing: .04em; }

/* ---------- reusable: real card picture ---------- */
.cardart { margin: 0; position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; width: 180px; max-width: 100%; }
.cardart img { width: 100%; height: auto; display: block; border-radius: 9px; box-shadow: 0 8px 20px rgba(38, 48, 77, .28); }
.cardart-btn { all: unset; cursor: zoom-in; display: block; position: relative; width: 100%; border-radius: 10px; transition: transform .2s var(--ease-pop, ease); }
.cardart-btn:hover, .cardart-btn:focus-visible { transform: translateY(-6px) scale(1.04); }
.cardart-btn:focus-visible { outline: 4px solid var(--purple); outline-offset: 3px; }
.cardart .zoomtip { position: absolute; right: 6px; bottom: 6px; background: rgba(255, 255, 255, .92); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; font-size: .95rem; box-shadow: var(--shadow-s); opacity: 0; transition: opacity .2s; }
.cardart-btn:hover .zoomtip, .cardart-btn:focus-visible .zoomtip { opacity: 1; }
@media (hover: none) { .cardart .zoomtip { opacity: .95; } }
.cardart figcaption { display: grid; text-align: center; line-height: 1.15; } .cardart figcaption b { font-size: .95rem; color: var(--navy); } .cardart figcaption small { font-weight: 800; color: var(--ink-2); }
.cardart-ph { width: 100%; aspect-ratio: 750 / 1039; border-radius: 10px; background: linear-gradient(160deg, #dbe6ff, #efe9ff); display: grid; place-items: center; font-size: 3rem; border: 3px dashed #b8c6ee; }
.cardart.tilt { transform: rotate(-3deg); } .cardart.tiltl { transform: rotate(-4deg); } .cardart.tiltr { transform: rotate(4deg); }
.cardart.sideways img { transform: rotate(90deg); margin: 22px 0; }

/* ---------- HERO (Home + Help) ---------- */
.hhero { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 18px; padding: 30px 36px; margin: 8px 0 22px; border-radius: 30px; overflow: hidden;
  background: radial-gradient(60% 90% at 90% 20%, #ffe9a8 0, transparent 60%), radial-gradient(50% 80% at 10% 90%, #c9f5e8 0, transparent 60%), linear-gradient(135deg, #d9e8ff, #efe3ff); box-shadow: var(--pg-shadow); border: 4px solid #fff; background-size: cover; background-position: center; }
.hhero.has-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, 0) 70%); }
.hhero > * { position: relative; }
.hhero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); color: var(--navy); margin-bottom: 6px; } .hhero h1 span { color: #e8590c; }
.hhero .lead { font-size: 1.3rem; font-weight: 800; color: #3b4770; margin-bottom: 10px; }
.hint-guest { background: rgba(255, 255, 255, .75); border-radius: 14px; padding: 8px 14px; font-weight: 700; max-width: 560px; }
.hhero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.hhero-art { position: relative; min-height: 250px; display: grid; place-items: center; }
.hhero-book { position: relative; z-index: 2; animation: pg-bob 3.4s ease-in-out infinite; }
.floatcards img { position: absolute; width: 112px; border-radius: 8px; box-shadow: 0 10px 22px rgba(38, 48, 77, .35); border: 3px solid #fff; }
.fc1 { left: 2%; top: 4%; transform: rotate(-12deg); animation: pg-fl1 5s ease-in-out infinite; }
.fc2 { right: 4%; top: 0; transform: rotate(10deg); animation: pg-fl2 6s ease-in-out infinite; }
.fc3 { right: 18%; bottom: -2%; transform: rotate(-4deg); animation: pg-fl1 5.5s ease-in-out infinite .6s; width: 96px !important; }
@keyframes pg-bob { 50% { transform: translateY(-8px); } }
@keyframes pg-fl1 { 50% { transform: translateY(-10px) rotate(-8deg); } }
@keyframes pg-fl2 { 50% { transform: translateY(-12px) rotate(14deg); } }
.helpbook .bubble.big { position: absolute; left: -6%; top: 6%; max-width: 230px; z-index: 3; font-weight: 800; }

/* ---------- HOME: nav cards ---------- */
.navcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.navcard { --c1: #ffc533; --c2: #ffdf80; --cd: #e6a800; --ct: #4a3500; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; text-align: center; min-height: 196px; padding: 18px 16px 20px; border: 4px solid #fff; border-radius: var(--pg-radius); cursor: pointer; font: inherit;
  background: linear-gradient(170deg, var(--c2), var(--c1)); color: var(--ct); box-shadow: 0 7px 0 var(--cd), var(--pg-shadow); transition: transform .2s var(--ease-pop, ease), box-shadow .2s; }
.navcard:hover { transform: translateY(-6px); box-shadow: 0 13px 0 var(--cd), 0 18px 30px rgba(38, 48, 77, .2); } .navcard:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--cd); }
.nc-ico { font-size: 3rem; line-height: 1; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .15)); } .navcard b { font-family: var(--font-display, inherit); font-size: 1.45rem; letter-spacing: .02em; } .navcard small { font-size: 1rem; font-weight: 800; opacity: .92; line-height: 1.25; }
.nc-mint { --c1: #139a7b; --c2: #35c9a7; --cd: #0c6f59; --ct: #fff; } .nc-purple { --c1: #7a5bdd; --c2: #a48bf5; --cd: #5a3fb8; --ct: #fff; } .nc-coral { --c1: #e0503f; --c2: #ff8a78; --cd: #b03323; --ct: #fff; }
.nc-lock { margin-top: auto; background: rgba(255, 255, 255, .92); color: #5a3f00; border-radius: 99px; padding: 3px 12px; font-size: .85rem; font-weight: 900; }
.navcard.lock { filter: saturate(.8); }

/* ---------- HOME: secondary cards + featured ---------- */
.subcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.subcard { display: flex; align-items: center; gap: 12px; min-height: 92px; padding: 14px 16px; border-radius: 20px; background: #fff; border: 3px solid #ece4d2; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-s); transition: transform .18s, border-color .18s; }
.subcard:hover { transform: translateY(-3px); border-color: var(--yellow); } .subcard > span { font-size: 2rem; } .subcard b { display: block; font-size: 1.05rem; color: var(--navy); } .subcard small { color: var(--ink-2); font-weight: 700; line-height: 1.25; display: block; }
.featured { padding: 22px 26px 26px; border-radius: 30px; background: linear-gradient(160deg, #2f3d86, #5a3fb8); color: #fff; box-shadow: var(--pg-shadow); background-size: cover; background-position: center; }
.featured-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .featured h2 { color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); margin: 0; letter-spacing: .03em; }
.gallery { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; padding: 22px 0 6px; }
.gallery .cardart { width: 170px; } .gallery .cardart figcaption b, .gallery .cardart figcaption small { color: #fff; }
.gallery .cardart-btn:hover { transform: translateY(-10px) scale(1.1); z-index: 2; }
.featured .btn.ghost { color: var(--ink); }

/* ---------- PLAY: equal heights, bottom-anchored buttons ---------- */
.modes { align-items: stretch !important; }
.mode { height: 100%; } .mode-body { flex: 1 1 auto; }
.mode-actions { margin-top: auto; padding-top: 6px; display: grid; gap: 8px; }
.mode-actions .lobbybtn { margin-top: 0; }
.guestcta p:last-child { margin-bottom: 0; }
.buddies { display: flex; gap: 10px; justify-content: center; } .buddies img { width: 64px; border-radius: 6px; box-shadow: var(--shadow-s); border: 2px solid #fff; } .buddies img:first-child { transform: rotate(-6deg); } .buddies img:last-child { transform: rotate(6deg); }

/* ---------- HELP ---------- */
.topicnav { position: sticky; top: 62px; z-index: 30; display: flex; gap: 8px; overflow-x: auto; padding: 8px 10px; margin: 0 0 20px; border-radius: 99px; background: rgba(255, 253, 247, .94); backdrop-filter: blur(6px); box-shadow: var(--shadow); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tchip { flex: none; border: 3px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; min-height: 44px; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; white-space: nowrap; }
.tchip:hover { border-color: var(--yellow); } .tchip.on { background: var(--yellow); border-color: var(--yellow-d); color: #4a3500; }
.hsec { scroll-margin-top: 140px; display: grid; gap: 22px; align-items: center; padding: 30px 34px; margin: 0 0 22px; border-radius: 30px; background: #fffdf7; box-shadow: var(--shadow); border: 3px solid #fff; }
.hsec.alt-a { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); background: linear-gradient(135deg, #e3edff, #fffdf7 60%); }
.hsec.alt-b { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); background: linear-gradient(225deg, #d9f7ee, #fffdf7 60%); }
.hsec.anatomy { background: linear-gradient(160deg, #fff2c7, #fffdf7 55%); } .hsec.timeline { background: linear-gradient(160deg, #efe9ff, #fffdf7 60%); } .hsec.engage { background: linear-gradient(160deg, #ffe3df, #fffdf7 60%); } .hsec.tips { background: linear-gradient(160deg, #d9f7ee, #fff2c7); }
.hsec h2 { color: var(--navy); margin-bottom: 8px; letter-spacing: .01em; }
.hsec-art { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 6px; }
.sec-sub { font-weight: 800; color: #3b4770; }
.big-line { font-size: 1.35rem; font-weight: 800; }
.ticks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; } .ticks li { padding-left: 34px; position: relative; } .ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--mint); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: .85rem; }
details.more { background: rgba(255, 255, 255, .8); border: 2px solid var(--line); border-radius: 14px; padding: 8px 14px; margin-top: 8px; } details.more summary { cursor: pointer; font-weight: 900; color: var(--blue-d); min-height: 32px; } details.more p { margin: 8px 0 0; }
.ex { background: var(--yellow-l); border-radius: 12px; padding: 8px 12px; font-weight: 700; }

/* lesson point demo */
.lpdemo { background: #fff; border: 3px solid var(--yellow); border-radius: 20px; padding: 16px 18px 12px; }
.lpbar2 { position: relative; height: 24px; border-radius: 99px; background: #ece4d2; margin: 4px 10px 30px; } .lpbar2 i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #ffc533, #ff9f1c); transition: width .5s var(--ease-pop, ease); }
.lpbar2 .tick { position: absolute; top: 28px; transform: translateX(-50%); font-weight: 900; color: var(--ink-2); font-size: .95rem; }
.lpdemo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .trophy { font-size: 2.4rem; transition: transform .4s; } .trophy.won { transform: scale(1.3) rotate(-8deg); }

/* card anatomy */
.anat { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: 30px; align-items: start; justify-content: center; }
.anat-card { position: relative; width: 100%; max-width: 330px; margin: 0 auto; } .anat-card img { width: 100%; display: block; border-radius: 12px; box-shadow: 0 12px 28px rgba(38, 48, 77, .3); }
.anat-card .hl { position: absolute; border: 4px solid #ffc533; border-radius: 10px; background: rgba(255, 197, 51, .22); box-shadow: 0 0 0 3px rgba(255, 255, 255, .8), 0 0 18px rgba(255, 197, 51, .9); pointer-events: none; transition: all .3s var(--ease-pop, ease); }
.mk { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; min-width: 30px; border-radius: 50%; border: 3px solid #fff; background: #6a4bd0; color: #fff; font-weight: 900; font-size: .95rem; cursor: pointer; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); padding: 0; display: grid; place-items: center; }
.mk.on { background: #e8590c; transform: translate(-50%, -50%) scale(1.25); z-index: 3; } .mk:focus-visible { outline: 4px solid #ffc533; }
.anat-now { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 3px solid var(--yellow); border-radius: 20px; padding: 16px 18px; min-height: 130px; } .anat-now h3 { color: var(--navy); margin-bottom: 4px; } .anat-now p { margin: 0; font-size: 1.1rem; }
.nbadge { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #e8590c; color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; } .nbadge.sm { width: 26px; height: 26px; font-size: .85rem; background: #6a4bd0; margin-right: 8px; }
.anat-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .anat-list button { width: 100%; display: flex; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 14px; border: 3px solid var(--line); background: #fff; font: inherit; font-weight: 800; cursor: pointer; text-align: left; color: var(--ink); } .anat-list button.on { border-color: #e8590c; background: #fff2e8; }

/* books / learning flow */
.payflow, .learnflow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border-radius: 20px; padding: 14px 16px; margin: 10px 0; border: 3px solid #cfe0ff; }
.bks { display: grid; grid-template-columns: repeat(2, auto); gap: 4px; } .bk { font-size: 2.1rem; display: inline-block; line-height: 1; } .bk.rest { transform: rotate(90deg); opacity: .6; margin: 0 8px; }
.arrow { display: grid; text-align: center; font-size: 2.4rem; color: #e8590c; font-weight: 900; line-height: 1; } .arrow small { font-size: .75rem; color: var(--navy); font-weight: 900; letter-spacing: .04em; }
.states { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; } .state { display: grid; justify-items: center; text-align: center; background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 10px; gap: 2px; } .state small { color: var(--ink-2); font-weight: 700; line-height: 1.2; }
.lpbubble { display: grid; text-align: center; background: linear-gradient(#fff2c7, #ffd45c); border-radius: 22px; padding: 12px 20px; font-size: 2rem; font-weight: 900; color: #5a3f00; border: 4px solid #fff; box-shadow: 0 0 0 3px #ffc533; } .lpbubble small { font-size: .8rem; }

/* K & M */
.kmgrid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; align-items: center; }
.kmcol { background: #fff; border-radius: 22px; padding: 18px 20px; border: 4px solid #fff; box-shadow: var(--shadow-s); } .kmcol.k { background: linear-gradient(#e3edff, #fff); border-color: #cfe0ff; } .kmcol.m { background: linear-gradient(#efe9ff, #fff); border-color: #dcd0ff; }
.kmbadge { display: inline-block; font-size: 1.6rem; font-weight: 900; border-radius: 99px; padding: 4px 18px; margin-bottom: 6px; color: #fff; } .kmbadge.k { background: #2a5bd7; } .kmbadge.m { background: #6a4bd0; }

/* timeline */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; counter-reset: s; }
.step { position: relative; background: #fff; border-radius: 22px; padding: 38px 16px 18px; text-align: center; box-shadow: var(--shadow-s); border: 3px solid #dcd0ff; } .step h3 { font-size: 1.1rem; color: var(--navy); } .step p { margin: 0; font-weight: 700; font-size: .98rem; }
.stepn { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); width: 46px; height: 46px; border-radius: 50%; background: #6a4bd0; color: #fff; font-weight: 900; font-size: 1.5rem; display: grid; place-items: center; border: 4px solid #fff; box-shadow: var(--shadow-s); }
.stepico { font-size: 2.6rem; display: block; margin-bottom: 6px; } .stepar { position: absolute; right: -24px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; color: #e8590c; font-weight: 900; z-index: 2; }

/* engage */
.vsrow2 { display: flex; justify-content: center; align-items: center; gap: 26px; flex-wrap: wrap; }
.vsside { display: grid; justify-items: center; gap: 6px; } .vsside small { font-weight: 900; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.vsbig { font-size: 3.4rem; font-weight: 900; color: #e8590c; text-shadow: 0 4px 0 #ffd45c; font-family: var(--font-display, inherit); }
.vsstats { display: flex; gap: 8px; } .pill { border-radius: 99px; padding: 3px 12px; font-weight: 900; color: #fff; } .pill.k { background: #2a5bd7; } .pill.m { background: #6a4bd0; }
.vsexplain { max-width: 700px; margin: 14px auto 0; text-align: center; display: grid; justify-items: center; gap: 8px; }

/* negate / events / tips */
.evbox { background: #fff; border: 3px solid var(--yellow); border-radius: 18px; padding: 12px 16px; } .evbox p { margin: 4px 0; }
.tips-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tipgrid { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .tipgrid li { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-s); } .tipgrid small { display: block; color: var(--ink-2); font-weight: 700; } .tipico { font-size: 1.9rem; }
.totop { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 54px; height: 54px; border-radius: 50%; border: 4px solid #fff; background: var(--yellow); font-size: 1.5rem; cursor: pointer; box-shadow: 0 5px 0 var(--yellow-d), var(--shadow); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .navcards, .subcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tipgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stepar { display: none; }
}
@media (max-width: 820px) {
  .hhero { grid-template-columns: 1fr; padding: 22px 20px; } .hhero-art { min-height: 200px; } .helpbook .bubble.big { left: 0; }
  .hsec.alt-a, .hsec.alt-b, .kmgrid, .anat { grid-template-columns: 1fr; } .hsec { padding: 22px 18px; }
  .hsec.alt-b .hsec-art { order: -1; } .anat-card { max-width: 300px; }
}
@media (max-width: 560px) { .navcards, .subcards, .tipgrid, .steps, .states, .anat-list { grid-template-columns: 1fr; } .navcard { min-height: 150px; } .floatcards img { width: 80px; } }
@media (prefers-reduced-motion: reduce), (hover: none) and (prefers-reduced-motion: reduce) { .hhero-book, .floatcards img { animation: none !important; } .navcard:hover, .cardart-btn:hover, .subcard:hover { transform: none; } }
html.reduce-motion .hhero-book, html.reduce-motion .floatcards img { animation: none !important; }

/* difficulty tiles: label on its own row, two equal tiles beneath */
.diff legend { float: none; grid-column: 1 / -1; width: auto; }
.diff { display: grid; grid-template-columns: 1fr 1fr; }

/* site footer (hidden in the game area, see main.js) */
.sitefoot { text-align: center; padding: 18px 16px 26px; color: #3b4770; font-weight: 800; font-size: .9rem; letter-spacing: .02em; }
.sitefoot p { margin: 0; }
.page { padding-bottom: 40px; }

.card-tile { position: relative; } .banflag { position: absolute; left: 6px; top: 6px; background: #fff; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; box-shadow: var(--shadow-s); }
