/* BrightWins kid experience: the shell (top bar + bottom tab bar), the home lobby and the history page.
   Loaded after styles.css. All motion lives in the no-preference block at the end. */

/* ---------- Shell ---------- */
.kid-shell { --kid-w: 720px; min-height: 100vh; min-height: 100dvh; }
.kid-shell.wide { --kid-w: 1120px; }
.kid-bar { position: sticky; top: 0; z-index: 25; padding-top: env(safe-area-inset-top); background: rgba(25, 27, 29, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.kid-bar-inner { max-width: var(--kid-w); margin: 0 auto; padding: 0.35rem 1rem; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.kid-me { display: flex; align-items: center; gap: 0.55rem; min-width: 0; min-height: 44px; color: #fff; text-decoration: none; font-weight: 900; font-size: 1.05rem; }
.kid-me .avatar-head { flex: none; }
.kid-me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kid-chips { display: flex; gap: 0.4rem; flex: none; }
.kid-chip { appearance: none; font: inherit; color: #fff; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0 0.8rem 0 0.35rem;
  background: var(--bg-deep); border: 2px solid var(--line); border-radius: 999px; box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.45); }
.kid-chip.chip-plays { border-color: #8a6a1a; }
.kid-chip.chip-bux { border-color: #1e6c9c; }
.kid-chip:active { transform: scale(0.95); }
.kid-chip:focus-visible, .kid-tab:focus-visible, .kid-me:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.chip-coin { position: relative; display: block; width: 28px; height: 28px; flex: none; overflow: hidden; border-radius: 9px; }
.chip-coin .token { margin: 2px; }
.chip-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.chip-num { font-size: 1.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.chip-unit { font-size: 0.58rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: #ffd978; }
.chip-bux .chip-unit { color: var(--bux-ink); }

.kid-page { max-width: var(--kid-w); margin: 0 auto; padding: 1rem 1rem calc(6rem + env(safe-area-inset-bottom)); }

.kid-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding-bottom: env(safe-area-inset-bottom);
  background: rgba(25, 27, 29, 0.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.3); }
.kid-tabs-inner { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kid-tab { --tab-c: #00d283; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px; padding: 0.45rem 0.1rem 0.35rem;
  color: #a9abae; text-decoration: none; font-weight: 800; font-size: 0.72rem; line-height: 1.1; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.kid-tab:nth-child(2) { --tab-c: #4f9bff; }
.kid-tab:nth-child(3) { --tab-c: #ff7ad9; }
.kid-tab:nth-child(4) { --tab-c: #ffc933; }
.kid-tab:nth-child(5) { --tab-c: #c58bff; }
.kid-tab-icon { position: relative; display: block; line-height: 0; }
.kid-tab-badge { position: absolute; top: -6px; right: -12px; min-width: 20px; height: 20px; padding: 0 0.3rem; box-sizing: border-box; border-radius: 10px; background: var(--red); color: #fff;
  font-size: 0.75rem; font-weight: 900; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #191b1d; }
.kid-tab-badge[hidden] { display: none; }
.kid-tab .tab-ico { display: block; transition: transform 0.12s; }
.kid-tab .f { fill: currentColor; fill-opacity: 0.16; }
.kid-tab.active { color: #fff; }
.kid-tab.active .tab-ico { color: var(--tab-c); }
.kid-tab.active .f { fill-opacity: 0.42; }
.kid-tab.active::before { content: ""; position: absolute; top: 0; left: 24%; right: 24%; height: 4px; border-radius: 0 0 4px 4px; background: var(--tab-c); }
.kid-tab:active .tab-ico { transform: scale(0.86); }
@media (hover: hover) { .kid-tab:hover { color: #fff; } }

/* toasts sit under the top bar */
body[data-theme=kid] #toast-root { top: calc(66px + env(safe-area-inset-top)); }

/* "What is this?" sheet */
.what { display: flex; align-items: center; gap: 1rem; margin: 0.4rem 0 0.2rem; }
.what-ico .token { filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.35)); }
.what-name { font-size: 1.5rem; }
.what-have { margin: 0.1rem 0 0; font-weight: 800; color: var(--bux-ink); }

/* store: the shell owns the wallet, so only inner pages get a Back row */
.store-back { margin: 0 0 0.2rem; }
.kid-page.store-page { padding-top: 0.4rem; }

/* ---------- Home lobby ---------- */
.lobby { display: flex; flex-direction: column; gap: 1.1rem; }
.lobby-sec[hidden] { display: none; }

.lobby-stage { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 278px; border-radius: 22px;
  background: radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.16), transparent 52%), linear-gradient(165deg, #2f4078 0%, #202d57 55%, #172242 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.13), 0 6px 0 rgba(0, 0, 0, 0.35); }
.lobby-stage::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 22px, transparent 22px 44px); pointer-events: none; }
.stage-bits { position: absolute; inset: 0; pointer-events: none; }
.stage-bits i { position: absolute; width: 14px; height: 14px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); }
.stage-bits i:nth-child(1) { right: 9%; top: 11%; }
.stage-bits i:nth-child(2) { right: 38%; top: 8%; width: 9px; height: 9px; background: rgba(255, 201, 51, 0.5); }
.stage-bits i:nth-child(3) { left: 6%; top: 22%; width: 10px; height: 10px; background: rgba(47, 181, 255, 0.45); }
.stage-bits i:nth-child(4) { right: 5%; bottom: 14%; width: 20px; height: 20px; background: rgba(0, 210, 131, 0.3); }
.stage-scene { position: relative; min-height: 278px; }
.stage-beam { position: absolute; left: 8%; right: 8%; top: 0; bottom: 34px; clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.05) 85%); }
.platform { position: absolute; left: 50%; bottom: 8px; width: 94%; height: auto; transform: translateX(-50%); display: block; }
.stage-figure { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; justify-content: center; transform-origin: 50% 100%; }
.stage-figure .avatar-full { filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.22)); }
.stage-info { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0.1rem; padding: 1rem 1rem 1rem 0.3rem; min-width: 0; }
.stage-label { font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: #c6cff0; }
.stage-count { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.15rem; }
.stage-coin { flex: none; display: block; }
.stage-num { font-size: clamp(3.8rem, 17vw, 5.6rem); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 5px 0 rgba(0, 0, 0, 0.4); }
.stage-num[data-d="3"] { font-size: clamp(2.2rem, 10.5vw, 4.4rem); } /* big counts shrink so they never clip */
.stage-num[data-d="4"] { font-size: clamp(1.7rem, 7vw, 3.2rem); }
.stage-unit { font-size: 1.4rem; font-weight: 900; color: #ffd978; margin-bottom: 0.5rem; }
.stage-look { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: #9db0ff; }
.stage-look:hover { text-decoration-color: #fff; }

/* the primary action: a Roblox-style green play button */
.lobby-play { display: block; }
.btn.kid-ask { position: relative; overflow: hidden; width: 100%; min-height: 78px; font-size: 1.9rem; font-weight: 900; border-radius: 16px; gap: 0.75rem; letter-spacing: 0.01em;
  background: linear-gradient(#10d58a, #00b06f); color: #04180f; box-shadow: 0 7px 0 var(--green-edge), 0 14px 26px rgba(0, 176, 111, 0.25); }
.btn.kid-ask::before { content: ""; width: 26px; height: 30px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); flex: none; }
.btn.kid-ask::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); opacity: 0; }
.btn.kid-ask:hover:not(:disabled) { background: linear-gradient(#13e093, #00bb77); filter: none; }
.btn.kid-ask:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 var(--green-edge); }

/* the Ask to play sheet */
.ask-sheet { max-width: 480px; }
.ask-who { display: flex; align-items: center; gap: 0.8rem; margin: 0.2rem 0 0.5rem; }
.ask-who .avatar-svg { flex: none; border-radius: 14px; background: var(--bg-deep); }
.ask-plays { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.15rem; font-weight: 900; background: var(--bg-deep); border: 2px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem 0.3rem 0.5rem; min-height: 44px; }
.ask-plays-ico { display: inline-flex; }
.ask-prompt { margin: 0.4rem 0 0.7rem; font-size: 1.25rem; font-weight: 900; line-height: 1.25; }
.ask-chips { gap: 0.55rem; margin-bottom: 0.9rem; }
.ask-chip { min-height: 48px; font-size: 1rem; text-align: left; line-height: 1.2; touch-action: manipulation; }
.ask-chip[aria-pressed=true]::before { content: "\2713\00a0"; font-weight: 900; }
.ask-chip:disabled { opacity: 0.6; cursor: not-allowed; }
.ask-area { display: block; width: 100%; box-sizing: border-box; resize: none; min-height: 96px; font: inherit; font-size: 1.05rem; font-weight: 700; line-height: 1.35; padding: 0.7rem 0.9rem; border: 2px solid var(--field-line); border-radius: var(--radius-sm); background: var(--bg-deep); color: #fff; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.35); }
.ask-area::placeholder { color: #9b9ea1; font-weight: 600; }
.ask-area:focus, .ask-area:focus-visible { border-color: var(--blue); outline: none; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(80, 120, 255, 0.55); }
.ask-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; margin: 0.3rem 0 0; min-height: 1.4rem; }
.ask-hint { color: #ffd978; font-weight: 700; font-size: 0.9rem; }
.ask-count { margin-left: auto; color: var(--muted); font-weight: 800; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.ask-count.full { color: #ffd978; }
.ask-actions { margin-top: 0.6rem; gap: 0.3rem; }
.btn.ask-send { min-height: 66px; font-size: 1.5rem; font-weight: 900; border-radius: 14px; gap: 0.7rem; background: linear-gradient(#10d58a, #00b06f); color: #04180f; box-shadow: 0 6px 0 var(--green-edge); }
.btn.ask-send:disabled { background: #2c6b52; color: #c8e8da; box-shadow: 0 6px 0 #1b4635; }
.btn.ask-send::before { content: ""; width: 20px; height: 24px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); flex: none; }
.btn.ask-send:has(.ask-spin:not([hidden]))::before { display: none; }
.btn.ask-send:hover:not(:disabled) { background: linear-gradient(#13e093, #00bb77); filter: none; }
.btn.ask-send:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--green-edge); }
.ask-spin { width: 26px; height: 26px; border-width: 5px; border-color: rgba(255, 255, 255, 0.25); border-top-color: #fff; }
.btn.ask-cancel:disabled { opacity: 0.45; background: transparent; box-shadow: none; color: #fff; }
.ask-spin[hidden] { display: none; }
.btn.ask-cancel { min-height: 48px; font-size: 1.05rem; justify-self: center; width: auto; padding: 0.4rem 1.5rem; }
.kid-sub { margin: 0.4rem 0; }

.wait-card, .empty-plays { background: var(--card-2); border: 2px solid var(--line); border-radius: 18px; padding: 1rem; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35); }
.wait-card { border-color: #2c7a5a; background: linear-gradient(180deg, #243a32, var(--card-2) 70%); }
.wait-head { display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 0.9rem; }
.wait-head .spinner { margin-top: 0.15rem; }
.wait-copy { min-width: 0; }
.wait-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 1.3rem; font-weight: 900; line-height: 1.15; }
.wait-sub { margin: 0.25rem 0 0; color: #dfe0e1; font-weight: 700; }
.wait-note { margin: 0.35rem 0 0; font-style: italic; color: var(--muted); overflow-wrap: anywhere; }
.wait-card .btn.block { margin: 0; }
.spinner { width: 40px; height: 40px; }
.empty-plays { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.5rem 0.9rem; border-style: dashed; }
.empty-coin { filter: grayscale(0.7) brightness(0.8); display: block; }
.empty-title { font-size: 1.4rem; font-weight: 900; line-height: 1.1; }
.empty-sub { margin: 0.25rem 0 0; color: #dfe0e1; font-weight: 700; }
.empty-plays .btn { grid-column: 1 / -1; margin-top: 0.3rem; }

.note-card { display: flex; align-items: center; gap: 0.7rem; min-height: 52px; padding: 0.55rem 0.9rem; border-radius: 14px; background: #3a3220; border: 2px solid #8a6a1a; color: #ffe08a; font-weight: 800; text-decoration: none; }
.note-dot { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--gold); }
.note-text { flex: 1; min-width: 0; }
.note-link { flex: none; color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* "Almost yours" goal strip */
.goal { appearance: none; font: inherit; color: #fff; text-align: left; width: 100%; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.8rem;
  padding: 0.7rem 0.8rem; border-radius: 18px; background: linear-gradient(120deg, #2b2f4e, #3c2f66); border: 2px solid #7f6bff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.goal:active { transform: translateY(2px) scale(0.99); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.goal:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.goal-art { display: block; }
.goal-art svg { display: block; width: 76px; height: 76px; border-radius: 14px; }
.goal-body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.goal-kicker { align-self: flex-start; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 5px; background: #6b4300; color: #ffd978; box-shadow: inset 0 -3px 0 #ffc933; }
.goal-name { font-size: 1.05rem; font-weight: 900; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.goal-bar { display: block; height: 12px; border-radius: 7px; background: rgba(0, 0, 0, 0.45); overflow: hidden; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.4); }
.goal-fill { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, #2fb5ff, #8fe3ff); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16); transform-origin: left; }
.goal-more { display: flex; align-items: center; gap: 0.35rem; font-weight: 900; font-size: 0.95rem; color: var(--bux-ink); }
.goal-more .token { flex: none; }
.goal-count { margin-left: auto; font-size: 0.78rem; font-weight: 800; color: #c9cbe6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.goal-go { display: inline-flex; align-items: center; gap: 0.2rem; font-weight: 900; font-size: 0.9rem; color: #fff; }
.chev { flex: none; display: block; }
@media (max-width: 460px) {
  .goal { grid-template-columns: auto minmax(0, 1fr); }
  .goal-go { display: none; }
  .goal-art svg { width: 68px; height: 68px; }
}

/* section titles */
.lobby-head { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.2rem; }
.lobby-title { margin: 0; font-size: 1.3rem; font-weight: 900; line-height: 1.15; }
.lobby-link { margin-left: auto; display: inline-flex; align-items: center; gap: 0.15rem; min-height: 44px; padding: 0 0.1rem; color: var(--link); font-weight: 900; text-decoration: none; white-space: nowrap; }
.lobby-link:hover { text-decoration: underline; }
.lobby-block .scroll-row { margin-bottom: -0.4rem; }
.lobby-block .item-card { width: 156px; }

/* latest trophies */
.trophy-list { display: flex; flex-direction: column; gap: 0.5rem; }
.trophy-row { --cat: #8e9195; display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem 0.6rem 0.6rem; background: var(--card-2); border: 1px solid var(--line-soft); border-left: 6px solid var(--cat); border-radius: 14px; }
.trophy-row .ledger-amount { min-width: 4.3rem; font-size: 1.45rem; }
.trophy-body { flex: 1; min-width: 0; }
.trophy-reason { font-size: 1.02rem; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trophy-row .ach-tags { margin: 0.3rem 0 0.1rem; }
.trophy-row .ledger-meta { margin-top: 0.1rem; font-size: 0.8rem; }

/* family tiles */
.family-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 0.6rem; }
.family-tile { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; min-height: 44px; padding: 0.75rem 0.4rem 0.7rem; text-align: center; color: #fff; text-decoration: none;
  background: var(--card-2); border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); -webkit-tap-highlight-color: transparent; touch-action: manipulation; min-width: 0; }
.family-tile:active { transform: translateY(2px) scale(0.97); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.family-tile .avatar-head { border-radius: 16px; margin-bottom: 0.2rem; }
.family-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.family-rel { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.family-pick { margin-top: 0.4rem; padding: 0.3rem 0.8rem; border-radius: 8px; background: var(--blue); box-shadow: 0 3px 0 var(--blue-edge); font-size: 0.85rem; font-weight: 900; }

/* recent activity */
.recent-line { display: flex; align-items: center; gap: 0.6rem; min-height: 54px; padding: 0.5rem 0.8rem; color: #fff; text-decoration: none; background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 14px; }
.recent-line:active { transform: scale(0.99); }
.recent-amt { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem 0.2rem 0.4rem; border-radius: 999px; background: var(--bg-deep); font-size: 0.85rem; font-weight: 900; white-space: nowrap; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.4); }
.recent-amt.plus { color: #2fe69a; }
.recent-amt.minus { color: var(--red-text); }
.recent-text { flex: 1; min-width: 0; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-when { flex: none; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.lobby-cols:not(:has(> :not([hidden]))) { display: none; }
.lobby-col { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.lobby-cols { display: flex; flex-direction: column; gap: 1.1rem; }
.lobby-cols > [hidden] + .lobby-col { margin-top: 0; }
.lobby-out { display: flex; justify-content: center; padding-top: 0.4rem; }
@media (min-width: 720px) {
  .lobby { gap: 1.3rem; }
  .lobby-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.3rem; align-items: start; }
  .lobby-cols > .lobby-trophies[hidden] { display: none; }
  .lobby-stage { min-height: 320px; }
  .stage-scene { min-height: 320px; }
  .stage-figure { bottom: 44px; }
  .stage-figure .avatar-full { height: 250px; width: auto; }
  .stage-info { padding-left: 1rem; }
  .btn.kid-ask { min-height: 88px; font-size: 2.2rem; }
  .btn.kid-ask::before { width: 30px; height: 34px; }
  .lobby-block .item-card { width: 176px; }
}

/* ---------- History page ---------- */
.kid-title-row { margin: 0.2rem 0 0.6rem; }
.kid-title { font-size: 2.1rem; line-height: 1.1; margin: 0; }
.kid-title-sub { margin: 0.2rem 0 0; color: var(--muted); font-weight: 700; }
.hist-groups { display: flex; flex-direction: column; gap: 0.4rem; }
.hist-head { display: flex; align-items: center; gap: 0.7rem; margin: 1rem 0 0.1rem; font-size: 0.82rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: #c6cff0; }
.hist-head::after { content: ""; flex: 1; height: 2px; border-radius: 1px; background: var(--line-soft); }
.hist-row { padding: 0.65rem 0.75rem; }
.hist-row .ledger-amount { min-width: 4.8rem; font-size: 1.7rem; }
.hist-row .ledger-reason { font-size: 1.05rem; font-weight: 800; line-height: 1.25; }
.hist-more { margin-top: 0.9rem; }
.hist-more .btn { min-width: 220px; }
.kid-ledger .ledger-row { margin: 0.45rem 0; }
@media (min-width: 720px) { .hist-groups { max-width: 640px; margin: 0 auto; } .kid-title-row { max-width: 640px; margin-left: auto; margin-right: auto; } .hist-more { max-width: 640px; margin-left: auto; margin-right: auto; } }

/* trophies page gets the same title style, with the My history link beside it */
.ach-title-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.ach-title-row .kid-title { margin: 0; }
.ach-title-row .lobby-link { margin-left: 0; }
.kid-page .ach .kid-title { margin-bottom: 0.6rem; }

/* ---------- Motion (everything here is switched off by prefers-reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lobby-sec { animation: lobby-in 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
  @keyframes lobby-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .hist-group, .ach-tile, .ach-row, .trophy-row { animation: lobby-in 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; }
  .hist-group:nth-child(2) { animation-delay: 70ms; }
  .hist-group:nth-child(3) { animation-delay: 140ms; }

  .stage-figure { animation: breathe 3.8s ease-in-out infinite; }
  @keyframes breathe { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-4px) scale(1.012, 1.02); } }
  .stage-beam { animation: beam 5s ease-in-out infinite alternate; }
  @keyframes beam { from { opacity: 0.85; } to { opacity: 1; } }
  .stage-bits i { animation: float 5s ease-in-out infinite; }
  .stage-bits i:nth-child(2) { animation-delay: 1s; }
  .stage-bits i:nth-child(3) { animation-delay: 2s; }
  .stage-bits i:nth-child(4) { animation-delay: 3s; }
  .stage-num.bump, .kid-chip.bump { animation: bump 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
  @keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

  .chip-coin::after { content: ""; position: absolute; top: -4px; bottom: -4px; left: -60%; width: 40%; transform: skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent); animation: coin-shine 4.5s ease-in-out infinite; }
  .chip-bux .chip-coin::after { animation-delay: 1.4s; }
  @keyframes coin-shine { 0%, 62% { left: -60%; } 90%, 100% { left: 130%; } }
  .btn.kid-ask::after { animation: ask-shine 3.6s ease-in-out infinite; }
  @keyframes ask-shine { 0%, 55% { left: -40%; opacity: 1; } 90%, 100% { left: 130%; opacity: 1; } }
  .btn.kid-ask:not(:disabled) { animation: ask-glow 2.8s ease-in-out infinite; }
  .btn.kid-ask:active:not(:disabled) { animation: none; }
  @keyframes ask-glow { 0%, 100% { box-shadow: 0 7px 0 var(--green-edge), 0 14px 26px rgba(0, 176, 111, 0.22); } 50% { box-shadow: 0 7px 0 var(--green-edge), 0 14px 34px rgba(0, 210, 131, 0.5); } }
  .goal-fill { animation: fill-in 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) 0.4s backwards; }
  @keyframes fill-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .kid-tab .tab-ico, .family-tile, .goal, .kid-chip, .recent-line { transition: transform 0.12s; }
}
@media (prefers-reduced-motion: reduce) {
  .kid-tab .tab-ico, .kid-chip, .family-tile, .goal { transition: none; }
}
