body {
  box-sizing: border-box;
  font-family: 'Nunito', sans-serif;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: #FF6B35;
}

.gradient-bg {
  background: linear-gradient(135deg, #FFF8F0 0%, #FFF0E8 50%, #F0F4FF 100%);
}

.card-shadow {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.slider-track {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    #E8D5C4 0%,
    #E8D5C4 var(--value),
    #F0E6DC var(--value),
    #F0E6DC 100%
  );
}

.slider-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FF6B35;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
  transition: transform 0.2s;
}

.slider-track::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.chip {
  transition: all 0.2s ease;
}

.chip:hover {
  transform: translateY(-2px);
}

.chip.selected {
  background: #FF6B35;
  color: white;
  border-color: #FF6B35;
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

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

.emoji-btn {
  transition: all 0.2s;
}

.emoji-btn:hover {
  transform: scale(1.2);
}

.emoji-btn.selected {
  background: #FFF0E8;
  border-color: #FF6B35;
}

.emoji-grid {
  max-width: calc(12 * 48px + 11 * 8px); /* 12 buttons + 11 gaps */
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .emoji-grid {
    flex-wrap: nowrap;
  }
}

.emoji-tooltip {
  position: fixed;
  z-index: 50;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 1);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 14px;
  color: #111827;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transform: translateY(2px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.emoji-tip-title {
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.emoji-tip-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #4B5563;
  line-height: 1.35;
}

.emoji-tooltip.emoji-tooltip--hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
}

.progress-dot {
  transition: all 0.3s;
}

.progress-dot.active {
  background: #FF6B35;
  transform: scale(1.2);
}

.progress-dot.completed {
  background: #4CAF50;
}

.save-indicator {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.40);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: modalBackdropIn 160ms ease-out;
}

.modal__panel {
  position: relative;
  width: min(520px, calc(100vw - 36px));
  border: 1px solid rgba(251, 146, 60, 0.35);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 16px 16px;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.22);
  animation: modalPanelIn 190ms ease-out;
}

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

@keyframes modalPanelIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal--out .modal__backdrop {
  animation: modalBackdropOut 160ms ease-in forwards;
}

.modal--out .modal__panel {
  animation: modalPanelOut 160ms ease-in forwards;
}

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

@keyframes modalPanelOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(14px) scale(0.98); }
}

.modal__title {
  font-weight: 800;
  color: #111827;
  font-size: 19px;
  line-height: 1.2;
}

.modal__body {
  margin-top: 20px;
  font-size: 15px;
  color: #4B5563;
  line-height: 1.45;
}

.modal__note {
  margin-top: 12px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(255, 237, 213, 0.55);
  border: 1px solid rgba(251, 146, 60, 0.25);
  font-size: 14px;
  color: #7C2D12;
  line-height: 1.35;
}

.modal__note-title {
  font-weight: 800;
  color: #7C2D12;
  margin-bottom: 6px;
}

.modal__note-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.modal__note-list li {
  margin: 2px 0;
  position: relative;
  padding-left: 18px;
}

.modal__note-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(124, 45, 18, 0.9);
}

.modal__actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modal__btn {
  appearance: none;
  border: 1px solid rgba(229, 231, 235, 1);
  background: #ffffff;
  color: #111827;
  font-weight: 800;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 14px;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.modal__btn:hover {
  transform: translateY(-1px);
  background: rgba(249, 250, 251, 1);
}

.modal__btn--primary {
  border-color: rgba(255, 107, 53, 0.45);
  background: rgba(255, 240, 232, 0.7);
  color: #9A3412;
}

.modal__btn--ghost {
  background: transparent;
  border-color: rgba(229, 231, 235, 0.8);
  color: #6B7280;
}

.howto__panel {
  padding-bottom: 14px;
}

.gdpr__panel {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.about__panel {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.about__lead {
  font-size: 17px;
  color: #111827;
}

.about__body p + p {
  margin-top: 10px;
}

.gdpr__body p + p {
  margin-top: 10px;
}

.gdpr__section + .gdpr__section {
  margin-top: 12px;
}

.gdpr__section-title {
  font-weight: 800;
  color: #1F2937;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.gdpr__list {
  margin: 6px 0 0;
  padding-left: 16px;
  color: #4B5563;
}

.gdpr__list li + li {
  margin-top: 4px;
}

.gdpr__ack {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(251, 146, 60, 0.28);
  background: rgba(255, 237, 213, 0.45);
  color: #7C2D12;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.howto__slide {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(249, 250, 251, 0.55);
  transition: opacity 160ms ease, transform 160ms ease;
}

.howto__slide.howto__slide--fade-out {
  opacity: 0;
  transform: translateX(-8px);
}

.howto__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 240, 232, 0.85);
  border: 1px solid rgba(255, 107, 53, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.howto__step-title {
  font-weight: 800;
  color: #111827;
  font-size: 15px;
  line-height: 1.25;
}

.howto__step-text {
  margin-top: 4px;
  font-size: 14px;
  color: #4B5563;
  line-height: 1.4;
}

.howto__dots {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.howto__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(209, 213, 219, 1);
  transition: transform 160ms ease, background 160ms ease;
}

.howto__dot.howto__dot--active {
  background: rgba(255, 107, 53, 1);
  transform: scale(1.2);
}

.howto__actions {
  justify-content: space-between;
}

@media (max-width: 420px) {
  .howto__actions {
    justify-content: flex-end;
  }
  .howto__actions #howto-prev {
    display: none;
  }
}

@view-transition {
  navigation: auto;
}
