/* ============================================================
   Chess Academy — App Design System
   Theme: Dark + Gold (Chess aesthetic)
   Direction: RTL (Arabic-first)
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   0. IMPORTS & CUSTOM PROPERTIES
   ────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Amiri:wght@400;700&display=swap');

:root {
  /* Core palette */
  --bg: #080810;
  --bg-card: #10101c;
  --bg-hover: #1a1a28;
  --gold: #d4a843;
  --gold-dim: #9a7830;
  --gold-glow: rgba(212, 168, 67, 0.12);
  --silver: #8a9bb0;
  --text: #e8e4dd;
  --text-dim: #5a5650;
  --success: #4ac878;
  --error: #c44444;
  --info: #5588cc;
  --warning: #cc8844;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-xs: 4px;

  /* Phase accent colors */
  --phase-1: #4ac878;
  --phase-2: #5588cc;
  --phase-3: #cc4444;
  --phase-4: #cc8844;
  --phase-5: #8844cc;
  --phase-6: #d4a843;

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.5rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 24px rgba(212, 168, 67, 0.15);

  /* Header height for offset */
  --header-height: 60px;
}


/* ──────────────────────────────────────────────────────────────
   1. RESET & BASE
   ────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', sans-serif;
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.4;
  color: var(--text);
  background-color: var(--bg);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

::selection {
  background: var(--gold);
  color: var(--bg);
}


/* ──────────────────────────────────────────────────────────────
   2. SCROLLBAR
   ────────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) var(--bg);
}


/* ──────────────────────────────────────────────────────────────
   3. TYPOGRAPHY
   ────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Amiri', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  line-height: 1.4;
  margin-block-end: var(--space-4);
}

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }

.text-gold { color: var(--gold); }
.text-dim { color: var(--text-dim); }
.text-silver { color: var(--silver); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }


/* ──────────────────────────────────────────────────────────────
   4. LAYOUT — .app
   ────────────────────────────────────────────────────────────── */

.app {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: var(--space-6);
  padding-block-start: calc(var(--header-height) + var(--space-8));
  padding-block-end: var(--space-16);
  min-height: 100vh;
}


/* ──────────────────────────────────────────────────────────────
   5. HEADER
   ────────────────────────────────────────────────────────────── */

.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--space-6);
  background: rgba(8, 8, 16, 0.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-block-end: 1px solid rgba(212, 168, 67, 0.1);
}

.header-title {
  font-family: 'Amiri', serif;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.header-xp {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gold);
}

.header-xp .level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-glow);
  border: 1.5px solid var(--gold-dim);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gold);
}

.header-streak {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--warning);
}

.header-streak .fire-icon::before {
  content: '\1F525';
  font-size: var(--text-base);
}

.header-progress {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  height: 3px;
  background: rgba(212, 168, 67, 0.08);
  overflow: hidden;
}

.header-progress .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 0 3px 3px 0;
  transition: width var(--transition-slow);
}


/* ──────────────────────────────────────────────────────────────
   6. PHASE LIST / GRID
   ────────────────────────────────────────────────────────────── */

.phase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-block: var(--space-8);
  animation: fadeIn 0.4s var(--ease-out);
}

.phase-card {
  position: relative;
  padding: var(--space-6);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all var(--transition-base);
  overflow: hidden;
  animation: slideUp 0.4s var(--ease-out) backwards;
}

.phase-card:nth-child(1) { animation-delay: 0ms; }
.phase-card:nth-child(2) { animation-delay: 60ms; }
.phase-card:nth-child(3) { animation-delay: 120ms; }
.phase-card:nth-child(4) { animation-delay: 180ms; }
.phase-card:nth-child(5) { animation-delay: 240ms; }
.phase-card:nth-child(6) { animation-delay: 300ms; }

.phase-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.phase-card .phase-number {
  font-family: 'Amiri', serif;
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  opacity: 0.12;
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-end: var(--space-4);
}

.phase-card .phase-title {
  font-family: 'Amiri', serif;
  font-size: var(--text-lg);
  font-weight: 700;
  margin-block-end: var(--space-1);
}

.phase-card .phase-subtitle {
  font-size: var(--text-sm);
  color: var(--text-dim);
  margin-block-end: var(--space-4);
}

.phase-card .phase-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.phase-card .phase-progress-bar .fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-slow);
}

.phase-card .phase-lock-icon {
  position: absolute;
  inset-block-start: var(--space-4);
  inset-inline-start: var(--space-4);
  font-size: var(--text-lg);
  opacity: 0.5;
}

/* Phase states */
.phase-card--free {
  border-color: rgba(74, 200, 120, 0.25);
}

.phase-card--free .phase-progress-bar .fill {
  background: var(--phase-1);
}

.phase-card--locked {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.4);
}

.phase-card--locked::after {
  content: '\1F512';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(8, 8, 16, 0.5);
  border-radius: var(--radius);
}

.phase-card--current {
  border-color: rgba(212, 168, 67, 0.3);
  box-shadow: 0 0 24px var(--gold-glow), inset 0 0 24px var(--gold-glow);
  animation: glow 3s ease-in-out infinite;
}

.phase-card--current .phase-title {
  color: var(--gold);
}

.phase-card--completed {
  border-color: rgba(74, 200, 120, 0.15);
}

.phase-card--completed::before {
  content: '\2713';
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-4);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--bg);
  background: var(--success);
  border-radius: 50%;
}

/* Phase accent colors on cards */
.phase-card[data-phase="1"] { --accent: var(--phase-1); }
.phase-card[data-phase="2"] { --accent: var(--phase-2); }
.phase-card[data-phase="3"] { --accent: var(--phase-3); }
.phase-card[data-phase="4"] { --accent: var(--phase-4); }
.phase-card[data-phase="5"] { --accent: var(--phase-5); }
.phase-card[data-phase="6"] { --accent: var(--phase-6); }

.phase-card[data-phase] .phase-title {
  color: var(--accent);
}

.phase-card[data-phase] .phase-progress-bar .fill {
  background: var(--accent);
}


/* ──────────────────────────────────────────────────────────────
   7. CONCEPT LIST
   ────────────────────────────────────────────────────────────── */

.concept-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-block: var(--space-6);
}

.concept-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all var(--transition-fast);
  animation: fadeIn 0.3s var(--ease-out) backwards;
}

.concept-item:hover {
  background: var(--bg-hover);
  border-color: rgba(212, 168, 67, 0.12);
}

.concept-item .concept-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.concept-item .concept-title {
  flex: 1;
  font-weight: 500;
  font-size: var(--text-base);
}

.concept-item .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-dim);
}

/* Concept states */
.concept-item--completed .status-dot {
  background: var(--success);
}

.concept-item--completed .concept-title {
  color: var(--silver);
}

.concept-item--current {
  border-color: rgba(212, 168, 67, 0.2);
  background: var(--bg-hover);
}

.concept-item--current .status-dot {
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}

.concept-item--current .concept-title {
  color: var(--gold);
  font-weight: 700;
}

.concept-item--locked {
  opacity: 0.4;
  pointer-events: none;
}

.concept-item--locked .status-dot {
  background: var(--text-dim);
  opacity: 0.5;
}


/* ──────────────────────────────────────────────────────────────
   8. CONCEPT CONTENT / VIEW
   ────────────────────────────────────────────────────────────── */

.concept-view {
  padding-block: var(--space-8);
  animation: fadeIn 0.4s var(--ease-out);
}

.concept-title {
  font-family: 'Amiri', serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gold);
  margin-block-end: var(--space-2);
  line-height: 1.2;
}

.concept-body {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--text);
  max-width: 65ch;
}

.concept-body p {
  margin-block-end: var(--space-6);
  line-height: 1.85;
}

.concept-body p:last-child {
  margin-block-end: 0;
}

.concept-body strong {
  color: var(--gold);
  font-weight: 700;
}

.concept-body em {
  color: var(--silver);
  font-style: normal;
  font-weight: 500;
}

.concept-body code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  direction: ltr;
  unicode-bidi: embed;
  background: rgba(212, 168, 67, 0.08);
  color: var(--gold);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-xs);
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.concept-body ul,
.concept-body ol {
  padding-inline-start: var(--space-6);
  margin-block-end: var(--space-6);
}

.concept-body li {
  margin-block-end: var(--space-2);
  line-height: 1.7;
}

.concept-body li::marker {
  color: var(--gold-dim);
}

.concept-body hr {
  border: none;
  height: 1px;
  background: rgba(212, 168, 67, 0.1);
  margin-block: var(--space-8);
}


/* ──────────────────────────────────────────────────────────────
   9. SPECIAL BOXES
   ────────────────────────────────────────────────────────────── */

.box {
  position: relative;
  padding: var(--space-5) var(--space-6);
  margin-block: var(--space-6);
  background: var(--bg-card);
  border-radius: var(--radius);
  border-inline-start: 4px solid var(--silver);
}

.box::before {
  display: block;
  font-family: 'Tajawal', sans-serif;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-block-end: var(--space-3);
  opacity: 0.85;
}

.box p {
  margin-block-end: var(--space-3);
  line-height: 1.7;
}

.box p:last-child {
  margin-block-end: 0;
}

/* Mistake box — red */
.box--mistake {
  border-color: var(--error);
  background: rgba(196, 68, 68, 0.06);
}

.box--mistake::before {
  content: '\26A0\FE0F  \0627\0644\062E\0637\0623  \0627\0644\0634\0627\0626\0639';
  color: var(--error);
}

/* Analogy box — blue */
.box--analogy {
  border-color: var(--info);
  background: rgba(85, 136, 204, 0.06);
}

.box--analogy::before {
  content: '\1F4A1  \062A\0634\0628\064A\0647';
  color: var(--info);
}

/* Practice box — green */
.box--practice {
  border-color: var(--success);
  background: rgba(74, 200, 120, 0.06);
}

.box--practice::before {
  content: '\1F3AF  \062A\0645\0631\064A\0646  \0639\0645\0644\064A';
  color: var(--success);
}

/* Tip box — gold */
.box--tip {
  border-color: var(--gold);
  background: var(--gold-glow);
}

.box--tip::before {
  content: '\2728  \0646\0635\064A\062D\0629';
  color: var(--gold);
}

/* History box — purple */
.box--history {
  border-color: var(--phase-5);
  background: rgba(136, 68, 204, 0.06);
}

.box--history::before {
  content: '\1F3DB\FE0F  \0645\0646  \0627\0644\062A\0627\0631\064A\062E';
  color: var(--phase-5);
}

/* Summary box — silver */
.box--summary {
  border-color: var(--silver);
  background: rgba(138, 155, 176, 0.06);
}

.box--summary::before {
  content: '\1F4CB  \0645\0644\062E\0635';
  color: var(--silver);
}


/* ──────────────────────────────────────────────────────────────
   10. CHESS BOARD AREA
   ────────────────────────────────────────────────────────────── */

.board-container {
  direction: ltr;
  margin-block: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.board-container .chess-board {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(212, 168, 67, 0.15);
}

.board-caption {
  direction: rtl;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--silver);
  max-width: 400px;
  line-height: 1.6;
}

.board-sequence-controls {
  display: flex;
  gap: var(--space-3);
  direction: ltr;
}

.board-sequence-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--silver);
  font-size: var(--text-lg);
  transition: all var(--transition-fast);
}

.board-sequence-controls button:hover {
  background: var(--bg-hover);
  color: var(--gold);
  border-color: rgba(212, 168, 67, 0.2);
}

.board-sequence-controls button:active {
  transform: scale(0.95);
}

.board-sequence-controls button:disabled {
  opacity: 0.3;
  pointer-events: none;
}


/* ──────────────────────────────────────────────────────────────
   11. QUIZ
   ────────────────────────────────────────────────────────────── */

.quiz-container {
  padding: var(--space-8) 0;
  animation: fadeIn 0.4s var(--ease-out);
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block-end: var(--space-8);
  font-size: var(--text-sm);
  color: var(--silver);
}

.quiz-progress .progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress .progress-bar .fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width var(--transition-base);
}

.quiz-question {
  font-family: 'Amiri', serif;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.4;
  margin-block-end: var(--space-8);
  color: var(--text);
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-block-end: var(--space-6);
}

.quiz-option {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4) var(--space-5);
  min-height: 56px;
  background: var(--bg-card);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.quiz-option:hover {
  background: var(--bg-hover);
  border-color: rgba(212, 168, 67, 0.25);
  transform: translateY(-1px);
}

.quiz-option:active {
  transform: scale(0.98);
}

.quiz-option--correct {
  background: rgba(74, 200, 120, 0.12);
  border-color: var(--success);
  color: var(--success);
  pointer-events: none;
}

.quiz-option--correct::before {
  content: '\2713';
  margin-inline-end: var(--space-2);
  font-weight: 700;
}

.quiz-option--wrong {
  background: rgba(196, 68, 68, 0.12);
  border-color: var(--error);
  color: var(--error);
  pointer-events: none;
  animation: shake 0.4s var(--ease-out);
}

.quiz-option--wrong::before {
  content: '\2717';
  margin-inline-end: var(--space-2);
  font-weight: 700;
}

.quiz-explanation {
  padding: var(--space-5) var(--space-6);
  background: var(--gold-glow);
  border-radius: var(--radius);
  border-inline-start: 3px solid var(--gold);
  margin-block: var(--space-6);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--silver);
  animation: fadeIn 0.3s var(--ease-out);
}

.quiz-results {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  animation: fadeIn 0.5s var(--ease-out);
}

.quiz-results .score {
  font-family: 'Amiri', serif;
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--gold);
  margin-block-end: var(--space-3);
}

.quiz-results .score-label {
  font-size: var(--text-sm);
  color: var(--silver);
  margin-block-end: var(--space-2);
}

.quiz-results .message {
  font-size: var(--text-lg);
  color: var(--text);
  margin-block-end: var(--space-8);
}

.quiz-results .message--perfect {
  color: var(--gold);
}

.quiz-results .message--good {
  color: var(--success);
}

.quiz-results .message--retry {
  color: var(--warning);
}


/* ──────────────────────────────────────────────────────────────
   12. PAYWALL
   ────────────────────────────────────────────────────────────── */

.paywall {
  position: relative;
  margin-block-start: calc(-1 * var(--space-16));
  padding-block-start: var(--space-16);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--bg) 30%
  );
}

.paywall-card {
  max-width: 420px;
  margin-inline: auto;
  padding: var(--space-10) var(--space-8);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(212, 168, 67, 0.15);
  box-shadow: var(--shadow-gold);
  text-align: center;
  animation: slideUp 0.5s var(--ease-out);
}

.paywall-price {
  font-family: 'Amiri', serif;
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--gold);
  margin-block-end: var(--space-2);
}

.paywall-price .currency {
  font-size: var(--text-lg);
  color: var(--gold-dim);
  vertical-align: super;
}

.paywall-price .period {
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-family: 'Tajawal', sans-serif;
}

.paywall-features {
  list-style: none;
  padding: 0;
  margin-block: var(--space-6);
  text-align: start;
}

.paywall-features li {
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--silver);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.paywall-features li::before {
  content: '\2713';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
}

.paywall-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-4) var(--space-8);
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg);
  font-weight: 700;
  font-size: var(--text-lg);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  animation: pulse 2.5s ease-in-out infinite;
}

.paywall-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 168, 67, 0.3);
}

.paywall-cta:active {
  transform: scale(0.98);
}

.paywall-code {
  margin-block-start: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.paywall-code .label {
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.paywall-code input {
  width: 100%;
  max-width: 280px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text);
  transition: border-color var(--transition-fast);
}

.paywall-code input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.paywall-code input::placeholder {
  color: var(--text-dim);
  letter-spacing: 0.05em;
}


/* ──────────────────────────────────────────────────────────────
   13. COMPLETION SCREEN
   ────────────────────────────────────────────────────────────── */

.completion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: var(--space-10);
  animation: fadeIn 0.6s var(--ease-out);
}

.completion-badge {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: var(--gold-glow);
  border: 3px solid var(--gold);
  border-radius: 50%;
  margin-block-end: var(--space-8);
  animation: celebrate 1s var(--ease-out), float 3s ease-in-out 1s infinite;
}

.completion-title {
  font-family: 'Amiri', serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gold);
  margin-block-end: var(--space-3);
}

.completion-xp {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--success);
  margin-block-end: var(--space-8);
  animation: slideUp 0.5s var(--ease-out) 0.3s backwards;
}

.completion-xp .xp-number {
  font-family: 'Amiri', serif;
  font-size: var(--text-2xl);
}

.completion-next {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  background: var(--bg-card);
  border: 1.5px solid rgba(212, 168, 67, 0.2);
  border-radius: var(--radius);
  color: var(--gold);
  font-weight: 700;
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--transition-base);
}

.completion-next:hover {
  background: var(--bg-hover);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* Confetti particles */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  overflow: hidden;
}

.confetti .particle {
  position: absolute;
  inset-block-start: -10px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confettiDrop var(--duration, 3s) linear forwards;
  opacity: 0.9;
}

.confetti .particle:nth-child(odd) {
  border-radius: 50%;
}

.confetti .particle:nth-child(1)  { inset-inline-start: 5%;  background: var(--phase-1); --duration: 2.8s; animation-delay: 0s; }
.confetti .particle:nth-child(2)  { inset-inline-start: 15%; background: var(--gold);    --duration: 3.2s; animation-delay: 0.1s; }
.confetti .particle:nth-child(3)  { inset-inline-start: 25%; background: var(--phase-2); --duration: 2.6s; animation-delay: 0.2s; }
.confetti .particle:nth-child(4)  { inset-inline-start: 35%; background: var(--phase-5); --duration: 3.4s; animation-delay: 0.05s; }
.confetti .particle:nth-child(5)  { inset-inline-start: 45%; background: var(--phase-3); --duration: 2.9s; animation-delay: 0.15s; }
.confetti .particle:nth-child(6)  { inset-inline-start: 55%; background: var(--gold);    --duration: 3.1s; animation-delay: 0.25s; }
.confetti .particle:nth-child(7)  { inset-inline-start: 65%; background: var(--phase-4); --duration: 2.7s; animation-delay: 0.08s; }
.confetti .particle:nth-child(8)  { inset-inline-start: 75%; background: var(--phase-1); --duration: 3.3s; animation-delay: 0.18s; }
.confetti .particle:nth-child(9)  { inset-inline-start: 85%; background: var(--phase-2); --duration: 2.5s; animation-delay: 0.3s; }
.confetti .particle:nth-child(10) { inset-inline-start: 95%; background: var(--gold);    --duration: 3.0s; animation-delay: 0.12s; }


/* ──────────────────────────────────────────────────────────────
   14. SETTINGS
   ────────────────────────────────────────────────────────────── */

.settings {
  padding-block: var(--space-8);
}

.settings h2 {
  font-family: 'Amiri', serif;
  color: var(--gold);
  margin-block-end: var(--space-6);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-block-end: var(--space-2);
  transition: background var(--transition-fast);
}

.settings-item:hover {
  background: var(--bg-hover);
}

.settings-item .label {
  font-weight: 500;
}

.settings-item .description {
  font-size: var(--text-sm);
  color: var(--text-dim);
  margin-block-start: var(--space-1);
}

.settings-item .toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.settings-item .toggle.active {
  background: var(--gold);
}

.settings-item .toggle::after {
  content: '';
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  width: 20px;
  height: 20px;
  background: var(--text);
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.settings-item .toggle.active::after {
  transform: translateX(-20px); /* RTL: moves to the left */
}

[dir="ltr"] .settings-item .toggle.active::after {
  transform: translateX(20px);
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--bg-card);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.settings-btn:hover {
  background: var(--bg-hover);
  border-color: rgba(212, 168, 67, 0.2);
  color: var(--gold);
}

.settings-btn:active {
  transform: scale(0.97);
}

.settings-danger {
  border-color: rgba(196, 68, 68, 0.3);
  color: var(--error);
}

.settings-danger:hover {
  background: rgba(196, 68, 68, 0.08);
  border-color: var(--error);
  color: var(--error);
}


/* ──────────────────────────────────────────────────────────────
   15. ANIMATIONS
   ────────────────────────────────────────────────────────────── */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow:
      0 0 24px var(--gold-glow),
      inset 0 0 24px var(--gold-glow);
  }
  50% {
    box-shadow:
      0 0 40px rgba(212, 168, 67, 0.2),
      inset 0 0 40px rgba(212, 168, 67, 0.08);
  }
}

@keyframes confettiDrop {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  75% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@keyframes celebrate {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-15deg);
  }
  50% {
    transform: scale(1.15) rotate(5deg);
  }
  75% {
    transform: scale(0.95) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}


/* ──────────────────────────────────────────────────────────────
   16. UTILITY CLASSES
   ────────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.mt-4 { margin-block-start: var(--space-4); }
.mt-8 { margin-block-start: var(--space-8); }
.mb-4 { margin-block-end: var(--space-4); }
.mb-8 { margin-block-end: var(--space-8); }

.w-full { width: 100%; }
.text-center { text-align: center; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }


/* ──────────────────────────────────────────────────────────────
   17. BUTTONS — Shared
   ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1.5px solid transparent;
  min-height: 44px;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg);
}

.btn--primary:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--bg-hover);
  border-color: rgba(212, 168, 67, 0.2);
}

.btn--ghost {
  background: transparent;
  color: var(--silver);
}

.btn--ghost:hover {
  color: var(--gold);
  background: var(--gold-glow);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  min-height: 32px;
}

.btn--lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-lg);
  min-height: 52px;
}


/* ──────────────────────────────────────────────────────────────
   18. BADGE & TAG
   ────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge--free {
  background: rgba(74, 200, 120, 0.12);
  color: var(--success);
}

.badge--premium {
  background: var(--gold-glow);
  color: var(--gold);
}

.badge--new {
  background: rgba(85, 136, 204, 0.12);
  color: var(--info);
}

.badge--xp {
  background: rgba(212, 168, 67, 0.08);
  color: var(--gold);
  font-weight: 700;
}


/* ──────────────────────────────────────────────────────────────
   19. PROGRESS COMPONENTS
   ────────────────────────────────────────────────────────────── */

.progress-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring .track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
}

.progress-ring .fill {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition-slow);
}

.progress-ring .value {
  position: absolute;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gold);
}


/* ──────────────────────────────────────────────────────────────
   20. NAVIGATION — Back / Breadcrumbs
   ────────────────────────────────────────────────────────────── */

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin-block-end: var(--space-4);
  font-size: var(--text-sm);
  color: var(--silver);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-back:hover {
  color: var(--gold);
  background: var(--gold-glow);
}

.nav-back::before {
  content: '\2190';
  /* Arrow flips in RTL automatically */
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-dim);
  margin-block-end: var(--space-6);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--silver);
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--gold);
}

.breadcrumbs .separator {
  color: var(--text-dim);
  opacity: 0.4;
}

.breadcrumbs .current {
  color: var(--gold);
  font-weight: 500;
}


/* ──────────────────────────────────────────────────────────────
   21. TOAST / NOTIFICATION
   ────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  inset-block-end: var(--space-6);
  inset-inline: var(--space-6);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  margin-inline: auto;
  animation: slideUp 0.3s var(--ease-out);
}

.toast--success {
  border-color: rgba(74, 200, 120, 0.3);
}

.toast--success .toast-icon {
  color: var(--success);
}

.toast--error {
  border-color: rgba(196, 68, 68, 0.3);
}

.toast--error .toast-icon {
  color: var(--error);
}

.toast--xp {
  border-color: rgba(212, 168, 67, 0.3);
}

.toast--xp .toast-icon {
  color: var(--gold);
}

.toast-icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.toast-text {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
}


/* ──────────────────────────────────────────────────────────────
   22. LOADING / SKELETON
   ────────────────────────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
  border-radius: var(--radius-sm);
}

.skeleton--text {
  height: 1em;
  margin-block-end: var(--space-2);
}

.skeleton--title {
  height: 1.5em;
  width: 60%;
  margin-block-end: var(--space-4);
}

.skeleton--card {
  height: 140px;
  border-radius: var(--radius);
}

.skeleton--circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(212, 168, 67, 0.15);
  border-block-start-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ──────────────────────────────────────────────────────────────
   23. EMPTY STATE
   ────────────────────────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--text-dim);
}

.empty-state .icon {
  font-size: 3rem;
  margin-block-end: var(--space-4);
  opacity: 0.4;
}

.empty-state .title {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-block-end: var(--space-2);
  color: var(--silver);
}

.empty-state .description {
  font-size: var(--text-sm);
  max-width: 30ch;
}


/* ──────────────────────────────────────────────────────────────
   24. DIVIDERS & SEPARATORS
   ────────────────────────────────────────────────────────────── */

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
  margin-block: var(--space-6);
}

.divider--gold {
  background: linear-gradient(
    to left,
    transparent,
    rgba(212, 168, 67, 0.15),
    transparent
  );
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block: var(--space-8) var(--space-4);
}

.section-header .line {
  flex: 1;
  height: 1px;
  background: rgba(212, 168, 67, 0.1);
}

.section-header .label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold-dim);
  white-space: nowrap;
}


/* ──────────────────────────────────────────────────────────────
   25. RESPONSIVE — TABLET
   ────────────────────────────────────────────────────────────── */

@media (max-width: 800px) {
  .app {
    max-width: 100%;
    padding-inline: var(--space-5);
  }

  .phase-grid {
    gap: var(--space-4);
  }

  .concept-body {
    max-width: 100%;
  }

  .board-container .chess-board {
    max-width: 360px;
  }

  .paywall-card {
    margin-inline: var(--space-4);
  }
}


/* ──────────────────────────────────────────────────────────────
   26. RESPONSIVE — MOBILE
   ────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  :root {
    --header-height: 52px;
    --radius: 12px;
  }

  .app {
    padding-inline: var(--space-4);
    padding-block-start: calc(var(--header-height) + var(--space-6));
  }

  /* Header compact */
  .header {
    padding-inline: var(--space-4);
    height: var(--header-height);
  }

  .header-title {
    font-size: var(--text-base);
  }

  .header-xp .level-badge {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
  }

  /* Phase cards — single column */
  .phase-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .phase-card {
    padding: var(--space-5);
  }

  /* Concept view */
  .concept-title {
    font-size: var(--text-xl);
  }

  .concept-body {
    font-size: var(--text-sm);
    line-height: 1.8;
  }

  .concept-body p {
    line-height: 1.8;
  }

  /* Boxes */
  .box {
    padding: var(--space-4) var(--space-5);
    margin-block: var(--space-4);
  }

  /* Chess board fills width */
  .board-container .chess-board {
    max-width: 100%;
  }

  .board-sequence-controls button {
    width: 48px;
    height: 48px;
  }

  /* Quiz options stack */
  .quiz-options {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .quiz-option {
    min-height: 48px;
    padding: var(--space-4);
  }

  .quiz-question {
    font-size: var(--text-lg);
  }

  /* Paywall */
  .paywall-card {
    padding: var(--space-8) var(--space-6);
    margin-inline: 0;
  }

  .paywall-price {
    font-size: var(--text-2xl);
  }

  /* Completion */
  .completion-badge {
    width: 96px;
    height: 96px;
    font-size: 2.5rem;
  }

  .completion-title {
    font-size: var(--text-xl);
  }

  /* Settings */
  .settings-item {
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  /* Larger touch targets */
  .btn {
    min-height: 48px;
  }

  .concept-item {
    padding: var(--space-4);
    min-height: 48px;
  }

  .nav-back {
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
  }

  /* Toast */
  .toast {
    inset-inline: var(--space-3);
  }

  /* Typography scale down */
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
}


/* ──────────────────────────────────────────────────────────────
   27. RESPONSIVE — SMALL MOBILE
   ────────────────────────────────────────────────────────────── */

@media (max-width: 380px) {
  .app {
    padding-inline: var(--space-3);
  }

  .header-streak {
    display: none;
  }

  .phase-card {
    padding: var(--space-4);
  }

  .paywall-card {
    padding: var(--space-6) var(--space-4);
  }
}


/* ──────────────────────────────────────────────────────────────
   28. PREFERS REDUCED MOTION
   ────────────────────────────────────────────────────────────── */

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

  .concept-item--current .status-dot {
    animation: none;
  }

  .paywall-cta {
    animation: none;
  }

  .phase-card--current {
    animation: none;
    box-shadow: 0 0 24px var(--gold-glow), inset 0 0 24px var(--gold-glow);
  }
}


/* ──────────────────────────────────────────────────────────────
   29. PHASE-SPECIFIC ACCENT UTILITIES
   ────────────────────────────────────────────────────────────── */

.accent-phase-1 { --accent: var(--phase-1); }
.accent-phase-2 { --accent: var(--phase-2); }
.accent-phase-3 { --accent: var(--phase-3); }
.accent-phase-4 { --accent: var(--phase-4); }
.accent-phase-5 { --accent: var(--phase-5); }
.accent-phase-6 { --accent: var(--phase-6); }

.accent-border {
  border-color: var(--accent);
}

.accent-text {
  color: var(--accent);
}

.accent-bg {
  background: var(--accent);
}

.accent-glow {
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 15%, transparent);
}


/* ──────────────────────────────────────────────────────────────
   30. DARK MODE OVERRIDES (future light mode prep)
   ────────────────────────────────────────────────────────────── */

[data-theme="dark"] {
  color-scheme: dark;
}


/* ──────────────────────────────────────────────────────────────
   31. PRINT STYLES
   ────────────────────────────────────────────────────────────── */

@media print {
  body::before {
    display: none;
  }

  .header,
  .paywall,
  .confetti,
  .toast,
  .board-sequence-controls,
  .settings,
  .nav-back {
    display: none !important;
  }

  .app {
    max-width: 100%;
    padding: 0;
  }

  .concept-body {
    color: #000;
    max-width: 100%;
  }

  .box {
    border: 1px solid #ccc;
    background: #f9f9f9;
    page-break-inside: avoid;
  }
}
