:root {
  --ink: #173d3a;
  --ink-2: #285a55;
  --paper: #f4efe4;
  --paper-2: #fffdf7;
  --sun: #e1ad49;
  --sun-dark: #b57b21;
  --coral: #d66850;
  --mint: #8fc5ad;
  --muted: #6f7771;
  --line: rgba(23, 61, 58, 0.12);
  --shadow: 0 18px 55px rgba(23, 61, 58, 0.12);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 100% 0%, rgba(225, 173, 73, 0.22), transparent 34%),
    radial-gradient(circle at 0% 80%, rgba(143, 197, 173, 0.18), transparent 40%),
    var(--paper);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(225, 173, 73, 0.72);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(102px + env(safe-area-inset-bottom));
  animation: fade-in 260ms ease both;
}

.page.no-nav {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--sun-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 8vw, 3.35rem);
}

h2 {
  margin-bottom: 12px;
  font-size: 1.65rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.82rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sync-chip {
  display: none;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(143, 197, 173, 0.24);
  color: var(--ink-2);
  font-size: 0.62rem;
  font-weight: 800;
}

.sync-chip.offline {
  display: inline-flex;
  background: rgba(214, 104, 80, 0.12);
  color: #9b3f2d;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px 13px 13px 5px;
  background: var(--ink);
  color: var(--paper-2);
  box-shadow: 0 9px 22px rgba(23, 61, 58, 0.22);
}

.icon-button,
.back-button {
  display: inline-grid;
  min-width: 44px;
  height: 44px;
  padding: 0 13px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 247, 0.74);
  cursor: pointer;
}

.language-hero {
  display: grid;
  min-height: calc(100dvh - 44px);
  align-content: center;
  gap: 28px;
}

.language-intro {
  max-width: 440px;
}

.language-intro p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.language-grid {
  display: grid;
  gap: 14px;
}

.language-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 19px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 26px;
  background: var(--ink);
  color: white;
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.language-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -55px;
  width: 160px;
  height: 160px;
  border: 28px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.language-card.arabic {
  background: #79512c;
}

.language-card:active {
  transform: scale(0.985);
}

.language-symbol {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.13);
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.language-name {
  display: block;
  margin-bottom: 5px;
  font-family: Georgia, serif;
  font-size: 1.42rem;
  font-weight: 700;
}

.language-meta {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.arrow {
  position: relative;
  z-index: 1;
  font-size: 1.45rem;
}

.install-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.62);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.install-note strong {
  color: var(--ink);
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.course-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.7);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 750;
}

.streak-badge {
  display: grid;
  min-width: 72px;
  padding: 12px 9px;
  justify-items: center;
  border-radius: 21px;
  background: var(--sun);
  color: #3f2a0c;
  box-shadow: 0 12px 30px rgba(181, 123, 33, 0.19);
}

.streak-badge strong {
  font-size: 1.35rem;
}

.streak-badge span {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  border-radius: 30px 30px 30px 10px;
  background: var(--ink);
  color: white;
  box-shadow: 0 22px 50px rgba(23, 61, 58, 0.2);
}

.daily-card::after {
  content: "";
  position: absolute;
  top: -58px;
  right: -50px;
  width: 170px;
  height: 170px;
  border: 30px solid rgba(225, 173, 73, 0.22);
  border-radius: 50%;
}

.daily-label {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.daily-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 7px 0 18px;
}

.daily-count strong {
  font-family: Georgia, serif;
  font-size: 3.1rem;
  line-height: 1;
}

.daily-count span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.86rem;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 48px;
  padding: 12px 17px;
  border: 0;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--sun);
  color: #38270d;
  box-shadow: 0 10px 25px rgba(225, 173, 73, 0.22);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
}

.ghost-button {
  min-height: auto;
  padding: 8px 0;
  background: transparent;
  color: var(--ink-2);
}

.danger-button {
  background: rgba(214, 104, 80, 0.11);
  color: #9b3f2d;
}

.primary-button:disabled,
.secondary-button:disabled,
.rating-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.daily-card .primary-button {
  position: relative;
  z-index: 1;
  width: 100%;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 2px 13px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section-head span,
.section-head button {
  color: var(--muted);
  font-size: 0.78rem;
}

.lesson-list {
  display: grid;
  gap: 11px;
}

.lesson-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255, 253, 247, 0.78);
  text-align: left;
  box-shadow: 0 8px 25px rgba(23, 61, 58, 0.055);
  cursor: pointer;
}

.lesson-card.level-card {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}

.lesson-copy {
  min-width: 0;
}

.lesson-level {
  font-family: Georgia, serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.lesson-index {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 17px;
  background: rgba(143, 197, 173, 0.28);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 800;
}

.lesson-card:nth-child(3n + 2) .lesson-index {
  background: rgba(225, 173, 73, 0.24);
}

.lesson-card:nth-child(3n + 3) .lesson-index {
  background: rgba(214, 104, 80, 0.16);
}

.lesson-title {
  display: block;
  margin-bottom: 5px;
  font-weight: 820;
}

.lesson-detail {
  color: var(--muted);
  font-size: 0.76rem;
}

.ring {
  --value: 0;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--sun) calc(var(--value) * 1%), rgba(23, 61, 58, 0.09) 0);
}

.ring::after {
  content: attr(data-label);
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-2);
  font-size: 0.65rem;
  font-weight: 820;
}

.bottom-nav {
  position: fixed;
  z-index: 15;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(calc(100% - 28px), 532px);
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 23px;
  background: rgba(23, 61, 58, 0.93);
  box-shadow: 0 18px 45px rgba(23, 61, 58, 0.28);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-nav.three {
  grid-template-columns: repeat(3, 1fr);
}

.nav-button {
  display: grid;
  gap: 3px;
  min-height: 54px;
  place-items: center;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.65rem;
  font-weight: 720;
  cursor: pointer;
}

.nav-button .nav-icon {
  font-size: 1.2rem;
}

.nav-button.active {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.study-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.study-head-center {
  min-width: 0;
  text-align: center;
}

.study-head-center strong,
.study-head-center span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-head-center span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.progress-track {
  height: 7px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 61, 58, 0.09);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sun);
  transition: width 250ms ease;
}

.flashcard {
  display: grid;
  min-height: min(50vh, 410px);
  padding: 28px 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 34px 34px 34px 12px;
  background: var(--paper-2);
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  perspective: 1000px;
  user-select: none;
}

.flashcard-inner {
  width: 100%;
}

.card-kicker {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(143, 197, 173, 0.2);
  color: var(--ink-2);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.level-pill {
  padding: 7px 10px;
  border-radius: 999px;
  color: white;
  font-size: 0.69rem;
  font-weight: 820;
}

.level-pill.level-0 {
  color: var(--ink);
}

.card-word {
  margin: 38px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 10vw, 4.4rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.card-word[dir="rtl"] {
  font-family: "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
  font-size: clamp(2.65rem, 12vw, 5rem);
  letter-spacing: 0;
  line-height: 1.35;
}

.card-translation {
  animation: answer-in 220ms ease both;
}

@keyframes answer-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.transliteration {
  margin: -8px 0 22px;
  color: var(--muted);
  font-size: 0.94rem;
  font-style: italic;
}

.tap-hint {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.answer-panel {
  margin-top: 18px;
}

.reveal-button {
  width: 100%;
  min-height: 56px;
  border-radius: 18px;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rating-button {
  min-height: 66px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 247, 0.8);
  cursor: pointer;
}

.rating-button strong,
.rating-button span {
  display: block;
}

.rating-button strong {
  margin-bottom: 4px;
  font-size: 0.74rem;
}

.rating-button span {
  color: var(--muted);
  font-size: 0.64rem;
}

.rating-button.again { color: #a64230; }
.rating-button.hard { color: #8b611d; }
.rating-button.good { color: #1f7058; }

.completion {
  display: grid;
  min-height: calc(100dvh - 70px);
  align-content: center;
  justify-items: center;
  text-align: center;
}

.completion-mark {
  display: grid;
  width: 92px;
  height: 92px;
  margin-bottom: 25px;
  place-items: center;
  border-radius: 31px 31px 31px 10px;
  background: var(--ink);
  color: var(--sun);
  font-size: 2.5rem;
  box-shadow: var(--shadow);
}

.completion p {
  max-width: 330px;
  color: var(--muted);
  line-height: 1.55;
}

.completion-actions {
  display: grid;
  width: 100%;
  gap: 10px;
  margin-top: 15px;
}

.selector-list {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.selector-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 253, 247, 0.75);
}

.selector-row input {
  width: 21px;
  height: 21px;
  accent-color: var(--ink);
}

.selector-row strong,
.selector-row span {
  display: block;
}

.selector-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin: 20px 0 28px;
}

.stat-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255, 253, 247, 0.75);
}

.stat-card strong {
  display: block;
  margin-bottom: 5px;
  font-family: Georgia, serif;
  font-size: 1.8rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.75rem;
}

.chart-card {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.78);
}

.device-data-card {
  border-color: rgba(143, 197, 173, 0.45);
  background: linear-gradient(145deg, rgba(255, 253, 247, 0.9), rgba(143, 197, 173, 0.12));
}

.backup-actions {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.backup-actions .secondary-button,
.backup-actions .ghost-button {
  width: 100%;
}

.storage-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.week-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 142px;
  margin-top: 18px;
}

.day-column {
  display: grid;
  height: 100%;
  grid-template-rows: 1fr auto;
  align-items: end;
  justify-items: center;
  gap: 8px;
}

.day-bar-wrap {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: end;
}

.day-bar {
  width: 100%;
  min-height: 5px;
  border-radius: 999px 999px 7px 7px;
  background: var(--mint);
}

.day-column.today .day-bar {
  background: var(--sun);
}

.day-column span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
}

.mastery-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.lesson-stat {
  display: grid;
  gap: 9px;
}

.lesson-stat > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 0.78rem;
}

.lesson-stat span {
  color: var(--muted);
}

.level-bar {
  display: flex;
  width: 100%;
  height: 9px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 61, 58, 0.08);
}

.level-bar span {
  min-width: 2px;
}

.level-0 { background: #c8cbc7; }
.level-1 { background: #d65b4a; }
.level-2 { background: #e58b3a; }
.level-3 { background: #e5bd3f; }
.level-4 { background: #8fcf88; }
.level-5 { background: #2f8b62; }

.level-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
  margin-top: 18px;
}

.level-legend span {
  display: grid;
  grid-template-columns: 11px 1fr auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
}

.level-legend i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.level-legend strong {
  color: var(--ink);
}

.mastery-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
}

.mastery-row strong,
.mastery-row span {
  font-size: 0.78rem;
}

.mastery-row span {
  color: var(--muted);
}

.mastery-track {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 61, 58, 0.08);
}

.mastery-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink-2);
}

.admin-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 20px 0;
  padding: 5px;
  border-radius: 17px;
  background: rgba(23, 61, 58, 0.08);
}

.admin-tab {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 780;
  cursor: pointer;
}

.admin-tab.active {
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 5px 15px rgba(23, 61, 58, 0.08);
}

.form-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.76);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.field label {
  font-size: 0.76rem;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid rgba(23, 61, 58, 0.15);
  border-radius: 15px;
  background: var(--paper-2);
  color: var(--ink);
}

.field input::placeholder {
  color: #9a9e99;
}

.form-card .primary-button {
  width: 100%;
}

.course-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 20px;
  background: var(--ink);
  color: white;
}

.course-summary span {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.73rem;
}

.course-summary strong {
  display: block;
  margin-top: 3px;
}

.empty-state {
  padding: 28px 20px;
  border: 1px dashed rgba(23, 61, 58, 0.2);
  border-radius: 21px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.toast {
  position: fixed;
  z-index: 99;
  right: 50%;
  bottom: calc(94px + env(safe-area-inset-bottom));
  max-width: calc(100% - 36px);
  padding: 11px 15px;
  border-radius: 14px;
  background: #112f2d;
  color: white;
  box-shadow: 0 14px 35px rgba(23, 61, 58, 0.3);
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(50%, 0);
}

/* Oddzielny panel administratora */
.admin-body {
  min-width: 980px;
  background: #eee9de;
}

.admin-shell {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}

.admin-header h1 {
  margin: 0;
  font-size: 2.6rem;
}

.admin-login {
  display: grid;
  min-height: 60vh;
  place-items: center;
}

.admin-login-card {
  width: min(100%, 430px);
  box-shadow: var(--shadow);
}

.admin-login-card .primary-button {
  width: 100%;
}

.form-error {
  min-height: 1.2em;
  margin: 13px 0 0;
  color: #a64230;
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-editor[hidden],
.admin-login[hidden] {
  display: none;
}

.admin-toolbar {
  position: sticky;
  z-index: 8;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 12px 35px rgba(23, 61, 58, 0.12);
  backdrop-filter: blur(12px);
}

.admin-toolbar strong,
.admin-toolbar span {
  display: block;
}

.admin-toolbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.admin-toolbar span.dirty {
  color: var(--sun-dark);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-help {
  margin-bottom: 13px;
  padding: 12px 15px;
  border-radius: 15px;
  background: rgba(143, 197, 173, 0.18);
  color: var(--ink-2);
  font-size: 0.8rem;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-2);
  box-shadow: 0 15px 45px rgba(23, 61, 58, 0.08);
}

.content-table {
  width: 100%;
  min-width: 1380px;
  border-collapse: separate;
  border-spacing: 0;
}

.content-table th {
  position: sticky;
  z-index: 4;
  top: 0;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: white;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-align: left;
  white-space: nowrap;
}

.content-table td {
  padding: 5px;
  border-bottom: 1px solid rgba(23, 61, 58, 0.08);
}

.content-table tr:nth-child(even) td {
  background: rgba(244, 239, 228, 0.38);
}

.content-table input {
  width: 100%;
  min-width: 132px;
  height: 42px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
}

.content-table input[data-field="lessonNumber"] {
  min-width: 70px;
  width: 70px;
}

.content-table input:focus {
  border-color: rgba(23, 61, 58, 0.22);
  background: white;
  outline: 3px solid rgba(225, 173, 73, 0.25);
}

.row-delete {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #a64230;
  font-size: 1.25rem;
  cursor: pointer;
}

.row-delete:hover {
  background: rgba(214, 104, 80, 0.1);
}

@media (min-width: 720px) {
  .app-shell {
    margin-block: 24px;
    min-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid rgba(23, 61, 58, 0.08);
    border-radius: 34px;
    background: rgba(244, 239, 228, 0.82);
    box-shadow: 0 30px 80px rgba(23, 61, 58, 0.14);
  }

  .page {
    min-height: calc(100vh - 48px);
  }

  .bottom-nav {
    bottom: 36px;
  }
}

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