/* DuoDuo iOS-style theme - glass, dock, system typography */
html {
  scroll-padding-top: 92px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
}

/* iOS touch behavior: no tap flash, no double-tap zoom delay */
* {
  -webkit-tap-highlight-color: transparent;
}
html {
  touch-action: manipulation;
}

/* iOS system type scale: large title 34 / title 24 / body 17 / footnote 13 */
.hero h1 {
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.6px;
}
.cp-title,
.section-title h2 {
  font-size: 24px;
  line-height: 1.25;
}
.hero-copy p,
.fun-desc,
.video-info b {
  font-size: 17px;
  line-height: 1.7;
}
.footer-note,
.gc-hint,
.gcard-en,
.video-info i,
.ios-play-card p,
.ios-fact-card p {
  font-size: 13px;
}

/* content column narrowed to 960px */
.page {
  max-width: 960px;
}
.fun-block,
.cp-growth,
.cp-love {
  max-width: 960px;
}

/* iOS grouped section header */
.cp-kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--coral);
}
.cp-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  color: var(--navy);
}
.cp-sub {
  margin: 5px 0 20px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}
.brand-name, .hero h1, .cp-title, .fun-block h2, .fun-card h3, .ios-dock b, .ios-explore-card b, .ios-quest-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
  letter-spacing: -0.5px;
}

/* frosted topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 12px 18px;
  margin: 0 -18px;
  border-radius: 0 0 28px 28px;
  background: rgba(255, 253, 250, .72);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 10px 30px rgba(53, 84, 125, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .75);
}
.icon-btn {
  border-radius: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.icon-btn {
  width: 54px;
  height: 54px;
  font-size: 20px;
}
.nav-avatar-btn {
  width: 60px;
  height: 60px;
  padding: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(53, 84, 125, .16);
  overflow: hidden;
}
.nav-avatar-btn .nav-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.crown-btn {
  background: #fff;
  box-shadow: 0 10px 24px rgba(231, 165, 45, .4);
}
.cp-kicker {
  align-items: center;
}
.section-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 4px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(53, 84, 125, .14);
  object-fit: contain;
}
.section-avatar.small {
  width: 34px;
  height: 34px;
  vertical-align: middle;
}
.ios-sub-block h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.planet-img {
  position: absolute;
  right: 3%;
  top: 6%;
  width: 230px;
  height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(53, 84, 125, .22));
  animation: floaty 5s ease-in-out infinite;
}

/* scene illustration strip */
.scene-strip {
  margin: 20px 0 0;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(53, 84, 125, .14), inset 0 1px 0 rgba(255, 255, 255, .8);
  border: 1px solid rgba(255, 255, 255, .85);
}
.scene-strip img {
  display: block;
  width: 100%;
  height: auto;
}

/* greeting cards */
.gcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.gcard {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px 18px 16px;
  background:
    radial-gradient(circle at 100% 0%, var(--gc), transparent 9rem),
    linear-gradient(160deg, #ffffff, #fffdf6);
  border: 2px solid var(--gc);
  box-shadow: 0 14px 30px rgba(53, 84, 125, .12);
  transition: transform .18s cubic-bezier(.2, .8, .3, 1.2), box-shadow .18s ease;
}
.gcard:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 0 22px 44px rgba(53, 84, 125, .18);
}
.gcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: var(--gc);
}
.gcard::after {
  content: "✦";
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 18px;
  color: var(--gc);
  opacity: .7;
}
.gcard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gcard-to {
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--gc);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}
.gcard-seal {
  font-size: 22px;
  filter: drop-shadow(0 3px 4px rgba(53, 84, 125, .2));
}
.gcard-emoji {
  margin: 14px 0 8px;
  text-align: center;
  font-size: 46px;
  line-height: 1;
  animation: floaty 3.6s ease-in-out infinite;
}
.gcard h4 {
  margin: 0 0 5px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
}
.gcard-en {
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--gc);
}
.gcard-zh {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}
.gcard-from {
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.gc-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* original mini cartoons */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.video-card {
  border-radius: 26px;
  padding: 14px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 216, 97, .25), transparent 10rem),
    linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(255, 250, 240, .94));
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 14px 32px rgba(53, 84, 125, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(53, 84, 125, .18);
}
.video-card video {
  display: block;
  width: 100%;
  border-radius: 18px;
  background: #1d2b3a;
}
.video-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 4px 2px;
}
.video-info b {
  font-size: 16px;
  color: var(--navy);
}
.video-info span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.video-info i {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--coral);
}

/* eye-care guard */
.guard-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(38, 54, 74, .35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.guard-card {
  width: min(420px, 100%);
  border-radius: 36px;
  padding: 28px 24px 24px;
  text-align: center;
  background:
    radial-gradient(circle at 90% 0%, rgba(102, 188, 236, .25), transparent 11rem),
    linear-gradient(160deg, rgba(255, 255, 255, .98), rgba(255, 250, 240, .97));
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 30px 80px rgba(38, 54, 74, .35);
  animation: popIn .4s cubic-bezier(.2, .8, .3, 1.2) both;
}
.guard-card.force {
  border-color: #ffd861;
}
.guard-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  display: block;
  animation: floaty 3.4s ease-in-out infinite;
}
.guard-title {
  font-size: 23px;
  font-weight: 900;
  color: var(--navy);
}
.guard-text {
  margin: 10px 0 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.guard-count {
  width: 84px;
  height: 84px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
  color: #b7791f;
  background: #fff3c8;
  box-shadow: inset 0 0 0 4px rgba(255, 216, 97, .55);
}
.guard-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.guard-btn {
  border: 0;
  border-radius: 99px;
  padding: 14px 26px;
  font-size: 16px;
  font-weight: 900;
  color: #43340a;
  background: linear-gradient(135deg, #ffd861, #ffb85c);
  box-shadow: 0 10px 22px rgba(255, 184, 92, .4);
  cursor: pointer;
}
.guard-btn:disabled {
  opacity: .55;
  cursor: default;
}

/* playful polish */
.fun-card {
  position: relative;
}
.fun-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 26px solid var(--coral);
  border-left: 26px solid transparent;
  border-bottom-right-radius: 18px;
  opacity: .4;
}
.hero {
  box-shadow: 0 26px 64px rgba(53, 84, 125, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.primary {
  position: relative;
  overflow: hidden;
}
.primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  transform: skewX(-20deg);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: cardSweep 4.5s ease-in-out infinite;
}
.kawaii .gcard {
  border-radius: 30px;
}

/* iOS hero card */
.hero {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(53, 84, 125, .14), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.primary, .secondary, .cp-btn, .fun-abc-tile, .role, .ios-explore-card, .ios-habit-sticker, .ios-dock button {
  transition: transform .16s cubic-bezier(.2, .8, .3, 1.2), box-shadow .16s ease;
}
.primary:active, .secondary:active, .cp-btn:active, .fun-abc-tile:active, .role:active, .ios-explore-card:active, .ios-habit-sticker:active, .ios-dock button:active {
  transform: scale(.96);
}

/* growth garden */
.ios-sub-block {
  margin-top: 30px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 14px 34px rgba(53, 84, 125, .08);
}
.ios-sub-block h3 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 800;
  color: var(--navy);
}
.ios-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ios-explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}
.ios-explore-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px 12px;
  border: 1.5px solid rgba(53, 84, 125, .1);
  border-radius: 22px;
  background: linear-gradient(160deg, #ffffff, #f7fbff);
  box-shadow: 0 8px 18px rgba(53, 84, 125, .08);
  cursor: pointer;
}
.ios-explore-card:hover {
  transform: translateY(-3px);
}
.ios-explore-card.done {
  border-color: rgba(119, 214, 177, .7);
  background: linear-gradient(160deg, #ffffff, #ecfbf4);
}
.ios-explore-card.done::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  font-weight: 900;
  color: #1c5c47;
}
.ios-explore-card {
  position: relative;
}
.ios-explore-emoji {
  font-size: 30px;
  line-height: 1.1;
}
.ios-explore-card b {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: .02em;
}
.ios-explore-zh {
  font-size: 11.5px;
  color: var(--muted);
}

/* daily quest */
.ios-quest-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ios-quest-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
}
.ios-quest-date {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.ios-quest-stars {
  font-size: 14px;
  font-weight: 800;
  color: #b7791f;
  background: #fff3c8;
  padding: 6px 12px;
  border-radius: 99px;
}
.ios-quest-list {
  display: grid;
  gap: 9px;
}
.ios-quest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  border: 1.5px solid rgba(53, 84, 125, .08);
}
.ios-quest-item.done {
  background: linear-gradient(135deg, #ffffff, #ecfbf4);
  border-color: rgba(119, 214, 177, .5);
}
.ios-quest-icon {
  font-size: 24px;
}
.ios-quest-label {
  flex: 1;
  font-weight: 700;
  color: var(--ink);
}
.ios-quest-btn {
  border: 0;
  border-radius: 99px;
  padding: 8px 13px;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--orange));
  cursor: pointer;
}
.ios-quest-btn:disabled {
  background: #e7f7ef;
  color: #1c5c47;
  cursor: default;
}

/* habit stickers */
.ios-habit-head {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}
.ios-habit-head span {
  margin-left: 8px;
  font-size: 13px;
  color: var(--muted);
}
.ios-habit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.ios-habit-sticker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  border: 1.5px dashed rgba(53, 84, 125, .18);
  border-radius: 20px;
  background: rgba(255, 255, 255, .85);
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
.ios-habit-sticker span {
  font-size: 22px;
}
.ios-habit-sticker.done {
  border-style: solid;
  border-color: rgba(119, 214, 177, .65);
  background: linear-gradient(135deg, #ffffff, #ecfbf4);
  color: #1c5c47;
}

/* dad play ideas */
.ios-play-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ios-play-card {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(255, 247, 232, .9));
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 8px 20px rgba(53, 84, 125, .08);
}
.ios-play-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ios-play-emoji {
  font-size: 26px;
}
.ios-play-top b {
  font-size: 16px;
  color: var(--navy);
}
.ios-play-top i {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--coral);
}
.ios-play-card p {
  margin: 8px 0 6px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.65;
}
.ios-play-card small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* mini encyclopedia */
.ios-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.ios-fact-card {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(240, 248, 255, .92));
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 8px 20px rgba(53, 84, 125, .08);
}
.ios-fact-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ios-fact-top span {
  font-size: 26px;
}
.ios-fact-top b {
  font-size: 15.5px;
  color: var(--navy);
}
.ios-fact-top i {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--coral);
}
.ios-fact-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.7;
}
.ios-book-link {
  margin: 4px 0 12px;
}

/* customize PRO */
.crown-btn {
  background: linear-gradient(135deg, #fff3c8, #ffe3a8);
  box-shadow: 0 8px 20px rgba(231, 165, 45, .35);
}
.custom-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(38, 54, 74, .28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.custom-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.custom-panel {
  width: min(480px, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: 34px;
  padding: 22px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 158, 195, .25), transparent 12rem),
    linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(255, 250, 240, .96));
  border: 1.5px solid rgba(255, 255, 255, .9);
  box-shadow: 0 30px 80px rgba(38, 54, 74, .3);
}
.custom-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.custom-head b {
  display: block;
  font-size: 21px;
  font-weight: 900;
  color: #b7791f;
  letter-spacing: -.3px;
}
.custom-head small {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .12em;
}
.custom-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(53, 84, 125, .08);
  cursor: pointer;
  font-size: 15px;
}
.custom-body {
  display: grid;
  gap: 14px;
}
.custom-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 800;
  font-size: 14px;
  color: var(--navy);
}
.custom-field input[type="text"],
.custom-field input[type="number"],
.custom-field select {
  border: 2px solid rgba(53, 84, 125, .12);
  border-radius: 16px;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}
.custom-date {
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-date input {
  width: 76px;
}
.custom-colors {
  display: flex;
  gap: 10px;
}
.custom-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--swatch);
  box-shadow: 0 6px 14px rgba(53, 84, 125, .18);
  cursor: pointer;
}
.custom-swatch.active {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  transform: scale(1.12);
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(53, 84, 125, .08);
}
.switch-row b {
  display: block;
  font-size: 15px;
  color: var(--navy);
}
.switch-row small {
  font-size: 12px;
  color: var(--muted);
}
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 32px;
  flex: none;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch i {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(53, 84, 125, .18);
  transition: background .2s ease;
}
.switch i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(53, 84, 125, .25);
  transition: transform .2s cubic-bezier(.2, .8, .3, 1.2);
}
.switch input:checked + i {
  background: linear-gradient(135deg, var(--mint), #8fddbb);
}
.switch input:checked + i::after {
  transform: translateX(20px);
}
.custom-save {
  border: 0;
  border-radius: 99px;
  padding: 15px;
  font-size: 16px;
  font-weight: 900;
  color: #43340a;
  background: linear-gradient(135deg, #ffd861, #ffb85c);
  box-shadow: 0 10px 22px rgba(255, 184, 92, .4);
  cursor: pointer;
}

/* school bounty */
.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.school-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 216, 97, .3), transparent 9rem),
    linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(255, 248, 231, .94));
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 10px 24px rgba(53, 84, 125, .1);
}
.school-emoji {
  font-size: 34px;
  line-height: 1;
}
.school-card b {
  font-size: 16px;
  color: var(--navy);
}
.school-card i {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--coral);
}
.school-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.fun-block.hidden {
  display: none;
}

/* kawaii mode */
.kawaii .hero,
.kawaii .fun-rhyme-card,
.kawaii .cp-card,
.kawaii .ios-sub-block,
.kawaii .custom-panel {
  border-radius: 38px;
}
.kawaii .fun-abc-tile,
.kawaii .ios-explore-card,
.kawaii .school-card,
.kawaii .ios-fact-card,
.kawaii .ios-play-card {
  border-radius: 26px;
}
.kawaii .fun-abc-tile:hover,
.kawaii .ios-explore-card:hover {
  transform: translateY(-4px) rotate(-2deg);
}
.kawaii .planet {
  animation-duration: 4s;
}
.kawaii .bubble {
  animation-duration: 2.8s;
}

/* iOS dock -> native tab bar */
.ios-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  gap: 4px;
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  background: rgba(255, 253, 250, .88);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border-top: 1px solid rgba(53, 84, 125, .12);
  box-shadow: 0 -12px 32px rgba(53, 84, 125, .14);
}
.ios-dock button {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px 6px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  transition: transform .14s cubic-bezier(.2, .8, .3, 1.2), background .14s ease;
}
.ios-dock button span {
  font-size: 23px;
  line-height: 1;
}
.ios-dock button b {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
}
.ios-dock button:active {
  background: linear-gradient(135deg, rgba(102, 188, 236, .32), rgba(251, 125, 134, .24));
  transform: scale(.94);
}
body {
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 640px) {
  .fun-nav-btn {
    display: none;
  }
  .topbar {
    margin: 0 -12px;
    padding: 10px 12px;
  }
  .hero {
    border-radius: 30px;
    padding: 26px 22px;
  }
  .ios-sub-block {
    padding: 18px 16px;
    border-radius: 24px;
  }
  .ios-explore-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .ios-explore-card {
    padding: 10px 6px 9px;
    border-radius: 18px;
  }
  .ios-explore-emoji {
    font-size: 24px;
  }
  .ios-explore-card b {
    font-size: 12.5px;
  }
  .ios-explore-zh {
    font-size: 10.5px;
  }
  .ios-play-grid {
    grid-template-columns: 1fr;
  }
}

/* pinyin */
.fun-rhyme-py {
  margin: 4px 0 12px;
  padding: 7px 11px;
  border-radius: 12px;
  font-size: 13px;
  letter-spacing: .05em;
  color: #7d8b9a;
  background: rgba(255, 255, 255, .62);
}
.fun-abc-py {
  font-size: 10px;
  letter-spacing: .04em;
  color: #9aa6b3;
}
.ios-explore-py {
  font-size: 10.5px;
  letter-spacing: .04em;
  color: #9aa6b3;
}

/* scroll reveal (only when JS is on) */
.js-anim .hero,
.js-anim .roles,
.js-anim .mission,
.js-anim .workspace,
.js-anim .cp-growth,
.js-anim .cp-love,
.js-anim .fun-block,
.js-anim .ios-sub-block,
.js-anim .footer-note {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2, .8, .3, 1.2);
}
.js-anim .in {
  opacity: 1;
  transform: none;
}
.js-anim .in .fun-abc-tile,
.js-anim .in .ios-explore-card,
.js-anim .in .ios-fact-card,
.js-anim .in .ios-habit-sticker,
.js-anim .in .fun-cartoon-card {
  animation: popIn .5s cubic-bezier(.2, .8, .3, 1.2) both;
}
.js-anim .in .fun-abc-tile:nth-child(n+2),
.js-anim .in .ios-explore-card:nth-child(n+2),
.js-anim .in .ios-fact-card:nth-child(n+2) {
  animation-delay: calc((var(--i, 0)) * 0s + 0.03s);
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* soft animated blobs behind hero */
.hero {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .93), rgba(255, 248, 214, .87)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 196, 69, .08) 14px 28px);
}
.hero::before {
  content: "";
  position: absolute;
  left: -70px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 173, 208, .35), transparent 65%);
  animation: blobFloat 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(34px, 26px) scale(1.15); }
}

/* ambient motion */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.planet {
  animation: floaty 5s ease-in-out infinite;
}
.bubble {
  animation: floaty 3.6s ease-in-out infinite;
}
.bubble.b2 {
  animation-delay: -1.8s;
}
.brand-mark {
  transition: transform .25s cubic-bezier(.2, .8, .3, 1.2);
}
.brand-mark:hover {
  transform: rotate(-8deg) scale(1.07);
}
.icon-btn {
  transition: transform .2s cubic-bezier(.2, .8, .3, 1.2), box-shadow .2s ease;
}
.icon-btn:hover {
  transform: translateY(-2px) rotate(-4deg);
}

/* shimmer progress */
.fun-progress i,
.cp-progress i {
  position: relative;
  overflow: hidden;
}
.fun-progress i::after,
.cp-progress i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%);
  animation: shimmer 2.2s linear infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* rhyme card light sweep */
.fun-rhyme-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 38%;
  height: 100%;
  pointer-events: none;
  transform: skewX(-18deg);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: cardSweep 5.5s ease-in-out infinite;
}
@keyframes cardSweep {
  0%, 55% { left: -60%; }
  100% { left: 135%; }
}

/* dock entrance */
.ios-dock {
  animation: dockIn .6s cubic-bezier(.2, .8, .3, 1.2) .15s both;
}
@keyframes dockIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* card hover polish */
.cp-card,
.fun-cartoon-card,
.ios-play-card {
  transition: transform .18s ease, box-shadow .18s ease;
}
.cp-card:hover,
.ios-play-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(53, 84, 125, .16);
}
