/* 🧧 Daily rewards: the 🔥 streak pill as a button, the Streak sheet, the red envelope (js/rewards.js),
   and the buddy outfits in the 🎨 buddy picker (js/profiles.js) */
#home .streak-pill { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .08s, box-shadow .08s; }
#home .streak-pill:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
#home .streak-pill .rw-dot { display: inline-block; margin-left: 6px; font-size: 18px; animation: rw-wiggle 1.6s ease-in-out infinite; }
#home .streak-pill.rw-ready { background: #fff0ee; }
@keyframes rw-wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-14deg); } 86% { transform: rotate(12deg); } 94% { transform: rotate(-6deg); } }

/* the Streak sheet: Writing Desk paper (css/desk.css tokens), Home's drawn flame and red envelope, one red button */
.rw-sheet {
  position: fixed; inset: 0; z-index: 30; background: rgba(29, 34, 51, .5);
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  animation: rw-fade .2s ease-out;
}
.rw-sheet[hidden] { display: none; }
@keyframes rw-fade { from { opacity: 0; } }
.rw-card {
  --ink: var(--a-fg); --seal: var(--a-go); --gold: #ffc22e;
  position: relative; width: min(560px, 100%); max-height: 100%; overflow-y: auto; overflow-x: hidden; box-sizing: border-box;
  scrollbar-width: none;
  background: var(--a-card); color: var(--a-fg);
  border: 0; border-radius: 28px; box-shadow: var(--a-sh-big);
  padding: 26px 26px 20px; display: flex; flex-direction: column; gap: 16px;
  font-family: var(--f-body); font-weight: 800;
  animation: rw-up .22s ease-out;
}
.rw-card::-webkit-scrollbar { display: none; }
@keyframes rw-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.rw-sub { margin: 0; color: var(--a-mute); font-size: 17px; line-height: 1.3; text-wrap: balance; }
.rw-x:focus-visible { outline: 3px solid #ffc22e; outline-offset: 2px; }
.rw-x {
  position: absolute; top: 18px; right: 18px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; padding: 0;
  border: 0; background: var(--a-card); color: var(--a-fg); box-shadow: var(--a-sh); display: grid; place-items: center;
  font: 900 20px/1 var(--f-body); cursor: pointer; transition: transform .12s ease-out;
}
.rw-x:active { transform: translateY(2px); box-shadow: var(--a-sh-sm); }

/* 🔥 the hero: Home's drawn flame with a warm glow and sparks, and the count rolling up */
.rw-hero { display: flex; align-items: center; gap: 18px; padding-right: 50px; }
.rw-flame { position: relative; flex: none; width: 92px; height: 92px; display: grid; place-items: center; }
.rw-halo { position: absolute; inset: -4px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 170, 40, .5) 0%, rgba(255, 120, 40, .16) 45%, rgba(255, 120, 40, 0) 70%); animation: rw-halo 1.8s ease-in-out infinite; }
.rw-fire { position: relative; display: block; width: 64px; height: 77px; transform-origin: 50% 90%; animation: rw-burst .6s cubic-bezier(.3, 1.6, .5, 1) both, rw-flicker 1.3s .6s ease-in-out infinite; }
.rw-fire svg { display: block; width: 100%; height: 100%; }
.rw-patch { position: absolute; right: 2px; bottom: 6px; font-size: 30px; line-height: 1; }
.rw-spark { position: absolute; left: 50%; top: 45%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--gold); opacity: 0;
  animation: rw-spark 1.9s calc(.5s + var(--n) * .37s) ease-out infinite; --x: calc((var(--n) - 2) * 18px); }
.rw-spark:nth-child(odd) { background: #ff7a1a; }
@keyframes rw-halo { 0%, 100% { transform: scale(.9); opacity: .8; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes rw-burst { from { transform: scale(.3) rotate(-16deg); opacity: 0; } }
@keyframes rw-flicker { 0%, 100% { transform: scale(1, 1) rotate(-2deg); } 30% { transform: scale(1.04, .96) rotate(2deg); } 60% { transform: scale(.97, 1.06) rotate(-1deg); } }
@keyframes rw-spark { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--x), -64px) scale(.2); opacity: 0; } }
.rw-card.cracked .rw-halo { background: radial-gradient(circle, rgba(160, 175, 210, .45) 0%, rgba(160, 175, 210, 0) 70%); }
.rw-card.cracked .rw-fire { opacity: .45; animation: rw-burst .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.rw-card.cracked .rw-spark { display: none; }
.rw-hero h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 56px; line-height: .95; color: var(--a-fg); }
.rw-hero h2 small { font-size: 28px; }
.rw-num { display: inline-block; min-width: .6em; }

/* this week: soft squares, red seals stamp down one after another, today ringed in gold */
.rw-week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.rw-day { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 13px; }
.rw-box {
  width: 100%; max-width: 64px; aspect-ratio: 1; box-sizing: border-box; border-radius: 12px; border: 0; background: var(--a-well);
  display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--a-mute);
}
.rw-day.seal .rw-box { background: var(--seal); color: #fff; font-family: var(--f-kai); font-size: clamp(20px, 6vw, 30px); font-weight: 400; box-shadow: 0 3px 0 var(--a-go-sh); }
.rw-day.seal .rw-box, .rw-day.shield .rw-box { animation: rw-stamp .38s var(--d, .3s) cubic-bezier(.5, 1.9, .5, 1) both; }
@keyframes rw-stamp { 0% { transform: scale(2.1) rotate(-14deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-3deg); opacity: 1; } }
.rw-day.shield .rw-box { background: #e3f1fb; font-size: 22px; }
.rw-day.today .rw-box { background: #fff6dc; color: var(--a-fg); }
.rw-day.is-today .rw-box { box-shadow: inset 0 0 0 3px var(--gold); }
.rw-day.is-today.seal .rw-box { box-shadow: 0 0 0 3px var(--a-card), 0 0 0 6px var(--gold); }
.rw-day.later .rw-box { background: transparent; box-shadow: inset 0 0 0 2px var(--a-well); }
.rw-day small { color: var(--a-mute); font-weight: 800; }
.rw-day.is-today small { color: var(--a-fg); font-weight: 900; }

/* 🧧 today's red envelope with its two steps */
.rw-env {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px;
  border: 0; border-radius: 18px; padding: 14px 16px; background: var(--a-test-bg);
}
.rw-env b { font-family: var(--f-body); font-weight: 900; font-size: 19px; line-height: 1.15; color: var(--a-fg); }
.rw-env p { margin: 2px 0 0; color: var(--a-mute); font-size: 15px; }
.rw-env-body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rw-pkt { position: relative; flex: none; width: 54px; height: 65px; animation: rw-float 2.6s ease-in-out infinite; }
@keyframes rw-float { 50% { transform: translateY(-4px) rotate(3deg); } }
.rw-env.ready { background: #ffe1d8; }
.rw-env.ready b { font-family: var(--f-display); font-weight: 400; font-size: 22px; }
.rw-env.ready .rw-pkt { animation: rw-wiggle 1.2s ease-in-out infinite; }
.rw-rays { position: absolute; left: 43px; top: 50%; width: 420px; height: 420px; margin: -210px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 194, 46, .45) 0 10deg, rgba(255, 194, 46, 0) 10deg 24deg); animation: rw-spin 9s linear infinite; }
@keyframes rw-spin { to { transform: rotate(360deg); } }
.rw-env.opened { background: var(--a-env-bg); }
.rw-env.opened .rw-pkt { animation: none; opacity: .7; }
.rw-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rw-step { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; column-gap: 6px; row-gap: 5px; font-size: 15px; }
.rw-step > b { font-size: 15px; font-family: var(--f-body); font-weight: 900; color: var(--a-mute); }
.rw-step .rw-bar { grid-column: 2 / 4; }
.rw-step.ok { color: var(--a-ok); }
.rw-step.ok .rw-bar { display: none; }
.rw-tick { font-size: 17px; text-align: center; }
.rw-step.ok .rw-tick { width: 24px; height: 24px; border-radius: 50%; background: var(--a-ok); color: #fff; font-size: 14px; display: grid; place-items: center; animation: rw-pop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.rw-bar { display: block; height: 10px; border-radius: 99px; border: 0; overflow: hidden; background: var(--a-bar-bg); }
.rw-bar i { display: block; height: 100%; border-radius: 99px; background: var(--a-xp); transform-origin: left; animation: rw-fill .8s .4s cubic-bezier(.2, .8, .3, 1) both; }
.rw-bar.review i { background: var(--c-write); }
@keyframes rw-fill { from { transform: scaleX(0); } }

/* buttons: the red main one (.dk-go) full width, a soft ghost beside it on the reveal */
.rw-btn.main { width: 100%; flex: none; }
.rw-btn:focus-visible { outline: 3px solid #ffc22e; outline-offset: 3px; }
.rw-btn.main.glow { animation: rw-throb 1.1s ease-in-out infinite; }
@keyframes rw-throb { 50% { transform: scale(1.03); } }
/* the next prize and other news: one quiet line */
.rw-foot { margin: -4px 0 0; text-align: center; font-size: 15px; line-height: 1.35; color: var(--a-mute); text-wrap: balance; }
.rw-chip { font: inherit; color: inherit; }
.rw-chip + .rw-chip::before { content: " · "; }

/* short screens (a phone on its side, iPad with the keyboard up): a smaller flame */
@media (max-height: 640px) {
  .rw-card { gap: 10px; padding: 16px 20px; }
  .rw-flame { width: 72px; height: 72px; }
  .rw-fire { width: 50px; height: 60px; }
  .rw-hero h2 { font-size: 46px; }
  .rw-hero h2 small { font-size: 23px; }
  .rw-week { width: min(100%, 420px); align-self: center; }
}
@media (max-width: 420px) {
  .rw-card { padding: 22px 18px 18px; gap: 14px; }
  .rw-hero { gap: 12px; }
  .rw-hero h2 { font-size: 48px; }
  .rw-flame { width: 76px; height: 76px; }
  .rw-fire { width: 54px; height: 65px; }
  .rw-week { gap: 5px; }
  .rw-env { padding: 12px; gap: 12px; }
  .rw-pkt { width: 46px; height: 55px; }
}

/* the envelope opens: rays spin, the flap flips, the 福 coin jumps out, confetti bursts, the coins roll up */
.rw-reveal { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.rw-stage { position: relative; width: 100%; height: 230px; display: grid; place-items: center; overflow: hidden; border-radius: 22px; background: var(--a-test-bg); }
.rw-rays.big { left: 50%; top: 55%; width: 560px; height: 560px; margin: -280px; opacity: 0; animation: rw-rays-in .5s .35s ease-out forwards, rw-spin 12s linear infinite; }
@keyframes rw-rays-in { to { opacity: 1; } }
.rw-big-env {
  position: relative; width: 132px; height: 164px; margin-top: 40px; border-radius: 14px; border: 4px solid var(--ink); background: var(--seal);
  box-shadow: 0 8px 0 var(--a-go-sh); display: grid; place-items: center; animation: rw-shake .6s ease-in-out;
}
.rw-flap { position: absolute; top: -4px; left: -4px; right: -4px; height: 58px; background: #c42a21; border: 4px solid var(--ink); border-radius: 12px 12px 50% 50%; transform-origin: top; animation: rw-flap .45s .3s ease-in both; }
.rw-coin { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--ink); background: var(--gold); display: grid; place-items: center; color: #c42a21; font-family: var(--f-kai); font-size: 40px; font-weight: 400; animation: rw-jump .8s .4s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes rw-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-8deg) scale(1.05); } 45% { transform: rotate(7deg); } 70% { transform: rotate(-4deg); } }
@keyframes rw-flap { to { transform: scaleY(-.6); } }
@keyframes rw-jump { 0% { transform: translateY(20px) scale(.3); opacity: 0; } 55% { transform: translateY(-78px) scale(1.15) rotate(10deg); opacity: 1; } 100% { transform: translateY(-58px) scale(1); opacity: 1; } }
@keyframes rw-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.rw-conf { position: absolute; left: 50%; top: 45%; width: 10px; height: 16px; margin: -8px -5px; border-radius: 3px; background: var(--c); opacity: 0;
  animation: rw-conf 1.3s var(--d) cubic-bezier(.1, .7, .3, 1) both; }
@keyframes rw-conf { 0% { transform: rotate(var(--a)) translateY(0) rotate(0); opacity: 1; } 80% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(400deg); opacity: 0; } }
.rw-reveal-t { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 56px; line-height: 1; animation: rw-pop .5s .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.rw-prize { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 18px; background: #fff6dc; padding: 6px 18px 6px 8px; box-shadow: var(--a-sh-sm); }
.rw-prize b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 24px; }
.rw-prize small { color: var(--a-mute); font-size: 14px; }
.rw-xp { margin: -4px auto 0; width: fit-content; justify-self: center; align-self: center; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--a-test-fg); background: var(--a-test-bg); border: 0; border-radius: 999px; padding: 6px 14px; }
.rw-xp b { font-family: var(--f-display); font-weight: 400; font-size: 20px; color: var(--a-xp); }
.rw-pop { animation: rw-pop .45s var(--d, .5s) cubic-bezier(.3, 1.6, .5, 1) both; }
.rw-reveal-btns { width: 100%; display: flex; gap: 10px; margin-top: 6px; }
.rw-reveal-btns .rw-btn { flex: 1; min-width: 0; }
.rw-reveal-btns .dk-ghost { min-height: 56px; }
@media (max-height: 700px) { .rw-stage { height: 190px; } .rw-big-env { transform: scale(.85); } .rw-reveal-t { font-size: 46px; } }

/* a streak milestone gave an outfit */
.rw-toast {
  position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); box-sizing: border-box;
  background: #fffdf8; color: #1d2233; border: 3px solid #1d2233; border-radius: 18px; padding: 8px 16px; box-shadow: 0 5px 0 #1d2233;
  font-family: "Nunito", -apple-system, sans-serif; font-weight: 800; font-size: 17px; animation: rw-up .3s ease-out;
}

/* 🎨 the buddy Wardrobe (js/profiles.js pickBuddy) is styled in css/kids.css, with Who's practicing? */

/* a phone on its side: two columns (flame and week | envelope and button) */
@media (max-height: 500px) and (min-width: 640px) {
  .rw-card { width: min(780px, 100%); display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 10px; align-content: center; padding: 16px 20px; }
  .rw-card > .rw-x { position: absolute; top: 12px; right: 12px; }
  .rw-hero { grid-column: 1; grid-row: 1; }
  .rw-week { grid-column: 1; grid-row: 2 / 4; align-self: start; }
  .rw-card > .rw-env { grid-column: 2; grid-row: 1; margin-right: 52px; }
  .rw-card > .rw-btn.main { grid-column: 2; grid-row: 2; align-self: center; }
  .rw-foot { grid-column: 2; grid-row: 3; margin: 0; }
  .rw-card:has(.rw-reveal) { display: block; }
  .rw-reveal { display: grid; grid-template-columns: 42% 1fr; column-gap: 20px; row-gap: 8px; align-items: center; }
  .rw-reveal > .rw-stage { grid-row: 1 / 6; height: 300px; }
  .rw-reveal > :not(.rw-stage) { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .rw-card, .rw-sheet, .rw-big-env, .rw-conf, .rw-reveal-t, .rw-flap, .rw-coin, .rw-pop, .rw-toast, #home .streak-pill .rw-dot, .rw-pkt, .rw-halo, .rw-fire, .rw-spark, .rw-rays,
  .rw-box, .rw-bar i, .rw-tick, .rw-btn.main.glow { animation: none !important; }
}

/* 📝 My school score (js/schoolscore.js): the Streak sheet's paper card, two big number steppers, word tiles to tap,
   then a party (80% or more) or a three-step plan */
.ss-head { display: flex; align-items: center; gap: 14px; padding-right: 52px; }
.ss-head h2 { margin: 0; font: 400 32px/1.05 var(--f-display); color: var(--a-fg); }
.ss-head .rw-sub { margin-top: 4px; }
.ss-seal { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--a-go); color: #fff; display: grid; place-items: center; font: 400 32px/1 var(--f-brush); transform: rotate(-4deg); }
.ss-date { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.ss-date input { min-height: 46px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--a-well); color: var(--a-fg); font: 800 17px/1 var(--f-body); }
.ss-nums { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: center; }
.ss-num { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 17px; color: var(--a-mute); }
.ss-step { display: flex; align-items: center; gap: 6px; }
.ss-step input { width: 96px; height: 72px; box-sizing: border-box; border: 0; border-radius: 16px; background: var(--a-well); color: var(--a-fg); text-align: center;
  font: 400 44px/1 var(--f-display); -moz-appearance: textfield; appearance: textfield; }
.ss-step input::-webkit-inner-spin-button, .ss-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ss-step input:focus-visible, .ss-pm:focus-visible, .ss-w:focus-visible, .ss-later:focus-visible { outline: 3px solid #ffc22e; outline-offset: 2px; }
.ss-pm { width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; background: var(--a-card); box-shadow: var(--a-sh); color: var(--a-fg); font: 900 26px/1 var(--f-body); cursor: pointer; }
.ss-pm:active { transform: translateY(2px); box-shadow: var(--a-sh-sm); }
.ss-pct { margin: -4px 0 0; text-align: center; font: 400 26px/1 var(--f-display); color: var(--a-mute); }
.ss-pct.bad { font: 800 17px/1.3 var(--f-body); color: var(--a-go); }
.rw-btn.main:disabled { opacity: .45; cursor: default; }
.ss-later { align-self: center; min-height: 44px; padding: 0 16px; border: 0; background: none; color: var(--a-mute); font: 800 17px/1 var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ss-words { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ss-w { min-width: 72px; min-height: 72px; padding: 6px 10px; border: 3px solid transparent; border-radius: 16px; background: var(--a-word-bg); color: var(--a-fg); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 400 34px/1 var(--f-kai); }
.ss-w small { font: 800 13px/1 var(--f-body); color: var(--a-mute); }
.ss-w.on { border-color: var(--a-go); background: var(--a-test-bg); color: var(--a-test-fg); }
.ss-w { position: relative; }
.ss-w.on::after { content: "✕"; position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%; background: var(--a-go); color: #fff; font: 900 13px/24px var(--f-body); }
.ss-result, .ss-left, .ss-right { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ss-left, .ss-right { width: 100%; }
.ss-btns { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ss-result h2 { margin: 0; font: 400 34px/1.05 var(--f-display); color: var(--a-fg); }
.ss-stage { position: relative; width: 100%; height: 150px; display: grid; place-items: center; border-radius: 22px; background: var(--a-word-bg); overflow: hidden; }
.ss-result.good .ss-stage { background: #fff3cf; }   /* gold: red means a miss in Inkpop */
.ss-score { position: relative; display: flex; align-items: baseline; gap: 4px; font: 400 76px/1 var(--f-display); color: var(--a-fg); animation: rw-burst .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.ss-score i { font-style: normal; font-size: 48px; color: var(--a-mute); }
.ss-score span { font-size: 48px; color: var(--a-mute); }
.ss-result.good .ss-score { color: var(--a-ok); }
.ss-bark { font-size: 36px; color: var(--a-go); }
.ss-plan { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; }
.ss-plan li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--a-well); font-size: 17px; line-height: 1.25; }
.ss-plan b { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--a-go); color: #fff; display: grid; place-items: center; font: 400 18px/1 var(--f-display); }
@media (max-height: 520px) {
  .ss-card { gap: 10px; padding: 16px 20px; }
  .ss-head h2 { font-size: 26px; }
  .ss-stage { height: 96px; }
  .ss-score { font-size: 56px; }
  .ss-step input { height: 60px; font-size: 36px; }
  .ss-w { min-width: 60px; min-height: 60px; font-size: 28px; }
  .ss-plan li { padding: 6px 12px; }
}
/* a phone on its side: the score and cheer on the left, the words and buttons on the right */
@media (max-height: 500px) and (min-width: 640px) {
  .ss-card.ss-on-result { display: block; }
  .ss-on-result .ss-result { flex-direction: row; align-items: center; gap: 20px; }
  .ss-on-result .ss-left { flex: 0 0 40%; }
  .ss-on-result .ss-right { flex: 1; min-width: 0; padding-right: 44px; box-sizing: border-box; }
  .ss-on-result .ss-stage { height: 160px; }
  .ss-on-result .ss-plan li { font-size: 15px; padding: 6px 10px; }
  .ss-on-result .ss-plan b { width: 26px; height: 26px; font-size: 15px; }
  .ss-on-result .ss-right { gap: 6px; }
  .ss-on-result .ss-right h2 { font-size: 28px; }
  .ss-on-result .ss-right .rw-sub { font-size: 15px; }
  .ss-on-result .ss-btns { flex-direction: row; }
  .ss-on-result .ss-btns .rw-btn { flex: 1; width: auto; min-width: 0; min-height: 48px; font-size: 19px; padding: 0 12px; }
  .ss-on-result .ss-btns .dk-ghost { flex: 0 0 auto; padding: 0 20px; }
}
/* a real phone held sideways draws a virtual iPad (js/phonefit.js), so the max-height rules above never fire there:
   the same compact layout under html.phone-side, and the card zoomed back to the phone's own size */
html.phone-side .ss-card { gap: 10px; padding: 16px 20px; }
html.phone-side .ss-head h2 { font-size: 26px; }
html.phone-side .ss-stage { height: 96px; }
html.phone-side .ss-score { font-size: 56px; }
html.phone-side .ss-step input { height: 60px; font-size: 36px; }
html.phone-side .ss-w { min-width: 60px; min-height: 60px; font-size: 28px; }
html.phone-side .ss-plan li { padding: 6px 12px; }
html.phone-side .ss-card.ss-on-result { display: block; width: min(780px, 100%); }
html.phone-side .ss-on-result .ss-result { flex-direction: row; align-items: center; gap: 20px; }
html.phone-side .ss-on-result .ss-left { flex: 0 0 40%; }
html.phone-side .ss-on-result .ss-right { flex: 1; min-width: 0; padding-right: 44px; box-sizing: border-box; }
html.phone-side .ss-on-result .ss-stage { height: 160px; }
html.phone-side .ss-on-result .ss-plan li { font-size: 15px; padding: 6px 10px; }
html.phone-side .ss-on-result .ss-plan b { width: 26px; height: 26px; font-size: 15px; }
html.phone-side .ss-on-result .ss-right { gap: 6px; }
html.phone-side .ss-on-result .ss-right h2 { font-size: 28px; }
html.phone-side .ss-on-result .ss-right .rw-sub { font-size: 15px; }
html.phone-side .ss-on-result .ss-btns { flex-direction: row; }
html.phone-side .ss-on-result .ss-btns .rw-btn { flex: 1; width: auto; min-width: 0; min-height: 48px; font-size: 19px; padding: 0 12px; }
html.phone-side .ss-on-result .ss-btns .dk-ghost { flex: 0 0 auto; padding: 0 20px; }
@media (min-height: 600px) { html.phone-side .ss-card { zoom: 1.83; max-height: calc((100vh - 32px) / 1.83); } }
@media (prefers-reduced-motion: reduce) { .ss-score { animation: none; } }

/* 🌍 a game's red pocket (Rewards.pocket: the World Boss's), over the game screen */
.rw-sheet.rw-over { z-index: 3500; }
.rw-pocket-t { font-size: 42px; text-wrap: balance; }
.rw-prizes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rw-prizes .rw-prize b { font-size: 21px; }
@media (max-height: 700px) { .rw-pocket-t { font-size: 34px; } }
@media (max-height: 430px) { .rw-pocket .rw-prize { padding: 4px 14px 4px 6px; } .rw-pocket .rw-prize svg { width: 54px; height: 54px; } .rw-pocket .rw-prizes { gap: 6px; } .rw-pocket-t { font-size: 30px; } }
