.ldaf-root {
  max-width: 820px;
  margin: 24px auto;
  font-family: inherit;
}

.ldaf-shell {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.ldaf-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
  color: #64748b;
}

.ldaf-login-note {
  text-align: right;
}

.ldaf-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  min-height: 240px;
  outline: none;
}

.ldaf-card:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.ldaf-meta {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.ldaf-label,
.ldaf-answer-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 10px;
}

.ldaf-question,
.ldaf-answer,
.ldaf-explanation {
  font-size: 20px;
  line-height: 1.55;
  color: #0f172a;
}

.ldaf-question p,
.ldaf-answer p,
.ldaf-explanation p {
  margin-top: 0;
}

.ldaf-hint {
  margin-top: 16px;
  font-size: 15px;
  color: #475569;
  font-style: italic;
}

.ldaf-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 22px 0;
}

.ldaf-explain-title {
  margin-top: 18px;
  color: #334155;
}

.ldaf-explanation {
  font-size: 17px;
  color: #334155;
}

.ldaf-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.ldaf-ratings,
.ldaf-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ldaf-button,
.ldaf-link-button {
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.ldaf-button:hover,
.ldaf-link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  border-color: #94a3b8;
}

.ldaf-button:disabled,
.ldaf-link-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ldaf-show-answer {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.ldaf-rating[data-rating="again"] {
  border-color: #fecaca;
}

.ldaf-rating[data-rating="hard"] {
  border-color: #fed7aa;
}

.ldaf-rating[data-rating="good"] {
  border-color: #bbf7d0;
}

.ldaf-rating[data-rating="easy"] {
  border-color: #bfdbfe;
}

.ldaf-feedback {
  min-height: 22px;
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
}

.ldaf-empty {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
  color: #475569;
}

.ldaf-finished {
  text-align: center;
}

.ldaf-finished-icon {
  width: 54px;
  height: 54px;
  line-height: 54px;
  border-radius: 999px;
  margin: 0 auto 12px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 900;
  font-size: 28px;
}

@media (max-width: 640px) {
  .ldaf-shell {
    padding: 16px;
  }

  .ldaf-card {
    padding: 18px;
  }

  .ldaf-question,
  .ldaf-answer {
    font-size: 18px;
  }

  .ldaf-actions,
  .ldaf-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ldaf-login-note {
    text-align: left;
  }
}
