/* NNN Web — neo-brutalist, mobile-first */
:root { --paper: #fbf3e4; --panel: #fff9ef; --ink: #14100b; --accent: #e85d3d; --accent-deep: #c73e1d; --teal: #2aa190; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
#app { max-width: 460px; margin: 0 auto; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.logo { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); color: #fff; font-weight: 900; font-size: 24px; display: grid; place-items: center; flex: none; }
h1 { margin: 0; font-size: 21px; font-weight: 900; letter-spacing: 1px; }
h1 .accent { color: var(--accent); }
.tagline { margin: 1px 0 0; font-size: 12px; color: #6e6353; font-weight: 600; }
.card { background: var(--panel); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); padding: 16px; margin-bottom: 14px; }
.card h2 { margin: 0 0 8px; font-size: 15px; font-weight: 900; }
.desc { color: #6e6353; font-size: 13px; margin: 2px 0 10px; }
input { width: 100%; padding: 12px 13px; border: 2px solid var(--ink); border-radius: 10px; font: inherit; margin-bottom: 10px; background: #fff; }
.btn { display: inline-block; width: 100%; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 11px; background: var(--accent); color: #fff; font: 800 15px system-ui, sans-serif; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); font-family: inherit; }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn:disabled { opacity: 0.55; }
.btn.teal { background: var(--teal); }
.btn.ghost { background: var(--panel); color: var(--ink); }
.btn.small { width: auto; padding: 8px 12px; font-size: 12.5px; }
.err { color: var(--accent-deep); font-size: 13px; font-weight: 700; margin: 6px 0; }
.ok { color: #14503c; font-size: 13px; font-weight: 700; margin: 6px 0; }
.row3 { display: flex; gap: 10px; margin: 12px 0 0; }
.row3 .cell { flex: 1; background: #fff; border: 2px solid var(--ink); border-radius: 11px; padding: 10px 6px; text-align: center; }
.row3 .num { font-size: 22px; font-weight: 900; color: var(--accent-deep); line-height: 1.1; }
.row3 .lbl { font-size: 10.5px; color: #6e6353; font-weight: 700; }
.goal-bar { height: 12px; background: #e8dcc4; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.goal-fill { height: 100%; background: var(--teal); transition: width .3s; }
.goal-lbl { font-size: 12px; font-weight: 700; color: #6e6353; text-align: center; margin-bottom: 10px; }
/* flashcard */
.fc { perspective: 900px; margin: 6px 0 12px; }
.fc-inner { position: relative; width: 100%; min-height: 230px; transition: transform .35s; transform-style: preserve-3d; }
.fc.flip .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 5px 5px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; text-align: center; cursor: pointer; }
.fc-back { transform: rotateY(180deg); background: var(--panel); }
.fc-en { font-size: 30px; font-weight: 900; }
.fc-cefr { font-size: 11px; font-weight: 800; color: #fff; background: var(--teal); border-radius: 999px; padding: 2px 10px; }
.fc-vi { font-size: 20px; font-weight: 800; color: var(--accent-deep); }
.fc-meta { font-size: 12px; color: #6e6353; font-weight: 600; }
.grades { display: flex; gap: 8px; }
.grades .btn { font-size: 13.5px; padding: 11px 4px; }
.grades .again { background: var(--accent); }
.grades .good { background: var(--teal); }
.grades .easy { background: var(--ink); }
.progress { font-size: 12px; font-weight: 800; color: #6e6353; text-align: center; margin-bottom: 8px; }
.chip { display: inline-block; font-size: 11px; font-weight: 800; border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 9px; background: #fff; }
.chip.pro { background: var(--accent); color: #fff; }
.footer { text-align: center; font-size: 11.5px; color: #6e6353; font-weight: 600; margin-top: 8px; }
footer a, .link { color: var(--accent-deep); font-weight: 800; text-decoration: none; }
.mini { font-size: 12px; color: #6e6353; font-weight: 600; }
