.dvs {
	--dvs-orange: #ff7a1a;
	--dvs-orange-soft: #fff1e6;
	--dvs-blue: #3b9eff;
	--dvs-blue-soft: #e8f4ff;
	--dvs-text: #1f2430;
	--dvs-muted: #6b7280;
	--dvs-line: #e8e8ee;
	--dvs-bg: #ffffff;
	font-size: 14px;
	line-height: 1.4;
	color: var(--dvs-text);
	box-sizing: border-box;
	text-transform: none;
	letter-spacing: normal;
}
.dvs *, .dvs *::before, .dvs *::after { box-sizing: inherit; }

/* ---------- Astra menu item ---------- */
.main-header-menu .dvs-menu-item,
.dvs-menu-item { display: flex; align-items: center; padding: 0 0 0 12px; }
.ast-mobile-popup-drawer .dvs-menu-item,
.ast-header-break-point .dvs-menu-item { padding: 12px 20px; }

/* ---------- Mobile header badge ---------- */
.dvs-mobile-slot { display: none; }
.dvs-mobile-slot.is-placed { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 10px; }
.dvs-mobile-slot.is-floating {
	display: block; position: fixed; right: 14px; bottom: 16px; z-index: 99998;
}
.dvs-mobile-slot.is-floating .dvs-badge__btn { box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.dvs-mobile-slot.is-floating .dvs-pop { top: auto; bottom: calc(100% + 10px); }
@media (min-width: 922px) {
	.dvs-mobile-slot.is-floating,
	.dvs-mobile-slot.is-placed { display: none; }
}
@media (max-width: 921px) {
	/* Badge already shows in the mobile header bar; don't repeat it inside the ☰ menu. */
	.dvs-menu-item { display: none !important; }
}

/* ---------- Header badge ---------- */
.dvs-badge { position: relative; display: inline-block; vertical-align: middle; }
.dvs-badge .dvs-badge__btn {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 5px 12px; margin: 0; min-height: 0; width: auto;
	border: 1px solid #ffd2b0; border-radius: 999px;
	background: var(--dvs-orange-soft); color: var(--dvs-orange);
	font: inherit; font-weight: 700; font-size: 15px; line-height: 1;
	cursor: pointer; box-shadow: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.dvs-badge .dvs-badge__btn:hover,
.dvs-badge .dvs-badge__btn:focus,
.dvs-badge .dvs-badge__btn:focus-visible {
	background: var(--dvs-orange-soft); color: var(--dvs-orange); border-color: #ffd2b0;
	transform: translateY(-1px); box-shadow: 0 3px 10px rgba(255,122,26,.25);
	outline: none;
}
.dvs-badge .dvs-badge__btn.is-off { background: #f3f4f6; border-color: var(--dvs-line); color: var(--dvs-muted); }
.dvs-badge__btn.is-off .dvs-badge__flame { filter: grayscale(1); opacity: .6; }
.dvs-badge__flame { font-size: 16px; }

.dvs-pop {
	position: absolute; top: calc(100% + 10px); right: 0; z-index: 99999;
	width: 300px; max-width: calc(100vw - 24px);
	padding: 16px; text-align: left; white-space: normal;
	background: var(--dvs-bg); border: 1px solid var(--dvs-line); border-radius: 14px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}
.dvs-align-left .dvs-pop { right: auto; left: 0; }
.dvs-pop[hidden] { display: none; }

/* ---------- Guest badge + dropdown ---------- */
.dvs-badge .dvs-badge__btn.is-guest { padding: 5px 10px; }
.dvs-guest-pop { text-align: center; }
.dvs-guest-pop__flame { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.dvs-guest-pop__flame.is-off { filter: grayscale(1); opacity: .5; }
.dvs-guest-pop__title { font-size: 17px; font-weight: 800; color: var(--dvs-text); }
.dvs-guest-pop__text { margin: 6px 0 14px; font-size: 13px; color: var(--dvs-muted); }
.dvs-guest-pop__actions { display: flex; gap: 8px; }
.dvs .dvs-btn {
	flex: 1; display: inline-block; padding: 9px 12px; border-radius: 10px;
	font-weight: 700; font-size: 14px; line-height: 1.2; text-align: center; text-decoration: none;
}
.dvs .dvs-btn--primary { background: var(--dvs-orange); color: #fff; border: 1px solid var(--dvs-orange); }
.dvs .dvs-btn--primary:hover, .dvs .dvs-btn--primary:focus { background: #ec6a0c; color: #fff; }
.dvs .dvs-btn--ghost { background: #fff; color: var(--dvs-orange); border: 1px solid #ffd2b0; }
.dvs .dvs-btn--ghost:hover, .dvs .dvs-btn--ghost:focus { background: var(--dvs-orange-soft); color: var(--dvs-orange); }

/* ---------- Card (page box & leaderboard) ---------- */
.dvs-card {
	max-width: 420px; padding: 18px;
	background: var(--dvs-bg); border: 1px solid var(--dvs-line); border-radius: 14px;
	box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}
.dvs-guest { display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Details ---------- */
.dvs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dvs-head__flame { font-size: 36px; line-height: 1; }
.dvs-head__flame.is-off { filter: grayscale(1); opacity: .5; }
.dvs-head__num { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--dvs-orange); }
.dvs-head__num span { font-size: 15px; font-weight: 600; color: var(--dvs-text); }
.dvs-head__sub { color: var(--dvs-muted); font-size: 13px; }

.dvs-note {
	margin: 0 0 12px; padding: 8px 10px;
	background: var(--dvs-blue-soft); color: #1d5fa8; border-radius: 8px; font-size: 13px;
}

.dvs-section-title {
	margin: 14px 0 8px; font-size: 11px; font-weight: 700;
	letter-spacing: .06em; text-transform: uppercase; color: var(--dvs-muted);
}

.dvs-week { display: flex; justify-content: space-between; gap: 4px; }
.dvs-day { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.dvs-day__dot {
	display: flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%;
	background: #f3f4f6; color: #fff; font-size: 13px; font-weight: 700;
}
.dvs-day.is-visited .dvs-day__dot { background: var(--dvs-orange); }
.dvs-day.is-frozen .dvs-day__dot { background: var(--dvs-blue); }
.dvs-day.is-today .dvs-day__dot { box-shadow: 0 0 0 2px var(--dvs-bg), 0 0 0 4px #ffc39a; }
.dvs-day__lbl { font-size: 11px; color: var(--dvs-muted); }

.dvs-freeze {
	display: flex; flex-direction: column; gap: 2px;
	margin-top: 14px; padding: 10px 12px;
	background: var(--dvs-blue-soft); border-radius: 10px;
}
.dvs-freeze span { font-weight: 600; color: #1d5fa8; }
.dvs-freeze small { color: var(--dvs-muted); font-size: 12px; }

.dvs-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dvs-ms {
	display: flex; flex-direction: column; align-items: center; gap: 2px;
	padding: 8px 2px; border-radius: 10px; background: #f6f6f8;
	text-align: center; cursor: default;
}
.dvs-ms__icon { font-size: 20px; filter: grayscale(1); opacity: .35; }
.dvs-ms__lbl { font-size: 10px; color: var(--dvs-muted); line-height: 1.2; }
.dvs-ms.is-earned { background: var(--dvs-orange-soft); }
.dvs-ms.is-earned .dvs-ms__icon { filter: none; opacity: 1; }
.dvs-ms.is-earned .dvs-ms__lbl { color: var(--dvs-text); font-weight: 600; }

/* ---------- Leaderboard link (in dropdown/card) ---------- */
.dvs .dvs-lb-link {
	display: flex; align-items: center; justify-content: space-between;
	margin-top: 14px; padding: 10px 12px; border-radius: 10px;
	background: #fff8e1; border: 1px solid #ffe2a3;
	color: #8a5a00; font-weight: 700; font-size: 14px; text-decoration: none; text-align: left;
	transition: background .15s ease;
}
.dvs .dvs-lb-link:hover, .dvs .dvs-lb-link:focus { background: #ffefc2; color: #8a5a00; }

/* ---------- Leaderboard ---------- */
.dvs-lb__title { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.dvs-lb__list { list-style: none; margin: 0; padding: 0; }
.dvs-lb__row {
	display: flex; align-items: center; gap: 10px;
	margin: 0; padding: 9px 10px; border-radius: 10px;
}
.dvs-lb__row:nth-child(odd) { background: #fafafb; }
.dvs-lb__row.is-me { background: var(--dvs-orange-soft); font-weight: 700; }
.dvs-lb__rank { width: 28px; text-align: center; font-weight: 700; color: var(--dvs-muted); }
.dvs-lb__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dvs-lb__val { font-weight: 700; color: var(--dvs-orange); white-space: nowrap; }
.dvs-lb__empty { margin: 0; color: var(--dvs-muted); }
.dvs-lb__row.is-sample .dvs-lb__name { color: var(--dvs-muted); }
.dvs-lb__tag {
	display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
	background: #eef0f4; color: var(--dvs-muted);
	font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle;
}
.dvs-lb__note { margin: 10px 0 0; font-size: 12px; color: var(--dvs-muted); }

/* ---------- Small screens: dropdown pinned to viewport ---------- */
@media (max-width: 600px) {
	.dvs-pop { position: fixed; top: 70px; left: 12px !important; right: 12px !important; width: auto; max-width: none; max-height: calc(100vh - 90px); overflow-y: auto; }
}

/* ==================================================================
 * Animations
 * ================================================================== */
.dvs-count { font-weight: inherit; font-variant-numeric: tabular-nums; }

@keyframes dvs-flicker {
	0%, 100% { transform: rotate(-3deg) scale(1); }
	25%      { transform: rotate(3deg) scale(1.08); }
	50%      { transform: rotate(-2deg) scale(0.96); }
	75%      { transform: rotate(2deg) scale(1.05); }
}
@keyframes dvs-pop-in {
	from { opacity: 0; transform: translateY(-6px) scale(.96); }
	to   { opacity: 1; transform: none; }
}
@keyframes dvs-pop-up {
	from { opacity: 0; transform: translateY(6px) scale(.96); }
	to   { opacity: 1; transform: none; }
}
@keyframes dvs-dot-in {
	0%   { opacity: 0; transform: scale(.3); }
	70%  { opacity: 1; transform: scale(1.15); }
	100% { transform: scale(1); }
}
@keyframes dvs-pulse {
	0%, 100% { box-shadow: 0 0 0 2px var(--dvs-bg), 0 0 0 4px #ffc39a; }
	50%      { box-shadow: 0 0 0 2px var(--dvs-bg), 0 0 0 7px rgba(255,195,154,.35); }
}
@keyframes dvs-bounce-in {
	0%   { opacity: 0; transform: translateY(8px) scale(.85); }
	60%  { opacity: 1; transform: translateY(-3px) scale(1.04); }
	100% { transform: none; }
}
@keyframes dvs-wiggle {
	0%, 80%, 100% { transform: rotate(0); }
	85% { transform: rotate(-12deg) scale(1.15); }
	90% { transform: rotate(10deg) scale(1.15); }
	95% { transform: rotate(-6deg); }
}
@keyframes dvs-slide-in {
	from { opacity: 0; transform: translateX(-14px); }
	to   { opacity: 1; transform: none; }
}
@keyframes dvs-shine {
	from { background-position: -200% 0; }
	to   { background-position: 200% 0; }
}
@keyframes dvs-glow {
	0%, 100% { box-shadow: inset 0 0 0 1px #ffd2b0; }
	50%      { box-shadow: inset 0 0 0 1px #ffb27a, 0 0 12px rgba(255,122,26,.25); }
}

@media (prefers-reduced-motion: no-preference) {
	/* Header badge: flame flickers when the streak is alive */
	.dvs-badge__btn:not(.is-off) .dvs-badge__flame { display: inline-block; animation: dvs-flicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; }

	/* Dropdown opens with a pop */
	.dvs-pop:not([hidden]) { animation: dvs-pop-in .22s ease-out; }
	.dvs-mobile-slot.is-floating .dvs-pop:not([hidden]) { animation-name: dvs-pop-up; }

	/* Big flame in the streak view */
	.dvs-head__flame:not(.is-off), .dvs-guest-pop__flame:not(.is-off) { display: inline-block; animation: dvs-flicker 1.8s ease-in-out infinite; transform-origin: 50% 90%; }

	/* Last-7-days dots pop in one by one; today pulses */
	.dvs-day__dot { animation: dvs-dot-in .4s ease-out backwards; }
	.dvs-day:nth-child(1) .dvs-day__dot { animation-delay: .05s; }
	.dvs-day:nth-child(2) .dvs-day__dot { animation-delay: .10s; }
	.dvs-day:nth-child(3) .dvs-day__dot { animation-delay: .15s; }
	.dvs-day:nth-child(4) .dvs-day__dot { animation-delay: .20s; }
	.dvs-day:nth-child(5) .dvs-day__dot { animation-delay: .25s; }
	.dvs-day:nth-child(6) .dvs-day__dot { animation-delay: .30s; }
	.dvs-day:nth-child(7) .dvs-day__dot { animation-delay: .35s; }
	.dvs-day.is-today.is-visited .dvs-day__dot { animation: dvs-dot-in .4s ease-out .35s backwards, dvs-pulse 2s ease-in-out .8s infinite; }

	/* Earned badges bounce in, then wiggle now and then */
	.dvs-ms { animation: dvs-bounce-in .45s ease-out backwards; }
	.dvs-ms:nth-child(1) { animation-delay: .30s; }
	.dvs-ms:nth-child(2) { animation-delay: .36s; }
	.dvs-ms:nth-child(3) { animation-delay: .42s; }
	.dvs-ms:nth-child(4) { animation-delay: .48s; }
	.dvs-ms:nth-child(5) { animation-delay: .54s; }
	.dvs-ms:nth-child(6) { animation-delay: .60s; }
	.dvs-ms:nth-child(7) { animation-delay: .66s; }
	.dvs-ms:nth-child(8) { animation-delay: .72s; }
	.dvs-ms.is-earned .dvs-ms__icon { display: inline-block; animation: dvs-wiggle 4s ease-in-out 1.2s infinite; }
	.dvs-ms { transition: transform .15s ease; }
	.dvs-ms.is-earned:hover { transform: translateY(-2px) scale(1.06); }

	.dvs-freeze, .dvs-lb-link, .dvs-note { animation: dvs-pop-up .35s ease-out .2s backwards; }
	.dvs .dvs-lb-link span[aria-hidden] { transition: transform .2s ease; }
	.dvs .dvs-lb-link:hover span[aria-hidden] { transform: translateX(4px); }

	/* Leaderboard rows slide in when scrolled into view */
	.dvs-js .dvs-lb:not(.is-in) .dvs-lb__row { opacity: 0; }
	.dvs-lb.is-in .dvs-lb__row { animation: dvs-slide-in .4s ease-out backwards; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(1)  { animation-delay: .05s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(2)  { animation-delay: .12s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(3)  { animation-delay: .19s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(4)  { animation-delay: .26s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(5)  { animation-delay: .33s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(6)  { animation-delay: .40s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(7)  { animation-delay: .47s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(8)  { animation-delay: .54s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(9)  { animation-delay: .61s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(n+10) { animation-delay: .68s; }
	.dvs-lb__row { transition: transform .15s ease, background-color .15s ease; }
	.dvs-lb__row:hover { transform: translateX(3px); }

	/* Top 3: soft colour, shiny shimmer and a medal wiggle */
	.dvs-lb__row:nth-child(1):not(.is-sample) { background-color: #fff6d9; }
	.dvs-lb__row:nth-child(2):not(.is-sample) { background-color: #f3f5f8; }
	.dvs-lb__row:nth-child(3):not(.is-sample) { background-color: #fbefe4; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(-n+3):not(.is-sample) {
		background-image: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%);
		background-size: 200% 100%; background-repeat: no-repeat;
		animation-name: dvs-slide-in, dvs-shine;
		animation-duration: .4s, 3.5s;
		animation-timing-function: ease-out, ease-in-out;
		animation-iteration-count: 1, infinite;
		animation-fill-mode: backwards, none;
	}
	.dvs-lb.is-in .dvs-lb__row:nth-child(1):not(.is-sample) { animation-delay: .05s, 1s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(2):not(.is-sample) { animation-delay: .12s, 1.3s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(3):not(.is-sample) { animation-delay: .19s, 1.6s; }
	.dvs-lb.is-in .dvs-lb__row:nth-child(-n+3) .dvs-lb__rank { display: inline-block; animation: dvs-wiggle 3.5s ease-in-out 1s infinite; }
	.dvs-lb__fire { display: inline-block; font-style: normal; }
	.dvs-lb__row:nth-child(1) .dvs-lb__fire { animation: dvs-flicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; }

	/* Your own row glows (wins over the top-3 colours) */
	.dvs-lb.is-in .dvs-lb__row.is-me:not(.is-sample) {
		background-color: var(--dvs-orange-soft);
		animation-name: dvs-slide-in, dvs-glow;
		animation-duration: .4s, 2.2s;
		animation-timing-function: ease-out, ease-in-out;
		animation-iteration-count: 1, infinite;
		animation-fill-mode: backwards, none;
	}
}
.dvs-lb__fire { font-style: normal; }
