/* =========================================================================
 * 0. BASE RESET (náhrada Tailwind Preflight pro 100% offline běh bez CDN)
 * ========================================================================= */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border-color, rgba(255, 255, 255, 0.08));
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, select {
  text-transform: none;
}

button, [type='button'], [type='reset'], [type='submit'] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

img, svg, video, canvas {
  display: block;
  vertical-align: middle;
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

/* Prevence nechtěného double-tap zoomu na mobilu při zachování přístupnosti */
button, a, select, input, label, .btn, .nav-tab, .filter-pill, .char-tile, .mc-option-btn, .matching-tile, .test-mode-card {
  touch-action: manipulation;
}

/* 1. Výchozí: Achromatický (Čistá šedá / E-Ink Dark – 0% saturace, maximální klid pro oči) */
:root {
  --card-hanzi-size: clamp(3.6rem, 9vw, 4.8rem);
}
:root, html[data-color-theme="achromatic"] {
  --bg-primary: #121214;
  --bg-secondary: #18181b;
  --bg-tertiary: #232329;
  --bg-card: #18181b;
  --bg-card-back: #141417;
  --bg-console: #0e0e10;
  --text-primary: #c4c4cc;
  --text-secondary: #82828c;
  --text-muted: #56565f;
  --card-front-hanzi-color: #bcbcc4;
  --border-color: rgba(255, 255, 255, 0.08);
  --accent: #2f2f35;
  --accent-hover: #3b3b42;
  --accent-text: #d4d4dc;
  --accent-muted-text: #a1a1aa;
  --accent-soft: rgba(161, 161, 170, 0.12);
  --focus-ring: #6e6e78;
  --status-mastered: #a8a8b3;
  --status-mastered-bg: rgba(168, 168, 179, 0.12);
  --status-learning: #767680;
  --status-learning-bg: rgba(118, 118, 128, 0.12);
  --status-critical: #52525b;
  --status-critical-bg: rgba(82, 82, 91, 0.14);
  --status-untested: #2c2c32;
  --status-untested-bg: rgba(63, 63, 70, 0.12);
  --danger-text: #a37c7c;
  --danger-bg: rgba(163, 124, 124, 0.12);
  --danger-border: rgba(163, 124, 124, 0.24);
  --shadow-card: 0 18px 36px -15px rgba(0, 0, 0, 0.65);
}

/* 2. Achromatický + Kouřové stavy (Neutrální šedé UI + mikro-odlišení stavů dlaždic) */
html[data-color-theme="achromatic-muted"] {
  --bg-primary: #121316;
  --bg-secondary: #18191d;
  --bg-tertiary: #23252b;
  --bg-card: #18191d;
  --bg-card-back: #141519;
  --bg-console: #0d0e11;
  --text-primary: #c2c5cc;
  --text-secondary: #80848e;
  --text-muted: #555963;
  --card-front-hanzi-color: #bcc0c8;
  --border-color: rgba(255, 255, 255, 0.08);
  --accent: #2e3138;
  --accent-hover: #3a3e47;
  --accent-text: #d2d5dc;
  --accent-muted-text: #9ea3ae;
  --accent-soft: rgba(158, 163, 174, 0.12);
  --focus-ring: #6e7380;
  --status-mastered: #6e8c78;
  --status-mastered-bg: rgba(110, 140, 120, 0.14);
  --status-learning: #998467;
  --status-learning-bg: rgba(153, 132, 103, 0.14);
  --status-critical: #946666;
  --status-critical-bg: rgba(148, 102, 102, 0.14);
  --status-untested: #34373e;
  --status-untested-bg: rgba(52, 55, 62, 0.15);
  --danger-text: #9e6b6b;
  --danger-bg: rgba(158, 107, 107, 0.12);
  --danger-border: rgba(158, 107, 107, 0.25);
  --shadow-card: 0 18px 36px -15px rgba(0, 0, 0, 0.65);
}

/* 3. Monochromatický – Břidlice (Cool Slate Monochrome) */
html[data-color-theme="mono-slate"] {
  --bg-primary: #0f141a;
  --bg-secondary: #151c24;
  --bg-tertiary: #1f2936;
  --bg-card: #151c24;
  --bg-card-back: #121820;
  --bg-console: #0b0f14;
  --text-primary: #b8c4d0;
  --text-secondary: #758496;
  --text-muted: #4d5968;
  --card-front-hanzi-color: #b2bfd0;
  --border-color: rgba(148, 169, 194, 0.1);
  --accent: #263242;
  --accent-hover: #314054;
  --accent-text: #c8d4e0;
  --accent-muted-text: #8fa1b5;
  --accent-soft: rgba(143, 161, 181, 0.13);
  --focus-ring: #60748c;
  --status-mastered: #849cb5;
  --status-mastered-bg: rgba(132, 156, 181, 0.14);
  --status-learning: #60768f;
  --status-learning-bg: rgba(96, 118, 143, 0.14);
  --status-critical: #455669;
  --status-critical-bg: rgba(69, 86, 105, 0.16);
  --status-untested: #242f3d;
  --status-untested-bg: rgba(36, 47, 61, 0.16);
  --danger-text: #997379;
  --danger-bg: rgba(153, 115, 121, 0.12);
  --danger-border: rgba(153, 115, 121, 0.25);
  --shadow-card: 0 18px 36px -15px rgba(0, 0, 0, 0.65);
}

/* 4. Monochromatický – Teplý kámen (Noční čtečka bez modré složky) */
html[data-color-theme="mono-sepia"] {
  --bg-primary: #141311;
  --bg-secondary: #1c1a17;
  --bg-tertiary: #282520;
  --bg-card: #1c1a17;
  --bg-card-back: #171513;
  --bg-console: #0f0e0c;
  --text-primary: #c4bdb2;
  --text-secondary: #877f74;
  --text-muted: #5c554c;
  --card-front-hanzi-color: #bfb8ac;
  --border-color: rgba(214, 203, 188, 0.09);
  --accent: #332e27;
  --accent-hover: #403a31;
  --accent-text: #d4cdc2;
  --accent-muted-text: #a39a8c;
  --accent-soft: rgba(163, 154, 140, 0.13);
  --focus-ring: #786f62;
  --status-mastered: #a19887;
  --status-mastered-bg: rgba(161, 152, 135, 0.14);
  --status-learning: #7a7163;
  --status-learning-bg: rgba(122, 113, 99, 0.14);
  --status-critical: #5c5449;
  --status-critical-bg: rgba(92, 84, 73, 0.16);
  --status-untested: #2b2722;
  --status-untested-bg: rgba(43, 39, 34, 0.16);
  --danger-text: #9e736b;
  --danger-bg: rgba(158, 115, 107, 0.13);
  --danger-border: rgba(158, 115, 107, 0.25);
  --shadow-card: 0 18px 36px -15px rgba(0, 0, 0, 0.65);
}

/* 5. Monochromatický – Lesní mech (Šedozelený klidný režim) */
html[data-color-theme="mono-forest"] {
  --bg-primary: #101412;
  --bg-secondary: #161c19;
  --bg-tertiary: #202924;
  --bg-card: #161c19;
  --bg-card-back: #121714;
  --bg-console: #0b0e0c;
  --text-primary: #b8c4bc;
  --text-secondary: #76857b;
  --text-muted: #4d5951;
  --card-front-hanzi-color: #b2bfb7;
  --border-color: rgba(168, 194, 178, 0.09);
  --accent: #25332b;
  --accent-hover: #304238;
  --accent-text: #c8d4cc;
  --accent-muted-text: #8ca193;
  --accent-soft: rgba(140, 161, 147, 0.13);
  --focus-ring: #5e7365;
  --status-mastered: #7e9c89;
  --status-mastered-bg: rgba(126, 156, 137, 0.14);
  --status-learning: #5b7364;
  --status-learning-bg: rgba(91, 115, 100, 0.14);
  --status-critical: #425449;
  --status-critical-bg: rgba(66, 84, 73, 0.16);
  --status-untested: #222c26;
  --status-untested-bg: rgba(34, 44, 38, 0.16);
  --danger-text: #997373;
  --danger-bg: rgba(153, 115, 115, 0.12);
  --danger-border: rgba(153, 115, 115, 0.25);
  --shadow-card: 0 18px 36px -15px rgba(0, 0, 0, 0.65);
}

/* 6. E-Ink Papír (Tlumený světlý režim bez zářivé bílé) */
html[data-color-theme="light-paper"], html.light {
  --bg-primary: #e4e1da;
  --bg-secondary: #edeae4;
  --bg-tertiary: #dad6cd;
  --bg-card: #edeae4;
  --bg-card-back: #e6e3dc;
  --bg-console: #dcd8cf;
  --text-primary: #2e2d2a;
  --text-secondary: #5c5953;
  --text-muted: #87837a;
  --card-front-hanzi-color: #363430;
  --border-color: rgba(46, 45, 42, 0.12);
  --accent: #4a4742;
  --accent-hover: #383632;
  --accent-text: #f2efe9;
  --accent-muted-text: #4a4742;
  --accent-soft: rgba(74, 71, 66, 0.12);
  --focus-ring: #6e6a63;
  --status-mastered: #4f6b57;
  --status-mastered-bg: rgba(79, 107, 87, 0.14);
  --status-learning: #7d694c;
  --status-learning-bg: rgba(125, 105, 76, 0.14);
  --status-critical: #825656;
  --status-critical-bg: rgba(130, 86, 86, 0.14);
  --status-untested: #9c988e;
  --status-untested-bg: rgba(156, 152, 142, 0.18);
  --danger-text: #7d4848;
  --danger-bg: rgba(125, 72, 72, 0.12);
  --danger-border: rgba(125, 72, 72, 0.28);
  --shadow-card: 0 16px 30px -12px rgba(46, 45, 42, 0.14);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Čínská typografie */
.hanzi-font {
  font-family: "KaiTi", "STKaiti", "Noto Serif SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Heiti SC", sans-serif;
  line-height: 1.1;
}

/* Základní rozložení (funguje 100% i bez Tailwind CDN zcela offline) */
.app-shell {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1rem calc(4.5rem + env(safe-area-inset-bottom, 0px)) 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.surface-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background-color: var(--accent);
  color: var(--accent-text);
  border-color: var(--border-color);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
}
.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  opacity: 0.92;
}
.btn-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}
.btn-danger:hover {
  opacity: 0.9;
}

/* Pomocné sémantické třídy pro odznáčky a texty šetřící zrak */
.theme-badge-neutral {
  background-color: var(--accent-soft);
  color: var(--accent-muted-text);
  border: 1px solid var(--border-color);
}
.theme-badge-mastered {
  background-color: var(--status-mastered-bg);
  color: var(--status-mastered);
  border: 1px solid var(--border-color);
}
.theme-badge-learning {
  background-color: var(--status-learning-bg);
  color: var(--status-learning);
  border: 1px solid var(--border-color);
}
.theme-badge-critical {
  background-color: var(--status-critical-bg);
  color: var(--status-critical);
  border: 1px solid var(--border-color);
}
.theme-text-accent {
  color: var(--accent-muted-text);
}
.theme-text-mastered {
  color: var(--status-mastered);
}
.theme-text-learning {
  color: var(--status-learning);
}
.theme-text-critical {
  color: var(--status-critical);
}

.select-input, .text-input {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.65rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
}
.select-input:focus, .text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Multi-select výběr kapitol v hlavičce */
.chapter-multiselect {
  position: relative;
  display: inline-flex;
  flex: 1;
}
.chapter-dropdown-btn {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.55rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  cursor: pointer;
  width: 100%;
  min-width: 170px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chapter-dropdown-btn:hover, .chapter-dropdown-btn.open {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.chapter-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 60;
  min-width: 310px;
  max-width: min(92vw, 420px);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  box-shadow: var(--shadow-card);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (max-width: 640px) {
  .chapter-dropdown-menu {
    min-width: 0;
    width: min(calc(100vw - 1.5rem), 360px);
    max-width: calc(100vw - 1.5rem);
  }
}
.chapter-list-scroll {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.15rem;
}
.chapter-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: background-color 0.12s ease;
  user-select: none;
}
.chapter-item-row:hover {
  background-color: var(--bg-tertiary);
}
.chapter-item-row.selected {
  background-color: var(--accent-soft);
}
.chapter-only-btn {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.4rem;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.chapter-only-btn:hover {
  background-color: var(--accent);
  color: var(--accent-text);
  border-color: var(--focus-ring);
}

/* Navigace */
.nav-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar {
  display: none;
}
.nav-tab {
  padding: 0.36rem 0.68rem;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}
.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.nav-tab.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--border-color);
}

/* Vysouvací a kompaktní horní lišta (Top Control Drawer) */
.top-drawer-container {
  position: relative;
  z-index: 50;
}
.top-hover-sensor {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 54;
}
.top-drawer-container.is-pinned .top-hover-sensor,
.top-drawer-container.is-pinned .top-drawer-trigger {
  display: none !important;
}
.top-drawer-trigger {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.32rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.76rem;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.top-drawer-trigger:hover {
  border-color: var(--focus-ring);
}
.top-drawer-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.top-drawer-container:not(.is-pinned) .top-drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 55;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(0.5rem + env(safe-area-inset-top, 0px)) 1rem 0.65rem 1rem;
  max-height: 85dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(-108%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}
.top-drawer-container:not(.is-pinned).is-open .top-drawer-panel {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.top-drawer-container:not(.is-pinned) .top-drawer-panel > .surface-panel {
  box-shadow: var(--shadow-card);
}
.pin-toggle-btn.active {
  background-color: var(--accent-soft);
  color: var(--accent-muted-text);
  border-color: var(--focus-ring);
}

/* Mapa znaků (Grid / Heatmapa) */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.65rem;
}
@media (max-width: 480px) {
  .char-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 0.5rem;
  }
}
.char-tile {
  content-visibility: auto;
  contain-intrinsic-size: 92px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 0.65rem 0.4rem 0.55rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  user-select: none;
  -webkit-touch-callout: none;
}
.char-tile:hover {
  transform: translateY(-2px);
  border-color: var(--focus-ring);
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.3);
}
.char-tile.kb-focused {
  transform: translateY(-2px);
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 2px var(--focus-ring), 0 6px 16px -4px rgba(0, 0, 0, 0.35);
  z-index: 5;
}
.char-tile.last-studied-ring {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 1px var(--focus-ring);
}
@keyframes tileFlashPulse {
  0%, 100% {
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 2px var(--accent-soft);
    transform: scale(1);
  }
  25%, 75% {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 4px var(--accent-soft);
    transform: scale(1.04);
  }
  50% {
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 2px var(--accent-soft);
    transform: scale(1);
  }
}
.char-tile.flash-highlight {
  animation: tileFlashPulse 1.6s ease-in-out;
  z-index: 10;
}
.tile-mastery-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background-color: var(--status-untested);
}
.tile-mastery-fill {
  height: 100%;
  transition: width 0.3s ease;
}
.char-tile .tile-delayed-info {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.char-tile.is-revealed .tile-delayed-info {
  opacity: 1;
  visibility: visible;
}
.char-tile .hanzi-font {
  color: var(--card-front-hanzi-color);
}

/* 3D Flip Card */
.deck-stage {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.card-perspective {
  width: 100%;
  height: clamp(400px, 72vh, 620px);
  height: clamp(400px, 72dvh, 620px);
  perspective: 1200px;
  position: relative;
  touch-action: none; /* Výchozí pro líc karty (vertikální swipe) */
  user-select: none;
}
@media (min-width: 820px) {
  .deck-stage {
    max-width: 1080px;
  }
  .card-perspective {
    height: clamp(470px, 74vh, 640px);
    height: clamp(470px, 74dvh, 640px);
  }
}
.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.card-inner.is-flipped {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem 0.75rem;
  overflow: hidden;
}
.card-front {
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-primary) 100%);
}
.card-front-hanzi {
  font-size: var(--card-hanzi-size);
  font-weight: 500;
  color: var(--card-front-hanzi-color);
  line-height: 1.1;
  transition: color 0.2s ease;
}
.card-back-hanzi {
  font-size: var(--card-hanzi-size);
  font-weight: 500;
  color: var(--card-front-hanzi-color);
  line-height: 1;
  user-select: none;
}
.card-back {
  background: var(--bg-card-back);
  color: var(--card-front-hanzi-color);
  transform: rotateY(180deg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Responzivní dvousloupcový layout rubu karty (Detail znaku) */
.card-back-layout {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: auto;
  min-height: 100%;
}
.card-back-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.card-back-identity {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.card-back-pinyin-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.card-back-pinyin {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}
.card-back-translation {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--card-front-hanzi-color);
  line-height: 1.25;
}
.card-back-right {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.7rem;
}
.card-back-story-card {
  position: relative;
  padding: 0.55rem 0.95rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.card-back-badge-corner {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  z-index: 2;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.card-back-badge-corner ~ .card-image-wrap.hidden-view + .card-back-story-text {
  padding-top: 1.35rem;
}
.card-back-example-card {
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  flex-shrink: 0;
}

/* Obrázek v detailu znaku (rub karty) a Lightbox */
.card-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0.65rem;
  border-bottom: 1px solid var(--border-color);
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}
.card-image-wrap:hover .card-detail-image {
  box-shadow: 0 0 0 1px var(--focus-ring);
}
.card-detail-image {
  max-height: 200px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.65rem;
  display: block;
  transition: box-shadow 0.15s ease;
}

@media (min-width: 820px) {
  .card-back {
    padding: 0.95rem;
    overflow: hidden;
  }
  .card-back-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.18fr);
    gap: 0.9rem;
    height: 100%;
    min-height: 0;
  }
  .card-back-left {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    padding: 1.5rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 1.15rem;
    background: var(--bg-primary);
  }
  .card-back-left .card-back-hanzi {
    font-size: clamp(5.2rem, 10vw, 8.2rem);
    line-height: 1.05;
  }
  .card-back-identity {
    align-items: center;
    gap: 0.45rem;
  }
  .card-back-pinyin-row {
    justify-content: center;
  }
  .card-back-pinyin {
    font-size: 1.6rem;
    font-weight: 500;
  }
  .card-back-translation {
    font-size: 1.65rem;
    font-weight: 600;
  }
  .card-back-right {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    justify-content: flex-start;
    padding-right: 0.15rem;
  }
  .card-back-story-card {
    flex: 1 0 auto;
    justify-content: center;
    padding: 0.6rem 1.05rem 0.95rem;
    border-radius: 1.15rem;
  }
  .card-back-story-card:has(.card-image-wrap:not(.hidden-view)) {
    justify-content: flex-start;
  }
  .card-back-example-card {
    padding: 0.95rem 1.1rem;
    border-radius: 1.15rem;
  }
  .card-detail-image {
    max-height: 280px;
  }
}
#image-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 8, 12, 0.9);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: zoom-out;
}
#image-lightbox-modal.hidden-view {
  display: none !important;
}
#image-lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  cursor: default;
}
#image-lightbox-caption {
  margin-top: 0.75rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(24, 24, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
  font-size: 0.9rem;
  text-align: center;
}
#image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Typografie příkladu použití na rubu */
.card-example-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.example-hanzi-text {
  font-size: clamp(1.35rem, 3.8vw, 1.62rem);
  line-height: 1.4;
  font-weight: 500;
  color: var(--card-front-hanzi-color);
  letter-spacing: 0.02em;
}
div.example-hanzi-text {
  margin-bottom: 0.2rem;
}
.example-sub-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Animace přechodu karet (Swipe nahoru / dolů / zákaz v testu) */
@keyframes slideOutUpAnim {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-115%) scale(0.92); opacity: 0; }
}
@keyframes slideInFromBottomAnim {
  0% { transform: translateY(35%) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes slideOutDownAnim {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(115%) scale(0.92); opacity: 0; }
}
@keyframes slideInFromTopAnim {
  0% { transform: translateY(-35%) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes shakeForbiddenAnim {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-12px); }
  40% { transform: translateX(12px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
}

.anim-slide-out-up {
  animation: slideOutUpAnim 0.22s cubic-bezier(0.4, 0, 1, 1) forwards;
}
.anim-slide-in-up {
  animation: slideInFromBottomAnim 0.24s cubic-bezier(0, 0, 0.2, 1) forwards;
}
.anim-slide-out-down {
  animation: slideOutDownAnim 0.22s cubic-bezier(0.4, 0, 1, 1) forwards;
}
.anim-slide-in-down {
  animation: slideInFromTopAnim 0.24s cubic-bezier(0, 0, 0.2, 1) forwards;
}
.anim-shake-forbidden {
  animation: shakeForbiddenAnim 0.35s ease-in-out;
}

/* Výběr testovacího režimu v lobby */
.test-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.5rem;
}
.test-mode-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
}
.test-mode-card:hover {
  border-color: var(--focus-ring);
  background-color: var(--bg-tertiary);
}
.test-mode-card.active {
  border-color: var(--focus-ring);
  background-color: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--focus-ring);
}

/* Bleskový duel (TRUE_FALSE) a Rychlostní kvíz (MULTIPLE_CHOICE) */
.tf-statement-box {
  width: 100%;
  max-width: 520px;
  margin-top: 1.1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  text-align: center;
  transition: all 0.18s ease;
}
.tf-statement-box.is-correct {
  border-color: var(--status-mastered);
  background-color: var(--status-mastered-bg);
}
.tf-statement-box.is-wrong {
  border-color: var(--danger-border);
  background-color: var(--danger-bg);
}
.mc-options-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}
@media (max-width: 520px) {
  .mc-options-grid {
    grid-template-columns: 1fr;
  }
}
.mc-option-btn {
  width: 100%;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.9rem;
  padding: 0.75rem 0.9rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.14s ease;
  font-size: 0.9rem;
}
.mc-option-btn:hover:not(:disabled) {
  border-color: var(--focus-ring);
  background-color: var(--bg-tertiary);
  transform: translateY(-1px);
}
.mc-option-btn.is-correct {
  border-color: var(--status-mastered) !important;
  background-color: var(--status-mastered-bg) !important;
  color: var(--status-mastered) !important;
  box-shadow: 0 0 0 1px var(--status-mastered);
}
.mc-option-btn.is-wrong {
  border-color: var(--danger-border) !important;
  background-color: var(--danger-bg) !important;
  color: var(--danger-text) !important;
  box-shadow: 0 0 0 1px var(--danger-border);
}
.mc-key-badge {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.45rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Párovací matice – 6 dvojic (MATCHING) */
.matching-board {
  width: 100%;
  height: 100%;
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.matching-columns-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.65rem;
  align-content: center;
}
.matching-col {
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
  justify-content: center;
}
.matching-tile {
  width: 100%;
  min-height: 52px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.14s ease;
  user-select: none;
  text-align: center;
}
.matching-tile:hover:not(:disabled):not(.is-matched):not(.is-empty-slot) {
  border-color: var(--focus-ring);
  background-color: var(--bg-tertiary);
  transform: translateY(-1px);
}
.matching-tile.is-selected {
  border-color: var(--focus-ring) !important;
  background-color: var(--accent-soft) !important;
  box-shadow: 0 0 0 2px var(--focus-ring);
  transform: scale(1.015);
}
.matching-tile.is-matched {
  opacity: 0.28;
  pointer-events: none;
  border-color: var(--status-mastered) !important;
  background-color: var(--status-mastered-bg) !important;
  transform: scale(0.97);
}
.matching-tile.is-empty-slot {
  opacity: 0.12;
  pointer-events: none;
  border-style: dashed;
}
@keyframes tilePopAnim {
  0% { opacity: 0; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}
.anim-tile-pop {
  animation: tilePopAnim 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.matching-tile.is-wrong-flash {
  border-color: var(--danger-border) !important;
  background-color: var(--danger-bg) !important;
  color: var(--danger-text) !important;
  animation: shakeForbiddenAnim 0.35s ease-in-out;
}

/* Filtry */
.filter-pill {
  padding: 0.28rem 0.62rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  transition: all 0.15s ease;
}
.filter-pill.active {
  background-color: var(--accent);
  color: var(--accent-text);
  border-color: var(--focus-ring);
}
.filter-pill.active span {
  color: var(--accent-text) !important;
}

/* Konzole logů */
.log-entry {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.76rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.4;
  word-break: break-word;
}
.tag-import { color: var(--status-mastered); font-weight: 700; }
.tag-timer { color: var(--status-learning); font-weight: 700; }
.tag-algo { color: var(--accent-muted-text); font-weight: 700; }

/* Toast notifikace */
#toast-container {
  position: fixed;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  right: 1rem;
  left: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--focus-ring);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  animation: slideInFromBottomAnim 0.2s ease-out;
}

.hidden-view {
  display: none !important;
}

/* =========================================================================
 * PWA & ANDROID MOBILE ENHANCEMENTS
 * ========================================================================= */
.card-perspective.allow-vertical-scroll {
  touch-action: pan-y;
}

@media (max-width: 640px) {
  #toast-container {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

@media (pointer: coarse) {
  .nav-tab {
    padding: 0.48rem 0.78rem;
    min-height: 38px;
  }
  .filter-pill {
    padding: 0.36rem 0.72rem;
    min-height: 34px;
  }
  .top-drawer-trigger {
    padding: 0.46rem 0.85rem;
    min-height: 40px;
  }
  .chapter-item-row {
    padding: 0.6rem 0.65rem;
    min-height: 44px;
  }
  .mc-option-btn {
    min-height: 48px;
  }
}

/* =========================================================================
 * LOKÁLNÍ UTILITY TŘÍDY (100% OFFLINE NÁHRADA ZA TAILWIND CDN)
 * ========================================================================= */
/* Layout & Positioning */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }

/* Display */
.hidden { display: none; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* Flex & Grid */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.self-end { align-self: flex-end; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Gap */
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Spacing - Margin */
.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-auto { margin-left: auto; }

/* Spacing - Padding */
.p-0 { padding: 0; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-1\.5 { padding-top: 0.375rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }

/* Sizing */
.w-2 { width: 0.5rem; }
.w-3\.5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-36 { width: 9rem; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.max-w-xs { max-width: 20rem; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-full { max-width: 100%; }
.max-w-\[52px\] { max-width: 52px; }
.max-w-\[170px\] { max-width: 170px; }
.max-w-\[175px\] { max-width: 175px; }
.max-w-\[210px\] { max-width: 210px; }
.max-w-\[260px\] { max-width: 260px; }
.max-w-\[320px\] { max-width: 320px; }

.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-80 { height: 20rem; }
.h-full { height: 100%; }
.min-h-\[15px\] { min-height: 15px; }
.max-h-72 { max-height: 18rem; }

/* Typography */
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-\[10px\] { font-size: 10px; line-height: 1.35; }
.text-\[11px\] { font-size: 11px; line-height: 1.35; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.line-through { text-decoration-line: line-through; }
.whitespace-nowrap { white-space: nowrap; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Colors & Effects */
.bg-transparent { background-color: transparent; }
.text-slate-400 { color: #94a3b8; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45); }

/* Borders & Radius */
.border { border-width: 1px; }
.border-0 { border-width: 0; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-dashed { border-style: dashed; }
.border-collapse { border-collapse: collapse; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* Overflow & Interaction */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; -webkit-user-select: none; }
.pointer-events-none { pointer-events: none; }
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-300 { transition-duration: 300ms; }

/* Hover states */
.hover\:underline:hover { text-decoration-line: underline; }
.hover\:opacity-100:hover { opacity: 1; }
.hover\:bg-slate-700\/50:hover { background-color: rgba(51, 65, 85, 0.5); }
.hover\:text-slate-300:hover { color: #cbd5e1; }

/* Responsive: sm (>= 640px) */
@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:self-center { align-self: center; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:w-44 { width: 11rem; }
  .sm\:w-auto { width: auto; }
  .sm\:min-w-\[160px\] { min-width: 160px; }
  .sm\:p-3\.5 { padding: 0.875rem; }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
}

/* Responsive: lg (>= 1024px) */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
