body {
  font-family: 'Inter', Arial, sans-serif;
}

.app-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.hero-box {
  background: linear-gradient(135deg, #0d6efd, #4f8dfd);
  color: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 10px 25px rgba(13, 110, 253, 0.18);
}

.app-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.app-subtitle {
  font-size: 1rem;
  opacity: 0.95;
}

.help-btn {
  white-space: nowrap;
  border-radius: 999px;
}

#audioWrap,
#loader,
#contentCard,
#previewWrap {
  display: none;
}

#status {
  color: #6c757d;
  font-style: italic;
  min-height: 24px;
  text-align: center;
}

.content-box {
  text-align: left;
  white-space: pre-wrap;
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.8;
}

.preview-box {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.8rem;
  background: #fff;
  padding: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

#preview {
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

.dyslexia {
  font-size: 26px;
  line-height: 2.1;
  letter-spacing: 0.2em;
  word-spacing: 0.4em;
  background-color: #fdf6e3;
}

.sentence {
  transition: background-color 0.2s ease, color 0.2s ease;
  border-radius: 0.25rem;
  padding: 0 2px;
}

.sentence.active {
  background-color: #fff3cd;
  color: #212529;
}

.form-control,
.btn,
.card,
audio,
.modal-content {
  border-radius: 0.8rem;
}

.btn-primary,
.btn-success,
.btn-secondary,
.btn-outline-primary,
.btn-outline-secondary {
  font-weight: 600;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#contentCard {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  border: 0;
}

.section-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #495057;
  margin-bottom: 0.55rem;
  text-align: left;
  letter-spacing: 0.01em;
}

.crop-toolbar .btn {
  min-height: 42px;
  font-weight: 600;
}

.crop-container {
  height: min(70vh, 720px);
  min-height: 320px;
  width: 100%;
  background: #f8f9fa;
  overflow: hidden;
  border-radius: 0.75rem;
}

#cropImage {
  display: block;
  max-width: 100%;
  width: 100%;
}

.cropper-container {
  width: 100% !important;
  height: 100% !important;
}

.modal-crop .modal-content {
  overflow: hidden;
}

.modal-crop .modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
}

.modal-crop .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #fff;
}

.modal-crop .modal-body {
  overflow: auto;
}

@media (max-width: 575.98px) {
  .app-title {
    font-size: 1.6rem;
  }

  .crop-container {
    height: calc(100vh - 260px);
    min-height: 300px;
  }

  .modal-crop .modal-body {
    padding-bottom: 0.75rem;
  }
}