/* Feel layer: coins, streak flame, sheets, settings switches, shop growth.
   Loaded after style.css; everything here builds on its tokens. */
.coin { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.chip .coin { width: 19px; height: 19px; }
.flame-i { width: 15px; height: 20px; flex: none; }
.masthead .grp { display: flex; align-items: center; gap: 6px; }
.bar .end { justify-self: end; display: flex; }

/* streak state on the home card */
.streak { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 6px 12px 6px 14px; border-radius: 99px; background: rgba(255, 170, 40, .18); color: #ffd98a; font-size: 14px; font-weight: 600; width: fit-content; }
.streak b { font-size: 16px; color: #fff; }
.streak.risk { background: rgba(255, 90, 70, .2); color: #ffb3a8; }
.streak.risk .flame-i { opacity: .75; filter: grayscale(.4); }
.streak.shield { background: rgba(110, 180, 255, .2); color: #b9dcff; }
.hero .risk { margin-top: 8px; font-size: 13.5px; color: #ffd0c8; max-width: 30ch; }

/* tab bar: the active destination sits in a tinted pill */
.tabbar .ti { display: grid; place-items: center; width: 54px; height: 30px; border-radius: 15px; transition: background-color .2s var(--ease); }
.tabbar a[aria-current] .ti { background: var(--accent-tint); animation: tabpop .35s var(--ease); }
@keyframes tabpop { from { transform: scale(.8); } }

/* switches and sheets */
.switch { position: relative; width: 52px; height: 32px; border-radius: 99px; background: #cbd3df; flex: none; transition: background-color .22s var(--ease); }
.switch i { position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .28s var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] i { transform: translateX(-20px); }
.sheet-back { position: fixed; inset: 0; z-index: 70; background: rgba(8, 16, 28, .5); opacity: 0; transition: opacity .22s var(--ease); }
.sheet-back.in { opacity: 1; }
.modal { position: absolute; inset-inline: 0; bottom: 0; margin-inline: auto; max-width: 520px; background: var(--bg); border-radius: 26px 26px 0 0; padding: 18px 18px calc(18px + var(--safe-b)); transform: translateY(100%); transition: transform .32s var(--ease); max-height: 92dvh; overflow-y: auto; display: grid; gap: 12px; }
.sheet-back.in .modal { transform: none; }
.modal h2 { font-size: 22px; font-weight: 800; }
.sh-head { display: flex; align-items: center; justify-content: space-between; }
.modal-stage { height: 120px; border-radius: 16px; background: linear-gradient(160deg, #c9d6c2, #9fb4a0 55%, #b6bfa7); display: grid; place-items: center; overflow: hidden; }
.modal-stage canvas { width: 240px; height: 120px; }

/* shop */
.chips { display: flex; gap: 8px; overflow-x: auto; margin-inline: -18px; padding: 4px 18px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; scroll-snap-align: center; padding: 10px 17px; border-radius: 99px; background: var(--surface); box-shadow: var(--sh-1); color: var(--ink-2); font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .12s var(--ease), background-color .16s, color .16s; }
.chips a:active { transform: scale(.95); }
.chips a[aria-current] { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-lip); }
.row .ico.gold { background: #fbefd0; color: var(--gold); }
.row.shield .btn { flex: none; }
.item .stage.plain { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.swatch { padding: 11px 24px; border-radius: 14px; color: #fff; font-weight: 800; font-size: 15px; }
.titlechip { background: var(--accent-tint); color: var(--accent); padding: 7px 13px; border-radius: 99px; font-weight: 700; font-size: 14px; text-align: center; }
.listen { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 99px; background: var(--accent-tint); color: var(--accent); font-weight: 700; font-size: 15px; transition: transform .12s var(--ease); }
.listen:active { transform: scale(.94); }
.listen .i { width: 20px; height: 20px; }

/* avatar frames bought in the shop */
.av.fr-mint { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px #2fcf9b; }
.av.fr-rose { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px #ff7aa8; }
.av.fr-sky { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px #5db7ff; }
.av.fr-double { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent), 0 0 0 6px #fff, 0 0 0 8px var(--accent); margin: 4px; }
.av.fr-ember { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ff6a2b, 0 0 0 6px #ffb02b; margin: 3px; }
.av.fr-aurora { border: 3px solid transparent; background: linear-gradient(#1d3557, #1d3557) padding-box, conic-gradient(#5db7ff, #a56bff, #ff6ab0, #ffd36a, #5db7ff) border-box; box-shadow: 0 0 0 2px #fff; margin: 2px; }
.av.fr-gold { background: linear-gradient(145deg, #7a5200, #d99a00 55%, #f6cf5a); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f2b01e, 0 0 0 6px #fff7d6; margin: 3px; }
.av.fr-lake { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0b5bd3, 0 0 0 6px #fff, 0 0 0 7.5px #7fd3ff; margin: 3px; }

/* the streak moment, after finishing the daily challenge */
.streakfx { position: fixed; inset: 0; z-index: 80; display: grid; align-content: center; justify-items: center; padding: 24px; text-align: center; color: #fff; background: radial-gradient(120% 80% at 50% 28%, #234a8f, #0b1522 72%); opacity: 0; transition: opacity .25s var(--ease); }
.streakfx.show { opacity: 1; }
.streakfx.out { opacity: 0; }
.sf-flame { position: relative; width: 120px; height: 160px; transform: scale(.35); opacity: 0; filter: saturate(.15) brightness(.6); }
.flame-on .sf-flame, .streakfx.lit .sf-flame { transform: none; opacity: 1; filter: none; transition: transform .75s cubic-bezier(.3, 1.6, .4, 1), opacity .3s, filter .5s; }
.sf-flame svg { width: 100%; height: 100%; transform-origin: 50% 100%; animation: flicker 1.1s ease-in-out infinite alternate; }
@keyframes flicker { to { transform: scaleY(1.05) scaleX(.96) rotate(-1.5deg); } }
.spark { position: absolute; inset-block-end: 38%; inset-inline-start: 50%; width: 5px; height: 5px; border-radius: 50%; background: #ffd24a; opacity: 0; }
.flame-on .spark { animation: sparkrise 1.5s var(--d) ease-out infinite; }
@keyframes sparkrise { 0% { opacity: 0; transform: translate(var(--x), 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(var(--x) * 1.7), -120px) scale(.4); } }
.sf-count b { display: block; font-size: 104px; font-weight: 800; line-height: 1; letter-spacing: -.04em; margin-top: 4px; }
.sf-count b.pop { animation: numpop .5s cubic-bezier(.3, 1.7, .4, 1); }
@keyframes numpop { 50% { transform: scale(1.2); } }
.sf-label { font-size: 20px; font-weight: 700; color: #cfe0ff; }
.sf-week { display: flex; gap: 10px; margin: 24px 0 6px; }
.sf-day { display: grid; justify-items: center; gap: 7px; font-size: 12.5px; color: #9fb2cf; }
.sf-day i { width: 31px; height: 31px; border-radius: 50%; background: #1b2b45; box-shadow: inset 0 0 0 2px #2c4066; transition: background .3s, box-shadow .3s, transform .45s cubic-bezier(.3, 1.8, .4, 1); }
.sf-day.lit:not(.today) i { background: linear-gradient(#ffc83d, #ff8a1f); box-shadow: none; }
.streakfx.lit .sf-day.today i { background: linear-gradient(#ffd96a, #ff7a14); box-shadow: 0 0 0 3px rgba(255, 210, 90, .35); transform: scale(1.2); }
.sf-line { margin-top: 16px; font-size: 21px; font-weight: 800; }
.sf-shield { margin-top: 6px; color: #9ed0ff; font-size: 14.5px; }
.streakfx .btn { margin-top: 26px; width: min(260px, 100%); }
@media (prefers-reduced-motion: reduce) { .sf-flame { transform: none; opacity: 1; filter: none; } }
