:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --line: #e5e7eb;
    --red: #d9343a;
    --blue: #2667d8;
    --green: #16965f;
    --gold: #c58b19;
    --ink: #132238;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus,
a:active {
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand__text {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand__logo {
    display: none;
    width: auto;
    max-width: 190px;
    height: 46px;
    object-fit: contain;
}

.brand.has-logo .brand__logo {
    display: block;
}

.brand.has-logo .brand__text {
    display: none;
}

.brand__mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-weight: 800;
    font-size: 22px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 18px;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 800;
}

.site-nav a:hover {
    background: #eef2f7;
    color: var(--red);
}

.site-nav a.active,
.site-nav a[aria-current="page"] {
    background: var(--red);
    color: #fff;
    box-shadow: 0 10px 22px rgba(217, 52, 58, .22);
}

.site-nav a.active:hover,
.site-nav a[aria-current="page"]:hover {
    background: #c92e34;
    color: #fff;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.hero-section {
    padding: 28px 0 32px;
    background: linear-gradient(180deg, #fff 0%, #f6f8fb 100%);
}

.hero-grid,
.page-grid-main {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: 22px;
    align-items: stretch;
}

.draw-panel,
.video-panel,
.trend-card,
.notice-card,
.picker-controls,
.picker-result,
.info-list {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.draw-panel {
    padding: clamp(22px, 4vw, 38px);
}

.draw-panel h1,
.page-hero h1 {
    margin: 6px 0 10px;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: 0;
}

.draw-panel h2 {
    margin: 6px 0;
    color: var(--ink);
    font-size: 26px;
}

.section-kicker {
    color: var(--gold);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    font-size: 13px;
}

.draw-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.number-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.ball {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .72), inset 0 -6px 0 rgba(0, 0, 0, .12);
}

.ball.red,
.mini-ball.red,
.picked-number.red {
    background: var(--red);
}

.ball.blue,
.mini-ball.blue,
.picked-number.blue {
    background: var(--blue);
}

.ball.green,
.mini-ball.green,
.picked-number.green {
    background: var(--green);
}

.ball.special {
    box-shadow: inset 0 0 0 3px rgba(244, 215, 125, .72), inset 0 -6px 0 rgba(0, 0, 0, .12);
}

.mini-ball.special,
.picked-number.special {
    box-shadow: inset 0 0 0 2px rgba(244, 215, 125, .72), inset 0 -4px 0 rgba(0, 0, 0, .12);
}

.draw-summary {
    color: var(--muted);
    line-height: 1.8;
}

.draw-summary span {
    display: block;
}

.action-row,
.stream-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary-clean,
.btn-secondary-clean {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary-clean {
    background: var(--red);
    color: #fff;
}

.btn-secondary-clean {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.btn-primary-clean.small,
.btn-secondary-clean.small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
}

.video-panel {
    padding: 16px;
}

.live-source-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}

.live-source-tabs button {
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

.live-source-tabs button.active {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 18px rgba(225, 29, 43, .18);
}

.video-panel.wide {
    min-width: 0;
}

.panel-title,
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.panel-title span:first-child,
.section-head h2,
.notice-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 22px;
    font-weight: 800;
}

.panel-title a,
.section-head a,
.stream-links a,
.info-list a {
    color: var(--blue);
    font-weight: 700;
}

.live-video {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 420px;
    display: block;
    background: #111827;
    border-radius: 8px;
    object-fit: contain;
}

.live-iframe {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 420px;
    display: block;
    border: 0;
    background: #111827;
    border-radius: 8px;
}

.live-video.large {
    min-height: 360px;
}

.open-video-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
}

.video-only-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.video-only-panel .live-video.large {
    flex: 1 1 auto;
    min-height: 640px;
    aspect-ratio: 16 / 9;
}

.video-only-panel .live-iframe {
    flex: 1 1 auto;
    min-height: 640px;
    aspect-ratio: 16 / 9;
}

.video-ad-panel {
    display: flex;
    align-self: start;
    min-width: 0;
    min-height: var(--open-video-window-height);
    margin-top: 43px;
}

.video-ad-carousel {
    flex: 1 1 auto;
    display: flex;
    height: var(--open-video-window-height);
    min-height: 0;
    margin-top: 0;
}

.video-ad-carousel .live-ad-track {
    flex: 1 1 auto;
    height: 100%;
    min-height: var(--open-video-window-height);
    aspect-ratio: auto;
}

.ad-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: #f8fafc;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.video-history-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-history-tools select,
.video-history-tools input {
    height: 40px;
    min-width: 160px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
}

.video-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.video-history-item {
    min-height: 96px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.video-history-item:hover,
.video-history-item.active {
    border-color: var(--red);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.video-history-item strong,
.video-history-item span,
.video-history-item em {
    display: block;
}

.video-history-item strong {
    color: var(--ink);
    font-size: 16px;
}

.video-history-item span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.video-history-item em {
    margin-top: 8px;
    color: var(--red);
    font-style: normal;
    font-weight: 800;
}

.video-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.section-block {
    padding: 34px 0;
}

.history-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.history-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.history-table th {
    background: #f9fafb;
    color: #475467;
    font-size: 13px;
    white-space: nowrap;
}

.history-table td {
    white-space: nowrap;
}

.history-table .nowrap {
    white-space: nowrap;
}

.history-table .zodiac-cell {
    min-width: 190px;
}

.history-table .zodiac-balls {
    min-width: 252px;
}

.zodiac-ball {
    font-size: 12px;
}

.nowrap-balls {
    flex-wrap: nowrap;
    min-width: max-content;
}

.mini-balls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mini-ball {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72), inset 0 -3px 0 rgba(0, 0, 0, .12);
}

.tool-band {
    padding: 34px 0 48px;
}

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

.tool-card {
    min-height: 150px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.tool-card i {
    color: var(--red);
    font-size: 24px;
}

.tool-card strong,
.tool-card span {
    display: block;
}

.tool-card strong {
    margin-top: 12px;
    font-size: 20px;
}

.tool-card span {
    margin-top: 6px;
    color: var(--muted);
}

.page-hero {
    padding: 46px 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.page-hero.compact p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
}

.page-grid-main {
    padding: 34px 0;
}

.live-layout {
    align-items: stretch;
}

.live-layout .video-panel,
.live-result-card {
    height: 100%;
}

.live-result-card {
    display: flex;
    flex-direction: column;
}

.live-result-card .number-row {
    margin: 18px 0;
    padding: 3px 0;
}

.previous-draw-card {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.previous-draw-card h2 {
    margin: 6px 0;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.2;
}

.previous-draw-card p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.previous-number-row {
    justify-content: flex-start;
    margin: 16px 0 10px;
    padding: 3px 0;
}

.previous-summary {
    font-size: 13px;
    text-align: left;
}

.live-ad-carousel {
    position: relative;
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.live-ad-track {
    position: relative;
    aspect-ratio: 16 / 6;
    min-height: 118px;
}

.live-ad-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}

.live-ad-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.live-ad-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.live-ad-slide span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 6px rgba(15, 23, 42, .5);
}

.live-ad-dots {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 6px;
}

.live-ad-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
}

.live-ad-dots button.active {
    width: 18px;
    background: #fff;
}

.draw-panel.slim {
    align-self: start;
}

.compact-row .ball {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    font-size: 16px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72), inset 0 -4px 0 rgba(0, 0, 0, .12);
}

.compact-row .ball.special {
    box-shadow: inset 0 0 0 2px rgba(244, 215, 125, .72), inset 0 -4px 0 rgba(0, 0, 0, .12);
}

.status-dot {
    color: var(--green);
    font-size: 14px;
}

.countdown-card {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.home-countdown-card {
    margin-top: 14px;
}

.countdown-card span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.countdown-card strong {
    color: var(--ink);
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1;
    letter-spacing: 0;
}

.countdown-card small {
    color: var(--muted);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(260px, 1.4fr) auto auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.history-filter {
    grid-template-columns: 180px minmax(240px, 380px) auto auto;
    justify-content: start;
}

.history-filter label {
    white-space: nowrap;
}

.filter-bar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #475467;
    font-size: 14px;
    font-weight: 700;
}

.filter-bar select,
.filter-bar input {
    height: 40px;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
}

.export-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.picker-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 18px;
    padding: 34px 0;
}

.picker-controls,
.picker-result {
    padding: 20px;
}

.control-group + .control-group {
    margin-top: 18px;
}

.picker-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip-row button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.chip-row button.active {
    border-color: var(--red);
    color: var(--red);
    background: #fff5f5;
}

.chip-row button[data-value="red"].active {
    border-color: var(--red);
    color: #fff;
    background: var(--red);
}

.chip-row button[data-value="blue"].active {
    border-color: var(--blue);
    color: #fff;
    background: var(--blue);
}

.chip-row button[data-value="green"].active {
    border-color: var(--green);
    color: #fff;
    background: var(--green);
}

.number-grid,
.heat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 12px;
}

.number-tile {
    min-height: 82px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
}

.number-tile small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
}

.number-tile .mini-ball,
.picked-number {
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72), inset 0 -4px 0 rgba(0, 0, 0, .12);
}

.number-tile .mini-ball {
    width: 50px;
    height: 50px;
    font-size: 20px;
}

.picked-box {
    min-height: 54px;
    margin-top: 18px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--muted);
}

.picked-title {
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
    font-weight: 800;
}

.picked-number-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.picked-number {
    width: 50px;
    height: 50px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 900;
}

.trend-grid {
    display: grid;
    grid-template-columns: .75fr 1.25fr;
    gap: 18px;
    align-items: start;
}

.trend-top-layout {
    grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr);
    align-items: stretch;
}

.trend-top-layout > .trend-card,
.trend-top-layout > .trend-stack {
    min-height: 100%;
}

.trend-top-layout > .trend-stack {
    grid-template-rows: auto 1fr;
}

.trend-top-layout > .trend-stack > .trend-grid-2 > .trend-card {
    min-height: 100%;
}

.trend-stack {
    display: grid;
    gap: 18px;
    align-content: start;
}

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

.trend-stack > .trend-grid-2 {
    align-items: stretch;
}

.trend-stack > .trend-grid-2 > .trend-card,
.trend-tail-layout > .trend-grid-2 > .trend-card {
    min-height: 100%;
}

.trend-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trend-tail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, .9fr);
    gap: 18px;
    align-items: stretch;
}

.trend-tail-layout > .trend-grid-2 {
    align-items: stretch;
}

.trend-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.trend-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--ink);
}

.trend-toolbar select {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
}

.trend-card {
    padding: 20px;
    min-width: 0;
}

.trend-stack {
    min-width: 0;
}

.trend-zoom-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: -4px 0 12px;
}

.trend-zoom-tools button {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}

.trend-zoom-tools button:hover {
    border-color: var(--red);
    color: var(--red);
}

.trend-zoom-tools strong {
    min-width: 48px;
    color: var(--red);
    text-align: center;
    font-size: 13px;
}

.bar-line {
    display: grid;
    grid-template-columns: 56px 1fr 42px;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
}

.bar-line div {
    height: 12px;
    border-radius: 999px;
}

.trend-canvas {
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.trend-canvas-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
}

.trend-canvas-scroll.dragging {
    cursor: grabbing;
}

.trend-canvas-scroll .trend-canvas {
    display: block;
    max-width: none;
    pointer-events: none;
}

.heat-item {
    min-height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    font-weight: 800;
}

.heat-item small {
    display: block;
    font-size: 11px;
    opacity: .92;
}

.trend-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 10px;
}

.trend-stat-grid.zodiac {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
}

.trend-stat {
    position: relative;
    overflow: hidden;
    min-height: 54px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.trend-stat strong,
.trend-stat span {
    position: relative;
    z-index: 1;
    display: block;
}

.trend-stat strong {
    color: var(--ink);
    font-size: 13px;
}

.trend-stat span {
    margin-top: 4px;
    color: var(--red);
    font-size: 18px;
    font-weight: 900;
}

.trend-stat i {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    background: var(--red);
}

.picker-empty {
    grid-column: 1 / -1;
}

.empty-state {
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.info-list {
    padding: 22px;
    display: grid;
    gap: 12px;
    align-content: start;
}

.info-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: center;
}

.info-hero__grid p {
    max-width: 680px;
}

.info-layout,
.info-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.info-list-panel {
    display: grid;
    gap: 20px;
}

.info-side-stack {
    position: sticky;
    top: 82px;
    display: grid;
    gap: 16px;
}

.info-article-card,
.info-detail-card,
.info-side-panel,
.info-side-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.info-article-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.info-article-card:hover {
    transform: translateY(-2px);
    border-color: #fecaca;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.info-article-card__media {
    display: block;
    min-height: 126px;
    background: #fff7ed;
}

.info-article-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-article-card__body {
    padding: 16px 18px;
}

.info-article-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.info-article-card__meta em {
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-style: normal;
}

.info-article-card h2 {
    margin: 8px 0 8px;
    font-size: 21px;
    line-height: 1.35;
}

.info-article-card h2 a,
.info-read-more,
.info-side-panel a {
    color: var(--red);
    font-weight: 800;
}

.info-article-card p,
.info-side-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.info-read-more {
    display: inline-block;
    margin-top: 12px;
}

.info-list-panel nav[aria-label="page navigation"] {
    margin: 8px 0 0 !important;
}

.info-list-panel .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.info-list-panel .pagination a,
.info-list-panel .pagination .page-num {
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}

.info-list-panel .pagination a:hover {
    border-color: var(--red);
    color: var(--red);
    background: #fff7f7;
}

.info-list-panel .pagination .page-num-current {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
    box-shadow: 0 10px 22px rgba(225, 29, 43, .2);
}

.info-list-panel .pagination a[href="javascript:;"] {
    color: #b8c0cc;
    background: #f8fafc;
    border-color: #edf0f4;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.info-side-panel {
    padding: 18px;
}

.info-ad-list {
    display: grid;
    gap: 12px;
}

.info-side-ad {
    position: relative;
    overflow: hidden;
}

.info-side-ad > a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.info-side-ad > a[href=""] {
    pointer-events: none;
}

.info-side-ad > a > img {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 2;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.info-side-ad.live-ad-carousel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.info-side-ad .live-ad-track {
    aspect-ratio: 5 / 2;
    min-height: 120px;
}

.info-side-ad .live-ad-slide span {
    display: none;
}

.ad-corner {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 4;
    min-width: 30px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.info-side-panel img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 14px;
}

.info-side-panel .info-side-ad > a > img {
    display: block;
    aspect-ratio: 5 / 2;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.info-side-panel strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 18px;
}

.info-side-panel > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-top: 14px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(225, 29, 43, .22);
}

.info-side-panel > a:hover {
    color: #fff;
    background: #c91828;
    text-decoration: none;
}

.info-detail-card {
    padding: 24px;
}

.info-detail-cover {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 22px;
}

.info-detail-content {
    color: #344054;
    line-height: 1.9;
}

.info-detail-content h2,
.info-detail-content h3 {
    margin-top: 24px;
    color: var(--ink);
}

.info-detail-nav {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.message-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px);
    gap: 22px;
    align-items: start;
    justify-content: center;
}

.message-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.message-form-card {
    padding: 24px;
}

.message-card-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.message-card-head i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 8px;
    background: #fff1f2;
    color: var(--red);
    font-size: 20px;
}

.message-card-head h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.message-card-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

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

.message-form label {
    display: grid;
    gap: 8px;
    margin: 0;
    color: var(--ink);
    font-weight: 800;
}

.message-form input,
.message-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    outline: none;
}

.message-form input {
    height: 44px;
    padding: 0 13px;
}

.message-form textarea {
    min-height: 150px;
    padding: 12px 13px;
    resize: vertical;
}

.message-form input:focus,
.message-form textarea:focus {
    border-color: #fecaca;
    box-shadow: 0 0 0 3px rgba(225, 29, 43, .08);
}

.message-form-full,
.message-code-row,
.message-form button {
    grid-column: 1 / -1;
}

.message-code-row {
    grid-template-columns: 92px minmax(0, 180px) auto;
    align-items: center;
}

.message-code-row span {
    grid-column: 1;
}

.message-code-row input {
    grid-column: 2;
}

.message-code-row img {
    grid-column: 3;
    height: 42px;
    width: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.message-form button {
    width: 150px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(225, 29, 43, .2);
}

.notice-card {
    padding: 24px;
}

.mt-24 {
    margin-top: 24px;
}

.site-footer {
    margin-top: 24px;
    background: #101828;
    color: #d0d5dd;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 24px;
    padding: 34px 0;
}

.site-footer strong {
    color: #fff;
}

.site-footer p {
    margin: 8px 0 0;
    color: #b9c0cc;
}

.footer-bottom {
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    text-align: center;
    color: #98a2b3;
    font-size: 13px;
}

.back-to-top {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(22px, env(safe-area-inset-bottom));
    z-index: 80;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .2s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #b8242f;
}

.back-to-top i {
    font-size: 24px;
    line-height: 1;
}

@media (max-width: 920px) {
    .hero-grid,
    .page-grid-main,
    .picker-layout,
    .trend-grid,
    .trend-tail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .site-header__inner {
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        display: none;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .site-nav.open {
        display: grid;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .info-hero__grid,
    .info-layout,
    .info-detail-layout,
    .message-layout {
        grid-template-columns: 1fr;
    }

    .info-side-stack {
        position: static;
        display: grid;
        gap: 16px;
    }

    .info-layout .info-side-stack {
        order: -1;
    }

    .info-side-ad > a > img,
    .info-side-panel .info-side-ad > a > img,
    .info-side-ad .live-ad-track {
        aspect-ratio: 16 / 7;
    }

    .info-side-ad {
        margin: 0;
        padding: 0;
        border-bottom: 0;
    }

    .open-video-layout {
        grid-template-columns: 1fr;
        --open-video-window-height: 360px;
    }

    .video-ad-panel {
        min-height: 160px;
        margin-top: 0;
    }

    .video-ad-carousel {
        height: auto;
    }

    .video-ad-carousel .live-ad-track {
        min-height: 160px;
        aspect-ratio: 16 / 6;
    }

    .filter-bar {
        grid-template-columns: minmax(150px, .85fr) minmax(220px, 1.15fr);
    }

    .filter-bar > .btn-primary-clean {
        justify-self: start;
    }

    .export-actions {
        justify-self: end;
    }

    .history-filter {
        grid-template-columns: 180px minmax(220px, 340px) auto auto;
        justify-content: start;
        overflow-x: auto;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .page-hero {
        padding: 30px 0;
    }

    .page-hero h1,
    .draw-panel h1 {
        font-size: 28px;
    }

    .draw-panel h2,
    .previous-draw-card h2 {
        font-size: 20px;
    }

    .draw-meta {
        gap: 6px;
        font-size: 13px;
    }

    .number-row,
    .live-result-card .number-row,
    .previous-number-row {
        flex-wrap: nowrap;
        gap: 4px;
        margin: 12px 0;
        overflow-x: auto;
        padding: 2px 0 3px;
    }

    .ball,
    .compact-row .ball,
    .previous-number-row .ball {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        font-size: 13px;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72), inset 0 -3px 0 rgba(0, 0, 0, .12);
    }

    .ball.special,
    .mini-ball.special,
    .picked-number.special {
        box-shadow: inset 0 0 0 2px rgba(244, 215, 125, .72), inset 0 -3px 0 rgba(0, 0, 0, .12);
    }

    .draw-summary {
        font-size: 13px;
        line-height: 1.65;
    }

    .live-layout {
        gap: 14px;
    }

    .live-result-card {
        text-align: left;
    }

    .previous-draw-card {
        margin-top: 16px;
        padding-top: 16px;
    }

    .draw-panel,
    .video-panel,
    .trend-card,
    .notice-card,
    .picker-controls,
    .picker-result {
        padding: 16px;
    }

    .live-video.large {
        min-height: 220px;
    }

    .live-video,
    .live-iframe,
    .video-only-panel .live-video.large,
    .video-only-panel .live-iframe {
        min-height: 360px;
    }

    .video-ad-carousel .live-ad-track {
        min-height: 120px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .history-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
        align-items: center;
    }

    .filter-bar label {
        width: 100%;
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .filter-bar > .btn-primary-clean,
    .export-actions {
        width: 100%;
        justify-self: stretch;
    }

    .history-filter > .btn-primary-clean {
        grid-column: 1 / -1;
    }

    .history-filter > .export-actions {
        grid-column: 1 / -1;
    }

    .filter-bar > .btn-primary-clean {
        min-height: 40px;
    }

    .export-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .export-actions .btn-secondary-clean {
        width: 100%;
        padding: 0 8px;
    }

    .info-hero__grid {
        gap: 0;
    }

    .info-list-panel {
        gap: 18px;
    }

    .info-article-card {
        grid-template-columns: 118px minmax(0, 1fr);
        box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
    }

    .info-article-card__media {
        min-height: 104px;
        aspect-ratio: auto;
    }

    .info-article-card__body,
    .info-detail-card {
        padding: 13px 14px;
    }

    .info-article-card h2 {
        margin: 6px 0;
        font-size: 16px;
        line-height: 1.35;
    }

    .info-article-card p,
    .info-side-panel p,
    .info-detail-content {
        font-size: 14px;
        line-height: 1.75;
    }

    .info-article-card p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .info-article-card__meta {
        gap: 5px;
        font-size: 12px;
    }

    .info-read-more {
        margin-top: 8px;
        font-size: 13px;
    }

    .info-side-panel {
        padding: 14px;
    }

    .info-side-panel > img {
        max-height: 150px;
        object-fit: cover;
    }

    .info-list-panel .pagination {
        gap: 6px;
        padding: 10px;
    }

    .info-list-panel .pagination a,
    .info-list-panel .pagination .page-num {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
    }

    .info-article-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .info-article-card__media {
        min-height: 92px;
    }

    .info-article-card__body {
        padding: 11px 12px;
    }

    .message-form-card {
        padding: 16px;
    }

    .message-form {
        grid-template-columns: 1fr;
    }

    .message-code-row {
        grid-template-columns: 1fr;
    }

    .message-code-row span,
    .message-code-row input,
    .message-code-row img {
        grid-column: 1;
    }

    .message-form button {
        width: 100%;
    }

    .history-table {
        min-width: 620px;
    }

    .history-table th,
    .history-table td {
        padding: 9px 7px;
        font-size: 12px;
    }

    .mini-balls {
        gap: 3px;
    }

    .mini-ball {
        width: 32px;
        height: 32px;
        font-size: 13px;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72), inset 0 -3px 0 rgba(0, 0, 0, .12);
    }

    .zodiac-ball {
        font-size: 13px;
    }

    .picker-layout {
        gap: 12px;
        padding: 22px 0;
    }

    .chip-row {
        gap: 7px;
    }

    .chip-row button {
        min-height: 32px;
        padding: 0 10px;
        font-size: 13px;
    }

    .number-grid {
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
        gap: 7px;
    }

    .number-tile {
        min-height: 58px;
        gap: 5px;
        padding: 7px 4px;
        border-radius: 7px;
    }

    .number-tile small {
        font-size: 11px;
    }

    .number-tile .mini-ball,
    .picked-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72), inset 0 -3px 0 rgba(0, 0, 0, .12);
    }

    .compact-row .ball.special,
    .previous-number-row .ball.special,
    .number-tile .mini-ball.special,
    .picked-number.special {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        font-size: 13px;
        box-shadow: inset 0 0 0 2px rgba(244, 215, 125, .72), inset 0 -3px 0 rgba(0, 0, 0, .12);
    }

    .picked-box {
        min-height: 48px;
        margin-top: 12px;
        padding: 10px;
    }

    .picked-title {
        margin-bottom: 8px;
        font-size: 14px;
    }

    .picked-number-row {
        gap: 5px;
    }

    .back-to-top {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 42px;
        height: 42px;
    }
}
