[hidden] { display: none !important; }
body { margin: 0; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
/* Layout: one-column phone app, evening calm; jade accent (a Myanmar material), figure drawn as thick rounded strokes */
:root {
  --bg: #EFF2EF;
  --surface: #FFFFFF;
  --soft: #DCE7E1;
  --ink: #1D2B26;
  --muted: #5B6E66;
  --jade: #2E7A60;
  --jade-ink: #FFFFFF;
  --figure: #22342D;
  --far: #9CB6AA;
  --mat: #C9DBD1;
  --breath: rgba(46,122,96,.14);
  --line: #D3DED8;
  --display: "Baloo 2", "Noto Sans Myanmar", system-ui, sans-serif;
  --body: "Nunito", "Noto Sans Myanmar", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0A100D; --surface: #141D19; --soft: #1F2E28; --ink: #E4EDE8; --muted: #93A89F;
  --jade: #6FC6A3; --jade-ink: #0D1A15; --figure: #E4EDE8; --far: #587066; --mat: #253730;
  --breath: rgba(111,198,163,.13); --line: #26362F; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0A100D; --surface: #141D19; --soft: #1F2E28; --ink: #E4EDE8; --muted: #93A89F;
  --jade: #6FC6A3; --jade-ink: #0D1A15; --figure: #E4EDE8; --far: #587066; --mat: #253730;
  --breath: rgba(111,198,163,.13); --line: #26362F; color-scheme: dark;
}
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
body.lang-my { line-height: 1.8; }
.app { max-width: 480px; margin: 0 auto; padding-inline: 20px; padding-block: 16px 32px; display: flex; flex-direction: column; gap: 20px; min-height: 100%; box-sizing: border-box; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; line-height: 1.25; }
.lang-my h1, .lang-my h2, .lang-my h3 { line-height: 1.6; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, select:focus-visible { outline: 3px solid var(--jade); outline-offset: 2px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand h1 { font-size: 1.6rem; }
.brand p { margin: 0; color: var(--muted); font-size: .95rem; }
.langs { display: flex; background: var(--soft); border-radius: 999px; padding: 3px; }
.langs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.langs button[aria-pressed="true"] { background: var(--surface); color: var(--jade); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* week goal */
.week { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 18px; padding: 14px 16px; }
.dots { display: flex; gap: 8px; }
.dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--soft); box-sizing: border-box; }
.dot.on { background: var(--jade); border-color: var(--jade); }
.week-text { min-width: 0; }
.week-text strong { display: block; font-size: 1rem; }
.week-text span { color: var(--muted); font-size: .88rem; }

/* level path */
.level { display: flex; flex-direction: column; gap: 12px; }
.level-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.level-head h2 { font-size: 1.25rem; }
.level-head span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.hero-card { background: var(--jade); color: var(--jade-ink); border-radius: 22px; padding: 18px; display: grid; grid-template-columns: 1fr 110px; gap: 8px; align-items: center; border: 0; text-align: left; width: 100%; }
.hero-card .eyebrow { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; opacity: .85; font-weight: 700; }
.lang-my .hero-card .eyebrow { text-transform: none; letter-spacing: 0; }
.hero-card h3 { font-size: 1.35rem; margin-block: 2px 6px; }
.hero-card .meta { font-size: .9rem; opacity: .9; }
.hero-card .go { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; background: var(--jade-ink); color: var(--jade); font-weight: 800; border-radius: 999px; padding: 8px 18px; font-size: .95rem; }
.hero-card svg { width: 110px; height: 110px; }
.hero-card svg .limb, .hero-card svg .torso { stroke: var(--jade-ink); }
.hero-card svg .far { stroke: var(--jade-ink); opacity: .45; }
.hero-card svg .head { fill: var(--jade-ink); }
.hero-card svg .cut { stroke: var(--jade); }
.hero-card svg .mat { fill: var(--jade-ink); opacity: .25; }

.path { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.step { aspect-ratio: 1; max-width: 100%; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; background: var(--soft); color: var(--muted); font-variant-numeric: tabular-nums; }
.step.current { background: var(--jade); color: var(--jade-ink); }
.step.done { background: var(--jade); color: var(--jade-ink); opacity: .55; }
.later { display: flex; flex-direction: column; gap: 8px; }
.locked { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 16px; color: var(--muted); }
.locked strong { color: var(--ink); display: block; }
.locked .lock { font-size: .8rem; white-space: nowrap; }

/* settings */
.panel { background: var(--surface); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.panel h3 { font-size: 1.05rem; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
select { font: inherit; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); flex: 1; min-width: 0; }
.btn-ghost { border: 2px solid var(--jade); background: transparent; color: var(--jade); border-radius: 999px; padding: 7px 16px; font-weight: 700; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }
.safety { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* player: read from 1-2 m away with the phone on the floor (S22 Ultra ~384x824 css px, curved side edges) */
.player { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 10; }
.player-in { max-width: 560px; width: 100%; margin: 0 auto; padding-inline: 22px; padding-block: 12px 18px; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; height: 100%; }
.p-top { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--soft); display: grid; place-items: center; flex: none; font-size: 1.2rem; }
.bars { display: flex; gap: 5px; flex: 1; }
.bars i { flex: 1; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; position: relative; }
.bars i b { position: absolute; inset: 0; background: var(--jade); transform-origin: left; transform: scaleX(0); }
.stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.stage svg { width: 100%; height: 100%; max-height: 52vh; }
.ring { transform-box: fill-box; transform-origin: center; }
.phase { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); background: var(--surface); padding: 6px 20px; border-radius: 999px; font-weight: 800; font-size: 1.25rem; color: var(--jade); white-space: nowrap; z-index: 1; }
.p-text { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.p-text .label { color: var(--muted); font-size: .95rem; font-weight: 700; }
.p-text h2 { font-size: 2.1rem; }
.p-text p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.p-bottom { display: flex; align-items: center; justify-content: center; gap: 22px; }
.clock { font-family: var(--display); font-size: 3.4rem; line-height: 1.1; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: center; font-weight: 700; }
.play { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--jade); color: var(--jade-ink); display: grid; place-items: center; font-size: 1.4rem; }
/* phone lying sideways on the floor: figure left, info right */
@media (orientation: landscape) and (max-height: 520px) {
  .player-in { max-width: none; display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto 1fr auto; column-gap: 20px; row-gap: 6px; padding-inline: max(22px, env(safe-area-inset-left, 0px)) max(22px, env(safe-area-inset-right, 0px)); }
  .p-top { grid-column: 1 / -1; }
  .stage { grid-row: 2 / 4; }
  .stage svg { max-height: none; }
  .p-text { align-self: center; }
  .p-text h2 { font-size: 1.9rem; }
  .p-bottom { grid-column: 2; }
}

/* done */
.done { text-align: center; align-items: center; justify-content: center; }
.done h2 { font-size: 2rem; }
.done .play { width: auto; height: auto; border-radius: 999px; padding: 12px 28px; font-weight: 800; }

/* figure */
.limb, .torso, .neck { fill: none; stroke: var(--figure); stroke-linecap: round; stroke-linejoin: round; }
.far { stroke: var(--far); }
.cut { stroke: var(--bg); }
.head { fill: var(--figure); }
.mat { fill: var(--mat); }

@media (prefers-reduced-motion: reduce) { .ring { transition: none !important; } }

/* path: sessions as tappable steps */
.step { border: 0; cursor: pointer; font: inherit; font-weight: 800; }
.step.locked { cursor: default; opacity: .55; }
.step.sel { outline: 3px solid var(--jade); outline-offset: 3px; }
.step.done::after { content: '✓'; font-size: .7em; margin-left: 1px; }
.hero-card .thumb { width: 110px; height: 110px; border-radius: 16px; object-fit: cover; background: var(--jade-ink); }
.replay { font-size: .8rem; opacity: .85; font-weight: 700; }

/* badges + calendar */
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: .72rem; color: var(--muted); font-weight: 700; line-height: 1.3; min-width: 0; }
.badge i { font-style: normal; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: var(--soft); filter: grayscale(1); opacity: .45; }
.badge.won { color: var(--ink); }
.badge.won i { filter: none; opacity: 1; background: color-mix(in srgb, var(--jade) 22%, var(--surface)); box-shadow: 0 0 0 3px var(--jade); }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-variant-numeric: tabular-nums; }
.cal span { font-size: .8rem; padding-block: 6px; border-radius: 10px; color: var(--muted); }
.cal .dow { font-size: .7rem; font-weight: 800; padding-block: 2px; }
.cal .on { background: var(--jade); color: var(--jade-ink); font-weight: 800; }
.cal .today { box-shadow: inset 0 0 0 2px var(--jade); color: var(--ink); }

/* player image */
.stage img { max-width: 100%; max-height: 52vh; width: auto; height: 100%; object-fit: contain; border-radius: 24px; }
@media (orientation: landscape) and (max-height: 520px) { .stage img { max-height: 70vh; } }
.phase.switch { background: var(--jade); color: var(--jade-ink); }

.done-fig { width: 200px; height: 200px; }
.hero-card.install { grid-template-columns: 1fr; cursor: pointer; }
.hero-card.install.ios { cursor: default; }
.ios-steps { margin: 6px 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }

/* level-up ceremony */
.medal { font-size: 5rem; line-height: 1; animation: pop .9s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.confetti b { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .medal, .confetti b { animation: none; } .confetti { display: none; } }
