:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Noto Serif', 'Noto Serif Devanagari', 'Noto Sans Gujarati';
    background: radial-gradient(1200px 700px at 85% -10%, #f1f5f9 0%, #f8fafc 60%),
        radial-gradient(900px 600px at -10% 20%, #eef2ff 0%, #f8fafc 60%);
    color: var(--text);
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

.layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.main {
    display: grid;
    gap: 16px;
}

.sidebar {
    display: grid;
    gap: 16px;
}

@media (min-width: 1024px) {
    .container {
        max-width: 1100px;
    }

    .layout {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

h1 {
    margin: 0 0 8px;
}

.hero {
    text-align: center;
    padding: 24px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    position: relative;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    gap: 1px;
    justify-items: center;
}

.hero-icon {
    font-size: 36px;
    color: #f59e0b;
}

.mantra {
    font-size: 18px;
    line-height: 1.7;
}

.devanagari {
    font-family: 'Noto Serif Devanagari', 'Noto Serif', serif;
}

.divider {
    height: 1px;
    width: 120px;
    background: var(--border);
    margin-top: 8px;
}

.hero-diya {
    width: 160px;
    height: auto;
    opacity: 0.9;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -80px -40px auto auto;
    width: 520px;
    height: 520px;
    background: url('./assets/mandala.svg') no-repeat center/contain;
    opacity: 0.5;
    transform: rotate(8deg);
    pointer-events: none;
}

.muted {
    color: var(--muted);
    margin: 0 0 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.merged-progress {
    margin-top: 12px;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
    margin: 8px 0 12px;
}

.progress {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #f59e0b);
    transition: width 500ms ease;
}

blockquote {
    margin: 8px 0 12px;
    padding: 10px 12px;
    background: #f1f5f9;
    border-left: 4px solid #94a3b8;
    border-radius: 6px;
}

.card ul {
    margin: 8px 0 12px;
    padding-left: 18px;
}

.card li {
    margin-bottom: 6px;
}

/* Ads */
.ad-card {
    padding: 8px 16px;
}

.ad-slot {
    width: 100%;
    min-height: 60px;
    display: block;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 8px;
    position: relative;
}

.ad-label {
    font-size: 12px;
    color: var(--muted);
    position: absolute;
    top: 0;
    left: 8px;
    transform: translateY(-110%);
}

.ad-fallback {
    width: 100%;
}

.ad-fallback-inner {
    font-size: 12px;
    color: var(--muted);
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 6px;
}

input[type="file"] {
    color: var(--text);
}

button {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f1f5f9;
    color: var(--text);
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    background: #e2e8f0;
}

#count-value {
    min-width: 64px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
}

audio {
    width: 100%;
}

/* Hide audio controls; playback is controlled via our custom UI */
audio {
    display: none;
}

.disc {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #fde68a 0%, #f59e0b 30%, #f1f5f9 31%, #e2e8f0 70%, #cbd5e1 100%);
    border: 2px solid var(--border);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3), inset 0 0 0 6px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.1);
    position: relative;
}

.disc::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid #94a3b8;
}

.disc.spin {
    animation: spin 2.5s linear infinite;
    box-shadow: 0 0 24px 6px rgba(245, 158, 11, 0.35), inset 0 0 0 6px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.1);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}