* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f3ef;
  color: #1f2933;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}




.sidebar {
  width: 290px;
  background: #18181b;
  color: white;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header h1 {
  margin: 0;
  font-size: 1.35rem;
}

.sidebar-header p {
  margin: 4px 0 24px;
  color: #a1a1aa;
  font-size: 0.9rem;
}

.course-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-level {
  border-top: 1px solid #3f3f46;
  padding-top: 12px;
}

.menu-level-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  color: #facc15;
}

.menu-pos {
  margin-left: 8px;
  margin-bottom: 10px;
}

.menu-pos-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.menu-pack-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-left: 10px;
}

.menu-pack-button {
  width: 100%;
  border: none;
  background: transparent;
  color: #d4d4d8;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
}

.menu-pack-button:hover {
  background: #27272a;
  color: white;
}

.menu-pack-button.active {
  background: #facc15;
  color: #18181b;
  font-weight: 700;
}

.main-content {
  flex: 1;
  padding: 40px;
}

.dashboard {
  max-width: 900px;
  margin: 0 auto;
}

.dashboard h2 {
  margin-top: 0;
  font-size: 2rem;
}

.pack-info {
  margin-top: 28px;
  background: white;
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.pack-info h3 {
  margin-top: 0;
}

button {
  cursor: pointer;
}

#startTrainingBtn {
  border: none;
  background: #18181b;
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
}

#startTrainingBtn:hover {
  background: #27272a;
}

.hidden {
  display: none;
}




.training-card {
  margin-top: 28px;
  background: white;
  padding: 28px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.training-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #71717a;
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.prompt-label {
  color: #71717a;
  margin-bottom: 8px;
}

.prompt-word {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.answer-form {
  display: flex;
  gap: 12px;
}

.answer-form input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d4d4d8;
  font-size: 1.05rem;
}

.answer-form input:focus {
  outline: 2px solid #facc15;
  border-color: #facc15;
}

.answer-form button,
.next-btn {
  border: none;
  background: #18181b;
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.answer-form button:hover,
.next-btn:hover {
  background: #27272a;
}

.feedback {
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  line-height: 1.5;
}

.feedback-correct {
  background: #dcfce7;
  color: #14532d;
}

.feedback-almost {
  background: #fef9c3;
  color: #713f12;
}

.feedback-wrong {
  background: #fee2e2;
  color: #7f1d1d;
}

.example-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.next-btn {
  margin-top: 16px;
}

.result-summary {
  margin: 20px 0;
}


















.sexy-card {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.22), transparent 34%),
    linear-gradient(135deg, #ffffff, #fafafa);
  padding: 30px;
  border-radius: 24px;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  border: 1px solid rgba(24, 24, 27, 0.08);
}

.training-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.training-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  color: #a16207;
  margin-bottom: 4px;
}

.training-header h3 {
  margin: 0;
  font-size: 1.45rem;
}

.training-score {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.training-score span {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.score-good {
  background: #dcfce7;
  color: #166534;
}

.score-bad {
  background: #fee2e2;
  color: #991b1b;
}

.progress-wrap {
  margin-bottom: 34px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #71717a;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.progress-bar {
  height: 13px;
  background: #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #facc15, #fb923c);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.prompt-area {
  text-align: center;
  padding: 24px 14px 30px;
}

.prompt-label {
  color: #71717a;
  margin-bottom: 10px;
  font-weight: 700;
}

.prompt-word {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #18181b;
}

.answer-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.answer-form input {
  flex: 1;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #d4d4d8;
  font-size: 1.1rem;
  background: white;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.answer-form input:focus {
  outline: 3px solid rgba(250, 204, 21, 0.45);
  border-color: #facc15;
}

.answer-form button,
.next-btn {
  border: none;
  background: #18181b;
  color: white;
  padding: 15px 20px;
  border-radius: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(24, 24, 27, 0.22);
  transition: transform 0.12s ease, background 0.12s ease;
}

.answer-form button:hover,
.next-btn:hover {
  background: #27272a;
  transform: translateY(-1px);
}

.answer-form button.next-mode {
  background: #facc15;
  color: #18181b;
}

.feedback {
  margin-top: 22px;
  padding: 20px;
  border-radius: 18px;
  line-height: 1.5;
  animation: popIn 0.18s ease;
}

.feedback-title {
  font-weight: 900;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.feedback-answer {
  font-size: 1.6rem;
  font-weight: 900;
  margin-top: 4px;
}

.feedback-correct {
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
}

.feedback-almost {
  background: #fef9c3;
  color: #713f12;
  border: 1px solid #fde68a;
}

.feedback-wrong {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

.example-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.result-card {
  text-align: center;
}

.result-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.result-card h3 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.final-progress {
  margin: 26px 0;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.result-box {
  background: white;
  border: 1px solid #e4e4e7;
  border-radius: 18px;
  padding: 18px;
}

.result-box span {
  display: block;
  color: #71717a;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-box strong {
  font-size: 2rem;
}

.hidden {
  display: none;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}











.menu-clickable {
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  border-radius: 10px;
  padding: 8px 10px;
}

.menu-clickable:hover {
  background: #27272a;
}

.menu-clickable.active {
  background: #facc15;
  color: #18181b;
}

.section-grid,
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.section-tile,
.pack-tile {
  border: none;
  text-align: left;
  cursor: pointer;
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(24, 24, 27, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.section-tile:hover,
.pack-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.section-tile {
  padding: 24px;
}

.section-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: #fef3c7;
  border-radius: 18px;
  font-size: 1.9rem;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 6px;
  color: #18181b;
}

.section-meta {
  color: #71717a;
  font-weight: 700;
  margin-bottom: 18px;
}

.pack-image {
  position: relative;
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: #fef3c7;
  display: grid;
  place-items: center;
}

.pack-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.18));
}

.pack-image-fallback {
  position: relative;
  z-index: 1;
  font-size: 3rem;
}

.pack-tile-body {
  padding: 18px;
}

.pack-tile-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #18181b;
  margin-bottom: 4px;
}

.pack-tile-meta {
  color: #71717a;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.tile-progress {
  margin-top: 12px;
}

.tile-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #71717a;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 7px;
}

.tile-progress-bar {
  height: 10px;
  background: #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
}

.tile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #facc15, #fb923c);
  border-radius: 999px;
}

.empty-state {
  margin-top: 28px;
  background: white;
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.empty-state h3 {
  margin-top: 0;
}



.pack-tile {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pack-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
}


.pack-tile-body {
  padding: 16px 18px 18px;
}



.pack-tile {
  padding: 0 !important;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(24, 24, 27, 0.08);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
}

.pack-image {
  width: 100%;
  height: 160px;
  margin: 0;
  padding: 0;
  display: block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #fef3c7;
  border-radius: 0;
  position: relative;
}

.pack-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.pack-tile-body {
  padding: 16px 18px 18px;
}












.pack-detail {
  width: 100%;
}

.pack-detail-hero {
  height: 260px;
  background-size: cover;
  background-position: center;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  margin-bottom: 28px;
}

.pack-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.05),
    rgba(15, 23, 42, 0.35)
  );
}

.back-button {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  color: #1f2937;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.pack-detail-content {
  display: grid;
  gap: 22px;
}

.pack-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f97316;
  margin-bottom: 8px;
}

.pack-detail-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  color: #111827;
}

.pack-detail-header p {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 1.05rem;
}

.pack-detail-score {
  min-width: 130px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  text-align: center;
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.16);
}

.pack-detail-score strong {
  display: block;
  font-size: 2.1rem;
  color: #ea580c;
}

.pack-detail-score span {
  color: #9a3412;
  font-weight: 700;
}

.pack-detail-progress {
  height: 14px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.pack-detail-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #facc15);
  transition: width 0.35s ease;
}

.pack-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  cursor: pointer;
  font-size: 1rem;
}

.primary-button {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.secondary-button {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.stat-card span {
  display: block;
  color: #6b7280;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 2rem;
  color: #111827;
}

.detail-panel {
  background: white;
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.detail-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 18px;
}

.detail-panel-header h2 {
  margin: 0;
  color: #111827;
}

.detail-panel-header span {
  color: #9ca3af;
  font-size: 0.9rem;
}

.attempt-history-placeholder,
.empty-state {
  padding: 20px;
  border-radius: 18px;
  background: #f9fafb;
  color: #6b7280;
  border: 1px dashed #d1d5db;
}

.improvement-chart-placeholder {
  height: 180px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f9fafb, #fff7ed);
}

.fake-chart-bar {
  flex: 1;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #facc15, #f97316);
  min-height: 24px;
}

.weak-table-wrap {
  overflow-x: auto;
}

.weak-table {
  width: 100%;
  border-collapse: collapse;
}

.weak-table th,
.weak-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #f3f4f6;
}

.weak-table th {
  color: #6b7280;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.weak-table td {
  color: #111827;
}

@media (max-width: 800px) {
  .pack-detail-hero {
    height: 190px;
    border-radius: 22px;
  }

  .pack-detail-header {
    flex-direction: column;
  }

  .pack-detail-score {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}






.session-history-tiles {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.1rem 0.5rem;
  scroll-snap-type: x proximity;
}

.session-history-tiles::-webkit-scrollbar {
  height: 8px;
}

.session-history-tiles::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.session-history-tiles::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.session-tile {
  
  min-width: 220px;
  max-width: 220px;
  flex: 0 0 220px;
  scroll-snap-align: start;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1rem;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.04)
    );

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.session-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.26);
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 255, 255, 0.06)
    );
}

.session-tile-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.session-date {
  font-size: 0.95rem;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.95);
}

.session-time {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.58);
}

.session-percent {
  font-size: 1.7rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.session-progress-line {
  height: 8px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
}

.session-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #a3e635);
}

.session-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;

  padding-top: 0.2rem;
  font-size: 0.88rem;
}

.session-stats span {
  color: rgba(255, 255, 255, 0.58);
}

.session-stats strong {
  color: rgba(255, 255, 255, 0.95);
}

.session-mode {
  display: inline-flex;
  align-items: center;
  width: fit-content;

  margin-top: 0.85rem;
  padding: 0.35rem 0.65rem;

  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
}




.session-tile {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.session-tile:hover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.22);
}

.session-date {
  color: #0f172a;
}

.session-time {
  color: #64748b;
}

.session-percent {
  color: #0f172a;
}

.session-stats span {
  color: #64748b;
}

.session-stats strong {
  color: #0f172a;
}

.session-mode {
  color: #334155;
  background: #f1f5f9;
}

.session-progress-line {
  background: #e2e8f0;
}






.pack-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pack-sort-label {
  font-size: 0.9rem;
  font-weight: 650;
  color: #475569;
}

.pack-sort-select {
  min-width: 210px;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 650;
  outline: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.pack-sort-select:hover {
  border-color: #94a3b8;
}

.pack-sort-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}









.export-panel {
  margin-top: 1.25rem;
}

.export-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.export-actions .secondary-button {
  min-width: 180px;
}





.session-history-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.session-history-extra.hidden {
  display: none;
}

.session-history-toggle {
  align-self: flex-start;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.session-history-toggle:hover {
  transform: translateY(-1px);
  border-color: #94a3b8;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.session-history-tiles-extra {
  margin-top: 0.25rem;
}











.training-chart {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.75rem;
  min-height: 260px;
  padding: 1rem 0.25rem 0.25rem;
}

.chart-y-axis {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  padding-bottom: 2rem;
}

.chart-y-tick {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.chart-main {
  position: relative;
  min-width: 0;
  height: 230px;
  padding-bottom: 2rem;
}

.chart-grid {
  position: absolute;
  inset: 0 0 2rem 0;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  pointer-events: none;
}

.chart-grid-line {
  border-top: 1px solid #e2e8f0;
}

.chart-bars {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0 0.25rem;
}

.chart-bar-item {
  height: 100%;
  min-width: 58px;
  flex: 0 0 58px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.chart-bar-wrap {
  height: calc(100% - 2rem);
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  position: relative;
  width: 34px;
  border-radius: 0;
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
}

.chart-bar:hover {
  transform: scaleY(1.02);
  filter: brightness(1.05);
}

.chart-bar-normal {
  background: linear-gradient(180deg, #22c55e, #a3e635);
}

.chart-bar-weak {
  background: linear-gradient(180deg, #1e3a8a, #2563eb);
}

.chart-bar-value {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.35rem);
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.chart-x-label {
  height: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  padding-left: 3.8rem;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 0;
  display: inline-block;
}

.chart-legend-normal {
  background: linear-gradient(180deg, #22c55e, #a3e635);
}

.chart-legend-weak {
  background: linear-gradient(180deg, #1e3a8a, #2563eb);
}

.chart-empty-state {
  padding: 1rem;
  border-radius: 16px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 650;
  border: 1px dashed #cbd5e1;
}







.answer-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.answer-input-row input {
  flex: 1;
}

.special-char-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.special-char-btn {
  min-width: 36px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.special-char-btn:hover {
  transform: translateY(-1px);
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

.special-char-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

@media (max-width: 640px) {
  .answer-input-row {
    flex-direction: column;
  }

  .special-char-btn {
    min-width: 34px;
    height: 32px;
  }
}






.answer-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.answer-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
}

.answer-input-row input {
  flex: 1;
}

/* Řádek se speciálními znaky musí být pod inputem */
.special-char-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.1rem;
}

/* Důležité: přebije obecný styl .answer-form button */
.answer-form .special-char-btn {
  width: auto;
  min-width: 34px;
  height: 32px;
  padding: 0 0.55rem;

  border: 1px solid #dbe3ef;
  border-radius: 8px;

  background: #f8fafc;
  color: #334155;

  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;

  box-shadow: none;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.12s ease;
}

.answer-form .special-char-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e3a8a;
  transform: translateY(-1px);
}

.answer-form .special-char-btn:active {
  transform: translateY(0);
  background: #e0e7ff;
}

/* Tlačítko Zkontrolovat necháme větší */
.answer-input-row #checkBtn {
  flex: 0 0 auto;
}

/* Mobil */
@media (max-width: 640px) {
  .answer-input-row {
    flex-direction: column;
  }

  .special-char-buttons {
    justify-content: flex-start;
  }

  .answer-form .special-char-btn {
    min-width: 32px;
    height: 30px;
    font-size: 0.9rem;
  }
}











.feedback-inline {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  animation: feedbackPop 0.18s ease-out;
}

.feedback-status {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.feedback-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 1.2rem;
  font-weight: 900;
}

.feedback-title {
  font-size: 1rem;
  font-weight: 850;
  margin-bottom: 0.35rem;
}

.feedback-main-answer {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.feedback-small {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 0.1rem;
}

.feedback-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.feedback-comparison div {
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.feedback-comparison span {
  display: block;
  font-size: 0.75rem;
  font-weight: 750;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.feedback-comparison strong {
  display: block;
  font-size: 1.05rem;
  color: #0f172a;
}

.feedback-correct {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #065f46;
}

.feedback-correct .feedback-icon {
  background: #22c55e;
  color: white;
}

.feedback-almost {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.feedback-almost .feedback-icon {
  background: #f59e0b;
  color: white;
}

.feedback-wrong {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.feedback-wrong .feedback-icon {
  background: #ef4444;
  color: white;
}

@keyframes feedbackPop {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .feedback-comparison {
    grid-template-columns: 1fr;
  }

  .feedback-main-answer {
    font-size: 1.25rem;
  }
}




.training-card {
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.training-body {
  flex: 1;
  display: grid;
  grid-template-rows: minmax(210px, 1fr) 112px;
  gap: 1rem;
  align-items: stretch;
}

.prompt-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 1rem 0;
}

.feedback-slot {
  min-height: 112px;
  max-height: 112px;
  overflow: hidden;

  opacity: 0;
  visibility: hidden;

  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid transparent;

  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.feedback-slot.feedback-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.feedback-compact {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.feedback-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-weight: 900;
  font-size: 1.2rem;
}

.feedback-title {
  font-size: 0.95rem;
  font-weight: 850;
  margin-bottom: 0.25rem;
}

.feedback-answer-compact {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
}

.feedback-mini-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
  width: 100%;
}

.feedback-mini-grid div {
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.feedback-mini-grid span {
  display: block;
  font-size: 0.72rem;
  font-weight: 750;
  opacity: 0.72;
  margin-bottom: 0.15rem;
}

.feedback-mini-grid strong {
  display: block;
  font-size: 1rem;
  color: #0f172a;
  word-break: break-word;
}

.feedback-correct {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #065f46;
}

.feedback-correct .feedback-icon {
  background: #22c55e;
  color: #ffffff;
}

.feedback-almost {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.feedback-almost .feedback-icon {
  background: #f59e0b;
  color: #ffffff;
}

.feedback-wrong {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.feedback-wrong .feedback-icon {
  background: #ef4444;
  color: #ffffff;
}

.training-answer-area {
  margin-top: 1rem;
}

.answer-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.answer-input-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.answer-input-row input {
  flex: 1;
}

.special-char-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}

@media (max-width: 640px) {
  .training-card {
    min-height: 620px;
  }

  .training-body {
    grid-template-rows: minmax(210px, 1fr) 130px;
  }

  .feedback-slot {
    min-height: 130px;
    max-height: 130px;
  }

  .feedback-mini-grid {
    grid-template-columns: 1fr;
  }

  .answer-input-row {
    flex-direction: column;
  }
}











.feedback-synonym {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.feedback-synonym .feedback-icon {
  background: #1e3a8a;
  color: #ffffff;
}


/* ------------------------------------------------------------
   Homepage / Můj přehled
------------------------------------------------------------ */

.menu-home-button {
  margin-bottom: 0.35rem;
  font-weight: 800;
  font-size: 0.98rem;
}

.home-dashboard {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.5rem;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 1.25rem;
  align-items: stretch;

  padding: 1.5rem;
  border-radius: 30px;

  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.32), transparent 36%),
    linear-gradient(135deg, #ffffff, #fff7ed);

  border: 1px solid rgba(249, 115, 22, 0.12);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.10);
}

.home-hero-content h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #111827;
}

.home-hero-content p {
  max-width: 560px;
  margin: 0.85rem 0 1.25rem;
  color: #64748b;
  font-weight: 650;
  line-height: 1.55;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-recommendation {
  margin-top: 1rem;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 650;
}

.home-recommendation strong {
  color: #0f172a;
}

.home-level-ring {
  display: flex;
  flex-direction: column;
  justify-content: center;

  min-height: 210px;
  padding: 1.25rem;
  border-radius: 26px;

  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.ring-number {
  font-size: 3.2rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.06em;
  color: #ea580c;
}

.ring-label {
  margin-top: 0.45rem;
  color: #9a3412;
  font-weight: 800;
}

.ring-bar {
  height: 13px;
  margin-top: 1rem;
  background: #ffedd5;
  border-radius: 999px;
  overflow: hidden;
}

.ring-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #facc15);
  border-radius: inherit;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.home-stat-card,
.home-panel,
.home-pos-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.home-stat-card {
  padding: 1.05rem;
  border-radius: 22px;
}

.home-stat-card span {
  display: block;
  color: #64748b;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.home-stat-card strong {
  display: block;
  font-size: 2.1rem;
  line-height: 1;
  color: #0f172a;
}

.home-stat-card small {
  display: block;
  margin-top: 0.35rem;
  color: #94a3b8;
  font-weight: 700;
}

.home-panel {
  padding: 1.25rem;
  border-radius: 26px;
}

.home-level-list {
  display: grid;
  gap: 0.8rem;
}

.home-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.home-progress-row strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
}

.home-progress-row span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
}

.home-progress-value {
  color: #0f172a;
  font-weight: 900;
}

.home-progress-track {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.home-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #facc15, #fb923c);
}

.home-pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}

.home-pos-card {
  border-radius: 22px;
  padding: 1rem;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.home-pos-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.12);
}

.home-pos-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fef3c7;
  font-size: 1.6rem;
  margin-bottom: 0.9rem;
}

.home-pos-title {
  color: #0f172a;
  font-weight: 900;
  font-size: 1.05rem;
}

.home-pos-meta {
  color: #64748b;
  font-weight: 700;
  font-size: 0.86rem;
  margin: 0.2rem 0 0.8rem;
}

.home-two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.35rem;
}



.home-weak-list,
.home-recent-list {
  display: grid;
  gap: 0.65rem;
}

.home-weak-item,
.home-recent-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;

  padding: 0.85rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.home-weak-item strong,
.home-recent-item strong {
  display: block;
  color: #0f172a;
}

.home-weak-item span,
.home-recent-item span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.home-weak-score,
.home-recent-percent {
  flex: 0 0 auto;
  color: #ea580c;
  font-weight: 950;
  font-size: 1.2rem;
}

.home-panel-button {
  margin-top: 1rem;
}

.home-small-empty {
  margin-top: 0;
  box-shadow: none;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.85rem;
}

.achievement-card {
  display: flex;
  gap: 0.8rem;
  align-items: center;

  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.achievement-card.unlocked {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.achievement-card.locked {
  opacity: 0.72;
}

.achievement-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ffffff;
  font-size: 1.35rem;
}

.achievement-card strong {
  display: block;
  color: #0f172a;
}

.achievement-card span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .home-hero,
  .home-two-columns {
    grid-template-columns: 1fr;
  }

  .home-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-level-ring {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .home-stats-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: 1rem;
    border-radius: 24px;
  }

  .home-panel {
    padding: 1rem;
  }
}


/* ------------------------------------------------------------
   Srolované menu podle jazykových úrovní
------------------------------------------------------------ */

.course-menu {
  gap: 6px;
}

.menu-level {
  border-top: 1px solid #3f3f46;
  padding-top: 6px;
  margin: 0;
}

.menu-level-title.menu-level-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.menu-level-chevron {
  flex: 0 0 auto;
  color: #a1a1aa;
  font-size: 0.85rem;
  transition: transform 0.18s ease, color 0.18s ease;
}

.menu-level.is-expanded .menu-level-chevron {
  transform: rotate(90deg);
  color: #18181b;
}

/*
  Důležité: tady nepoužíváme grid-template-rows: 0fr.
  U více položek uvnitř totiž některé auto-řádky pořád držely výšku,
  takže A1 a A2 zůstávaly daleko od sebe. max-height: 0 sbalí celý obsah.
*/
.menu-level-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.22s ease, opacity 0.18s ease;
}

.menu-level.is-expanded .menu-level-content {
  max-height: 900px;
  opacity: 1;
}

.menu-level-content > .menu-pos:first-child {
  margin-top: 6px;
}

.menu-level.is-collapsed .menu-pos {
  pointer-events: none;
}

.menu-level.is-expanded .menu-pos {
  pointer-events: auto;
}

.menu-pos {
  margin-left: 8px;
  margin-bottom: 8px;
}

.menu-pos-title.active {
  background: #facc15;
  color: #18181b;
}












.home-pos-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.home-pos-tab {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  padding: 0.65rem 1.1rem;
  background: rgba(15, 23, 42, 0.04);
  color: inherit;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(1px);
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.home-pos-tab:hover {
  background: rgba(37, 99, 235, 0.08);
}

.home-pos-tab.active {
  background: var(--panel-bg, #ffffff);
  color: #2563eb;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(1px);
}

.home-pos-tab.active::after {
  content: "";
  display: block;
  height: 2px;
  margin: 0.45rem -0.35rem -0.65rem;
  background: #2563eb;
  border-radius: 999px;
}




.chart-bar-imperfect {
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.25);
}

.chart-legend-imperfect {
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
}



.language-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.language-flag-img {
  width: 1.35em;
  height: 1em;
  object-fit: cover;
  border-radius: 0.15rem;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  flex: 0 0 auto;
}


.feedback-answer-with-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.speak-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.speak-button:hover {
  background: rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.speak-button:active {
  transform: translateY(0);
}













.user-profile-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 246, 255, 0.72));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.user-profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-profile-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.user-profile-info strong {
  font-size: 1.05rem;
  color: #0f172a;
}

.user-profile-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.user-profile-select {
  min-width: 180px;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: white;
  color: #0f172a;
  font-weight: 700;
}

@media (max-width: 720px) {
  .user-profile-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .user-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .user-profile-select {
    width: 100%;
  }
}







.profile-settings-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-settings-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 38%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.profile-settings-hero h1 {
  margin: 0.25rem 0 0.4rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #0f172a;
}

.profile-settings-hero p {
  max-width: 680px;
  margin: 0;
  color: #475569;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 2rem;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.25);
}

.profile-settings-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.profile-settings-row label {
  font-weight: 800;
  color: #334155;
}

.profile-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.profile-settings-note {
  margin-top: 0;
  color: #475569;
  line-height: 1.6;
}

.danger-button {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font-weight: 800;
  cursor: pointer;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.9);
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.danger-button:hover {
  background: rgba(254, 202, 202, 1);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .profile-settings-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-settings-actions button,
  .profile-settings-actions select {
    width: 100%;
  }
}




.profile-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.25);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-small {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  font-size: 1rem;
}

.profile-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 30px;
  font-size: 2rem;
}

.profile-avatar.has-photo {
  background: #e2e8f0;
}

.user-profile-info-with-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}











.profile-settings-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-settings-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1.25rem;
  padding: 1.35rem;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 34%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.profile-settings-hero-left {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  min-width: 0;
}

.profile-settings-hero h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #0f172a;
}

.profile-settings-hero p {
  max-width: 680px;
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.profile-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 0.7rem;
  min-width: 260px;
}

.profile-hero-stats div,
.settings-mini-stats div,
.backup-summary div {
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.profile-hero-stats span,
.settings-mini-stats span,
.backup-summary span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-hero-stats strong,
.settings-mini-stats strong,
.backup-summary strong {
  display: block;
  margin-top: 0.25rem;
  color: #0f172a;
  font-size: 1.35rem;
}

.profile-settings-tabs {
  display: flex;
  gap: 0.45rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.profile-settings-tab {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: transparent;
  color: #475569;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.profile-settings-tab:hover {
  background: rgba(255, 255, 255, 0.65);
}

.profile-settings-tab.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.profile-settings-tab-content {
  min-height: 320px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.settings-card {
  padding: 1.15rem;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.settings-card-main {
  grid-row: span 2;
}

.settings-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.settings-card-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.15rem;
}

.settings-card-header p {
  margin: 0.25rem 0 0;
  color: #64748b;
  line-height: 1.5;
}

.profile-settings-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.profile-settings-row label {
  font-weight: 800;
  color: #334155;
}

.profile-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.avatar-settings-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.settings-mini-stats,
.backup-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.settings-option-list {
  display: grid;
  gap: 0.8rem;
}

.settings-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  cursor: pointer;
}

.settings-toggle.disabled {
  opacity: 0.7;
  cursor: default;
}

.settings-toggle strong {
  display: block;
  color: #0f172a;
}

.settings-toggle span {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  line-height: 1.45;
}

.settings-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle-ui {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.18s ease;
}

.settings-toggle-ui::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: white;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
  transition: transform 0.18s ease;
}

.settings-toggle input:checked + .settings-toggle-ui {
  background: #2563eb;
}

.settings-toggle input:checked + .settings-toggle-ui::after {
  transform: translateX(20px);
}

.settings-radio-list {
  display: grid;
  gap: 0.65rem;
}

.settings-radio {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem;
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.settings-info-box {
  padding: 1rem;
  border-radius: 18px;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.55;
}

.settings-info-box p {
  margin-bottom: 0;
}

.danger-zone-card {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(135deg, #ffffff, #fff7f7);
}

.danger-button {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font-weight: 800;
  cursor: pointer;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.9);
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.danger-button:hover:not(:disabled) {
  background: rgba(254, 202, 202, 1);
  transform: translateY(-1px);
}

.danger-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 920px) {
  .profile-settings-hero {
    flex-direction: column;
  }

  .profile-hero-stats {
    min-width: 0;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-card-main {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .profile-settings-hero-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-hero-stats,
  .settings-mini-stats,
  .backup-summary {
    grid-template-columns: 1fr;
  }

  .profile-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-settings-actions button,
  .profile-settings-actions select {
    width: 100%;
  }
}








/* ------------------------------------------------------------
   Profile settings hero - cleaner but more beautiful
------------------------------------------------------------ */

.profile-settings-page {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
}

.profile-settings-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  min-height: 240px;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.18), transparent 36%),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
}

.profile-settings-hero.has-profile-photo {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(30, 64, 175, 0.52)),
    var(--profile-photo);
  background-size: cover;
  background-position: center;
}

.profile-hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.profile-settings-hero.has-profile-photo .profile-hero-backdrop {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.14));
  backdrop-filter: blur(10px);
}

.profile-settings-hero-inner {
  position: relative;
  z-index: 1;
  min-height: 240px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 1.5rem;
}

.profile-settings-hero-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-width: 0;
}

.profile-avatar-frame {
  flex: 0 0 auto;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.profile-settings-hero.has-profile-photo .profile-avatar-frame {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.profile-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: none;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-small {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.profile-avatar-large {
  width: 104px;
  height: 104px;
  border-radius: 999px;
  font-size: 2rem;
}

.profile-avatar.has-photo {
  background: #e2e8f0;
}

.profile-hero-copy {
  min-width: 0;
}

.profile-settings-hero h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1;
  color: #0f172a;
  letter-spacing: -0.055em;
}

.profile-settings-hero p {
  max-width: 600px;
  margin: 0;
  color: #64748b;
  line-height: 1.52;
}

.profile-settings-hero.has-profile-photo h1,
.profile-settings-hero.has-profile-photo p,
.profile-settings-hero.has-profile-photo .eyebrow {
  color: white;
}

.profile-settings-hero.has-profile-photo p {
  color: rgba(255, 255, 255, 0.78);
}

.profile-settings-hero .eyebrow {
  color: #2563eb;
}

.profile-settings-hero.has-profile-photo .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.profile-settings-hero.has-profile-photo .secondary-button {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
}

.profile-settings-hero.has-profile-photo .secondary-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.profile-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 0.75rem;
  min-width: 250px;
}

.profile-hero-stats div {
  padding: 0.85rem 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.profile-settings-hero.has-profile-photo .profile-hero-stats div {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.profile-hero-stats span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-hero-stats strong {
  display: block;
  margin-top: 0.15rem;
  color: #0f172a;
  font-size: 1.45rem;
}

.profile-settings-hero.has-profile-photo .profile-hero-stats span {
  color: rgba(255, 255, 255, 0.7);
}

.profile-settings-hero.has-profile-photo .profile-hero-stats strong {
  color: white;
}









/* Tabs */

.profile-settings-tabs {
  display: flex;
  gap: 1.25rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  width: 100%;
  overflow-x: auto;
}

.profile-settings-tab {
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 0 0 0.85rem;
  background: transparent;
  color: #64748b;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}

.profile-settings-tab:hover {
  color: #2563eb;
  background: transparent;
}

.profile-settings-tab.active {
  color: #2563eb;
  background: transparent;
  box-shadow: none;
}

.profile-settings-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: #2563eb;
}

/* Content */

.profile-settings-tab-content {
  min-height: 320px;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}

.settings-card {
  padding: 1.45rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.settings-card:first-child {
  padding-top: 0.25rem;
}

.settings-card-main {
  grid-row: auto;
}

.settings-card-header {
  display: block;
  margin-bottom: 1rem;
}

.settings-card-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
  letter-spacing: -0.025em;
}

.settings-card-header p {
  max-width: 660px;
  margin: 0.3rem 0 0;
  color: #64748b;
  line-height: 1.55;
}

/* Form rows */

.profile-settings-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  max-width: 420px;
}

.profile-settings-row label {
  font-weight: 800;
  color: #334155;
}

.user-profile-select {
  width: 100%;
  max-width: 420px;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  background: white;
  color: #0f172a;
  font-weight: 700;
}

.profile-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.avatar-settings-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Settings rows */

.settings-option-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 780px;
}

.settings-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: transparent;
  cursor: pointer;
}

.settings-toggle:first-child {
  padding-top: 0;
}

.settings-toggle:last-child {
  border-bottom: 0;
}

.settings-toggle.disabled {
  opacity: 0.62;
  cursor: default;
}

.settings-toggle strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
}

.settings-toggle span {
  display: block;
  margin-top: 0.28rem;
  color: #64748b;
  line-height: 1.45;
  font-size: 0.93rem;
}

.settings-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle-ui {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.18s ease;
}

.settings-toggle-ui::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: white;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  transition: transform 0.18s ease;
}

.settings-toggle input:checked + .settings-toggle-ui {
  background: #2563eb;
}

.settings-toggle input:checked + .settings-toggle-ui::after {
  transform: translateX(20px);
}




.settings-mini-stats,
.backup-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.settings-mini-stats div,
.backup-summary div {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.settings-mini-stats span,
.backup-summary span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.settings-mini-stats strong,
.backup-summary strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.3rem;
}



@media (max-width: 860px) {
  .profile-settings-page {
    max-width: none;
  }

  .profile-settings-hero-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-hero-stats {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .settings-mini-stats,
  .backup-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-settings-hero-inner {
    padding: 1.15rem;
  }

  .profile-settings-hero-left {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-avatar-large {
    width: 88px;
    height: 88px;
  }

  .profile-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-settings-actions button,
  .profile-settings-actions select {
    width: 100%;
  }

  .settings-toggle {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .settings-toggle-ui {
    justify-self: start;
  }
}













/* ------------------------------------------------------------
   Homepage - clean refined style
------------------------------------------------------------ */

.home-dashboard-clean {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Hero */

.home-hero-clean {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: stretch;
  padding: 1.35rem;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.home-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.35rem;
  min-width: 0;
}

.home-profile-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-profile-line div {
  min-width: 0;
}

.home-profile-line span {
  display: block;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-profile-line strong {
  display: block;
  color: #0f172a;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-profile-settings-link {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 850;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
}

.home-profile-settings-link:hover {
  background: rgba(37, 99, 235, 0.08);
}

.home-hero-copy h1 {
  margin: 0.2rem 0 0.35rem;
  color: #0f172a;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.home-hero-copy p {
  max-width: 560px;
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Recommended card */

.home-next-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem;
  border-radius: 24px;
  background: #0f172a;
  color: white;
}

.home-next-card > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-next-card strong {
  color: white;
}

.home-next-card .home-recommendation,
.home-next-card span:not(:first-child) {
  color: rgba(255, 255, 255, 0.72);
}

/* Metrics */

.home-metrics-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.home-metrics-row article {
  padding: 0.35rem 1rem;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.home-metrics-row article:first-child {
  padding-left: 0;
}

.home-metrics-row article:last-child {
  border-right: 0;
  padding-right: 0;
}

.home-metrics-row span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-metrics-row strong {
  display: inline-block;
  margin-top: 0.15rem;
  color: #0f172a;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.home-metrics-row small {
  display: block;
  margin-top: 0.05rem;
  color: #64748b;
}

/* Layout */

.home-layout-clean {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
}

.home-main-column,
.home-side-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Panels */

.home-panel-clean {
  padding: 0 0 1.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.home-side-column .home-panel-clean {
  padding-bottom: 1rem;
}

.home-panel-clean .detail-panel-header {
  margin-bottom: 0.95rem;
}

.home-panel-clean .detail-panel-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.home-panel-clean .detail-panel-header span {
  color: #94a3b8;
  font-size: 0.9rem;
}

.home-panel-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.home-panel-button {
  width: auto;
  margin-top: 0.75rem;
}

/* Progress rows */

.home-progress-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.home-progress-row:last-child {
  border-bottom: 0;
}

.home-progress-row strong {
  color: #0f172a;
}

.home-progress-row span {
  color: #64748b;
}

.home-progress-track,
.tile-progress-bar,
.ring-bar {
  background: rgba(148, 163, 184, 0.18);
}

/* POS tabs/cards */

.home-pos-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.home-pos-tab {
  border: 0;
  border-radius: 0;
  padding: 0 0 0.7rem;
  background: transparent;
  color: #64748b;
  font-weight: 850;
  cursor: pointer;
}

.home-pos-tab.active {
  color: #2563eb;
  background: transparent;
  box-shadow: none;
}

.home-pos-tab.active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.7rem;
  background: #2563eb;
  border-radius: 999px;
}

.home-pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.home-pos-card {
  text-align: left;
  padding: 0.9rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: none;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease;
}

.home-pos-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.home-pos-icon {
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
}

.home-pos-title {
  font-weight: 850;
  color: #0f172a;
}

.home-pos-meta {
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Weak words and recent sessions */

.home-weak-list,
.home-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.home-weak-item,
.home-recent-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.home-weak-item:last-child,
.home-recent-item:last-child {
  border-bottom: 0;
}

.home-weak-item strong,
.home-recent-item strong {
  color: #0f172a;
}

.home-weak-item span,
.home-recent-item span {
  color: #64748b;
}

.home-weak-score,
.home-recent-percent {
  color: #2563eb;
  font-weight: 900;
}

/* Achievements calmer */

.home-achievements-clean {
  opacity: 0.92;
}

.achievement-grid {
  gap: 0.75rem;
}

.achievement-card {
  box-shadow: none;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.achievement-card.locked {
  opacity: 0.55;
}

/* Responsive */

@media (max-width: 980px) {
  .home-hero-clean {
    grid-template-columns: 1fr;
  }

  .home-layout-clean {
    grid-template-columns: 1fr;
  }

  .home-side-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-side-column .home-panel-clean:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .home-dashboard-clean {
    max-width: none;
  }

  .home-metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 0;
  }

  .home-metrics-row article {
    padding: 0.8rem 0;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .home-side-column {
    display: flex;
  }

  .home-hero-actions,
  .home-panel-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero-actions button,
  .home-panel-actions button {
    width: 100%;
  }
}












/* ------------------------------------------------------------
   Homepage refinement - spacing, sidebar, recommendation image
------------------------------------------------------------ */

.home-dashboard-clean {
  gap: 1.6rem;
}

.home-hero-clean {
  gap: 1.25rem;
  padding: 1.55rem;
}

.home-layout-clean {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.6rem;
}

/* Jemně odlišený pravý sloupec */

.home-side-column {
  padding: 1rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(239, 246, 255, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.home-side-column .home-panel-clean {
  padding: 0 0 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.home-side-column .home-panel-clean:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Doporučeno s fotkou balíčku */

.home-next-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.35), transparent 34%),
    linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
}

.home-next-card.has-recommended-image {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 64, 175, 0.5)),
    var(--recommended-image);
  background-size: cover;
  background-position: center;
}

.home-next-card-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-next-card.has-recommended-image .home-next-card-overlay {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.62));
  backdrop-filter: blur(1.5px);
}

.home-next-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.15rem;
}

.home-next-card-content > span {
  width: fit-content;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.home-next-card-content strong {
  color: white;
}

.home-next-card-content br {
  display: block;
  margin-bottom: 0.25rem;
}

.home-next-card-content span:not(:first-child) {
  color: rgba(255, 255, 255, 0.78);
}

/* Víc prostoru u metrik */

.home-metrics-row {
  padding: 1.05rem 0;
  margin-top: 0.1rem;
  margin-bottom: 0.15rem;
}

.home-metrics-row article {
  padding: 0.45rem 1.15rem;
}

.home-metrics-row strong {
  margin-top: 0.2rem;
}

/* Progress podle úrovní - oprava paddingu A1/A2 */

.home-level-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.home-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: #ffffff;
}

.home-progress-row:last-child {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.home-progress-row > div:first-child {
  min-width: 0;
}

.home-progress-row strong {
  display: block;
  color: #0f172a;
  font-size: 0.98rem;
}

.home-progress-row span {
  display: block;
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.88rem;
}

.home-progress-value {
  justify-self: end;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-weight: 900;
  font-size: 0.92rem;
}

.home-progress-track {
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.home-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

/* Trochu víc vzduchu v hlavním obsahu */

.home-main-column,
.home-side-column {
  gap: 1.45rem;
}

.home-panel-clean {
  padding-bottom: 1.45rem;
}

.home-panel-clean .detail-panel-header {
  margin-bottom: 1.05rem;
}

/* Nejslabší slova / poslední tréninky - čitelnější řádky */

.home-weak-item,
.home-recent-item {
  padding: 0.85rem;
}

.home-weak-score,
.home-recent-percent {
  padding: 0.25rem 0.48rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-weight: 900;
  font-size: 0.85rem;
}

/* Mini achievementy v pravém sloupci */

.home-achievements-mini-panel .detail-panel-header {
  margin-bottom: 0.75rem;
}

.achievement-mini-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.achievement-mini {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  cursor: help;
  font-size: 1rem;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    opacity 0.16s ease;
}

.achievement-mini:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
  background: white;
}

.achievement-mini.locked {
  opacity: 0.35;
  filter: grayscale(1);
}

.achievement-mini.unlocked {
  opacity: 1;
}

/* Původní velké achievement karty na homepage už nebudou rušit */

.home-achievements-clean,
.achievement-grid {
  display: none;
}

/* Responsive */

@media (max-width: 980px) {
  .home-layout-clean {
    grid-template-columns: 1fr;
  }

  .home-side-column {
    padding: 1rem;
  }
}

@media (max-width: 720px) {
  .home-progress-row {
    grid-template-columns: 1fr;
  }

  .home-progress-value {
    justify-self: start;
  }

  .home-next-card {
    min-height: 170px;
  }
}


















/* ------------------------------------------------------------
   Multi-language homepage hub
------------------------------------------------------------ */

.language-hub-section {
  padding-bottom: 1.5rem;
}

.language-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.language-card {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.language-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--language-accent);
  opacity: 0.85;
}

.language-card.active:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--language-accent), transparent 55%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.language-card.coming-soon {
  opacity: 0.72;
  background: #f8fafc;
}

.language-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
}

.language-title-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-width: 0;
}

.language-title-row h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
}

.language-title-row span {
  display: block;
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.88rem;
}

.language-card .language-flag-img {
  width: 2.05rem;
  height: 1.45rem;
  object-fit: cover;
  border-radius: 0.28rem;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  flex: 0 0 auto;
}

.language-status {
  flex: 0 0 auto;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.language-status.active {
  color: #166534;
  background: rgba(34, 197, 94, 0.1);
}

.language-status.coming-soon {
  color: #64748b;
  background: rgba(148, 163, 184, 0.14);
}

.language-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 1rem;
  color: #64748b;
  font-size: 0.86rem;
}

.language-progress {
  margin-top: 0.85rem;
}

.language-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.language-progress span {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.language-progress strong {
  color: #0f172a;
}

.language-progress-bar {
  height: 8px;
  margin-top: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.language-progress-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--language-accent),
    color-mix(in srgb, var(--language-accent), white 35%)
  );
}


.language-card-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 1rem;
}

.language-card-actions button {
  width: 100%;
  flex: 1;
  padding-inline: 0.8rem;
}

.language-switch-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}




.language-coming-text {
  margin: 1rem 0 0;
  color: #64748b;
  line-height: 1.5;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .language-card-grid {
    grid-template-columns: 1fr;
  }
}








/* ------------------------------------------------------------
   Motivation page
------------------------------------------------------------ */

.motivation-page {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.motivation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: stretch;
  padding: 1.45rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #f0fdf4);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

.motivation-hero h1 {
  margin: 0.25rem 0 0.45rem;
  color: #0f172a;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.motivation-hero p {
  max-width: 680px;
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.motivation-level-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.1rem;
  border-radius: 24px;
  background: #0f172a;
  color: white;
}

.motivation-level-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.motivation-level-card strong {
  margin-top: 0.3rem;
  font-size: 2.1rem;
  letter-spacing: -0.05em;
}

.motivation-level-card small {
  margin-top: 0.55rem;
  color: rgba(255, 255, 255, 0.68);
}

.motivation-xp-bar {
  height: 9px;
  margin-top: 0.85rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.motivation-xp-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #facc15);
}

.motivation-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.motivation-overview article {
  padding: 1rem;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.motivation-overview article:first-child {
  padding-left: 0;
}

.motivation-overview article:last-child {
  border-right: 0;
  padding-right: 0;
}

.motivation-overview span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.motivation-overview strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.motivation-overview small {
  color: #64748b;
}

.motivation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 1.4rem;
  align-items: start;
}

.motivation-main,
.motivation-side {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.motivation-side {
  padding: 1rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(240, 253, 244, 0.78));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.motivation-section {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.motivation-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Challenges */

.challenge-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.challenge-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem;
  border-radius: 20px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.challenge-row.done {
  border-color: rgba(34, 197, 94, 0.35);
  background: #f0fdf4;
}

.challenge-icon {
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
}

.challenge-title-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.challenge-title-line strong {
  color: #0f172a;
}

.challenge-title-line span {
  color: #2563eb;
  font-weight: 900;
}

.challenge-content p {
  margin: 0.25rem 0 0.6rem;
  color: #64748b;
  line-height: 1.45;
}

.challenge-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.challenge-progress div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #60a5fa);
}

/* Achievements */

.motivation-achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.motivation-achievement {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: 18px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.motivation-achievement.locked {
  opacity: 0.48;
  filter: grayscale(1);
}

.motivation-achievement-icon {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.motivation-achievement strong {
  color: #0f172a;
}

.motivation-achievement p {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.motivation-achievement > span {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 900;
}

/* Leaderboard */

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.leaderboard-row.active {
  color: #166534;
}

.leaderboard-rank {
  width: 1.5rem;
  color: #94a3b8;
  font-weight: 900;
}

.leaderboard-user strong {
  display: block;
  color: #0f172a;
}

.leaderboard-user span {
  display: block;
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.84rem;
}

.leaderboard-xp {
  color: #2563eb;
  white-space: nowrap;
}

.motivation-tip {
  color: #334155;
  line-height: 1.55;
}

.motivation-tip p {
  margin-bottom: 0;
  color: #64748b;
}

/* Responsive */

@media (max-width: 980px) {
  .motivation-hero,
  .motivation-layout {
    grid-template-columns: 1fr;
  }

  .motivation-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .motivation-overview article {
    padding: 1rem 0;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .motivation-achievement-grid {
    grid-template-columns: 1fr;
  }
}














/* ------------------------------------------------------------
   Long-term progress / activity calendar
------------------------------------------------------------ */

.motivation-progress-section {
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.long-progress-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1rem;
}

.activity-calendar-card,
.activity-chart-card,
.weekly-summary-card,
.records-card {
  padding: 1rem;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.activity-calendar-card {
  grid-column: span 1;
}

.activity-chart-card {
  grid-column: span 1;
}

.progress-subheader {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.9rem;
}

.progress-subheader h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.progress-subheader span {
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Calendar */

.activity-calendar {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 0.35rem;
}

.activity-day {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #e2e8f0;
}

.activity-level-0 {
  background: #e2e8f0;
}

.activity-level-1 {
  background: #bbf7d0;
}

.activity-level-2 {
  background: #86efac;
}

.activity-level-3 {
  background: #22c55e;
}

.activity-level-4 {
  background: #15803d;
}

.activity-calendar-legend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  color: #64748b;
  font-size: 0.8rem;
}

.activity-calendar-legend .activity-day {
  width: 0.85rem;
  height: 0.85rem;
  aspect-ratio: auto;
}

/* Bar chart */

.activity-bar-chart {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 0.25rem;
  align-items: end;
}

.activity-bar-item {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 0.35rem;
  min-width: 0;
}

.activity-bar-wrap {
  flex: 1;
  display: flex;
  align-items: end;
}

.activity-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 999px 999px 3px 3px;
  background: #e2e8f0;
}

.activity-bar.active {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.activity-bar-item span {
  display: none;
}

/* Weekly summary */

.weekly-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.weekly-summary-grid span,
.records-list span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.weekly-summary-grid strong,
.records-list strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.35rem;
}

.records-list {
  display: grid;
  gap: 0.9rem;
}

.records-list small {
  display: block;
  margin-top: 0.1rem;
  color: #64748b;
}

/* Responsive */

@media (max-width: 980px) {
  .long-progress-layout {
    grid-template-columns: 1fr;
  }

  .activity-calendar {
    grid-template-columns: repeat(14, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .activity-calendar {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .activity-bar-chart {
    gap: 0.18rem;
  }
}









/* ------------------------------------------------------------
   Active badges
------------------------------------------------------------ */

.active-badges-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.13), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.active-badges-summary strong {
  display: block;
  color: #0f172a;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.active-badges-summary span {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.active-badges-summary p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.active-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.active-badge-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

.active-badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.active-badge-card.is-active {
  border-color: rgba(34, 197, 94, 0.38);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.13), transparent 34%),
    #ffffff;
}

.active-badge-card.is-inactive {
  opacity: 0.68;
}

.active-badge-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.05);
  font-size: 1.35rem;
}

.active-badge-card.is-active .active-badge-icon {
  background: rgba(34, 197, 94, 0.14);
}

.active-badge-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.active-badge-topline h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.active-badge-state {
  flex: 0 0 auto;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.active-badge-card.is-active .active-badge-state {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.active-badge-content p {
  margin: 0.35rem 0 0.55rem;
  color: #64748b;
  line-height: 1.45;
}

.active-badge-content > strong {
  display: block;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.4;
}

.active-badge-progress {
  height: 7px;
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.active-badge-progress div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #60a5fa);
}

.active-badge-card.is-inactive .active-badge-progress div {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

@media (max-width: 820px) {
  .active-badge-grid {
    grid-template-columns: 1fr;
  }

  .active-badges-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .active-badge-card {
    grid-template-columns: 1fr;
  }

  .active-badge-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
}







/* ------------------------------------------------------------
   Trophies
------------------------------------------------------------ */

.trophy-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #fffbeb);
  border: 1px solid rgba(250, 204, 21, 0.28);
}

.trophy-summary strong {
  display: block;
  color: #0f172a;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.trophy-summary span {
  display: block;
  margin-top: 0.2rem;
  color: #92400e;
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.trophy-summary p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.trophy-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.trophy-filter {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #ffffff;
  color: #64748b;
  padding: 0.48rem 0.75rem;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.trophy-filter:hover {
  transform: translateY(-1px);
  border-color: rgba(250, 204, 21, 0.55);
}

.trophy-filter.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.trophy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.trophy-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease,
    border-color 0.18s ease;
}

.trophy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.trophy-card.unlocked {
  border-color: rgba(250, 204, 21, 0.46);
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.18), transparent 34%),
    #ffffff;
}

.trophy-card.locked {
  opacity: 0.5;
  filter: grayscale(1);
}

.trophy-card.hidden-by-filter {
  display: none;
}

.trophy-icon-wrap {
  position: relative;
}

.trophy-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.05);
  font-size: 1.45rem;
}

.trophy-card.unlocked .trophy-icon {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.32), rgba(251, 191, 36, 0.18));
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.18);
}

.trophy-card-topline {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.85rem;
}

.trophy-card-topline h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.trophy-card-topline span {
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.trophy-card.unlocked .trophy-card-topline span {
  background: rgba(250, 204, 21, 0.2);
  color: #92400e;
}

.trophy-card-content p {
  margin: 0.35rem 0 0.65rem;
  color: #64748b;
  line-height: 1.45;
}

.trophy-progress-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.trophy-progress-line strong {
  color: #0f172a;
}

.trophy-progress-bar {
  height: 7px;
  margin-top: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.trophy-progress-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #facc15, #f97316);
}

.trophy-card.locked .trophy-progress-bar div {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

@media (max-width: 820px) {
  .trophy-grid {
    grid-template-columns: 1fr;
  }

  .trophy-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .trophy-card {
    grid-template-columns: 1fr;
  }

  .trophy-icon {
    width: 2.65rem;
    height: 2.65rem;
  }
}








.daily-challenge-intro {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.9rem;
  padding: 1rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.13), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.daily-challenge-intro strong {
  display: block;
  color: #0f172a;
  font-size: 1.15rem;
}

.daily-challenge-intro span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.9rem;
}

.daily-challenge-intro small {
  flex: 0 0 auto;
  color: #166534;
  font-weight: 900;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
}

.daily-challenge-card {
  position: relative;
  overflow: hidden;
}

.daily-challenge-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #22c55e;
  opacity: 0.75;
}

.daily-challenge-card.done::after {
  background: #facc15;
}

.challenge-secondary {
  display: block;
  margin: -0.25rem 0 0.55rem;
  color: #94a3b8;
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .daily-challenge-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}




.daily-challenge-reward-line {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-top: 0.75rem;
}

.daily-challenge-reward-line span {
  color: #64748b;
  font-size: 0.86rem;
}

.daily-challenge-reward-line strong {
  color: #16a34a;
}

.challenge-claim-button {
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  background: #16a34a;
  color: white;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease;
}

.challenge-claim-button:hover {
  transform: translateY(-1px);
  background: #15803d;
}

.challenge-claim-button.locked,
.challenge-claim-button.claimed,
.challenge-claim-button:disabled {
  cursor: default;
  transform: none;
  opacity: 0.72;
}

.challenge-claim-button.locked {
  background: #cbd5e1;
  color: #475569;
}

.challenge-claim-button.claimed {
  background: #facc15;
  color: #78350f;
}

.daily-challenge-card.claimed {
  border-color: rgba(250, 204, 21, 0.4);
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.16), transparent 34%),
    #ffffff;
}

@media (max-width: 560px) {
  .daily-challenge-reward-line {
    align-items: stretch;
    flex-direction: column;
  }

  .challenge-claim-button {
    width: 100%;
  }
}







/* ------------------------------------------------------------
   Games
------------------------------------------------------------ */

.games-page,
.game-setup-page,
.quick-hunt-page {
  max-width: 1120px;
  margin: 0 auto;
}

.games-hero,
.game-setup-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1.2rem;
  align-items: stretch;
  padding: 1.45rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

.game-setup-hero {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.games-hero h1,
.game-setup-hero h1 {
  margin: 0.25rem 0 0.45rem;
  color: #0f172a;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.games-hero p,
.game-setup-hero p {
  max-width: 680px;
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.games-hero-card {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  padding: 1.2rem;
  border-radius: 26px;
  background: #0f172a;
  color: white;
  text-align: center;
}

.games-hero-icon {
  font-size: 3rem;
}

.games-hero-card strong {
  font-size: 1.25rem;
}

.games-hero-card span {
  color: rgba(255, 255, 255, 0.7);
}

.games-grid,
.game-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.game-card,
.game-source-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem;
  border-radius: 26px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.game-card.featured {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.13), transparent 34%),
    white;
  border-color: rgba(34, 197, 94, 0.28);
}

.game-card.locked {
  opacity: 0.58;
  filter: grayscale(0.3);
}

.game-card-icon,
.game-source-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.08);
  font-size: 1.4rem;
}

.game-card h2,
.game-source-card h2 {
  margin: 0;
  color: #0f172a;
}

.game-card p,
.game-source-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.game-source-card.wide {
  grid-column: 1 / -1;
}

.game-pack-picker {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.game-pack-picker select {
  min-width: 0;
  flex: 1;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: white;
  color: #0f172a;
}

/* Quick Hunt */

.quick-hunt-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.quick-hunt-stats {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: #64748b;
}

.quick-hunt-stats strong {
  color: #0f172a;
}

.quick-hunt-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  margin-bottom: 1rem;
}

.quick-hunt-progress div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #60a5fa);
}

.quick-hunt-card {
  min-height: 430px;
  display: grid;
  align-content: center;
  gap: 1.2rem;
  padding: 1.4rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

.quick-hunt-label {
  color: #166534;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.quick-hunt-card h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.quick-hunt-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.quick-hunt-option {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: white;
  color: #0f172a;
  padding: 1rem;
  border-radius: 20px;
  font-size: 1.05rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.quick-hunt-option:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.quick-hunt-feedback,
.quick-hunt-result {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 32px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

.quick-hunt-feedback.correct {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 34%),
    white;
}

.quick-hunt-feedback.wrong {
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.12), transparent 34%),
    white;
}

.quick-hunt-feedback-icon,
.quick-hunt-result-icon {
  font-size: 3rem;
}

.quick-hunt-feedback h1,
.quick-hunt-result h1 {
  margin: 0.4rem 0;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.06em;
}

.quick-hunt-feedback p,
.quick-hunt-result p {
  color: #64748b;
  line-height: 1.55;
}

.quick-hunt-feedback-actions,
.quick-hunt-result-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.quick-hunt-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.quick-hunt-result-grid article {
  padding: 0.9rem;
  border-radius: 18px;
  background: #f8fafc;
}

.quick-hunt-result-grid span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quick-hunt-result-grid strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.35rem;
}

@media (max-width: 820px) {
  .games-hero,
  .game-setup-hero,
  .games-grid,
  .game-source-grid {
    grid-template-columns: 1fr;
  }

  .game-source-card.wide {
    grid-column: auto;
  }

  .game-pack-picker {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-hunt-options {
    grid-template-columns: 1fr;
  }

  .quick-hunt-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .quick-hunt-topbar,
  .quick-hunt-stats {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-hunt-result-grid {
    grid-template-columns: 1fr;
  }
}




/* ------------------------------------------------------------
   Memory game
------------------------------------------------------------ */

.memory-game-page {
  max-width: 1120px;
  margin: 0 auto;
}

.memory-game-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.memory-game-stats {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: #64748b;
}

.memory-game-stats strong {
  color: #0f172a;
}

.memory-game-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  margin-bottom: 1rem;
}

.memory-game-progress div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #60a5fa);
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.memory-card {
  position: relative;
  min-height: 128px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
  padding: 0;
}

.memory-card-back,
.memory-card-front {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 24px;
  backface-visibility: hidden;
  transition:
    transform 0.28s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.memory-card-back {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.22), transparent 36%),
    linear-gradient(135deg, #0f172a, #14532d);
  color: white;
  font-size: 2.2rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.memory-card-front {
  padding: 0.85rem;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.24);
  transform: rotateY(180deg);
  text-align: center;
}

.memory-card-front small {
  display: block;
  margin-bottom: 0.35rem;
  color: #16a34a;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.memory-card-front strong {
  display: block;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  line-height: 1.2;
}

.memory-card:hover .memory-card-back {
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.13);
}

.memory-card.is-visible .memory-card-back {
  transform: rotateY(180deg);
}

.memory-card.is-visible .memory-card-front {
  transform: rotateY(360deg);
}

.memory-card.is-matched .memory-card-front {
  border-color: rgba(34, 197, 94, 0.42);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 34%),
    #ffffff;
}

.memory-card:disabled {
  cursor: default;
}

/* Result */

.memory-result {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 34%),
    white;
  border: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

.memory-result-icon {
  font-size: 3rem;
}

.memory-result h1 {
  margin: 0.4rem 0;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.06em;
}

.memory-result p {
  color: #64748b;
  line-height: 1.55;
}

.memory-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.memory-result-grid article {
  padding: 0.9rem;
  border-radius: 18px;
  background: #f8fafc;
}

.memory-result-grid span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.memory-result-grid strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.35rem;
}

.memory-result-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

@media (max-width: 820px) {
  .memory-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .memory-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .memory-game-topbar,
  .memory-game-stats {
    align-items: stretch;
    flex-direction: column;
  }

  .memory-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memory-card {
    min-height: 112px;
  }

  .memory-result-grid {
    grid-template-columns: 1fr;
  }
}










/* ------------------------------------------------------------
   Word sprint
------------------------------------------------------------ */

.word-sprint-page {
  max-width: 1120px;
  margin: 0 auto;
}

.word-sprint-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.word-sprint-stats {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: #64748b;
  flex-wrap: wrap;
}

.word-sprint-stats strong {
  color: #0f172a;
}

.word-sprint-timer {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  font-weight: 900;
}

.word-sprint-timer.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.word-sprint-timebar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  margin-bottom: 1rem;
}

.word-sprint-timebar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #60a5fa);
  transition: width 0.22s ease;
}

.word-sprint-card {
  min-height: 430px;
  display: grid;
  align-content: center;
  gap: 1.1rem;
  padding: 1.4rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.13), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

.word-sprint-label {
  color: #2563eb;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.word-sprint-card h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.word-sprint-form {
  display: flex;
  gap: 0.7rem;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.word-sprint-form input {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: white;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
}

.word-sprint-form input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.word-sprint-actions {
  display: flex;
  justify-content: center;
}

.word-sprint-feedback {
  position: relative;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.word-sprint-feedback.correct {
  background: #f0fdf4;
  color: #166534;
  border-color: rgba(34, 197, 94, 0.28);
}

.word-sprint-feedback.wrong {
  background: #fef2f2;
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.22);
}

.word-sprint-feedback strong,
.word-sprint-feedback span,
.word-sprint-feedback small {
  display: block;
}

.word-sprint-feedback span {
  margin-top: 0.2rem;
  color: #0f172a;
  font-weight: 900;
}

.word-sprint-feedback small {
  margin-top: 0.2rem;
  opacity: 0.75;
}

.mini-speak-button {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  border: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: white;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

/* Result */

.word-sprint-result {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.13), transparent 34%),
    white;
  border: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

.word-sprint-result-icon {
  font-size: 3rem;
}

.word-sprint-result h1 {
  margin: 0.4rem 0;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.06em;
}

.word-sprint-result p {
  color: #64748b;
  line-height: 1.55;
}

.word-sprint-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.word-sprint-result-grid article {
  padding: 0.9rem;
  border-radius: 18px;
  background: #f8fafc;
}

.word-sprint-result-grid span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.word-sprint-result-grid strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.35rem;
}

.word-sprint-result-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

@media (max-width: 820px) {
  .word-sprint-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .word-sprint-form {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .word-sprint-topbar,
  .word-sprint-stats {
    align-items: stretch;
    flex-direction: column;
  }

  .word-sprint-result-grid {
    grid-template-columns: 1fr;
  }

  .mini-speak-button {
    position: static;
    margin-top: 0.6rem;
  }
}






/* ------------------------------------------------------------
   Word Hunt
------------------------------------------------------------ */

.word-hunt-page {
  max-width: 1120px;
  margin: 0 auto;
}

.word-hunt-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.word-hunt-stats {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: #64748b;
  flex-wrap: wrap;
}

.word-hunt-stats strong {
  color: #0f172a;
}

.word-hunt-timer {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  font-weight: 900;
}

.word-hunt-timer.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.word-hunt-timebar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  margin-bottom: 1rem;
}

.word-hunt-timebar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #60a5fa);
  transition: width 0.22s ease;
}

.word-hunt-card {
  min-height: 430px;
  display: grid;
  align-content: center;
  gap: 1.1rem;
  padding: 1.4rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

.word-hunt-label {
  color: #166534;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}



.word-hunt-letters span {
  width: 3.15rem;
  height: 3.15rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #0f172a;
  color: white;
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.word-hunt-form {
  display: flex;
  gap: 0.7rem;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.word-hunt-form input {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: white;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
}

.word-hunt-form input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.word-hunt-message {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.word-hunt-message.correct {
  background: #f0fdf4;
  color: #166534;
  border-color: rgba(34, 197, 94, 0.28);
}

.word-hunt-message.wrong {
  background: #fef2f2;
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.22);
}

.word-hunt-message.neutral {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.22);
}

.word-hunt-found-panel {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 22px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.word-hunt-found-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.word-hunt-found-header strong {
  color: #0f172a;
}

.word-hunt-found-header span {
  color: #94a3b8;
  font-size: 0.85rem;
}

.word-hunt-found-list,
.word-hunt-result-words div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.word-hunt-found-list span,
.word-hunt-result-words span {
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  font-weight: 850;
  font-size: 0.88rem;
}

.word-hunt-found-list em,
.word-hunt-result-words em {
  color: #94a3b8;
}

/* Result */

.word-hunt-result {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 34%),
    white;
  border: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
}

.word-hunt-result-icon {
  font-size: 3rem;
}

.word-hunt-result h1 {
  margin: 0.4rem 0;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.06em;
}

.word-hunt-result p {
  color: #64748b;
  line-height: 1.55;
}

.word-hunt-result-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.word-hunt-result-grid article {
  padding: 0.9rem;
  border-radius: 18px;
  background: #f8fafc;
}

.word-hunt-result-grid span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.word-hunt-result-grid strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.25rem;
}

.word-hunt-result-words {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: 22px;
  background: #f8fafc;
  text-align: left;
}

.word-hunt-result-words h2 {
  margin: 0 0 0.75rem;
  color: #0f172a;
  font-size: 1rem;
}

.word-hunt-result-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

@media (max-width: 820px) {
  .word-hunt-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .word-hunt-form {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .word-hunt-topbar,
  .word-hunt-stats {
    align-items: stretch;
    flex-direction: column;
  }

  .word-hunt-letters span {
    width: 2.65rem;
    height: 2.65rem;
  }

  .word-hunt-result-grid {
    grid-template-columns: 1fr;
  }

  .word-hunt-found-header {
    flex-direction: column;
    gap: 0.3rem;
  }
}





.word-hunt-topbar-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}





.word-hunt-letters span {
  width: 3.15rem;
  height: 3.15rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #0f172a;
  color: white;
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}



.word-hunt-letters {
  display: grid;
  grid-template-columns: repeat(4, 3.35rem);
  justify-content: center;
  gap: 0.65rem;
  margin: 1.1rem 0;
}

.word-hunt-letters-row {
  display: contents;
}

.word-hunt-letter {
  width: 3.35rem;
  height: 3.35rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: #0f172a;
  color: white;
  font-size: 1.35rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.word-hunt-letter:hover {
  transform: translateY(-2px);
}

.word-hunt-letter.is-used {
  opacity: 0.72;
  transform: translateY(2px) scale(0.96);
  background: #dbeafe;
  color: #1e3a8a;
  box-shadow:
    inset 0 0 0 2px rgba(37, 99, 235, 0.35),
    0 8px 18px rgba(37, 99, 235, 0.16);
}

@media (max-width: 560px) {
  .word-hunt-letters {
    grid-template-columns: repeat(4, 2.8rem);
    gap: 0.5rem;
  }

  .word-hunt-letter {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.15rem;
    border-radius: 15px;
  }
}



.word-hunt-letter {
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.word-hunt-letter.is-used {
  opacity: 0.55;
  transform: translateY(2px) scale(0.96);
  background: #2563eb;
  color: white;
  box-shadow:
    inset 0 0 0 2px rgba(30, 64, 175, 0.35),
    0 8px 18px rgba(37, 99, 235, 0.22);
}







.community-page {
  display: grid;
  gap: 1.25rem;
}

.community-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1rem;
  align-items: stretch;
  padding: 1.5rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.community-hero h1 {
  margin: 0.35rem 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.community-hero p {
  max-width: 680px;
  color: #475569;
  line-height: 1.6;
}

.community-hero-card {
  border-radius: 24px;
  background: #0f172a;
  color: white;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.community-hero-icon {
  font-size: 2.3rem;
}

.community-hero-card strong {
  font-size: 2.4rem;
}

.community-hero-card span {
  color: #cbd5e1;
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
}

.community-main,
.community-side {
  display: grid;
  gap: 1.25rem;
}

.community-panel {
  border-radius: 24px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1.2rem;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.community-leaderboard,
.community-feed {
  display: grid;
  gap: 0.75rem;
}

.community-leaderboard-row {
  display: grid;
  grid-template-columns: 2.3rem auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.community-leaderboard-row.active {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.28);
}

.community-rank {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 900;
}

.community-player {
  display: grid;
  gap: 0.1rem;
}

.community-player span,
.community-score span,
.community-feed-content small {
  color: #64748b;
  font-size: 0.85rem;
}

.community-score {
  text-align: right;
}

.community-score strong {
  display: block;
  font-size: 1.25rem;
}

.community-feed-item {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.community-feed-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #dbeafe;
}

.community-feed-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}

.community-feed-title span {
  color: #334155;
}

.community-feed-content p {
  margin: 0.25rem 0;
  color: #475569;
}

.community-share-card {
  display: grid;
  gap: 0.85rem;
}

.community-share-card pre {
  margin: 0;
  white-space: pre-wrap;
  padding: 1rem;
  border-radius: 18px;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.community-share-card small {
  color: #64748b;
}

.community-next-list {
  display: grid;
  gap: 0.65rem;
}

.community-next-list div {
  padding: 0.75rem;
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
}

@media (max-width: 900px) {
  .community-hero,
  .community-layout {
    grid-template-columns: 1fr;
  }
}







.community-word-hunt-challenge {
  gap: 1rem;
}

.community-challenge-letters {
  display: grid;
  grid-template-columns: repeat(4, 2.7rem);
  gap: 0.45rem;
  justify-content: center;
}

.community-challenge-letters span {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #0f172a;
  color: white;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.community-challenge-summary {
  display: grid;
  gap: 0.25rem;
  text-align: center;
}

.community-challenge-summary span {
  color: #64748b;
  font-size: 0.9rem;
}

.community-challenge-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.community-challenge-actions button {
  flex: 1 1 140px;
}






.sidebar-language-switcher {
  position: relative;
  margin-top: 0.75rem;
}

.sidebar-language-button {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.42);
  color: inherit;
  border-radius: 999px;
  padding: 0.45rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  font: inherit;
  margin-bottom: 20px;
}

.sidebar-language-button:hover {
  background: rgba(30, 41, 59, 0.72);
}

.sidebar-language-current {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sidebar-language-current span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-language-arrow {
  opacity: 0.75;
  font-size: 0.8rem;
  transition: transform 0.18s ease;
}

.sidebar-language-switcher.open .sidebar-language-arrow {
  transform: rotate(180deg);
}

.sidebar-language-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1rem;
  background: #0f172a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 0.35rem;
}

.sidebar-language-menu.hidden {
  display: none;
}

.sidebar-language-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 0.75rem;
  padding: 0.55rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.sidebar-language-option > span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-language-option:hover {
  background: rgba(59, 130, 246, 0.16);
}

.sidebar-language-option.active {
  background: rgba(59, 130, 246, 0.22);
}

.sidebar-language-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-language-option small {
  font-size: 0.72rem;
  opacity: 0.75;
}

.language-flag-img {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}






.new-home-modern {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.new-home-hero-modern {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #111827 46%, #1e293b 100%);
  color: #f8fafc;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.new-home-hero-copy {
  max-width: 760px;
}

.brand-pill-modern {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.38);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  color: #ffffff;
}

.new-home-hero-modern h1 {
  margin: 22px 0 14px;
  max-width: 760px;
  font-size: clamp(2.25rem, 5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.new-home-hero-modern p {
  max-width: 680px;
  margin: 0;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.7;
}

.new-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.new-home-hero-panel {
  display: flex;
  align-items: stretch;
}


.hero-language-overview-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.hero-language-overview-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.hero-language-overview-header span {
  display: block;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.hero-language-overview-header strong {
  display: block;
  margin-top: 3px;
  color: #ffffff;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.hero-language-overview-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  color: #e2e8f0 !important;
  font-size: 0.72rem !important;
  font-weight: 800;
  white-space: nowrap;
}

.hero-language-overview-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-language-overview-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.13);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.24);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}


.hero-language-row-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.hero-language-progress-value {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 900;
}

.hero-language-overview-row:hover {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.34);
  border-color: color-mix(in srgb, var(--language-accent, #2563eb) 55%, rgba(226, 232, 240, 0.25));
}

.hero-language-overview-row.active {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--language-accent, #2563eb) 28%, rgba(15, 23, 42, 0.62)),
      rgba(15, 23, 42, 0.36)
    );
  border-color: color-mix(in srgb, var(--language-accent, #2563eb) 70%, rgba(226, 232, 240, 0.25));
}

.hero-language-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-language-row-main img {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
}

.hero-language-row-main strong {
  display: block;
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.15;
}

.hero-language-row-main span {
  display: block;
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-language-row-progress {
  display: none;
}

.hero-language-mini-bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.25);
  overflow: hidden;
}

.hero-language-mini-bar div {
  height: 100%;
  border-radius: inherit;
  background: var(--language-accent, #2563eb);
}

.hero-language-overview-footer {
  padding-top: 2px;
}

.hero-language-overview-footer span {
  color: #94a3b8;
  font-size: 0.78rem;
}







.section-heading-modern {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 16px;
}

.section-heading-modern h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.section-heading-modern p {
  max-width: 620px;
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.language-hub-section,
.new-home-section {
  padding: 0;
}

.language-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.language-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.language-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--language-accent, #2563eb);
}

.language-card.active {
  border-color: color-mix(in srgb, var(--language-accent, #2563eb) 55%, #cbd5e1);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
}

.language-card-top,
.language-card-meta,
.language-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.language-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-title-row img {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
}

.language-title-row h3 {
  margin: 0;
  font-size: 1.05rem;
}

.language-title-row span,
.language-card-meta,
.language-progress span {
  color: #64748b;
  font-size: 0.86rem;
}

.language-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #334155;
}

.language-status.active {
  background: color-mix(in srgb, var(--language-accent, #2563eb) 14%, #ffffff);
  color: color-mix(in srgb, var(--language-accent, #2563eb) 82%, #0f172a);
}

.language-progress-bar,
.course-preview-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.language-progress-bar div,
.course-preview-progress-bar div {
  height: 100%;
  border-radius: inherit;
  background: var(--language-accent, #2563eb);
}

.language-card-actions {
  margin-top: auto;
}

.language-card-actions button {
  width: 100%;
}

.new-home-grid-modern {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 16px;
}

.first-pack-card-modern,
.new-home-card-modern,
.course-preview-card-modern,
.how-it-works-modern article,
.dashboard-preview-modern {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.first-pack-card-modern {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.72)),
    var(--first-pack-image);
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.first-pack-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
}

.first-pack-content > span {
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.first-pack-content h2 {
  margin: 10px 0 8px;
  font-size: 2rem;
  letter-spacing: -0.045em;
}

.first-pack-content p {
  margin: 0 0 18px;
  color: #dbeafe;
}

.first-pack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.new-home-card-modern {
  padding: 22px;
}

.new-home-profile-line {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.new-home-profile-line span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
}

.new-home-card-modern p {
  color: #475569;
  line-height: 1.6;
}

.how-it-works-modern {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.how-it-works-modern article {
  padding: 20px;
}

.how-it-works-modern .step-icon {
  width: fit-content;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 900;
}

.how-it-works-modern h3 {
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.how-it-works-modern p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.course-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.course-preview-card-modern {
  padding: 20px;
}

.course-preview-card-modern > div:first-child,
.course-preview-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.course-preview-card-modern span,
.course-preview-progress span {
  color: #64748b;
  font-size: 0.86rem;
}

.course-preview-card-modern strong {
  color: #0f172a;
}

.course-preview-card-modern p {
  color: #475569;
  line-height: 1.55;
}

.dashboard-preview-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.dashboard-preview-modern h2 {
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.dashboard-preview-modern p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .new-home-hero-modern,
  .new-home-grid-modern,
  .language-card-grid,
  .how-it-works-modern,
  .course-preview-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-modern,
  .dashboard-preview-modern {
    align-items: start;
    flex-direction: column;
  }
}








.pack-tile {
  position: relative;
}

.pack-training-switch {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.pack-training-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pack-training-switch-ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  position: relative;
  transition: background 0.18s ease, transform 0.18s ease;
}

.pack-training-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s ease;
}

.pack-training-switch input:checked + .pack-training-switch-ui {
  background: #2563eb;
}

.pack-training-switch input:checked + .pack-training-switch-ui::after {
  transform: translateX(18px);
}

.pack-training-switch:hover .pack-training-switch-ui {
  transform: scale(1.04);
}

.skipped-pack-tile {
  opacity: 0.88;
}

.skipped-pack-tile .tile-progress-fill {
  background: #2563eb;
}












.auth-box {
  margin: 1rem;
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-status {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  line-height: 1.35;
}

.auth-status strong {
  font-size: 0.92rem;
}

.auth-status span {
  opacity: 0.75;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.auth-btn {
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  background: #ffffff;
  color: #1f2937;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.auth-btn:hover {
  transform: translateY(-1px);
}

.auth-btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}








.floating-auth {
  position: fixed;
  top: 0;
  right: 1.5rem;
  z-index: 9999;
  font-family: inherit;
}

.floating-auth-tab {
  min-width: 160px;
  border: none;
  border-radius: 0 0 18px 18px;
  padding: 0.65rem 0.9rem;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.floating-auth-tab:hover {
  transform: translateY(2px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.3);
  background: rgba(15, 23, 42, 0.98);
}

.floating-auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
  overflow: hidden;
  flex: 0 0 auto;
}

.floating-auth-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-auth-label {
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
  font-size: 0.9rem;
}

.floating-auth-chevron {
  opacity: 0.7;
  font-size: 0.8rem;
  transition: transform 0.18s ease;
}

.floating-auth.open .floating-auth-chevron {
  transform: rotate(180deg);
}

.floating-auth-panel {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  width: min(320px, calc(100vw - 2rem));
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
  z-index: 3;
}

.floating-auth-panel::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 38px;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.97);
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  transform: rotate(45deg);
}

.floating-auth-status {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem 0.25rem 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 0.85rem;
}

.floating-auth-status strong {
  font-size: 0.95rem;
}

.floating-auth-status span {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}

.floating-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.auth-provider-btn {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 15px;
  background: #ffffff;
  color: #0f172a;
  padding: 0.72rem 0.85rem;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.auth-provider-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.35);
  background: #f8fafc;
}

.auth-provider-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.auth-provider-btn > span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
}

.auth-provider-btn small {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
}

.auth-provider-btn.google > span {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #ea4335;
}

.auth-provider-btn.profile > span {
  background: #ecfeff;
  color: #0891b2;
}

.auth-provider-btn.danger {
  color: #b91c1c;
}

.auth-provider-btn.danger > span {
  background: #fef2f2;
  color: #dc2626;
}

@media (max-width: 720px) {
  .floating-auth {
    right: 0.75rem;
  }

  .floating-auth-tab {
    min-width: auto;
    padding-inline: 0.75rem;
  }

  .floating-auth-label {
    max-width: 110px;
  }
}





/* ------------------------------------------------------------
   Floating auth fixes
------------------------------------------------------------ */
/* ------------------------------------------------------------
   Floating auth - hard overlay fix
------------------------------------------------------------ */

.floating-auth {
  position: fixed !important;
  top: 0 !important;
  right: 1.5rem !important;
  z-index: 2147483000 !important;
  isolation: isolate;
}

.floating-auth.open {
  z-index: 2147483000 !important;
}

.floating-auth-panel {
  position: absolute !important;
  z-index: 2147483001 !important;
}

.floating-auth [hidden],
.floating-auth-panel[hidden],
.auth-provider-btn[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .floating-auth {
    right: 0.75rem !important;
  }
}







/* ------------------------------------------------------------
   Email auth form
------------------------------------------------------------ */

.email-auth-form {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.email-auth-form[hidden] {
  display: none !important;
}

.email-auth-form label {
  display: grid;
  gap: 0.35rem;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
}

.email-auth-form input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 650;
}

.email-auth-form input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.email-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.email-auth-actions button {
  width: 100%;
  padding-inline: 0.75rem;
}

.email-reset-button {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0.25rem 0;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.email-reset-button:hover {
  text-decoration: underline;
}

.email-auth-message {
  min-height: 1.1em;
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.email-auth-message.error {
  color: #b91c1c;
}

.email-auth-message.success {
  color: #166534;
}

@media (max-width: 520px) {
  .email-auth-actions {
    grid-template-columns: 1fr;
  }
}







.profile-cloud-subtitle {
  display: block;
  margin-top: 0.65rem;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.cloud-account-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.cloud-account-card > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cloud-account-card strong {
  font-size: 1.05rem;
  color: #0f172a;
}

.cloud-account-card span {
  color: #475569;
  font-weight: 700;
}

.cloud-account-card small {
  color: #64748b;
  font-weight: 800;
}

.settings-info-box.success {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.18);
}




.settings-info-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 850;
}





/* ------------------------------------------------------------
   Community v2
------------------------------------------------------------ */

.community-page-v2 {
  gap: 1.35rem;
}

.community-hero-v2 {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.community-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.community-hero-card-v2 {
  gap: 0.45rem;
}

.community-hero-mini {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.community-hero-mini div {
  border-radius: 16px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.1);
}

.community-hero-mini b {
  display: block;
  font-size: 1.05rem;
}

.community-hero-mini small {
  color: #cbd5e1;
  font-weight: 700;
}

.community-composer {
  display: grid;
  gap: 0.85rem;
}

.community-composer-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.community-composer-user div {
  display: grid;
  gap: 0.1rem;
}

.community-composer-user span {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
}

.community-composer textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  font: inherit;
  color: #0f172a;
  background: #f8fafc;
}

.community-composer textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: white;
}

.community-composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.community-composer-footer small {
  color: #64748b;
  font-weight: 700;
}

.community-feed-item-v2 {
  grid-template-columns: 2.6rem minmax(0, 1fr);
}

.community-feed-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.community-feed-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.community-like-button,
.community-mini-action {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: white;
  color: #334155;
  border-radius: 999px;
  padding: 0.38rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.community-like-button:hover,
.community-mini-action:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.3);
  background: #f8fafc;
}

.community-like-button.liked {
  background: #fff1f2;
  border-color: rgba(225, 29, 72, 0.22);
  color: #be123c;
}

.community-mini-action.danger {
  color: #b91c1c;
}

.community-challenge-card-v2 pre {
  display: none;
}

.community-full-button {
  width: 100%;
}

.community-friends-panel {
  display: grid;
  gap: 0.85rem;
}

.community-friend-list,
.community-suggestions {
  display: grid;
  gap: 0.65rem;
}

.community-friend-row,
.community-suggestion-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.community-friend-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 950;
}

.community-friend-row div:nth-child(2),
.community-suggestion-row div:nth-child(2) {
  display: grid;
  gap: 0.1rem;
}

.community-friend-row span,
.community-suggestion-row span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.community-next-list-v2 div {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
}

@media (max-width: 900px) {
  .community-hero-v2,
  .community-layout-v2 {
    grid-template-columns: 1fr;
  }

  .community-hero-card-v2 {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .community-friend-row,
  .community-suggestion-row {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }

  .community-friend-row .community-mini-action,
  .community-suggestion-row .community-mini-action {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .community-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .community-composer-footer button {
    width: 100%;
  }
}












/* ------------------------------------------------------------
   Community friend search
------------------------------------------------------------ */

.community-friend-search {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.community-friend-search label {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 900;
}

.community-friend-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.community-friend-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  padding: 0.72rem 0.85rem;
  background: white;
  color: #0f172a;
  font: inherit;
  font-weight: 650;
}

.community-friend-search input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.community-friend-search-results {
  display: grid;
  gap: 0.55rem;
}

.community-search-result-list {
  display: grid;
  gap: 0.55rem;
}

.community-search-person-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem;
  border-radius: 18px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.community-search-person-row > div:nth-child(2) {
  display: grid;
  gap: 0.1rem;
}

.community-search-person-row span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.community-search-empty {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem;
  border-radius: 16px;
  background: white;
  border: 1px dashed rgba(148, 163, 184, 0.4);
}

.community-search-empty strong {
  color: #0f172a;
}

.community-search-empty span {
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
}

.community-small-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.4rem 0 0.65rem;
}

.community-small-heading strong {
  color: #0f172a;
}

.community-small-heading span {
  min-width: 1.8rem;
  min-height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.82rem;
  font-weight: 950;
}

.community-friends-current {
  display: grid;
  gap: 0.2rem;
}

@media (max-width: 560px) {
  .community-friend-search-row,
  .community-search-person-row {
    grid-template-columns: 1fr;
  }

  .community-search-person-row .community-friend-avatar {
    display: none;
  }
}




.community-leaderboard {
  display: grid;
  gap: 14px;
}

.community-leaderboard-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.community-leaderboard-summary > div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.community-leaderboard-summary span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.72;
  margin-bottom: 4px;
}

.community-leaderboard-summary strong {
  display: block;
  font-size: 1.15rem;
}

.community-leaderboard-list {
  display: grid;
  gap: 8px;
}

.community-leaderboard-row {
  position: relative;
}

.community-leaderboard-row.active {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}

.community-leaderboard-row.active::after {
  content: "Ty";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
}

.community-leaderboard-note {
  display: block;
  line-height: 1.45;
  opacity: 0.72;
}



.community-leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
}

.community-leaderboard-tab {
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  color: rgba(15, 23, 42, 0.68);
  background: transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.community-leaderboard-tab:hover {
  color: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
}

.community-leaderboard-tab.active {
  color: #1d4ed8;
  background: white;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.community-leaderboard-score {
  display: grid;
  gap: 2px;
  justify-items: end;
  margin-left: auto;
}

.community-leaderboard-score strong {
  font-size: 0.95rem;
  white-space: nowrap;
}

.community-leaderboard-score span {
  font-size: 0.72rem;
  opacity: 0.62;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .community-leaderboard-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 18px;
  }

  .community-leaderboard-tab {
    border-radius: 14px;
  }

  .community-leaderboard-score {
    justify-items: start;
    margin-left: 0;
  }
}



/* ============================================================
   MOBILE RESPONSIVE OVERRIDE
   Vlož úplně na konec style.css
============================================================ */

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

/* Lepší chování buttonů a inputů na mobilech */
button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

/* ------------------------------------------------------------
   Tablet / menší notebooky
------------------------------------------------------------ */

@media (max-width: 1100px) {
  .main-content {
    padding: 28px;
  }

  .dashboard,
  .home-dashboard-clean,
  .motivation-page,
  .games-page,
  .game-setup-page,
  .quick-hunt-page,
  .memory-game-page,
  .word-sprint-page,
  .word-hunt-page,
  .community-page,
  .profile-settings-page {
    max-width: none;
  }

  .stats-grid,
  .home-stats-grid,
  .motivation-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-grid,
  .pack-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* ------------------------------------------------------------
   Mobilní layout aplikace
------------------------------------------------------------ */

@media (max-width: 820px) {
  .app-layout {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2000;

    width: 100%;
    height: auto;
    max-height: 58dvh;

    padding: 14px 14px 12px;
    border-radius: 0 0 24px 24px;

    overflow-y: auto;
    overscroll-behavior: contain;

    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  }

  .sidebar-header h1 {
    font-size: 1.08rem;
    line-height: 1.15;
  }

  .sidebar-header p {
    margin: 4px 0 10px;
    font-size: 0.82rem;
  }

  .sidebar-language-switcher {
    margin-top: 0.5rem;
  }

  .sidebar-language-button {
    margin-bottom: 10px;
    padding: 0.55rem 0.7rem;
    border-radius: 16px;
  }

  .sidebar-language-menu {
    position: static;
    margin-top: 0.4rem;
    box-shadow: none;
  }

  .course-menu {
    gap: 8px;
    max-height: 36dvh;
    overflow-y: auto;
    padding-right: 2px;
  }

  .menu-level {
    padding-top: 8px;
  }

  .menu-level-title,
  .menu-clickable,
  .menu-level-title.menu-level-toggle {
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 0.94rem;
  }

  .menu-pos {
    margin-left: 0;
  }

  .menu-pos-title {
    padding: 8px 10px;
    border-radius: 12px;
  }

  .menu-pack-list {
    margin-left: 0;
    gap: 4px;
  }

  .menu-pack-button {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 0.9rem;
  }

  .main-content {
    padding: 18px 14px 96px;
  }

  .dashboard h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .pack-info,
  .training-card,
  .sexy-card,
  .detail-panel,
  .community-panel {
    border-radius: 22px;
    padding: 18px;
  }
}

/* ------------------------------------------------------------
   Homepage / dashboard na mobilech
------------------------------------------------------------ */

@media (max-width: 820px) {
  .new-home-modern,
  .home-dashboard-clean,
  .home-dashboard {
    gap: 18px;
  }

  .new-home-hero-modern,
  .home-hero-clean,
  .home-hero,
  .motivation-hero,
  .games-hero,
  .game-setup-hero,
  .community-hero,
  .profile-settings-hero-inner {
    grid-template-columns: 1fr;
    padding: 20px;
    border-radius: 24px;
  }

  .new-home-hero-modern h1,
  .home-hero-copy h1,
  .home-hero-content h1,
  .motivation-hero h1,
  .games-hero h1,
  .game-setup-hero h1,
  .community-hero h1,
  .profile-settings-hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
  }

  .new-home-hero-modern p,
  .home-hero-copy p,
  .home-hero-content p,
  .motivation-hero p,
  .games-hero p,
  .game-setup-hero p,
  .community-hero p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .new-home-actions,
  .home-hero-actions,
  .first-pack-actions,
  .dashboard-preview-modern,
  .community-challenge-actions,
  .quick-hunt-feedback-actions,
  .quick-hunt-result-actions,
  .memory-result-actions,
  .word-sprint-result-actions,
  .word-hunt-result-actions,
  .profile-hero-actions,
  .profile-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .new-home-actions button,
  .home-hero-actions button,
  .first-pack-actions button,
  .dashboard-preview-modern button,
  .community-challenge-actions button,
  .quick-hunt-feedback-actions button,
  .quick-hunt-result-actions button,
  .memory-result-actions button,
  .word-sprint-result-actions button,
  .word-hunt-result-actions button,
  .profile-hero-actions button,
  .profile-settings-actions button,
  .profile-settings-actions select,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .language-card-grid,
  .new-home-grid-modern,
  .how-it-works-modern,
  .course-preview-grid,
  .home-layout-clean,
  .home-two-columns,
  .motivation-layout,
  .community-layout,
  .games-grid,
  .game-source-grid {
    grid-template-columns: 1fr;
  }

  .home-side-column,
  .motivation-side {
    padding: 1rem;
    border-radius: 24px;
  }

  .home-metrics-row,
  .motivation-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-metrics-row article,
  .motivation-overview article {
    padding: 0.85rem 0;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .section-heading-modern,
  .detail-panel-header,
  .progress-subheader,
  .community-feed-title,
  .challenge-title-line,
  .daily-challenge-intro,
  .daily-challenge-reward-line {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ------------------------------------------------------------
   Karty a gridy
------------------------------------------------------------ */

@media (max-width: 720px) {
  .section-grid,
  .pack-grid,
  .home-pos-grid,
  .language-card-grid,
  .achievement-grid,
  .motivation-achievement-grid,
  .active-badge-grid,
  .trophy-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pack-image {
    height: 135px;
  }

  .pack-tile-title,
  .section-title {
    font-size: 1.08rem;
  }

  .pack-tile-body,
  .section-tile {
    padding: 16px;
  }

  .pack-toolbar {
    justify-content: stretch;
    align-items: stretch;
    flex-direction: column;
  }

  .pack-sort-select {
    width: 100%;
    min-width: 0;
  }

  .pack-detail-hero {
    height: 165px;
    border-radius: 22px;
    margin-bottom: 18px;
  }

  .pack-detail-header {
    flex-direction: column;
    gap: 16px;
  }

  .pack-detail-score {
    width: 100%;
    min-width: 0;
  }

  .pack-detail-actions {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   Tréninková karta
------------------------------------------------------------ */

@media (max-width: 720px) {
  .training-card,
  .sexy-card {
    min-height: auto;
    padding: 18px;
    border-radius: 24px;
  }

  .training-header {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }

  .training-score {
    justify-content: flex-start;
  }

  .progress-wrap {
    margin-bottom: 22px;
  }

  .prompt-area {
    padding: 18px 0 22px;
  }

  .prompt-word {
    font-size: clamp(2.1rem, 13vw, 3.2rem);
    overflow-wrap: anywhere;
  }

  .training-body {
    display: block;
  }

  .feedback-slot {
    min-height: auto;
    max-height: none;
    overflow: visible;
    margin-top: 1rem;
  }

  .feedback-compact {
    align-items: flex-start;
  }

  .feedback-mini-grid,
  .feedback-comparison {
    grid-template-columns: 1fr;
  }

  .training-answer-area {
    margin-top: 1rem;
  }

  .answer-form,
  .answer-input-row,
  .word-sprint-form,
  .word-hunt-form {
    flex-direction: column;
    width: 100%;
  }

  .answer-input-row input,
  .answer-input-row button,
  .word-sprint-form input,
  .word-sprint-form button,
  .word-hunt-form input,
  .word-hunt-form button {
    width: 100%;
  }

  .answer-form input,
  .word-sprint-form input,
  .word-hunt-form input {
    min-height: 48px;
    font-size: 1rem;
  }

  .special-char-buttons {
    justify-content: center;
    gap: 0.35rem;
  }

  .answer-form .special-char-btn {
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .feedback,
  .feedback-inline {
    padding: 14px;
    border-radius: 16px;
  }

  .feedback-main-answer,
  .feedback-answer,
  .feedback-answer-compact {
    font-size: 1.15rem;
    overflow-wrap: anywhere;
  }
}

/* ------------------------------------------------------------
   Grafy, historie, tabulky
------------------------------------------------------------ */

@media (max-width: 720px) {
  .session-history-tiles {
    gap: 0.75rem;
    scroll-snap-type: x mandatory;
  }

  .session-tile {
    min-width: 82vw;
    max-width: 82vw;
    flex-basis: 82vw;
  }

  .training-chart {
    grid-template-columns: 34px 1fr;
    gap: 0.45rem;
    min-height: 230px;
  }

  .chart-main {
    height: 210px;
  }

  .chart-bars {
    gap: 0.55rem;
  }

  .chart-bar-item {
    min-width: 44px;
    flex-basis: 44px;
  }

  .chart-bar {
    width: 28px;
  }

  .chart-legend {
    padding-left: 0;
  }

  .weak-table-wrap {
    margin-inline: -6px;
    padding-inline: 6px;
    overflow-x: auto;
  }

  .weak-table {
    min-width: 560px;
  }

  .activity-calendar {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .activity-bar-chart {
    overflow-x: auto;
    grid-template-columns: repeat(30, 12px);
    justify-content: start;
    padding-bottom: 0.35rem;
  }

  .long-progress-layout {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   Hry
------------------------------------------------------------ */

@media (max-width: 720px) {
  .quick-hunt-card,
  .word-sprint-card,
  .word-hunt-card {
    min-height: auto;
    padding: 20px;
    border-radius: 24px;
  }

  .quick-hunt-card h1,
  .word-sprint-card h1 {
    font-size: clamp(2.1rem, 13vw, 3.4rem);
  }

  .quick-hunt-options {
    grid-template-columns: 1fr;
  }

  .quick-hunt-option {
    padding: 0.9rem;
    border-radius: 18px;
  }

  .memory-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .memory-card {
    min-height: 104px;
    border-radius: 20px;
  }

  .memory-card-back,
  .memory-card-front {
    border-radius: 20px;
  }

  .word-hunt-letters {
    grid-template-columns: repeat(4, 2.75rem);
    gap: 0.5rem;
  }

  .word-hunt-letter,
  .word-hunt-letters span {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 15px;
    font-size: 1.1rem;
  }

  .word-hunt-result-grid,
  .word-sprint-result-grid,
  .memory-result-grid,
  .quick-hunt-result-grid {
    grid-template-columns: 1fr;
  }

  .word-hunt-topbar,
  .word-sprint-topbar,
  .memory-game-topbar,
  .quick-hunt-topbar,
  .word-hunt-stats,
  .word-sprint-stats,
  .memory-game-stats,
  .quick-hunt-stats {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ------------------------------------------------------------
   Komunita
------------------------------------------------------------ */

@media (max-width: 720px) {
  .community-hero {
    padding: 20px;
    border-radius: 24px;
  }

  .community-hero-card {
    min-height: 130px;
  }

  .community-leaderboard-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
  }

  .community-leaderboard-row .profile-avatar,
  .community-leaderboard-score {
    grid-column: 2;
  }

  .community-score,
  .community-leaderboard-score {
    text-align: left;
    justify-items: start;
    margin-left: 0;
  }

  .community-feed-item {
    grid-template-columns: 1fr;
  }

  .community-feed-icon {
    width: 2.3rem;
    height: 2.3rem;
  }

  .community-challenge-letters {
    grid-template-columns: repeat(4, 2.35rem);
  }

  .community-challenge-letters span {
    width: 2.35rem;
    height: 2.35rem;
  }

  .community-leaderboard-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 18px;
  }
}

/* ------------------------------------------------------------
   Profil a nastavení
------------------------------------------------------------ */

@media (max-width: 720px) {
  .profile-settings-page {
    gap: 1rem;
  }

  .profile-settings-hero {
    border-radius: 24px;
    min-height: auto;
  }

  .profile-settings-hero-inner {
    min-height: auto;
    padding: 18px;
    align-items: flex-start;
  }

  .profile-settings-hero-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-avatar-large {
    width: 82px;
    height: 82px;
  }

  .profile-hero-stats,
  .settings-mini-stats,
  .backup-summary {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .profile-settings-tabs {
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .profile-settings-tab {
    flex: 0 0 auto;
  }

  .settings-toggle {
    grid-template-columns: 1fr;
  }

  .settings-toggle-ui {
    justify-self: start;
  }

  .avatar-settings-preview {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ------------------------------------------------------------
   Přihlášení na mobilu
   Floating auth se změní na spodní account button + bottom sheet.
------------------------------------------------------------ */

@media (max-width: 720px) {
  .floating-auth {
    top: auto !important;
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    left: auto !important;
    z-index: 2147483000 !important;
  }

  .floating-auth-tab {
    min-width: 0;
    max-width: calc(100vw - 24px);
    border-radius: 999px;
    padding: 0.62rem 0.82rem;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.32);
  }

  .floating-auth-label {
    max-width: 128px;
    font-size: 0.86rem;
  }

  .floating-auth-avatar {
    width: 30px;
    height: 30px;
  }

  .floating-auth-panel {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(66px + env(safe-area-inset-bottom)) !important;
    top: auto !important;

    width: auto !important;
    max-height: min(78dvh, 620px);
    overflow-y: auto;

    padding: 1rem;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
  }

  .floating-auth-panel::before {
    display: none;
  }

  .floating-auth-status {
    padding-bottom: 0.75rem;
  }

  .floating-auth-actions {
    gap: 0.6rem;
  }

  .auth-provider-btn {
    min-height: 48px;
    border-radius: 16px;
    grid-template-columns: 32px 1fr auto;
  }

  .email-auth-form {
    padding: 0.85rem;
    border-radius: 18px;
  }

  .email-auth-actions {
    grid-template-columns: 1fr;
  }

  .email-auth-form input {
    min-height: 46px;
    font-size: 1rem;
  }
}

/* ------------------------------------------------------------
   Velmi malé mobily
------------------------------------------------------------ */

@media (max-width: 480px) {
  .main-content {
    padding: 14px 10px 96px;
  }

  .sidebar {
    padding: 12px 10px;
    max-height: 60dvh;
    border-radius: 0 0 20px 20px;
  }

  .course-menu {
    max-height: 38dvh;
  }

  .new-home-hero-modern,
  .home-hero-clean,
  .home-hero,
  .motivation-hero,
  .games-hero,
  .game-setup-hero,
  .community-hero,
  .pack-info,
  .training-card,
  .sexy-card,
  .detail-panel,
  .community-panel,
  .new-home-card-modern,
  .first-pack-card-modern,
  .course-preview-card-modern,
  .dashboard-preview-modern,
  .language-card {
    border-radius: 20px;
  }

  .new-home-hero-modern,
  .home-hero-clean,
  .home-hero,
  .motivation-hero,
  .games-hero,
  .game-setup-hero,
  .community-hero {
    padding: 16px;
  }

  .home-metrics-row,
  .home-stats-grid,
  .stats-grid,
  .motivation-overview,
  .weekly-summary-grid {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-box strong,
  .stat-card strong,
  .home-stat-card strong,
  .motivation-overview strong {
    font-size: 1.55rem;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .auth-provider-btn,
  .answer-form button,
  .next-btn {
    min-height: 46px;
  }

  .floating-auth-label {
    max-width: 96px;
  }

  .floating-auth-panel {
    left: 8px !important;
    right: 8px !important;
    border-radius: 22px;
  }
}

/* ------------------------------------------------------------
   Landscape mobil - aby menu nezabralo celou obrazovku
------------------------------------------------------------ */

@media (max-width: 900px) and (orientation: landscape) {
  .sidebar {
    height: 100dvh !important;
    max-height: 100dvh !important;
  }

  .course-menu {
    max-height: none !important;
  }

  .floating-auth-panel {
    max-height: 72dvh !important;
  }
}





/* ============================================================
   MOBILE MENU + FIXED TRAINING VIEWPORT
   Vlož úplně na konec style.css
============================================================ */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* ------------------------------------------------------------
   Hamburger
------------------------------------------------------------ */

.mobile-menu-toggle {
  display: none;
}

.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 820px) {
  .mobile-menu-toggle {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    left: 12px;
    z-index: 2147482500;

    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;

    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(14px);
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition:
      transform 0.18s ease,
      opacity 0.18s ease;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147482200;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
    transition: opacity 0.2s ease;
  }

  body.mobile-menu-open .mobile-menu-backdrop {
    pointer-events: auto;
    opacity: 1;
  }
}

/* ------------------------------------------------------------
   Desktop zůstává jako doteď
------------------------------------------------------------ */

@media (min-width: 821px) {
  .app-layout {
    display: flex;
    min-height: 100vh;
  }

  .sidebar {
    width: 290px;
  }
}

/* ------------------------------------------------------------
   Mobilní drawer místo sidebaru
------------------------------------------------------------ */

@media (max-width: 820px) {
  .app-layout {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;

    width: min(86vw, 340px) !important;
    height: 100dvh !important;
    max-height: none !important;

    z-index: 2147482300;
    padding: calc(72px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));

    overflow-y: auto;
    overscroll-behavior: contain;

    border-radius: 0 28px 28px 0;
    box-shadow: 24px 0 80px rgba(15, 23, 42, 0.35);

    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-header h1 {
    font-size: 1.08rem;
  }

  .sidebar-header p {
    margin-bottom: 14px;
    font-size: 0.84rem;
  }

  .sidebar-language-button {
    margin-bottom: 12px;
    border-radius: 16px;
    padding: 0.6rem 0.7rem;
  }

  .sidebar-language-menu {
    position: static;
    margin-top: 0.45rem;
    box-shadow: none;
  }

  .course-menu {
    gap: 8px;
  }

  .menu-level {
    padding-top: 8px;
  }

  .menu-level-title,
  .menu-clickable,
  .menu-level-title.menu-level-toggle,
  .menu-pack-button {
    min-height: 42px;
    border-radius: 12px;
    padding: 9px 10px;
  }

  .menu-pos {
    margin-left: 0;
  }

  .menu-pack-list {
    margin-left: 0;
  }

  .main-content {
    padding: calc(70px + env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom));
  }
}

/* ------------------------------------------------------------
   Mobilní přihlášení - aby nekolidovalo s hamburgerem
------------------------------------------------------------ */

@media (max-width: 820px) {
  .floating-auth {
    top: calc(12px + env(safe-area-inset-top)) !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 2147482400 !important;
  }

  .floating-auth-tab {
    min-width: 46px;
    height: 46px;
    border-radius: 999px;
    padding: 0 0.72rem;
  }

  .floating-auth-label {
    display: none;
  }

  .floating-auth-chevron {
    display: none;
  }

  .floating-auth-avatar {
    width: 30px;
    height: 30px;
  }

  .floating-auth-panel {
    position: fixed !important;
    top: calc(66px + env(safe-area-inset-top)) !important;
    right: 10px !important;
    left: 10px !important;
    bottom: auto !important;

    width: auto !important;
    max-height: calc(100dvh - 86px - env(safe-area-inset-top));
    overflow-y: auto;

    border-radius: 24px;
  }

  .floating-auth-panel::before {
    display: none;
  }
}

/* ------------------------------------------------------------
   Trénink: stabilní karta přesně ve viewportu mobilu
------------------------------------------------------------ */

@media (max-width: 820px) {
  body.is-training-mobile {
    overflow: hidden;
  }

  .training-card,
  .sexy-card {
    margin: 0 !important;
  }

  /*
    Funguje i bez přidávání body.is-training-mobile.
    Jakmile je na stránce tréninková karta, držíme ji v dostupné výšce.
  */
  .training-card {
    height: calc(100dvh - 86px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 86px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;

    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 0.65rem;

    overflow: hidden !important;

    padding: 14px !important;
    border-radius: 22px !important;
  }

  .training-header {
    margin-bottom: 0 !important;
    gap: 0.55rem;
    flex-direction: row;
    align-items: flex-start;
  }

  .training-kicker {
    font-size: 0.64rem;
    margin-bottom: 0.15rem;
  }

  .training-header h3 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .training-score {
    gap: 0.35rem;
    justify-content: flex-end;
  }

  .training-score span {
    padding: 0.32rem 0.5rem;
    font-size: 0.72rem;
  }

  .progress-wrap {
    margin-bottom: 0 !important;
  }

  .progress-meta {
    margin-bottom: 0.35rem;
    font-size: 0.76rem;
  }

  .progress-bar {
    height: 9px;
  }

  .training-body {
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.55rem;
    overflow: hidden !important;
  }

  .prompt-area {
    min-height: 0;
    padding: 0.35rem 0.2rem !important;

    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }

  .prompt-label {
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
  }

  .prompt-word {
    font-size: clamp(2rem, 13vw, 3.15rem) !important;
    line-height: 0.98 !important;
    margin-bottom: 0 !important;
    overflow-wrap: anywhere;
  }

  .feedback-slot {
    min-height: 82px !important;
    max-height: 82px !important;
    overflow: hidden !important;
    padding: 0.65rem 0.75rem !important;
    border-radius: 16px !important;
  }

  .feedback-compact {
    height: 100%;
    align-items: center;
  }

  .feedback-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 1rem;
  }

  .feedback-title {
    font-size: 0.82rem;
    margin-bottom: 0.15rem;
  }

  .feedback-answer-compact,
  .feedback-main-answer,
  .feedback-answer {
    font-size: 1rem !important;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .feedback-mini-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .feedback-mini-grid div {
    padding: 0.42rem 0.5rem;
    border-radius: 10px;
  }

  .feedback-mini-grid span {
    font-size: 0.62rem;
  }

  .feedback-mini-grid strong {
    font-size: 0.82rem;
  }

  .training-answer-area {
    margin-top: 0 !important;
    min-height: 0;
  }

  .answer-form {
    gap: 0.45rem !important;
  }

  .answer-input-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem !important;
  }

  .answer-input-row input {
    min-width: 0;
    height: 44px;
    padding: 0.65rem 0.75rem !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
  }

  .answer-input-row #checkBtn,
  .answer-form button,
  .next-btn {
    min-height: 44px;
    padding: 0.65rem 0.8rem !important;
    border-radius: 14px !important;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .special-char-buttons {
    justify-content: center;
    gap: 0.28rem !important;
    margin-top: 0 !important;
  }

  .answer-form .special-char-btn {
    min-width: 30px !important;
    height: 29px !important;
    padding: 0 0.42rem !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
  }

  .result-card h3 {
    font-size: 1.45rem;
  }

  .result-icon {
    font-size: 2.2rem;
  }

  .result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.8rem 0;
  }

  .result-box {
    padding: 0.7rem 0.45rem;
    border-radius: 14px;
  }

  .result-box span {
    font-size: 0.7rem;
  }

  .result-box strong {
    font-size: 1.25rem;
  }
}

/* ------------------------------------------------------------
   Extrémně malé mobily
------------------------------------------------------------ */

@media (max-width: 420px) {
  .main-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .training-card {
    height: calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    padding: 12px !important;
  }

  .training-header h3 {
    font-size: 0.92rem;
  }

  .training-score span {
    font-size: 0.68rem;
  }

  .prompt-word {
    font-size: clamp(1.85rem, 12vw, 2.75rem) !important;
  }

  .answer-input-row {
    grid-template-columns: 1fr;
  }

  .answer-input-row #checkBtn {
    width: 100%;
  }

  .special-char-buttons {
    gap: 0.22rem !important;
  }

  .answer-form .special-char-btn {
    min-width: 28px !important;
    height: 28px !important;
    font-size: 0.78rem !important;
  }

  .feedback-slot {
    min-height: 78px !important;
    max-height: 78px !important;
  }
}

/* ------------------------------------------------------------
   Když se na mobilu otevře menu, obsah pod tím zůstane stabilní
------------------------------------------------------------ */

@media (max-width: 820px) {
  body.mobile-menu-open .main-content,
  body.mobile-menu-open .floating-auth {
    pointer-events: none;
  }

  body.mobile-menu-open .sidebar,
  body.mobile-menu-open .mobile-menu-toggle,
  body.mobile-menu-open .mobile-menu-backdrop {
    pointer-events: auto;
  }
}







  


/* ============================================================
   REAL MOBILE / TABLET DRAWER MENU FIX
   Vlož úplně na konec style.css
============================================================ */

.mobile-menu-toggle,
.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 1100px) {
  body.mobile-menu-open {
    overflow: hidden !important;
  }

  .app-layout {
    display: block !important;
    min-height: 100dvh !important;
  }

  .main-content {
    width: 100% !important;
    padding: calc(70px + env(safe-area-inset-top)) 14px calc(90px + env(safe-area-inset-bottom)) !important;
  }

  .mobile-menu-toggle {
    position: fixed !important;
    top: calc(12px + env(safe-area-inset-top)) !important;
    left: 12px !important;
    z-index: 2147483600 !important;

    width: 46px !important;
    height: 46px !important;

    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;

    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.96) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.32) !important;
    cursor: pointer !important;
  }

  .mobile-menu-toggle span {
    width: 20px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: currentColor !important;
    transition: transform 0.18s ease, opacity 0.18s ease !important;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0 !important;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
  }

  .mobile-menu-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483300 !important;

    display: block !important;
    opacity: 0 !important;
    pointer-events: none !important;

    background: rgba(15, 23, 42, 0.52) !important;
    backdrop-filter: blur(3px) !important;
    transition: opacity 0.2s ease !important;
  }

  body.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;

    width: min(88vw, 360px) !important;
    height: 100dvh !important;
    max-height: none !important;

    z-index: 2147483400 !important;

    padding: calc(76px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom)) !important;

    overflow-y: auto !important;
    overscroll-behavior: contain !important;

    border-radius: 0 28px 28px 0 !important;
    box-shadow: 24px 0 80px rgba(15, 23, 42, 0.42) !important;

    transform: translateX(-110%) !important;
    transition: transform 0.22s ease !important;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0) !important;
  }

  .sidebar-header h1 {
    font-size: 1.08rem !important;
  }

  .sidebar-header p {
    margin: 4px 0 14px !important;
    font-size: 0.84rem !important;
  }

  .sidebar-language-button {
    margin-bottom: 12px !important;
    border-radius: 16px !important;
    padding: 0.6rem 0.7rem !important;
  }

  .sidebar-language-menu {
    position: static !important;
    margin-top: 0.45rem !important;
    box-shadow: none !important;
  }

  .course-menu {
    gap: 8px !important;
  }

  .menu-pos {
    margin-left: 0 !important;
  }

  .menu-pack-list {
    margin-left: 0 !important;
  }

  .menu-level-title,
  .menu-clickable,
  .menu-level-title.menu-level-toggle,
  .menu-pack-button {
    min-height: 42px !important;
    border-radius: 12px !important;
    padding: 9px 10px !important;
  }

  .floating-auth {
    top: calc(12px + env(safe-area-inset-top)) !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 2147483500 !important;
  }

  .floating-auth-tab {
    min-width: 46px !important;
    height: 46px !important;
    border-radius: 999px !important;
    padding: 0 0.72rem !important;
  }

  .floating-auth-label,
  .floating-auth-chevron {
    display: none !important;
  }

  .floating-auth-avatar {
    width: 30px !important;
    height: 30px !important;
  }

  .floating-auth-panel {
    position: fixed !important;
    top: calc(66px + env(safe-area-inset-top)) !important;
    right: 10px !important;
    left: 10px !important;
    bottom: auto !important;

    width: auto !important;
    max-height: calc(100dvh - 86px - env(safe-area-inset-top)) !important;
    overflow-y: auto !important;

    border-radius: 24px !important;
  }

  .floating-auth-panel::before {
    display: none !important;
  }
}


/* ============================================================
   TRAINING FULL MOBILE VIEWPORT
============================================================ */

@media (max-width: 1100px) {
  body.training-active-mobile {
    overflow: hidden !important;
  }

  .training-card {
    height: calc(100dvh - 86px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 86px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 12px !important;

    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;
    gap: 0.55rem !important;

    overflow: hidden !important;
    border-radius: 22px !important;
  }

  .training-header {
    margin-bottom: 0 !important;
    gap: 0.45rem !important;
  }

  .training-header h3 {
    font-size: 1rem !important;
    line-height: 1.15 !important;
  }

  .training-kicker {
    font-size: 0.62rem !important;
    margin-bottom: 0.1rem !important;
  }

  .training-score span {
    padding: 0.28rem 0.45rem !important;
    font-size: 0.7rem !important;
  }

  .progress-wrap {
    margin-bottom: 0 !important;
  }

  .progress-meta {
    font-size: 0.74rem !important;
    margin-bottom: 0.3rem !important;
  }

  .progress-bar {
    height: 8px !important;
  }

  .training-body {
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 0.45rem !important;
    overflow: hidden !important;
  }

  .prompt-area {
    min-height: 0 !important;
    padding: 0.25rem 0 !important;
    overflow: hidden !important;
  }

  .prompt-label {
    font-size: 0.78rem !important;
    margin-bottom: 0.25rem !important;
  }

  .prompt-word {
    font-size: clamp(1.9rem, 12vw, 3rem) !important;
    line-height: 0.98 !important;
    margin-bottom: 0 !important;
    overflow-wrap: anywhere !important;
  }

  .feedback-slot {
    min-height: 76px !important;
    max-height: 76px !important;
    overflow: hidden !important;
    padding: 0.55rem 0.65rem !important;
    border-radius: 15px !important;
  }

  .feedback-icon {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    font-size: 0.95rem !important;
  }

  .feedback-title {
    font-size: 0.78rem !important;
    margin-bottom: 0.1rem !important;
  }

  .feedback-answer-compact,
  .feedback-main-answer,
  .feedback-answer {
    font-size: 0.95rem !important;
    line-height: 1.08 !important;
  }

  .training-answer-area {
    margin-top: 0 !important;
  }

  .answer-form {
    gap: 0.4rem !important;
  }

  .answer-input-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 0.4rem !important;
  }

  .answer-input-row input {
    height: 42px !important;
    min-width: 0 !important;
    padding: 0.55rem 0.7rem !important;
    border-radius: 13px !important;
    font-size: 0.96rem !important;
  }

  .answer-input-row #checkBtn,
  .answer-form button,
  .next-btn {
    min-height: 42px !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: 13px !important;
    font-size: 0.86rem !important;
    white-space: nowrap !important;
  }

  .special-char-buttons {
    justify-content: center !important;
    gap: 0.24rem !important;
    margin-top: 0 !important;
  }

  .answer-form .special-char-btn {
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 0.38rem !important;
    border-radius: 8px !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 420px) {
  .answer-input-row {
    grid-template-columns: 1fr !important;
  }

  .answer-input-row #checkBtn {
    width: 100% !important;
  }

  .training-card {
    height: calc(100dvh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }
}




/* ============================================================
   FINAL MOBILE DRAWER OVERRIDE
   Musí být úplně poslední blok v CSS
============================================================ */

@media (max-width: 1100px) {
  .app-layout {
    display: block !important;
    min-height: 100dvh !important;
  }

  .main-content {
    width: 100% !important;
    padding: calc(70px + env(safe-area-inset-top)) 14px calc(90px + env(safe-area-inset-bottom)) !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;

    width: min(88vw, 360px) !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;

    padding: calc(76px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom)) !important;

    overflow-y: auto !important;
    overscroll-behavior: contain !important;

    border-radius: 0 28px 28px 0 !important;
    box-shadow: 24px 0 80px rgba(15, 23, 42, 0.42) !important;

    transform: translateX(-115%) !important;
    transition: transform 0.22s ease !important;

    z-index: 2147483400 !important;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0) !important;
  }

  .mobile-menu-toggle {
    position: fixed !important;
    top: calc(12px + env(safe-area-inset-top)) !important;
    left: 12px !important;
    z-index: 2147483600 !important;

    display: inline-flex !important;
    width: 46px !important;
    height: 46px !important;

    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;

    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.96) !important;
    color: white !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.32) !important;
  }

  .mobile-menu-toggle span {
    display: block !important;
    width: 20px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: currentColor !important;
  }

  .mobile-menu-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483300 !important;

    display: block !important;
    opacity: 0 !important;
    pointer-events: none !important;

    background: rgba(15, 23, 42, 0.52) !important;
    backdrop-filter: blur(3px) !important;
    transition: opacity 0.2s ease !important;
  }

  body.mobile-menu-open {
    overflow: hidden !important;
  }

  body.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0 !important;
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
  }
}
































/* ============================================================
   MOBILE BOTTOM APP BAR
   Nová mobilní navigace místo hamburgeru
   Vložit úplně na konec style.css
============================================================ */

.mobile-bottom-nav {
  display: none;
}

/* Na desktopu zůstává původní sidebar */
@media (min-width: 821px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 820px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-layout {
    display: block !important;
    min-height: 100dvh !important;
  }

  .sidebar {
    display: none !important;
  }

  .mobile-menu-toggle,
  .mobile-menu-backdrop {
    display: none !important;
  }

  body.mobile-menu-open {
    overflow: auto !important;
  }

  .main-content {
    width: 100% !important;
    padding:
      calc(18px + env(safe-area-inset-top))
      14px
      calc(96px + env(safe-area-inset-bottom))
      14px !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483500;

    display: block;

    padding:
      8px
      10px
      calc(8px + env(safe-area-inset-bottom));

    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.78),
        rgba(255, 255, 255, 0.96)
      );

    border-top: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 -18px 50px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav-scroll {
    display: flex;
    align-items: center;
    gap: 8px;

    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: none;
    -ms-overflow-style: none;

    padding: 2px 2px;
    scroll-snap-type: x proximity;
  }

  .mobile-bottom-nav-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-bottom-nav-item {
    flex: 0 0 auto;
    min-width: 68px;
    min-height: 58px;

    border: 0;
    border-radius: 18px;

    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    background: transparent;
    color: #64748b;

    font: inherit;
    font-weight: 850;
    cursor: pointer;

    scroll-snap-align: start;

    transition:
      background 0.16s ease,
      color 0.16s ease,
      transform 0.16s ease,
      box-shadow 0.16s ease;
  }

  .mobile-bottom-nav-item:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
  }

  .mobile-bottom-nav-item.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
  }

  .mobile-bottom-nav-icon {
    display: block;
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-bottom-nav-label {
    display: block;
    font-size: 0.66rem;
    line-height: 1;
    letter-spacing: -0.01em;
  }

  .mobile-bottom-nav-auth {
    min-width: 74px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
  }

  .mobile-bottom-nav-auth.active {
    background: linear-gradient(135deg, #ea580c, #9a3412);
  }

  .mobile-bottom-nav-level {
    min-width: 62px;
  }

  .mobile-bottom-nav-level .mobile-bottom-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;

    display: grid;
    place-items: center;

    background: rgba(15, 23, 42, 0.08);
    font-size: 0.88rem;
    font-weight: 950;
  }

  .mobile-bottom-nav-level.active .mobile-bottom-nav-icon {
    background: rgba(255, 255, 255, 0.16);
  }

  /* Auth panel se na mobilu otevírá nad spodní lištou */
  .floating-auth {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    z-index: 2147483600 !important;
    pointer-events: none;
  }

  .floating-auth-tab {
    display: none !important;
  }

  .floating-auth.open {
    pointer-events: auto;
  }

  .floating-auth-panel {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(86px + env(safe-area-inset-bottom)) !important;
    top: auto !important;

    width: auto !important;
    max-height: min(78dvh, 620px) !important;
    overflow-y: auto !important;

    border-radius: 24px !important;
    z-index: 2147483601 !important;
  }

  .floating-auth-panel::before {
    display: none !important;
  }
}













/* ============================================================
   MOBILE TRAINING FOCUS MODE
   Trénink bez bottom navu, přizpůsobený mobilní klávesnici
   Vložit úplně na konec style.css
============================================================ */

:root {
  --training-visible-height: 100dvh;
}

@media (max-width: 820px) {
  body.training-focus-mode {
    overflow: hidden !important;
    height: var(--training-visible-height);
  }

  body.training-focus-mode .mobile-bottom-nav {
    display: none !important;
  }

  body.training-focus-mode .main-content {
    height: var(--training-visible-height) !important;
    min-height: var(--training-visible-height) !important;

    padding:
      calc(8px + env(safe-area-inset-top))
      10px
      calc(8px + env(safe-area-inset-bottom))
      10px !important;

    overflow: hidden !important;
  }

  body.training-focus-mode #pageTitle,
  body.training-focus-mode #pageSubtitle {
    display: none !important;
  }

  body.training-focus-mode .dashboard {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
  }

  body.training-focus-mode #trainer {
    height: 100% !important;
  }

  body.training-focus-mode .training-card,
  body.training-focus-mode .sexy-card {
    height: calc(var(--training-visible-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px !important;

    display: flex !important;
    flex-direction: column !important;

    border-radius: 20px !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .training-header {
    flex: 0 0 auto !important;
    margin-bottom: 8px !important;
    gap: 8px !important;
  }

  body.training-focus-mode .training-kicker {
    display: none !important;
  }

  body.training-focus-mode .training-header h3 {
    font-size: 1rem !important;
    line-height: 1.15 !important;
  }

  body.training-focus-mode .training-score {
    gap: 5px !important;
  }

  body.training-focus-mode .training-score span {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
  }

  body.training-focus-mode .progress-wrap {
    flex: 0 0 auto !important;
    margin-bottom: 8px !important;
  }

  body.training-focus-mode .progress-meta {
    font-size: 0.72rem !important;
    margin-bottom: 5px !important;
  }

  body.training-focus-mode .progress-bar {
    height: 8px !important;
  }

  body.training-focus-mode .training-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;

    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  body.training-focus-mode .prompt-area {
    min-height: 0 !important;
    padding: 4px 4px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.training-focus-mode .prompt-label {
    font-size: 0.75rem !important;
    margin-bottom: 5px !important;
  }

  body.training-focus-mode .prompt-word {
    font-size: clamp(2rem, 12vw, 3.3rem) !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
  }

  body.training-focus-mode .feedback-slot {
    min-height: 74px !important;
    max-height: 88px !important;
    padding: 8px 10px !important;
    overflow: auto !important;
  }

  body.training-focus-mode .feedback-title {
    font-size: 0.82rem !important;
    margin-bottom: 2px !important;
  }

  body.training-focus-mode .feedback-answer-compact,
  body.training-focus-mode .feedback-main-answer,
  body.training-focus-mode .feedback-answer {
    font-size: 1rem !important;
    line-height: 1.12 !important;
  }

  body.training-focus-mode .feedback-mini-grid {
    gap: 5px !important;
  }

  body.training-focus-mode .feedback-mini-grid div {
    padding: 5px 7px !important;
  }

  body.training-focus-mode .feedback-mini-grid span {
    font-size: 0.65rem !important;
  }

  body.training-focus-mode .feedback-mini-grid strong {
    font-size: 0.82rem !important;
  }

  body.training-focus-mode .training-answer-area {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
  }

  body.training-focus-mode .answer-form {
    gap: 6px !important;
  }

  body.training-focus-mode .answer-input-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 7px !important;
    align-items: stretch !important;
  }

  body.training-focus-mode .answer-input-row input {
    min-width: 0 !important;
    height: 44px !important;
    padding: 10px 12px !important;
    font-size: 1rem !important;
    border-radius: 14px !important;
  }

  body.training-focus-mode .answer-input-row button,
  body.training-focus-mode #checkBtn {
    height: 44px !important;
    padding: 0 13px !important;
    border-radius: 14px !important;
    white-space: nowrap !important;
    font-size: 0.88rem !important;
  }

  body.training-focus-mode .special-char-buttons {
    gap: 5px !important;
    max-height: 34px !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
  }

  body.training-focus-mode .answer-form .special-char-btn {
    flex: 0 0 auto !important;
    min-width: 30px !important;
    height: 28px !important;
    padding: 0 8px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
  }
}






/* ============================================================
   DESKTOP SIDEBAR FULL HEIGHT FIX
   Sidebar sahá vizuálně až dolů i při scrollování stránky
============================================================ */

@media (min-width: 821px) {
  .app-layout {
    display: block !important;
    min-height: 100vh !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;

    width: 290px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: none !important;

    overflow-y: auto !important;
    z-index: 1000 !important;
  }

  .main-content {
    margin-left: 290px !important;
    width: calc(100% - 290px) !important;
    min-height: 100vh !important;
  }
}






/* ============================================================
   MOBILE TRAINING FOCUS - INPUT ALWAYS VISIBLE FIX
   Vložit úplně na konec style.css
============================================================ */

@media (max-width: 820px) {
  body.training-focus-mode,
  body.training-focus-mode html {
    overflow: hidden !important;
  }

  body.training-focus-mode {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: var(--training-visible-height) !important;
    min-height: var(--training-visible-height) !important;
    max-height: var(--training-visible-height) !important;
  }

  body.training-focus-mode .main-content {
    height: var(--training-visible-height) !important;
    min-height: 0 !important;
    max-height: var(--training-visible-height) !important;
    overflow: hidden !important;
  }

  body.training-focus-mode #trainer {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .training-card,
  body.training-focus-mode .sexy-card {
    height: calc(var(--training-visible-height) - 16px) !important;
    min-height: 0 !important;
    max-height: calc(var(--training-visible-height) - 16px) !important;

    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;

    overflow: hidden !important;
  }

  body.training-focus-mode .training-header {
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .progress-wrap {
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .training-body {
    min-height: 0 !important;
    height: auto !important;

    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;

    overflow: hidden !important;
  }

  body.training-focus-mode .prompt-area {
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .prompt-word {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  body.training-focus-mode .feedback-slot {
    min-height: 52px !important;
    max-height: 72px !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .training-answer-area {
    position: sticky !important;
    bottom: 0 !important;

    flex: 0 0 auto !important;
    min-height: 0 !important;

    padding-top: 6px !important;
    background: white !important;
    z-index: 5 !important;
  }

  body.training-focus-mode .answer-form {
    margin: 0 !important;
    padding: 0 !important;
  }

  body.training-focus-mode .answer-input-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 7px !important;
    min-height: 42px !important;
  }

  body.training-focus-mode .answer-input-row input {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
  }

  body.training-focus-mode .answer-input-row button,
  body.training-focus-mode #checkBtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    height: 42px !important;
    min-width: 86px !important;
    padding: 0 12px !important;
  }

  body.training-focus-mode .special-char-buttons {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    max-height: 28px !important;
    margin-top: 5px !important;
  }

  body.training-focus-mode .answer-form .special-char-btn {
    height: 26px !important;
    min-width: 28px !important;
    font-size: 0.78rem !important;
  }
}







/* ============================================================
   MOBILE AUTH PAGE
   Přihlášení jako normální stránka na mobilu
============================================================ */

.mobile-auth-page {
  max-width: 760px;
  margin: 0 auto;
}

.mobile-auth-card {
  padding: 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.13), transparent 36%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.11);
}

.mobile-auth-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.mobile-auth-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #0f172a;
  color: #ffffff;
  font-size: 1.6rem;
  overflow: hidden;
}

.mobile-auth-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-auth-hero h1 {
  margin: 2px 0 5px;
  font-size: clamp(1.55rem, 7vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.mobile-auth-hero p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.mobile-auth-actions {
  display: grid;
  gap: 10px;
}

.mobile-email-auth-form {
  margin-top: 2px;
  padding: 14px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.95);
  display: grid;
  gap: 12px;
}

.mobile-email-auth-form.hidden {
  display: none !important;
}

.mobile-email-auth-form label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 850;
  color: #475569;
}

.mobile-email-auth-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 16px;
  padding: 0 13px;
  font: inherit;
  font-size: 1rem;
  background: #ffffff;
}

.mobile-email-auth-actions {
  display: grid;
  gap: 8px;
}

.mobile-auth-message {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.84rem;
  color: #64748b;
}

.mobile-auth-message.error {
  color: #dc2626;
}

.mobile-auth-message.success {
  color: #16a34a;
}

.mobile-auth-signed-in {
  display: grid;
  gap: 14px;
}

.mobile-auth-profile-box {
  padding: 14px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.95);
  display: grid;
  gap: 3px;
}

.mobile-auth-profile-box strong {
  color: #0f172a;
}

.mobile-auth-profile-box span {
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .floating-auth {
    display: none !important;
  }
}












/* ============================================================
   MOBILE DASHBOARD + MOTIVATION OVERFLOW FIX
   Vložit úplně na konec style.css
============================================================ */

@media (max-width: 820px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .main-content,
  #trainer,
  .home-dashboard,
  .home-dashboard-clean,
  .motivation-page,
  .motivation-section,
  .motivation-progress-section,
  .long-progress-layout,
  .activity-calendar-card,
  .activity-chart-card,
  .weekly-summary-card,
  .records-card {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  /* Homepage rychlé statistiky: vždy 2 na řádek */
  .home-metrics-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;

    padding: 0.75rem 0 !important;
    margin: 0.2rem 0 0.35rem !important;

    border-radius: 0 !important;
    overflow: visible !important;
  }

  .home-metrics-row article {
    min-width: 0 !important;
    padding: 0.8rem 0.85rem !important;

    border-radius: 18px !important;
    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
  }

  .home-metrics-row span {
    font-size: 0.66rem !important;
    letter-spacing: 0.045em !important;
  }

  .home-metrics-row strong {
    display: block !important;
    font-size: clamp(1.35rem, 8vw, 1.85rem) !important;
    line-height: 1 !important;
  }

  .home-metrics-row small {
    font-size: 0.76rem !important;
  }

  /* Motivace: horní overview také 2 na řádek */
  .motivation-overview {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }

  .motivation-overview article {
    min-width: 0 !important;
    padding: 0.85rem !important;

    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 18px !important;

    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
  }

  .motivation-overview article span {
    font-size: 0.66rem !important;
    line-height: 1.15 !important;
  }

  .motivation-overview article strong {
    font-size: clamp(1.45rem, 8vw, 1.95rem) !important;
    line-height: 1 !important;
  }

  .motivation-overview article small {
    font-size: 0.76rem !important;
  }

  /* Dlouhodobý pokrok nesmí vytvářet pravý přesah */
  .long-progress-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.85rem !important;
  }

  .activity-calendar-card,
  .activity-chart-card,
  .weekly-summary-card,
  .records-card {
    width: 100% !important;
    padding: 0.85rem !important;
    border-radius: 20px !important;
  }

  .progress-subheader {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.18rem !important;
    margin-bottom: 0.75rem !important;
  }

  .progress-subheader h3,
  .progress-subheader span {
    min-width: 0 !important;
  }

  /* Kalendář aktivity: 7 sloupců, tedy 6 řádků u 42 dní */
  .activity-calendar {
    width: 100% !important;
    max-width: 100% !important;

    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: clamp(0.18rem, 1.4vw, 0.32rem) !important;
  }

  .activity-day {
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 5px !important;
  }

  .activity-calendar-legend {
    max-width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.28rem !important;
    font-size: 0.74rem !important;
  }

  .activity-calendar-legend .activity-day {
    flex: 0 0 auto !important;
    width: 0.72rem !important;
    height: 0.72rem !important;
  }

  /* Graf odpovědí: 30 sloupců se musí vejít, nesmí nastavovat minimální šířku */
  .activity-bar-chart {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    height: 135px !important;
    grid-template-columns: repeat(30, minmax(0, 1fr)) !important;
    gap: 0.12rem !important;
  }

  .activity-bar-item,
  .activity-bar-wrap,
  .activity-bar {
    min-width: 0 !important;
  }

  .weekly-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }

  .weekly-summary-grid strong,
  .records-list strong {
    font-size: 1.15rem !important;
  }

  .records-list {
    min-width: 0 !important;
  }

  .records-list small {
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 360px) {
  .home-metrics-row,
  .motivation-overview,
  .weekly-summary-grid {
    gap: 0.5rem !important;
  }

  .home-metrics-row article,
  .motivation-overview article,
  .activity-calendar-card,
  .activity-chart-card,
  .weekly-summary-card,
  .records-card {
    padding: 0.72rem !important;
  }

  .activity-bar-chart {
    height: 120px !important;
    gap: 0.08rem !important;
  }
}




/* ============================================================
   MOBILE PROFILE SETTINGS ACTIONS CLEANUP
   Vložit úplně na konec style.css
============================================================ */

@media (max-width: 820px) {
  .profile-hero-actions,
  .profile-settings-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.6rem !important;
  }

  .profile-hero-actions .secondary-button,
  .profile-hero-actions .primary-button,
  .profile-settings-actions .secondary-button,
  .profile-settings-actions .primary-button,
  .profile-settings-actions .danger-button {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .danger-soft-button {
    color: #b91c1c !important;
    background: #fff1f2 !important;
    border-color: rgba(244, 63, 94, 0.22) !important;
  }
}






/* ============================================================
   MOBILE CLOUD ACCOUNT CARD CLEANUP
   E-mail se vejde na jeden řádek, mezery mezi kartami,
   odhlášení stejně široké jako karty.
   Vložit úplně na konec style.css
============================================================ */

@media (max-width: 820px) {
  .settings-card-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  .cloud-account-card {
    width: 100% !important;
    max-width: 100% !important;

    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.85rem !important;

    margin: 0 0 0.9rem 0 !important;
    padding: 0.9rem !important;

    border-radius: 20px !important;
    overflow: hidden !important;
  }

  .cloud-account-card > div:last-child {
    min-width: 0 !important;
    max-width: 100% !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 0.16rem !important;

    overflow: hidden !important;
  }

  .cloud-account-card strong,
  .cloud-account-card span,
  .cloud-account-card small {
    min-width: 0 !important;
    max-width: 100% !important;

    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .cloud-account-card strong {
    font-size: clamp(0.86rem, 3.7vw, 1.03rem) !important;
    line-height: 1.15 !important;
  }

  .cloud-account-card span {
    font-size: clamp(0.68rem, 3.15vw, 0.9rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.025em !important;
  }

  .cloud-account-card small {
    font-size: clamp(0.66rem, 2.9vw, 0.8rem) !important;
    line-height: 1.15 !important;
  }

  .settings-card-main .settings-info-box.success {
    width: 100% !important;
    max-width: 100% !important;

    margin: 0 0 0.9rem 0 !important;
    padding: 0.9rem !important;

    border-radius: 20px !important;
  }

  .settings-card-main .settings-info-box.success p {
    margin-bottom: 0 !important;
  }

  .cloud-account-actions,
  .settings-card-main .profile-settings-actions {
    width: 100% !important;
    max-width: 100% !important;

    display: block !important;
    margin: 0 !important;
  }

  .cloud-logout-wide,
  .settings-card-main .profile-settings-actions #cloudLogoutFromProfileBtn {
    width: 100% !important;
    min-height: 48px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 18px !important;
    font-weight: 900 !important;
  }

  .danger-soft-button {
    color: #b91c1c !important;
    background: #fff1f2 !important;
    border-color: rgba(244, 63, 94, 0.24) !important;
  }
}

@media (max-width: 380px) {
  .cloud-account-card {
    grid-template-columns: 54px minmax(0, 1fr) !important;
    gap: 0.7rem !important;
    padding: 0.78rem !important;
  }

  .cloud-account-card .profile-avatar,
  .cloud-account-card .profile-avatar-large {
    width: 54px !important;
    height: 54px !important;
  }

  .cloud-account-card span {
    font-size: clamp(0.62rem, 3vw, 0.78rem) !important;
  }
}





/* ============================================================
   MOBILE DIAGNOSTIC FOCUS MODE
   Diagnostika stejně jako trénink ve viditelné části obrazovky
   Vložit úplně na konec style.css
============================================================ */

@media (max-width: 820px) {
  body.training-focus-mode .diagnostic-focus-card,
  body.training-focus-mode .diagnostic-card {
    height: calc(var(--training-visible-height) - 16px) !important;
    min-height: 0 !important;
    max-height: calc(var(--training-visible-height) - 16px) !important;

    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) auto !important;

    margin: 0 !important;
    padding: 12px !important;
    border-radius: 20px !important;

    overflow: hidden !important;
  }

  body.training-focus-mode .diagnostic-card .training-header,
  body.training-focus-mode .diagnostic-focus-card .training-header {
    min-height: 0 !important;
    margin-bottom: 7px !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .diagnostic-card .training-kicker,
  body.training-focus-mode .diagnostic-focus-card .training-kicker {
    display: none !important;
  }

  body.training-focus-mode .diagnostic-card .training-header h3,
  body.training-focus-mode .diagnostic-focus-card .training-header h3 {
    font-size: 0.95rem !important;
    line-height: 1.12 !important;
    margin: 0 !important;

    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .diagnostic-pack-line {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem 0.5rem !important;
    margin-top: 0.25rem !important;

    font-size: 0.7rem !important;
    line-height: 1.15 !important;
  }

  body.training-focus-mode .diagnostic-card .training-score,
  body.training-focus-mode .diagnostic-focus-card .training-score {
    gap: 4px !important;
  }

  body.training-focus-mode .diagnostic-card .training-score span,
  body.training-focus-mode .diagnostic-focus-card .training-score span {
    padding: 5px 7px !important;
    font-size: 0.68rem !important;
    border-radius: 999px !important;
  }

  body.training-focus-mode .diagnostic-card .progress-wrap,
  body.training-focus-mode .diagnostic-focus-card .progress-wrap {
    min-height: 0 !important;
    margin-bottom: 7px !important;
    overflow: hidden !important;
  }

  body.training-focus-mode .diagnostic-card .progress-meta,
  body.training-focus-mode .diagnostic-focus-card .progress-meta {
    margin-bottom: 4px !important;
    font-size: 0.7rem !important;
  }

  body.training-focus-mode .diagnostic-card .progress-bar,
  body.training-focus-mode .diagnostic-focus-card .progress-bar {
    height: 7px !important;
  }

  body.training-focus-mode .diagnostic-card .training-body,
  body.training-focus-mode .diagnostic-focus-card .training-body {
    min-height: 0 !important;

    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 7px !important;

    overflow: hidden !important;
  }

  body.training-focus-mode .diagnostic-card .prompt-area,
  body.training-focus-mode .diagnostic-focus-card .prompt-area {
    min-height: 0 !important;
    padding: 4px !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;

    overflow: hidden !important;
  }

  body.training-focus-mode .diagnostic-card .prompt-label,
  body.training-focus-mode .diagnostic-focus-card .prompt-label {
    margin-bottom: 5px !important;
    font-size: 0.72rem !important;
  }

  body.training-focus-mode .diagnostic-card .prompt-word,
  body.training-focus-mode .diagnostic-focus-card .prompt-word {
    font-size: clamp(1.8rem, 11vw, 3.05rem) !important;
    line-height: 1 !important;
    margin: 0 !important;

    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  body.training-focus-mode .diagnostic-card .feedback-slot,
  body.training-focus-mode .diagnostic-focus-card .feedback-slot {
    min-height: 54px !important;
    max-height: 76px !important;
    padding: 8px 10px !important;

    overflow: hidden !important;
    border-radius: 15px !important;
  }

  body.training-focus-mode .diagnostic-card .training-answer-area,
  body.training-focus-mode .diagnostic-focus-card .training-answer-area {
    min-height: 0 !important;
    margin: 0 !important;
    padding-top: 6px !important;

    background: #ffffff !important;
    z-index: 5 !important;
  }

  body.training-focus-mode .diagnostic-card .answer-form,
  body.training-focus-mode .diagnostic-focus-card .answer-form {
    margin: 0 !important;
    padding: 0 !important;
  }

  body.training-focus-mode .diagnostic-card .answer-input-row,
  body.training-focus-mode .diagnostic-focus-card .answer-input-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 7px !important;
    align-items: stretch !important;
  }

  body.training-focus-mode #diagnosticAnswerInput,
  body.training-focus-mode #languageDiagnosticAnswerInput {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;

    height: 42px !important;
    padding: 10px 12px !important;

    border-radius: 14px !important;
    font-size: 1rem !important;
  }

  body.training-focus-mode #diagnosticCheckBtn,
  body.training-focus-mode #languageDiagnosticCheckBtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    height: 42px !important;
    min-width: 86px !important;
    padding: 0 12px !important;

    border-radius: 14px !important;
    white-space: nowrap !important;
    font-size: 0.86rem !important;
  }

  body.training-focus-mode .diagnostic-card .special-char-buttons,
  body.training-focus-mode .diagnostic-focus-card .special-char-buttons {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 5px !important;

    max-height: 28px !important;
    margin-top: 5px !important;

    overflow: hidden !important;
  }

  body.training-focus-mode .diagnostic-card .special-char-btn,
  body.training-focus-mode .diagnostic-focus-card .special-char-btn {
    flex: 0 0 auto !important;
    min-width: 28px !important;
    height: 26px !important;

    padding: 0 7px !important;
    border-radius: 8px !important;

    font-size: 0.78rem !important;
  }
}

@media (max-width: 420px) {
  body.training-focus-mode .diagnostic-card .answer-input-row,
  body.training-focus-mode .diagnostic-focus-card .answer-input-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.training-focus-mode #diagnosticCheckBtn,
  body.training-focus-mode #languageDiagnosticCheckBtn {
    width: 100% !important;
  }

  body.training-focus-mode .diagnostic-pack-line {
    font-size: 0.66rem !important;
  }

  body.training-focus-mode .diagnostic-card .feedback-slot,
  body.training-focus-mode .diagnostic-focus-card .feedback-slot {
    min-height: 50px !important;
    max-height: 68px !important;
  }
}


/* ============================================================
   DESKTOP HOME METRICS 4-COLUMN FIX
   Po odstranění A1 progress karty mají 4 statistiky každá 1/4 řádku
============================================================ */

@media (min-width: 821px) {
  .home-metrics-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0 !important;
    width: 100% !important;
  }

  .home-metrics-row article {
    min-width: 0 !important;
    width: auto !important;
  }
}





.sidebar-logo {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.sidebar-logo img {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}


.page-title-logo {
  margin: 0 0 0.35rem;
  line-height: 0;
}

.page-title-logo-img {
  display: block;
  width: min(100%, 340px);
  height: auto;
  object-fit: contain;
}



.activity-bar.activity-level-0 {
  background: rgba(148, 163, 184, 0.18);
}

.activity-bar.activity-level-1 {
  background: #bbf7d0;
}

.activity-bar.activity-level-2 {
  background: #86efac;
}

.activity-bar.activity-level-3 {
  background: #4ade80;
}

.activity-bar.activity-level-4 {
  background: #22c55e;
}





/* ============================================================
   MOTIVACE – přehlednější odznaky a trofeje
   ============================================================ */

.badge-dashboard-summary,
.trophy-dashboard-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.badge-dashboard-summary strong,
.trophy-dashboard-summary strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  color: #0f172a;
}

.badge-dashboard-summary span,
.trophy-dashboard-summary span {
  display: block;
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-dashboard-summary p,
.trophy-dashboard-summary p {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.45;
}


/* Odznaky */

.badge-dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.badge-group {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.85rem;
}

.badge-group-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.badge-group-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.badge-group-header span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.82rem;
}

.badge-group-header > strong {
  display: grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.9rem;
}

.badge-list-compact,
.badge-archive-list {
  display: grid;
  gap: 0.55rem;
}

.active-badge-card-v2 {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.active-badge-card-v2.is-active {
  border-color: rgba(37, 99, 235, 0.32);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), #ffffff 45%);
}

.active-badge-card-v2.archive {
  background: #f8fafc;
}

.active-badge-icon-v2 {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #eef2ff;
  font-size: 1.45rem;
}

.active-badge-card-v2.is-inactive .active-badge-icon-v2 {
  background: #f1f5f9;
}

.active-badge-title-v2 {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

.active-badge-title-v2 strong {
  color: #0f172a;
  font-size: 0.93rem;
}

.active-badge-title-v2 span {
  flex: 0 0 auto;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
}

.active-badge-card-v2.is-active .active-badge-title-v2 span {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.active-badge-main-v2 p {
  margin: 0.25rem 0 0.45rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
}

.active-badge-progress-v2 {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.active-badge-progress-v2 > div {
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.badge-more-note {
  display: block;
  margin-top: 0.65rem;
  color: #64748b;
  font-size: 0.78rem;
}

.badge-archive {
  margin-top: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: #f8fafc;
  overflow: hidden;
}

.badge-archive summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0.85rem 1rem;
  color: #0f172a;
  font-weight: 800;
}

.badge-archive summary::-webkit-details-marker {
  display: none;
}

.badge-archive summary strong {
  min-width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.8rem;
}

.badge-archive-list {
  padding: 0 1rem 1rem;
}


/* Trofeje */

.trophy-showcase,
.trophy-next-goals,
.trophy-album {
  margin-top: 1rem;
}

.trophy-block-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.65rem;
}

.trophy-block-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
}

.trophy-block-header span {
  color: #64748b;
  font-size: 0.82rem;
}

.trophy-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.trophy-card-v2 {
  min-height: 142px;
  padding: 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
}

.trophy-card-v2.unlocked {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(180deg, #fffbeb, #ffffff 55%);
}

.trophy-card-v2.locked {
  background: #f8fafc;
  opacity: 0.82;
}

.trophy-icon-wrap-v2 {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 0.65rem;
  border-radius: 18px;
  background: #e2e8f0;
}

.trophy-card-v2.unlocked .trophy-icon-wrap-v2 {
  background: #fef3c7;
}

.trophy-icon-v2 {
  font-size: 1.65rem;
}

.trophy-card-content-v2 strong {
  display: block;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.2;
}

.trophy-card-content-v2 > span {
  display: inline-block;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
}

.trophy-card-v2.unlocked .trophy-card-content-v2 > span {
  color: #b45309;
}

.trophy-progress-line-v2 {
  display: flex;
  justify-content: space-between;
  margin: 0.55rem 0 0.3rem;
  color: #64748b;
  font-weight: 700;
}

.trophy-progress-bar-v2,
.trophy-goal-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.trophy-progress-bar-v2 > div,
.trophy-goal-progress > div {
  height: 100%;
  border-radius: inherit;
  background: #f59e0b;
}

.trophy-goal-list {
  display: grid;
  gap: 0.55rem;
}

.trophy-goal-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #ffffff;
}

.trophy-goal-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f8fafc;
  font-size: 1.35rem;
}

.trophy-goal-main > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.trophy-goal-main strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.trophy-goal-main span,
.trophy-goal-main p,
.trophy-goal-percent {
  color: #64748b;
  font-size: 0.8rem;
}

.trophy-goal-main p {
  margin: 0 0 0.45rem;
}

.trophy-goal-percent {
  color: #0f172a;
}

.trophy-category-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.trophy-filter {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #ffffff;
  color: #475569;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.trophy-filter.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.trophy-album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.trophy-card-v2.hidden-by-filter {
  display: none;
}


/* Mobil */

@media (max-width: 820px) {
  .badge-dashboard-summary,
  .trophy-dashboard-summary {
    grid-template-columns: 1fr;
  }

  .badge-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .trophy-showcase-grid,
  .trophy-album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trophy-goal-row {
    grid-template-columns: 40px 1fr;
  }

  .trophy-goal-percent {
    display: none;
  }
}

@media (max-width: 420px) {
  .trophy-showcase-grid,
  .trophy-album-grid {
    grid-template-columns: 1fr;
  }
}




.community-training-summary {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.055), transparent 42%),
    rgba(255, 255, 255, 0.92);
}

.community-training-details {
  margin-top: 0.65rem;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.community-training-details summary {
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 800;
}

.community-training-details summary::-webkit-details-marker {
  display: none;
}

.community-training-details summary::after {
  content: "▾";
  float: right;
  opacity: 0.7;
}

.community-training-details[open] summary::after {
  content: "▴";
}

.community-training-detail-list {
  display: grid;
  gap: 0.35rem;
  padding: 0 0.75rem 0.75rem;
}

.community-training-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.community-training-detail-row strong {
  color: #0f172a;
  font-size: 0.84rem;
  line-height: 1.25;
}

.community-training-detail-row span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 560px) {
  .community-training-detail-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }
}


.community-challenges {
  display: grid;
  gap: 1rem;
}

.community-challenge-create {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.community-challenge-section {
  display: grid;
  gap: 0.55rem;
}

.community-challenge-invite {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.community-challenge-invite.sent {
  border-color: rgba(37, 99, 235, 0.2);
}

.community-challenge-invite.completed {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(240, 253, 244, 0.72);
}

.community-challenge-invite.declined {
  opacity: 0.7;
}

.community-challenge-invite-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.09);
  font-size: 1.35rem;
}

.community-challenge-invite-main strong {
  display: block;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.25;
}

.community-challenge-invite-main p {
  margin: 0.25rem 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
}

.community-challenge-invite-main small {
  display: block;
  color: #94a3b8;
  font-size: 0.75rem;
}

.community-challenge-invite-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.community-challenge-invite-actions .primary-button,
.community-challenge-invite-actions .secondary-button {
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
}

.community-challenge-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.55rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
}



/* Žebříček přátel – XP pod jménem a dlouhé jméno s elipsou */

.leaderboard-row.community-leaderboard-row {
  grid-template-columns: auto auto minmax(0, 1fr);
}

.community-leaderboard-user {
  min-width: 0;
  padding-right: 1.9rem;
}

.community-leaderboard-user > strong {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
}

.community-leaderboard-xp-line {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.12rem;
  min-width: 0;
}

.community-leaderboard-xp-line strong {
  color: #2563eb;
  font-size: 0.92rem;
  font-weight: 950;
  white-space: nowrap;
}

.community-leaderboard-xp-line span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
  opacity: 0.78;
}

.community-leaderboard-user > span {
  display: block;
  margin-top: 0.12rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.25;
}

.community-leaderboard-score {
  display: none;
}

@media (max-width: 520px) {
  .community-leaderboard-user {
    padding-right: 0;
  }

  .community-leaderboard-row.active::after {
    position: static;
    grid-column: 3;
    width: fit-content;
    margin-top: 0.25rem;
  }
}






.community-challenge-score-line,
.community-challenge-result {
  margin-top: 0.65rem;
  padding: 0.75rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.04);
}

.community-challenge-score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.community-challenge-result {
  display: grid;
  gap: 0.45rem;
}

.community-challenge-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.community-challenge-winner {
  margin-top: 0.35rem;
  font-weight: 800;
}

.community-challenge-invite.completed {
  border-color: rgba(34, 197, 94, 0.35);
}

.community-challenge-invite.declined,
.community-challenge-invite.expired {
  opacity: 0.72;
}




.community-notification-badge {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.4rem;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.community-notification-badge.hidden {
  display: none;
}

.mobile-bottom-nav-item .community-notification-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.55rem;
  margin-left: 0;
}

.mobile-bottom-nav-item {
  position: relative;
}

.community-notifications {
  display: grid;
  gap: 0.75rem;
}

.community-notifications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-text, #64748b);
}

.community-notification-list {
  display: grid;
  gap: 0.65rem;
}

.community-notification-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0.8rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.community-notification-item.is-unread {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(254, 242, 242, 0.72);
}

.community-notification-icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.06);
}

.community-notification-content {
  min-width: 0;
}

.community-notification-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.community-notification-title span {
  font-size: 0.62rem;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: 0.04em;
}

.community-notification-content p {
  margin: 0.3rem 0;
  color: var(--text, #1e293b);
  line-height: 1.35;
}

.community-notification-content small {
  color: var(--muted-text, #64748b);
}

.community-notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.community-menu-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}







.community-challenge-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.community-challenge-history-actions .secondary-button,
.community-challenge-history-actions .community-mini-action {
  width: fit-content;
}








.community-challenge-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.85rem 0 1rem;
  padding: 0.35rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.05);
}

.community-challenge-tab {
  border: 0;
  border-radius: 0.8rem;
  padding: 0.7rem 0.65rem;
  background: transparent;
  color: var(--muted-text, #64748b);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
}

.community-challenge-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-challenge-tab strong {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
  font-size: 0.75rem;
}

.community-challenge-tab.active {
  background: #fff;
  color: var(--text, #0f172a);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.community-challenge-tab.active strong {
  background: rgba(249, 115, 22, 0.14);
  color: #ea580c;
}

.community-challenge-tab-content {
  display: grid;
  gap: 0.75rem;
}

.community-challenge-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.community-challenge-history-actions .secondary-button,
.community-challenge-history-actions .community-mini-action {
  width: fit-content;
}

@media (max-width: 640px) {
  .community-challenge-tabs {
    grid-template-columns: 1fr;
  }

  .community-challenge-tab {
    justify-content: space-between;
  }
}




