:root {
    --bg-color: #FBF6ED;
    --card-bg: #ffffff;
    --primary-color: #E85D3D;
    --accent-color: #1F8A70;
    --text-color: #23211B;
    --dot-color: #F2A93B;
    --scaffold-container-bg: #F3EADA;
}

body {
    font-family: 'Schibsted Grotesk', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid #23211B;
    box-shadow: 8px 8px 0 #23211B;
    margin: auto;
    width: 90%;
    max-width: 600px;
    text-align: center;
}

h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    letter-spacing: -0.02em;
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

#progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #dfe6e9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.5s ease;
}

.scaffold-container {
    min-height: 150px;
    background-color: var(--scaffold-container-bg);
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    transition: opacity 0.5s ease;
}

/* Visual representations using CSS Grid/Flex */
.group {
    border: 2px dashed #b2bec3;
    padding: 5px;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    background: white;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: var(--dot-color);
    border-radius: 50%;
    display: inline-block;
}

.equation-area {
    font-size: 3rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.number {
    color: var(--primary-color);
}

.operator {
    color: #b2bec3;
}

input[type="number"] {
    width: 100px;
    font-size: 3rem;
    padding: 0.2rem;
    text-align: center;
    border: 3px solid #dfe6e9;
    border-radius: 12px;
    color: var(--text-color);
    font-family: inherit;
    font-weight: bold;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    font-family: inherit;
    font-weight: bold;
    width: 100%;
    margin-bottom: 1rem;
}

.primary-btn:hover {
    background-color: #C9431F;
    transform: translateY(-2px);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background-color: transparent;
    color: #636e72;
    border: 2px solid #b2bec3;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

.feedback {
    margin-bottom: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
    min-height: 1.5em;
}

.feedback.correct {
    color: var(--accent-color);
}

.feedback.incorrect {
    color: #C9431F;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

.dial-bar{position:sticky;top:0;z-index:500;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;box-sizing:border-box;padding:10px 20px;background:#FBF6ED;border-bottom:2px solid #23211B;flex-shrink:0}
.dial-bar .dlg{display:flex;align-items:baseline;gap:8px;text-decoration:none;color:#23211B}
.dial-bar .dlg b{font-family:'Bricolage Grotesque',sans-serif;font-weight:800;font-size:1.35rem;letter-spacing:-.04em;line-height:1}
.dial-bar .dlg b::after{content:"";display:inline-block;width:.4em;height:.4em;border-radius:50%;background:#E85D3D;margin-left:.12em}
.dial-bar .dlg span{font-size:.68rem;color:#5A554A;font-family:'Schibsted Grotesk',sans-serif}
.dial-bar .dbk{text-decoration:none;color:#23211B;font-family:'Schibsted Grotesk',sans-serif;font-weight:700;font-size:.85rem;border:2px solid #23211B;border-radius:999px;padding:6px 14px;white-space:nowrap;transition:background .2s,color .2s}
.dial-bar .dbk:hover{background:#23211B;color:#FBF6ED}
@media(max-width:480px){.dial-bar .dlg span{display:none}}
