:root{ --bg:#f7f7fb; --card:#ffffff; --accent:#2b6cb0; --muted:#6b7280; } *{box-sizing:border-box} html,body{height:100%} .app-wrap{width:100%;max-width:420px} body{ margin:0; font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; background:var(--bg); color:#111; display:flex; align-items:center; justify-content:center; padding:16px; } .screen{width:100%;background:var(--card);border-radius:16px;box-shadow:0 6px 22px rgba(16,24,40,0.08);position:relative;overflow:auto;-webkit-overflow-scrolling:touch} .screen.hidden{display:none} .hidden{display:none} .app-title{margin:20px;text-align:center;font-size:20px} .panel{padding:12px 18px;border-top:1px solid #f0f0f3} .ops{display:flex;gap:8px;flex-wrap:wrap} .op-btn{flex:1 1 48%;padding:12px;border-radius:10px;border:1px solid #e6e9ef;background:white;font-size:16px} .op-btn.active{background:var(--accent);color:white;border-color:var(--accent)} .op-btn.disabled{opacity:0.45} .modes{display:flex;gap:12px;padding-top:8px} .mode-btn{flex:1;padding:12px;border-radius:10px;border:1px solid #e6e9ef;background:white;font-size:16px} .mode-btn.active{background:#111;color:white} .hint{padding:12px 18px;color:var(--muted);font-size:14px} .settings{display:flex;flex-direction:column;gap:8px} .settings label{display:flex;justify-content:space-between;align-items:center;gap:12px} .settings input{width:120px;padding:8px;border-radius:8px;border:1px solid #e6e9ef} .settings-actions{display:flex;gap:8px;margin-top:6px} .settings.collapsed{display:none} .collapsed{display:none} .small{font-size:13px;padding:6px 8px;border-radius:8px;border:1px solid #e6e9ef;background:white} .progress-outer{height:12px;background:#eef3fb;border-radius:8px;overflow:hidden;margin:8px 14px} .progress-inner{height:100%;background:var(--accent);width:0%} .play-header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #f0f0f3} .play-header .small{background:transparent;border:0;color:var(--accent);font-weight:600} .problem-area{padding:18px;text-align:center} .problem{font-size:44px;font-weight:700;margin:6px 0} .problem.big{font-size:64px} .timer{font-size:18px;color:var(--muted);margin-bottom:8px} .answer-area{padding:8px 14px 20px} .answer{min-height:56px;font-size:30px;text-align:center;padding:8px;border-radius:8px;background:#f6f7fb;margin-bottom:10px} .feedback{height:22px;color:var(--muted)} .keypad{display:grid;gap:10px} .row{display:flex;gap:8px} .key{flex:1;padding:16px;border-radius:12px;border:1px solid #e6e9ef;background:white;font-size:22px} .key.large{padding:18px;font-size:24px} .key.special{background:#fff7ed} .submit-btn{flex:1;padding:16px;border-radius:12px;background:var(--accent);color:white;font-weight:700;font-size:18px;border:0} .score{font-weight:700} .history-list{display:flex;flex-direction:column;gap:8px} .history-item{padding:10px;border-radius:8px;background:#f6f7fb;border:1px solid #e9eef6} .history-meta{font-size:12px;color:var(--muted)} .summary{padding:18px;text-align:center} .summary h2{margin:6px 0} .summary p{font-size:18px} @media (orientation:portrait){ .screen{max-height:94vh} } /* Mobile-specific: ensure the app fills viewport and screens scroll vertically */ @media (max-width:480px){ body{padding:0} .app-wrap{max-width:100%;height:100vh} .screen{height:100vh;max-height:none;border-radius:0;overflow:auto;-webkit-overflow-scrolling:touch} }