@charset "UTF-8";
[hidden] {
  display: none !important;
}
:root {
  --ink:#302a3f;
  --muted:#777280;
  --purple:#7953a1;
  --purple-dark:#614080;
  --green:#728e44;
  --line:#e9e6ed;
  font-family:"Trebuchet MS","Segoe UI",sans-serif;
  color:var(--ink);
  background:#f6f5ef;
  font-synthesis:none
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  min-width:280px;
  background:radial-gradient(ellipse at 0% 30%,#eaf0df88,transparent 45%),radial-gradient(ellipse at 100% 80%,#eae2f388,transparent 45%);
  min-height:100vh;
  min-height:100svh
}
button {
  font:inherit;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  transition:background .18s,box-shadow .18s,transform .18s
}
button:focus-visible {
  outline:3px solid var(--purple);
  outline-offset:5px
}
button:hover {
  transform:translateY(-2px)
}
button:active {
  transform:translateY(0)
}
.app-shell {
  width:min(1100px,100%);
  margin:auto;
  padding:26px 32px 18px
}
.app-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:26px
}
.logo {
  display:block;
  width:112px;
  height:72px;
  object-fit:contain
}
.header-note {
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--muted);
  font-size:12px
}
.status-dot {
  width:6px;
  height:6px;
  background:#8da55f;
  border-radius:50%
}
.subject-tag {
  font-size:11px;
  color:var(--purple-dark);
  padding:9px 13px;
  border:1px solid #dfd7e7;
  border-radius:30px
}
.container {
  background:#fff;
  border:1px solid #eeeced;
  border-radius:28px;
  padding:40px 44px 28px;
  box-shadow:0 14px 50px #39302f05
}
.hero {
  display:grid;
  grid-template-columns:1.15fr 1fr;
  align-items:center;
  gap:28px;
  padding:4px 0 35px
}
.eyebrow {
  font-size:11px;
  font-weight:700;
  letter-spacing:1.8px;
  color:var(--green)
}
h1,h2,p {
  margin:0
}
.hero h1 {
  font-size:clamp(32px,4vw,48px);
  line-height:1.16;
  letter-spacing:-1.7px;
  margin:18px 0
}
.hero h1 span {
  color:var(--purple)
}
.hero-description {
  font-size:15px;
  line-height:1.8;
  color:var(--muted)
}
.feature-tags {
  display:flex;
  gap:16px;
  margin-top:23px;
  color:var(--green);
  font-size:11px
}
.hero-art {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  aspect-ratio:1.18;
  background:#f8f6fa;
  border-radius:48% 45% 42% 48%
}
.picture {
  width:87%;
  mix-blend-mode:multiply;
  border-radius:50%;
  display:block
}
.art-caption {
  position:absolute;
  bottom:8px;
  background:#fff;
  border:1px solid #eee8f2;
  box-shadow:0 5px 20px #49385b08;
  border-radius:12px;
  padding:11px 17px;
  font-size:11px;
  color:var(--purple-dark);
  transform:rotate(-5deg)
}
.art-spark {
  position:absolute;
  color:#a7b574;
  font-size:31px;
  z-index:1
}
.spark-one {
  top:13px;
  right:20px
}
.spark-two {
  bottom:28px;
  left:7px;
  color:#b39acb;
  font-size:26px
}
.section-heading {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px
}
.section-heading h2 {
  font-size:21px;
  letter-spacing:-.5px
}
.section-heading>span {
  font-size:12px;
  color:var(--muted)
}
.level-buttons {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px
}
.level-card {
  position:relative;
  text-align:left;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:14px;
  padding:20px;
  border:1px solid #e3e9d9;
  background:#f7faf2;
  border-radius:17px;
  color:var(--ink)
}
.level-card:hover {
  box-shadow:0 6px 20px #302a3f0b
}
.lvl2 {
  background:#f8f4fc;
  border-color:#e8def0
}
.lvl3 {
  background:#fff8ee;
  border-color:#f2e4ce
}
.level-icon {
  display:grid;
  place-items:center;
  width:39px;
  height:39px;
  background:#e8f0dc;
  border-radius:12px;
  color:#6d873e;
  font-size:22px;
  font-weight:700
}
.lvl2 .level-icon {
  background:#ece1f6;
  color:#895eac
}
.lvl3 .level-icon {
  background:#faeaca;
  color:#b68a40
}
.level-copy {
  display:flex;
  flex-direction:column;
  gap:7px;
  flex-basis:100%
}
.level-copy strong {
  font-size:16px
}
.level-copy>span {
  font-size:11px;
  color:var(--muted)
}
.level-copy .level-record {
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.5;
}
.level-copy .has-record {
  color: #58732f;
}
.personal-progress {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 24px;
}
.personal-progress .section-heading {
  flex-wrap: wrap;
}
.achievements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.achievement {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 17px 13px;
  border: 1px dashed #ddd7e3;
  border-radius: 14px;
  background: #faf9fb;
}
.achievement-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #eeeaf2;
  color: #8c7f98;
  font-size: 22px;
}
.achievement strong {
  display: block;
  font-size: 12px;
  line-height: 1.5;
}
.achievement p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin: 5px 0 8px;
}
.achievement-status {
  color: var(--muted);
  font-size: 10px;
}
.achievement.is-unlocked {
  border: 1px solid #dce7cc;
  background: #f7faf1;
}
.is-unlocked .achievement-icon {
  color: #728b45;
  background: #e8f0da;
}
.is-unlocked .achievement-status {
  color: #58732f;
  font-weight: 700;
}
.save-notice {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin-top: 12px;
}
.round-note {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 15px;
  color: var(--purple-dark);
  font-size: 12px;
}
.round-note>span {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}
.level-arrow {
  position:absolute;
  right:18px;
  top:23px;
  color:#8d9d76;
  font-size:23px
}
.lvl2 .level-arrow {
  color:#a88bbb
}
.lvl3 .level-arrow {
  color:#c6a369
}
.how-to {
  display:flex;
  align-items:center;
  gap:13px;
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:24px;
  color:var(--muted);
  font-size:12px;
  line-height:1.8
}
.how-to strong {
  color:var(--ink);
  margin-right:6px
}
.tip-symbol {
  display:grid;
  place-items:center;
  width:27px;
  height:27px;
  flex-shrink:0;
  border:1px solid #d6c8e1;
  border-radius:50%;
  color:var(--purple);
  font-size:14px
}
.app-footer {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:18px;
  padding-top:22px;
  color:#939084;
  font-size:10px
}
.footer-flower {
  color:#9ba878;
  font-size:17px
}
.game-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px
}
.game-heading h1 {
  font-size:32px;
  letter-spacing:-1px;
  margin:10px 0 5px
}
.game-subtitle {
  color:var(--muted);
  font-size:13px
}
.button {
  min-height:44px;
  padding:11px 19px;
  border-radius:12px;
  font-size:13px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px
}
.button-quiet {
  background:#fff;
  border:1px solid #e2dce9;
  color:#71617e
}
.button-quiet:hover {
  background:#f8f5fb
}
.button-primary {
  border:1px solid var(--purple);
  background:var(--purple);
  color:#fff;
  box-shadow:0 3px 0 #624082
}
.button-primary:hover {
  background:var(--purple-dark)
}
.game-dashboard {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:22px;
  margin-top:25px;
  padding:16px 20px;
  border:1px solid #ece7f2;
  border-radius:15px;
  background:#faf8fc
}
.phase {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  color:#76628d
}
.phase-icon {
  font-size:19px;
  color:#9e80b6
}
.countdown {
  font-size:11px;
  background:#eee6f6;
  border-radius:7px;
  padding:5px 8px;
  white-space:nowrap;
  min-width:35px;
  text-align:center
}
.progress-summary {
  width:160px;
  font-size:11px
}
.progress-summary>span {
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--muted)
}
.progress-summary strong {
  color:var(--purple)
}
.progress-track {
  height:5px;
  background:#e9e2ef;
  border-radius:8px;
  margin-top:8px;
  overflow:hidden
}
.progress-track>span {
  display:block;
  height:100%;
  width:0;
  background:#94ad64;
  border-radius:8px;
  transition:width .3s
}
.game-wrapper {
  position:relative;
  margin:25px auto;
  max-width:560px
}
#game {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  width:100%;
  container-type:inline-size
}
.card {
  width:100%;
  aspect-ratio:1;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  perspective:1000px;
  color:var(--ink);
  transition:opacity .3s,transform .18s
}
.card:hover {
  transform:translateY(-2px)
}
.inner {
  width:100%;
  height:100%;
  position:relative;
  transform-style:preserve-3d;
  transition:transform .45s
}
.card.flipped .inner {
  transform:rotateY(180deg)
}
.face {
  position:absolute;
  inset:0;
  border-radius:15px;
  backface-visibility:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #ded3e8;
  overflow:hidden;
  background:#fff
}
.front {
  background:repeating-linear-gradient(45deg,transparent,transparent 9px,#ffffff23 9px,#ffffff23 10px),#f0e9f7;
  color:#9e86b5;
  font-size:25px;
  font-weight:700
}
.front::before {
  content:"";
  position:absolute;
  inset:9px;
  border:1px solid #d9cbe6;
  border-radius:9px
}
.back {
  transform:rotateY(180deg);
  background:#fffdf9;
  border-color:#e5dfd3
}
.num {
  font-size:clamp(26px,6cqi,38px);
  font-weight:700;
  color:#584268;
  letter-spacing:-1px
}
.abacus {
  position:absolute;
  width:100%;
  height:100%;
  background:#eaf2ee;
  border-radius:10px;
  overflow:hidden;
}
.rod {
  position:absolute;
  top:0;
  width:2px;
  height:100%;
  background:#9bada6;
  transform:translateX(-50%)
}
.divider {
  position:absolute;
  top:29.1667%;
  left:0;
  width:100%;
  height:3px;
  background:#8ca79b
}
.bead {
  position:absolute;
  width:60%;
  height:11.6667%;
  border-radius:10px;
  left:50%;
  transform:translateX(-50%);
  background:#7964a9;
  z-index:2;
  box-shadow:inset 0 -2px 0 #00000012
}
.bead.white {
  background:transparent;
  z-index:0;
  box-shadow:none
}
.bead.red {
  background:#e35957
}
.rod-group {
  position:absolute;
  top:0;
  width:33.3333%;
  height:100%;
  transform:translateX(-50%)
}
.controls {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:15px;
  padding-top:20px;
  border-top:1px solid var(--line)
}
#back {
  justify-self:start
}
#next {
  justify-self:end
}
.level-dots {
  display:flex;
  gap:7px
}
.level-dots>span {
  height:7px;
  width:7px;
  background:#e8e1ee;
  border-radius:50%
}
.level-dots>span.active {
  background:var(--purple);
  width:21px;
  border-radius:5px
}
#resultContainer {
  display:none;
  position:relative;
  min-height:320px;
  background:#fcfaf7f5;
  border:1px solid #e8e1ee;
  border-radius:20px;
  text-align:center;
  align-content:center;
  padding:20px;
  box-shadow:0 12px 35px #382b4c0b;
  z-index:10
}
.new-achievements {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.reward-badge {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 10px;
  background: #edf3e2;
  border: 1px solid #dce8c9;
  color: #56712f;
  font-size: 11px;
  line-height: 1.5;
}
.result-menu {
  margin: 8px 0 0 8px;
}
#result {
  font-size:clamp(21px,4vw,30px);
  font-weight:700;
  line-height:1.4
}
#resultContainer p {
  font-size:13px;
  color:var(--muted);
  margin:12px 0 22px
}
.win-icon {
  display:inline-grid;
  place-items:center;
  width:68px;
  height:68px;
  border-radius:23px;
  background:#f8edcc;
  color:#c79c3d;
  font-size:39px;
  margin-bottom:16px
}
@media(max-width:760px) {
  .app-shell {
    padding:18px 20px
  }
  .header-note {
    display:none
  }
  .container {
    padding:28px;
    border-radius:23px
  }
  .hero {
    gap:12px
  }
  .hero h1 {
    font-size:35px
  }
  .hero-description {
    font-size:13px
  }
  .feature-tags {
    gap:10px;
    font-size:10px
  }
  .level-card {
    padding:16px
  }
  .level-copy strong {
    font-size:14px
  }
  .level-copy>span {
    font-size:10px
  }
}
@media(max-width:540px) {
  .achievements {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .achievement {
    padding: 13px;
  }
  .achievement p {
    margin: 3px 0 5px;
    font-size: 11px;
  }
  .achievement strong {
    font-size: 13px;
  }
  .round-note {
    flex-wrap: wrap;
  }
  .round-note>span {
    font-size: 9px;
  }
  #resultContainer {
    padding: 24px 15px;
  }
  #resultContainer .save-notice {
    font-size: 10px;
  }
  .result-menu {
    display: flex;
    margin: 10px auto 0;
  }
  .app-shell {
    padding:12px
  }
  .app-header {
    margin-bottom:14px;
    gap:12px;
    padding:0 5px
  }
  .logo {
    width:88px;
    height:60px
  }
  .subject-tag {
    font-size:9px;
    padding:8px 10px
  }
  .container {
    padding:24px 18px 20px;
    border-radius:22px
  }
  .hero {
    grid-template-columns:1fr;
    text-align:center;
    padding:0 0 28px;
    gap:20px
  }
  .hero h1 {
    font-size:36px
  }
  .hero-description {
    font-size:14px
  }
  .feature-tags {
    justify-content:center;
    font-size:11px
  }
  .hero-art {
    width:215px;
    justify-self:center;
    aspect-ratio:1.3
  }
  .art-caption {
    font-size:10px;
    padding:9px 12px;
    bottom:-5px
  }
  .art-spark {
    font-size:25px
  }
  .section-heading h2 {
    font-size:19px
  }
  .section-heading>span {
    font-size:10px
  }
  .level-buttons {
    grid-template-columns:1fr;
    gap:10px
  }
  .level-card {
    flex-wrap:nowrap;
    padding:15px;
    gap:14px
  }
  .level-copy {
    flex-basis:auto;
    gap:5px
  }
  .level-copy strong {
    font-size:15px
  }
  .level-copy>span {
    font-size:11px
  }
  .level-arrow {
    top:22px
  }
  .how-to {
    align-items:flex-start;
    font-size:11px;
    margin-top:21px;
    padding-top:18px
  }
  .app-footer {
    font-size:9px;
    gap:9px;
    flex-wrap:wrap;
    padding:18px 10px 6px
  }
  .game-heading h1 {
    font-size:27px
  }
  .game-subtitle {
    font-size:11px;
    max-width:190px;
    line-height:1.5
  }
  .game-heading .button {
    padding:10px 12px;
    font-size:11px
  }
  .game-dashboard {
    padding:12px;
    gap:14px;
    flex-wrap:wrap;
    margin-top:20px
  }
  .phase {
    font-size:11px;
    flex:1 1 100%
  }
  .countdown {
    margin-left:auto
  }
  .progress-summary {
    width:100%
  }
  .game-wrapper {
    margin:20px auto
  }
  #game {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px
  }
  .face {
    border-radius:11px
  }
  .front::before {
    inset:6px;
    border-radius:7px
  }
  .controls {
    gap:8px;
    padding-top:17px
  }
  .controls .button {
    padding:11px 13px;
    font-size:12px
  }
  .level-dots {
    gap:4px
  }
  .level-dots>span {
    width:5px;
    height:5px
  }
  .level-dots>span.active {
    width:14px
  }
  .win-icon {
    width:56px;
    height:56px;
    font-size:30px
  }
  .eyebrow {
    font-size:10px
  }
}
@media(max-width:359px) {
  .container {
    padding:20px 12px
  }
  .hero h1 {
    font-size:31px
  }
  .subject-tag {
    font-size:8px
  }
  .feature-tags {
    font-size:10px
  }
  .controls .button {
    font-size:11px;
    padding:10px
  }
  .app-footer {
    font-size:8px
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition:none!important;
    animation:none!important
  }
}
@media (min-width:541px) and (max-height:850px) {
  .app-shell {
    padding-top:14px
  }
  .app-header {
    margin-bottom:14px
  }
  .logo {
    height:56px;
    width:94px
  }
  .container {
    padding-top:24px;
    padding-bottom:22px
  }
  .game-heading h1 {
    font-size:28px;
    margin-top:6px
  }
  .game-dashboard {
    margin-top:18px;
    padding:12px 18px
  }
  .game-wrapper {
    max-width:440px;
    margin:18px auto
  }
  .controls {
    padding-top:14px
  }
  .app-footer {
    padding-top:16px
  }
}
