:root {
  --ink: #17251f;
  --green: #153b2f;
  --green-2: #245442;
  --lime: #c8ee72;
  --cream: #f4f1e8;
  --paper: #fffef9;
  --muted: #6e7c75;
  --line: #dfe3dc;
  --yellow: #f5d365;
  --coral: #f58c79;
  --blue: #a9d8e8;
  --red: #b94237;
  --shadow: 0 20px 60px rgba(21, 59, 47, .10);
  --radius: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--cream); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 1%, rgba(200, 238, 114, .18), transparent 24rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
img { display: block; max-width: 100%; }
form { margin: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.035em; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: .98; }
h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.06; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 max(28px, calc((100vw - 1220px) / 2));
  border-bottom: 1px solid rgba(23, 37, 31, .08);
  background: rgba(244, 241, 232, .88);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px 13px 13px 5px;
  color: var(--green);
  background: var(--lime);
  font: 800 15px/1 Georgia, serif;
  transform: rotate(-2deg);
}
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand b { font: 700 19px/1.1 Georgia, serif; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.desktop-nav { height: 100%; display: flex; align-items: stretch; gap: 26px; margin-left: auto; }
.desktop-nav a { position: relative; display: grid; place-items: center; color: var(--muted); font-size: 14px; font-weight: 700; }
.desktop-nav a::after { content: ""; position: absolute; right: 50%; bottom: 0; left: 50%; height: 3px; border-radius: 3px 3px 0 0; background: var(--green); transition: .2s; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--ink); }
.desktop-nav a.active::after { right: 0; left: 0; }
.top-actions { display: flex; gap: 8px; }
.top-actions form { display: flex; }
.round-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
}
.profile-menu { position: relative; }
.profile-menu > summary { list-style: none; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-trigger {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: var(--green);
  background: var(--lime);
  box-shadow: 0 0 0 1px var(--line);
  font: 800 15px/1 Georgia, serif;
  cursor: pointer;
}
.profile-trigger img, .profile-summary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 260px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 22px 60px rgba(21, 59, 47, .18);
}
.profile-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 16px;
  width: 11px;
  height: 11px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--paper);
  transform: rotate(45deg);
}
.profile-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 10px 14px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--line);
}
.profile-summary > img, .profile-summary > span {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--green);
  background: var(--lime);
  font: 800 15px/1 Georgia, serif;
}
.profile-summary div { min-width: 0; display: grid; gap: 3px; }
.profile-summary b { overflow: hidden; text-overflow: ellipsis; }
.profile-summary small { color: var(--muted); font-size: 11px; }
.profile-dropdown > a, .profile-dropdown form button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 11px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.profile-dropdown > a:hover, .profile-dropdown form button:hover { background: #f1f5ed; }
.profile-dropdown > a span, .profile-dropdown form button span {
  width: 22px;
  color: var(--green-2);
  font-size: 17px;
  text-align: center;
}
.profile-dropdown form { display: block; border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.profile-dropdown form button { color: var(--red); }
.page { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 36px 0 88px; }
.bottom-nav { display: none; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--green-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow.light { color: var(--lime); }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(21, 59, 47, .12); }
.button.primary { color: white; background: var(--green); }
.button.dark { color: white; background: var(--ink); }
.button.lime { color: var(--green); background: var(--lime); }
.button.secondary { color: var(--green); border: 1px solid #cbd4cc; background: #f8faf5; }
.button.danger { color: var(--red); background: #fae6e2; }
.button.ghost-light { color: white; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.button.full { width: 100%; }
.desktop-only { display: inline-flex; }
.toast {
  position: fixed;
  z-index: 80;
  top: 86px;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  transform: translateX(-50%);
  border-radius: 13px;
  color: white;
  background: var(--green);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 700;
  animation: toast-away 4.5s forwards;
}
.toast.error { background: var(--red); }
@keyframes toast-away { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 36px 0; }
.login-card {
  position: relative;
  width: min(500px, calc(100vw - 32px));
  overflow: hidden;
  padding: 52px;
  border: 1px solid rgba(21,59,47,.08);
  border-radius: 34px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.login-card::before { content: "WÖRTER"; position: absolute; top: 30px; right: -35px; color: rgba(21,59,47,.035); font: 900 90px/1 Georgia, serif; transform: rotate(90deg); }
.login-logo { width: 66px; height: 66px; display: grid; place-items: center; margin-bottom: 28px; border-radius: 20px 20px 20px 7px; color: var(--green); background: var(--lime); font: 800 23px/1 Georgia, serif; }
.login-card h1 { margin-bottom: 18px; font-size: 46px; }
.login-copy { max-width: 380px; margin-bottom: 32px; color: var(--muted); line-height: 1.6; }
.login-flag { position: absolute; top: 0; right: 52px; display: flex; }
.login-flag i { width: 22px; height: 5px; background: #222; }
.login-flag i:nth-child(2) { background: #d23b32; }
.login-flag i:nth-child(3) { background: #e4b737; }
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: #405049; font-size: 13px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d5dbd5;
  border-radius: 12px;
  outline: none;
  background: #fbfcf8;
  padding: 13px 14px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(36,84,66,.1); }
label small, .field-note { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.45; }

/* Dashboard */
.hero {
  min-height: 400px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  overflow: hidden;
  border-radius: 34px;
  color: white;
  background:
    radial-gradient(circle at 85% 25%, rgba(200,238,114,.13), transparent 17rem),
    var(--green);
}
.hero-copy { align-self: center; padding: 58px 0 58px 62px; }
.hero h1 { max-width: 650px; margin: 0 0 24px; }
.hero h1 em { color: var(--lime); font-family: Georgia, serif; font-weight: 400; }
.hero-copy > p:not(.eyebrow) { max-width: 580px; margin-bottom: 30px; color: #d3ddd8; line-height: 1.65; }
.hero-mobile-summary { display: none; }
.hero-actions { display: flex; gap: 10px; align-items: center; }
.hero-actions form { display: flex; }
.hero-visual { position: relative; min-height: 400px; }
.word-card {
  position: absolute;
  width: 250px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
}
.word-card span { margin-bottom: 15px; font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.word-card strong { font: 700 33px/1.1 Georgia, serif; }
.word-card small { margin-top: 14px; opacity: .75; }
.card-front { z-index: 2; top: 96px; left: 60px; color: var(--green); background: var(--lime); transform: rotate(4deg); }
.card-back { top: 55px; left: 195px; color: var(--ink); background: var(--paper); transform: rotate(14deg); opacity: .9; }
.spark { position: absolute; right: 54px; bottom: 58px; color: var(--yellow); font-size: 45px; transform: rotate(15deg); }
.today-grid { display: grid; grid-template-columns: 2.1fr repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.goal-card, .metric-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,254,249,.78);
}
.goal-card { display: flex; align-items: center; gap: 22px; padding: 20px 24px; }
.goal-card h2 { margin: 0 0 6px; font-size: 24px; }
.goal-card p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.ring, .small-ring {
  --progress: 0%;
  flex: 0 0 auto;
  width: 98px;
  height: 98px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--lime) var(--progress), #e7ebe2 0);
  position: relative;
}
.ring::after, .small-ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--paper); }
.ring > div { z-index: 1; }
.ring strong { font-size: 27px; }
.ring span { color: var(--muted); font-size: 13px; }
.metric-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 86px; height: 86px; top: -38px; right: -25px; border-radius: 50%; background: var(--lime); opacity: .16; }
.metric-card.accent-yellow::after { background: var(--yellow); opacity: .35; }
.metric-card.accent-coral::after { background: var(--coral); opacity: .28; }
.metric-icon { position: absolute; top: 19px; left: 20px; color: var(--green); font-size: 20px; font-weight: 900; }
.metric-card strong { font-size: 34px; }
.metric-card p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 54px 0 18px; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--green-2); font-size: 13px; font-weight: 800; }
.word-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,254,249,.8); }
.word-row {
  min-height: 86px;
  display: grid;
  grid-template-columns: 50px minmax(180px, 1fr) minmax(120px, auto) 90px 110px 20px;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background .18s;
}
.word-row:last-child { border-bottom: 0; }
.word-row:hover { background: #fbfcf6; }
.compact-list .word-row { grid-template-columns: 50px minmax(180px, 1fr) auto 20px; }
.article-badge, .word-thumb { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-weight: 900; }
.article-badge.der { color: #2e6074; background: #dceef5; }
.article-badge.die { color: #943e54; background: #fae2e8; }
.article-badge.das { color: #705b11; background: #f8ebbc; }
.article-badge.none { color: var(--green-2); background: #e6efdf; }
.word-thumb { overflow: hidden; background: #edf0e9; }
.word-thumb img { width: 100%; height: 100%; object-fit: cover; }
.word-main { min-width: 0; display: grid; gap: 4px; }
.word-main strong { overflow: hidden; font: 700 19px/1.15 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.word-main strong i { color: var(--muted); font: 400 13px/1 sans-serif; }
.word-main small { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.word-state { justify-self: start; padding: 7px 10px; border-radius: 999px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.word-state.new { color: #42611b; background: #e4f1cc; }
.word-state.review { color: #665213; background: #f6e8b8; }
.word-state.mastered { color: #28664c; background: #d9eee4; }
.word-state.difficult { color: #974238; background: #fae0db; }
.chevron { justify-self: end; color: #a4aea7; font-size: 27px; }
.category-inline { display: flex; flex-wrap: wrap; gap: 4px; }
.category-inline i, .category-chips span { padding: 5px 8px; border-radius: 999px; color: #466052; background: #e9eee8; font-size: 10px; font-style: normal; font-weight: 700; }
.accuracy { display: grid; font-size: 14px; font-weight: 900; }
.accuracy small { color: var(--muted); font-size: 10px; font-weight: 500; }
.done-card { min-height: 110px; display: flex; align-items: center; gap: 18px; padding: 24px; border: 1px solid #d7e1cf; border-radius: var(--radius); background: #f7faef; }
.done-card > span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--lime); font-size: 24px; font-weight: 900; }
.done-card h3 { margin: 0 0 5px; }
.done-card p { margin: 0; color: var(--muted); }
.mini-word-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.mini-word { min-height: 145px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,254,249,.8); transition: .18s; }
.mini-word:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(21,59,47,.08); }
.mini-word span { width: 29px; height: 29px; display: grid; place-items: center; margin-bottom: auto; border-radius: 9px; color: var(--green); background: var(--lime); font-size: 10px; font-weight: 900; }
.mini-word strong { overflow: hidden; font: 700 18px/1.2 Georgia, serif; text-overflow: ellipsis; }
.mini-word small { overflow: hidden; margin-top: 5px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

/* Dictionary */
.page-head { min-height: 150px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-head h1 { margin: 0 0 10px; }
.page-head p:last-child { margin: 0; color: var(--muted); }
.filter-bar { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 160px auto; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,254,249,.78); }
.search-field { position: relative; display: block; }
.search-field span { position: absolute; z-index: 1; top: 50%; left: 15px; color: var(--muted); transform: translateY(-50%); }
.search-field input { height: 46px; padding-left: 40px; }
.filter-bar select { height: 46px; }
.word-tools { display: flex; justify-content: space-between; gap: 20px; margin: 22px 0 14px; }
.filter-pills, .io-links { display: flex; gap: 8px; }
.filter-pills a { padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 800; }
.filter-pills a.active { color: white; background: var(--green); }
.io-links a { color: var(--green-2); font-size: 12px; font-weight: 800; padding: 8px; }
.empty-state { display: grid; place-items: center; padding: 80px 24px; text-align: center; border: 1px dashed #cbd3ca; border-radius: 28px; }
.empty-symbol { width: 78px; height: 78px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 24px 24px 24px 8px; color: var(--green); background: var(--lime); font: 700 29px/1 Georgia, serif; transform: rotate(-3deg); }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { max-width: 440px; margin-bottom: 22px; color: var(--muted); }

/* Detail */
.back-link { display: inline-flex; margin: 8px 0 28px; color: var(--muted); font-size: 13px; font-weight: 700; }
.detail-layout { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 64px; }
.detail-picture { aspect-ratio: 1/1; overflow: hidden; display: grid; place-items: center; border-radius: 30px; background: linear-gradient(145deg, #ddefc9, #b9dca6); }
.detail-picture img { width: 100%; height: 100%; object-fit: cover; }
.detail-picture > span { color: var(--green); font: 700 140px/1 Georgia, serif; opacity: .7; }
.detail-picture > small { position: absolute; align-self: end; margin-bottom: 30px; color: var(--green-2); font-weight: 700; }
.accuracy-panel { display: flex; align-items: center; gap: 15px; margin-top: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,254,249,.8); }
.small-ring { width: 58px; height: 58px; }
.small-ring::after { inset: 6px; }
.small-ring strong { z-index: 1; font-size: 12px; }
.accuracy-panel > div:last-child { display: grid; gap: 4px; }
.accuracy-panel small { color: var(--muted); font-size: 11px; }
.detail-content { padding-top: 16px; }
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.detail-meta { display: flex; gap: 7px; margin-bottom: 16px; }
.article-chip, .status-chip { padding: 6px 9px; border-radius: 8px; font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.article-chip.der { color: #2e6074; background: #dceef5; }
.article-chip.die { color: #943e54; background: #fae2e8; }
.article-chip.das { color: #705b11; background: #f8ebbc; }
.status-chip { color: var(--green-2); background: #e4eddf; }
.status-chip.difficult { color: #974238; background: #fae0db; }
.detail-title h1 { margin: 0 0 8px; }
.translation { margin: 0; color: var(--muted); font: 400 24px/1.3 Georgia, serif; }
.speak-button { flex: 0 0 auto; }
.detail-title .speak-button, .image-question .speak-button {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid #c9d9c4;
  border-radius: 50%;
  background: #edf6df;
  font-size: 23px;
}
.info-line { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.info-line span { color: var(--muted); font-size: 13px; }
.example-card { position: relative; margin: 26px 0 18px; padding: 24px 26px; border-left: 4px solid var(--lime); border-radius: 0 18px 18px 0; background: rgba(255,254,249,.75); }
.example-card span { color: var(--green-2); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.example-card blockquote { margin: 10px 0 0; font: 400 21px/1.5 Georgia, serif; }
.category-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.category-chips span { font-size: 12px; padding: 8px 11px; }
.notes-block { padding: 18px 0; }
.notes-block h2 { margin-bottom: 8px; font-size: 20px; }
.notes-block p { color: var(--muted); line-height: 1.6; white-space: pre-line; }
.review-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.review-strip div { display: grid; gap: 6px; padding: 15px 17px; border-right: 1px solid var(--line); }
.review-strip div:last-child { border: 0; }
.review-strip span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.review-strip strong { font-size: 14px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.detail-actions form { display: flex; }

/* Editor */
.form-heading { max-width: 700px; margin-bottom: 34px; }
.form-heading h1 { margin-bottom: 16px; }
.form-heading > p:last-child { color: var(--muted); line-height: 1.6; }
.editor-card { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,254,249,.82); }
.form-section { display: grid; grid-template-columns: 100px 1fr; gap: 24px; padding: 34px; border-bottom: 1px solid var(--line); }
.section-number { color: #a8b0aa; font: 700 22px/1 Georgia, serif; }
.section-form { max-width: 780px; }
.section-form h2 { margin-bottom: 24px; font-size: 25px; }
.form-grid { display: grid; grid-template-columns: 120px 1fr; gap: 17px; }
.form-grid .wide { grid-column: 1 / -1; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.choice-chip { display: block; cursor: pointer; }
.choice-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-chip span { display: block; padding: 9px 12px; border: 1px solid #d6ddd5; border-radius: 999px; background: #fafbf7; font-size: 12px; }
.choice-chip input:checked + span { color: white; border-color: var(--green); background: var(--green); }
.section-form > label { margin-top: 16px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.upload-box { min-height: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 20px; border: 1px dashed #afbbb0; border-radius: 16px; background: #f8faf4; text-align: center; cursor: pointer; }
.upload-box:hover { border-color: var(--green-2); background: #f1f7e8; }
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { font-size: 25px; }
.upload-box b { font-size: 13px; }
.upload-box small { color: var(--muted); font-size: 11px; font-weight: 500; }
.upload-box.has-file { border-style: solid; border-color: var(--green-2); background: #eef6e5; }
.visually-hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.voice-recorder-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px dashed #afbbb0;
  border-radius: 16px;
  background: #f8faf4;
  text-align: center;
}
.voice-recorder-card > b { font-size: 14px; }
.voice-recorder-card > small { color: var(--muted); font-size: 11px; font-weight: 500; }
.voice-recorder-card > p { max-width: 360px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.voice-recorder-card audio { width: min(100%, 360px); height: 38px; }
.voice-recorder-card.is-recording { border-color: var(--coral); background: #fff4f0; }
.voice-recorder-card.has-recording { border-style: solid; border-color: var(--green-2); background: #eef6e5; }
.recorder-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 4px 0; }
.compact-button { min-height: 38px; padding: 8px 12px; font-size: 12px; }
.recorder-actions label.button { display: inline-flex; margin: 0; cursor: pointer; }
.auto-voice-button { padding: 4px 8px; color: var(--green-2); border-radius: 8px; background: transparent; font-size: 11px; font-weight: 800; }
.auto-voice-button:hover { background: rgba(21, 59, 47, .07); }
.remove-options { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; }
.remove-options label { display: flex; grid: none; align-items: center; gap: 7px; font-weight: 500; }
.remove-options input { width: auto; }
.form-submit { display: flex; justify-content: flex-end; gap: 10px; padding: 24px 34px; background: #f4f5ef; }

/* Practice hub */
.practice-head { min-height: 210px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.practice-head h1 { margin: 0 0 16px; }
.practice-head > div:first-child > p:last-child { margin: 0; color: var(--muted); }
.practice-total { display: flex; align-items: center; gap: 12px; padding: 17px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.practice-total strong { font-size: 36px; }
.practice-total span { color: var(--muted); font-size: 11px; line-height: 1.25; text-transform: uppercase; }
.exercise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.exercise-card {
  position: relative;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border-radius: 25px;
  background: var(--paper);
  transition: transform .2s, box-shadow .2s;
}
.exercise-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.exercise-card.spelling { background: var(--green); color: white; }
.exercise-card.letters { background: var(--yellow); }
.exercise-card.images { background: var(--blue); }
.exercise-card.matching { background: #e7dfef; }
.exercise-card.disabled { filter: grayscale(.25); opacity: .68; }
.exercise-number { align-self: flex-end; font: 700 13px/1 Georgia, serif; opacity: .55; }
.exercise-art { min-height: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.exercise-art > span { font-size: 46px; }
.exercise-art > i { font-style: normal; letter-spacing: .2em; opacity: .7; }
.letter-art { flex-direction: row; gap: 6px; }
.letter-art i { width: 46px; height: 52px; display: grid; place-items: center; border-radius: 10px; color: var(--ink); background: rgba(255,255,255,.55); font: 700 22px/1 Georgia, serif; transform: rotate(-5deg); }
.letter-art i:nth-child(2) { transform: rotate(5deg) translateY(-9px); }
.letter-art i:nth-child(3) { transform: rotate(-2deg); }
.image-art { display: grid; grid-template-columns: 60px 60px; grid-template-rows: 54px 54px; gap: 6px; }
.image-art i { display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.38); font-size: 25px; }
.match-art { position: relative; display: block; margin-top: 35px; }
.match-art i { position: absolute; left: 30%; width: 40%; height: 2px; background: rgba(21,59,47,.5); transform-origin: left; }
.match-art i::before, .match-art i::after { content: ""; position: absolute; width: 11px; height: 11px; top: -5px; border-radius: 50%; background: var(--green); }
.match-art i::after { right: 0; }
.match-art i:nth-child(1) { top: 20px; transform: rotate(12deg); }
.match-art i:nth-child(2) { top: 67px; transform: rotate(-14deg); }
.match-art i:nth-child(3) { top: 112px; transform: rotate(4deg); }
.exercise-card h2 { margin: 0 0 13px; font-size: 31px; }
.exercise-card.spelling .eyebrow { color: var(--lime); }
.exercise-card > div:nth-of-type(2) > p:last-child { min-height: 64px; margin-bottom: 20px; color: currentColor; font-size: 13px; line-height: 1.5; opacity: .72; }
.exercise-card > b { display: flex; justify-content: space-between; margin-top: auto; font-size: 13px; }
.difficult-banner { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 22px 26px; border: 1px solid #ead1ca; border-radius: 20px; background: #fae9e4; }
.difficult-banner > div { display: flex; align-items: center; gap: 15px; }
.difficult-banner > div > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #963e32; background: var(--coral); font-weight: 900; }
.difficult-banner h3 { margin: 0; }

/* Quiz */
.practice-page { width: min(900px, calc(100% - 40px)); padding-top: 18px; }
.practice-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-bottom: 20px; }
.practice-top > a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 24px; }
.practice-top > div { display: grid; place-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.practice-top i { width: min(260px, 50vw); height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--lime) 55%, #dfe4dc 55%); }
.quiz-card { min-height: 620px; display: grid; place-items: center; overflow: hidden; padding: 48px; border: 1px solid var(--line); border-radius: 30px; background: var(--paper); box-shadow: 0 18px 50px rgba(21,59,47,.06); }
.quiz-prompt, .result-view { width: min(620px, 100%); text-align: center; }
.quiz-prompt h1 { margin: 18px 0 10px; font-size: 42px; }
.quiz-prompt > p:not(.eyebrow,.translation-prompt) { color: var(--muted); }
.sound-orb { width: 118px; height: 118px; display: grid; place-items: center; margin: 10px auto 26px; border-radius: 50%; color: var(--green); background: var(--lime); font-size: 42px; box-shadow: 0 16px 40px rgba(151,190,65,.35); }
.sound-orb:active { transform: scale(.96); }
.letter-slots { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 28px 0 18px; }
.letter-slots i { width: 25px; height: 3px; border-radius: 3px; background: #b7c0b8; }
.listen-again { padding: 8px 13px; border-radius: 999px; color: var(--green-2); background: #edf2e9; font-size: 12px; font-weight: 800; }
.answer-form { max-width: 500px; margin: 32px auto 0; display: grid; gap: 13px; text-align: left; }
.answer-form input { text-align: center; font-size: 20px; font-weight: 700; }
.translation-prompt { margin: 40px 0 10px; color: var(--ink) !important; font: 700 42px/1.15 Georgia, serif; }
.article-hint { display: block; color: var(--muted); }
.built-word { min-height: 64px; display: flex; align-items: center; justify-content: center; border-bottom: 2px solid var(--green); font: 700 30px/1 Georgia, serif; letter-spacing: .08em; }
.built-word span { color: #a1aaa3; font: 500 14px/1 sans-serif; letter-spacing: 0; }
.letter-tiles { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 22px 0 8px; }
.letter-tiles button { width: 48px; height: 52px; border: 1px solid #d5dbd4; border-radius: 11px; background: #f6f8f2; box-shadow: 0 3px 0 #d8ddd5; font: 700 21px/1 Georgia, serif; }
.letter-tiles button.used { visibility: hidden; pointer-events: none; }
.undo-letter { justify-self: center; padding: 8px 12px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.result-view { padding: 30px 0; }
.result-icon { width: 88px; height: 88px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; color: var(--green); background: var(--lime); font-size: 42px; font-weight: 900; }
.result-view.wrong .result-icon { color: white; background: var(--coral); }
.result-view.partial .result-icon { color: var(--ink); background: var(--yellow); font-size: 33px; }
.result-view h1 { margin: 0 0 9px; font-size: 54px; }
.result-translation { color: var(--muted); font: 400 23px/1.4 Georgia, serif; }
.your-answer { color: var(--muted); }
.result-view blockquote { margin: 28px auto; padding: 18px; border-radius: 14px; background: #f3f5ef; font: 400 18px/1.5 Georgia, serif; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 34px; }
.image-question { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 30px; }
.image-question h1 { margin: 0; }
.image-question .speak-button { width: 52px; height: 52px; font-size: 19px; }
.image-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.image-option { aspect-ratio: 1.35/1; overflow: hidden; padding: 0; border: 3px solid transparent; border-radius: 18px; background: #edf0e9; transition: .16s; }
.image-option:hover { border-color: var(--lime); transform: scale(1.015); }
.image-option img { width: 100%; height: 100%; object-fit: cover; }
.matching-quiz .quiz-prompt { width: min(760px, 100%); }
.matching-board { display: grid; grid-template-columns: 1fr 28px 1fr; gap: 10px; margin: 34px 0 18px; }
.match-column { display: grid; gap: 9px; }
.match-column button { min-height: 56px; padding: 11px; border: 1px solid #d6ddd5; border-radius: 13px; background: #f8f9f5; font-size: 14px; font-weight: 700; transition: .16s; }
.match-column button:hover, .match-column button.selected { border-color: var(--green-2); background: #edf4e8; }
.match-column button.paired { color: var(--green); border-color: var(--pair-color, var(--lime)); background: color-mix(in srgb, var(--pair-color, var(--lime)) 28%, white); }
.match-lines { position: relative; }
.match-progress { color: var(--muted); font-size: 12px; }
.pair-review { display: grid; gap: 6px; margin: 24px auto; text-align: left; }
.pair-review span { padding: 10px 13px; border-radius: 10px; background: #f3f5ef; font-size: 13px; }

/* Stats, settings, import */
.stats-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.stats-summary article { min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.stats-summary span { margin-bottom: auto; color: var(--muted); font-size: 12px; }
.stats-summary strong { font-size: 42px; }
.stats-summary small { color: var(--muted); }
.chart-card { margin-top: 18px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.chart-card .section-head { margin: 0 0 24px; }
.chart-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--green); }
.bar-chart { height: 240px; display: grid; grid-template-columns: repeat(14, 1fr); align-items: end; gap: 8px; padding-top: 24px; border-bottom: 1px solid var(--line); }
.bar-day { height: 100%; display: grid; grid-template-rows: 18px 1fr 25px; align-items: end; gap: 4px; text-align: center; }
.bar-day > strong { color: var(--muted); font-size: 9px; font-weight: 600; }
.bar-day > i { position: relative; width: min(28px, 80%); min-height: 3px; justify-self: center; overflow: hidden; border-radius: 7px 7px 0 0; background: #e1c5be; }
.bar-day > i b { position: absolute; right: 0; bottom: 0; left: 0; background: var(--green); }
.bar-day > span { color: var(--muted); font-size: 10px; }
.simple-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.simple-card h2 { margin-bottom: 20px; font-size: 25px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.data-card { grid-column: 1 / -1; }
.data-card > p:not(.eyebrow) { color: var(--muted); }
.data-card > div { display: flex; gap: 8px; }
.import-card { max-width: 760px; }
.import-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 25px; }
.import-steps span { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.import-steps i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--lime); font-style: normal; font-weight: 900; }
.import-form { display: grid; gap: 13px; margin-top: 25px; }
.upload-box.large { min-height: 210px; }
.upload-box.compact { min-height: 115px; }
.avatar-editor { display: flex; align-items: center; gap: 14px; }
.avatar-editor > img, .avatar-editor > span {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--green);
  background: var(--lime);
  object-fit: cover;
  font: 800 22px/1 Georgia, serif;
}
.avatar-editor > div { display: grid; gap: 4px; }
.avatar-editor small { color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.users-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.add-user-card { position: sticky; top: 100px; }
.form-hint { margin: -3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.user-list { display: grid; }
.user-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); }
.user-row:first-child { border-top: 0; }
.user-row > img, .user-avatar { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--lime); object-fit: cover; font: 800 16px/1 Georgia, serif; }
.user-row > div { min-width: 0; display: grid; gap: 3px; }
.user-row b { overflow: hidden; text-overflow: ellipsis; }
.user-row small { color: var(--muted); font-size: 11px; }
.user-row em { color: var(--muted); font-size: 12px; font-style: normal; }

@media (max-width: 1000px) {
  .page { width: min(100% - 32px, 900px); }
  .topbar { padding: 0 20px; }
  .desktop-nav { gap: 16px; }
  .hero { grid-template-columns: 1.15fr .85fr; }
  .hero-copy { padding-left: 42px; }
  .card-back { left: 130px; }
  .card-front { left: 20px; }
  .today-grid { grid-template-columns: 1.5fr repeat(3, .7fr); }
  .goal-card { gap: 14px; padding: 16px; }
  .goal-card h2 { font-size: 19px; }
  .ring { width: 78px; height: 78px; }
  .mini-word-grid { grid-template-columns: repeat(3, 1fr); }
  .exercise-grid { grid-template-columns: 1fr 1fr; }
  .exercise-card { min-height: 380px; }
  .detail-layout { grid-template-columns: 330px 1fr; gap: 38px; }
  .word-row { grid-template-columns: 50px minmax(160px, 1fr) 80px 105px 20px; }
  .category-inline { display: none; }
}

@media (max-width: 720px) {
  body { background: var(--cream); }
  h1 { font-size: 39px; }
  h2 { font-size: 27px; }
  input, select, textarea { font-size: 16px; }
  .topbar { position: sticky; height: 60px; padding: 0 16px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px 11px 11px 4px; font-size: 13px; }
  .brand b { font-size: 17px; }
  .brand small, .desktop-nav { display: none; }
  .top-actions { margin-left: auto; }
  .round-button { width: 36px; height: 36px; }
  .page { width: 100%; padding: 16px 14px calc(100px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(76px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: start;
    padding: 8px 5px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(23,37,31,.1);
    background: rgba(255,254,249,.95);
    backdrop-filter: blur(18px);
  }
  .bottom-nav > a { min-width: 0; display: grid; justify-items: center; gap: 3px; color: #7c8781; font-size: 9px; font-weight: 700; }
  .bottom-nav > a > span { font-size: 21px; line-height: 27px; }
  .bottom-nav > a.active { color: var(--green); }
  .bottom-nav .nav-add { position: relative; color: var(--green); }
  .bottom-nav .nav-add span { width: 49px; height: 49px; display: grid; place-items: center; margin-top: -22px; border: 5px solid var(--paper); border-radius: 50%; color: var(--green); background: var(--lime); font-size: 29px; box-shadow: 0 6px 18px rgba(21,59,47,.2); }
  .bottom-nav .nav-add em { font-style: normal; }
  .toast { top: 70px; }
  .desktop-only { display: none; }

  .login-page { padding: 16px; }
  .login-card { padding: 37px 24px 28px; border-radius: 27px; }
  .login-card h1 { font-size: 37px; }
  .login-copy { font-size: 14px; }
  .login-flag { right: 25px; }

  .hero { min-height: 0; display: block; border-radius: 22px; }
  .hero-copy { position: relative; z-index: 3; padding: 22px; }
  .hero-copy .eyebrow { margin-bottom: 7px; font-size: 9px; }
  .hero h1 { margin-bottom: 14px; font-size: 31px; line-height: .98; }
  .hero-description { display: none; }
  .hero-copy > .hero-mobile-summary {
    display: block;
    max-width: none;
    margin-bottom: 15px;
    color: #d3ddd8;
    font-size: 12px;
    line-height: 1.35;
  }
  .hero-mobile-summary span { margin: 0 4px; color: var(--lime); }
  .hero-copy > .button { width: 100%; min-height: 43px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .hero-actions .button { width: 100%; min-height: 43px; padding: 9px; font-size: 12px; }
  .hero-visual { display: none; }
  .today-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 9px; }
  .goal-card { grid-column: 1 / -1; min-height: 88px; gap: 13px; padding: 12px 15px; }
  .goal-card .ring { width: 64px; height: 64px; }
  .goal-card .ring::after { inset: 6px; }
  .goal-card .ring strong { font-size: 20px; }
  .goal-card .ring span { font-size: 10px; }
  .goal-card .eyebrow { margin-bottom: 4px; font-size: 9px; }
  .goal-card h2 { margin-bottom: 3px; font-size: 18px; }
  .goal-card p:last-child { font-size: 10px; }
  .metric-card { min-height: 84px; padding: 10px; }
  .metric-card strong { font-size: 25px; }
  .metric-card p { font-size: 9px; line-height: 1.15; }
  .metric-card::after { width: 62px; height: 62px; top: -30px; }
  .metric-icon { top: 9px; left: 10px; font-size: 15px; }
  .section-head { margin: 38px 2px 14px; }
  .section-head h2 { font-size: 25px; }
  .section-head a { font-size: 11px; }
  .compact-list .word-row, .word-row { grid-template-columns: 43px minmax(0, 1fr) auto 15px; min-height: 76px; gap: 11px; padding: 12px; }
  .article-badge, .word-thumb { width: 43px; height: 43px; border-radius: 12px; }
  .word-main strong { font-size: 17px; }
  .word-state { font-size: 8px; padding: 6px 7px; }
  .accuracy, .category-inline { display: none; }
  .mini-word-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mini-word { min-height: 125px; }
  .done-card { padding: 18px; }

  .page-head { min-height: auto; align-items: flex-start; margin: 18px 2px 25px; }
  .page-head h1 { margin-top: 0; }
  .page-head p:last-child { font-size: 13px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filter-bar .button { min-height: 46px; }
  .word-tools { align-items: flex-start; }
  .filter-pills { max-width: 70%; overflow-x: auto; }
  .filter-pills a { white-space: nowrap; }
  .io-links { display: grid; text-align: right; gap: 0; }
  .empty-state { padding: 55px 20px; }

  .back-link { margin: 5px 2px 22px; }
  .detail-layout { display: block; }
  .detail-picture { aspect-ratio: 1.35 / 1; border-radius: 25px; }
  .detail-picture > span { font-size: 100px; }
  .detail-content { padding-top: 30px; }
  .detail-title h1 { font-size: 48px; }
  .translation { font-size: 21px; }
  .detail-title .speak-button { width: 54px; height: 54px; }
  .example-card { padding: 20px; }
  .review-strip { grid-template-columns: 1fr; }
  .review-strip div { display: flex; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-actions > :first-child { grid-column: 1 / -1; }
  .detail-actions form, .detail-actions form .button { width: 100%; }

  .form-heading { margin: 0 2px 25px; }
  .editor-card { border-radius: 23px; }
  .form-section { grid-template-columns: 1fr; gap: 12px; padding: 24px 18px; }
  .section-number { font-size: 16px; }
  .section-form h2 { margin-bottom: 18px; }
  .form-grid { grid-template-columns: 100px 1fr; gap: 13px; }
  .upload-grid { grid-template-columns: 1fr; }
  .form-submit { position: static; padding: 14px; }
  .form-submit .button { flex: 1; padding: 10px; }
  .voice-recorder-card { min-height: 260px; padding: 18px 12px; }
  .recorder-actions { width: 100%; }

  .practice-head { min-height: auto; align-items: flex-end; margin: 18px 2px 28px; }
  .practice-head h1 { font-size: 38px; }
  .practice-head > div:first-child > p:last-child { font-size: 13px; }
  .practice-total { padding: 11px 13px; }
  .practice-total strong { font-size: 25px; }
  .practice-total span { display: none; }
  .exercise-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .exercise-card { min-height: 330px; padding: 17px; border-radius: 20px; }
  .exercise-art { min-height: 110px; }
  .exercise-card h2 { font-size: 24px; }
  .exercise-card > div:nth-of-type(2) > p:last-child { min-height: 70px; font-size: 11px; }
  .letter-art i { width: 35px; height: 41px; }
  .image-art { grid-template-columns: 45px 45px; grid-template-rows: 41px 41px; }
  .match-art { margin-top: 10px; }
  .difficult-banner { padding: 17px; }

  .practice-page { width: 100%; padding-top: 6px; }
  .quiz-card { min-height: calc(100vh - 190px); padding: 26px 17px; border-radius: 24px; }
  .quiz-prompt h1 { font-size: 33px; }
  .sound-orb { width: 100px; height: 100px; }
  .answer-form { margin-top: 25px; }
  .translation-prompt { margin-top: 25px; font-size: 35px; }
  .letter-tiles button { width: 43px; height: 48px; }
  .result-view h1 { font-size: 43px; }
  .result-actions { display: grid; }
  .image-options { gap: 8px; }
  .image-option { border-radius: 14px; }
  .matching-board { grid-template-columns: 1fr 10px 1fr; gap: 5px; }
  .match-column button { min-height: 54px; padding: 8px 5px; font-size: 12px; }

  .stats-summary { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .stats-summary article { min-height: 126px; padding: 14px; }
  .stats-summary strong { font-size: 31px; }
  .stats-summary small { font-size: 9px; }
  .chart-card { padding: 18px 10px; }
  .bar-chart { gap: 3px; }
  .bar-day > i { width: 70%; }
  .settings-grid { grid-template-columns: 1fr; }
  .data-card { grid-column: auto; }
  .users-layout { grid-template-columns: 1fr; }
  .add-user-card { position: static; }
  .import-steps { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 29px; }
  .today-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-card { padding: 11px; }
  .metric-card p { font-size: 11px; }
  .exercise-grid { grid-template-columns: 1fr; }
  .exercise-card { min-height: 300px; }
  .exercise-card > div:nth-of-type(2) > p:last-child { min-height: auto; }
  .form-grid { grid-template-columns: 85px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
