/* flamefest.css — the Flame Fest calendar (see flamefest.js). Uses the
   site's theme variables, so Light, Dark and Fall all just work. */
.ff-modal { position: fixed; inset: 0; z-index: 10040; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15,10,6,.55); backdrop-filter: blur(3px); }
.ff-card { position: relative; width: min(560px, 100%); max-height: calc(100dvh / var(--kz, 1) - 32px); overflow: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--text); border: 3px solid var(--orange); border-radius: 26px; box-shadow: 0 7px 0 var(--orange-dark), 0 24px 60px rgba(0,0,0,.35); padding: 22px 22px 18px; font-family: inherit; }
.ff-x { position: absolute; z-index: 5; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border); background: var(--cream-warm); color: var(--text-light); font-size: 20px; font-weight: 900; line-height: 1; cursor: pointer; }
.ff-x:hover { color: var(--text); }
/* Loading: the card shrinks to the app's boxed loading card */
.ff-card.ff-card-loading { width: auto; min-width: 260px; padding: 28px 32px; }
.ff-loading { display: flex; flex-direction: column; align-items: center; gap: 13px; text-align: center; font-size: 14px; font-weight: 700; color: var(--text-light); }
.ff-loading b { font-size: 24px; font-weight: 900; color: var(--text); }
.ff-loading-logo { width: 76px; height: 76px; border: 4px solid var(--orange); border-radius: 22px; box-shadow: 0 5px 0 var(--orange-dark); object-fit: cover; }
.ff-loading-spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--orange); border-radius: 50%; animation: ffSpin .8s linear infinite; }
@keyframes ffSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ff-loading-spinner { animation: none; border-color: var(--orange); } }

.ff-head { text-align: center; padding: 4px 26px 0; }
.ff-badge { display: inline-block; padding: 5px 13px; border-radius: 999px; background: var(--orange-light); border: 2px solid var(--orange); color: var(--orange); font-size: 12.5px; font-weight: 900; }
.ff-head h2 { margin: 10px 0 6px; font-size: clamp(30px, 6vw, 40px); font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.ff-head h2 span { color: var(--orange); text-shadow: 0 0 22px rgba(255,107,0,.35); }
.ff-head p { margin: 0 auto; max-width: 420px; font-size: 14px; font-weight: 700; color: var(--text-light); line-height: 1.5; }
.ff-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 14px; }
.ff-stats > div { padding: 9px 6px; border-radius: 14px; background: var(--cream-warm); border: 2px solid var(--border); }
.ff-stats b { display: block; font-size: 22px; font-weight: 900; color: var(--orange); line-height: 1.1; }
.ff-stats span { font-size: 11.5px; font-weight: 800; color: var(--text-light); }
.ff-note { margin: 0 0 12px; padding: 9px 12px; border-radius: 12px; background: var(--orange-cream); border: 2px solid var(--orange-light); font-size: 13px; font-weight: 800; text-align: center; }

/* Calendar */
.ff-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ff-dow { text-align: center; font-size: 11px; font-weight: 900; color: var(--text-light); letter-spacing: .06em; padding-bottom: 2px; }
.ff-day { position: relative; aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--border); background: var(--cream-warm); display: flex; align-items: center; justify-content: center; }
.ff-num { position: absolute; top: 4px; left: 6px; font-size: 11px; font-weight: 900; color: var(--text-light); }
.ff-mark { font-size: clamp(18px, 4.6vw, 24px); line-height: 1; }
.ff-day.lit { background: linear-gradient(160deg, rgba(255,149,0,.28), rgba(255,75,0,.16)); border-color: var(--orange); box-shadow: 0 0 14px rgba(255,107,0,.28); }
.ff-day.lit .ff-num { color: var(--orange); }
.ff-day.lit .ff-mark { animation: ffFlicker 2.6s ease-in-out infinite; }
.ff-day.shielded { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--cream-warm)); }
.ff-day.missed { opacity: .45; }
.ff-day.is-today { border-color: var(--orange); border-style: dashed; }
.ff-day.today::after { content: 'today'; position: absolute; bottom: 4px; font-size: 9.5px; font-weight: 900; color: var(--orange); text-transform: uppercase; letter-spacing: .04em; }
@keyframes ffFlicker { 0%,100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }
/* Legend under the calendar: easy to read, icons as big as the calendar's. */
.ff-legend { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; font-size: 13.5px; font-weight: 800; color: var(--text); }
.ff-legend > span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 999px; background: var(--cream-warm); border: 2px solid var(--border); }
.ff-legend-ic { font-style: normal; font-size: 20px; line-height: 1; display: inline-flex; }
.ff-legend-today { display: inline-block; width: 18px; height: 18px; border: 2px dashed var(--orange); border-radius: 6px; }

/* Rewards */
.ff-h3 { margin: 16px 0 8px; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--text-light); }
.ff-rewards { display: flex; flex-direction: column; gap: 8px; }
.ff-reward { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; border: 2px solid var(--border); background: var(--cream-warm); }
.ff-reward.is-ready { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,0,.15); }
.ff-reward.is-claimed { opacity: .75; }
.ff-reward.grand { border-width: 3px; border-color: #F2B705; background: linear-gradient(135deg, rgba(242,183,5,.16), rgba(255,107,0,.10)); }
.ff-reward-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; background: var(--surface); border: 2px solid var(--border); }
.ff-reward.grand .ff-reward-icon { border-color: #F2B705; }
.ff-reward-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ff-reward-body b { font-size: 14.5px; font-weight: 900; }
.ff-reward-gift { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 13.5px; font-weight: 800; color: var(--orange); line-height: 1.5; }
/* Shields, gifts and flames in a prize: bigger, so you can see what you win. */
.ff-reward-gift .kk-ic, .ff-reward-gift .no-ki { font-size: 1.35em; }
/* Flames already draw large (flame looks are sized to the Slime Flame), so
   1em here makes them match the shields beside them. */
.ff-reward-gift .knox-flame { font-size: .95em; display: inline-flex; }
.ff-reward-when { font-size: 11.5px; font-weight: 700; color: var(--text-light); }
.ff-bar { height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 5px; }
.ff-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FF9500, #FF4B00); }
.ff-reward.grand .ff-bar span { background: linear-gradient(90deg, #F2B705, #FF6B00); }
.ff-reward-action { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.ff-count { font-size: 12px; font-weight: 900; color: var(--text-light); }
.ff-claim { padding: 7px 14px; border: none; border-radius: 999px; background: var(--orange); color: #fff; font: inherit; font-size: 13px; font-weight: 900; box-shadow: 0 3px 0 var(--orange-dark); cursor: pointer; animation: ffPulse 1.6s ease-in-out infinite; }
.ff-claim:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--orange-dark); }
.ff-claim:disabled { animation: none; opacity: .7; cursor: default; }
@keyframes ffPulse { 0%,100% { box-shadow: 0 3px 0 var(--orange-dark), 0 0 0 0 rgba(255,107,0,.45); } 50% { box-shadow: 0 3px 0 var(--orange-dark), 0 0 0 6px rgba(255,107,0,0); } }
.ff-claimed { font-size: 12.5px; font-weight: 900; color: var(--green); }
.ff-left { font-size: 12px; font-weight: 800; color: var(--text-light); white-space: nowrap; }
.ff-missed-tag { font-size: 12px; font-weight: 800; color: var(--text-light); opacity: .8; }

/* "Your flame": the look you're using, big. */
.ff-myflame { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; padding: 14px 18px; border-radius: 18px; border: 2px solid var(--border); background: var(--cream-warm); text-align: left; }
.ff-myflame-icon { flex-shrink: 0; width: 72px; text-align: center; font-size: 56px; line-height: 1; }
.ff-myflame-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ff-myflame-label { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--text-light); }
.ff-myflame-copy > b { font-size: 18px; font-weight: 900; color: var(--text); }
.ff-myflame-tip { font-size: 12.5px; font-weight: 700; color: var(--text-light); line-height: 1.4; }
.ff-myflame .ff-styles { margin-top: 6px; }
@media (max-width: 480px) { .ff-myflame { gap: 12px; padding: 12px 14px; } .ff-myflame-icon { width: 56px; font-size: 44px; } }
.ff-styles { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 800; color: var(--text-light); }
.ff-style { padding: 6px 11px; border-radius: 999px; border: 2px solid var(--border); background: var(--cream-warm); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.ff-style.on { border-color: var(--orange); color: var(--orange); }
.ff-fine { margin: 12px 0 0; font-size: 11.5px; font-weight: 700; color: var(--text-light); line-height: 1.5; text-align: center; }

.ff-toast { position: sticky; bottom: 0; margin: 10px auto 0; width: fit-content; max-width: 100%; padding: 9px 16px; border-radius: 14px; background: linear-gradient(135deg, #FF6B00, #FF9500); color: #fff; font-size: 13.5px; font-weight: 900; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.ff-toast.show { opacity: 1; transform: none; }
.ff-burst { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; }
.ff-burst span { position: absolute; font-size: 22px; animation: ffBurst 1.1s ease-out forwards; }
@keyframes ffBurst { from { transform: rotate(var(--a)) translateY(0) scale(.4); opacity: 1; } to { transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(1.1); opacity: 0; } }

@media (max-width: 480px) {
  .ff-card { padding: 18px 12px 14px; border-radius: 22px; }
  .ff-cal { gap: 4px; }
  .ff-day { border-radius: 9px; }
  .ff-num { top: 2px; left: 4px; font-size: 10px; }
  .ff-day.today::after { display: none; }
  .ff-reward { gap: 9px; padding: 10px; }
  .ff-reward-icon { width: 34px; height: 34px; font-size: 18px; }
  /* Small day boxes: number in the corner, icon a bit lower so they never overlap. */
  .ff-mark { font-size: 17px; margin-top: 9px; }
  .ff-stats span { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) { .ff-day.lit .ff-mark, .ff-claim, .ff-burst span { animation: none !important; } }

/* Blue / Golden flame on the 🔥 streak pill (Flame Fest rewards) */
:is(#streakFlame, .knox-flame).flame-blue { filter: hue-rotate(190deg) saturate(1.5) brightness(1.1); }
:is(#streakFlame, .knox-flame).flame-gold { filter: sepia(1) saturate(3.5) hue-rotate(5deg) brightness(1.15) drop-shadow(0 0 4px rgba(242,183,5,.8)); animation: goldShimmer 2.2s ease-in-out infinite; }
@keyframes goldShimmer {
  0%, 100% { filter: sepia(1) saturate(3.5) hue-rotate(5deg) brightness(1.1) drop-shadow(0 0 3px rgba(242,183,5,.7)); }
  50% { filter: sepia(1) saturate(4) hue-rotate(5deg) brightness(1.35) drop-shadow(0 0 8px rgba(255,214,90,1)); }
}
@media (prefers-reduced-motion: reduce) { :is(#streakFlame, .knox-flame).flame-gold { animation: none; } }

/* Sidebar Flame Fest card: warm orange, not the blue of the other cards. */
html .sidebar-extension-card.sidebar-flame-card { border-color: var(--orange) !important; background: color-mix(in srgb, var(--orange) 10%, var(--surface)) !important; color: var(--text) !important; }
html .sidebar-flame-card .sidebar-extension-copy span, html .sidebar-flame-card .sidebar-extension-arrow { color: var(--orange-dark, #CC5500) !important; }
html[data-theme="dark"]:not(.knox-seasonal) .sidebar-flame-card .sidebar-extension-copy span, html[data-theme="dark"]:not(.knox-seasonal) .sidebar-flame-card .sidebar-extension-arrow { color: #FF9A4D !important; }
html .sidebar-promo-rotator > .sidebar-flame-card { box-shadow: 0 3px 0 color-mix(in srgb, var(--orange) 55%, transparent) !important; }
html .sidebar-promo-rotator > .sidebar-flame-card:hover, html .sidebar-promo-rotator > .sidebar-flame-card:focus-visible, html .sidebar-flame-card:hover { box-shadow: 0 5px 0 var(--orange) !important; }
.sidebar-flame-card .ff-card-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--orange-light); }

/* 🟢 Slime Flame (link your Discord): wobbles like slime and drips. */
:is(#streakFlame, .knox-flame).flame-slime { display: inline-flex; line-height: 1; }
.slime-flame { width: 1.05em; height: 1.4em; overflow: visible; vertical-align: -.3em; }
/* Every flame look draws the same size as the Slime Flame: the Knox flame icon
   (also the base of Purple, Blue and Golden) is drawn smaller inside its box. */
:is(#streakFlame, .knox-flame) > .kk-flame { width: 1.5em; height: 1.5em; vertical-align: -.36em; margin: -.1em -.18em; }
.slime-flame .slime-body { transform-box: fill-box; transform-origin: 50% 100%; animation: slimeWobble 1.8s ease-in-out infinite; }
.slime-flame .slime-drip { transform-box: fill-box; transform-origin: 50% 0; animation: slimeDrip 2.6s ease-in infinite; }
.slime-flame .slime-drip-2 { animation-delay: -1.3s; animation-duration: 3.1s; }
@keyframes slimeWobble {
  0%, 100% { transform: scale(1, 1); }
  20% { transform: scale(1.1, .9); }
  40% { transform: scale(.93, 1.08); }
  60% { transform: scale(1.05, .96); }
  80% { transform: scale(.98, 1.02); }
}
@keyframes slimeDrip {
  0%, 30% { transform: translateY(-2px) scale(.4); opacity: 0; }
  45% { transform: translateY(1px) scale(1, 1.15); opacity: 1; }
  80% { transform: translateY(5px) scale(.85, 1.25); opacity: 1; }
  100% { transform: translateY(8px) scale(.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .slime-flame .slime-body, .slime-flame .slime-drip { animation: none; } .slime-flame .slime-drip { opacity: 0; } }

/* 💎 Diamond Flame (Mega Knox, Flame Fest week 2): icy, bright and glowing */
:is(#streakFlame, .knox-flame).flame-diamond { filter: hue-rotate(165deg) saturate(.75) brightness(1.45) contrast(1.05) drop-shadow(0 0 3px rgba(170, 235, 255, .95)) drop-shadow(0 0 1px #fff); }

/* Purple flame (Knox Plus Spark reward) */
:is(#streakFlame, .knox-flame).flame-purple { filter: hue-rotate(250deg) saturate(1.6) brightness(1.05); }

/* Gift link (Knox Plus grand prize) */
.ff-gift { margin: 0 0 12px; padding: 12px; border-radius: 14px; border: 2px dashed #F2B705; background: linear-gradient(135deg, rgba(242,183,5,.14), rgba(255,107,0,.08)); text-align: left; }
.ff-gift b { display: block; font-size: 14.5px; font-weight: 900; }
.ff-gift > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-light); margin: 2px 0 8px; line-height: 1.45; }
.ff-gift-row { display: flex; gap: 6px; }
.ff-gift-link { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; }
.ff-copy { padding: 8px 12px; border: none; border-radius: 10px; background: var(--orange); color: #fff; font: inherit; font-size: 12.5px; font-weight: 900; cursor: pointer; box-shadow: 0 3px 0 var(--orange-dark); white-space: nowrap; }

/* Small popups: launch announcement, gift messages */
.ff-pop { width: min(400px, 100%); text-align: center; padding: 24px 22px 20px; }
.ff-pop-flame { font-size: 54px; line-height: 1; animation: ffFlicker 2.6s ease-in-out infinite; }
.ff-pop h2 { margin: 8px 0 6px; font-size: 26px; font-weight: 900; letter-spacing: -.01em; }
.ff-pop p { margin: 0 auto; max-width: 320px; font-size: 14px; font-weight: 700; color: var(--text-light); line-height: 1.5; }
.ff-pop-list { list-style: none; margin: 14px 0 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.ff-pop-list li { padding: 8px 12px; border-radius: 12px; background: var(--cream-warm); border: 2px solid var(--border); font-size: 13.5px; font-weight: 800; }
.ff-pop-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.ff-pop-actions .ff-claim { padding: 11px 16px; font-size: 15px; animation: none; }
.ff-pop-later { padding: 8px; border: none; background: transparent; color: var(--text-light); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.ff-float { position: fixed; top: 18px; left: 50%; transform: translate(-50%, -16px); z-index: 10060; padding: 11px 20px; border-radius: 16px; background: linear-gradient(135deg, #FF6B00, #FF9500); color: #fff; font-size: 14px; font-weight: 900; box-shadow: 0 8px 24px rgba(255,107,0,.4); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; }
.ff-float.show { opacity: 1; transform: translate(-50%, 0); }

/* Tester mode (admin only, ?flamefest=test) */
.ff-tester { margin: 14px 0 0; padding: 12px; border-radius: 14px; border: 2px dashed #7C3AED; background: rgba(124,58,237,.07); text-align: left; }
.ff-tester b { display: block; font-size: 14.5px; font-weight: 900; }
.ff-tester > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-light); margin: 2px 0 8px; line-height: 1.45; }
.ff-tester-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ff-tester-row button { flex: 1 1 auto; margin: 0; }
.ff-tester-row button[disabled] { opacity: .5; cursor: not-allowed; }
.ff-tester .ff-tester-tip { margin: 8px 0 0; font-size: 11.5px; }
.ff-tester-row .ff-claim { animation: none; }
.ff-tester-row .ff-pop-later { border: 2px solid var(--border); border-radius: 999px; background: var(--surface, #fff); color: var(--text); }
.ff-tester-off { border-color: #E5484D; background: rgba(229,72,77,.07); }

/* ── Knox buttons and cards: the same recipe as the rest of Knox Knows
   (Flashcards' buttons, the welcome cards) — chunky, with a darker ledge. ── */
.ff-claim, .ff-copy { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 15px; border-radius: 14px;
  border: 2px solid var(--orange-dark); background: var(--orange); color: #fff; font: inherit; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em;
  box-shadow: 0 4px 0 var(--orange-dark); cursor: pointer; animation: none; transition: transform .12s, box-shadow .12s; white-space: nowrap; }
.ff-claim:hover:not(:disabled), .ff-copy:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--orange-dark); }
.ff-claim:active:not(:disabled), .ff-copy:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--orange-dark); }
.ff-claim:disabled { opacity: .6; cursor: default; transform: none; }
.ff-pop-actions { gap: 10px; }
.ff-pop-actions .ff-claim { min-height: 48px; padding: 11px 18px; font-size: 15px; }
.ff-pop-later, .ff-tester-row .ff-pop-later, .ff-style { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 15px; border-radius: 14px;
  border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 900;
  box-shadow: 0 3px 0 var(--border); cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.ff-pop-later:hover:not(:disabled), .ff-style:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--border); }
.ff-pop-later:active:not(:disabled), .ff-style:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.ff-pop-actions .ff-pop-later { min-height: 44px; }
.ff-style { min-height: 36px; padding: 6px 12px; font-size: 12.5px; }
.ff-style.on { border-color: var(--orange); background: var(--orange-cream); color: var(--orange); box-shadow: 0 3px 0 var(--orange-dark); }
.ff-x { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--surface);
  box-shadow: 0 3px 0 var(--border); transition: transform .12s, box-shadow .12s, color .12s; }
.ff-x:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--border); color: var(--orange); }
.ff-x:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.ff-stats > div, .ff-reward, .ff-pop-list li { background: var(--surface); box-shadow: 0 3px 0 var(--border); }
.ff-reward.is-ready { box-shadow: 0 3px 0 var(--orange-dark); }
.ff-reward.grand { box-shadow: 0 3px 0 #C99404; }
.ff-reward-icon { box-shadow: 0 2px 0 var(--border); }
.ff-gift-link { border-radius: 12px; min-height: 38px; }

/* Main buttons: the same chunky Knox button as "Try it yourself →" on the
   landing page — normal case, a darker orange ledge, no outline. */
.ff-claim, .ff-copy { border: none; border-radius: 14px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 800; box-shadow: 0 4px 0 #CC5500; }
.ff-claim:hover:not(:disabled), .ff-copy:hover { box-shadow: 0 6px 0 #CC5500; }
.ff-claim:active:not(:disabled), .ff-copy:active { box-shadow: 0 1px 0 #CC5500; }
.ff-pop-actions .ff-claim { min-height: 54px; padding: 15px 28px; border-radius: 16px; font-size: 17px; }

/* Opening a Flame Fest window focuses the window itself (no ring); keyboard
   focus on its buttons shows a Knox orange ring instead of the browser blue. */
.ff-card:focus { outline: none; }
.ff-card button:focus { outline: none; }
.ff-card button:focus-visible { outline: 3px solid #FFB27A; outline-offset: 2px; }

/* ── Flame peek: hovering a flame shows it big, alive and turning in 3D ── */
.flame-peek { position: fixed; z-index: 10070; width: 168px; padding: 12px 12px 12px; border-radius: 20px; border: 2px solid color-mix(in srgb, var(--fp-glow) 55%, var(--border)); background: var(--surface); box-shadow: 0 4px 0 color-mix(in srgb, var(--fp-glow) 45%, var(--border)), 0 16px 34px rgba(20,10,0,.22); text-align: center; pointer-events: none; opacity: 0; transform: translateY(6px) scale(.92); transition: opacity .16s ease, transform .2s cubic-bezier(.34,1.56,.64,1); }
.flame-peek.open { opacity: 1; transform: none; }
.flame-peek b { display: block; margin-top: 6px; font-size: 14px; font-weight: 900; color: var(--text); }
.flame-peek > span { display: block; font-size: 12px; font-weight: 800; color: var(--text-light); }
.fp-stage { position: relative; height: 128px; border-radius: 14px; overflow: hidden; perspective: 420px; background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--fp-glow) 26%, transparent), transparent 68%), color-mix(in srgb, var(--fp-glow) 7%, var(--cream-warm, var(--surface))); }
.fp-halo { position: absolute; left: 50%; top: 56%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--fp-glow) 55%, transparent), transparent 70%); filter: blur(6px); animation: fpHalo 1.6s ease-in-out infinite; }
.fp-floor { position: absolute; left: 50%; bottom: 13px; width: 62px; height: 10px; margin-left: -31px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.28), transparent); animation: fpFloor 4.8s ease-in-out infinite; }
.fp-rotor { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; animation: fpTurn 4.8s ease-in-out infinite; }
/* Seven copies a few px apart in depth: darker ones behind give the flame body. */
.fp-layer { grid-area: 1 / 1; font-size: 62px; line-height: 1; transform: translateZ(calc(var(--z) * -2.2px)); }
.fp-layer.fp-depth { filter: brightness(.62) saturate(1.1); }
.fp-layer .knox-flame { display: inline-flex; }
.fp-layer .knox-flame > svg { transform-origin: 50% 92%; animation: fpFlicker 1.1s ease-in-out infinite; }
.fp-layer:not(.fp-depth) .knox-flame { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--fp-glow) 70%, transparent)); }
.fp-layer:not(.fp-depth) :is(.flame-purple, .flame-blue, .flame-diamond) { filter: var(--fp-look) drop-shadow(0 0 10px color-mix(in srgb, var(--fp-glow) 70%, transparent)); }
.fp-layer .flame-purple { --fp-look: hue-rotate(250deg) saturate(1.6) brightness(1.05); }
.fp-layer .flame-blue { --fp-look: hue-rotate(190deg) saturate(1.5) brightness(1.1); }
.fp-layer .flame-diamond { --fp-look: hue-rotate(165deg) saturate(.75) brightness(1.45) contrast(1.05); }
/* Slime already wobbles and drips on its own; it shouldn't flicker like fire. */
.fp-layer .flame-slime > svg { animation: none; }
.fp-embers i { position: absolute; left: 50%; bottom: 26px; width: var(--s); height: var(--s); margin-left: var(--x); border-radius: 50%; background: var(--fp-glow); box-shadow: 0 0 6px var(--fp-glow); opacity: 0; animation: fpEmber 2.4s ease-out infinite; animation-delay: var(--d); }
@keyframes fpTurn { 0%, 100% { transform: rotateY(-28deg) rotateX(6deg); } 50% { transform: rotateY(28deg) rotateX(6deg); } }
@keyframes fpFlicker { 0%, 100% { transform: scale(1, 1) skewX(0); } 25% { transform: scale(.97, 1.05) skewX(-2deg); } 50% { transform: scale(1.03, .97) skewX(1.5deg); } 75% { transform: scale(.98, 1.04) skewX(-1deg); } }
@keyframes fpHalo { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.14); opacity: 1; } }
@keyframes fpFloor { 0%, 100% { transform: scaleX(.85); } 50% { transform: scaleX(1.1); } }
@keyframes fpEmber { 0% { transform: translateY(0) scale(1); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-96px) scale(.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fp-rotor { animation: none; transform: rotateY(-20deg) rotateX(6deg); }
  .fp-halo, .fp-floor, .fp-layer .knox-flame > svg, .fp-layer .slime-flame * { animation: none !important; }
  .fp-embers { display: none; }
  .flame-peek { transition: opacity .16s ease; transform: none; }
}
/* Holding a flame: it swells until the peek opens (scale, so the looks' own filters keep running). */
:is(#streakPill, .ff-myflame-icon, .discord-slime-badge, .ff-style) { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
:is(#streakPill, .discord-slime-badge, .ff-style) .knox-flame, #streakFlame, .ff-myflame-icon { display: inline-block; transition: scale .2s ease-out; }
.fp-charging :is(#streakFlame, .knox-flame), .fp-charging:is(.knox-flame) { scale: 1.45; transition: scale 1.5s ease-in; }
@media (prefers-reduced-motion: reduce) { .fp-charging :is(#streakFlame, .knox-flame), .fp-charging:is(.knox-flame) { scale: 1; } }
