/* Child tablet 3.0 — standalone kid theme.
   Not shared with tablet 1.0 / 2.0 (no tablet.css). Everything inside the
   device is scoped under .v3-screen so the shared app/media styles are
   fully re-skinned here.

   Layout: top nav + mission control + profile, mascot left, content right
   (Home = 3x3 grid). */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@600;700;800&display=swap');

/* ================= Theme ================= */
.v3-stage,
.v3-screen {
  --k-ink: #2B2D42;
  --k-muted: #6B7089;
  --k-line: #E6E9F5;
  --k-bg: #F2F7FF;
  --k-green: #25CC68;
  --k-green-d: #17A653;
  --k-green-s: #E3FBEC;
  --k-blue: #3B82F6;
  --k-blue-d: #2563EB;
  --k-blue-s: #E8F1FF;
  --k-yellow: #FFC93C;
  --k-yellow-d: #E5A800;
  --k-yellow-s: #FFF6D6;
  --k-pink: #FF6B9A;
  --k-purple: #8B5CF6;
  --k-red: #F04444;
  --k-red-s: #FFECEC;
  --k-head: "Baloo 2", "Nunito", system-ui, sans-serif;
  --k-body: "Nunito", system-ui, sans-serif;
  --k-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

/* Subject / tool tones (nav + grid) */
.v3-t-home  { --tone: #25CC68; --tone-s: #E3FBEC; }
.v3-t-ar    { --tone: #0EA5E9; --tone-s: #E0F4FF; }
.v3-t-cn    { --tone: #F25C3D; --tone-s: #FFE9E2; }
.v3-t-en    { --tone: #3B82F6; --tone-s: #E6EFFF; }
.v3-t-bm    { --tone: #E09A00; --tone-s: #FFF3D1; }
.v3-t-math  { --tone: #8B5CF6; --tone-s: #F0E8FF; }
.v3-t-sci   { --tone: #16A34A; --tone-s: #E1F8E8; }
.v3-t-apps  { --tone: #EC4899; --tone-s: #FFE6F3; }
.v3-t-ai    { --tone: #0FB5BA; --tone-s: #DEFAFA; }
.v3-t-dict  { --tone: #FF7A3D; --tone-s: #FFEDE3; }
.v3-t-essay { --tone: #65A30D; --tone-s: #EEF8DF; }

/* ================= Stage + device =================
   Outer shell matches tablet 1.0 exactly (plain device on a grey stage);
   all 3.0 design lives inside the screen. */
.v3-stage {
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(50, 239, 126, 0.18), transparent 55%),
    #dfe4e8;
}
.v3-frame {
  position: relative;
  /* As large as the middle area allows while the whole device stays visible:
     16:10 screen + 12px bezel each side, inside the 12px stage padding. */
  width: min(1280px, 100%, calc((var(--v3-avail-h) - 48px) * 1.6 + 24px));
  overflow: hidden;
  border: 12px solid #1c1c1c;
  border-radius: 22px;
  background: #1c1c1c;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.v3-frame::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  z-index: 2;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #3a3a3a;
}

.v3-screen {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 6px;
  background: var(--k-bg);
  color: var(--k-ink);
  font-family: var(--k-body);
  font-weight: 600;
}
.v3-screen [hidden] { display: none !important; }
.v3-screen * { scrollbar-width: thin; scrollbar-color: #cfd8f0 transparent; }

/* Device status bar + home bar (same as 1.0) */
.v3-status {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 14px 1px;
  background: #fff;
  font-family: "Poppins", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #626262;
}
.v3-status-r { display: inline-flex; align-items: center; gap: 8px; }
.v3-bat {
  position: relative;
  width: 16px;
  height: 8px;
  border: 1px solid #626262;
  border-radius: 2px;
}
.v3-bat::after {
  content: "";
  position: absolute;
  top: 1.5px;
  right: -3px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: #626262;
}
.v3-bat i { display: block; width: 72%; height: 100%; border-radius: 1px; background: #25CC68; }
.v3-homebar {
  flex-shrink: 0;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #EAECED;
  background: #fff;
}
.v3-homebar span { width: 72px; height: 4px; border-radius: 999px; background: #d0d5d8; }

.v3-app {
  position: relative;
  isolation: isolate;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* drifting clouds + stars behind the app */
.v3-decor { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.v3-decor i { position: absolute; font-style: normal; }
.v3-decor .s1, .v3-decor .s2 { width: 16px; height: 16px; background: currentColor; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.v3-decor .s3 { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.v3-decor .c1,
.v3-decor .c2 {
  width: 120px;
  height: 36px;
  border-radius: 999px;
  background: #fff;
  opacity: .8;
  animation: v3-drift 38s linear infinite;
}
.v3-decor .c1::before,
.v3-decor .c2::before {
  content: "";
  position: absolute;
  left: 26px;
  top: -18px;
  width: 50px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
}
.v3-decor .c1 { top: 60%; left: -140px; }
.v3-decor .c2 { top: 84%; left: -140px; transform: scale(.7); animation-duration: 52s; animation-delay: -20s; }
.v3-decor .s1 { top: 22%; left: 16%; color: var(--k-yellow); font-size: 16px; animation: v3-twinkle 2.6s ease-in-out infinite; }
.v3-decor .s2 { top: 90%; left: 44%; color: var(--k-pink); font-size: 12px; animation: v3-twinkle 3.2s ease-in-out infinite -1s; }
.v3-decor .s3 { top: 30%; right: 2%; color: #A4EDC9; font-size: 10px; animation: v3-float 6s ease-in-out infinite; }

/* ================= Top bar ================= */
.v3-top {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  margin: 6px 10px 0;
  padding: 6px 8px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 0 var(--k-line);
  animation: v3-drop .5s var(--k-bounce) backwards;
}
.v3-logo img { display: block; width: 36px; height: 36px; transition: transform .3s var(--k-bounce); }
.v3-logo:hover img { transform: rotate(-12deg) scale(1.1); }

.v3-nav {
  display: flex;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  margin: -6px 0;
  padding: 6px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v3-nav::-webkit-scrollbar { display: none; }
.v3-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 6px 5px;
  border-radius: 16px;
  color: var(--k-muted);
  font-family: var(--k-head);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}
.v3-nav-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--tone-s);
  color: var(--tone);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 22%, transparent);
  transition: transform .25s var(--k-bounce), background .2s, color .2s;
}
.v3-nav-ico .ico { width: 19px; height: 19px; }
.v3-nav-item:hover { color: var(--tone); }
.v3-nav-item:hover .v3-nav-ico { animation: v3-wiggle .5s ease-in-out; }
.v3-nav-item:active .v3-nav-ico { transform: scale(.88); }
.v3-nav-item.on { color: var(--tone); }
.v3-nav-item.on .v3-nav-ico {
  background: var(--tone);
  color: #fff;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 70%, #000);
  animation: v3-hop .6s var(--k-bounce) .3s backwards;
}
.v3-nav-item.on::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--tone);
}

/* Language pod — app language + AI credits */
.v3-mission {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 5px 4px 12px;
  border-radius: 999px;
  background: #2B2D42;
  color: #fff;
  box-shadow: 0 4px 0 #15162a;
}
.v3-mission-label {
  font-family: var(--k-head);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--k-yellow);
  white-space: nowrap;
}
.v3-mission-label { display: inline-flex; align-items: center; gap: 4px; }
.v3-mission-ico { display: inline-grid; width: 15px; height: 15px; }
.v3-mission-ico .v3-i { width: 15px; height: 15px; }
.v3-lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
}
.v3-lang span {
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--k-head);
  font-size: 12px;
  font-weight: 800;
  color: #c9cce0;
  cursor: pointer;
  transition: transform .2s var(--k-bounce), background .2s;
}
.v3-lang span:hover { color: #fff; transform: translateY(-1px); }
.v3-lang span.on { background: var(--k-yellow); color: #4a3200; animation: v3-pop .4s var(--k-bounce); }
.v3-credit {
  padding-right: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #A4EDC9;
  white-space: nowrap;
}
.v3-sound {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s var(--k-bounce), background .2s;
}
.v3-sound:hover { transform: scale(1.12); background: rgba(255, 255, 255, .22); }
.v3-sound[aria-pressed="false"] { opacity: .6; }

/* Profile header */
.v3-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 14px 3px 3px;
  border-radius: 999px;
  background: var(--k-yellow-s);
  color: var(--k-ink);
  text-decoration: none;
  box-shadow: 0 4px 0 #f3e2a6;
  transition: transform .2s var(--k-bounce);
}
.v3-profile:hover { transform: translateY(-2px); }
.v3-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF9A8B, #FF6B9A);
  color: #fff;
}
.v3-avatar .ico { width: 16px; height: 16px; }
.v3-profile-copy { display: flex; flex-direction: column; line-height: 1.1; }
.v3-profile-name { font-family: var(--k-head); font-size: 14px; font-weight: 800; }
.v3-profile-sub { font-size: 10px; color: #8a6a00; white-space: nowrap; }

/* ================= Main: mascot + content ================= */
.v3-main {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 12px;
  padding: 12px 10px 8px;
}

.v3-mascot {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px 10px;
  border: 3px solid #fff;
  border-radius: 26px;
  background: linear-gradient(180deg, #FFFFFF 0%, #EFFDF4 100%);
  box-shadow: 0 6px 0 rgba(43, 45, 66, .06);
  animation: v3-slide-r .6s var(--k-bounce) .1s backwards;
}
.v3-bubble {
  position: relative;
  width: 100%;
  padding: 9px 11px;
  border: 3px solid var(--k-green);
  border-radius: 18px;
  background: #fff;
  font-family: var(--k-head);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transform-origin: 50% 100%;
  animation: v3-pop .55s var(--k-bounce) .45s backwards;
}
.v3-bubble::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  transform: rotate(45deg);
  border-right: 3px solid var(--k-green);
  border-bottom: 3px solid var(--k-green);
  background: #fff;
}
.v3-bubble.again { animation: v3-pop .45s var(--k-bounce) backwards; }

.v3-owl {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v3-owl-svg { display: block; width: 112px; height: auto; overflow: visible; }
.v3-owl-shadow { fill: #000; opacity: .08; transform-origin: 100px 212px; animation: v3-shadow 3s ease-in-out infinite; }
.v3-owl-body { transform-origin: 100px 200px; animation: v3-bob 3s ease-in-out infinite; }
.v3-eyes { transform-box: fill-box; transform-origin: center; animation: v3-blink 4.5s infinite; }
.v3-wing { transform-box: fill-box; }
.v3-wing-l { transform-origin: 80% 15%; }
.v3-wing-r { transform-origin: 20% 15%; animation: v3-wave 6s ease-in-out infinite 1.2s; }
.v3-tassel { transform-box: fill-box; transform-origin: 50% 0; animation: v3-swing 2.4s ease-in-out infinite; }
.v3-owl:hover .v3-wing-l { animation: v3-flap .35s ease-in-out 2; }
.v3-owl.hop .v3-owl-body { animation: v3-jump .7s var(--k-bounce); }
.v3-owl.hop .v3-wing-l,
.v3-owl.hop .v3-wing-r { animation: v3-flap .18s ease-in-out 4; }
.v3-owl:focus-visible { outline: 3px solid var(--k-blue); outline-offset: 4px; border-radius: 16px; }
.v3-mascot-name {
  margin-top: -2px;
  padding: 1px 12px;
  border-radius: 999px;
  background: var(--k-green);
  color: #fff;
  font-family: var(--k-head);
  font-size: 12px;
  font-weight: 800;
}

.v3-continue {
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  border: 2px dashed #FFD45C;
  border-radius: 18px;
  background: var(--k-yellow-s);
  text-align: center;
}
.v3-continue-k { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: #a37800; }
.v3-continue-t { margin: 1px 0 6px; font-family: var(--k-head); font-size: 14px; font-weight: 800; }
.v3-screen .v3-continue .btn { width: 100%; justify-content: center; animation: v3-pulse 2.4s ease-in-out infinite 1.5s; }

.v3-today {
  width: 100%;
  margin-top: auto;
  padding: 6px 0 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.v3-today > div {
  padding: 6px 4px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 0 var(--k-line);
  text-align: center;
  font-size: 10px;
  color: var(--k-muted);
}
.v3-today b { display: flex; align-items: center; justify-content: center; gap: 2px; font-family: var(--k-head); font-size: 17px; color: var(--k-ink); }
.v3-today i { font-style: normal; font-size: 13px; }
.v3-flame { display: inline-block; animation: v3-flicker 1.2s ease-in-out infinite; transform-origin: 50% 90%; }

.v3-content {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 6px 0 rgba(43, 45, 66, .06);
  animation: v3-rise .6s var(--k-bounce) .15s backwards;
}
.v3-content-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 3px dotted var(--k-line);
}
.v3-content-head .title { font-family: var(--k-head); font-size: 18px; font-weight: 800; line-height: 1.1; }
.v3-back {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--k-yellow);
  color: #4a3200;
  font-family: var(--k-head);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--k-yellow-d);
  transition: transform .2s var(--k-bounce);
}
.v3-back:hover { transform: translateX(-3px) rotate(-8deg); }
.v3-back:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--k-yellow-d); }

/* ================= Home: 3x3 grid ================= */
.v3-screen .tab-body.v3-home-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.v3-grid {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
}
.v3-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 24px;
  background: var(--tone-s);
  color: var(--k-ink);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 30%, transparent);
  animation: v3-pop-in .55s var(--k-bounce) backwards;
  animation-delay: calc(.25s + var(--i, 0) * 70ms);
  transition: transform .25s var(--k-bounce), box-shadow .2s;
}
.v3-tile::before {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 14%, transparent);
}
.v3-tile::after {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--tone);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  position: absolute;
  top: 8px;
  right: 12px;
  color: var(--tone);
  font-size: 12px;
  opacity: 0;
  transition: opacity .2s;
}
.v3-tile:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 9px 0 color-mix(in srgb, var(--tone) 35%, transparent); }
.v3-tile:hover::after { opacity: 1; animation: v3-twinkle 1s ease-in-out infinite; }
.v3-tile:hover .v3-tile-ico { animation: v3-wiggle .6s ease-in-out; }
.v3-tile:active { transform: translateY(3px) scale(.97); box-shadow: 0 2px 0 color-mix(in srgb, var(--tone) 30%, transparent); }
.v3-tile-ico {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  color: var(--tone);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tone) 25%, transparent);
}
.v3-tile-ico .ico { width: 28px; height: 28px; }
.v3-tile-name { position: relative; margin-top: 4px; font-family: var(--k-head); font-size: 16px; font-weight: 800; line-height: 1.1; }
.v3-tile-meta {
  position: relative;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--k-muted);
}

/* ================= Screen content (re-skinned 1.0 screens) ================= */
.v3-screen .tab-body {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  padding: 12px 14px;
  overflow: auto;
}
.v3-screen .tab-body.wide-left { grid-template-columns: 1.35fr .9fr; }
.v3-screen .tab-body.single { grid-template-columns: 1fr; }
.v3-screen .tab-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: -4px;
  padding: 4px 4px 10px;
  overflow: auto;
}
/* content slides up in gentle steps */
.v3-screen .tab-col > * { animation: v3-rise .5s var(--k-bounce) backwards; }
.v3-screen .tab-col > :nth-child(1) { animation-delay: .25s; }
.v3-screen .tab-col > :nth-child(2) { animation-delay: .33s; }
.v3-screen .tab-col > :nth-child(3) { animation-delay: .41s; }
.v3-screen .tab-col > :nth-child(4) { animation-delay: .49s; }
.v3-screen .tab-col > :nth-child(n+5) { animation-delay: .57s; }

.v3-screen .tab-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 3px solid var(--k-line);
  border-radius: 22px;
  background: #fff;
}
.v3-screen .tab-panel.fill { flex: 1 0 auto; }
.v3-screen .tab-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }

/* Type */
.v3-screen .h1 { margin: 0 0 4px; font-family: var(--k-head); font-size: 22px; font-weight: 800; line-height: 1.15; }
.v3-screen .h2 { margin: 0 0 6px; font-family: var(--k-head); font-size: 17px; font-weight: 800; line-height: 1.2; }
.v3-screen .meta { font-size: 12px; color: var(--k-muted); }
.v3-screen .eyebrow,
.v3-screen .kicker { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-green-d); }
.v3-screen p { line-height: 1.5; }

/* Tips — sticky-note style */
.v3-screen .tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 2px dashed #FFD45C;
  border-radius: 16px;
  background: var(--k-yellow-s);
  color: #6b4f00;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.v3-screen .tip > span:not(.step-num) { flex: 1; min-width: 0; }
.v3-screen .step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--k-yellow);
  color: #4a3200;
  font-family: var(--k-head);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--k-yellow-d);
}

/* Chunky, pressable buttons */
.v3-screen .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 0;
  border-radius: 14px;
  background: #EEF1FA;
  color: var(--k-ink);
  font-family: var(--k-head);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 #d5dbec;
  transition: transform .12s ease, box-shadow .12s ease, filter .15s;
}
.v3-screen .btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 6px 0 #d5dbec; }
.v3-screen .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d5dbec; }
.v3-screen .btn.sm { padding: 6px 13px; font-size: 13px; border-radius: 12px; }
.v3-screen .btn.primary { background: var(--k-green); color: #fff; box-shadow: 0 4px 0 var(--k-green-d); }
.v3-screen .btn.primary:hover { box-shadow: 0 6px 0 var(--k-green-d); }
.v3-screen .btn.primary:active { box-shadow: 0 1px 0 var(--k-green-d); }
.v3-screen .btn.outline { background: #fff; color: var(--k-blue-d); box-shadow: inset 0 0 0 2px #cfe0ff, 0 4px 0 #cfe0ff; }
.v3-screen .btn.outline:hover { box-shadow: inset 0 0 0 2px #b5d0ff, 0 6px 0 #cfe0ff; }
.v3-screen .btn.outline:active { box-shadow: inset 0 0 0 2px #b5d0ff, 0 1px 0 #cfe0ff; }
.v3-screen .btn.ghost { background: #F1EBFF; color: #6D3FE0; box-shadow: 0 4px 0 #DED0FF; }
.v3-screen .btn.ghost:hover { box-shadow: 0 6px 0 #DED0FF; }
.v3-screen .btn.ghost:active { box-shadow: 0 1px 0 #DED0FF; }
.v3-screen .btn.recording,
.v3-screen .btn.pulse-cta { animation: v3-pulse 1.4s ease-in-out infinite; }
.v3-screen .btn.recording { background: var(--k-red); color: #fff; box-shadow: 0 4px 0 #c22d2d; }
.v3-screen button:disabled,
.v3-screen .btn[disabled] { opacity: .55; cursor: default; transform: none; }

/* Cards, pills, banners, rows */
.v3-screen .card {
  padding: 12px;
  border: 3px solid var(--k-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}
.v3-screen .card.selected { border-color: var(--k-green); background: var(--k-green-s); }
.v3-screen .card .name { font-family: var(--k-head); font-size: 15px; font-weight: 800; }
.v3-screen .pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--k-blue-s);
  color: var(--k-blue-d);
  font-family: var(--k-head);
  font-size: 12px;
  font-weight: 800;
}
.v3-screen .pill.on { background: var(--k-green-s); color: var(--k-green-d); }
.v3-screen .pill.warn { background: var(--k-yellow-s); color: #8a6a00; }
.v3-screen .banner {
  margin: 0 0 6px;
  padding: 10px 12px;
  border: 2px solid #BFE0FF;
  border-radius: 16px;
  background: #EAF5FF;
  color: #0b4a7a;
  font-size: 12.5px;
  font-weight: 700;
}
.v3-screen .banner.warn,
.v3-screen .banner.warn-flash { border-color: #FFD45C; background: var(--k-yellow-s); color: #6b4f00; }
.v3-screen .list-row {
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 2px solid var(--k-line);
  border-radius: 16px;
  background: #fff;
  transition: transform .2s var(--k-bounce), border-color .2s;
}
.v3-screen a.list-row:hover { transform: translateX(3px); border-color: #cfe0ff; }
.v3-screen .list-row .t { font-family: var(--k-head); font-size: 14px; font-weight: 800; }
.v3-screen .list-row .s { font-size: 11.5px; color: var(--k-muted); }
.v3-screen .stat-grid > * { border-radius: 18px; }
.v3-screen .progress { height: 12px; border-radius: 999px; background: #EEF0F7; overflow: hidden; }
.v3-screen .progress > i {
  height: 100%;
  border-radius: 999px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .28) 0 8px, transparent 8px 16px),
    linear-gradient(90deg, #4ADE80, var(--k-green-d));
  background-size: 32px 100%, 100% 100%;
  animation: v3-stripes 1s linear infinite, v3-grow .9s var(--k-bounce) backwards;
  transform-origin: left;
}

/* In-content language toggles (e.g. Dictation) */
.v3-screen .tab-body .lang-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--k-blue-s);
}
.v3-screen .tab-body .lang-seg span {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--k-muted);
  font-family: var(--k-head);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s var(--k-bounce);
}
.v3-screen .tab-body .lang-seg span.on { background: var(--k-blue); color: #fff; animation: v3-pop .4s var(--k-bounce); }

/* Inputs */
.v3-screen input:not([type=checkbox]):not([type=radio]):not([type=file]),
.v3-screen textarea,
.v3-screen select,
.v3-screen .ui-input {
  padding: 10px 14px;
  border: 3px solid var(--k-line);
  border-radius: 16px;
  background: #fff;
  color: var(--k-ink);
  font-family: var(--k-body);
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.v3-screen input:focus,
.v3-screen textarea:focus,
.v3-screen .ui-input:focus { border-color: var(--k-blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, .18); }
.v3-screen .tab-editor {
  flex: 1;
  min-height: 80px;
  padding: 12px;
  border: 3px dashed #FFD45C;
  border-radius: 18px;
  background: #FFFDF3;
  font-size: 13.5px;
  line-height: 1.6;
}

/* Chat */
.v3-screen .chat-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--k-line);
  border-radius: 20px;
  background: #F7FAFF;
}
.v3-screen .bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  animation: v3-bubble-in .45s var(--k-bounce) backwards;
}
.v3-screen .bubble.user {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--k-blue);
  color: #fff;
}
.v3-screen .bubble.bot {
  position: relative;
  align-self: flex-start;
  padding-left: 40px;
  border: 2px solid #CDEFD9;
  border-bottom-left-radius: 6px;
  background: #fff;
  color: var(--k-ink);
}
.v3-screen .bubble.bot::before { content: ""; position: absolute; left: 11px; top: 9px; width: 20px; height: 20px; background: var(--k-green-d); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"%3E%3Crect x="5" y="8" width="14" height="10" rx="3"/%3E%3Cpath d="M12 8V5M9 12h.01M15 12h.01M9 16h6"/%3E%3Ccircle cx="8" cy="5" r="1" fill="currentColor" stroke="none"/%3E%3Ccircle cx="16" cy="5" r="1" fill="currentColor" stroke="none"/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"%3E%3Crect x="5" y="8" width="14" height="10" rx="3"/%3E%3Cpath d="M12 8V5M9 12h.01M15 12h.01M9 16h6"/%3E%3Ccircle cx="8" cy="5" r="1" fill="currentColor" stroke="none"/%3E%3Ccircle cx="16" cy="5" r="1" fill="currentColor" stroke="none"/%3E%3C/svg%3E") center / contain no-repeat; }
.v3-screen .composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 20px;
  background: #F1F4FF;
}
.v3-screen .voice-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Quiz */
.v3-screen .quiz-choices { display: flex; flex-direction: column; gap: 10px; }
.v3-screen .quiz-choice {
  width: 100%;
  padding: 12px 16px;
  border: 3px solid var(--k-line);
  border-radius: 18px;
  background: #fff;
  color: var(--k-ink);
  font-family: var(--k-head);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--k-line);
  transition: transform .2s var(--k-bounce), border-color .2s, background .2s;
}
.v3-screen .quiz-choice:not(:disabled):hover { transform: translateY(-2px); border-color: #b5d0ff; }
.v3-screen .quiz-choice.selected { border-color: var(--k-blue); background: var(--k-blue-s); color: var(--k-blue-d); animation: v3-pop .35s var(--k-bounce); }
.v3-screen .quiz-choice.correct { border-color: var(--k-green); background: var(--k-green-s); color: var(--k-green-d); box-shadow: 0 4px 0 #b7ecc9; }
.v3-screen .quiz-choice.correct::after { content: ""; display: inline-block; width: 18px; height: 18px; margin-left: 8px; vertical-align: -3px; background: var(--k-yellow-d); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" stroke="black" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9z"/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" stroke="black" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9z"/%3E%3C/svg%3E") center / contain no-repeat; }
.v3-screen .quiz-choice.correct.selected { animation: v3-jump .6s var(--k-bounce); }
.v3-screen .quiz-choice.wrong { border-color: var(--k-red); background: var(--k-red-s); color: var(--k-red); animation: v3-shake .45s ease-in-out; }
.v3-screen .tab-score { padding: 4px 4px 0; text-align: center; }
.v3-screen .tab-score .n {
  font-family: var(--k-head);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: var(--k-green-d);
  animation: v3-pop-in .7s var(--k-bounce) .3s backwards;
}
.v3-screen .tab-score .m { margin: 4px 0 8px; font-size: 12px; color: var(--k-muted); }

/* Feature tiles used on inner screens (Apps, English modules) */
.v3-screen .tab-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}
.v3-screen .tab-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  overflow: hidden;
  border: 3px solid var(--k-line);
  border-radius: 20px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--k-line);
  transition: transform .25s var(--k-bounce), border-color .2s;
}
.v3-screen .tab-tile:hover { transform: translateY(-3px); border-color: #b7ecc9; }
.v3-screen .tab-tile.selected { border-color: var(--k-green); background: var(--k-green-s); }
.v3-screen .tab-tile .name { font-family: var(--k-head); font-size: 14px; font-weight: 800; }
.v3-screen .tab-tile .meta { font-size: 11px; }
.v3-screen .tab-tile .subject-thumb { width: 100%; height: 54px; object-fit: cover; border-radius: 14px; }
.v3-screen .kid-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  color: var(--k-green-d);
  box-shadow: 0 2px 0 var(--k-line);
}
.v3-screen .kid-badge .ico { width: 15px; height: 15px; }
.v3-screen .kid-app-ico { color: var(--k-green-d); }

/* OCR + essay feedback */
.v3-screen .ocr-lang-grid { display: flex; flex-direction: column; gap: 8px; }
.v3-screen .ocr-lang-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid var(--k-line);
  border-radius: 16px;
  background: #fff;
  font-size: 12.5px;
  line-height: 1.4;
}
.v3-screen .ocr-lang-row .t { font-family: var(--k-head); font-size: 14px; font-weight: 800; }
.v3-screen .ocr-lang-row .s { margin: 2px 0 6px; font-size: 11.5px; color: var(--k-muted); }
.v3-screen .essay-corrections { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.v3-screen .essay-corr-title { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--k-green-d); }
.v3-screen .essay-corr-item {
  padding: 10px 12px;
  border: 2px solid var(--k-line);
  border-left: 6px solid var(--k-green);
  border-radius: 14px;
  background: #fff;
  font-size: 12.5px;
  animation: v3-rise .45s var(--k-bounce) backwards;
}
.v3-screen .essay-corr-bad { margin-bottom: 2px; color: var(--k-red); text-decoration: line-through; }
.v3-screen .essay-corr-good { margin-bottom: 4px; color: var(--k-green-d); font-weight: 800; }
.v3-screen .essay-corr-why { font-size: 11.5px; color: var(--k-muted); }

/* Media: camera, video, word cards */
.v3-screen .photo-stage,
.v3-screen .lesson-video-wrap,
.v3-screen .home-hero { overflow: hidden; border-radius: 22px; }
.v3-screen .cam-frame { border-radius: 18px; border-width: 3px; }
.v3-screen .detected-chip,
.v3-screen .word-card { border-radius: 16px; font-family: var(--k-head); }
.v3-screen .video-play-overlay { transition: transform .25s var(--k-bounce); }
.v3-screen .video-play-overlay:hover { transform: scale(1.06); }

/* Soft-lock banner (shown only while paused) */
.v3-screen .lock-banner {
  display: none;
  padding: 8px 12px;
  border: 2px solid #FFD45C;
  border-radius: 16px;
  background: var(--k-yellow-s);
  color: #6b4f00;
  font-size: 12px;
  font-weight: 800;
}
html[data-soft-lock="1"] .v3-screen .lock-banner { display: block; }

/* ================= Effects layer (confetti / sparkles) ================= */
.v3-fx { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.v3-fx i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  font-style: normal;
  animation: v3-burst var(--t, .9s) cubic-bezier(.2, .7, .3, 1) forwards;
}
.v3-fx i.star { width: auto; height: auto; background: none !important; font-size: 14px; line-height: 1; }

/* ================= Keyframes ================= */
@keyframes v3-pop-in { 0% { opacity: 0; transform: scale(.5) rotate(-6deg); } 70% { opacity: 1; transform: scale(1.06) rotate(1deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes v3-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes v3-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes v3-drop { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@keyframes v3-slide-r { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes v3-bubble-in { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes v3-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes v3-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-6px) scale(1.08); } 70% { transform: translateY(1px) scale(.97); } 100% { transform: none; } }
@keyframes v3-jump { 0% { transform: translateY(0) scale(1); } 25% { transform: translateY(4px) scale(1.06, .92); } 55% { transform: translateY(-22px) scale(.95, 1.06); } 80% { transform: translateY(2px) scale(1.04, .96); } 100% { transform: none; } }
@keyframes v3-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes v3-shadow { 0%, 100% { transform: scaleX(1); opacity: .08; } 50% { transform: scaleX(.85); opacity: .05; } }
@keyframes v3-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes v3-wave { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-40deg); } 82% { transform: rotate(-15deg); } 88% { transform: rotate(-40deg); } 94% { transform: rotate(0); } }
@keyframes v3-flap { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-28deg); } }
@keyframes v3-swing { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes v3-flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.15) rotate(3deg); } }
@keyframes v3-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes v3-twinkle { 0%, 100% { opacity: .3; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(20deg); } }
@keyframes v3-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes v3-drift { from { transform: translateX(0); } to { transform: translateX(1300px); } }
@keyframes v3-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes v3-stripes { from { background-position: 0 0, 0 0; } to { background-position: 32px 0, 0 0; } }
@keyframes v3-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes v3-burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(.6); }
}

@media (prefers-reduced-motion: reduce) {
  .v3-stage *,
  .v3-stage *::before,
  .v3-stage *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ================= Responsive (by device width) ================= */
@container (max-width: 980px) {
  .v3-profile-copy { display: none; }
  .v3-mission-label > span[data-i18n] { display: none; }
  .v3-profile { padding: 3px; }
  .v3-nav-item { padding: 3px 4px 5px; }
  .v3-nav-ico { width: 32px; height: 32px; }
}
@container (max-width: 680px) {
  .v3-nav-label { display: none; }
  .v3-main { grid-template-columns: 150px 1fr; }
  .v3-owl-svg { width: 84px; }
  .v3-tile-ico { width: 42px; height: 42px; border-radius: 14px; }
  .v3-tile-name { font-size: 13px; }
  .v3-screen .tab-body { grid-template-columns: 1fr; }
}

/* ================= Fit: keep every screen inside the 16:10 device =================
   Inner screens use a compact kid scale so actions stay visible without scrolling. */
.v3-main { padding: 8px 10px 6px; gap: 10px; }
.v3-top { margin-top: 4px; padding: 4px 8px; }
.v3-nav-ico { width: 32px; height: 32px; border-radius: 11px; }
.v3-nav-ico .ico { width: 17px; height: 17px; }
.v3-content-head { padding: 5px 12px; }
.v3-content-head .title { font-size: 16px; }
.v3-back { width: 28px; height: 28px; font-size: 20px; }

.v3-screen .tab-body { gap: 10px; padding: 8px 12px; }
.v3-screen .tab-col { gap: 7px; }
.v3-screen .tab-panel { gap: 6px; padding: 9px 10px; border-width: 2px; border-radius: 18px; }
.v3-screen .tip { padding: 5px 9px; font-size: 11.5px; line-height: 1.35; border-radius: 14px; }
.v3-screen .step-num { width: 19px; height: 19px; font-size: 11px; }
.v3-screen .h1 { font-size: 19px; }
.v3-screen .h2 { font-size: 15px; margin-bottom: 4px; }
.v3-screen .meta { font-size: 11.5px; }
.v3-screen .btn { padding: 6px 13px; font-size: 13px; box-shadow: 0 3px 0 #d5dbec; }
.v3-screen .btn.sm { padding: 5px 11px; font-size: 12.5px; }
.v3-screen .btn.primary { box-shadow: 0 3px 0 var(--k-green-d); }
.v3-screen .btn.outline { box-shadow: inset 0 0 0 2px #cfe0ff, 0 3px 0 #cfe0ff; }
.v3-screen .btn.ghost { box-shadow: 0 3px 0 #DED0FF; }
.v3-screen .card { padding: 9px 10px; border-width: 2px; }
.v3-screen .banner { padding: 7px 10px; font-size: 12px; }
.v3-screen .list-row { padding: 7px 10px; margin-bottom: 6px; }
.v3-screen .list-row .t { font-size: 13px; }
.v3-screen .quiz-choices { gap: 7px; }
.v3-screen .quiz-choice { padding: 8px 14px; font-size: 14.5px; border-width: 2px; box-shadow: 0 3px 0 var(--k-line); }
.v3-screen .chat-area { gap: 8px; padding: 9px; }
.v3-screen .bubble { padding: 8px 12px; font-size: 13px; }
.v3-screen .composer { padding: 6px; }
.v3-screen input:not([type=checkbox]):not([type=radio]):not([type=file]),
.v3-screen textarea,
.v3-screen .ui-input { padding: 7px 12px; font-size: 13.5px; border-width: 2px; }
.v3-screen .tab-feature-grid { gap: 8px; }
.v3-screen .tab-tile { padding: 7px; border-width: 2px; }
.v3-screen .tab-tile .subject-thumb { height: 40px; }
.v3-screen .ocr-lang-row { padding: 7px 10px; }
.v3-screen .tab-editor { padding: 9px; }

/* Content that still scrolls gets a clear, chunky scrollbar */
.v3-screen .tab-col,
.v3-screen .tab-body,
.v3-mascot { scrollbar-width: auto; scrollbar-color: #b9c6e8 #eef2fb; }
.v3-screen .tab-col::-webkit-scrollbar,
.v3-screen .tab-body::-webkit-scrollbar { width: 8px; }
.v3-screen .tab-col::-webkit-scrollbar-thumb,
.v3-screen .tab-body::-webkit-scrollbar-thumb { border-radius: 999px; background: #b9c6e8; }

/* Keep photos from pushing actions off-screen */
.v3-screen .photo-stage { min-height: 110px; max-height: 210px; }
.v3-screen .tab-col > img,
.v3-screen .tab-panel > img:not(.subject-thumb),
.v3-screen .card > img { width: 100%; height: auto; max-height: 96px; object-fit: cover; border-radius: 14px; }
.v3-screen .tab-col { padding-bottom: 6px; }

/* "More below" cue for content that still scrolls (class set by tablet-v3.js) */
.v3-screen .tab-col.v3-more {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 34px), rgba(0, 0, 0, .15));
  mask-image: linear-gradient(#000 calc(100% - 34px), rgba(0, 0, 0, .15));
}
.v3-more-cue {
  position: absolute;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--k-blue);
  color: #fff;
  font-family: var(--k-head);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--k-blue-d);
  animation: v3-nudge 1.4s ease-in-out infinite;
}
@keyframes v3-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Panels and cards inside a scrolling column keep their full height;
   the column scrolls instead of squeezing content out of its box. */
.v3-screen .tab-col > * { flex-shrink: 0; }

/* Home grid: bigger tiles — less chrome around the grid, contents scale with the device */
.v3-screen .tab-body.v3-home-body { padding: 8px; }
.v3-grid { gap: 10px; }
.v3-tile { gap: 4px; border-radius: 26px; }
.v3-tile-ico {
  width: clamp(54px, 7.2cqw, 88px);
  height: clamp(54px, 7.2cqw, 88px);
  border-radius: clamp(18px, 2.2cqw, 26px);
}
.v3-tile-ico .ico { width: 52%; height: 52%; }
.v3-tile-name { margin-top: 6px; font-size: clamp(16px, 2cqw, 24px); }
.v3-tile-meta { font-size: clamp(10.5px, 1.25cqw, 14px); padding: 2px 10px; }
.v3-tile::before { width: 34%; height: auto; aspect-ratio: 1; right: -8%; top: -12%; }

/* ================= Static device: page never scrolls =================
   On 3.0 pages the tablet stays fixed in the middle area at any screen size
   (iPad included); only the right guide panel scrolls. */
:root { --v3-vh: 100vh; }
@supports (height: 100dvh) {
  :root { --v3-vh: 100dvh; }
}
:root { --v3-avail-h: calc(var(--v3-vh) - var(--proto-bar)); }
html:has(body[data-pov="children3"]),
body[data-pov="children3"] {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body[data-pov="children3"] .proto-layout {
  height: var(--v3-vh);
  min-height: 0;
  grid-template-columns: 1fr var(--guide-w);
  grid-template-rows: 100%;
}
body[data-pov="children3"] .proto-main {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body[data-pov="children3"] .proto-main > .proto-bar { flex-shrink: 0; }
body[data-pov="children3"] .v3-stage { flex: 1 1 0; height: auto; }
body[data-pov="children3"] .guide-pane {
  position: relative;
  top: auto;
  height: 100%;
  min-height: 0;
  max-height: none;
  border-top: 0;
  border-left: 1px solid var(--line);
}
body[data-pov="children3"] .guide-pane .guide-scroll { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* iPad portrait and small laptops: slimmer guide panel, tablet keeps the middle */
@media (max-width: 1100px) {
  body[data-pov="children3"] { --guide-w: 240px; }
}
/* Phones: tablet fixed on top, guide panel below it is the only scroller */
@media (max-width: 700px) {
  body[data-pov="children3"] .proto-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  body[data-pov="children3"] .proto-main { height: auto; }
  body[data-pov="children3"] .v3-stage { flex: 0 0 auto; padding: 8px; }
  body[data-pov="children3"] .v3-frame:not(.v3-scaled) { width: min(100%, calc((var(--v3-avail-h) * .62 - 40px) * 1.6 + 16px)); border-width: 8px; border-radius: 16px; }
  body[data-pov="children3"] .guide-pane { border-left: 0; border-top: 1px solid var(--line); }
}

/* Very small devices: keep the layout, slim the chrome */
@container (max-width: 560px) {
  .v3-main { grid-template-columns: 112px 1fr; gap: 6px; padding: 6px; }
  .v3-today, .v3-mascot-name { display: none; }
  .v3-bubble { font-size: 11px; padding: 6px; }
  .v3-owl-svg { width: 64px; }
  .v3-top { gap: 6px; margin: 4px 6px 0; }
  .v3-mission { padding-left: 6px; }
  .v3-credit { display: none; }
  .v3-continue { padding: 5px; }
  .v3-continue-t { font-size: 11px; }
  .v3-tile-meta { display: none; }
}

/* ================= Fixed design size, scaled to fit =================
   tablet-v3.js adds .v3-scaled and sets --v3-scale so the device is always laid
   out at 1120x700 (+12px bezel) and scaled as a whole: identical on iPad,
   laptop and large screens. Without JS the fluid sizing above still applies. */
.v3-stage { overflow: hidden; }
.v3-frame.v3-scaled {
  flex: 0 0 auto;
  width: 1144px;
  transform: scale(var(--v3-scale, 1));
  transform-origin: center center;
}
@media (max-width: 700px) {
  body[data-pov="children3"] .v3-stage { height: calc((100vw - 16px) / 1.58); }
}

/* iPad portrait: hide the guide panel so the tablet gets the full width */
@media (orientation: portrait) and (min-width: 701px) and (max-width: 1100px) {
  body[data-pov="children3"] .proto-layout { grid-template-columns: 1fr; }
  body[data-pov="children3"] .guide-pane { display: none; }
}

/* ================= Structure of the original app: nav, hubs, tray =================
   Extra tones */
.v3-t-orange { --tone: #F97316; --tone-s: #FFEBDD; }
.v3-t-gold   { --tone: #D99A00; --tone-s: #FFF2C9; }
.v3-t-pink   { --tone: #EC4899; --tone-s: #FFE4F1; }
.v3-t-teal   { --tone: #0D9488; --tone-s: #D9F7F2; }
.v3-t-indigo { --tone: #6366F1; --tone-s: #E8E9FF; }
.v3-t-sky    { --tone: #0284C7; --tone-s: #DDF1FF; }

/* 10 nav tabs + language pod + profile must fit one row */
.v3-nav { gap: 0; }
.v3-nav-item { min-width: 50px; padding: 3px 3px 5px; font-size: 11px; }
.v3-nav-label { max-width: 60px; overflow: hidden; text-overflow: ellipsis; }
.v3-top { position: relative; z-index: 30; gap: 8px; }
.v3-mission { padding-left: 10px; gap: 5px; }
.v3-lang span { padding: 3px 8px; }
.v3-tray-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform .25s var(--k-bounce), background .2s;
}
.v3-tray-btn:hover { background: rgba(255, 255, 255, .22); transform: rotate(40deg) scale(1.1); }
.v3-tray-btn.open { background: var(--k-yellow); transform: rotate(90deg); }

/* ---- Quick settings tray ---- */
.v3-tray {
  position: absolute;
  top: calc(100% + 8px);
  right: 4px;
  z-index: 40;
  width: 350px;
  padding: 12px;
  border: 3px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(43, 45, 66, .28), 0 0 0 1px var(--k-line);
  transform-origin: 90% 0;
  animation: v3-pop .35s var(--k-bounce) backwards;
}
.v3-tray[hidden] { display: none; }
.v3-tray-head { margin-bottom: 8px; font-family: var(--k-head); font-size: 16px; font-weight: 800; }
.v3-fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v3-fx-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 16px;
  background: var(--k-blue-s);
  color: var(--k-ink);
  font-family: var(--k-head);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 0 #cfe0ff;
  transition: transform .12s, box-shadow .12s, background .2s;
}
.v3-fx-chip:hover { transform: translateY(-1px); }
.v3-fx-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 #cfe0ff; }
.v3-fx-chip.on { background: var(--k-green-s); box-shadow: 0 3px 0 #b7ecc9; }
.v3-fx-ico { width: 30px; height: 30px; display: grid; place-items: center; flex-shrink: 0; border-radius: 10px; background: #fff; font-size: 16px; }
.v3-fx-name { flex: 1; min-width: 0; }
.v3-fx-state { padding: 1px 8px; border-radius: 999px; background: #fff; color: var(--k-muted); font-size: 11px; }
.v3-fx-chip.on .v3-fx-state { background: var(--k-green); color: #fff; }
.v3-fx-state.go { padding: 0 6px; font-size: 16px; }
.v3-fx-chip.busy { pointer-events: none; }
.v3-fx-chip.busy .v3-fx-ico { animation: v3-spin .8s linear infinite; }
.v3-credits { margin: 10px 2px 6px; }
.v3-credits-row { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 12px; color: var(--k-muted); }
.v3-credits-row b { font-family: var(--k-head); color: var(--k-ink); }
.v3-tray-link {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--k-yellow-s);
  color: #6b4f00;
  font-family: var(--k-head);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.v3-tray-link:hover { background: #ffedaa; }

/* Quick-setting effects on the device screen */
.v3-screen.fx-blue::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: rgba(255, 150, 30, .2);
  mix-blend-mode: multiply;
  animation: v3-fade-in .6s ease backwards;
}
.v3-screen.fx-read .v3-app { background: #F5EEDB; filter: sepia(.45) saturate(.75) contrast(.97); }
.v3-eye-chip { font-style: normal; margin-right: 4px; }

/* Toast + textbook sheet (inside the device) */
.v3-toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  max-width: 80%;
  padding: 8px 18px;
  border-radius: 999px;
  background: #2B2D42;
  color: #fff;
  font-family: var(--k-head);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 20px rgba(43, 45, 66, .3);
  transform: translateX(-50%);
}
.v3-toast[hidden] { display: none; }
.v3-toast.show { animation: v3-toast-in .4s var(--k-bounce) backwards; }
.v3-sheet-wrap {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  background: rgba(43, 45, 66, .45);
  animation: v3-fade-in .2s ease backwards;
}
.v3-sheet-wrap[hidden] { display: none; }
.v3-sheet {
  width: min(520px, 86%);
  padding: 14px 18px 16px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
  animation: v3-pop .35s var(--k-bounce) backwards;
}
.v3-sheet h3 { margin: 0 0 4px; font-family: var(--k-head); font-size: 20px; font-weight: 800; }
.v3-sheet h4 { margin: 8px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.v3-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v3-chip {
  padding: 5px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--k-blue-s);
  color: var(--k-blue-d);
  font-family: var(--k-head);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s var(--k-bounce);
}
.v3-chip:hover { transform: translateY(-2px); }
.v3-chip.on { background: var(--k-green); color: #fff; animation: v3-pop .3s var(--k-bounce); }
.v3-sheet-done { margin-top: 12px; width: 100%; justify-content: center; }

/* ---- Subject hubs (Chinese, English, Bahasa, Math, Science, AR, Boost, Premium, Quality) ---- */
.v3-screen .tab-body.v3-hub-body { display: flex; flex-direction: column; padding: 8px 10px 10px; }
.v3-hub { flex: 1 1 0; min-height: 0; display: grid; gap: 10px; }
.v3-hub-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 4px;
  padding: 12px 14px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 22px;
  background: linear-gradient(155deg, var(--tone-s) 0%, color-mix(in srgb, var(--tone-s) 55%, #fff) 100%);
  color: var(--k-ink);
  text-decoration: none;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 28%, transparent);
  animation: v3-pop-in .5s var(--k-bounce) backwards;
  animation-delay: calc(.2s + var(--i, 0) * 45ms);
  transition: transform .25s var(--k-bounce), box-shadow .2s;
}
.v3-hub-tile::before {
  content: "";
  position: absolute;
  right: -22px;
  top: -22px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 13%, transparent);
}
.v3-hub-tile:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 9px 0 color-mix(in srgb, var(--tone) 33%, transparent); }
.v3-hub-tile:hover .v3-hub-art { animation: v3-wiggle .6s ease-in-out; }
.v3-hub-tile:active { transform: translateY(3px) scale(.98); box-shadow: 0 2px 0 color-mix(in srgb, var(--tone) 28%, transparent); }
.v3-hub-name {
  position: relative;
  z-index: 1;
  font-family: var(--k-head);
  font-size: clamp(14px, 1.45cqw, 18px);
  font-weight: 800;
  line-height: 1.12;
}
.v3-hub-meta {
  position: relative;
  z-index: 1;
  justify-self: start;
  align-self: start;
  margin-top: 2px;
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  font-size: 11px;
  font-weight: 700;
  color: var(--k-muted);
}
.v3-hub-tile:has(.v3-hub-meta) { grid-template-rows: auto auto 1fr; }
.v3-hub-art {
  position: relative;
  align-self: end;
  justify-self: end;
  width: clamp(44px, 5.2cqw, 62px);
  height: clamp(44px, 5.2cqw, 62px);
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  font-size: clamp(24px, 3cqw, 36px);
  line-height: 1;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tone) 24%, transparent);
}
.v3-hub-tile.big { grid-template-rows: 1fr auto; text-align: center; padding: 16px 12px 14px; }
.v3-hub-tile.big .v3-hub-art { grid-row: 1; justify-self: center; align-self: center; width: clamp(72px, 9cqw, 104px); height: clamp(72px, 9cqw, 104px); border-radius: 28px; font-size: clamp(40px, 5.2cqw, 60px); }
.v3-hub-tile.big .v3-hub-name { grid-row: 2; font-size: clamp(16px, 1.9cqw, 22px); }
.v3-new {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--k-yellow);
  color: #4a3200;
  font-family: var(--k-head);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 2px 0 var(--k-yellow-d);
  animation: v3-pulse 2s ease-in-out infinite 1.4s;
}
.v3-lock { position: absolute; top: 8px; right: 10px; z-index: 2; font-size: 20px; font-style: normal; }
.v3-lock.shake { animation: v3-shake .45s ease-in-out; }
.v3-hub-tile.locked { filter: saturate(.55); }
.v3-hub-tile.locked .v3-hub-art { opacity: .75; }

/* Textbook card (Math / Science) */
.v3-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 10px 8px;
  border: 3px solid #fff;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff 0%, #F3F7FF 100%);
  box-shadow: 0 5px 0 var(--k-line);
  animation: v3-pop-in .5s var(--k-bounce) backwards .15s;
}
.v3-book-cover {
  position: relative;
  width: min(100%, 118px);
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 10px 8px 16px;
  border-radius: 6px 14px 14px 6px;
  background: linear-gradient(145deg, #FFD050 0%, #F59E0B 100%);
  color: #fff;
  font-family: var(--k-head);
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
  box-shadow: inset 7px 0 0 rgba(0, 0, 0, .13), 0 10px 16px rgba(43, 45, 66, .22);
  transform-origin: left center;
}
.v3-book-science .v3-book-cover { background: linear-gradient(145deg, #7BE0A3 0%, #1AAE5F 100%); }
.v3-book.flip .v3-book-cover { animation: v3-flip .55s var(--k-bounce); }
.v3-book-cover b { display: block; font-weight: 800; line-height: 1.15; }
.v3-book-ed { font-size: 15px; }
.v3-book-gr { font-size: 15px; }
.v3-book-sj { align-self: stretch; padding-top: 6px; border-top: 3px solid rgba(255, 255, 255, .55); font-size: 22px; }
.v3-book-cap { font-size: 11px; font-weight: 700; line-height: 1.25; text-align: center; color: var(--k-muted); }
.v3-book-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--k-blue);
  color: #fff;
  font-family: var(--k-head);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--k-blue-d);
  transition: transform .12s, box-shadow .12s;
}
.v3-book-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--k-blue-d); }
.v3-book-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--k-blue-d); }
.v3-book-btn i { font-size: 9px; font-style: normal; }

/* AR Smart Eye: AI carousel */
.v3-carousel {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 22px;
  background: linear-gradient(160deg, #E4EEFF 0%, #F1F6FF 100%);
  box-shadow: 0 5px 0 #cfe0ff;
}
.v3-car-track { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px; }
.v3-car-track::-webkit-scrollbar { display: none; }
.v3-car-track .v3-hub-tile { flex: 0 0 calc((100% - 20px) / 3); scroll-snap-align: start; }
.v3-car-btn {
  align-self: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--k-blue);
  color: #fff;
  font-family: var(--k-head);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--k-blue-d);
}
.v3-car-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.v3-car-btn:not(:disabled):hover { animation: v3-pulse .6s ease-in-out; }

/* Topic page: level path */
.v3-screen .tab-body.v3-topic-body { display: flex; flex-direction: column; padding: 10px 14px; }
.v3-topic { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: stretch; }
.v3-path { margin: 0; padding: 0 4px; list-style: none; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 0; }
.v3-lv {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: calc(var(--n) % 2 * 34px);
  padding: 6px 14px 6px 8px;
  border: 3px solid #fff;
  border-radius: 20px;
  background: var(--tone-s);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--tone) 22%, transparent);
  animation: v3-slide-r .5s var(--k-bounce) backwards;
  animation-delay: calc(.15s + var(--n) * 70ms);
}
.v3-lv-dot {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tone);
  color: #fff;
  font-family: var(--k-head);
  font-size: 18px;
  font-weight: 800;
}
.v3-lv-name { flex: 1; display: flex; flex-direction: column; line-height: 1.1; }
.v3-lv-name small { font-size: 10.5px; font-weight: 700; color: var(--k-muted); }
.v3-lv-name b { font-family: var(--k-head); font-size: 16px; font-weight: 800; }
.v3-lv-stars { font-size: 13px; letter-spacing: 1px; }
.v3-lv-done .v3-lv-dot { background: var(--k-green); }
.v3-lv-now { background: #fff; border-color: var(--tone); }
.v3-lv-now .v3-lv-dot { animation: v3-ring 1.6s ease-out infinite; }
.v3-lv-locked { background: #F1F3F8; box-shadow: 0 4px 0 #e0e4ee; }
.v3-lv-locked .v3-lv-dot { background: #c3c9da; font-size: 15px; }
.v3-lv-locked .v3-lv-name b { color: var(--k-muted); }
.v3-goal {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 16px;
  border: 3px solid #fff;
  border-radius: 26px;
  background: linear-gradient(160deg, var(--tone-s) 0%, #fff 100%);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--tone) 22%, transparent);
  text-align: center;
  animation: v3-pop-in .55s var(--k-bounce) backwards .3s;
}
.v3-goal-art {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: #fff;
  font-size: 50px;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 24%, transparent);
  animation: v3-bob 3s ease-in-out infinite;
}
.v3-goal-name { margin: 10px 0 2px; font-family: var(--k-head); font-size: 22px; font-weight: 800; line-height: 1.1; }
.v3-goal-k { margin: 6px 0 0; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tone); }
.v3-goal-text { margin: 2px 0 12px; font-size: 13px; color: var(--k-muted); }
.v3-goal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

@keyframes v3-spin { to { transform: rotate(360deg); } }
@keyframes v3-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes v3-toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes v3-flip { 0% { transform: perspective(500px) rotateY(0); } 50% { transform: perspective(500px) rotateY(-70deg); } 100% { transform: perspective(500px) rotateY(0); } }
@keyframes v3-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone) 45%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }


/* ================= Full screen: the app fills the screen, no mock device ================= */
html.proto-focus .v3-stage { padding: 0; background: var(--k-bg); }
html.proto-focus .v3-frame,
html.proto-focus .v3-frame.v3-scaled { width: 1120px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
html.proto-focus .v3-frame::before { display: none; }
html.proto-focus .v3-screen { border-radius: 0; }
html.proto-focus .v3-status,
html.proto-focus .v3-homebar { display: none; }
@media (max-width: 700px) {
  html.proto-focus body[data-pov="children3"] .v3-stage { flex: 1 1 0; height: auto; }
}


/* ================= 3x3 on every screen + animated strip ================= */
/* Hub = 3x3 grid, strip underneath. */
.v3-screen .tab-body.v3-hub-body { display: flex; flex-direction: column; padding: 8px 10px 8px; }
.v3-hub { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.v3-hub-grid {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.v3-hub-tile { padding: 8px 12px; border-radius: 20px; }
.v3-hub-tile:hover { transform: translateY(-3px) rotate(-.5deg); }
.v3-hub-name { font-size: clamp(13px, 1.5cqw, 17px); max-width: 78%; }
.v3-hub-art {
  width: clamp(40px, 4.6cqw, 54px);
  height: clamp(40px, 4.6cqw, 54px);
  border-radius: 16px;
  color: var(--tone);
}
.v3-hub-art .v3-i, .v3-hub-art svg { width: 54%; height: 54%; }
.v3-hub-meta { font-size: 10.5px; }
.v3-lock .v3-i { width: 20px; height: 20px; color: var(--k-muted); }

/* Home grid shares the 3x3 + strip body */
.v3-screen .tab-body.v3-home-body { gap: 8px; padding: 8px 10px; }
.v3-grid { gap: 8px; }
.v3-tile { border-radius: 22px; }
.v3-tile-ico .ico, .v3-tile-ico svg { width: 52%; height: 52%; }

/* The strip: three icons visible, scrolls sideways, animated */
.v3-carousel {
  flex: 0 0 auto;
  height: 88px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 24px;
  background: linear-gradient(160deg, #E4EEFF 0%, #F3F7FF 100%);
  box-shadow: 0 4px 0 #cfe0ff;
  animation: v3-rise .55s var(--k-bounce) backwards .5s;
}
.v3-car-track {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  padding: 0 12px;
}
.v3-car-track::-webkit-scrollbar { display: none; }
.v3-car-item {
  position: relative;
  flex: 0 0 calc((100% - 20px) / 3);
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  border: 3px solid #fff;
  border-radius: 20px;
  background: linear-gradient(155deg, var(--tone-s), #fff);
  color: var(--k-ink);
  text-decoration: none;
  scroll-snap-align: start;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 26%, transparent);
  transition: transform .25s var(--k-bounce), box-shadow .2s;
}
/* a gentle pop once the strip has come to rest, never while it is moving */
.v3-car-item.pop .v3-car-ico { animation: v3-pop .45s var(--k-bounce); }
@media (hover: hover) {
  .v3-car-track:not(.moving) .v3-car-item:hover { transform: translateY(-3px); box-shadow: 0 6px 0 color-mix(in srgb, var(--tone) 30%, transparent); }
  .v3-car-track:not(.moving) .v3-car-item:hover .v3-car-ico { animation: v3-wiggle .6s ease-in-out; }
}
.v3-car-track.moving .v3-car-item { pointer-events: none; }
.v3-car-item:active { transform: translateY(2px) scale(.97); }
.v3-car-ico {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  color: var(--tone);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 24%, transparent);
  animation: v3-bob 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -.45s);
}
.v3-car-ico svg { width: 56%; height: 56%; }
.v3-car-name { font-family: var(--k-head); font-size: 15px; font-weight: 800; line-height: 1.12; }
.v3-car-item .v3-new { top: 4px; right: 6px; }
.v3-car-btn {
  align-self: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--k-blue);
  color: #fff;
  font-family: var(--k-head);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--k-blue-d);
  transition: transform .15s var(--k-bounce);
}
.v3-car-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.v3-car-btn:not(:disabled):hover { transform: scale(1.12); }
.v3-car-btn:not(:disabled):active { transform: scale(.92); }

/* ---- SVG icon sizing everywhere ---- */
.v3-i { width: 1em; height: 1em; display: block; }
.v3-sound .v3-i, .v3-tray-btn .v3-i, .v3-tray-btn .ico { width: 15px; height: 15px; }
.v3-fx-ico .v3-i { width: 17px; height: 17px; }
.v3-flame .v3-i, .v3-stat-mins .v3-i { width: 15px; height: 15px; }
.v3-today b { display: flex; align-items: center; justify-content: center; gap: 3px; }
.v3-today i { display: inline-grid; }
.v3-flame { color: #F97316; }
.v3-stat-mins i { color: var(--k-blue); }
.v3-star { display: inline-grid; width: 12px; height: 12px; margin: 0 3px 0 4px; vertical-align: -2px; color: var(--k-yellow-d); }
.v3-star .v3-i { width: 12px; height: 12px; fill: currentColor; }
.v3-dot { margin: 0 2px; }
.v3-profile-sub { display: inline-flex; align-items: center; }
.v3-eye-chip { display: inline-grid; width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; }
.v3-eye-chip .v3-i { width: 13px; height: 13px; }
.v3-lv-dot svg { width: 20px; height: 20px; }
.v3-lv-stars { display: inline-flex; gap: 2px; }
.v3-star-on { width: 15px; height: 15px; color: var(--k-yellow-d); fill: currentColor; }
.v3-goal-art svg { width: 54%; height: 54%; color: var(--tone); }

/* ---- Textbook chip in the screen header (Math / Science) ---- */
.v3-book-chip {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px 3px 4px;
  border: 0;
  border-radius: 16px;
  background: var(--k-blue-s);
  color: var(--k-ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 0 #cfe0ff;
  transition: transform .12s, box-shadow .12s;
}
.v3-book-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #cfe0ff; }
.v3-book-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 #cfe0ff; }
.v3-book-mini {
  width: 30px;
  height: 38px;
  display: grid;
  place-items: end start;
  padding: 3px 4px;
  border-radius: 3px 8px 8px 3px;
  background: linear-gradient(145deg, #FFD050, #F59E0B);
  color: #fff;
  font-family: var(--k-head);
  font-size: 11px;
  box-shadow: inset 4px 0 0 rgba(0, 0, 0, .13);
}
.v3-book-science .v3-book-mini { background: linear-gradient(145deg, #7BE0A3, #1AAE5F); }
.v3-book-mini b { font-weight: 800; line-height: 1; }
.v3-book-chip.flip .v3-book-mini { animation: v3-flip .55s var(--k-bounce); }
.v3-book-text { display: flex; flex-direction: column; line-height: 1.15; }
.v3-book-text b { font-family: var(--k-head); font-size: 13px; font-weight: 800; }
.v3-book-text small { font-size: 10.5px; font-weight: 700; color: var(--k-blue-d); }

/* ---- Welcome / login: the first screen (V icon) ---- */
.v3-logo { position: relative; }
.v3-logo.on::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--k-green); }
.v3-screen .tab-body.v3-welcome-body { display: flex; padding: 12px; }
.v3-welcome {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(160deg, #7ED321 0%, #4CC52A 55%, #25CC68 100%);
  color: #fff;
  text-decoration: none;
  text-align: center;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .1), 0 8px 0 #1b9a4d;
  animation: v3-pop-in .6s var(--k-bounce) backwards .15s;
  transition: transform .2s var(--k-bounce), box-shadow .2s;
}
.v3-welcome:hover { transform: translateY(-3px); box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .1), 0 12px 0 #1b9a4d; }
.v3-welcome:active { transform: translateY(5px); box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .1), 0 3px 0 #1b9a4d; }
.v3-wel-bg i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14); animation: v3-float 8s ease-in-out infinite; }
.v3-wel-bg .a { width: 190px; height: 190px; left: -50px; top: -60px; }
.v3-wel-bg .b { width: 130px; height: 130px; right: 6%; top: 8%; animation-delay: -2s; }
.v3-wel-bg .c { width: 90px; height: 90px; left: 10%; bottom: 8%; animation-delay: -4s; }
.v3-wel-bg .d { width: 230px; height: 230px; right: -70px; bottom: -90px; animation-delay: -6s; }
.v3-wel-bg .e { width: 46px; height: 46px; left: 52%; top: 14%; animation-delay: -3s; background: rgba(255, 201, 60, .5); }
.v3-wel-mark { position: relative; width: 96px; height: 96px; display: grid; place-items: center; border-radius: 30px; background: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .14); animation: v3-bob 3s ease-in-out infinite; }
.v3-wel-mark img { width: 64px; height: 64px; display: block; }
.v3-wel-title { position: relative; font-family: var(--k-head); font-size: clamp(40px, 6.6cqw, 78px); font-weight: 800; line-height: 1; letter-spacing: .02em; text-shadow: 0 5px 0 rgba(0, 0, 0, .16); }
.v3-wel-sub { position: relative; font-size: 13px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; opacity: .92; }
.v3-wel-cta {
  position: relative;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px 12px 24px;
  border-radius: 999px;
  background: #fff;
  color: #17A653;
  font-family: var(--k-head);
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .16);
  animation: v3-pulse 2.2s ease-in-out infinite 1.2s;
}
.v3-wel-cta-ico { display: inline-grid; width: 26px; height: 26px; }
.v3-wel-cta-ico .v3-i { width: 26px; height: 26px; }
.v3-wel-cta i { font-style: normal; font-size: 30px; line-height: 1; }

/* Home tiles: square icon chip that fits the 3x3 cell height */
.v3-tile-ico { width: 54px; height: 54px; border-radius: 18px; flex-shrink: 0; }
.v3-tile-ico .ico { width: 30px; height: 30px; display: grid; place-items: center; }
.v3-tile-ico .ico svg, .v3-tile-ico svg { width: 30px; height: 30px; }
.v3-tile { gap: 2px; }
.v3-tile-name { margin-top: 2px; font-size: clamp(16px, 1.9cqw, 22px); }

/* No prototype click pop-ups over the kids' tablet */
body[data-pov="children3"] .spark-tip,
body[data-pov="children3"] .screen-helper { display: none !important; }


/* ================= Nothing inside the tablet drags around =================
   Only the strip moves, and only sideways, one page of three at a time. */
.v3-screen,
.v3-app,
.v3-main,
.v3-content { overscroll-behavior: none; }
.v3-screen {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.v3-screen input, .v3-screen textarea, .v3-screen [contenteditable], .v3-screen .tab-editor { -webkit-user-select: text; user-select: text; }
.v3-screen a, .v3-screen img { -webkit-user-drag: none; }
.v3-screen .tab-body.v3-home-body,
.v3-screen .tab-body.v3-hub-body,
.v3-screen .tab-body.v3-welcome-body,
.v3-screen .tab-body.v3-topic-body { overflow: hidden; }
.v3-mascot { overflow: hidden; }
.v3-car-track {
  scroll-behavior: auto;          /* arrows animate it; a finger should not fight a CSS animation */
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}
.v3-car-item { scroll-snap-stop: always; }

/* ================= Topic screens: flashcards, reader, dialogue, videos, match ================= */
.v3-screen .tab-body.v3-tpl-body { display: flex; flex-direction: column; padding: 10px 14px; overflow: hidden; }
.v3-tpl { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.v3-tpl .btn { font-size: 15px; padding: 9px 18px; gap: 8px; }
.v3-tpl .btn .v3-i { width: 18px; height: 18px; }

/* --- Flashcards --- */
.v3-fl { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; }
.v3-fl-top { width: min(560px, 100%); display: flex; align-items: center; justify-content: space-between; }
.v3-fl-count { font-family: var(--k-head); font-size: 15px; font-weight: 800; color: var(--k-muted); }
.v3-fl-dots { display: flex; gap: 6px; }
.v3-fl-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--k-line); transition: transform .2s var(--k-bounce), background .2s; }
.v3-fl-dots i.done { background: var(--k-green); }
.v3-fl-dots i.now { background: var(--tone); transform: scale(1.3); }
.v3-fl-card {
  flex: 1 1 0;
  width: min(560px, 100%);
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 1000px;
  animation: v3-pop-in .5s var(--k-bounce) backwards;
}
.v3-fl-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s var(--k-bounce); }
.v3-fl-card.flipped .v3-fl-inner { transform: rotateY(180deg); }
.v3-fl-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 4px solid #fff;
  border-radius: 30px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--tone) 28%, transparent);
}
.v3-fl-front { background: linear-gradient(160deg, var(--tone-s), #fff); }
.v3-fl-back { background: linear-gradient(160deg, #fff, var(--tone-s)); transform: rotateY(180deg); }
.v3-fl-glyph { font-family: var(--k-head); font-size: 110px; font-weight: 800; line-height: 1; color: var(--tone); text-align: center; padding: 0 20px; }
.v3-fl-glyph.mid { font-size: 76px; }
.v3-fl-glyph.long { font-size: 48px; }
.v3-fl-glyph.xl { font-size: 32px; line-height: 1.25; }
.v3-fl-front small { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--k-muted); }
.v3-fl-sub { font-family: var(--k-head); font-size: 28px; font-weight: 700; color: var(--k-muted); }
.v3-fl-meaning { font-family: var(--k-head); font-size: 40px; font-weight: 800; line-height: 1.15; text-align: center; padding: 0 24px; color: var(--k-ink); }
.v3-fl-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.v3-fl-done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.v3-fl-stars { display: flex; gap: 8px; }
.v3-fl-stars .v3-star-on { width: 72px; height: 72px; color: var(--k-yellow-d); animation: v3-pop-in .6s var(--k-bounce) backwards; }
.v3-fl-stars .v3-star-on:nth-child(2) { animation-delay: .15s; width: 88px; height: 88px; }
.v3-fl-stars .v3-star-on:nth-child(3) { animation-delay: .3s; }
.v3-fl-done h2 { margin: 6px 0 0; font-family: var(--k-head); font-size: 34px; font-weight: 800; }
.v3-fl-done p { margin: 0 0 8px; font-size: 16px; color: var(--k-muted); }

/* --- Reader (story / poem) --- */
.v3-rd { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px 1fr; gap: 14px; }
.v3-rd-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 3px solid #fff;
  border-radius: 26px;
  background: linear-gradient(170deg, var(--tone-s), #fff);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--tone) 22%, transparent);
  text-align: center;
  animation: v3-pop-in .5s var(--k-bounce) backwards;
}
.v3-rd-ico { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 30px; background: #fff; color: var(--tone); box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 24%, transparent); animation: v3-bob 3s ease-in-out infinite; }
.v3-rd-ico svg { width: 54%; height: 54%; }
.v3-rd-art b { font-family: var(--k-head); font-size: 24px; font-weight: 800; line-height: 1.15; }
.v3-rd-art small { font-size: 13px; font-weight: 700; color: var(--k-muted); }
.v3-rd-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.v3-rd-lines { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.v3-rd-line {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 6px 16px;
  border: 3px solid var(--k-line);
  border-radius: 18px;
  background: #fff;
  color: var(--k-ink);
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--k-bounce), border-color .2s, background .2s;
  animation: v3-rise .45s var(--k-bounce) backwards;
}
.v3-rd-line:nth-child(2) { animation-delay: .08s; }
.v3-rd-line:nth-child(3) { animation-delay: .16s; }
.v3-rd-line:nth-child(4) { animation-delay: .24s; }
.v3-rd-line:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--tone) 45%, #fff); }
.v3-rd-line.on { border-color: var(--tone); background: var(--tone-s); transform: translateX(6px); }
.v3-rd-py { font-size: 13px; font-weight: 700; color: var(--k-muted); letter-spacing: .02em; }
.v3-rd-tx { font-family: var(--k-head); font-size: 26px; font-weight: 700; line-height: 1.2; }
.v3-rd-tr { font-size: 14px; font-weight: 600; color: var(--k-blue-d); }
.v3-rd.hide-tr .v3-rd-tr { display: none; }
.v3-rd-actions { display: flex; gap: 10px; }
.v3-rd-actions .btn[aria-pressed="false"] { opacity: .65; }

/* --- Dialogue --- */
.v3-dl { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.v3-dl-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px; justify-content: space-between; }
.v3-dl-row { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; animation: v3-bubble-in .45s var(--k-bounce) backwards; }
.v3-dl-row:nth-child(2) { animation-delay: .08s; } .v3-dl-row:nth-child(3) { animation-delay: .16s; } .v3-dl-row:nth-child(4) { animation-delay: .24s; } .v3-dl-row:nth-child(5) { animation-delay: .32s; } .v3-dl-row:nth-child(6) { animation-delay: .4s; }
.v3-dl-row.me { align-self: flex-end; flex-direction: row-reverse; }
.v3-dl-av { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--tone); color: #fff; font-family: var(--k-head); font-size: 16px; font-weight: 800; }
.v3-dl-row.me .v3-dl-av { background: var(--k-pink); }
.v3-dl-bub { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 6px 44px 6px 14px; border: 3px solid var(--k-line); border-radius: 20px 20px 20px 6px; background: #fff; transition: border-color .2s, transform .2s var(--k-bounce); }
.v3-dl-row.me .v3-dl-bub { border-radius: 20px 20px 6px 20px; background: var(--k-blue-s); border-color: #cfe0ff; padding: 6px 44px 6px 14px; }
.v3-dl-row.on .v3-dl-bub { border-color: var(--tone); transform: scale(1.02); }
.v3-dl-name { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--k-muted); }
.v3-dl-tx { font-family: var(--k-head); font-size: 18px; font-weight: 700; line-height: 1.2; }
.v3-dl-tr { font-size: 12.5px; font-weight: 600; color: var(--k-blue-d); }
.v3-dl-say { position: absolute; right: 8px; top: 50%; width: 30px; height: 30px; margin-top: -15px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--tone-s); color: var(--tone); cursor: pointer; }
.v3-dl-say .v3-i { width: 17px; height: 17px; }
.v3-dl-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v3-dl-mic {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 26px 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--k-pink);
  color: #fff;
  font-family: var(--k-head);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 0 #d6407a;
  transition: transform .12s, box-shadow .12s;
}
.v3-dl-mic .v3-i { width: 24px; height: 24px; }
.v3-dl-mic:active { transform: translateY(3px); box-shadow: 0 2px 0 #d6407a; }
.v3-dl-mic.busy { background: var(--k-red); box-shadow: 0 5px 0 #b82a2a; animation: v3-pulse 1s ease-in-out infinite; }

/* --- Video lessons --- */
.v3-vd { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.v3-vd-feat { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.v3-vd-poster {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 28px;
  background: linear-gradient(150deg, var(--tone) 0%, color-mix(in srgb, var(--tone) 55%, #2B2D42) 100%);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--tone) 35%, transparent);
  text-decoration: none;
  animation: v3-pop-in .5s var(--k-bounce) backwards;
}
.v3-vd-art { position: absolute; inset: auto 14px 12px auto; width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px; background: rgba(255, 255, 255, .2); color: #fff; }
.v3-vd-art svg { width: 56%; height: 56%; }
.v3-vd-playbtn { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--tone); box-shadow: 0 6px 0 rgba(0, 0, 0, .18); transition: transform .2s var(--k-bounce); animation: v3-pulse 2.4s ease-in-out infinite; }
.v3-vd-playbtn svg { width: 46px; height: 46px; }
.v3-vd-poster:hover .v3-vd-playbtn { transform: scale(1.1); }
.v3-vd-meta { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
.v3-vd-meta small { grid-column: 1; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tone); }
.v3-vd-meta h3 { grid-column: 1; margin: 0; font-family: var(--k-head); font-size: 22px; font-weight: 800; line-height: 1.1; }
.v3-vd-meta > span { grid-column: 1; font-size: 13px; font-weight: 700; color: var(--k-muted); }
.v3-vd-meta .btn { grid-column: 2; grid-row: 1 / span 3; }
.v3-vd-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.v3-vd-side h4 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.v3-vd-list { flex: 1; min-height: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.v3-vd-list li { flex: 1 1 0; min-height: 0; display: flex; }
.v3-vd-row { flex: 1; display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 8px; border: 3px solid var(--k-line); border-radius: 18px; background: #fff; color: var(--k-ink); text-decoration: none; transition: transform .2s var(--k-bounce), border-color .2s; animation: v3-slide-r .45s var(--k-bounce) backwards; }
.v3-vd-list li:nth-child(2) .v3-vd-row { animation-delay: .06s; } .v3-vd-list li:nth-child(3) .v3-vd-row { animation-delay: .12s; } .v3-vd-list li:nth-child(4) .v3-vd-row { animation-delay: .18s; } .v3-vd-list li:nth-child(5) .v3-vd-row { animation-delay: .24s; } .v3-vd-list li:nth-child(6) .v3-vd-row { animation-delay: .3s; }
.v3-vd-row:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--tone) 45%, #fff); }
.v3-vd-row.now { border-color: var(--tone); background: var(--tone-s); }
.v3-vd-num { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--tone-s); color: var(--tone); font-family: var(--k-head); font-size: 16px; font-weight: 800; }
.v3-vd-num .v3-i { width: 18px; height: 18px; }
.v3-vd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v3-vd-info b { font-family: var(--k-head); font-size: 15px; font-weight: 800; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3-vd-bar { height: 7px; border-radius: 999px; background: #EEF0F7; overflow: hidden; }
.v3-vd-bar i { display: block; height: 100%; border-radius: 999px; background: var(--k-green); }
.v3-vd-min { font-size: 12px; font-weight: 700; color: var(--k-muted); white-space: nowrap; }
.v3-vd-go { color: var(--tone); }
.v3-vd-go .v3-i { width: 26px; height: 26px; }

/* --- Match game --- */
.v3-mt { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.v3-mt-hint { margin: 0; font-family: var(--k-head); font-size: 17px; font-weight: 700; text-align: center; color: var(--k-muted); }
.v3-mt-board { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; padding: 0 40px; }
.v3-mt-col { display: flex; flex-direction: column; gap: 9px; min-height: 0; }
.v3-mt-card {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 4px 12px;
  border: 3px solid var(--k-line);
  border-radius: 20px;
  background: #fff;
  color: var(--k-ink);
  font-family: var(--k-head);
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--k-line);
  transition: transform .2s var(--k-bounce), border-color .2s, background .2s;
  animation: v3-pop-in .45s var(--k-bounce) backwards;
}
.v3-mt-card.r { color: var(--k-blue-d); }
.v3-mt-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 50%, #fff); }
.v3-mt-card.sel { border-color: var(--tone); background: var(--tone-s); transform: scale(1.04); }
.v3-mt-card.ok { border-color: var(--k-green); background: var(--k-green-s); color: var(--k-green-d); box-shadow: 0 4px 0 #b7ecc9; cursor: default; }
.v3-mt-card.no { animation: v3-shake .45s ease-in-out; border-color: var(--k-red); background: var(--k-red-s); }
.v3-mt-foot { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 40px; }
.v3-mt-score { font-family: var(--k-head); font-size: 16px; font-weight: 800; padding: 3px 14px; border-radius: 999px; background: var(--k-yellow-s); color: #6b4f00; }

/* Strip: snapped items keep the same inner padding as the first item */
.v3-car-track { scroll-padding: 0 12px; }

/* ================= Core screens (replace the 1.0-style screens) ================= */
.v3-screen .tab-body.v3-scr-body { display: flex; flex-direction: column; padding: 10px 14px; overflow: hidden; }
.v3-scr { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.v3-scr .btn { font-size: 15px; padding: 9px 18px; gap: 8px; }
.v3-scr .btn .v3-i { width: 18px; height: 18px; }
.v3-scr .btn.sm { font-size: 13px; padding: 6px 12px; }
.v3-star-off { width: 1em; height: 1em; color: #d8dcea; fill: currentColor; }
.v3-fl-stars .v3-star-off { width: 72px; height: 72px; }

/* --- login --- */
.v3-lg { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: center; }
.v3-lg-people { display: flex; flex-direction: column; gap: 14px; }
.v3-lg-person { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 4px solid #fff; border-radius: 26px; background: var(--tone-s); color: var(--k-ink); text-align: left; cursor: pointer; box-shadow: 0 6px 0 color-mix(in srgb, var(--tone) 26%, transparent); transition: transform .2s var(--k-bounce), border-color .2s; animation: v3-pop-in .5s var(--k-bounce) backwards; }
.v3-lg-person:nth-child(2) { animation-delay: .1s; }
.v3-lg-person.on { border-color: var(--tone); transform: scale(1.03); }
.v3-lg-av { width: 70px; height: 70px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--tone); color: #fff; font-family: var(--k-head); font-size: 34px; font-weight: 800; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.v3-lg-name b { display: block; font-family: var(--k-head); font-size: 26px; font-weight: 800; line-height: 1.1; }
.v3-lg-name small { font-size: 13px; font-weight: 700; color: var(--k-muted); }
.v3-lg-pad { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 18px; border: 3px solid #fff; border-radius: 28px; background: #fff; box-shadow: 0 6px 0 var(--k-line); animation: v3-pop-in .5s var(--k-bounce) backwards .1s; }
.v3-lg-pad h2 { margin: 0; font-family: var(--k-head); font-size: 21px; font-weight: 800; }
.v3-lg-dots { display: flex; gap: 14px; }
.v3-lg-dots i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--k-line); background: #fff; transition: transform .2s var(--k-bounce), background .2s; }
.v3-lg-dots i.on { background: var(--k-blue); border-color: var(--k-blue); transform: scale(1.1); }
.v3-lg-dots i.ok { background: var(--k-green); border-color: var(--k-green); }
.v3-lg-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; }
.v3-key { height: 52px; border: 0; border-radius: 18px; background: var(--k-blue-s); color: var(--k-blue-d); font-family: var(--k-head); font-size: 26px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 #cfe0ff; transition: transform .1s, box-shadow .1s; }
.v3-key:active { transform: translateY(3px); box-shadow: 0 1px 0 #cfe0ff; }
.v3-key.fn { background: var(--k-yellow-s); color: #8a6a00; box-shadow: 0 4px 0 #f3e2a6; }
.v3-key .v3-i { width: 24px; height: 24px; margin: auto; }
.v3-lg-hint { margin: 0; font-size: 12px; font-weight: 700; color: var(--k-muted); }
.v3-lg-forgot { border: 0; background: none; color: var(--k-blue-d); font-family: var(--k-body); font-size: 13px; font-weight: 800; text-decoration: underline; cursor: pointer; }

/* --- lesson --- */
.v3-ls { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; }
.v3-ls-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.v3-ls-player { position: relative; flex: 1; min-height: 0; overflow: hidden; border: 4px solid #fff; border-radius: 26px; background: #1b2540; box-shadow: 0 7px 0 color-mix(in srgb, var(--tone) 30%, transparent); }
.v3-ls-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v3-ls-playbtn { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--tone); cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, .2); animation: v3-pulse 2.4s ease-in-out infinite; }
.v3-ls-playbtn svg { width: 52px; height: 52px; }
.v3-ls-player.on .v3-ls-playbtn { display: none; }
.v3-ls-words small { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.v3-ls-words > div { display: flex; flex-wrap: wrap; gap: 8px; }
.v3-chip-word { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; border: 0; border-radius: 999px; background: var(--tone-s); color: var(--tone); font-family: var(--k-head); font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 24%, transparent); }
.v3-chip-word .v3-i { width: 17px; height: 17px; }
.v3-chip-word.pop { animation: v3-pop .35s var(--k-bounce); }
.v3-ls-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.v3-ls-steps { flex: 1; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.v3-ls-steps li { flex: 1; display: flex; align-items: center; gap: 12px; padding: 4px 12px; border: 3px solid var(--k-line); border-radius: 20px; background: #fff; font-family: var(--k-head); font-size: 17px; font-weight: 800; }
.v3-ls-dot { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--k-line); color: var(--k-muted); font-weight: 800; }
.v3-ls-steps li.now { border-color: var(--tone); background: var(--tone-s); }
.v3-ls-steps li.now .v3-ls-dot { background: var(--tone); color: #fff; animation: v3-ring 1.6s ease-out infinite; }
.v3-ls-steps li.done .v3-ls-dot { background: var(--k-green); color: #fff; }
.v3-ls-dot .v3-i { width: 18px; height: 18px; }
.v3-ls-side .btn { justify-content: center; }

/* --- quiz --- */
.v3-qz { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.v3-qz-top { display: flex; align-items: center; gap: 12px; }
.v3-qz-count { font-family: var(--k-head); font-size: 15px; font-weight: 800; color: var(--k-muted); white-space: nowrap; }
.v3-qz-bar { flex: 1; height: 14px; border-radius: 999px; background: #EEF0F7; overflow: hidden; }
.v3-qz-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4ADE80, var(--k-green-d)); transition: width .5s var(--k-bounce); }
.v3-qz-stars { display: flex; gap: 2px; font-size: 22px; }
.v3-qz-card { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; border: 3px solid #fff; border-radius: 24px; background: linear-gradient(160deg, var(--tone-s), #fff); box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 22%, transparent); animation: v3-rise .4s var(--k-bounce) backwards; }
.v3-qz-card h2 { margin: 0; font-family: var(--k-head); font-size: 28px; font-weight: 800; line-height: 1.2; }
.v3-qz-choices { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.v3-qz-ch { display: flex; align-items: center; gap: 12px; padding: 6px 16px; border: 3px solid var(--k-line); border-radius: 22px; background: #fff; color: var(--k-ink); font-family: var(--k-head); font-size: 22px; font-weight: 800; text-align: left; cursor: pointer; box-shadow: 0 5px 0 var(--k-line); transition: transform .2s var(--k-bounce), border-color .2s, background .2s; animation: v3-pop-in .4s var(--k-bounce) backwards; }
.v3-qz-ch:nth-child(2) { animation-delay: .06s; } .v3-qz-ch:nth-child(3) { animation-delay: .12s; } .v3-qz-ch:nth-child(4) { animation-delay: .18s; }
.v3-qz-ch:not(:disabled):hover { transform: translateY(-2px); border-color: #b5d0ff; }
.v3-qz-l { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--k-blue-s); color: var(--k-blue-d); font-size: 20px; }
.v3-qz-ch.sel { border-color: var(--k-blue); background: var(--k-blue-s); animation: v3-pop .3s var(--k-bounce); }
.v3-qz-ch.ok { border-color: var(--k-green); background: var(--k-green-s); box-shadow: 0 5px 0 #b7ecc9; }
.v3-qz-ch.ok .v3-qz-l { background: var(--k-green); color: #fff; }
.v3-qz-ch.no { border-color: var(--k-red); background: var(--k-red-s); animation: v3-shake .45s ease-in-out; }
.v3-qz-ch.no .v3-qz-l { background: var(--k-red); color: #fff; }
.v3-qz-foot { display: flex; align-items: center; gap: 14px; }
.v3-qz-fb { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 18px; background: var(--k-yellow-s); color: #6b4f00; font-size: 15px; font-weight: 700; }
.v3-qz-fb b { display: inline-flex; align-items: center; gap: 6px; font-family: var(--k-head); font-size: 18px; white-space: nowrap; }
.v3-qz-fb b .v3-i { width: 20px; height: 20px; }
.v3-qz-fb.ok { background: var(--k-green-s); color: var(--k-green-d); }
.v3-qz-fb.no { background: var(--k-red-s); color: #a42020; }
.v3-qz-foot .btn { flex-shrink: 0; }

/* --- results --- */
.v3-rs { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; }
.v3-rs-hero, .v3-rs-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 3px solid #fff; border-radius: 28px; background: linear-gradient(160deg, var(--k-yellow-s), #fff); box-shadow: 0 6px 0 #f3e2a6; text-align: center; }
.v3-rs-empty { flex: 1; }
.v3-rs-stars { display: flex; gap: 8px; }
.v3-rs-stars .v3-i { width: 78px; height: 78px; color: var(--k-yellow-d); animation: v3-pop-in .6s var(--k-bounce) backwards; }
.v3-rs-stars .v3-i:nth-child(2) { animation-delay: .15s; width: 94px; height: 94px; margin-top: -10px; }
.v3-rs-stars .v3-i:nth-child(3) { animation-delay: .3s; }
.v3-rs-stars .v3-star-off { color: #e3e6f0; }
.v3-rs-hero h2, .v3-rs-empty h2 { margin: 4px 0 0; font-family: var(--k-head); font-size: 30px; font-weight: 800; line-height: 1.1; }
.v3-rs-hero p, .v3-rs-empty p { margin: 0; font-size: 16px; font-weight: 700; color: var(--k-muted); }
.v3-rs-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.v3-rs-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.v3-rs-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 3px solid var(--k-line); border-radius: 18px; background: #fff; animation: v3-slide-r .45s var(--k-bounce) backwards; }
.v3-rs-list li.ok { border-color: #b7ecc9; background: var(--k-green-s); }
.v3-rs-list li.no { border-color: #ffc9c9; background: var(--k-red-s); }
.v3-rs-mark { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--k-green); color: #fff; }
.v3-rs-list li.no .v3-rs-mark { background: var(--k-red); }
.v3-rs-mark .v3-i { width: 16px; height: 16px; }
.v3-rs-q { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.2; }
.v3-rs-list b { font-family: var(--k-head); font-size: 15px; font-weight: 800; white-space: nowrap; }

/* --- chat --- */
.v3-ch { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.v3-ch-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 2px solid var(--k-line); border-radius: 22px; background: #F7FAFF; overscroll-behavior: contain; touch-action: pan-y; }
.v3-ch-row { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; animation: v3-bubble-in .4s var(--k-bounce) backwards; }
.v3-ch-row.me { align-self: flex-end; }
.v3-ch-av { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--k-green); color: #fff; font-family: var(--k-head); font-weight: 800; }
.v3-ch-bub { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 44px 10px 14px; border: 3px solid #CDEFD9; border-radius: 20px 20px 20px 6px; background: #fff; font-size: 16px; font-weight: 700; line-height: 1.35; }
.v3-ch-row.me .v3-ch-bub { padding: 10px 16px; border: 0; border-radius: 20px 20px 6px 20px; background: var(--k-blue); color: #fff; }
.v3-ch-bub img { width: 120px; max-width: 100%; border-radius: 12px; }
.v3-ch-step { display: flex; gap: 8px; align-items: flex-start; }
.v3-ch-step i { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--k-green); color: #fff; font-family: var(--k-head); font-style: normal; font-size: 13px; font-weight: 800; }
.v3-ch-hear { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--k-green-s); color: var(--k-green-d); cursor: pointer; }
.v3-ch-hear .v3-i { width: 17px; height: 17px; }
.v3-ch-bub.typing { flex-direction: row; padding: 14px 18px; gap: 5px; }
.v3-ch-bub.typing i { width: 9px; height: 9px; border-radius: 50%; background: var(--k-green); animation: v3-bob 1s ease-in-out infinite; }
.v3-ch-bub.typing i:nth-child(2) { animation-delay: .15s; } .v3-ch-bub.typing i:nth-child(3) { animation-delay: .3s; }
.v3-ch-chips { display: flex; gap: 8px; flex-wrap: nowrap; }
.v3-ch-chip { flex: 1 1 0; min-width: 0; padding: 7px 10px; border: 0; border-radius: 999px; background: var(--k-yellow-s); color: #6b4f00; font-family: var(--k-head); font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 3px 0 #f3e2a6; }
.v3-ch-bar { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 22px; background: #F1F4FF; }
.v3-ch-ic { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--k-blue-d); cursor: pointer; box-shadow: 0 3px 0 #cfe0ff; }
.v3-ch-ic .v3-i { width: 22px; height: 22px; }
.v3-ch-ic.rec { background: var(--k-red); color: #fff; animation: v3-pulse 1s ease-in-out infinite; }
.v3-ch-in { flex: 1; min-width: 0; height: 44px; }

/* --- dictation --- */
.v3-dc { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.v3-dc .v3-fl-top { width: min(640px, 100%); }
.v3-dc-main { display: flex; justify-content: center; }
.v3-dc-play { display: inline-flex; align-items: center; gap: 12px; padding: 12px 30px 12px 20px; border: 0; border-radius: 999px; background: var(--k-blue); color: #fff; font-family: var(--k-head); font-size: 20px; font-weight: 800; cursor: pointer; box-shadow: 0 6px 0 var(--k-blue-d); animation: v3-pulse 2.4s ease-in-out infinite; }
.v3-dc-play .v3-i { width: 30px; height: 30px; }
.v3-dc-play:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--k-blue-d); }
.v3-dc-fb { padding: 6px 18px; border-radius: 999px; background: var(--k-yellow-s); color: #6b4f00; font-family: var(--k-head); font-size: 16px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.v3-dc-fb .v3-i { width: 18px; height: 18px; }
.v3-dc-fb.ok { background: var(--k-green-s); color: var(--k-green-d); }
.v3-dc-fb.no { background: var(--k-red-s); color: #a42020; }
.v3-dc-slots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.v3-dc-slot { width: 58px; height: 66px; display: grid; place-items: center; border: 3px dashed #cfd6ea; border-radius: 16px; background: #fff; font-family: var(--k-head); font-size: 34px; font-weight: 800; color: var(--k-ink); }
.v3-dc-slot.on { border-style: solid; border-color: var(--k-blue); background: var(--k-blue-s); animation: v3-pop .25s var(--k-bounce); }
.v3-dc-slot.ok { border-color: var(--k-green); background: var(--k-green-s); color: var(--k-green-d); }
.v3-dc-slot.no { border-color: var(--k-red); background: var(--k-red-s); animation: v3-shake .45s; }
.v3-dc-tiles { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.v3-dc-tile { width: 64px; height: 64px; border: 0; border-radius: 18px; background: var(--k-yellow); color: #4a3200; font-family: var(--k-head); font-size: 32px; font-weight: 800; cursor: pointer; box-shadow: 0 5px 0 var(--k-yellow-d); transition: transform .1s, box-shadow .1s, opacity .2s; }
.v3-dc-tile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--k-yellow-d); }
.v3-dc-tile:disabled { opacity: .3; box-shadow: none; cursor: default; }
.v3-dc-tile.fn { background: var(--k-blue-s); color: var(--k-blue-d); box-shadow: 0 5px 0 #cfe0ff; }
.v3-dc-tile .v3-i { width: 26px; height: 26px; margin: auto; }
.v3-dc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(640px, 100%); flex: 1; min-height: 0; }
.v3-dc-opt { border: 3px solid var(--k-line); border-radius: 24px; background: #fff; font-family: var(--k-head); font-size: 44px; font-weight: 800; cursor: pointer; box-shadow: 0 5px 0 var(--k-line); transition: transform .2s var(--k-bounce), border-color .2s; }
.v3-dc-opt:hover { transform: translateY(-2px); border-color: #b5d0ff; }

/* --- essay --- */
.v3-es { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.v3-es-write { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.v3-es-write textarea { flex: 1; min-height: 0; width: 100%; resize: none; padding: 14px; border: 3px dashed #FFD45C; border-radius: 22px; background: #FFFDF3; font-family: var(--k-body); font-size: 18px; font-weight: 700; line-height: 1.55; color: var(--k-ink); }
.v3-es-actions { display: flex; justify-content: flex-end; }
.v3-es-result { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 3px solid #fff; border-radius: 24px; background: linear-gradient(160deg, var(--k-green-s), #fff); box-shadow: 0 5px 0 #b7ecc9; }
.v3-es-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--k-muted); font-weight: 700; }
.v3-es-ico { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 24px; background: #fff; color: var(--k-green-d); animation: v3-bob 3s ease-in-out infinite; }
.v3-es-ico .v3-i { width: 42px; height: 42px; }
.v3-es-score { display: flex; align-items: center; gap: 12px; }
.v3-es-score .v3-fl-stars .v3-i { width: 34px; height: 34px; }
.v3-es-score b { font-family: var(--k-head); font-size: 24px; font-weight: 800; }
.v3-es-result h4 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-green-d); }
.v3-es-fixes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.v3-es-fixes li { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border: 2px solid var(--k-line); border-radius: 16px; background: #fff; animation: v3-rise .4s var(--k-bounce) backwards; animation-delay: calc(var(--n) * 90ms); }
.v3-es-fixes small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--k-muted); }
.v3-es-bad { color: var(--k-red); text-decoration: line-through; font-size: 14px; font-weight: 700; }
.v3-es-good { color: var(--k-green-d); font-size: 15px; font-weight: 800; }
.v3-es-bad small, .v3-es-good small { text-decoration: none; display: inline-block; margin-right: 6px; }
.v3-es-fixes em { font-style: normal; font-size: 12.5px; color: var(--k-muted); }

/* --- scan / look up --- */
.v3-sc { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
.v3-sc-cam { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.v3-sc-view { position: relative; flex: 1; width: 100%; min-height: 0; overflow: hidden; border: 4px solid #fff; border-radius: 26px; background: #1b2540; box-shadow: 0 6px 0 #cfe0ff; }
.v3-sc-view img { width: 100%; height: 100%; object-fit: cover; }
.v3-sc-c { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; opacity: .9; }
.v3-sc-c.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.v3-sc-c.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.v3-sc-c.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.v3-sc-c.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.v3-sc-found { position: absolute; inset: auto 12px 12px 12px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.v3-sc-word { padding: 6px 14px; border: 3px solid #fff; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--k-ink); font-family: var(--k-head); font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); animation: v3-pop-in .4s var(--k-bounce) backwards; animation-delay: calc(var(--n) * 90ms); }
.v3-sc-word.on { background: var(--k-green); border-color: var(--k-green); color: #fff; }
.v3-sc-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.v3-sc-flash.go { animation: v3-flash .5s ease-out; }
@keyframes v3-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.v3-sc-shutter { width: 70px; height: 70px; display: grid; place-items: center; padding: 0; border: 5px solid #fff; border-radius: 50%; background: var(--k-green); cursor: pointer; box-shadow: 0 5px 0 var(--k-green-d); transition: transform .1s; }
.v3-sc-shutter i { width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.v3-sc-shutter:active { transform: scale(.9); }
.v3-sc-side { min-height: 0; display: flex; }
.v3-sc-card { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 16px; border: 3px solid #fff; border-radius: 26px; background: linear-gradient(160deg, var(--k-blue-s), #fff); box-shadow: 0 6px 0 #cfe0ff; animation: v3-pop-in .4s var(--k-bounce) backwards; }
.v3-sc-card.hint { align-items: center; text-align: center; font-family: var(--k-head); font-size: 20px; font-weight: 700; color: var(--k-muted); }
.v3-sc-en { font-family: var(--k-head); font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--k-blue-d); }
.v3-sc-trs { display: flex; flex-direction: column; gap: 6px; }
.v3-sc-trs span { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 14px; background: #fff; font-family: var(--k-head); font-size: 20px; font-weight: 800; }
.v3-sc-trs small { width: 30px; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--k-muted); }
.v3-sc-card p { margin: 0; font-size: 14px; font-weight: 700; color: var(--k-muted); }
.v3-sc-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- my words --- */
.v3-vw { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.v3-vw-top b { font-family: var(--k-head); font-size: 18px; font-weight: 800; color: var(--k-muted); }
.v3-vw-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v3-vc { position: relative; display: flex; animation: v3-pop-in .45s var(--k-bounce) backwards; animation-delay: calc(var(--n) * 50ms); }
.v3-vc-main { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 14px; border: 3px solid #fff; border-radius: 22px; background: linear-gradient(160deg, var(--k-yellow-s), #fff); color: var(--k-ink); text-align: left; cursor: pointer; box-shadow: 0 5px 0 #f3e2a6; transition: transform .2s var(--k-bounce); }
.v3-vc-main:hover { transform: translateY(-3px); }
.v3-vc-main b { font-family: var(--k-head); font-size: 24px; font-weight: 800; line-height: 1.1; }
.v3-vc-main span { font-size: 15px; font-weight: 700; color: var(--k-muted); }
.v3-vc-main .v3-i { position: absolute; right: 14px; bottom: 12px; width: 22px; height: 22px; color: #b88a00; }
.v3-vc-rm { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--k-red); cursor: pointer; }
.v3-vc-rm .v3-i { width: 15px; height: 15px; }

/* --- speaking --- */
.v3-sp { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.v3-sp .v3-fl-top { width: min(640px, 100%); }
.v3-sp-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 28px; border: 4px solid #fff; border-radius: 28px; background: linear-gradient(160deg, var(--k-blue-s), #fff); box-shadow: 0 7px 0 #cfe0ff; text-align: center; animation: v3-pop-in .45s var(--k-bounce) backwards; }
.v3-sp-card small { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.v3-sp-card h2 { margin: 0; font-family: var(--k-head); font-size: 38px; font-weight: 800; line-height: 1.15; }
.v3-sp-wave { height: 56px; display: flex; align-items: center; gap: 7px; }
.v3-sp-wave i { width: 10px; height: 14px; border-radius: 999px; background: #cfd6ea; transition: background .2s; }
.v3-sp-wave.on i { background: var(--k-pink); animation: v3-eq .7s ease-in-out infinite; animation-delay: calc(var(--k) * 70ms); }
@keyframes v3-eq { 0%, 100% { height: 14px; } 50% { height: 52px; } }
.v3-sp-bar { display: flex; align-items: center; gap: 16px; }
.v3-sp-res { display: flex; align-items: center; gap: 10px; font-family: var(--k-head); font-size: 20px; font-weight: 800; }
.v3-sp-res .v3-fl-stars .v3-i { width: 36px; height: 36px; }

/* --- personal center --- */
.v3-pf { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.v3-pf-me { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px; border: 3px solid #fff; border-radius: 28px; background: linear-gradient(160deg, var(--k-yellow-s), #fff); box-shadow: 0 6px 0 #f3e2a6; animation: v3-pop-in .5s var(--k-bounce) backwards; }
.v3-pf-av { width: 96px; height: 96px; display: grid; place-items: center; border: 5px solid #fff; border-radius: 50%; background: var(--tone); color: #fff; font-family: var(--k-head); font-size: 48px; font-weight: 800; box-shadow: 0 5px 0 rgba(0, 0, 0, .15); }
.v3-pf-me h2 { margin: 6px 0 0; font-family: var(--k-head); font-size: 30px; font-weight: 800; }
.v3-pf-me small { font-size: 14px; font-weight: 700; color: var(--k-muted); }
.v3-pf-stats { width: 100%; margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v3-pf-stats > div { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--k-line); }
.v3-pf-stats .v3-i { width: 24px; height: 24px; }
.v3-pf-stats .a .v3-i { color: #F97316; } .v3-pf-stats .b .v3-i { color: var(--k-blue); } .v3-pf-stats .c .v3-i { color: var(--k-yellow-d); fill: currentColor; } .v3-pf-stats .d .v3-i { color: var(--k-green-d); }
.v3-pf-stats b { font-family: var(--k-head); font-size: 24px; font-weight: 800; line-height: 1.1; }
.v3-pf-stats span { font-size: 12px; font-weight: 700; color: var(--k-muted); }
.v3-pf-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.v3-pf-time { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 3px solid #fff; border-radius: 24px; background: linear-gradient(160deg, var(--k-green-s), #fff); box-shadow: 0 5px 0 #b7ecc9; }
.v3-pf-time b { display: block; font-family: var(--k-head); font-size: 17px; font-weight: 800; }
.v3-pf-time span { font-size: 14px; font-weight: 700; color: var(--k-muted); }
.v3-pf-ring { position: relative; width: 78px; height: 78px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: conic-gradient(var(--k-green) calc(var(--p) * 1%), #e5e9f3 0); }
.v3-pf-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.v3-pf-ring b, .v3-pf-ring small { position: relative; line-height: 1; }
.v3-pf-ring b { font-size: 24px; } .v3-pf-ring small { font-size: 11px; font-weight: 800; color: var(--k-muted); }
.v3-pf-side h4 { margin: 4px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.v3-pf-tog { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 3px solid var(--k-line); border-radius: 18px; background: #fff; color: var(--k-ink); font-family: var(--k-head); font-size: 16px; font-weight: 800; text-align: left; cursor: pointer; }
.v3-pf-tog .v3-i { width: 22px; height: 22px; color: var(--k-blue-d); }
.v3-pf-tog span { flex: 1; }
.v3-pf-sw { position: relative; width: 50px; height: 28px; border-radius: 999px; background: #d5dbec; transition: background .2s; }
.v3-pf-sw b { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--k-bounce); }
.v3-pf-tog.on .v3-pf-sw { background: var(--k-green); }
.v3-pf-tog.on .v3-pf-sw b { transform: translateX(22px); }
.v3-pf-btns { display: flex; gap: 8px; margin-top: auto; }

/* --- break time --- */
.v3-zz { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.v3-zz-moon { width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(160deg, #6D5BD0, #3b2f8f); color: #FFE9A0; box-shadow: 0 8px 0 rgba(43, 45, 66, .18); animation: v3-bob 3.5s ease-in-out infinite; }
.v3-zz-moon .v3-i { width: 64px; height: 64px; fill: currentColor; }
.v3-zz h2 { margin: 6px 0 0; font-family: var(--k-head); font-size: 36px; font-weight: 800; }
.v3-zz p { margin: 0; max-width: 460px; font-size: 17px; font-weight: 700; color: var(--k-muted); }
.v3-zz-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ================= Hub tile progress ================= */
.v3-hub-prog { position: absolute; left: 14px; bottom: 11px; z-index: 1; display: flex; align-items: center; gap: 6px; width: 46%; }
.v3-hub-prog > span { flex: 1; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .8); overflow: hidden; }
.v3-hub-prog i { display: block; height: 100%; border-radius: 999px; background: var(--tone); animation: v3-grow .8s var(--k-bounce) backwards .4s; transform-origin: left; }
.v3-hub-prog em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--k-muted); }

/* ================= More templates ================= */
/* --- timed challenge --- */
.v3-cq { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.v3-cq-top { display: flex; align-items: center; justify-content: space-between; }
.v3-cq-streak { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: #FFE9D6; color: #C2570C; font-family: var(--k-head); font-size: 15px; font-weight: 800; }
.v3-cq-streak .v3-i { width: 18px; height: 18px; color: #F97316; animation: v3-flicker 1.2s ease-in-out infinite; }
.v3-cq-time { height: 16px; border-radius: 999px; background: #EEF0F7; overflow: hidden; }
.v3-cq-time i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4ADE80, var(--k-green-d)); transition: width .1s linear; }
.v3-cq-time.low i { background: linear-gradient(90deg, #FFB347, var(--k-red)); }
.v3-cq-card { display: grid; place-items: center; padding: 16px 22px; border: 3px solid #fff; border-radius: 24px; background: linear-gradient(160deg, var(--tone-s), #fff); box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 22%, transparent); text-align: center; animation: v3-rise .35s var(--k-bounce) backwards; }
.v3-cq-card h2 { margin: 0; font-family: var(--k-head); font-size: 30px; font-weight: 800; line-height: 1.2; }
.v3-cq-opts { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.v3-cq-opt { display: flex; align-items: center; gap: 12px; padding: 6px 16px; border: 3px solid var(--k-line); border-radius: 22px; background: #fff; color: var(--k-ink); font-family: var(--k-head); font-size: 24px; font-weight: 800; cursor: pointer; text-align: left; box-shadow: 0 5px 0 var(--k-line); transition: transform .2s var(--k-bounce), border-color .2s, background .2s; animation: v3-pop-in .35s var(--k-bounce) backwards; }
.v3-cq-opt:not(:disabled):hover { transform: translateY(-2px); border-color: #b5d0ff; }
.v3-cq-l { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--k-blue-s); color: var(--k-blue-d); font-size: 20px; }
.v3-cq-opt.ok { border-color: var(--k-green); background: var(--k-green-s); }
.v3-cq-opt.ok .v3-cq-l { background: var(--k-green); color: #fff; }
.v3-cq-opt.no { border-color: var(--k-red); background: var(--k-red-s); animation: v3-shake .45s; }
.v3-cq-opt.no .v3-cq-l { background: var(--k-red); color: #fff; }

/* --- checklist --- */
.v3-ck { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px 1fr; gap: 16px; }
.v3-ck-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; border: 3px solid #fff; border-radius: 28px; background: linear-gradient(170deg, var(--tone-s), #fff); box-shadow: 0 6px 0 color-mix(in srgb, var(--tone) 22%, transparent); text-align: center; animation: v3-pop-in .5s var(--k-bounce) backwards; }
.v3-ck-ico { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 26px; background: #fff; color: var(--tone); box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 24%, transparent); animation: v3-bob 3s ease-in-out infinite; }
.v3-ck-ico svg { width: 54%; height: 54%; }
.v3-ck-side h3 { margin: 0; font-family: var(--k-head); font-size: 22px; font-weight: 800; line-height: 1.15; }
.v3-ck-bar { width: 100%; height: 14px; border-radius: 999px; background: #EEF0F7; overflow: hidden; }
.v3-ck-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4ADE80, var(--k-green-d)); transition: width .5s var(--k-bounce); }
.v3-ck-side > b { font-size: 14px; font-weight: 800; color: var(--k-muted); }
.v3-ck-reward { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #EEF0F7; color: var(--k-muted); font-size: 13px; font-weight: 800; opacity: .8; transition: all .3s var(--k-bounce); }
.v3-ck-reward .v3-i { width: 18px; height: 18px; }
.v3-ck-reward.got { background: var(--k-yellow-s); color: #6b4f00; opacity: 1; transform: scale(1.08); }
.v3-ck-reward.got .v3-i { color: var(--k-yellow-d); }
.v3-ck-list { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 0; }
.v3-ck-row { flex: 1 1 0; min-height: 0; display: flex; align-items: center; gap: 14px; padding: 4px 16px 4px 10px; border: 3px solid var(--k-line); border-radius: 20px; background: #fff; color: var(--k-ink); font-family: var(--k-head); font-size: 18px; font-weight: 700; text-align: left; cursor: pointer; transition: transform .2s var(--k-bounce), border-color .2s, background .2s; animation: v3-slide-r .4s var(--k-bounce) backwards; }
.v3-ck-row:hover { transform: translateX(4px); }
.v3-ck-box { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; border: 3px solid #d5dbec; background: #fff; color: var(--k-muted); font-weight: 800; }
.v3-ck-box .v3-i { width: 20px; height: 20px; }
.v3-ck-row.on { border-color: #b7ecc9; background: var(--k-green-s); color: var(--k-green-d); }
.v3-ck-row.on .v3-ck-box { background: var(--k-green); border-color: var(--k-green); color: #fff; animation: v3-pop .3s var(--k-bounce); }
.v3-ck-row.on > span:last-child { text-decoration: line-through; opacity: .75; }

/* --- feed --- */
.v3-fd { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; justify-content: flex-start; }
.v3-fd-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border: 3px solid #fff; border-radius: 24px; background: linear-gradient(160deg, var(--tone-s), #fff); color: var(--k-ink); text-decoration: none; box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 22%, transparent); transition: transform .2s var(--k-bounce); animation: v3-slide-r .45s var(--k-bounce) backwards; animation-delay: calc(var(--n) * 70ms); }
a.v3-fd-row:hover { transform: translateX(5px); }
.v3-fd-ico { width: 58px; height: 58px; flex-shrink: 0; display: grid; place-items: center; border-radius: 18px; background: #fff; color: var(--tone); box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 24%, transparent); }
.v3-fd-ico svg { width: 52%; height: 52%; }
.v3-fd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.v3-fd-info b { font-family: var(--k-head); font-size: 20px; font-weight: 800; line-height: 1.1; }
.v3-fd-info small { font-size: 14px; font-weight: 700; color: var(--k-muted); }
.v3-fd-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .85); overflow: hidden; }
.v3-fd-bar i { display: block; height: 100%; border-radius: 999px; background: var(--tone); }
.v3-fd-tag { padding: 3px 12px; border-radius: 999px; background: #fff; color: var(--tone); font-family: var(--k-head); font-size: 14px; font-weight: 800; white-space: nowrap; }
.v3-fd-go { color: var(--tone); }
.v3-fd-go .v3-i { width: 30px; height: 30px; }

/* --- badges --- */
.v3-bds { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.v3-bds-top b { font-family: var(--k-head); font-size: 18px; font-weight: 800; color: var(--k-muted); }
.v3-bds-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v3-bd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; border: 3px solid #fff; border-radius: 24px; background: #EEF0F7; color: var(--k-muted); cursor: pointer; box-shadow: 0 5px 0 #dfe3ef; animation: v3-pop-in .45s var(--k-bounce) backwards; animation-delay: calc(var(--n) * 50ms); }
.v3-bd-ico { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #b8bfd3; }
.v3-bd-ico svg { width: 54%; height: 54%; }
.v3-bd b { font-family: var(--k-head); font-size: 16px; font-weight: 800; line-height: 1.1; }
.v3-bd small { font-size: 11px; font-weight: 700; }
.v3-bd.on { background: linear-gradient(160deg, var(--k-yellow-s), #fff); color: var(--k-ink); box-shadow: 0 5px 0 #f3e2a6; }
.v3-bd.on .v3-bd-ico { background: var(--k-yellow); color: #4a3200; box-shadow: 0 3px 0 var(--k-yellow-d); }
.v3-bd.pop { animation: v3-jump .6s var(--k-bounce); }

/* --- weekly report --- */
.v3-rp { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.v3-rp-week, .v3-rp-subj { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px; border: 3px solid #fff; border-radius: 26px; box-shadow: 0 5px 0 var(--k-line); background: #fff; animation: v3-pop-in .5s var(--k-bounce) backwards; }
.v3-rp-head { display: flex; align-items: baseline; justify-content: space-between; }
.v3-rp-head b { font-family: var(--k-head); font-size: 20px; font-weight: 800; }
.v3-rp-head span { font-size: 14px; font-weight: 800; color: var(--k-muted); }
.v3-rp-bars { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; padding: 0 4px; }
.v3-rp-col { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.v3-rp-col i { display: block; width: 100%; max-width: 44px; min-height: 8px; border-radius: 12px 12px 6px 6px; background: linear-gradient(180deg, #7BC4FF, var(--k-blue)); transform-origin: bottom; animation: v3-grow-y .7s var(--k-bounce) backwards; animation-delay: calc(var(--n) * 70ms); }
.v3-rp-col:nth-child(4) i { background: linear-gradient(180deg, #FFD45C, var(--k-yellow-d)); }
.v3-rp-val { font-size: 13px; font-weight: 800; color: var(--k-ink); }
.v3-rp-col b { font-size: 12px; font-weight: 800; color: var(--k-muted); }
.v3-rp-goal { display: flex; align-items: center; gap: 10px; }
.v3-rp-goal small { font-size: 12px; font-weight: 800; color: var(--k-muted); white-space: nowrap; }
.v3-rp-goal .v3-ck-bar { flex: 1; }
.v3-rp-goal b { font-family: var(--k-head); font-size: 18px; font-weight: 800; }
.v3-rp-subj h4 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.v3-rp-rings { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 4px; align-content: center; }
.v3-rp-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: v3-pop-in .5s var(--k-bounce) backwards; animation-delay: calc(var(--n) * 80ms); }
.v3-rp-ring > span { position: relative; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--k-green) calc(var(--p) * 1%), #e8ebf4 0); }
.v3-rp-ring > span::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.v3-rp-ring b { position: relative; font-family: var(--k-head); font-size: 16px; font-weight: 800; }
.v3-rp-ring small { font-size: 12px; font-weight: 800; color: var(--k-muted); }
.v3-rp-chips { display: flex; gap: 8px; justify-content: center; }
.v3-rp-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--k-yellow-s); color: #6b4f00; font-family: var(--k-head); font-size: 15px; font-weight: 800; }
.v3-rp-chips .v3-i { width: 17px; height: 17px; color: var(--k-yellow-d); }
@keyframes v3-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* --- study timer --- */
.v3-tm { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.v3-tm-ring { position: relative; width: 210px; height: 210px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--k-green) calc(var(--p) * 1%), #e8ebf4 0); box-shadow: 0 7px 0 var(--k-line); transition: background .3s; }
.v3-tm-ring::before { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: #fff; }
.v3-tm-ring.run { animation: v3-pulse 2s ease-in-out infinite; }
.v3-tm-ring > div { position: relative; text-align: center; }
.v3-tm-ring b { display: block; font-family: var(--k-head); font-size: 54px; font-weight: 800; line-height: 1; }
.v3-tm-ring small { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); }
.v3-tm-presets { display: flex; gap: 10px; }
.v3-tm-p { width: 64px; height: 44px; border: 0; border-radius: 16px; background: var(--k-blue-s); color: var(--k-blue-d); font-family: var(--k-head); font-size: 20px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 #cfe0ff; }
.v3-tm-p.on { background: var(--k-blue); color: #fff; box-shadow: 0 4px 0 var(--k-blue-d); }
.v3-tm-p:disabled { opacity: .5; cursor: default; }
.v3-tm-btns { display: flex; gap: 10px; }
.v3-tm-note { margin: 0; font-size: 13px; font-weight: 700; color: var(--k-muted); }

/* --- calm corner --- */
.v3-cm { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.v3-cm-stage { width: 280px; height: 250px; display: grid; place-items: center; }
.v3-cm-orb { width: 150px; height: 150px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #BFE9FF, #5BB8F5); box-shadow: 0 0 0 14px rgba(91, 184, 245, .18), 0 0 0 30px rgba(91, 184, 245, .09); color: #fff; font-family: var(--k-head); font-size: 22px; font-weight: 800; text-align: center; transform: scale(.8); transition: transform 4s ease-in-out; }
.v3-cm-orb.on.in { transform: scale(1.45); }
.v3-cm-orb.on.out { transform: scale(.8); }
.v3-cm-count { margin: 0; font-family: var(--k-head); font-size: 20px; font-weight: 800; color: var(--k-muted); }


/* ================= AR Smart Eye: dark background only =================
   Only this page, and only the backdrop; panels, tiles and strip stay as on every other hub. */
.v3-screen.v3-dark {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(91, 76, 255, .30), transparent 60%),
    radial-gradient(700px 480px at 0% 110%, rgba(0, 200, 255, .20), transparent 60%),
    #070B1E;
}
.v3-dark .v3-decor::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(59, 227, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 227, 255, .07) 1px, transparent 1px);
  background-size: 32px 32px;
}
.v3-dark .v3-decor .c1, .v3-dark .v3-decor .c2 { display: none; }
.v3-dark .v3-status { background: transparent; color: #C9D3F5; }
.v3-dark .v3-bat { border-color: #C9D3F5; }
/* panel surfaces go dark too; tiles, strip cards and Vee's bubble keep their normal colours */
.v3-dark .v3-top,
.v3-dark .v3-mascot,
.v3-dark .v3-content {
  border: 1px solid rgba(120, 140, 255, .22);
  background: rgba(14, 20, 48, .82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.v3-dark .v3-nav-item { color: #AEB9E0; }
.v3-dark .v3-nav-item.on { color: #3BE3FF; }
.v3-dark .v3-content-head { border-bottom-color: rgba(120, 140, 255, .25); }
.v3-dark .v3-content-head .title { color: #fff; }
.v3-dark .v3-carousel { border-color: rgba(120, 140, 255, .22); background: rgba(255, 255, 255, .05); box-shadow: none; }
.v3-dark .v3-today > div { background: rgba(255, 255, 255, .06); color: #AEB9E0; box-shadow: none; }
.v3-dark .v3-today b { color: #fff; }
/* text that sits straight on the dark panel (not inside a card) */
.v3-dark :is(.v3-fl-count, .v3-qz-count, .v3-cm-count, .v3-mt-hint, .v3-tm-note,
  .v3-bds-top b, .v3-vw-top b, .v3-ls-words > small, .v3-pf-side > h4, .v3-vd-side > h4) { color: #AEB9E0; }
.v3-dark :is(.v3-qz-card > h2, .v3-zz > h2, .v3-vd-meta > h3) { color: #fff; }
.v3-dark :is(.v3-zz > p, .v3-vd-meta > span) { color: #C9D3F5; }
