:root {
  --paper: #f4eee2;
  --paper2: #fbf8f1;
  --card: #fffdf8;
  --ink: #1f1a14;
  --ink2: #4a4036;
  --muted: #85796a;
  --line: #e2d8c5;
  --line2: #cfc2aa;
  --red: #a8322d;
  --red-soft: #f3dcd6;
  --gold: #b08a3e;
  --green: #2f7a4f;
  --green-soft: #dcefe2;
  --wrong: #b3261e;
  --wrong-soft: #f8dcd9;
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.06), 0 6px 18px rgba(60, 40, 20, 0.06);
  --radius: 14px;
  --sans: "Be Vietnam Pro", system-ui, "Segoe UI", Arial, sans-serif;
  --serif: "Noto Serif", Georgia, serif;
  --kai: "LXGW WenKai TC", "BiauKai", "DFKai-SB", "KaiTi", "STKaiti", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; margin: 0 0 0.5em; }
button { font: inherit; }
.muted { color: var(--muted); }
.center { text-align: center; }
.pad { padding: 1rem; }
.small { font-size: 0.875rem; }

/* ---------- Han glyphs ---------- */
.hz {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: -0.14em;
  font-family: var(--kai);
  color: var(--ink);
  text-align: center;
}
.hz svg { width: 100%; height: 100%; display: block; fill: currentColor; color: var(--ink); }
.hz-fb { color: var(--ink); font-family: var(--kai); }
.hz-click { cursor: pointer; border-radius: 4px; transition: background 0.15s; }
.hz-click:hover { background: var(--red-soft); }
.hz-click.sel { background: #f0d9a8; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  background: rgba(244, 238, 226, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--red);
  color: #fbf3e6;
  font: 26px/1 var(--kai);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--serif); font-size: 1.05rem; }
.brand-text small { font-family: var(--kai); color: var(--muted); letter-spacing: 0.2em; }
.nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--ink2);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:hover { background: var(--card); text-decoration: none; }
.nav a.active { background: var(--ink); color: var(--paper); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line2); border-radius: 8px; padding: 0.3rem 0.6rem; font-size: 1.2rem; }
.user-slot { margin-left: 0.5rem; }
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; outline: none; }
.foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 1.5rem 1rem; border-top: 1px solid var(--line); }
.loading { padding: 4rem; text-align: center; color: var(--muted); }

/* ---------- Buttons / forms ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.06s, background 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; background: #3a3128; }
.btn:active { transform: translateY(1px); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: #8f2a26; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.btn.ghost:hover { background: var(--card); }
.btn.sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; border-radius: 8px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
input, select {
  font: inherit;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}
input:focus, select:focus, .btn:focus-visible, .opt:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
label.field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; font-weight: 500; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.chip {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink2);
}
.chip.ok { background: var(--green-soft); border-color: #b8dcc4; color: var(--green); }
.chip.red { background: var(--red-soft); border-color: #e7beb5; color: var(--red); }
.chip.gold { background: #f5ead2; border-color: #e5d2a6; color: #7c5f22; }

/* ---------- Home ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}
.hero h1 { font-size: 2.2rem; }
.hero p { color: var(--ink2); max-width: 56ch; }
.hero-glyphs { font-size: clamp(64px, 9vw, 120px); display: flex; gap: 0.1em; justify-content: center; }
.hero-glyphs .hz:nth-child(odd) svg { color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 1rem 0 2rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; }
.stat b { display: block; font-size: 1.5rem; font-family: var(--serif); }
.stat span { color: var(--muted); font-size: 0.85rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 0.75rem; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.75rem; }
.lcard {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.1s;
  position: relative;
}
.lcard:hover { border-color: var(--red); text-decoration: none; transform: translateY(-1px); }
.lcard .num { font-family: var(--serif); font-size: 1.25rem; color: var(--red); min-width: 2.2rem; text-align: center; font-weight: 700; }
.lcard .t { display: flex; flex-direction: column; min-width: 0; }
.lcard .t b { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard .t .han { font-size: 22px; letter-spacing: 0.04em; height: 26px; overflow: hidden; }
.lcard .badge { position: absolute; top: 6px; right: 8px; }
.lcard.done { border-color: #b8dcc4; background: linear-gradient(0deg, #f3faf5, var(--card)); }
.filter { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- Lesson ---------- */
.lesson-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.lesson-head .heading { font-size: clamp(36px, 5vw, 56px); line-height: 1.1; letter-spacing: 0.04em; }
.lesson-head .sub { color: var(--ink2); font-size: 1.05rem; }
.lesson-head .sub b { font-family: var(--serif); }
.lesson-nav { display: flex; gap: 0.5rem; }
.lesson-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.study { position: sticky; top: 76px; }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line2); margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: 0.6rem 1rem;
  color: var(--ink2);
  font-weight: 600;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.active { color: var(--red); border-bottom-color: var(--red); }
.tabs .count { font-weight: 500; color: var(--muted); font-size: 0.85em; }

.study-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.sp-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.sp-box { margin: 0; position: relative; aspect-ratio: 1; border: 2px solid var(--red); border-radius: 6px; background: #fffaf0; overflow: hidden; }
.sp-box figcaption {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(168, 50, 45, 0.25) calc(50% - 0.5px), rgba(168, 50, 45, 0.25) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(168, 50, 45, 0.25) calc(50% - 0.5px), rgba(168, 50, 45, 0.25) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(45deg, transparent calc(50% - 0.5px), rgba(168, 50, 45, 0.12) calc(50% - 0.5px), rgba(168, 50, 45, 0.12) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(-45deg, transparent calc(50% - 0.5px), rgba(168, 50, 45, 0.12) calc(50% - 0.5px), rgba(168, 50, 45, 0.12) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.sp-glyph { position: absolute; inset: 6%; display: grid; place-items: center; }
.sp-glyph .glyph-svg { width: 100%; height: 100%; fill: var(--ink); }
.sp-glyph .hz-big, .hz-fallback-big { font: 9rem/1 var(--kai); color: var(--ink); }
.sp-writer { position: absolute; inset: 0; }
.sp-writer svg { display: block; }
.sp-tools { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.75rem 0 0.5rem; }
.sp-info { font-size: 0.92rem; }
.sp-info .reading { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--red); }
.sp-info .words { margin: 0.5rem 0 0; padding: 0; list-style: none; max-height: 220px; overflow: auto; }
.sp-info .words li { padding: 0.3rem 0; border-top: 1px dashed var(--line); display: flex; gap: 0.5rem; align-items: baseline; }
.sp-info .words .hzw { font-size: 22px; white-space: nowrap; }
.toast-inline { background: var(--green-soft); color: var(--green); border-radius: 8px; padding: 0.4rem 0.6rem; margin-bottom: 0.5rem; font-weight: 600; }

.cv-text {
  font-size: clamp(36px, 3.8vw, 52px);
  line-height: 1.75;
  letter-spacing: 0.06em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  word-break: break-all;
}
.cv-text .punct { color: var(--muted); }
.cv-title { font-size: 1.15em; color: var(--red); display: block; margin-bottom: 0.2em; }
.cv-title .hz svg { color: var(--red); }
.reveal { margin-top: 1rem; }
.reveal details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.reveal summary { cursor: pointer; font-weight: 700; font-family: var(--serif); }
.reveal details p { margin: 0.6rem 0 0; white-space: pre-line; }
.reveal .am p { font-style: italic; color: var(--ink2); }

.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.75rem; }
.vcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s;
  position: relative;
}
.vcard:hover { border-color: var(--red); }
.vcard .vh { font-size: 40px; line-height: 1.15; letter-spacing: 0.04em; }
.vcard .va { font-family: var(--serif); font-weight: 700; color: var(--red); margin-top: 0.2rem; }
.vcard .vn { font-size: 0.9rem; color: var(--ink2); }
.vcard .box { position: absolute; top: 8px; right: 8px; }
.grammar-item { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 0.9rem; }
.grammar-item h3 { font-size: 1.05rem; }
.grammar-item .hz { font-size: 1.35em; }
.grammar-item p { margin: 0; white-space: pre-line; }

/* ---------- Flashcards ---------- */
.fc-wrap { max-width: 640px; margin: 0 auto; }
.fc-top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; }
.progress > i { display: block; height: 100%; background: var(--red); transition: width 0.25s; }
.fc {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
}
.fc .big { font-size: clamp(110px, 24vw, 160px); line-height: 1.1; letter-spacing: 0.05em; }
.fc .am { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; color: var(--red); }
.fc .nghia { font-size: 1.15rem; color: var(--ink2); max-width: 40ch; }
.fc .hint { color: var(--muted); font-size: 0.85rem; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 1rem; }
.grades .btn { flex-direction: column; gap: 0; padding: 0.55rem 0.4rem; }
.grades .btn small { font-weight: 400; opacity: 0.75; font-size: 0.72rem; }
.g0 { background: var(--wrong); border-color: var(--wrong); }
.g1 { background: #a26b1f; border-color: #a26b1f; }
.g2 { background: var(--green); border-color: var(--green); }
.g3 { background: #2a5d8f; border-color: #2a5d8f; }

/* ---------- Quiz ---------- */
.quiz-wrap { max-width: 760px; margin: 0 auto; }
.q-prompt { text-align: center; padding: 1.5rem 1rem; }
.q-prompt .qtype { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.q-prompt .big { font-size: clamp(64px, 10vw, 104px); line-height: 1.15; letter-spacing: 0.06em; margin: 0.4rem 0; }
.q-prompt .text { font-size: 1.45rem; font-family: var(--serif); font-weight: 700; margin: 0.6rem 0; }
.q-prompt .cloze { font-size: clamp(38px, 6vw, 56px); letter-spacing: 0.06em; line-height: 1.4; }
.q-prompt .blank { display: inline-block; width: 1em; height: 1em; border-bottom: 3px solid var(--red); vertical-align: -0.1em; margin: 0 0.05em; background: var(--red-soft); border-radius: 4px 4px 0 0; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.opt {
  position: relative;
  text-align: left;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem 0.9rem 2.6rem;
  cursor: pointer;
  color: var(--ink);
  min-height: 64px;
  display: flex;
  align-items: center;
  transition: border-color 0.12s, background 0.12s;
}
.opt:hover:not([disabled]) { border-color: var(--ink2); }
.opt .k { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); font-size: 0.85rem; }
.opt.han { font-size: 44px; letter-spacing: 0.06em; justify-content: center; padding-left: 2rem; }
.opt.han .k { font-size: 0.85rem; letter-spacing: 0; }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--wrong); background: var(--wrong-soft); }
.opt[disabled] { cursor: default; }
.q-feedback { margin-top: 1rem; padding: 1rem 1.2rem; border-radius: 12px; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.q-feedback.ok { background: var(--green-soft); }
.q-feedback.no { background: var(--wrong-soft); }
.q-feedback .ex { display: flex; gap: 0.8rem; align-items: center; }
.q-feedback .ex .hzw { font-size: 40px; }
.q-feedback .ex b { font-family: var(--serif); color: var(--red); }
.result { text-align: center; padding: 2rem 1rem; }
.result .score { font-family: var(--serif); font-size: 4rem; font-weight: 700; color: var(--red); line-height: 1; }
.wrong-list { text-align: left; margin-top: 1.5rem; }
.wrong-list li { padding: 0.4rem 0; border-top: 1px solid var(--line); list-style: none; display: flex; gap: 0.75rem; align-items: center; }
.wrong-list ul { padding: 0; }
.wrong-list .hzw { font-size: 28px; }
.setup { display: grid; gap: 1rem; }
.checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.checks label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.95rem; }

/* ---------- Writing practice ---------- */
.wp { display: grid; grid-template-columns: 320px 1fr; gap: 1.25rem; align-items: start; }
.wp-box { position: relative; width: 100%; aspect-ratio: 1; border: 2px solid var(--red); border-radius: 6px; background: #fffaf0; }
.wp-box .sp-writer { position: absolute; inset: 0; }
.wp-info .am { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--red); }
.char-strip { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 1rem; font-size: 30px; }
.char-strip .hz { padding: 2px; border: 1px solid transparent; border-radius: 6px; }
.char-strip .cur { border-color: var(--red); background: var(--red-soft); }
.char-strip .done svg { color: var(--green); }

/* ---------- Tables / progress ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--green); }
.boxes { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.4rem; align-items: end; height: 120px; }
.boxes div { background: var(--red); border-radius: 6px 6px 0 0; position: relative; min-height: 2px; }
.boxes div span { position: absolute; top: -1.3rem; left: 0; right: 0; text-align: center; font-size: 0.75rem; color: var(--ink2); }
.boxes-l { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.4rem; font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 0.3rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- Search ---------- */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.search-bar input { flex: 1; font-size: 1.05rem; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(31, 26, 20, 0.45); z-index: 50; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-box { background: var(--paper2); border-radius: 16px; padding: 1.5rem; width: min(440px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); position: relative; }
.modal-box.wide { width: min(420px, 100%); }
.modal-close { position: absolute; top: 0.6rem; right: 0.7rem; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
.auth-tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; }
.auth-tabs button { flex: 1; padding: 0.5rem; border: 1px solid var(--line2); background: var(--card); border-radius: 10px; cursor: pointer; font-weight: 600; }
.auth-tabs button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.form { display: grid; gap: 0.8rem; }
.err { color: var(--wrong); font-size: 0.9rem; min-height: 1.2em; }
.user-btn { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line2); background: var(--card); border-radius: 999px; padding: 0.3rem 0.75rem 0.3rem 0.35rem; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 0.8rem; }
.sync { font-size: 0.7rem; font-weight: 500; color: var(--muted); }
.notice { background: #f5ead2; border: 1px solid #e5d2a6; border-radius: 12px; padding: 0.75rem 1rem; font-size: 0.92rem; color: #5e4818; margin-bottom: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .study { position: static; }
  .study-panel { display: grid; grid-template-columns: minmax(0, 1fr); }
  .sp-boxes { max-width: 460px; margin: 0 auto; width: 100%; }
  .hero { grid-template-columns: 1fr; }
  .wp { grid-template-columns: 1fr; }
  .wp-box { max-width: 340px; margin: 0 auto; }
}
@media (max-width: 720px) {
  main { padding: 1rem 0.85rem 2.5rem; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 0.5rem; }
  .nav.open { display: flex; }
  .nav a { border-radius: 8px; }
  .user-slot { margin: 0.5rem 0 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .opts { grid-template-columns: 1fr; }
  .opt.han { font-size: 38px; }
  .grades { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .cv-text { padding: 1rem; }
  .hero h1 { font-size: 1.7rem; }
  .boxes, .boxes-l { gap: 0.2rem; }
}
