/* Drills, practice games, review, lessons, today, account. */
.clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--yellow); min-width: 56px; text-align: right; }
.asklabel { display: block; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; margin-bottom: 10px; }
.ask { padding: 14px; }
.again { border-color: rgba(255, 216, 77, .4); }
.again p { margin: 0 0 12px; }
.drillrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.drillrow span { padding: 5px 10px; border-radius: 99px; font-weight: 800; font-size: 13px; }
.drillrow .ok { background: rgba(61, 220, 132, .16); color: var(--green); } .drillrow .no { background: rgba(229, 72, 77, .16); color: var(--red); }
.drillmenu { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.drillmenu .example { margin: 0; }
.asbtn { width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; }

.welcome { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 12px 16px; text-align: left; border-color: rgba(255, 216, 77, .4); }

/* nothing may push the page wider than the screen */
html, body { max-width: 100%; overflow-x: clip; }
#app { overflow-x: clip; }
img, svg, video, canvas { max-width: 100%; }
.card, .coach, .coach-bubble, .skill-title, .task > div, .example, .row > * { min-width: 0; }
.coach-text, .card p, .skill-headline, .task small, .example span { overflow-wrap: anywhere; }
.top { max-width: 100vw; }
.top .grow { min-width: 0; }

/* phones */
.top .logo b { white-space: nowrap; }
@media (max-width: 899px) and (orientation: landscape) {
  .boardwrap { max-width: min(100%, calc(100svh - 110px)); }
}
@media (max-width: 899px) {
  .top { padding: 10px 12px; gap: 8px; }
  .top .logo b { font-size: 17px; }
  .top .logo img { width: 30px; height: 30px; }
  .top .pill { padding: 5px 8px; }
  .iconbtn { width: 36px; height: 36px; }
  .wrap { padding: 0 12px; }
  .coach-text { font-size: 16px; }
  .landing .hero { margin-top: 12px; }
  .leakcard h2 { font-size: 32px; }
  .task { padding: 12px; gap: 12px; } .task b { font-size: 16px; }
  .miniskills .row span { width: 150px; }
  .optable .row { grid-template-columns: 1.5fr .5fr .9fr .7fr; font-size: 13px; }
  .fix-head { font-size: 13px; }
  input, textarea, select { font-size: 16px !important; }      /* stops iOS zooming into fields */
}
@media (max-width: 420px) {
  .top .logo b { font-size: 16px; }
  .top nav a { padding: 8px 10px; font-size: 13.5px; }
}

/* toggle */
.toggle { flex: none; width: 52px; height: 30px; border-radius: 99px; border: 0; background: var(--line); position: relative; transition: background .15s; }
.toggle i { position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.on { background: var(--yellow); } .toggle.on i { transform: translateX(22px); }

/* practice game */
.pbar { display: flex; align-items: center; gap: 8px; padding: 7px 4px; font-size: 15px; }
.pbar .dot { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--muted); }
.pbar .dot.w { background: #fff; } .pbar .dot.b { background: #14181F; }
.pbar .think { margin-left: auto; animation: pulse 1.2s infinite; }
.movelist { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0; max-height: 150px; overflow: auto; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.movelist .mv i { color: var(--muted); font-style: normal; margin-right: 4px; }

/* review */
.graph { width: 100%; height: 64px; display: block; border-radius: 8px; margin-top: 10px; cursor: pointer; }
.navrow { margin-top: 10px; }
.movegrid { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 2px 6px; max-height: 260px; overflow: auto; font-size: 14.5px; }
.movegrid .n { color: var(--muted); padding: 4px 0; }
.mvb { border: 0; background: transparent; text-align: left; padding: 4px 8px; border-radius: 6px; font-weight: 700; color: var(--text); }
.mvb:hover { background: rgba(255, 255, 255, .07); } .mvb.on { background: rgba(255, 216, 77, .22); }
.overlay { position: fixed; inset: 0; z-index: 50; background: radial-gradient(1200px 700px at 50% -10%, #1B2230 0%, var(--bg2) 35%, var(--bg0) 100%); overflow: auto; }
.overlay-in { padding: 10px 0 60px; }
.overlay-in > .btn.link { margin-left: 12px; }

/* lessons */
.lessongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.lessoncard { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); transition: transform .1s, border-color .15s; }
.lessoncard:hover { transform: translateY(-2px); border-color: var(--yellow); }
.lessoncard h3 { margin: 0; font-size: 19px; } .lessoncard p { margin: 0; color: var(--muted); font-size: 14.5px; flex: 1; }
.lessoncard .meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.lessoncard .done { color: var(--green); font-weight: 800; }
.recap ul { margin: 6px 0 0; padding-left: 20px; } .recap li { margin: 6px 0; }
.sectionhead { margin: 28px 0 0; font-size: 22px; }

/* today */
.todayhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.week { display: flex; gap: 6px; }
.week div { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; background: rgba(255, 255, 255, .04); font-size: 12px; font-weight: 800; color: var(--muted); }
.week div.done { background: rgba(61, 220, 132, .18); color: var(--green); } .week div.today { outline: 2px solid var(--yellow); }
.tasks { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.task { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); padding: 14px; }
.task:hover { border-color: var(--yellow); }
.task .ico { flex: none; width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 216, 77, .14); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.task.done .ico { background: rgba(61, 220, 132, .18); }
.task b { display: block; font-size: 17px; } .task small { color: var(--muted); font-size: 14px; }
.task .mins { margin-left: auto; color: var(--muted); font-weight: 800; font-size: 13px; white-space: nowrap; }
.task.done b { text-decoration: line-through; opacity: .7; }
.miniskills .row { padding: 5px 0; font-size: 14.5px; } .miniskills .row span { width: 190px; flex: none; } .miniskills .row b { width: 30px; text-align: right; }

/* pricing and account */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.plan h3 { font-size: 20px; } .plan .price { font-family: var(--display); font-size: 44px; color: var(--yellow); line-height: 1; margin: 6px 0; }
.plan .price small { font-family: var(--font); font-size: 15px; color: var(--muted); font-weight: 700; }
.plan ul { padding-left: 18px; margin: 12px 0 16px; color: #C5CDD8; } .plan li { margin: 6px 0; }
.plan.best { border-color: var(--yellow); }
.locknote { display: flex; gap: 10px; align-items: center; background: rgba(255, 216, 77, .1); border: 1px solid rgba(255, 216, 77, .35); border-radius: var(--r); padding: 12px 14px; margin-top: 14px; }

/* openings page */
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 15px; line-height: 1.7; word-break: break-word; margin: 6px 0 0; }
.wrap > .seg { margin: 14px 0; }

/* Today: one sentence and one button (owner 16 Nov) */
.today-hero { max-width: 560px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; padding-top: 28px; }
.today-top { width: 100%; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.today-coach { width: 76px; height: 76px; border-radius: 50%; margin: 34px 0 18px; box-shadow: 0 0 0 6px rgba(255,216,77,.12); }
.today-title { font-family: 'Anton', var(--display, sans-serif); font-weight: 400; font-size: 40px; line-height: 1.08; margin: 0; color: var(--cream); letter-spacing: .01em; }
.today-sub { font-size: 19px; line-height: 1.5; color: var(--muted); margin: 14px 0 30px; max-width: 30em; }
.btn.big { font-size: 19px; padding: 16px 52px; border-radius: 14px; min-width: 220px; }
.today-after { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.today-dots { display: flex; gap: 8px; margin-top: 26px; }
.today-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(245,241,230,.16); }
.today-dots i.on { background: var(--green); }
.today-dots i.now { background: var(--yellow); }
.today-rescan { margin-top: 36px; font-size: 14px; opacity: .7; }
@media (max-width: 640px) {
  .today-hero { padding-top: 12px; min-height: calc(100dvh - 160px); justify-content: center; }
  .today-coach { margin: 18px 0 14px; width: 64px; height: 64px; }
  .today-title { font-size: 32px; }
  .today-sub { font-size: 17px; margin-bottom: 24px; }
  .btn.big { width: 100%; }
}

.whynot { border-color: rgba(255,216,77,.5); color: var(--yellow); }
/* the coach line keeps a steady height, so the chat right under it barely moves */
.fix-side > .coach .coach-bubble { min-height: 74px; }
@media (max-width: 640px) { .fix-side > .coach .coach-bubble { min-height: 64px; } }
/* Today as the coach talking (owner 16 Nov, second pass): the speech bubble and one button */
.today-chat { display: flex; flex-direction: column; gap: 22px; padding-top: 40px; }
.today-chat .coach-text { font-size: 19px; line-height: 1.5; }
@media (max-width: 640px) { .today-chat { padding-top: 18px; } .today-chat .coach-text { font-size: 17px; } }

.seeit .btn { flex: 1; }
@media (max-width: 899px), (max-height: 540px) and (orientation: landscape) { .seeit { flex-wrap: nowrap; } }

/* report, concise (owner 16 Nov) */
.report2 { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.holds { display: flex; flex-direction: column; gap: 10px; }
.hold { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; }
.hold.top { border-color: rgba(255,216,77,.55); }
.hold .hico { font-size: 26px; line-height: 1; margin-top: 2px; }
.hold b { font-size: 18px; color: var(--cream); }
.hold p { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.45; }
.promise p { margin: 0; font-size: 16px; line-height: 1.55; }
.fullbtn { align-self: center; }
/* the two moves under the board: theirs (orange arrow) and yours (red arrow), with a replay */
.lastmoves { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.lastmoves b { color: var(--cream); }
.lastmoves .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.lastmoves .dot.o { background: #FF9F43; }
.lastmoves .dot.r { background: #E5484D; }
.lastmoves .btn.link { margin-left: auto; padding: 2px 6px; }

/* end of the scan: "Why you're losing games" (owner 16 Nov) */
.verdict { padding-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.vhead { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.vhead img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,216,77,.12); }
.vhead small { font-size: 15px; }
.verdict h1 { font-size: 46px; line-height: 1.04; margin: 6px 0 0; }
.vsub { margin: 0; font-size: 17px; color: var(--muted); line-height: 1.5; }
.vlist { margin: 4px 0 6px; display: flex; flex-direction: column; gap: 10px; }
.vopt { position: relative; display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
        padding: 14px 16px 14px 58px; background: var(--card); border: 2px solid var(--line); border-radius: 14px; transition: border-color .15s, background .15s; }
.vopt:hover:not(:disabled):not(.sel) { border-color: #4A5870; }
.vopt:disabled { cursor: default; }
.vopt.sel { border-color: var(--yellow); background: #222A38; }
.vopt.off { opacity: .6; }
.vnum { position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; font-style: normal; font-weight: 900;
        display: grid; place-items: center; background: var(--card2); color: var(--muted); border: 2px solid var(--line); }
.vopt.sel .vnum { background: var(--yellow); color: #0B1220; border-color: var(--yellow); }
.vopt b { display: block; font-size: 18px; color: var(--cream); }
.vopt span { display: block; margin-top: 4px; color: var(--muted); font-size: 15.5px; line-height: 1.45; }
.vtag { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 99px; font-style: normal; font-weight: 800; font-size: 13px;
        background: rgba(255,216,77,.14); color: var(--yellow); }
.vnote { display: block; margin-top: 8px; font-style: normal; font-size: 13.5px; color: var(--muted); }
.vpick { margin: 0; font-size: 16px; color: var(--cream); line-height: 1.45; }
.vend { margin: 4px 0 6px; font-size: 16px; color: var(--cream); }
@media (max-width: 640px) {
  .verdict { padding-top: 10px; gap: 10px; } .verdict h1 { font-size: 34px; margin-top: 2px; }
  .vhead img { width: 36px; height: 36px; } .vhead small { font-size: 14px; }
  .vopt { padding: 12px 14px 12px 52px; } .vnum { left: 13px; top: 12px; } .vopt b { font-size: 17px; } .vopt span { font-size: 15px; }
  .vtag { margin-top: 8px; } .vpick, .vend { font-size: 15px; } .vend { margin: 0 0 4px; }
}


/* ------------------------------------------------------------ home (owner 16 Nov) */
.home { display: flex; flex-direction: column; gap: 16px; padding-top: 10px; padding-bottom: 30px; max-width: 720px; }   /* one column (owner 16 Nov) */
.home-top { display: flex; flex-direction: column; gap: 12px; }
.home-top .coach-text { font-size: 18px; line-height: 1.5; }
.home-top > .btn { align-self: flex-start; margin-left: 62px; min-width: 200px; }
.home-cols { display: grid; grid-template-columns: 1.08fr 1fr; gap: 16px; align-items: start; }
.home-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cardhead h3 { font-size: 18px; }
.cardhead small { font-size: 13px; text-align: right; }
.planrow, .topic, .grow-row { width: 100%; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; background: rgba(255,255,255,.04); border-radius: var(--r-sm); }
.planrow:hover, .topic:hover, .grow-row:hover { background: rgba(255,255,255,.09); }
.planrow { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 8px; border: 2px solid transparent; }
.planrow:last-child, .topic:last-child { margin-bottom: 0; }
.planrow .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #4A5870; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 14px; color: #0B1220; }
.planrow.done .tick { background: var(--green); border-color: var(--green); }
.planrow.next { border-color: rgba(255,216,77,.55); }
.planrow b { display: block; font-size: 16px; color: var(--cream); }
.planrow.done b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(140,151,166,.5); }
.planrow small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.planrow em, .topic em, .grow-row em { font-style: normal; font-weight: 800; font-size: 13.5px; color: var(--yellow); white-space: nowrap; }
.planrow.done em { color: var(--muted); }
.topics { display: flex; flex-direction: column; }
.topic { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; margin-bottom: 8px; border: 2px solid transparent; }
.topic.on { border-color: rgba(255,216,77,.55); }
.topic b { font-size: 15.5px; color: var(--cream); }
.topic em { grid-row: 1 / 4; grid-column: 2; }
.topic .tbar { grid-column: 1; height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 4px; }
.topic .tbar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.topic small { grid-column: 1; color: var(--muted); font-size: 13px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.week { display: flex; justify-content: space-between; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.week span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.week i { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.07); display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 13px; color: #0B1220; }
.week .on i { background: var(--green); }
.week .today i { box-shadow: 0 0 0 2px var(--yellow); }
.week .today { color: var(--cream); }
.grow-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; margin-bottom: 6px; }
.grow-row .res { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 14px; color: #0B1220; background: var(--muted); }
.grow-row .res.win { background: var(--green); } .grow-row .res.loss { background: var(--red); color: #fff; }
.gmain { min-width: 0; }
.gmain b { display: block; font-size: 15.5px; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmain b small { font-weight: 600; color: var(--muted); font-size: 13px; }
.gmain > small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow-row em.done { color: var(--muted); }
.sessdone { display: flex; flex-direction: column; gap: 12px; padding-top: 36px; }
.sessdone > .btn.link { align-self: center; }
.review .fix-side > .btn.link { align-self: center; padding: 4px; }
@media (max-width: 900px) {
  .home-cols { grid-template-columns: 1fr; }
  .home-top > .btn { margin-left: 0; align-self: stretch; }
  .home-top .coach-text { font-size: 16.5px; }
}
@media (max-width: 640px) { .sessdone { padding-top: 16px; } .home { gap: 12px; } .home-cols, .home-col { gap: 12px; } }

/* play screen controls (owner 16 Nov) */
.playctl { gap: 6px; margin-top: 8px; align-items: center; }
.playctl .grow { flex: 1; }
.playctl .btn.small { padding: 8px 12px; min-width: 40px; }
.viewing { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.movelist .mvb { border: 0; background: none; padding: 1px 4px; border-radius: 6px; font: inherit; color: inherit; cursor: pointer; }
.movelist .mvb:hover { background: rgba(255,255,255,.08); }
.movelist .mvb.on { background: var(--yellow); color: #14181F; font-weight: 800; }
.playcard { display: flex; align-items: center; gap: 14px; }
.playcard > div { flex: 1; min-width: 0; }
.playcard h3 { font-size: 18px; }
.playcard p { margin: 4px 0 0; font-size: 14px; }

.alsolabel { display: block; margin: 8px 2px 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.planrow:last-of-type { margin-bottom: 0; }
@media (max-width: 640px) {
  .planrow { grid-template-columns: 24px 1fr auto; gap: 10px; padding: 10px 12px; }
  .planrow .tick { width: 22px; height: 22px; font-size: 12px; }
  .planrow b { font-size: 15px; } .planrow small { font-size: 13px; }
  .topic { padding: 10px 12px; } .topic b { font-size: 15px; }
  .playcard { gap: 10px; } .playcard .btn { padding: 12px 16px; }
  .week i { width: 26px; height: 26px; }
  .playctl .btn.small { padding: 8px 10px; min-width: 36px; }
}
/* game review (owner 17 Nov: the same screen as a session): under the board a row to step through the game, the graph
   on computers, and the move list opening in the side column */
.review .fix-head { flex-wrap: nowrap; }
.review .fix-head .m { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lastmoves.navrow { flex-wrap: nowrap; gap: 6px; white-space: nowrap; }
.lastmoves.navrow .navcur { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.lastmoves.navrow .btn.link { margin-left: 0; flex: none; }
.lastmoves.navrow .navbtn { padding: 2px 12px; font-size: 18px; line-height: 1; }
.sess.review .movesheet { flex: 1 1 0; min-height: 96px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.sess.review .movesheet > * { flex: none; }
.sess.review .movesheet .movegrid { max-height: none; overflow: visible; }
@media (max-width: 899px), (max-height: 540px) and (orientation: landscape) {
  .review .graph { display: none; }            /* phones and tablets: the board, the coach and the buttons fit one screen */
  .sess.review .movesheet .stats { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .sess.review .movesheet .stats div { padding: 6px 8px; } .sess.review .movesheet .stats b { font-size: 16px; } .sess.review .movesheet .stats small { font-size: 11px; }
  .sess.review.whole .fix-side > .coach { flex: 0 1 auto; max-height: 34%; }
}
@media (min-width: 900px) and (min-height: 541px) {
  .sess.review .boardwrap { max-width: min(100%, calc(100vh - 290px), 720px); }   /* room for the step row and the graph */
  .sess.review .movesheet { flex: 1 1 0; min-height: 0; }
}
.fix-head .pill { white-space: nowrap; flex: none; }
.oplist-h { margin: 16px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------ session screen on phones: one screen, no scrolling (owner 16 Nov)
   and on tablets up to 899 px wide too (owner 17 Nov: on an iPad mini the buttons were below the fold) */
.sess-head { display: none; }
.habit-in { display: none; }
.sess-actions { display: contents; }
@media (max-width: 899px), (max-height: 540px) and (orientation: landscape) {
  .top.top-sess { display: none; }
  .main.sessmain { padding: 0; }
  .overlay .overlay-in { padding: 0; }
  .overlay .overlay-in > .btn.link { display: none; }
  .sess { display: flex; flex-direction: column; gap: 8px; height: 100vh; height: 100svh; overflow: hidden;
          padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); }
  .sess-head { display: flex; align-items: center; gap: 10px; flex: none; height: 34px; }
  .sess-head .steps { flex: 1; margin: 0; gap: 5px; }
  .sess-head .steps i { flex: 1; width: auto; height: 6px; }
  .sess-head .grow { flex: 1; }
  .sess-x, .sess-head .iconbtn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.07); color: var(--muted); font-size: 15px; display: grid; place-items: center; }
  /* the board: full width when the screen is tall enough, a little smaller on short screens so the rest still fits.
     svh is the height with the browser's bars showing, so the board never changes size while the page is used. */
  .sess .fix-board { flex: none; width: min(100%, max(248px, calc(100vh - 336px))); width: min(100%, max(248px, calc(100svh - 336px))); margin: 0 auto; }
  .sess .fix-board .fix-head, .sess .fix-board > .steps { display: none; }
  .sess .boardwrap { max-width: 100%; }
  .sess .lastmoves { margin-top: 6px; font-size: 12.5px; gap: 8px; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .sess .lastmoves .dot { margin-right: 4px; width: 8px; height: 8px; }
  .sess .fix-side { flex: 1 1 auto; min-height: 0; gap: 8px; }
  .sess .fix-side > .coach { flex: 1 1 auto; min-height: 0; }
  .sess .fix-side > .coach .coach-face { width: 36px; height: 36px; }
  .sess .fix-side > .coach .coach-bubble { min-height: 0; max-height: 100%; overflow-y: auto; align-self: flex-start; padding: 9px 34px 9px 12px; overscroll-behavior: contain; }
  .sess .coach-text { font-size: 15px; line-height: 1.36; }
  .sess .habit-in { display: block; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid rgba(23,28,36,.15); font-size: 14px; line-height: 1.35; font-weight: 600; color: #171C24; }
  .sess .donecol .card.habit { display: none; }
  /* under the coach: the chat input, then one row for the buttons at the very bottom (under the thumb). The button
     row keeps its height even when it is empty, so the chat never moves. Chat answers open in a sheet above the
     input, over the coach's line and the bottom of the board, never over the buttons. */
  .sess .fix-side > .ask { order: 9; }
  .sess .sess-actions { order: 10; flex: none; min-height: 46px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
  .sess .sess-actions > .btn.link { padding: 0; font-size: 13px; align-self: center; margin: auto 0; }
  .sess .fix-side > .coach .coach-bubble.more { -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent); mask-image: linear-gradient(#000 calc(100% - 26px), transparent); }
  .sess .ask.dock { position: relative; padding: 6px 8px; border-radius: 14px; margin: 0; }
  .sess .ask.dock > .askhead { margin: 0 2px 4px; }
  .sess .ask.dock:not(.has) > .askhead { display: none; }
  .sess .ask.dock > .askhead .asklabel { display: none; }
  .sess .ask.dock > .askhead .asktoggle { margin-left: auto; padding: 0 4px; }
  .sess .asksheet { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; background: #1B2230; border: 1px solid #3A465C;
                    border-radius: 14px; padding: 10px 12px 4px; box-shadow: 0 -12px 34px rgba(0,0,0,.6); }
  .sess .asksheet .askhead { margin-bottom: 6px; }
  .sess .asksheet .asklabel { margin: 0; }
  .sess .asksheet .asklog { max-height: 30vh; max-height: 30svh; }
  .sess .ask .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 0 6px; scrollbar-width: none; }
  .sess .ask .chips::-webkit-scrollbar { display: none; }
  .sess .ask .chips button { white-space: nowrap; flex: none; padding: 6px 10px; font-size: 13px; }
  .sess .ask .chips.solving { display: none; }          /* "Give me a hint" is a button in the row above */
  .sess .ask.dock .askform .input { padding: 8px 12px; font-size: 16px; }   /* 16 px: iPhones zoom into smaller inputs */
  .sess .ask.dock .askform .btn { width: 38px; height: 38px; }
  .sess .prompt { padding: 0; background: none; border: 0; }
  .sess .prompt p { display: none; }
  /* Hint and Show me share one row; "Why not that one?" (after a wrong try) gets a row of its own above them
     (owner 16 Nov: three in one row overflowed) */
  .sess .prompt .row { flex-wrap: wrap; gap: 8px; }
  .sess .prompt .btn { flex: 1; padding: 11px 6px; white-space: nowrap; font-size: 13.5px; }
  .sess .prompt .btn.whynot { flex: 1 0 100%; }
  .sess .fix-side .seeit { flex-direction: row; gap: 8px; }
  .sess .seeit .btn, .sess .donecol .btn { padding: 12px 14px; }
  .sess .donecol { gap: 0; }
  .sess .fix-side > .btn.link { padding: 0; font-size: 13px; align-self: center; }
}

/* short phone screens (small phones): the chat opens from a button in the top bar, the board keeps the space */
.askclose { display: none; }
@media (max-width: 899px), (max-height: 540px) and (orientation: landscape) {
  .sess.short .fix-board { width: min(100%, max(248px, calc(100vh - 274px))); width: min(100%, max(248px, calc(100svh - 274px))); }
  .sess.short .fix-side > .ask.mini { display: none; }
  .sess.short .fix-side > .ask.mini.show { display: block; position: absolute; left: 8px; right: 8px; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 40;
      background: #1B2230; border: 1px solid #3A465C; box-shadow: 0 -12px 34px rgba(0,0,0,.6); padding: 10px 10px 8px; }
  .sess.short { position: relative; }
  .sess.short .ask.mini .asksheet { position: static; border: 0; box-shadow: none; padding: 0; background: none; }
  .sess.short .ask.mini > .askhead { display: flex; margin: 0 34px 6px 2px; }
  .sess.short .ask.mini > .askhead .asklabel { display: block; margin: 0; }
  .sess.short .ask.mini .asksheet .askhead { margin-right: 34px; }
  .sess.short .ask.mini .chips.solving { display: flex; }
  .sess.short .askclose { display: grid; place-items: center; position: absolute; right: 8px; top: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--muted); font-size: 13px; z-index: 2; }
  .sess-chat { position: relative; }
  .sess-chat.dot::after { content: ''; position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
  /* first-time hint: the button pulses and a small label points up at it for a few seconds (tapping the label opens the chat too) */
  .sess-head { position: relative; z-index: 30; }
  .sess-chat.tip { color: #14181F; background: var(--yellow); animation: chatPulse 1.3s ease-out 4; }
  /* the label sits in the top bar, to the left of the button (over the progress bar), so it never covers the board */
  .chat-tip { position: absolute; right: calc(100% + 11px); top: 50%; white-space: nowrap; background: var(--yellow); color: #14181F;
      font-weight: 800; font-size: 13px; line-height: 1; padding: 9px 11px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.5);
      transform: translateY(-50%); animation: chatTip 5.2s ease both; }
  .chat-tip::before { content: ''; position: absolute; right: -4px; top: 50%; margin-top: -5px; width: 10px; height: 10px; background: var(--yellow); transform: rotate(45deg); border-radius: 2px; }
}
@keyframes chatPulse { 0% { box-shadow: 0 0 0 0 rgba(255,216,77,.55); } 100% { box-shadow: 0 0 0 14px rgba(255,216,77,0); } }
@keyframes chatTip { 0% { opacity: 0; transform: translate(10px, -50%); } 7% { opacity: 1; transform: translate(0, -50%); } 90% { opacity: 1; transform: translate(0, -50%); } 100% { opacity: 0; transform: translate(6px, -50%); } }
@media (prefers-reduced-motion: reduce) { .sess-chat.tip { animation: none; } .chat-tip { animation: none; } }
@media (max-width: 899px), (max-height: 540px) and (orientation: landscape) { .sess .lastmoves .lm-w { display: none; } .sess .lastmoves .btn.link { flex: none; } }
/* tablets: the same screen, centred at a comfortable width */
@media (min-width: 641px) and (max-width: 899px) { .sess { max-width: 720px; margin: 0 auto; } }
/* phones on their side (short and wide): the board on the left at the full height, the top bar, the coach, the chat and
   the buttons on the right */
@media (max-height: 540px) and (orientation: landscape) {
  .sess.fix { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 14px; row-gap: 8px; align-items: stretch;
          max-width: 1100px; margin: 0 auto; padding: 6px calc(10px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); }
  .sess-head { grid-column: 2; grid-row: 1; }
  .sess .fix-board, .sess.short .fix-board { grid-column: 1; grid-row: 1 / span 2; width: calc(100vh - 46px); width: calc(100svh - 46px); margin: 0; align-self: start; }
  .sess .fix-side { grid-column: 2; grid-row: 2; }
}
/* computers and tablets on their side (owner 17 Nov: "the buttons at the bottom need to be visible"): the session fills
   the screen under the top bar and never scrolls. The board column keeps its size; on the right the coach's line and
   the chat give way (the line scrolls inside its bubble, as on phones) and the buttons always stay whole. */
@media (min-width: 900px) and (min-height: 541px) {
  .main.sessmain { padding-bottom: 16px; }
  .sess.fix { height: calc(100vh - var(--sess-top, 90px)); height: calc(100svh - var(--sess-top, 90px)); align-items: stretch; }
  .sess .fix-board { align-self: start; }
  .sess .fix-side { min-height: 0; overflow: hidden; }
  /* the coach's line gives way first (down to about one line), then the chat log */
  .sess .fix-side > .coach { flex: 0 100 auto; min-height: 52px; }
  .sess .fix-side > .coach .coach-bubble { min-height: 0; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .sess .fix-side > .ask { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .sess .fix-side > .ask > * { flex: none; }
  .sess .fix-side > .ask > .asksheet { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .sess .fix-side > .ask .asksheet > * { flex: none; }
  .sess .fix-side > .ask .asksheet > .asklog { flex: 0 1 auto; min-height: 48px; }
}

/* a line played on the board ("show the sequence"): the button under a chat answer, and the row under the board */
.showlines { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.showline { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,216,77,.55); background: rgba(255,216,77,.1); color: var(--yellow);
            border-radius: 99px; padding: 6px 12px; font-size: 13.5px; font-weight: 700; }
.showline:hover { background: rgba(255,216,77,.2); }
.lastmoves.seqrow .seq-cap { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cream); }
.lastmoves.seqrow .seq-cap b { color: var(--yellow); margin-right: 4px; }
.lastmoves.seqrow .btn.link { flex: none; white-space: nowrap; }
.lastmoves.seqrow .btn.link + .btn.link { margin-left: 0; }
@media (max-width: 899px), (max-height: 540px) and (orientation: landscape) { .sess .lastmoves.seqrow { font-size: 13px; } .sess .lastmoves.seqrow .seq-cap { flex: 1; } }

/* the tried move's line once the right move is on the board: first suggestion above the chat box on a normal phone,
   a row under the board on a small phone (chat behind a button) and on a computer */
.chips .chip-lead { display: none; }
.chips.leadonly { display: none; }
@media (max-width: 899px), (max-height: 540px) and (orientation: landscape) {
  .sess:not(.short) .watchrow { display: none; }
  .sess:not(.short) .chips .chip-lead { display: inline-flex; border-color: rgba(255,216,77,.55); color: var(--yellow); font-weight: 700; }
  .sess:not(.short) .chips.leadonly { display: flex; }
}

/* the row keeps its button whole on a narrow board: the label gives way first ("Tried Nxd4" on phones) */
.lm-n { display: none; }
.lastmoves.seqrow > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 899px), (max-height: 540px) and (orientation: landscape) { .sess .lastmoves .lm-n { display: inline; } }

/* "Why you're losing games" while the coach writes it (owner 17 Nov: generated, not the fixed categories) */
.vwork { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--cream); font-size: 16px; }
.vwline { animation: vwIn .35s ease both; }
@keyframes vwIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.vdots { display: inline-flex; gap: 4px; flex: none; }
.vdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); animation: vwDot 1.2s ease-in-out infinite; }
.vdots i:nth-child(2) { animation-delay: .15s; } .vdots i:nth-child(3) { animation-delay: .3s; }
@keyframes vwDot { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.vskel .vopt { cursor: default; }
.vskel .vopt b, .vskel .vopt span { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--card2), #2B3546, var(--card2));
  background-size: 200% 100%; animation: vwShine 1.4s linear infinite; }
.vskel .vopt b { width: 70%; height: 17px; } .vskel .vopt span { width: 92%; margin-top: 9px; } .vskel .vopt span + span { width: 55%; }
@keyframes vwShine { from { background-position: 200% 0; } to { background-position: 0 0; } }
.hold .hnum { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px;
  background: var(--card2); color: var(--muted); border: 2px solid var(--line); margin-top: 1px; }
.hold.top .hnum { background: var(--yellow); color: #0B1220; border-color: var(--yellow); }
@media (prefers-reduced-motion: reduce) { .vwline, .vdots i, .vskel .vopt b, .vskel .vopt span { animation: none; } }
/* the reasons are longer now: on a phone "Fix this now" stays at the bottom of the screen while they read */
@media (max-width: 640px) {
  .verdict > .btn.big { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5;
    box-shadow: 0 -14px 22px 8px var(--bg0), 0 8px 0 8px var(--bg0); }
  .main.hasnav .verdict > .btn.big { bottom: calc(66px + env(safe-area-inset-bottom)); }
  .verdict .vsub { font-size: 16px; }
}
/* the coach writing its next line (owner 17 Nov: generated teaching lines) */
.coach-text.think { display: flex; align-items: center; min-height: 1.4em; }
.coach-text.think .vdots i { background: #5E6B7E; }
/* header "Sign up" when signed out (owner 18 Nov: there was no visible way to sign up) */
.top .signup { padding: 7px 13px; font-size: 13px; border-radius: 9px; box-shadow: 0 2px 0 #B8962A; margin-left: 4px; white-space: nowrap; }

/* Sign up / log in / forgot password (screens/auth.js, owner 20 Nov: a normal sign-up like Chessigma) */
.top .login { color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; padding: 7px 8px; white-space: nowrap; }
.authpage { padding-top: 28px; padding-bottom: 40px; }
.authcard { max-width: 420px; margin: 0 auto; padding: 26px 22px 22px; }
.authcard h1 { font-size: 26px; margin: 0 0 18px; text-align: center; }
.authcard > p.m { text-align: center; margin: -8px 0 18px; }
.authcard .google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1F1F1F;
  box-shadow: 0 3px 0 #B9BEC7; text-decoration: none; }
.authcard .or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.authcard .or::before, .authcard .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.authcard .field { display: block; margin: 0 0 14px; }
.authcard .field > span { display: block; font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.authcard .field small { display: block; margin-top: 6px; font-size: 12.5px; }
.authcard .pw { position: relative; }
.authcard .pw .input { padding-right: 70px; }
.authcard .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0;
  color: var(--muted); font-weight: 700; font-size: 13px; padding: 8px; cursor: pointer; }
.authcard .forgot { margin: -6px 0 14px; text-align: right; font-size: 14px; }
.authcard .err { margin: 0 0 12px; }
.authcard .alt { text-align: center; margin: 18px 0 0; font-size: 14.5px; color: var(--muted); }
.authcard .perks { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.authcard .perks li { padding: 4px 0 4px 24px; position: relative; }
.authcard .perks li::before { content: '✓'; position: absolute; left: 2px; color: var(--green); font-weight: 800; }
.authcard a:not(.btn) { font-weight: 700; text-decoration: none; }
.acct .card { margin-bottom: 12px; }
.acct .small { font-size: 13px; margin-bottom: 2px; }
.btn.link.danger { color: var(--red); }
@media (max-width: 420px) { .top .login { padding: 7px 4px; font-size: 13px; } .authcard { padding: 22px 16px 18px; } }

/* ---- the free / sign-up / pay steps (lib/gate.js, owner 21 Nov) ---- */
.authcard .wallline { color: var(--text); font-weight: 600; margin: -6px 0 18px; }
.paywall { padding-top: 18px; padding-bottom: 32px; }
.paywall h1 { font-size: 38px; text-align: center; margin: 6px 0 10px; }
.paywall .payline { text-align: center; color: #C5CDD8; margin: 0 0 16px; font-size: 15.5px; line-height: 1.45; }
.paywall .includes { list-style: none; padding: 0; margin: 0 0 18px; }
.paywall .includes li { position: relative; padding: 7px 0 7px 30px; font-size: 15.5px; line-height: 1.35; }
.paywall .includes li::before { content: '✓'; position: absolute; left: 4px; top: 6px; color: var(--yellow); font-weight: 800; }
.payplans { display: grid; gap: 10px; margin: 0 0 16px; }
.payplan { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  background: var(--card); color: var(--text); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; font: inherit; cursor: pointer; }
.payplan.sel { border-color: var(--yellow); background: var(--card2); }
.payplan span { display: flex; flex-direction: column; gap: 2px; }
.payplan span.r { align-items: flex-end; }
.payplan b { font-size: 17px; }
.payplan span.r b { font-family: var(--display); font-size: 26px; font-weight: 400; color: var(--yellow); line-height: 1; }
.payplan small { color: var(--muted); font-size: 13px; font-weight: 600; }
.payplan em { position: absolute; top: -10px; right: 14px; background: var(--yellow); color: #12161D; font-style: normal; font-weight: 800;
  font-size: 11.5px; padding: 2px 8px; border-radius: 99px; }
.paywall .fine { margin: 10px 0 2px; }
.lockcard { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; text-decoration: none; color: var(--text);
  border-color: var(--yellow); margin-top: 12px; }
.lockcard span { color: var(--yellow); font-weight: 700; font-size: 14.5px; }
.freebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--text);
  padding: 12px 14px; margin: 0 0 12px; font-size: 14.5px; line-height: 1.35; }
.freebar em { flex: none; font-style: normal; font-weight: 800; color: var(--yellow); font-size: 14px; }
/* the button stays in reach on a short phone: it sticks to the bottom while the list scrolls under it */
.paywall .paycta { position: sticky; bottom: 0; z-index: 2; margin: 0 -4px; padding: 10px 4px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(10, 13, 18, 0) 0, var(--bg0) 26%); }
@media (max-height: 700px) {
  .paywall { padding-top: 6px; }
  .paywall h1 { font-size: 30px; margin: 0 0 8px; }
  .paywall .payline { font-size: 14.5px; margin-bottom: 10px; }
  .paywall .includes { margin-bottom: 12px; }
  .paywall .includes li { padding: 4px 0 4px 28px; font-size: 14.5px; }
  .paywall .includes li::before { top: 3px; }
  .payplan { padding: 10px 14px; }
  .payplans { gap: 8px; margin-bottom: 6px; }
}
