:root {
    --maroon: #7a1c1c;
    --maroon-dark: #5c1414;
    --cream: #faf3e6;
    --cream-card: #ffffff;
    --gold: #d98e2b;
    --gold-dark: #b8721a;
    --green: #2f6b3a;
    --text: #2b1b1b;
    --muted: #6b5b52;
}

* { box-sizing: border-box; }

body.theme-body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--cream);
    color: var(--text);
}

.tricolor-border {
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        var(--gold) 0, var(--gold) 14px,
        var(--green) 14px, var(--green) 28px,
        var(--maroon) 28px, var(--maroon) 42px
    );
}

.theme-header {
    background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
    color: #fff;
    padding: 26px 40px;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.theme-header .emblem {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--gold);
}
.theme-header .emblem svg { width: 38px; height: 38px; }

.theme-header .logo-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.theme-header .logo-badge img.emblem-icon {
    height: 62px;
    width: auto;
    display: block;
}

.theme-header .titles h1 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: .3px;
}
.theme-header .titles .hindi {
    margin: 4px 0 0;
    font-size: 15px;
    color: #f0d9c8;
}

.theme-header .notice-pill {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #fff;
    padding: 9px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
}

.theme-wrap {
    max-width: 1000px;
    margin: 36px auto;
    padding: 0 20px 50px;
}

.theme-card {
    background: var(--cream-card);
    border-radius: 14px;
    padding: 34px 38px;
    box-shadow: 0 6px 24px rgba(90, 30, 20, .08);
}

.state-card {
    background: var(--cream-card);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 24px rgba(90, 30, 20, .08);
}

.state-inner {
    background: #fdeceb;
    border: 1px solid #f3c9c5;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
}
.state-inner.upcoming { background: #fff6e0; border-color: #f0d998; }
.state-inner.success { background: #eaf7ec; border-color: #b9e0bf; }

.state-inner .icon {
    width: 64px; height: 64px; margin: 0 auto 20px;
    border-radius: 10px; background: var(--maroon); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.state-inner.upcoming .icon { background: var(--gold-dark); }
.state-inner.success .icon { background: var(--green); }

.state-inner h2 { color: var(--maroon); font-family: Georgia, serif; font-size: 26px; margin: 0 0 12px; }
.state-inner.upcoming h2 { color: var(--gold-dark); }
.state-inner.success h2 { color: var(--green); }
.state-inner p { color: var(--muted); font-size: 15px; }
.state-inner a { color: var(--maroon); font-weight: 700; text-decoration: none; }

.theme-title {
    text-align: center; color: var(--maroon); font-family: Georgia, serif;
    font-weight: 700; font-size: 24px; margin-bottom: 6px;
}
.theme-sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 14px; }

.theme-notice {
    background: #fff6e0; border: 1px solid #f0d998; color: #7a5b00;
    padding: 12px 18px; border-radius: 8px; margin-bottom: 24px; font-weight: 600; font-size: 14px;
}

.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.theme-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px 28px; }
.theme-full { grid-column: 1 / -1; }

.theme-card label, .theme-form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--text); font-size: 14px; }
.theme-card input, .theme-card select, .theme-card textarea,
.theme-form input, .theme-form select, .theme-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #e6d9c8; border-radius: 8px;
    background: #fbf7f0; font-size: 14px; color: var(--text);
}
.theme-card textarea { min-height: 60px; }

.theme-fieldset { border: none; margin: 26px 0 6px; padding: 0; }
.theme-fieldset legend { font-weight: 700; font-size: 16px; color: var(--maroon); margin-bottom: 10px; padding: 0; }

.theme-btn {
    display: inline-block; background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
    color: #fff; border: none; padding: 13px 34px; border-radius: 8px; font-size: 15px;
    cursor: pointer; text-decoration: none; font-weight: 700;
}
.theme-btn:hover { filter: brightness(1.08); }
.theme-btn.gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); }
.theme-btn.outline { background: #fff; color: var(--maroon); border: 2px solid var(--maroon); }

.theme-errors {
    background: #fdeceb; border: 1px solid #f3c9c5; color: #8a1f16;
    padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px;
}
.theme-errors ul { margin: 6px 0 0 18px; }

.theme-card-list { display: flex; flex-direction: column; gap: 14px; }
.theme-fair-card {
    background: var(--cream-card); border-radius: 12px; padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(90,30,20,.07); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.theme-fair-card h3 { margin: 0 0 6px; color: var(--maroon); font-family: Georgia, serif; }
.badge-pill { padding: 4px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.badge-pill.live { background: #dff3e2; color: var(--green); }
.badge-pill.upcoming { background: #fff3cd; color: #8a6300; }
.badge-pill.closed { background: #fdeceb; color: #8a1f16; }

@media (max-width: 700px) {
    .theme-grid, .theme-grid3 { grid-template-columns: 1fr; }
    .theme-header { padding: 20px; }
    .theme-card { padding: 22px 18px; }
}

@media print {
    .no-print { display: none !important; }
    body.theme-body { background: #fff; }
    .theme-wrap { margin: 0; padding: 0; max-width: 100%; }
}