@font-face {
  font-family: Manrope;
  src: url('/font-cyrillic.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  src: url('/font.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: light;
  --canvas: #f6f5fa;
  --paper: #fff;
  --ink: #211a34;
  --sidebar: #221936;
  --sidebar-text: #e6deef;
  --muted: #6c637b;
  --line: #e9e4f0;
  --accent: #5941c6;
  --accent-hover: #4830ac;
  --lilac: #efebff;
  --shadow: 0 2px 7px #22143f06;
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, strong { font-weight: 800; }
svg { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8471f4; outline-offset: 3px; }
.initial-loading { padding: 45px; text-align: center; color: var(--muted); }

.shell { --sidebar-width: 220px; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 3;
  color: var(--sidebar-text); background: var(--sidebar); padding: 34px 16px 21px;
  display: flex; flex-direction: column; gap: 48px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px; width: max-content;
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.055em;
}
.sidebar .brand { margin-left: 8px; color: #fff; }
.brand-mark {
  width: 39px; height: 39px; border-radius: 13px; color: #34204e; display: grid; place-items: center;
  background: #d6c6fd; box-shadow: 0 4px 14px #150c362c;
}
.navigation { display: grid; gap: 6px; }
.nav-link {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: 12px;
  min-height: 48px; font-size: .92rem; font-weight: 750; color: var(--sidebar-text);
}
.nav-link:hover { background: #36294d; color: #fff; }
.nav-link.active { background: #403056; color: #f5ecff; }
.nav-link.active svg { color: #d6c8ff; }
.sidebar-footer {
  display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 18px 8px 0;
  border-top: 1px solid #473756;
}
.sidebar-footer strong, .sidebar-footer small { display: block; font-size: .79rem; }
.sidebar-footer small { color: #c4b8d0; margin-top: 3px; font-weight: 650; }
.profile-icon {
  display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 12px; background: #3a2a52; color: #e1ccfb;
}
.main {
  margin-left: var(--sidebar-width); max-width: 1320px;
  padding: 40px clamp(24px, 3.05vw, 48px) 50px;
}
.page-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 28px;
}
.page-heading h1 {
  font-size: clamp(2.15rem, 3.5vw, 2.9rem); line-height: 1.1; letter-spacing: -.067em;
}
.page-heading p { color: var(--muted); margin-top: 8px; font-size: .94rem; }
.date-line { display: inline-flex; gap: 8px; align-items: center; }
.date-line svg { color: #8376a3; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 10px 17px; border-radius: 11px; white-space: nowrap; border: 1px solid transparent;
  font-size: .88rem; font-weight: 800; line-height: 1.35; transition: background .16s, color .16s, box-shadow .16s;
}
.button-primary { color: #fff; background: var(--accent); box-shadow: 0 3px 7px #5b47cc25; }
.button-primary:hover { background: var(--accent-hover); }
.button-light { background: #dbf4d0; color: #252334; box-shadow: 0 4px 12px #160c3833; }
.button-light:hover { background: #ebfee3; }
.button-secondary { background: white; color: var(--ink); border-color: var(--line); }
.button-secondary:hover { background: #f6f3fd; }
.button-delete { color: #a52e48; margin-right: auto; }
.button-delete:hover { background: #fff0f2; }
.button-danger { color: white; background: #ad3450; }
.button-danger:hover { background: #8d253e; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 19px; box-shadow: var(--shadow); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(252px, 1fr);
  grid-template-areas: "hero activity" "controls controls";
  gap: 18px;
}
.hero {
  grid-area: hero;
  position: relative; overflow: hidden; min-height: 302px; border-radius: 23px; isolation: isolate;
  background: radial-gradient(ellipse at 87% 35%, #7053ad 0%, #503680 42%, transparent 76%),
    linear-gradient(110deg, #33234f 25%, #443069 100%);
  color: #fff; display: flex; align-items: center; box-shadow: 0 6px 16px #2816401d;
}
.hero-copy {
  position: relative; z-index: 2; padding: 29px 20px 29px 34px; width: 68%;
}
.hero h2 {
  max-width: 14ch; font-size: clamp(2.25rem, 4vw, 3.55rem);
  line-height: 1.02; letter-spacing: -.075em; text-wrap: balance;
}
.hero p {
  max-width: 31ch; margin-top: 12px; color: #eee5fd; font-size: .96rem; line-height: 1.53;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.hero-tags span {
  border-radius: 7px; border: 1px solid #e8dafa56; background: #21123452;
  padding: 4px 8px; color: #f8eeff; font-weight: 750; font-size: .77rem;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin-top: 19px; }
.hero .button { min-height: 43px; white-space: normal; text-align: center; }
.hero-secondary { display: inline-flex; min-height: 41px; align-items: center; color: #eee5fd; font-size: .85rem; font-weight: 750; }
.hero-secondary:hover { color: #fff; text-decoration: underline; }
.hero-art {
  position: absolute; z-index: 1; pointer-events: none; width: clamp(160px, 47%, 350px);
  height: auto; right: 3%; top: 50%; transform: translateY(-50%) rotate(-5deg);
  filter: drop-shadow(4px 22px 24px #1a0b3055);
}
.orbit { position: absolute; z-index: -1; pointer-events: none; border: 1px solid #ece1ff34; border-radius: 38%; transform: rotate(-31deg); }
.orbit-one { width: 53%; aspect-ratio: 1; right: -3%; top: -13%; }
.orbit-two { width: 67%; aspect-ratio: 1; right: -4%; top: -29%; }
.activity {
  grid-area: activity;
  min-width: 0; display: flex; flex-direction: column;
  padding: 22px 22px 19px; background: #fffdfb; border-color: #eee6e0;
}
.activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.activity h2, .section-heading h2, .settings-panel h2 { font-size: 1.2rem; letter-spacing: -.042em; }
.streak-icon {
  width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0;
  background: #fdefdc; color: #9c5426; border-radius: 14px;
}
.streak-number { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 15px; }
.streak-number strong {
  font-size: clamp(2.9rem, 4vw, 4.1rem); line-height: 1; letter-spacing: -.088em;
  font-variant-numeric: tabular-nums;
}
.streak-number > span { color: var(--muted); font-weight: 750; font-size: .94rem; }
.streak-week { margin: auto 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.streak-day { display: grid; justify-items: center; color: #685b71; gap: 7px; font-size: .76rem; }
.streak-day-label { font-weight: 750; }
.streak-date {
  width: min(100%, 38px); aspect-ratio: 1; border-radius: 11px; display: grid; place-items: center;
  font-weight: 800; border: 1px solid #eee8f0; background: #f7f4f8;
}
.streak-day.has-practice .streak-date { border-color: #ddebda; background: #e1f3db; color: #316447; }
.streak-day.is-today .streak-date { outline: 1.5px solid #8a67bb; outline-offset: 2px; }
.streak-day.is-today .streak-day-label { color: #654696; }
.streak-footer {
  display: flex; gap: 7px; justify-content: space-between; flex-wrap: wrap; align-items: center;
  border-top: 1px solid #efe8e6; margin-top: 19px; padding-top: 13px; color: var(--muted); font-size: .78rem;
}
.streak-footer > span { display: flex; align-items: center; gap: 6px; }
.streak-footer strong { color: #5a404e; font-weight: 800; }
.streak-dot { width: 7px; height: 7px; border-radius: 50%; background: #b26d37; flex: 0 0 7px; }
.streak-dot-done { background: #48865e; }

.session-controls {
  grid-area: controls; display: grid; grid-template-columns: minmax(115px, 1fr) minmax(260px, 1.35fr) auto;
  align-items: center; gap: 10px 19px; padding: 17px 22px;
  min-width: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 17px; box-shadow: var(--shadow);
}
.session-controls-header h3 { font-size: 1rem; font-weight: 800; letter-spacing: -.026em; }
.session-controls-header span { display: block; margin-top: 4px; color: var(--muted); font-size: .83rem; }
.session-presets {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  padding: 4px; min-width: 0; background: #f2eef8; border: 1px solid #efe8f4; border-radius: 13px;
}
.session-preset {
  min-height: 40px; border-radius: 9px; border: 1px solid transparent; padding: 3px 5px;
  background: transparent; color: #62526e; font-size: .88rem; font-weight: 800; white-space: nowrap;
}
.session-preset:hover { background: #e9e0f3; color: var(--ink); }
.session-preset[aria-pressed=true] {
  background: #fff; border-color: #e8dff2; color: var(--accent); box-shadow: 0 1px 5px #34234c13;
}
.session-custom summary {
  list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 7px;
  font-size: .83rem; color: var(--accent); font-weight: 800; padding: 3px 6px;
}
.session-custom summary::-webkit-details-marker { display: none; }
.session-custom summary::before { content: '+'; font-size: 1.05rem; width: 14px; text-align: center; }
.session-custom[open] { grid-column: 1 / -1; }
.session-custom[open] summary::before { content: '−'; }
.session-custom[open] summary { padding-inline: 0; }
.session-custom > form {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 15px;
  margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--line);
}
.session-custom > form .form-error { order: 2; flex-basis: 100%; margin-top: 0; }
.session-limits { display: flex; flex-wrap: wrap; align-items: end; gap: 9px 14px; }
.session-custom .session-limits .field { margin-bottom: 0; }
.session-limits input { width: min(112px, 100%); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-top: 19px; }
.stat-tile {
  background: white; border: 1px solid var(--line); padding: 16px 17px;
  display: flex; align-items: center; gap: 13px; border-radius: 15px; box-shadow: var(--shadow);
}
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
}
.lilac { background: #eee9ff; color: #6449d4; }
.mint { background: #e1f7ee; color: #247e65; }
.peach { background: #fcefe5; color: #9c542b; }
.stat-tile strong { display: block; font-size: 1.47rem; line-height: 1.06; letter-spacing: -.055em; }
.stat-tile div > span { display: block; margin-top: 5px; font-size: .79rem; color: var(--muted); }
.recent { margin-top: 22px; }
.section-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--line); padding: 17px 22px;
}
.section-heading a { color: var(--accent); font-size: .88rem; font-weight: 800; }
.section-heading a:hover { text-decoration: underline; }
.word-list { list-style: none; margin: 0; padding: 0 22px; }
.word-row {
  display: grid; grid-template-columns: 39px minmax(0, 1fr) max-content 33px; gap: 12px; align-items: center;
  min-height: 65px; padding: 8px 0; border-top: 1px solid var(--line);
}
.word-row:first-child { border-top: 0; }
.word-initial {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  font-size: 1rem; font-weight: 800;
}
.initial-0 { background: #ede8fd; color: #624ab9; }
.initial-1 { background: #e5f6ef; color: #277561; }
.initial-2 { background: #e9f1ff; color: #405f9f; }
.initial-3 { background: #f9eee8; color: #945938; }
.word-details {
  border: 0; background: transparent; padding: 2px 0; text-align: left; min-width: 0; color: inherit;
  overflow-wrap: anywhere;
}
.word-details:hover strong { color: var(--accent); }
.word-details strong, .word-details span { display: block; }
.word-details strong { font-size: .98rem; }
.word-details span { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.word-statuses { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 5px; }
.status { padding: 5px 9px; border-radius: 20px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.status-new { background: #efebff; color: #6247c5; }
.status-learning { background: #fdf2df; color: #825922; }
.status-known { background: #e4f6ed; color: #30775f; }
.icon-button {
  border: 0; min-width: 34px; min-height: 34px; display: inline-grid; place-items: center;
  border-radius: 8px; color: var(--muted); background: transparent; padding: 5px;
}
.icon-button:hover { background: #f1ecff; color: var(--accent); }
.list-empty {
  padding: 38px 16px; display: grid; justify-items: center; row-gap: 13px; text-align: center; color: var(--muted);
}
.list-empty > svg { color: var(--accent); }

.dictionary-controls { border-bottom: 1px solid var(--line); padding: 18px 22px 14px; }
.dictionary-toolbar { margin-bottom: 13px; }
.search-field {
  display: flex; align-items: center; gap: 9px; width: min(100%, 520px); padding: 0 10px 0 12px;
  border: 1px solid #e5dfef; border-radius: 11px; color: var(--muted); background: #faf8fd;
}
.search-field:focus-within { outline: 2px solid #b2a1ff; }
.search-field input {
  min-width: 0; flex: 1; min-height: 44px; padding: 7px 0; border: 0; outline: 0;
  background: transparent; color: var(--ink); font-size: 1rem;
}
.search-field input::-webkit-search-cancel-button { display: none; }
.search-clear { min-height: 34px; }
.dictionary-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-tab, .sort-field select {
  min-height: 39px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: #645972; padding: 6px 11px; font-size: .84rem; font-weight: 750;
}
.filter-tab:hover { background: #f5effa; }
.filter-tab[aria-pressed=true] { border-color: #ded0f3; color: var(--accent); background: #f1eafb; }
.sort-field { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.sort-field select { appearance: none; cursor: pointer; padding-right: 25px; background: #fff; }
.sort-field { position: relative; }
.sort-field::after {
  content: ''; pointer-events: none; position: absolute; right: 11px; top: 14px;
  width: 6px; height: 6px; border: solid var(--accent); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.dictionary-count { color: var(--muted); font-size: .8rem; margin-top: 12px; min-height: 1.35em; }
.dictionary-count:empty { margin-top: 0; min-height: 0; }
.duplicate-hint { color: #77542b; font-size: .81rem; font-weight: 700; margin: -5px 0 15px; }
.button-add-another { white-space: normal; }
.settings-panel { max-width: 720px; padding: 23px; margin-bottom: 17px; }
.settings-panel p { margin: 8px 0 16px; color: var(--muted); line-height: 1.65; }
.settings-panel > .button { margin-top: 12px; }
.settings-panel .button { margin-bottom: 5px; }
.settings-panel .field.compact { margin-bottom: 24px; }
.settings-panel .field input:not([type=number]) { max-width: 320px; }
.field {
  display: block; margin-bottom: 15px; color: var(--ink); font-size: .9rem; font-weight: 800;
}
.field > span { color: var(--muted); font-weight: 600; margin-left: 5px; font-size: .78rem; }
.field input, .field textarea {
  display: block; width: 100%; margin-top: 6px; border: 1px solid #ded9e9; border-radius: 9px;
  background: #fcfbff; color: var(--ink); padding: 10px 12px; font-weight: 650; font-size: 1rem;
}
.field textarea { resize: vertical; }
.field small { display: block; color: var(--muted); font-weight: 600; margin-top: 5px; line-height: 1.45; }
.field.compact input { width: min(150px, 100%); }
.field ::placeholder, .search-field ::placeholder { color: #726a83; opacity: 1; }
.check-field {
  display: flex; align-items: start; gap: 9px; font-size: .87rem; cursor: pointer;
}
.check-field input { width: 17px; height: 17px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--accent); }
.check-field small { display: block; color: var(--muted); margin-top: 3px; font-size: .79rem; }
dialog {
  width: min(calc(100% - 24px), 510px); max-height: calc(100dvh - 26px); padding: 22px;
  border-radius: 17px; border: 1px solid var(--line); color: var(--ink); box-shadow: 0 20px 70px #20164d40;
}
dialog::backdrop { background: #22193b72; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 17px; }
.dialog-heading h2 { font-size: 1.4rem; letter-spacing: -.045em; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.form-error { margin-top: 10px; color: #a52e48; font-size: .86rem; }
.word-options { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.word-options summary { cursor: pointer; color: var(--accent); font-weight: 800; }
.word-options .field { margin-top: 12px; }
.edit-conflict { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #f9f7fe; margin-top: 9px; overflow-wrap: anywhere; }
.edit-conflict p { margin: 0 0 7px; }
.edit-conflict .button { white-space: normal; text-align: center; }
#notice {
  position: fixed; z-index: 5; bottom: 20px; right: 24px; padding: 11px 16px;
  background: #2e2253; color: #fff; border-radius: 10px; font-size: .88rem;
  box-shadow: 0 7px 25px #21154425; opacity: 0; pointer-events: none; transition: opacity .16s;
  max-width: calc(100vw - 28px);
}
#notice.visible { opacity: 1; }
.practice-page { max-width: 830px; margin: 0 auto; }
.practice-top { display: flex; align-items: center; gap: 11px; margin: 0 0 15px; font-size: .88rem; color: var(--muted); }
.practice-timer {
  display: inline-flex; gap: 6px; align-items: center; color: #584376;
  background: #eee6f8; padding: 7px 9px; border-radius: 8px; font-variant-numeric: tabular-nums;
}
.practice-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.practice-result { max-width: 40ch; }
.progress-track { height: 7px; border-radius: 12px; background: #e8e1fa; overflow: hidden; flex: 1; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress-0 { width: 0; } .progress-1 { width: 10%; } .progress-2 { width: 20%; }
.progress-3 { width: 30%; } .progress-4 { width: 40%; } .progress-5 { width: 50%; }
.progress-6 { width: 60%; } .progress-7 { width: 70%; } .progress-8 { width: 80%; }
.progress-9 { width: 90%; } .progress-10 { width: 100%; }
.practice-card, .practice-empty {
  padding: clamp(24px, 4vw, 44px); text-align: center; min-height: 275px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.practice-card .chip { background: #f1ebff; border-radius: 20px; padding: 5px 11px; font-size: .75rem; color: #5a41a5; }
.practice-prompt { color: var(--muted); font-size: .88rem; margin-top: 16px; }
.practice-term { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 7px; }
.practice-term h2 { font-size: clamp(1.55rem, 5vw, 2.65rem); letter-spacing: -.055em; overflow-wrap: anywhere; min-width: 0; }
.speech { background: #f3edff; color: var(--accent); }
.practice-example { color: var(--muted); margin-top: 8px; overflow-wrap: anywhere; max-width: 58ch; }
.answer { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 20px; width: min(100%, 510px); }
.answer .practice-term { margin-top: 0; }
.answer strong { font-size: 1.25rem; overflow-wrap: anywhere; min-width: 0; }
.answer .practice-example { margin-inline: auto; }
.reveal { width: 100%; margin-top: 15px; min-height: 49px; }
kbd {
  display: inline-block; font: inherit; font-size: .67rem; opacity: .85;
  border-radius: 5px; border: 1px solid currentColor; padding: 1px 4px; min-width: 19px;
}
.grade-hint { margin-top: 14px; color: var(--muted); text-align: center; font-size: .88rem; }
.grades { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 9px; }
.grade {
  min-height: 48px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  border: 1px solid transparent; border-radius: 9px; font-size: .9rem; font-weight: 800; padding: 8px 5px;
}
.grade:hover { border-color: currentColor; }
.again { background: #fdecf0; color: #9e3653; }
.hard { background: #fcf0dc; color: #865718; }
.good { background: #e1f5ea; color: #2a7155; }
.completion-icon {
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px;
  background: #efeaff; color: var(--accent); margin-bottom: 14px;
}
.practice-empty h2 { font-size: 1.5rem; letter-spacing: -.04em; }
.practice-empty p { color: var(--muted); margin: 6px 0 17px; }
.login-layout { display: grid; min-height: 100dvh; place-items: center; padding: 14px; }
.login-card { width: min(100%, 405px); padding: 27px; }
.login-card h1 { margin: 20px 0 17px; font-size: 1.85rem; letter-spacing: -.05em; }
.login-card p:not(.form-error) { margin-bottom: 14px; }
.login-card .button { margin-top: 5px; width: 100%; }

@media (min-width: 1500px) {
  .main { margin-right: auto; }
}
@media (max-width: 1070px) {
  .shell { --sidebar-width: 187px; }
  .sidebar { padding-inline: 13px; }
  .hero-copy { padding-left: 23px; }
  .activity { padding-inline: 17px; }
}
@media (max-width: 880px) and (min-width: 721px) {
  .shell { --sidebar-width: 65px; }
  .sidebar { padding: 28px 7px 18px; align-items: center; }
  .sidebar .brand { margin: 0; }
  .sidebar .brand > span:last-child, .sidebar-footer > div { display: none; }
  .navigation { width: 100%; }
  .nav-link { justify-content: center; padding: 13px 8px; }
  .nav-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sidebar-footer { padding-inline: 0; }
}
@media (max-width: 720px) {
  .shell { --sidebar-width: 0px; }
  .sidebar {
    position: static; width: 100%; padding: 11px 15px; flex-direction: row; align-items: center;
    justify-content: space-between; gap: 15px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .sidebar .brand { margin-left: 0; }
  .sidebar .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .sidebar .brand-mark svg { width: 20px; height: 20px; }
  .sidebar-footer { display: none; }
  .navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .nav-link { justify-content: center; gap: 6px; min-height: 39px; padding: 8px 9px; font-size: .76rem; }
  .main { padding: 23px 15px 34px; }
  .page-heading { margin-bottom: 20px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "controls" "activity"; gap: 14px; }
  .hero { min-height: 267px; }
  .hero-copy { padding: 22px 14px 22px 23px; }
  .activity { min-height: 246px; }
  .streak-number { margin-bottom: 15px; }
  .stats { margin-top: 14px; gap: 9px; }
  .stat-tile { padding: 12px; }
  .recent { margin-top: 16px; }
}
@media (max-width: 485px) {
  .sidebar {
    position: fixed; inset: auto 0 0; border-bottom: 0; border-top: 1px solid #453652;
    padding: 5px 9px calc(5px + env(safe-area-inset-bottom)); background: var(--sidebar);
  }
  .sidebar .brand { display: none; }
  .navigation { flex: 1; }
  .nav-link { flex-direction: column; gap: 3px; min-height: 48px; padding: 5px 4px; font-size: .71rem; }
  .main { padding: 23px 14px calc(80px + env(safe-area-inset-bottom)); }
  .page-heading h1 { font-size: 1.95rem; }
  .page-heading p { font-size: .82rem; }
  .page-heading > .button { padding-inline: 10px; font-size: .75rem; }
  .hero { min-height: 254px; }
  .hero-copy { width: 73%; padding-left: 18px; }
  .hero h2 { max-width: 10ch; font-size: 2.42rem; }
  .hero p { font-size: .82rem; max-width: 23ch; }
  .hero-art { width: 48%; right: -7%; top: 51%; opacity: .98; }
  .hero-tags { margin-top: 12px; }
  .hero-tags span { font-size: .7rem; }
  .hero-actions { margin-top: 14px; }
  .session-controls { grid-template-columns: minmax(0, 1fr) max-content; padding: 11px 12px; gap: 7px 10px; }
  .session-presets { grid-row: 2; grid-column: 1 / -1; }
  .session-custom { grid-column: 2; grid-row: 1; }
  .session-custom[open] { grid-column: 1 / -1; grid-row: 3; }
  .session-custom summary { min-height: 40px; }
  .session-custom > form { gap: 6px 10px; }
  .session-custom .session-limits { flex: 1; }
  .session-custom .session-limits .field { flex: 1; min-width: 62px; }
  .session-custom .session-limits .field input { width: 100%; }
  .activity { padding: 16px 16px 13px; min-height: 236px; }
  .streak-date { width: min(100%, 34px); }
  .streak-number { margin-bottom: 17px; }
  .stats { gap: 7px; }
  .stat-tile { gap: 8px; padding: 10px; flex-direction: column; align-items: flex-start; }
  .stat-tile .stat-icon { width: 34px; height: 34px; border-radius: 8px; }
  .stat-tile svg { width: 18px; height: 18px; }
  .stat-tile strong { font-size: 1.22rem; }
  .stat-tile div > span { font-size: .73rem; }
  .section-heading, .dictionary-controls { padding-inline: 13px; }
  .filter-tab, .sort-field select { min-height: 40px; padding: 5px 8px; font-size: .78rem; }
  .sort-field select { padding-right: 24px; }
  .filter-tabs { gap: 4px; }
  .dialog-actions .button { white-space: normal; }
  .dialog-actions .button-add-another { flex-basis: 100%; order: 2; }
  .practice-timer { padding: 6px; }
  .word-list { padding-inline: 13px; }
  .word-row { grid-template-columns: 33px minmax(0,1fr) 32px; gap: 5px 7px; }
  .word-initial { width: 33px; height: 33px; border-radius: 8px; }
  .word-statuses { grid-column: 2; grid-row: 2; }
  .row-edit { grid-column: 3; grid-row: 1; min-width: 32px; }
  .status { padding-inline: 6px; font-size: .68rem; }
  #notice { right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); }
  .grades { gap: 6px; }
  .grade { font-size: .81rem; }
  .grade kbd, .reveal kbd { display: none; }
}
@media (max-width: 615px) and (min-width: 486px) {
  .session-controls { grid-template-columns: minmax(0, 1fr) max-content; }
  .session-presets { grid-row: 2; grid-column: 1 / -1; }
  .session-custom { grid-column: 2; grid-row: 1; }
  .session-custom[open] { grid-column: 1 / -1; grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
