* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; background: #fafafa; color: #1f2937; }
#topbar { display: flex; align-items: center; justify-content: space-between; background: #1f2937; color: white; padding: 14px 16px; position: sticky; top: 0; }
#topbar button { background: none; border: none; color: white; font-size: 16px; cursor: pointer; }
#title { font-weight: 600; font-size: 14px; }
main { padding: 16px; max-width: 540px; margin: 0 auto; }

.card-face { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: 18px; min-height: 160px; }
.grade-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.grade-btn { padding: 12px 4px; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.grade-forgot { background: #fee2e2; color: #991b1b; }
.grade-hard   { background: #fef3c7; color: #92400e; }
.grade-good   { background: #d1fae5; color: #065f46; }
.grade-easy   { background: #dbeafe; color: #1e40af; }

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.kpi { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; text-align: center; }
.kpi-num { font-size: 22px; font-weight: 700; }
.kpi-label { font-size: 9px; color: #666; text-transform: uppercase; }

.deck-row { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; cursor: pointer; }
.deck-list { background: white; border: 1px solid #e5e7eb; border-radius: 8px; }

.banner-weak { background: #fef3c7; border: 1px solid #fcd34d; border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; font-size: 11px; color: #92400e; }
.passcode-form { padding: 24px 16px; }
.passcode-form input { width: 100%; padding: 12px; font-size: 16px; border: 1px solid #ddd; border-radius: 6px; }
.passcode-form button { margin-top: 12px; padding: 12px 24px; background: #2563eb; color: white; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; }
.cta { padding: 14px; background: #2563eb; color: white; text-align: center; border-radius: 8px; font-weight: 600; cursor: pointer; }
