:root {
    --font-primary: "Nunito", sans-serif;
    --home-accent-base: #e3a900;
    --home-accent-start: #b8860b;
    --home-accent-mid: #facc15;
    --home-accent-end: #d4a017;
    --home-accent-text: #2a1f00;
}

body {
    background: linear-gradient(180deg, #fffdf2 0%, #fff7d6 100%);
    font-family: var(--font-primary);
    font-size: 17px;
}

.bg-gradient {
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    color: var(--home-accent-text);
}

.rounded-table {
    border-collapse: separate;
    border: solid black 1px;
    border-radius: 6px;
    margin: auto;
    width: 100%;
    text-align: center;
    background: #fff;
    overflow: hidden;
}

.rounded-table td,
th {
    border-left: solid black 1px;
    border-top: solid black 1px;
    padding: 8px 6px;
}

.rounded-table td:first-child {
    border-left: none;
    padding: 8px 6px;
}

.rounded-table th {
    border-top: none;
}

.panel-table td {
    padding: 2px 16px;
    font-weight: 700;
}

.table_panel {
    width: 100%;
    min-width: 720px;
    margin: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #d7dde8;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.panel-theme-page .panel-week-column {
    width: 114px;
}

.table_header th {
    background: linear-gradient(90deg, #3140d8 0%, #4d61ff 48%, #4d3bd0 100%);
    color: #fff;
}

.table_panel tbody td {
    background: #f3f5f8;
}

.table_panel th,
.table_panel td {
    border-right: 1px solid #d7dde8;
    border-bottom: 1px solid #d7dde8;
    padding: 4px 3px;
    text-align: center;
    vertical-align: middle;
}

.panel-week-range {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 8px;
    background: transparent;
    color: #111827;
    font-size: 0.78rem;
    line-height: 1.25;
}

.chart-panel-cell,
.chart-jodi-cell {
    background: transparent;
    color: #111827;
}

.chart-panel-cell {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.chart-jodi-cell,
.chart-panel-cell {
    min-height: 80px;
    border-radius: 0;
    background: transparent;
    color: #111827;
}

.panel-triplet {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-weight: 800;
    font-size: 0.82rem;
    line-height: 1;
}

.panel-jodi-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
}

.redword {
    color: #ff2020;
    font-size: 18px;
    font-weight: 900;
}

.whiteword {
    color: #111827;
    font-size: 18px;
    font-weight: 900;
}

/* Public home: compact, phone-first result board */
.home-page {
    width: min(100% - 28px, 600px);
    margin: 0 auto;
    padding: 8px 4px 34px;
    color: #171d27;
    font-family: var(--font-primary);
    text-align: center;
}

.home-hero {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.home-logo {
    width: min(100%, 300px);
    max-height: 280px;
    object-fit: contain;
}

.home-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(100%);
    gap: 5px;
    border-radius: 20px;
    padding: 4px;
}

.home-links a,
.follow-link,
.refresh-link,
.refresh-fab,
.result-actions a,
.fatafat-title a,
.home-footer a {
    color: #201900;
    font-weight: 800;
    text-decoration: none;
}

.home-links a {
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 16px;
}

.home-ticker {
    width: min(100%);
    overflow: hidden;
    border-radius: 18px;
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    padding: 8px 13px;
    box-shadow: 0 7px 14px rgba(98, 69, 0, .19);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.home-ticker p {
    margin: 4px 0;
    border-radius: 24px;
    background: #fff;
    padding: 9px 14px;
    color: #111c30;
    line-height: 1.3;
}

.follow-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 14px;
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    padding: 8px 14px;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(98, 69, 0, .17);
}

.follow-link img {
    width: 16px;
}

.promo-card {
    display: grid;
    justify-items: center;
    margin: 20px auto 12px;
}

.promo-card>img:first-child {
    width: min(100%, 680px);
    border-radius: 15px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 9px 20px rgba(39, 35, 18, .2);
}

.promo-card .play-now {
    width: 95px;
    margin-top: 8px;
}

.home-results {
    margin-top: 17px;
}

.home-results h1,
.fatafat-section h1 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 900;
}

.empty-live {
    margin: 0 auto;
    padding: 11px;
    color: #654d00;
    font-size: 13px;
}

.live-game,
.result-card {
    position: relative;
    border-radius: 25px;
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    padding: 9px 10%;
    box-shadow: 0 7px 13px rgba(102, 74, 0, .2);
}

.live-game-empty {
    display: grid;
    min-height: 95px;
    place-content: center;
    gap: 6px;
}

.live-game-empty h2,
.live-game-empty strong {
    margin: 0;
    line-height: 1;
}

.live-game h2,
.result-card h2 {
    margin: 0;
    font-size: 1.6em;
    font-weight: 800;
}

.live-game strong,
.result-card strong {
    display: block;
    font-size: 25px;
    font-weight: 800;
}

.live-game small,
.result-card small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 700;
}

.refresh-link {
    display: inline-block;
    margin-top: 9px;
    border-radius: 13px;
    background: #dfa900;
    padding: 5px 12px;
    font-size: 12px;
}

.live-results-refresh {
    display: inline-block;
    border-radius: 24px;
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    padding: 8px 24px;
    font-size: 12px;
    box-shadow: 0 3px 7px rgba(65, 47, 0, .23);
    color: #201900;
    font-weight: 800;
    text-decoration: none;
}

.result-list {
    display: grid;
    gap: 8px;
}

.result-actions{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-actions a {
    border-radius: 24px;
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    padding: 8px 24px;
    font-size: 12px;
    box-shadow: 0 3px 7px rgba(65, 47, 0, .23);
}

.result-actions a:first-child {
    left: 9px;
}

.result-actions a:last-child {
    right: 9px;
}

.fatafat-section {
    margin-top: 20px;
}

.fatafat-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 6px 6px 0 0;
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

.fatafat-title a {
    border-radius: 999px;background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    padding: 6px 15px;
}

.fatafat-table-wrap {
    overflow: hidden;
    border: 1px solid #9d8d5b;
    border-radius: 0 0 4px 4px;
    background: #fff;
}

.fatafat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.fatafat-table th {
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
}

.fatafat-table th,
.fatafat-table td {
    border: 1px solid #b4b4b4;
    padding: 5px;
}

.fatafat-table td {
    color: #343434;
}

.auto-guessing {
    margin-top: 25px;
}

.auto-guessing>h1 {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 900;
}

.guessing-game {
    margin: 12px 0;
    border-radius: 28px;
    background-color: var(--home-accent-base);
    background-image: linear-gradient(to right, var(--home-accent-start) 0%, var(--home-accent-mid) 51%, var(--home-accent-end) 100%);
    padding: 13px 14px 14px;
    box-shadow: 0 6px 12px rgba(109, 77, 0, .16);
}

.guessing-game h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 900;
}

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

.guessing-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2px;
    min-height: 89px;
    border-radius: 18px;
    background: linear-gradient(100deg, #e4c86e, #ffe06a);
    padding: 10px 13px;
    color: #181403;
    font-size: 0.8rem;
    font-weight: 600;
}

.guessing-card span:nth-of-type(2),
.guessing-card span:nth-of-type(4) {
    text-align: center;
}

.guessing-card b {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.8rem;
    font-weight: 600;
}

.guessing-card span:nth-of-type(3),
.guessing-card span:nth-of-type(4) {
    grid-row: 3;
}

.home-footer {
    position: relative;
    width: min(100% - 28px, 760px);
    margin: 0 auto;
    padding: 14px 0 20px;
    color: #4d4d4d;
    font: 12px/1.35 var(--font-primary);
    text-align: center;
}

.home-footer p {
    margin: 0 auto 10px;
    max-width: 650px;
}

.home-footer a {
    display: inline-block;
    border-radius: 12px;
    background: #e1ae00;
    padding: 5px 10px;
    font-size: 12px;
}

.refresh-fab {
    position: fixed;
    z-index: 20;
    right: 20px;
    bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    background: #e1ae00;
    padding: 12px 16px;
    box-shadow: 0 7px 16px rgba(65, 47, 0, .28);
    font-size: 13px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.refresh-fab:hover,
.refresh-fab:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(65, 47, 0, .35);
    outline: none;
}

.refresh-fab[aria-busy="true"] {
    pointer-events: none;
    opacity: .72;
}

.live-marker {
    display: inline-block;
    border-radius: 2px;
    background: #c92727;
    padding: 2px 6px;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    vertical-align: middle;
}

.pending-tag {
    display: inline-block;
    margin-top: 4px;
    border-radius: 2px;
    background: #da8f04;
    padding: 2px 6px;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
}

@media (min-width: 700px) {
    .home-page {
        width: min(100% - 48px, 800px);
    }

    .result-list {
        grid-template-columns: 1fr 1fr;
    }

    .home-logo {
        width: 330px;
    }

    .home-results h1,
    .fatafat-section h1 {
        font-size: 21px;
    }
}

@media (max-width: 640px) {
    .home-logo{
        max-width: 200px;
    }
    .home-ticker p{
        font-size: 14px;
    }
    .result-card {
        padding: 16px;
    }
    .live-game h2, .result-card h2{
        font-size: 22px;
        line-height: 25px;
        margin-bottom: 4px;
    }

    .live-game strong, .result-card strong{
        font-size: 22px;
        line-height: 25px;
        margin-bottom: 0.6em;
    }
    .guessing-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
    }

    .guessing-card {
        min-height: 68px;
        gap: 3px;
        padding: 6px 4px;
        font-size: clamp(9px, 2.8vw, 12px);
    }

    .guessing-card b {
        font-size: clamp(11px, 3.2vw, 14px);
    }

    .guessing-game {
        border-radius: 16px;
        padding: 10px 6px;
    }

    .guessing-game h2 {
        font-size: 16px;
    }
    
    .guessing-card {        
        border-radius: 10px;
    }
}

.login-page {
    display: grid;
    min-height: calc(100vh - 57px);
    place-items: center;
    padding: 40px 20px;
}

.login-shell {
    width: min(100%, 430px);
    overflow: hidden;
    border: 1px solid rgba(184, 134, 11, .2);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(82, 58, 6, .16);
}

.login-brand {
    padding: 30px 34px 24px;
    text-align: center;
    background: linear-gradient(135deg, #fff9e7, #ffe49b);
}

.login-brand img {
    width: 110px;
    margin: 0 auto 14px;
}

.login-brand p {
    margin: 0 0 4px;
    color: #986d00;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-brand h1 {
    margin: 0;
    color: #2a1f00;
    font-size: 1.75rem;
    font-weight: 800;
}

.login-brand span {
    display: block;
    margin-top: 7px;
    color: #6b5a25;
    font-size: .92rem;
}

.admin-form {
    display: grid;
    gap: 19px;
    padding: 30px 34px 34px;
}

.admin-form label {
    display: grid;
    gap: 7px;
    color: #3e351c;
    font-size: .88rem;
    font-weight: 700;
}

.admin-form input {
    width: 100%;
    border: 1px solid #ded5b9;
    border-radius: 9px;
    background: #fffdf8;
    padding: 12px 13px;
    color: #251d08;
    font: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.admin-form input:focus {
    border-color: #c59100;
    box-shadow: 0 0 0 3px rgba(227, 169, 0, .2);
}

.admin-form button {
    border: 0;
    border-radius: 9px;
    padding: 13px 16px;
    background: linear-gradient(90deg, #b8860b, #f0bd19);
    color: #241b00;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: transform .15s, box-shadow .15s;
}

.admin-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(184, 134, 11, .25);
}

.admin-alert {
    border-radius: 8px;
    padding: 11px 12px;
    font-size: .88rem;
}

.admin-alert.error {
    border: 1px solid #f5b7b1;
    background: #fff1f0;
    color: #a52620;
}

@media (max-width: 430px) {
    .login-page {
        padding: 24px 14px;
    }

    .login-brand,
    .admin-form {
        padding-left: 24px;
        padding-right: 24px;
    }
}

.admin-page {
    min-height: 100vh;
    padding: 27px 20px;
    background: #edf2f8;
    color: #17263d;
    font-family: var(--font-primary);
}

.admin-dashboard {
    width: min(100%, 768px);
    margin: 0 auto;
    padding: 20px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(31, 48, 74, .13);
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.admin-header h1,
.dashboard-section h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
}

.admin-header p {
    margin: 5px 0 0;
    color: #62738b;
    font-size: 12px;
}

.logout-button {
    border: 0;
    border-radius: 5px;
    background: #121b2c;
    color: #fff;
    padding: 8px 14px;
    font-weight: 800;
    cursor: pointer;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 15px 0 17px;
}

.admin-tabs a {
    border: 1px solid #e0e7f0;
    border-radius: 20px;
    background: #f8fafc;
    color: #17263d;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 17px;
}

.dashboard-meta div {
    display: grid;
    gap: 4px;
    border: 1px solid #dde5ef;
    border-radius: 6px;
    padding: 11px;
    background: #f8fafc;
}

.dashboard-meta span,
.help-text {
    color: #65758d;
    font-size: 12px;
}

.dashboard-meta strong {
    font-size: 12px;
}

.dashboard-section {
    display: grid;
    gap: 11px;
    border-top: 1px solid #e5eaf0;
    padding: 17px 0;
}

.results-section {
    border-top: 0;
    padding-top: 0;
}

.dashboard-section label {
    display: grid;
    gap: 5px;
    color: #33445e;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-section input,
.dashboard-section textarea,
.dashboard-section select {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #d8e0ea;
    border-radius: 5px;
    padding: 8px;
    color: #142037;
    background: #fff;
    font: 700 12px var(--font-primary);
}

.dashboard-section textarea {
    resize: vertical;
}

.date-open-row {
    display: grid;
    grid-template-columns: 1fr 100px;
    align-items: end;
    gap: 12px;
}

.result-fields {
    display: grid;
    grid-template-columns: 183px 1fr;
    gap: 12px;
}

.check-row {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 13px !important;
}

.check-row input,
.admin-result-table input[type="checkbox"] {
    width: auto;
    margin: 0 4px 0 0;
    accent-color: #1685f0;
}

.action-button,
.reset-button {
    border: 0;
    border-radius: 5px;
    min-height: 37px;
    width: 100%;
    color: #fff;
    background: #e82627;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.save-tez-chart-button {
    width: 100%;
    min-height: 45px;
    border: 0;
    border-radius: 6px;
    background: #e5262a;
    color: #fff;
    box-shadow: 0 3px 0 #b91c21, 0 8px 16px rgba(229, 38, 42, .16);
    cursor: pointer;
    font: 800 14px var(--font-primary);
    letter-spacing: .01em;
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.save-tez-chart-button:hover {
    background: #cf1d21;
    box-shadow: 0 3px 0 #9d171b, 0 10px 20px rgba(229, 38, 42, .23);
    transform: translateY(-1px);
}

.save-tez-chart-button:focus-visible {
    outline: 3px solid rgba(229, 38, 42, .28);
    outline-offset: 3px;
}

.save-tez-chart-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #9d171b;
}

.action-button-small {
    min-height: 36px;
}

.reset-button {
    background: #ee8588;
}

.result-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0e7f0;
    border-radius: 6px;
}

.admin-result-table {
    width: 100%;
    /* min-width: 620px; */
    border-collapse: collapse;
    font-size: 12px;
}

.admin-result-table th,
.admin-result-table td {
    border-bottom: 1px solid #e0e7f0;
    padding: 8px;
    text-align: left;
}

.admin-result-table thead th {
    padding: 9px 8px;
    background: #ffe068;
    color: #17263d;
    font-size: 12px;
    text-transform: uppercase;
}

.admin-result-table tbody tr:last-child th,
.admin-result-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-result-table input {
    padding: 6px 8px;
}

.admin-result-table td:last-child label {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.help-text {
    margin: -3px 0 4px;
    line-height: 1.25;
    margin-top: 6px;
}

.admin-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.admin-bottom-links a {
    color: #0057ca;
    font-size: 13px;
    font-weight: 800;
}

.saved-dates-section {
    padding-bottom: 8px;
}

/* Admin workspace: shared controls, data tables, and editor layouts. */
.admin-page *,
.admin-page *::before,
.admin-page *::after {
    box-sizing: border-box;
}

.admin-dashboard.admin-wide {
    width: min(100%, 1040px);
}

.admin-header h1 {
    letter-spacing: -.02em;
}

.admin-tabs a {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.admin-tabs a:hover {
    border-color: #bfcce0;
    background: #f1f5f9;
}

.admin-tabs a.active {
    border-color: #e82627;
    background: #e82627;
    color: #fff;
}

.dashboard-section h2 {
    font-size: 19px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dark-button,
.table-actions a,
.link-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 7px 11px;
    font: 800 12px var(--font-primary);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.dark-button {
    border-radius: 5px;
    background: #121b2c;
    color: #fff;
    padding: 10px 15px;
}

.dark-button:hover,
.logout-button:hover {
    background: #25324a;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.table-actions form {
    display: inline;
    margin: 0;
}

.table-actions a {
    background: #e8ebff;
    color: #3147aa;
}

.link-danger {
    background: #fee7e7;
    color: #ca2929;
}

.admin-result-table tbody th {
    font-weight: 800;
}

.admin-result-table tbody tr {
    transition: background-color .15s ease;
}

.admin-result-table tbody tr:hover {
    background: #f8fafc;
}

.admin-result-table td:last-child {
    white-space: nowrap;
}

.dashboard-section input:focus,
.dashboard-section textarea:focus,
.dashboard-section select:focus,
.admin-feature-form input:focus,
.admin-feature-form textarea:focus {
    outline: 0;
    border-color: #5a76d7;
    box-shadow: 0 0 0 3px rgba(73, 94, 210, .12);
}

.two-fields,
.three-fields {
    display: grid;
    gap: 14px;
}

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

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

.game-form fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    padding: 13px;
}

.game-form legend {
    padding: 0 6px;
    color: #33445e;
    font-size: 12px;
    font-weight: 800;
}

.game-form .choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #dbe3ee;
    border-radius: 9px;
    padding: 9px 12px;
    background: #f8fafc;
}

.game-form .choice input {
    width: auto;
    margin: 0;
}

.result-editor,
.week-editor {
    display: grid;
    gap: 13px;
}

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

.admin-feature>.dashboard-meta {
    margin-top: 17px;
}

.admin-feature-form>p {
    margin: -3px 0 3px;
    color: #62738b;
    font-size: 13px;
    line-height: 1.5;
}

.admin-feature-form button {
    width: 100%;
}

.admin-flash {
    border: 1px solid transparent;
}

.admin-flash.success {
    border-color: #a7e6bc;
}

.admin-flash.error {
    border-color: #f5b7b1;
}

@media (max-width: 600px) {
    .admin-page {
        padding: 12px;
    }

    .admin-dashboard {
        padding: 16px;
    }

    .dashboard-meta,
    .result-fields {
        grid-template-columns: 1fr;
    }

    .date-open-row {
        grid-template-columns: 1fr;
    }

    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .two-fields,
    .three-fields,
    .week-grid {
        grid-template-columns: 1fr;
    }

    .dark-button {
        width: 100%;
    }
}

/* Public support and chart pages */
.public-page,
.chart-page {
    width: min(100% - 32px, 965px);
    margin: 0 auto;
    padding: 12px 0 54px;
    color: #172238;
    font-family: var(--font-primary);
}

.public-logo {
    display: block;
    width: min(100%, 365px);
    max-height: 212px;
    margin: 0 auto 30px;
    object-fit: contain;
}

.contact-page {
    width: min(100% - 32px, 830px);
}

.contact-topline {
    display: grid;
    grid-template-columns: 190px 1fr;
    align-items: center;
    gap: 10px;
    margin: 8px 0 28px;
    border: 16px solid #d29b00;
    border-radius: 31px;
    background: #fff;
    padding: 11px 30px;
    color: #142037;
    text-align: center;
    font-size: 17px;
}

.contact-topline span {
    font-weight: 700;
}

.contact-banner {
    border-radius: 28px;
    background: linear-gradient(105deg, #c28b00, #ffd019);
    padding: 20px;
    text-align: center;
    box-shadow: 0 12px 25px rgba(132, 98, 7, .23);
}

.contact-banner h1,
.contact-card h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
}

.contact-banner p {
    margin: 8px 0 0;
    color: #fff7cf;
    font-weight: 800;
    font-size: 18px;
}

.contact-card {
    margin-top: 22px;
    border-radius: 28px;
    background: #fff;
    padding: 24px 22px;
    box-shadow: 0 14px 24px rgba(33, 37, 43, .17);
}

.contact-card p {
    margin: 0 0 16px;
    font-size: 17px;
    line-height: 1.65;
}

.contact-card h2 {
    text-align: center;
    margin-bottom: 17px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.contact-grid article {
    min-height: 154px;
    box-sizing: border-box;
    border: 1px solid #ffc781;
    border-radius: 21px;
    padding: 18px;
    background: #fffdfa;
}

.contact-grid h3 {
    margin: 0 0 10px;
    color: #a5400b;
    font-size: 18px;
}

.contact-grid p {
    margin-bottom: 9px;
}

.contact-grid strong,
.contact-grid a {
    color: #172238;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.help-card ul {
    margin: 0;
    padding-left: 24px;
    font-size: 17px;
    line-height: 2.25;
}

.contact-thanks {
    margin-bottom: 0;
    text-align: center;
    font-size: 17px;
}

.chart-page {
    text-align: center;
}

.chart-page h1 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 900;
    line-height: 1.1;
}

.chart-time {
    margin: 10px 0 24px;
    color: #485a72;
    font-size: 20px;
    font-weight: 800;
}

.chart-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 13px;
    margin-bottom: 12px;
}

.chart-actions a {
    border-radius: 15px;
    background: #ffd01a;
    padding: 14px 21px;
    color: #241e09;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 9px 17px rgba(180, 136, 11, .14);
}

.chart-scroll {
    overflow-x: auto;
    text-align: left;
}

.public-chart {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #f0f2f6;
}

.public-chart th,
.public-chart td {
    border: 1px solid #d0d7e4;
    text-align: center;
}

.public-chart thead th {
    padding: 8px;
    background: linear-gradient(90deg, #3d40da, #534cd9);
    color: #fff;
    font-size: 17px;
}

.public-chart tbody td {
    height: 109px;
}

.public-chart .week-range {
    width: 138px;
    background: #f0f2f6;
    color: #07172e;
    font-size: 16px;
}

.week-range span,
.week-range small {
    display: block;
}

.week-range small {
    margin: 7px;
    font-size: 14px;
}

.jodi-cell {
    display: grid;
    min-height: 109px;
    place-items: center;
    color: #07172e;
    font-size: 25px;
    font-weight: 900;
}

.red-jodi {
    color: #f52222 !important;
}

.panel-cell {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 7px;
    min-height: 109px;
    color: #07172e;
}

.panel-cell b {
    font-size: 25px;
}

.triplet {
    white-space: pre-line;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.15;
}

@media (max-width: 640px) {
    .chart-actions a{
        font-size: 14px;
        padding: 12px 16px;
    }
    .contact-topline {
        grid-template-columns: 1fr;
        border-width: 9px;
        padding: 10px 18px;
        font-size: 15px;
    }

    .contact-banner h1,
    .contact-card h2 {
        font-size: 25px;
    }

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

    .contact-card {
        border-radius: 21px;
        padding: 20px;
    }

    .contact-card p,
    .contact-grid strong,
    .contact-grid a,
    .help-card ul {
        font-size: 15px;
    }

    .public-logo {
        margin-bottom: 18px;
    }

    .chart-page {
        width: min(100% - 20px, 965px);
    }

    .chart-page h1 {
        font-size: 1.6rem;
    }

    .chart-time {
        font-size: 16px;
    }

    /* Keep the full seven-column chart visible on a phone. */
    .chart-scroll {
        overflow-x: hidden;
    }

    .public-chart {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .public-chart th,
    .public-chart td {
        padding: 3px 1px;
    }

    .public-chart thead th {
        padding: 5px 1px;
        font-size: 9px;
    }

    .public-chart .week-range {
        width: 22%;
        padding: 3px 1px;
        font-size: 8px;
        line-height: 1.05;
        font-weight: 800;
    }

    .week-range small {
        margin: 3px 0;
        font-size: 7px;
    }

    .public-chart tbody td {
        height: 64px;
    }

    .jodi-cell,
    .panel-cell {
        min-height: 58px;
    }

    .jodi-cell,
    .panel-cell b {
        font-size: 12px;
    }

    .panel-cell {
        gap: 2px;
    }

    .triplet {
        font-size: 9px;
        line-height: 1.05;
    }
}

/* Tez Bombay Patti chart list */
.patti-page {
    min-height: calc(100vh - 82px);
    background: #f3f5f7;
    color: #121212;
    font-family: var(--font-primary);
}

.patti-header {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 5px 18px 14px;
    background: #ffe16d;
    box-shadow: 0 3px 7px rgba(0, 0, 0, .18);
}

.patti-brand img {
    display: block;
    width: 110px;
    height: 60px;
    object-fit: contain;
}

.patti-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.patti-header nav a {
    color: #080808;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.patti-header nav .active {
    border-radius: 20px;
    background: #ee2428;
    color: #fff;
    padding: 8px 18px;
    margin: -8px 0;
}

.patti-live {
    display: flex;
    align-items: center;
    min-height: 31px;
    border-top: 1px solid #ef6063;
    background: #e92427;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
}

.patti-live-label {
    flex: 0 0 auto;
    padding: 5px 12px;
}

.patti-live-label span {
    font-size: 12px;
    vertical-align: 1px;
}

.patti-ticker {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.patti-ticker marquee {
    display: block;
    width: 100%;
    padding: 5px 0;
}

.patti-content {
    width: min(100% - 48px, 1120px);
    box-sizing: border-box;
    margin: 24px auto;
    border-radius: 10px;
    background: #fff;
    padding: 42px 25px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .13);
}

.patti-content h1 {
    margin: 0 0 20px;
    color: #101010;
    font-size: clamp(18px, 2.1vw, 32px);
    font-weight: 900;
    text-transform: uppercase;
}

.patti-content>p {
    margin: 0 0 26px;
    color: #263448;
    font-size: 19px;
}

.patti-table-wrap {
    overflow-x: auto;
    border: 3px solid #ef2025;
}

.patti-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #f8f8f8;
}

.patti-table th,
.patti-table td {
    border: 1px solid #ef2025;
    padding: 7px 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
}

.patti-table th {
    border-color: #ef2025;
    background: #050505;
    color: #fff;
    font-size: 19px;
}

.patti-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    background: #303030;
    padding: 22px;
}

.patti-footer a {
    color: #fff;
    font: 16px var(--font-primary);
    text-decoration: none;
}

.maintenance-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: linear-gradient(180deg, #fffdf2, #fff4c8);
    font-family: var(--font-primary);
    text-align: center;
}

.maintenance-card {
    width: min(100%, 460px);
    border-radius: 24px;
    background: #fff;
    padding: 34px 28px;
    box-shadow: 0 16px 36px rgba(91, 67, 0, .18);
    color: #172238;
}

.maintenance-card img {
    width: 150px;
    max-height: 110px;
    margin: 0 auto 14px;
    object-fit: contain;
}

.maintenance-code {
    margin: 0;
    color: #d21e26;
    font-size: 66px;
    font-weight: 900;
    line-height: 1;
}

.maintenance-card h1 {
    margin: 10px 0;
    font-size: 27px;
}

.maintenance-card p:last-child {
    margin: 0;
    color: #5e6571;
}

@media (max-width: 620px) {
    .patti-header nav {
        gap: 17px;
    }

    .patti-header nav a {
        font-size: 13px;
    }

    .patti-content {
        width: min(100% - 20px, 1120px);
        margin: 10px auto;
        padding: 24px 12px 12px;
    }

    .patti-content>p {
        font-size: 16px;
        line-height: 1.45;
    }

    .patti-footer {
        gap: 14px;
        padding: 18px 12px;
    }

    .patti-footer a {
        font-size: 14px;
    }

    .patti-live {
        font-size: 13px;
    }

    .patti-live-label {
        padding: 7px 9px;
    }
}
