body{
    margin:40px;
    background:#f5f7fb;
    font-family:Arial,Helvetica,sans-serif;
    --lotto-radius-card: 10px;
    --lotto-radius-soft: 8px;
    --lotto-radius-button: 6px;
    --lotto-page-gutter: 16px;
    --lotto-surface-gutter: 12px;
}

.mybutton {
    background: #fff;
    color: #1377f4;
    padding: 8px 14px;
    border-radius: var(--lotto-radius-button);
    border: 1px solid #bfdbfe;
    margin: 0;
    display: inline-block;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}
.mybutton:hover {
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
}

/* Shared surface radius system */
.lottery-grid .lottery-card,
.lottery-row,
.lottery-history__row,
.lotto-generator,
.lotto-hotcold,
.lotto-stats,
.lotto-prizes,
.lsm-block,
.ljp-card {
    border-radius: var(--lotto-radius-card);
}

.lottery-card__logo,
.lottery-logo,
.lottery-game__logo,
.lottery-countdown,
.lottery-country-filter__menu,
.lottery-explore__results,
.lottery-card__badge,
.lottery-next-draw--card,
.lotto-generator__modes,
.lotto-stats__hc-feat-card,
.lotto-stats__mix-item {
    border-radius: var(--lotto-radius-soft);
}

.lottery-card__cta,
.lottery-row__cta,
.ljp-card__cta,
.lotto-generator__btn,
.lotto-copy-numbers,
.lottery-history__page,
.lottery-show-more,
.lottery-country-filter__toggle {
    border-radius: var(--lotto-radius-button);
}
body .navbar-toggler-icon {
    display: inline-block;
    width: 30px;
    height: 22px;
    position: relative;
    background: transparent;
}

body .navbar-toggler-icon::before,
body .navbar-toggler-icon::after,
body .navbar-toggler-icon {
    background-repeat: no-repeat;
}

body .navbar-toggler-icon::before,
body .navbar-toggler-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: #000;
    border-radius: 2px;
}

body .navbar-toggler-icon::before {
    top: 0;
    box-shadow: 0 9px 0 #000;
}

body .navbar-toggler-icon::after {
    bottom: 0;
}

/* Logo: WP stores SVG custom logos as 1x1; force visible size */
.custom-logo-link img {
	width: 250px;
	max-width: 100%;
	height: auto;
}

/* Mobile header: logo left, hamburger right */
@media (max-width: 767.98px) {
	#main-nav > .container {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		width: 100%;
	}

	#main-nav .navbar-brand.custom-logo-link {
		order: 1;
		flex: 0 1 auto;
		max-width: calc(100% - 56px);
		margin-right: 0;
	}

	#main-nav .navbar-brand.custom-logo-link img {
		width: 180px;
		max-width: 100%;
		height: auto;
	}

	#main-nav .navbar-toggler {
		order: 2;
		flex: 0 0 auto;
		margin-left: auto;
	}

	#main-nav .navbar-collapse {
		order: 3;
		flex-basis: 100%;
		width: 100%;
	}
}

/* Mega menu */
.navbar-expand-md > .container {
	position: relative;
}

#menu-item-3973,
.menu-item-lotto-mega {
	position: static;
}

#menu-item-3973 .dropdown-menu,
.menu-item-lotto-mega > .dropdown-menu,
.lotto-mega-host {
	width: 100%;
	max-width: min(1120px, calc(100vw - 24px));
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%);
	padding: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.lotto-mega {
	display: flex;
	flex-direction: column;
	gap: 18px;
	color: #111827;
}

.lotto-mega__accordion {
	display: none;
}

.lotto-mega__count {
	color: #6b7280;
	font-size: 0.75rem;
	font-weight: 600;
}

.lotto-mega__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px 28px;
	align-items: start;
}

.lotto-mega__col {
	min-width: 0;
}

.lotto-mega__list-wrap {
	max-height: 360px;
	overflow: auto;
	padding-right: 4px;
}

.lotto-mega__flag {
	width: 16px;
	height: 12px;
	object-fit: cover;
	border-radius: 2px;
	flex-shrink: 0;
}

.lotto-mega__flag--empty {
	display: inline-block;
	background: #e5e7eb;
}

.lotto-mega__continent-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	color: #111827 !important;
	font-size: 1.05rem;
	font-weight: 700;
	text-decoration: none !important;
}

.lotto-mega__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lotto-mega__list li + li {
	margin-top: 4px;
}

.lotto-mega__list a {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	padding: 5px 6px;
	border-radius: 8px;
	color: #4b5563 !important;
	text-decoration: none !important;
	font-size: 0.875rem;
	line-height: 1.25;
}

.lotto-mega__list a:hover {
	background: #f3f4f6;
	color: #111827 !important;
}

.lotto-mega__item-title {
	font-weight: 600;
	color: inherit;
	min-width: 0;
}

.lotto-mega__item-meta {
	display: none;
}

@media (min-width: 1100px) {
	.lotto-mega__grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 18px 16px;
	}
}

@media (max-width: 991px) {
	#menu-item-3973,
	.menu-item-lotto-mega {
		position: relative;
	}

	#menu-item-3973 .dropdown-menu,
	.menu-item-lotto-mega > .dropdown-menu,
	.lotto-mega-host {
		position: static !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
		width: 100% !important;
		max-width: none !important;
		margin: 8px 0 0 !important;
		padding: 10px;
		border-radius: 12px;
		box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
	}

	.lotto-mega {
		gap: 0;
		max-height: min(75dvh, 640px);
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}

	.lotto-mega__grid {
		display: none !important;
	}

	.lotto-mega__accordion {
		display: flex;
		flex-direction: column;
		gap: 6px;
	}

	.lotto-mega__acc-item {
		border: 1px solid #e5e7eb;
		border-radius: 10px;
		background: #fff;
		overflow: hidden;
	}

	.lotto-mega__acc-item.is-open {
		border-color: #93c5fd;
		box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.35);
	}

	.lotto-mega__acc-toggle {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		min-height: 48px;
		margin: 0;
		padding: 10px 12px;
		border: 0;
		background: #f9fafb;
		color: #111827;
		text-align: left;
		cursor: pointer;
	}

	.lotto-mega__acc-item.is-open .lotto-mega__acc-toggle {
		background: #eff6ff;
	}

	.lotto-mega__acc-toggle-main {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-width: 0;
	}

	.lotto-mega__acc-label {
		font-size: 0.9375rem;
		font-weight: 700;
		line-height: 1.2;
	}

	.lotto-mega__acc-toggle .lotto-mega__count {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 1.5rem;
		padding: 2px 6px;
		border-radius: 999px;
		background: #e5e7eb;
		color: #4b5563;
		font-size: 0.6875rem;
		font-weight: 700;
	}

	.lotto-mega__acc-item.is-open .lotto-mega__acc-toggle .lotto-mega__count {
		background: #dbeafe;
		color: #1d4ed8;
	}

	.lotto-mega__acc-chevron {
		width: 8px;
		height: 8px;
		flex-shrink: 0;
		border-right: 2px solid #6b7280;
		border-bottom: 2px solid #6b7280;
		transform: rotate(45deg);
		transition: transform 0.15s ease;
		margin-top: -4px;
	}

	.lotto-mega__acc-item.is-open .lotto-mega__acc-chevron {
		transform: rotate(225deg);
		margin-top: 2px;
	}

	.lotto-mega__acc-body {
		padding: 0 8px 10px;
		border-top: 1px solid #eef2f7;
		background: #fff;
	}

	.lotto-mega__list-wrap {
		max-height: min(42dvh, 320px);
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		padding-right: 0;
	}

	.lotto-mega__list li + li {
		margin-top: 0;
	}

	.lotto-mega__list a {
		min-height: 44px;
		padding: 10px 8px;
		gap: 10px;
		font-size: 0.9375rem;
	}

	.lotto-mega__flag {
		width: 18px;
		height: 14px;
	}

	.lotto-mega__item-title {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		white-space: normal;
	}
}

@media (max-width: 560px) {
	#menu-item-3973 .dropdown-menu,
	.menu-item-lotto-mega > .dropdown-menu,
	.lotto-mega-host {
		padding: 8px;
		border-radius: 10px;
	}

	.lotto-mega {
		max-height: min(78dvh, 680px);
	}

	.lotto-mega__list-wrap {
		max-height: min(46dvh, 360px);
	}
}
/* Край на менюто */

/* Кутийки с лотарии */
.lottery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

@media (min-width: 1200px) {
    .home .lottery-grid,
    .front-page .lottery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.lottery-grid .lottery-card {
    --lotto-accent: #1377f4;
    --lotto-text: #1f2937;
    --lotto-muted: #6b7280;
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--lotto-radius-card);
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.lottery-grid .lottery-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
}

.lottery-card__body {
    position: relative;
    z-index: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
}

.lottery-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 104px;
    flex-shrink: 0;
    padding: 16px 22px;
    border-radius: var(--lotto-radius-soft);
    background: #f3f4f6;
    border: none;
    overflow: hidden;
    text-decoration: none;
    color: var(--lotto-accent);
    font-weight: 600;
    font-size: 1.85rem;
    box-sizing: border-box;
}

.lottery-card__logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 82%;
    max-height: 82%;
    object-fit: contain;
    object-position: center;
}

.lottery-card__logo--empty {
    color: #9ca3af;
    background: #f3f4f6;
}

.lottery-card__meta {
    min-width: 0;
}

.lottery-card__title {
    display: block;
    color: var(--lotto-text);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    text-decoration: none;
    margin-bottom: 4px;
}

.lottery-card__title:hover {
    color: var(--lotto-accent);
}

.lottery-card__place {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--lotto-muted);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
}

.lottery-card__place .flag {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.06);
    object-fit: cover;
}

.lottery-card__badge {
    display: block;
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--lotto-radius-soft);
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.lottery-card__next {
    text-align: center;
    padding: 4px 0 1px;
}

.lottery-card__next-label {
    display: block;
    margin-bottom: 1px;
    color: var(--lotto-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.lottery-card__next-value {
    display: block;
    color: var(--lotto-text);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.lottery-card__cta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid #bfdbfe;
    border-radius: var(--lotto-radius-button);
    color: #1377f4;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    background: #fff;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.lottery-card__cta:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.lottery-card__cta-arrow {
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 400;
    opacity: 0.85;
}

@supports not (background: color-mix(in srgb, red 10%, white)) {
    .lottery-card__badge {
        background: #f3f4f6;
    }
}

/* Lottery cards toolbar */
.lottery-explore {
    margin-bottom: 8px;
}

.lottery-explore__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.lottery-explore__search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 220px;
    max-width: 360px;
    min-width: 180px;
    margin: 0;
}

.lottery-explore__search-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    pointer-events: none;
}

.lottery-explore__search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px 10px 36px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
}

.lottery-explore__search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.lottery-explore__search-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(19, 119, 244, 0.15);
}

/* Hide native clear button overlap on WebKit where needed */
.lottery-explore__search-input::-webkit-search-decoration,
.lottery-explore__search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.lottery-explore__results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: min(360px, 60vh);
    overflow: auto;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.lottery-explore__results-group + .lottery-explore__results-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.lottery-explore__results-heading {
    padding: 4px 8px 6px;
    color: #6b7280;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lottery-explore__results-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.lottery-explore__results-item:hover,
.lottery-explore__results-item.is-active {
    background: #eff6ff;
}

.lottery-explore__results-label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
}

.lottery-explore__results-meta {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.2;
}

.lottery-explore__results-empty {
    padding: 12px 10px;
    color: #6b7280;
    font-size: 0.875rem;
}

.lottery-country-filter {
    position: relative;
    min-width: 210px;
    flex: 0 0 auto;
    margin-left: 0;
}

.lottery-explore__view {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 3px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.lottery-explore__view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.lottery-explore__view-btn:hover {
    color: #111827;
    background: #fff;
}

.lottery-explore__view-btn.is-active {
    color: #1377f4;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.lottery-explore__view-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(19, 119, 244, 0.18);
}

.lottery-explore__view-btn:focus:not(:focus-visible) {
    box-shadow: none;
}

.lottery-explore__view-btn.is-active:focus {
    box-shadow: 0 0 0 3px rgba(19, 119, 244, 0.18), 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Compact table / list view — two columns */
.lottery-explore.is-table-view .lottery-grid,
.lottery-grid[data-view="table"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.lottery-explore.is-table-view .lottery-card,
.lottery-grid[data-view="table"] .lottery-card {
    border-radius: 10px;
    box-shadow: none;
}

.lottery-explore.is-table-view .lottery-card:hover,
.lottery-grid[data-view="table"] .lottery-card:hover {
    box-shadow: none;
    border-color: #cbd5e1;
}

.lottery-explore.is-table-view .lottery-card__body,
.lottery-grid[data-view="table"] .lottery-card__body {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
        "logo meta badge"
        "logo next cta";
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    padding: 8px 10px;
    min-height: 0;
}

.lottery-explore.is-table-view .lottery-card__logo,
.lottery-grid[data-view="table"] .lottery-card__logo {
    grid-area: logo;
    width: 44px;
    height: 44px;
    padding: 6px;
    border-radius: 8px;
    font-size: 1rem;
}

.lottery-explore.is-table-view .lottery-card__logo img,
.lottery-grid[data-view="table"] .lottery-card__logo img {
    max-width: 100%;
    max-height: 100%;
}

.lottery-explore.is-table-view .lottery-card__meta,
.lottery-grid[data-view="table"] .lottery-card__meta {
    grid-area: meta;
}

.lottery-explore.is-table-view .lottery-card__title,
.lottery-grid[data-view="table"] .lottery-card__title {
    font-size: 0.875rem;
    line-height: 1.25;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lottery-explore.is-table-view .lottery-card__place,
.lottery-grid[data-view="table"] .lottery-card__place {
    font-size: 0.75rem;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lottery-explore.is-table-view .lottery-card__place .flag,
.lottery-grid[data-view="table"] .lottery-card__place .flag {
    width: 14px;
    height: 10px;
}

.lottery-explore.is-table-view .lottery-card__badge,
.lottery-grid[data-view="table"] .lottery-card__badge {
    grid-area: badge;
    justify-self: end;
    margin: 0;
    padding: 2px 7px;
    font-size: 0.6875rem;
    line-height: 1.3;
    white-space: nowrap;
}

.lottery-explore.is-table-view .lottery-card__next,
.lottery-grid[data-view="table"] .lottery-card__next {
    grid-area: next;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
    margin: 0;
}

.lottery-explore.is-table-view .lottery-card__next-label,
.lottery-grid[data-view="table"] .lottery-card__next-label {
    font-size: 0.6875rem;
}

.lottery-explore.is-table-view .lottery-card__next-value,
.lottery-grid[data-view="table"] .lottery-card__next-value {
    font-size: 0.75rem;
    font-weight: 600;
}

.lottery-explore.is-table-view .lottery-card__cta,
.lottery-grid[data-view="table"] .lottery-card__cta {
    grid-area: cta;
    justify-self: end;
    width: auto;
    min-height: 0;
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: var(--lotto-radius-button);
    gap: 2px;
}

.lottery-explore.is-table-view .lottery-card__cta-arrow,
.lottery-grid[data-view="table"] .lottery-card__cta-arrow {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 900px) {
    .lottery-explore.is-table-view .lottery-grid,
    .lottery-grid[data-view="table"] {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .lottery-explore__toolbar {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: stretch;
        gap: 8px;
    }

    .lottery-explore__search {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
    }

    .lottery-explore__view {
        grid-column: 1;
        width: auto;
        max-width: none;
        margin: 0;
        justify-content: center;
        align-self: stretch;
    }

    .lottery-explore__view-btn {
        flex: 0 0 auto;
        width: 40px;
        height: 100%;
        min-height: 40px;
    }

    .lottery-country-filter {
        grid-column: 2;
        width: auto;
        min-width: 0;
        max-width: none;
        margin: 0;
        flex: 1 1 auto;
    }

    .lottery-country-filter__toggle {
        height: 100%;
        min-height: 40px;
        padding: 8px 10px;
    }

    /* Phone table rows: stacked, full-width CTA, less crowding */
    .lottery-explore.is-table-view .lottery-grid,
    .lottery-grid[data-view="table"] {
        gap: 10px;
    }

    .lottery-explore.is-table-view .lottery-card,
    .lottery-grid[data-view="table"] .lottery-card {
        border-radius: 12px;
    }

    .lottery-explore.is-table-view .lottery-card__body,
    .lottery-grid[data-view="table"] .lottery-card__body {
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-areas:
            "logo meta"
            "badge badge"
            "next next"
            "cta cta";
        column-gap: 12px;
        row-gap: 8px;
        padding: 12px;
        align-items: start;
    }

    .lottery-explore.is-table-view .lottery-card__logo,
    .lottery-grid[data-view="table"] .lottery-card__logo {
        width: 48px;
        height: 48px;
        padding: 7px;
    }

    .lottery-explore.is-table-view .lottery-card__title,
    .lottery-grid[data-view="table"] .lottery-card__title {
        font-size: 0.9375rem;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .lottery-explore.is-table-view .lottery-card__place,
    .lottery-grid[data-view="table"] .lottery-card__place {
        white-space: normal;
    }

    .lottery-explore.is-table-view .lottery-card__badge,
    .lottery-grid[data-view="table"] .lottery-card__badge {
        justify-self: start;
        width: fit-content;
        max-width: 100%;
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .lottery-explore.is-table-view .lottery-card__next,
    .lottery-grid[data-view="table"] .lottery-card__next {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 8px 10px;
        border-radius: 8px;
        background: #f8fafc;
    }

    .lottery-explore.is-table-view .lottery-card__next-label,
    .lottery-grid[data-view="table"] .lottery-card__next-label {
        font-size: 0.6875rem;
    }

    .lottery-explore.is-table-view .lottery-card__next-value,
    .lottery-grid[data-view="table"] .lottery-card__next-value {
        font-size: 0.875rem;
        line-height: 1.3;
        white-space: normal;
    }

    .lottery-explore.is-table-view .lottery-card__cta,
    .lottery-grid[data-view="table"] .lottery-card__cta {
        justify-self: stretch;
        width: 100%;
        min-height: 40px;
        padding: 10px 14px;
        font-size: 0.875rem;
        border-radius: var(--lotto-radius-button);
        box-sizing: border-box;
    }
}

.lottery-country-filter__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

.lottery-country-filter__toggle:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(19, 119, 244, 0.15);
}

.lottery-country-filter__current {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.lottery-country-filter__chevron {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-right: 1.5px solid #6b7280;
    border-bottom: 1.5px solid #6b7280;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .15s ease;
}

.lottery-country-filter.is-open .lottery-country-filter__chevron {
    transform: rotate(225deg) translateY(-1px);
}

.lottery-country-filter__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    width: 100%;
    min-width: 220px;
    max-height: 280px;
    margin: 0;
    padding: 6px;
    list-style: none;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.lottery-country-filter__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
}

.lottery-country-filter__option:hover,
.lottery-country-filter__option.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.lottery-country-filter__flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
    flex-shrink: 0;
}

.lottery-country-filter__flag--empty {
    display: inline-block;
    background: #e5e7eb;
}

.lottery-country-filter__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lottery-explore__empty {
    display: none;
    margin: 24px 0;
    text-align: center;
    color: #6b7280;
    font-size: 0.9375rem;
}

.lottery-explore.is-empty .lottery-explore__empty {
    display: block;
}

.lottery-card.is-filtered-out {
    display: none;
}

/* Свързани игри - обща лотария */
.lottery-games{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:16px;
    margin:20px 0;
}

.lottery-game{
    display:flex;
    align-items:center;
    gap:15px;
    padding:16px;
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius: var(--lotto-radius-card);
    text-decoration:none;
    color:#222;
    transition:.2s;
    position:relative;
}

.lottery-game:hover{
	color: #000;
	text-decoration: none;
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.lottery-game__logo{
    width:60px;
    height:60px;
    flex-shrink:0;
    border-radius: var(--lotto-radius-soft);
    background:#f5f5f5;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    font-size:26px;
    font-weight:bold;
    color:#666;
    padding:8px;
    box-sizing:border-box;
}

.lottery-game__logo img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.lottery-game__info{
    flex:1;
}

.lottery-game__name{
    font-size:16px;
    font-weight:600;
    line-height:1.3;
}

.lottery-game__name small {
	color: #808080cc;
    display: block;
    margin-top: 7px;
    font-weight: 300;
    font-style: italic;
}

.lottery-game__group{
    margin-top:4px;
    font-size:13px;
    color:#777;
}

.lottery-game__badge{
    position:absolute;
    top:10px;
    right:10px;
    background:#dc3545;
    color:#fff;
    padding:3px 8px;
    border-radius:20px;
    font-size:11px;
}
.lottery-game.is-hidden {
    display: none;
}

.lottery-show-more {
    background: #fff;
    color: #1976d2;
	border: 1px solid #1976d2;
    text-align: center;
    border-radius: 4px;
    margin: 20px auto 0;
    padding: 10px 20px;
    cursor: pointer;
}

.lottery-show-more:hover {
    background: #1976d2;
    color: #fff;
}
/* Край свързани игри */

/* History */
.lottery-history {
    margin: 20px 0;
    max-width: 100%;
    min-width: 0;
}

.lottery-history .table-scroll {
    overflow: visible !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Kill theme table min-width if a legacy table remains */
.entry-content .lottery-history table,
.entry-content .lottery-history .table-scroll table,
.lottery-history .history-table {
    min-width: 0 !important;
    width: 100% !important;
}

.lottery-history__years {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.lottery-history__year {
    appearance: none;
    border: 1px solid #cfd8e3;
    background: #fff;
    color: #1a2b3c;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.lottery-history__year:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

.lottery-history__year.is-active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.lottery-history__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.lottery-history__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e8eef5;
    border-radius: 10px;
    box-shadow: none;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.lottery-history__row:hover {
    background: #f8fafc;
}

.lottery-history__row.is-history-hidden {
    display: none;
}

.lottery-history__main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lottery-history__top {
    display: none;
}

.history-table__date {
    flex: 0 0 6.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #334155;
    line-height: 1.25;
    min-width: 0;
}

.history-table__actions {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin-left: auto;
    white-space: nowrap;
}

.history-table__numbers,
.history-table__extra {
    min-width: 0;
    max-width: 100%;
}

.history-table__numbers {
    flex: 1 1 auto;
}

.history-table__extra {
    padding-top: 6px;
    margin-left: 6.75rem;
    border-top: 1px dashed #e5eaf0;
}

.history-table__balls,
.lottery-history .numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.lottery-history .history-result-set {
    margin-bottom: 4px;
}

.lottery-history .history-result-set__label {
    font-size: 0.6875rem;
    margin-bottom: 2px;
}

.lottery-history__pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 14px 0 2px;
}

.lottery-history__page {
    appearance: none;
    border: 1px solid #cfd8e3;
    background: #fff;
    color: #1a2b3c;
    border-radius: 8px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.lottery-history__page--nav {
    min-width: 52px;
}

.lottery-history__page:hover:not(:disabled) {
    border-color: #0d6efd;
    color: #0d6efd;
}

.lottery-history__page.is-active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.lottery-history__page:disabled {
    opacity: 0.4;
    cursor: default;
}

.lottery-history__page-gap {
    color: #94a3b8;
    font-weight: 600;
    padding: 0 2px;
}

.lottery-history__more-wrap,
.lottery-history__more {
    display: none;
}

.lotto-copy-numbers {
    appearance: none;
    border: 1px solid #cfd8e3;
    background: #fff;
    color: #1a2b3c;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.lotto-copy-numbers:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

.lotto-copy-numbers.is-copied {
    border-color: #198754;
    color: #198754;
    background: #f0fff6;
}

.lottery-last-draw .lotto-copy-numbers,
.draw-numbers + .lotto-copy-numbers {
    margin-top: 12px;
}

.lottery-history .lotto-copy-numbers {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 999px;
    background: #fff;
    border-color: #dbe3ee;
    color: #334155;
}

.lottery-history .lotto-copy-numbers:hover {
    background: #fff;
    border-color: #94a3b8;
    color: #0f172a;
}

.lottery-history .ball {
    width: 28px;
    height: 28px;
    font-size: 12px;
    box-shadow: none;
}

.lottery-history .ball.big-ball {
    width: auto;
    min-width: 28px;
    padding: 0 6px;
    border-radius: 8px;
}

.lottery-history .ball:hover {
    transform: none;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ball {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 3px 8px rgba(13, 110, 253, .25);
    transition: transform .2s ease;
    flex: 0 0 auto;
}

.ball.big-ball {
    width: auto;
    min-width: 38px;
    padding: 0 8px;
    border-radius: 10px;
}

.ball:hover {
    transform: scale(1.08);
}

@media (max-width: 700px) {
    .lottery-history {
        margin: 16px 0;
    }

    .lottery-history__years {
        gap: 5px;
        margin-bottom: 8px;
    }

    .lottery-history__year {
        padding: 5px 9px;
        font-size: 12px;
    }

    .lottery-history__row {
        padding: 8px;
        gap: 6px;
    }

    .lottery-history__main {
        flex-wrap: wrap;
        gap: 6px 8px;
        align-items: flex-start;
    }

    .history-table__date {
        flex: 1 1 auto;
        font-size: 0.75rem;
    }

    .history-table__numbers {
        flex: 1 1 100%;
        order: 3;
    }

    .history-table__actions {
        margin-left: 0;
    }

    .history-table__extra {
        margin-left: 0;
    }

    .lottery-history .history-table__balls,
    .lottery-history .numbers {
        gap: 4px;
    }

    .lottery-history .ball {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .lottery-history .ball.big-ball {
        width: auto;
        min-width: 26px;
        padding: 0 5px;
        border-radius: 999px;
    }

    .lottery-history .ball:hover {
        transform: none;
    }

    .lottery-history__page {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .lottery-history__row {
        padding: 7px;
    }

    .lottery-history .ball {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .lottery-history .ball.big-ball {
        min-width: 24px;
        padding: 0 5px;
    }
}
/* END History */

/* History back link (above H1) */
.lottery-history-back {
	margin: 0 0 10px;
	padding: 0;
}

.lottery-history-back__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #4a5568;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	border: 0;
}

.lottery-history-back__link:hover,
.lottery-history-back__link:focus {
	color: #0d6efd;
	text-decoration: none;
}

.lottery-history-back__arrow {
	font-size: 1.05em;
	line-height: 1;
}

/* Legacy history button (kept for any leftover markup) */
.btn-holder {
	text-align: right;
	margin-bottom: 20px;
}
.top-btn{
    display:inline-block;
    color:#222;
    text-decoration:none;
    font-weight:600;
    border-bottom:1px solid #222;
    padding-bottom:2px;
    transition:.2s;
}

.top-btn:hover{
    color:#666;
    border-bottom-color:#666;
	text-decoration: none;
}
/* END History Button */

/* Active / lottery page games */
#draws {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 40px 0 0;
}

/* Never squeeze a detail hero into the multi-game card grid */
#draws:has(> .lottery-row--detail) {
    display: block;
    grid-template-columns: none;
    margin-top: 16px;
}

/* WP often injects empty <p></p> around shortcode output */
.entry-content > p:empty {
    display: none;
}

.lottery-row{
    display:flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px;
    margin-bottom: 0;
    border: 1px solid #e5e7eb;
    border-radius: var(--lotto-radius-card);
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    min-width: 0;
    overflow: visible;
}

.lottery-row__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.lottery-logo{
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: var(--lotto-radius-soft);
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lottery-logo img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lottery-row__titlewrap {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.lottery-name{
    flex: none;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.lottery-name a {
	color: #1f2937;
    text-decoration: none;
}

.lottery-name a:hover {
    color: #1377f4;
}

.lottery-last-draw{
    flex: 1;
	text-align: left;
}

.lottery-jackpot {
    margin-bottom: 8px;
}

.lottery-jackpot span,
.lottery-next-draw span {
    display: block;
    margin-bottom: 2px;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
}

.lottery-jackpot strong,
.lottery-next-draw strong {
    display: block;
    color: #1f2937;
    font-size: 0.9375rem;
    font-weight: 600;
}

.draw-date{
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 8px;
}

.lotto-tz-note {
    margin: 12px 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    font-weight: 500;
    color: #64748b;
}

.lotto-tz-note[hidden] {
    display: none;
}

.lottery-row--card .draw-date {
    margin-bottom: 6px;
}

.draw-numbers{
    display:flex;
    flex-wrap:wrap;
    gap: 6px;
	justify-content: flex-start;
    min-height: 0;
}

.lottery-row .ball {
    margin-top: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1377f4;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
    box-shadow: none;
}

.lottery-row .ball.big-ball {
    width: auto;
    min-width: 34px;
    padding: 0 8px;
    border-radius: 999px;
}

.lottery-next-draw{
    min-width: 0;
    text-align: left;
    font-size: 0.875rem;
}

.lottery-next-draw--card {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eef2f7;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.lottery-next-draw--card span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.lottery-next-draw--card strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.lottery-row__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    padding: 9px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1377f4;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    background: #fff;
    transition: background .2s ease, border-color .2s ease;
}

.lottery-row__cta:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    text-decoration: none;
}

.more-data {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

.more-data .draw-col {
	padding: 0;
	flex: 0 0 auto;
	width: 100%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.more-data .draw-date {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	color: #6b7280;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.more-data .draw-numbers {
	gap: 6px;
}

/* Overview cards: label + balls on one row, no inner scroll */
.more-data--card {
	gap: 6px;
}

.more-data--card .draw-col {
	flex-direction: row;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	border-top: 1px solid #f1f5f9;
}

.more-data--card .draw-col:first-child {
	border-top: 0;
	padding-top: 0;
}

.more-data--card .draw-date {
	flex: 0 0 5.5rem;
	width: 5.5rem;
	max-width: 5.5rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #64748b;
}

.more-data--card .draw-numbers {
	flex: 1 1 auto;
	min-width: 0;
	gap: 4px;
}

.lottery-row--card .more-data .ball {
	width: 26px;
	height: 26px;
	font-size: 11px;
	flex: 0 0 auto;
}

.lottery-row--card .more-data .ball.big-ball {
	width: auto;
	min-width: 26px;
	padding: 0 7px;
	border-radius: 999px;
}

.lottery-row--card {
	gap: 12px;
}

.lottery-row--card .lottery-last-draw {
	gap: 6px;
}

.history-result-set {
    margin-bottom: 8px;
}

.history-result-set:last-child {
    margin-bottom: 0;
}

.history-result-set__label {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Detail (single game) hero layout */
.lottery-row--detail {
    max-width: none;
    width: 100%;
    margin: 0 0 14px;
    padding: var(--lotto-page-gutter);
    background:
        linear-gradient(180deg, #f8fbff 0%, #ffffff 42%);
}

.lottery-row__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 24px 28px;
    align-items: stretch;
}

.lottery-row__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lottery-row__aside {
    min-width: 0;
}

.lottery-row--detail .lottery-logo {
    flex-basis: 84px;
    width: 84px;
    height: 84px;
    border-radius: var(--lotto-radius-card);
}

.lottery-row--detail .lottery-name,
.lottery-row--detail h1.lottery-name {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1f2937;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.15;
}

/* Hide the theme H1 when the draw hero already has the page H1. */
body:has(.lotto-lottery-heading h1.entry-title) .entry-header:has(h1.entry-title),
body:has(.lottery-row--detail h1.entry-title) .entry-header:has(h1.entry-title),
body:has(.lotto-lottery-heading) .lotto-page-heading-wrap:not(.lotto-lottery-heading) {
    display: none !important;
}

.lottery-parent {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lottery-row--detail .lottery-jackpot {
    margin-bottom: 10px;
}

.lottery-row--detail .lottery-jackpot span {
    margin-bottom: 3px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0;
}

.lottery-row--detail .lottery-jackpot strong {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.08;
    color: #1d4ed8;
}

.lottery-jackpot--won strong,
.lottery-row--detail .lottery-jackpot--won strong {
    color: #15803d;
    font-size: 1.125rem;
}

.lottery-parent__name {
    color: #1377f4;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.3;
}

.lottery-parent__name:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.lottery-parent__place {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.8125rem;
    line-height: 1.3;
}

.lottery-parent__place .flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.lottery-row--detail .lottery-last-draw {
    padding-top: 4px;
}

.lottery-row--detail .draw-date {
    font-size: 0.9375rem;
    margin-bottom: 12px;
}

.lottery-row--detail .draw-numbers {
    gap: 10px;
}

.lottery-row--detail .ball {
    width: 52px;
    height: 52px;
    font-size: 1.0625rem;
}

.lottery-row--detail .ball.big-ball {
    min-width: 52px;
    padding: 0 12px;
}

.ball.bonus-ball,
.draw-numbers .ball.bonus-ball,
.numbers .ball.bonus-ball,
.lottery-row .ball.bonus-ball {
    background: linear-gradient(160deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    color: #fff;
}

.draw-result-set--extra-millionday {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.draw-result-set__label {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
    text-transform: none;
}

.draw-result-set__balls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lottery-row--detail .draw-result-set--extra-millionday {
    margin-top: 12px;
    padding-top: 12px;
}

.ball.extra-millionday-ball,
.draw-numbers .ball.extra-millionday-ball,
.numbers .ball.extra-millionday-ball,
.lottery-row .ball.extra-millionday-ball {
    background: linear-gradient(160deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
    color: #fff;
}

.lottery-countdown {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: var(--lotto-page-gutter);
    border: 1px solid #dbeafe;
    border-radius: var(--lotto-radius-card);
    background: #eff6ff;
}

.lottery-countdown--static {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.lottery-countdown__history {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(37, 99, 235, 0.15);
    color: #1d4ed8;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.3;
}

.lottery-countdown--static .lottery-countdown__history {
    border-top-color: #e2e8f0;
    color: #334155;
}

.lottery-countdown__history:hover {
    color: #1e40af;
    text-decoration: underline;
}

.lottery-countdown--static .lottery-countdown__history:hover {
    color: #0f172a;
}

.lottery-buy-ticket {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 12px 16px;
    border-radius: var(--lotto-radius-button);
    background: #16a34a;
    color: #fff !important;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    border: 1px solid #15803d;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.25);
}

.lottery-buy-ticket:hover,
.lottery-buy-ticket:focus {
    background: #15803d;
    color: #fff !important;
    text-decoration: none !important;
}

.lottery-countdown__label {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lottery-countdown__date {
    display: block;
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.lottery-countdown__note {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.4;
}

.lottery-countdown__timer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
}

.lottery-countdown__unit {
    text-align: center;
    padding: 8px 4px;
    border-radius: var(--lotto-radius-soft);
    background: #fff;
    border: 1px solid #bfdbfe;
}

.lottery-countdown__unit span {
    display: block;
    color: #1377f4;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.lottery-countdown__unit small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lottery-countdown.is-complete .lottery-countdown__unit span {
    color: #64748b;
}

@media (max-width: 767px) {
    .lottery-row__hero {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .lottery-row--detail {
        padding: var(--lotto-page-gutter);
    }

    .lottery-row--detail .lottery-name {
        font-size: 1.4rem;
    }

    .lottery-row--detail .ball {
        width: 44px;
        height: 44px;
        font-size: 0.9375rem;
    }

    .lottery-row--detail .ball.big-ball {
        min-width: 44px;
    }
}

/* Lottery page chrome */
.entry-content > p:has(> .mybutton) {
    margin-bottom: 18px;
}

.page .entry-title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1f2937;
    margin-bottom: 12px;
}

.lotto-page-heading-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.lotto-page-heading__logo {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    max-height: none;
    max-width: 5rem;
    object-fit: contain;
    object-position: left center;
}

.lotto-page-heading__text {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.lotto-page-heading__text .entry-title {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.15;
}

.lotto-page-heading-wrap .lottery-parent__place {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .lotto-page-heading-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .lotto-page-heading__logo {
        max-width: 7.5rem;
    }

    .lotto-page-heading__text {
        width: 100%;
    }
}

/* Legacy class kept for older markup */
.lotto-page-heading {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0;
}

.lotto-generator {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0 0 14px;
    padding: var(--lotto-page-gutter);
    border: 1px solid #dbe4f0;
    border-radius: var(--lotto-radius-card);
    overflow: hidden;
    background: #fff;
}

.lotto-generator__head {
    min-width: 0;
    margin: 0 0 8px;
}

.lotto-generator__title {
    margin: 0 0 2px !important;
    font-size: 0.9375rem !important;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.lotto-generator__meta {
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
}

.lotto-generator__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

.lotto-generator__btn {
    appearance: none;
    flex: 0 0 auto;
    border: 0;
    border-radius: var(--lotto-radius-button);
    background: #1377f4;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: none;
    transition: background .15s ease, transform .15s ease;
}

.lotto-generator__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.lotto-generator__btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.lotto-generator__copy {
    padding: 8px 14px;
    font-size: 0.8125rem;
    border-radius: var(--lotto-radius-button);
    line-height: 1.2;
}

.lotto-generator__copy:disabled {
    opacity: 0.45;
    cursor: default;
    color: #64748b;
    border-color: #e2e8f0;
    background: #f8fafc;
}

.lotto-generator__copy:disabled:hover {
    color: #64748b;
    border-color: #e2e8f0;
}

.lotto-generator__modes {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border-radius: var(--lotto-radius-soft);
    background: #e8eef5;
}

.lotto-generator__mode {
    appearance: none;
    border: 0;
    border-radius: var(--lotto-radius-button);
    background: transparent;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 8px;
    cursor: pointer;
    line-height: 1;
}

.lotto-generator__mode.is-active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.lotto-generator__mode:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}

.lotto-generator__btn:hover {
    background: #0f66d4;
}

.lotto-generator__btn:active {
    transform: translateY(1px);
}

.lotto-generator__btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.lotto-generator__balls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.lotto-generator__balls .ball.is-placeholder {
    background: #e2e8f0;
    box-shadow: none;
    color: #94a3b8;
    animation: none;
}

.lotto-generator__balls .ball.bonus-ball.is-placeholder {
    background: #fde68a;
    color: #b45309;
    box-shadow: none;
}

.lotto-generator__balls .ball {
    width: 34px;
    height: 34px;
    font-size: 0.8125rem;
    font-weight: 700;
    background: #1377f4;
    box-shadow: none;
    animation: lotto-gen-pop .35s ease both;
}

.lotto-generator__balls .ball.big-ball {
    width: auto;
    min-width: 34px;
    padding: 0 8px;
    border-radius: 999px;
}

.lotto-generator__balls .ball.bonus-ball {
    background: linear-gradient(160deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: none;
    color: #fff;
}

.lotto-generator__balls.is-rolling .ball {
    animation: lotto-gen-pop .4s ease both;
}

@keyframes lotto-gen-pop {
    from {
        opacity: 0;
        transform: scale(0.72) translateY(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 600px) {
    .lotto-generator__row {
        flex-direction: column;
        align-items: stretch;
    }

    .lotto-generator__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .lotto-generator__modes {
        flex: 1 1 auto;
    }

    .lotto-generator__mode {
        flex: 1 1 0;
        text-align: center;
    }

    .lotto-generator__btns {
        margin-left: auto;
    }
}

/* Hot & Cold numbers */
.lotto-hotcold {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 28px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.lotto-hotcold__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f7;
    background: #fafbfc;
}

.lotto-hotcold__title {
    margin: 0 !important;
    font-size: 1.0625rem;
    font-weight: 650;
    color: #1f2937;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.lotto-hotcold__tabs {
    display: inline-flex;
    gap: 2px;
    flex: 0 0 auto;
    padding: 2px;
    border-radius: 8px;
    background: #eef2f7;
}

.lotto-hotcold__tab {
    appearance: none;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
    line-height: 1;
}

.lotto-hotcold__tab.is-active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.lotto-hotcold__panel {
    padding: 14px 16px 16px;
}

.lotto-hotcold__note {
    margin: 0 0 12px;
    color: #9ca3af;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.lotto-hotcold__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.lotto-hotcold__row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #eef2f7;
    background: #fafbfc;
}

.lotto-hotcold__row--hot,
.lotto-hotcold__row--cold {
    border-color: #eef2f7;
    background: #fafbfc;
}

.lotto-hotcold__label {
    flex: 0 0 auto;
    min-width: 4.25rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lotto-hotcold__label-text {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #374151;
}

.lotto-hotcold__label-sub {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #9ca3af;
    line-height: 1.2;
}

.lotto-hotcold__row--hot .lotto-hotcold__label-text {
    color: #b45309;
}

.lotto-hotcold__row--cold .lotto-hotcold__label-text {
    color: #475569;
}

.lotto-hotcold__balls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.lotto-hotcold__chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 36px;
}

.lotto-hotcold__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-weight: 650;
    font-size: 0.875rem;
    line-height: 1;
    color: #1f2937;
    background: #fff;
    border: 1px solid #d1d5db;
}

.lotto-hotcold__row--hot .lotto-hotcold__num {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #b45309;
}

.lotto-hotcold__row--cold .lotto-hotcold__num {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.lotto-hotcold__freq {
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    color: #9ca3af;
}

.lotto-hotcold__row--hot .lotto-hotcold__freq,
.lotto-hotcold__row--cold .lotto-hotcold__freq {
    color: #9ca3af;
}

@media (max-width: 820px) {
    .lotto-hotcold__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .lotto-hotcold__bar,
    .lotto-hotcold__panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .lotto-hotcold__row {
        padding: 10px 12px;
        gap: 10px;
    }

    .lotto-hotcold__label {
        min-width: 3.5rem;
    }

    .lotto-hotcold__num {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }

    .lotto-hotcold__chip {
        min-width: 32px;
    }
}

/* Draw stats (hot/cold, overdue, high/low, even/odd) */
.lotto-stats {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 20px;
    border: 1px solid #e5e7eb;
    border-radius: var(--lotto-radius-card);
    overflow: hidden;
    background: #fff;
}

.lotto-stats__bar {
    padding: var(--lotto-page-gutter);
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}

.lotto-stats__title {
    margin: 0 !important;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.lotto-stats__body {
    padding: var(--lotto-page-gutter);
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.lotto-stats__note {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
}

.lotto-stats__note strong {
    font-weight: 600;
    color: #475569;
}

.lotto-stats__block {
    min-width: 0;
}

.lotto-stats__heading {
    margin: 0 0 2px !important;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.lotto-stats__sub {
    margin: 0 0 12px;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.35;
}

.lotto-stats__hc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.lotto-stats__tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--lotto-radius-soft);
    background: #eef2f7;
}

.lotto-stats__tab {
    appearance: none;
    border: 0;
    border-radius: var(--lotto-radius-button);
    background: transparent;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
    line-height: 1;
}

.lotto-stats__tab.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.lotto-stats__hc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.lotto-stats__rank-label {
    margin: 0 0 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.lotto-stats__rank-row {
    display: grid;
    grid-template-columns: 2.1rem minmax(0, 1fr) 2.1rem;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.lotto-stats__rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.lotto-stats__rank--hot .lotto-stats__rank-num {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #b45309;
}

.lotto-stats__rank--cold .lotto-stats__rank-num {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.lotto-stats__rank-track {
    height: 10px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

.lotto-stats__rank-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    min-width: 4px;
}

.lotto-stats__rank--hot .lotto-stats__rank-track span {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.lotto-stats__rank--cold .lotto-stats__rank-track span {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.lotto-stats__rank-freq {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-align: right;
}

.lotto-stats__overdue {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.lotto-stats__overdue-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--lotto-surface-gutter);
    border: 1px solid #eef2f7;
    border-radius: var(--lotto-radius-soft);
    background: #f8fafc;
}

.lotto-stats__overdue-ring {
    position: relative;
    width: 52px;
    height: 52px;
}

.lotto-stats__overdue-ring svg {
    position: absolute;
    inset: 0;
    display: block;
}

.lotto-stats__overdue-ring-track,
.lotto-stats__overdue-ring-fill {
    stroke-width: 4;
}

.lotto-stats__overdue-ring-track {
    stroke: #e2e8f0;
}

.lotto-stats__overdue-ring-fill {
    stroke: #6366f1;
    stroke-linecap: round;
}

.lotto-stats__overdue-ring .ball,
.lotto-stats .ball.ball--overdue {
    background: linear-gradient(160deg, #a5b4fc 0%, #6366f1 100%);
    color: #fff;
}

.lotto-stats__overdue-ring .ball {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    font-size: 13px;
    box-shadow: none;
    transform: translate(-50%, -50%);
}

.lotto-stats__overdue-ring .ball.big-ball {
    min-width: 34px;
    padding: 0 4px;
    border-radius: 999px;
}

.lotto-stats__overdue-ring .ball:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.lotto-stats__overdue-gap {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    text-align: center;
}

.lotto-stats .ball.ball--hot {
    background: linear-gradient(160deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.28);
    color: #fff;
}

.lotto-stats .ball.ball--ice,
.lotto-stats .ball.ball--cold {
    background: linear-gradient(160deg, #94a3b8 0%, #64748b 100%);
    box-shadow: 0 3px 8px rgba(100, 116, 139, 0.22);
    color: #fff;
}

.lotto-stats__hc-ribbon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: var(--lotto-surface-gutter);
    border-radius: 12px;
}

.lotto-stats__hc-ribbon + .lotto-stats__hc-ribbon {
    margin-top: 8px;
}

.lotto-stats__hc-ribbon--hot {
    background: #fffbeb;
}

.lotto-stats__hc-ribbon--cold {
    background: #f8fafc;
}

.lotto-stats__hc-ribbon-tag {
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 3rem;
}

.lotto-stats__hc-ribbon--hot .lotto-stats__hc-ribbon-tag {
    color: #b45309;
}

.lotto-stats__hc-ribbon--cold .lotto-stats__hc-ribbon-tag {
    color: #475569;
}

.lotto-stats__hc-ribbon-feat {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 4px;
    padding-right: 10px;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.lotto-stats__hc-ribbon-feat .ball {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.lotto-stats__hc-ribbon-kicker {
    display: block;
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
}

.lotto-stats__hc-ribbon--hot .lotto-stats__hc-ribbon-kicker {
    color: #b45309;
}

.lotto-stats__hc-ribbon--cold .lotto-stats__hc-ribbon-kicker {
    color: #475569;
}

.lotto-stats__hc-ribbon-meta {
    display: block;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}

.lotto-stats__hc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px 2px 2px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.lotto-stats__hc-chip .ball {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    box-shadow: none;
}

.lotto-stats__hc-chip-freq {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1;
}

.lotto-stats__split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.lotto-stats__compare-labels,
.lotto-stats__compare-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.lotto-stats__compare-labels {
    margin-bottom: 8px;
}

.lotto-stats__compare-foot {
    margin-top: 6px;
    color: #0f172a;
}

.lotto-stats__compare-track {
    display: flex;
    height: 28px;
    border-radius: 999px;
    overflow: hidden;
    background: #f1f5f9;
}

.lotto-stats__compare-track span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.lotto-stats__compare--range .is-left,
.lotto-stats__compare--parity .is-odd,
.lotto-stats__compare--parity .is-right {
    background: #64748b;
}

.lotto-stats__compare--range .is-right,
.lotto-stats__compare--parity .is-left {
    background: #0d6efd;
}

.lotto-stats__mix {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lotto-stats__mix-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 2.4rem;
    gap: 4px 8px;
    align-items: center;
}

.lotto-stats__mix-dots {
    display: flex;
    gap: 3px;
}

.lotto-stats__mix-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.lotto-stats__mix-dots .is-even {
    background: #0d6efd;
}

.lotto-stats__mix-dots .is-odd {
    background: #94a3b8;
}

.lotto-stats__mix-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.lotto-stats__mix-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.lotto-stats__mix-track {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

.lotto-stats__mix-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0d6efd;
}

.lotto-stats__mix--cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
}

.lotto-stats__mix--cards .lotto-stats__mix-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: var(--lotto-surface-gutter);
    border: 1px solid #eef2f7;
    border-radius: var(--lotto-radius-soft);
    background: #f8fafc;
}

.lotto-stats__mix--cards .lotto-stats__mix-track {
    grid-column: auto;
    width: 100%;
}

.lotto-stats__mix--cards .lotto-stats__mix-pct {
    text-align: left;
}

@media (max-width: 820px) {
    .lotto-stats__hc-grid,
    .lotto-stats__split {
        grid-template-columns: 1fr;
    }

    .lotto-stats__mix--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    body {
        --lotto-page-gutter: 12px;
        --lotto-surface-gutter: 10px;
    }

    .lotto-stats__overdue {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .lotto-stats__overdue-item {
        padding: 6px 2px 5px;
        gap: 3px;
        border-radius: var(--lotto-radius-soft);
    }

    .lotto-stats__overdue-ring {
        width: 44px;
        height: 44px;
    }

    .lotto-stats__overdue-ring svg {
        width: 44px;
        height: 44px;
    }

    .lotto-stats__overdue-ring .ball {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .lotto-stats__overdue-ring .ball.big-ball {
        min-width: 28px;
        padding: 0 3px;
    }

    .lotto-stats__overdue-gap {
        font-size: 0.625rem;
        white-space: nowrap;
    }

    .lotto-stats__overdue-unit {
        display: none;
    }

    .lotto-stats__mix--cards {
        grid-template-columns: 1fr 1fr;
    }

    .lotto-stats__compare-track {
        height: 24px;
    }

    .lotto-stats__hc-ribbon {
        gap: 6px;
        padding: var(--lotto-surface-gutter);
    }

    .lotto-stats__hc-ribbon-tag {
        min-width: 2.4rem;
        font-size: 0.6875rem;
    }

    .lotto-stats__hc-ribbon-feat {
        flex: 1 1 calc(100% - 3.2rem);
        margin: 0 0 2px;
        padding: 0 0 8px;
        border-right: 0;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    }

    .lotto-stats__hc-ribbon-feat .ball {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .lotto-stats__hc-chip {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 4.4rem;
        max-width: calc(33.333% - 4px);
        justify-content: flex-start;
        box-sizing: border-box;
        padding: 4px 6px 4px 4px;
    }
}

.more-games-title {
    margin: 28px 0 14px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

/* Mobile */
@media (max-width:768px){
	body .h1,
	body h1 {
		font-size: 1.5rem;
	}
	body .h3,
	body h3 {
		font-size: 1.2rem;
	}
	.more-games-title {
		margin-top: 24px;
	}
    #draws {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .lottery-row{
        gap: 12px;
        padding: 16px;
    }
    .lottery-logo{
        flex-basis: 56px;
        width: 56px;
        height: 56px;
    }
}
/* END Active  */

/* Допълнителна таблица към резултати */
/* Контейнер */
.result-level {
    margin: 15px 0;
}

/* Заглавия */
.result-level h2,
.result-level h3,
.result-level h4,
.result-level h5,
.result-level h6 {
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e5e5e5;
    color: #333;
    font-weight: 600;
}

.result-level h2 { font-size: 1.5rem; }
.result-level h3 { font-size: 1.3rem; }
.result-level h4 { font-size: 1.15rem; }
.result-level h5,
.result-level h6 { font-size: 1rem; }

/* Вложените секции */
.result-level > .result-level {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 3px solid #ddd;
}

/* Списъци */
.result-level ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0 0 15px;
    padding: 0;
}

/* Елемент */
.result-level li {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 70px;
    text-align: center;
    font-family: Consolas, Monaco, monospace;
    font-size: 15px;
    font-weight: 600;
    transition: .2s;
}

.result-level li:hover {
    background: #ececec;
}

/* Обикновени стойности */
.result-level .value {
    display: inline-block;
    margin: 4px 0 10px;
    padding: 6px 10px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Само първото ниво */
.level-1 {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

/* Mobile */
@media (max-width:768px) {

    .level-1 {
        padding: 15px;
    }

    .result-level > .result-level {
        margin-left: 10px;
        padding-left: 10px;
    }

    .result-level li {
        flex: 1 1 calc(50% - 10px);
    }

    .result-level h2 { font-size: 1.3rem; }
    .result-level h3 { font-size: 1.15rem; }
    .result-level h4 { font-size: 1.05rem; }
}

@media (max-width:480px) {

    .result-level li {
        flex: 1 1 100%;
    }

    .result-level > .result-level {
        margin-left: 0;
    }
}
/* Край на допълнителна таблица към резултатти */

/* ============================================================
   HTML Sitemap  [lotto_html_sitemap]
   ============================================================ */

.lotto-html-sitemap {
    padding: 8px 0 48px;
}

/* ---- Continent section ---- */
.lsm-continent {
    margin-bottom: 40px;
}
.lsm-continent__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2540;
    border-bottom: 2px solid #e2e6ef;
    padding-bottom: 5px;
    margin: 0 0 16px;
}

/*
 * Each lottery is its own small block. CSS columns distribute
 * blocks top-to-bottom so no giant uneven gaps.
 */
.lsm-blocks {
    column-count: 3;
    column-gap: 28px;
}

.lsm-block {
    break-inside: avoid;
    margin-bottom: 18px;
}

/* Lottery name row */
.lsm-block__head {
    display: flex;
    align-items: baseline;
    gap: 7px;
}
.lsm-block__name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2540;
    text-decoration: none;
    line-height: 1.3;
}
.lsm-block__name:hover {
    color: #3366ff;
    text-decoration: underline;
}
.lsm-block__history {
    font-size: 0.72rem;
    color: #a0aab8;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.lsm-block__history:hover { color: #3366ff; text-decoration: underline; }

/* Country label under lottery name */
.lsm-block__country {
    font-size: 0.7rem;
    color: #a0aab8;
    margin: 1px 0 4px;
}

/* Games list */
.lsm-block__games {
    list-style: none;
    margin: 2px 0 0 0;
    padding: 0 0 0 10px;
    border-left: 2px solid #e8ebf4;
}
.lsm-block__games li {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 1px 0;
}
.lsm-block__games li a:first-child {
    flex: 1;
    font-size: 0.82rem;
    color: #3a4a6b;
    text-decoration: none;
}
.lsm-block__games li a:first-child:hover {
    color: #3366ff;
    text-decoration: underline;
}
.lsm-game-history {
    font-size: 0.72rem;
    color: #c0c8d8;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.lsm-game-history:hover { color: #3366ff; text-decoration: underline; }

@media (max-width: 780px) {
    .lsm-blocks { column-count: 2; }
}
@media (max-width: 480px) {
    .lsm-blocks { column-count: 1; }
}

/* ============================================================
   Jackpots page  [lotto_jackpots]
   ============================================================ */

.lotto-jackpots {
    padding: 4px 0 48px;
}

/* ---- Continent filter tabs ---- */
.ljp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}
.ljp-tab {
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid #d8dde8;
    border-radius: 20px;
    background: #fff;
    color: #3a4a6b;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.4;
}
.ljp-tab:hover,
.ljp-tab.is-active {
    background: #1a2540;
    color: #fff;
    border-color: #1a2540;
}

/* ---- Card grid ---- */
.ljp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

/* Variant 18 — subtle gradient bg + indigo jackpot */
.ljp-card {
    background: linear-gradient(160deg, #fff 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 13px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 100%;
    transition: box-shadow .15s;
}
.ljp-card:hover {
    box-shadow: 0 4px 18px rgba(51,102,255,.10);
}

/* Flag + country */
.ljp-card__meta {
    display: flex;
    align-items: center;
    gap: 5px;
}
.ljp-card__flag {
    display: block;
    border-radius: 2px;
    flex-shrink: 0;
}
.ljp-card__country {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Logo */
.ljp-card__logo {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
}
.ljp-card__logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.ljp-card__logo-link:hover {
    opacity: 0.85;
}
.ljp-card__logo img {
    max-width: 100%;
    max-height: 46px;
    object-fit: contain;
}
.ljp-card__logo-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a2540;
    text-align: center;
}

/* Name */
.ljp-card__name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a2540;
    text-align: center;
    line-height: 1.2;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Jackpot — indigo amount */
.ljp-card__jackpot {
    text-align: center;
    margin-top: 2px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.ljp-card__jackpot span {
    display: block;
    font-size: 0.62rem;
    color: #94a3b8;
    margin-bottom: 2px;
    font-weight: 600;
}
.ljp-card__jackpot strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 900;
    color: #1d4ed8;
    line-height: 1.08;
    min-height: 0;
    overflow-wrap: anywhere;
}

/* Next draw */
.ljp-card__next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    padding-top: 5px;
    margin-top: 4px;
    gap: 6px;
    min-height: 34px;
}
.ljp-card__next strong {
    color: #334155;
    font-weight: 600;
    font-size: 0.72rem;
}
.ljp-card__next-empty {
    visibility: hidden;
}

/* CTA — rounded indigo button */
.ljp-card__actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
}

.ljp-card__actions .lottery-buy-ticket {
    margin-top: 0;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 8px;
}

.ljp-card__cta {
    display: block;
    text-align: center;
    padding: 7px 10px;
    background: #1d4ed8;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.ljp-card__cta:hover {
    background: #0d6efd;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 600px) {
    .ljp-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 360px) {
    .ljp-grid { grid-template-columns: 1fr; }
}

/* Contact Us page template */
.lotto-contact-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 32px;
    align-items: start;
    margin: 24px 0;
}

.lotto-contact-page__content {
    max-width: none;
    font-size: 1rem;
    line-height: 1.65;
    color: #334155;
}

.lotto-contact-page__content p {
    margin: 0 0 1em;
}

.lotto-contact-page__content ul {
    margin: 0 0 1em;
    padding-left: 1.25em;
}

.lotto-contact-page__content li + li {
    margin-top: 0.35em;
}

.lotto-contact-page__form .lotto-contact {
    max-width: none;
    margin: 0;
}

.lotto-contact-page__form .lotto-contact__grid {
    grid-template-columns: 1fr;
}

.lotto-contact {
    max-width: 720px;
    margin: 0 auto 24px;
}

.lotto-contact__notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.lotto-contact__notice--success {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
}

.lotto-contact__notice--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.lotto-contact__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.lotto-contact__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.lotto-contact__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lotto-contact__field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.lotto-contact__field input,
.lotto-contact__field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    line-height: 1.4;
}

.lotto-contact__field textarea {
    resize: vertical;
    min-height: 140px;
}

.lotto-contact__field input:focus,
.lotto-contact__field textarea:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.lotto-contact__submit {
    align-self: flex-start;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: #1d4ed8;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.lotto-contact__submit:hover {
    background: #1e40af;
}

.lotto-contact__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 900px) {
    .lotto-contact-page__layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .lotto-contact__grid {
        grid-template-columns: 1fr;
    }

    .lotto-contact__form {
        padding: 16px;
    }
}