/* Workout: calm FunGamez look (soft mint and cream, ink outlines). */
:root { --mint: #2ec4b6; --mint-soft: #d7f3ee; --bg: #eaf6f3; --ok: #57c785; --off: #ff9f1c; --unseen: #9aa5b8; }
[hidden] { display: none !important; }
html, body { height: 100%; background: var(--bg); }
body { overflow: hidden; }
body.menu { overflow: auto; }
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
body.menu #stage { display: none; }
/* Not display:none (iOS stops feeding hidden videos); just out of sight. */
#cam { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

h2 { margin: 22px 0 10px; font-size: 26px; }
h3 { margin: 14px 0 4px; font-size: 19px; }
p { font-size: 18px; font-weight: 600; margin: 6px 0; }
.muted { opacity: .75; }
.note { font-size: 15px; opacity: .8; }
.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.row.left { justify-content: flex-start; }
.row .btn { margin-top: 10px; }
.center { text-align: center; }
.btn.big { font-size: 24px; padding: 10px 28px; background: var(--mint); color: #fff; -webkit-text-stroke: 0; }
.btn.danger { color: #c62828; }
.btn.back { margin: 0 0 6px; font-size: 15px; padding: 4px 14px; }

/* menu screens: a page that scrolls */
.screen { max-width: 980px; margin: 0 auto; padding: 16px 16px 120px; }
.screen .top { padding-right: 150px; }
h1.title { margin: 6px 0 4px; font-size: 38px; line-height: 1.1; }
.tag { font-size: 20px; margin: 4px 0 14px; }
h1.logo { color: var(--mint); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cards.ex { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pcard { font: inherit; color: var(--ink); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
  padding: 14px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); }
.pcard:hover { background: #fffbea; }
.pcard:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.pcard .em { font-size: 34px; line-height: 1; }
.pcard b { font-size: 21px; line-height: 1.15; }
.pcard small { font-size: 14px; font-weight: 700; opacity: .7; }
.pcard canvas { width: 100%; height: 110px; display: block; }
.pcard.excard { align-items: center; text-align: center; padding: 8px 8px 12px; }
.pcard.empty { cursor: default; border-style: dashed; box-shadow: none; background: transparent; }

.cal { padding: 12px 16px; max-width: 420px; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 18px; }
.cal-head span { opacity: .7; font-weight: 700; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.cal-grid i { font-style: normal; font-size: 12px; font-weight: 800; text-align: center; opacity: .55; }
.cal-grid span { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 800; background: #f1f4f8; }
.cal-grid span.done { background: #fff3c4; font-size: 18px; }
.cal-grid span.today { outline: 3px solid var(--ink); }

.steps { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; }
.steps li canvas { width: 92px; height: 70px; flex: none; }
.steps li .what { flex: 1; min-width: 0; }
.steps li .what b { font-size: 20px; display: block; }
.steps li .what small { font-size: 15px; font-weight: 700; opacity: .75; }
.steps.edit li { flex-wrap: wrap; }
.ctrls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; width: 100%; }
.stepper { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 15px; }
.stepper button, .mini { font: inherit; font-weight: 900; width: 34px; height: 34px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; cursor: pointer; padding: 0; color: var(--ink); }
.stepper output { min-width: 52px; text-align: center; font-size: 17px; }
.seg { display: inline-flex; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.seg button { font: inherit; font-weight: 800; font-size: 14px; border: 0; padding: 4px 10px; background: #fff; cursor: pointer; color: var(--ink); }
.seg button.on { background: var(--yellow); }
.sticky { position: sticky; bottom: 0; padding: 8px 0 12px; background: linear-gradient(transparent, var(--bg) 30%); }
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 800; max-width: 420px; }
.field input { text-align: left; font-size: 20px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.pill { font: inherit; font-weight: 800; font-size: 15px; padding: 4px 14px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; cursor: pointer; color: var(--ink); }
.pill.on { background: var(--yellow); }

.explain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.coachbox { padding: 6px; background: #fff; position: sticky; top: 12px; }
.coachbox canvas { width: 100%; aspect-ratio: 4 / 3; display: block; }
#exSteps { padding-left: 22px; margin: 4px 0; }
#exSteps li { font-size: 18px; font-weight: 600; margin: 3px 0; }
.tagchip { display: inline-block; font-size: 14px; font-weight: 800; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; margin: 0 6px 4px 0; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 17px; padding: 4px 12px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; }
.chip.ok { background: #c9f2b4; }
.chip.wait { background: #f1f4f8; }

/* overlays (setup, guide, pause, finish) */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(31,42,77,0.35); overflow: auto; z-index: 6; }
.overlay.top { align-items: flex-start; background: transparent; pointer-events: none; }
.overlay.top .card { pointer-events: auto; margin-top: 8px; }
.overlay .card { padding: 20px 24px; max-width: 760px; width: 100%; }
.card.narrow { max-width: 540px; }
.card.wide { max-width: 760px; }
.choices { display: grid; gap: 12px; margin: 8px 0; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choices.four { grid-template-columns: repeat(4, 1fr); }
.choice { font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 12px 8px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); }
.choice.on { background: #fff3c4; }
.choice b { font-size: 20px; }
.choice small { font-size: 14px; font-weight: 700; opacity: .75; }
.choice.small { padding: 6px; }
.choice.small b { font-size: 26px; }
.big { font-size: 46px; line-height: 1.1; }
.tips { margin: 6px 0; padding-left: 22px; }
.tips li { font-size: 17px; font-weight: 700; margin: 3px 0; }
.bar { height: 16px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 0; background: var(--mint); transition: width .3s; }
.spin { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }

#corner { position: fixed; top: 12px; right: 12px; display: flex; gap: 8px; align-items: center; z-index: 7; }
#langs { display: flex; padding: 3px; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); border-width: 3px; }
#langs button { font: inherit; font-weight: 800; font-size: 14px; border: 0; background: none; color: var(--ink); padding: 4px 8px; border-radius: 8px; cursor: pointer; }
#langs button.on { background: var(--yellow); }
.round { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; box-shadow: 0 3px 0 var(--ink);
  font-size: 22px; cursor: pointer; padding: 0; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.round img { width: 100%; height: 100%; object-fit: cover; }
body.playing #corner { display: none; }

#hud { position: fixed; top: 10px; right: 10px; display: flex; gap: 8px; align-items: center; z-index: 5; }
#hud .btn { margin: 0; font-size: 16px; padding: 6px 14px; }
#doneBtn { font-size: 20px !important; background: var(--mint); color: #fff; }

.sticker { font-size: 84px; line-height: 1; animation: pop .6s ease-out; }
@keyframes pop { 0% { transform: scale(.3); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
table.fin { margin: 8px auto; border-collapse: collapse; font-weight: 800; }
table.fin td, table.fin th { padding: 3px 8px; text-align: left; font-size: 17px; }
table.fin th { font-size: 22px; text-align: center; }
table.fin td.st { white-space: nowrap; letter-spacing: 1px; }
table.fin .dim { filter: grayscale(1); opacity: .3; }
.hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; margin: 0; padding: 6px 12px; font-size: 15px; color: #fff; background: rgba(0,0,0,0.5); border-radius: 10px; z-index: 5; }

@media (max-width: 700px) {
  .screen .top { padding-right: 0; padding-top: 52px; }
  h1.title { font-size: 30px; }
  .explain { grid-template-columns: 1fr; }
  .coachbox { position: static; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pcard b { font-size: 18px; }
  .steps li canvas { width: 72px; height: 56px; }
  .overlay .card { padding: 14px; }
  .choices.two { grid-template-columns: 1fr; }
  .big { font-size: 36px; }
}
@media (max-width: 380px) { .cards { grid-template-columns: 1fr; } }
