.feeling-page::before {
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.28), rgba(247, 232, 202, 0.08)),
    url("../../assets/images/backgrounds/page-mountains-optimized.webp") center / cover no-repeat,
    url("../../assets/images/backgrounds/page-mountains-preview.webp") center / cover no-repeat;
}

.feeling-shell {
  width: min(1200px, calc(100% - 48px));
  padding-top: clamp(22px, 3vh, 38px);
}

.feeling-shell .assessment-heading h1 {
  font-size: clamp(38px, 3.4vw, 54px);
}

.feeling-shell .assessment-mode-tabs {
  margin-bottom: 18px;
}

.feeling-card {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.9fr);
  min-height: 500px;
  border: 1px solid rgba(164, 123, 71, 0.22);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 20px 60px rgba(92, 59, 25, 0.12);
  overflow: hidden;
}

.feeling-editor,
.feeling-hints {
  padding: 34px 38px;
}

.feeling-hints {
  border-left: 1px solid #eadfce;
  background: rgba(252, 247, 237, 0.62);
}

.feeling-section-heading h2 {
  margin: 0;
  color: #2b2018;
  font-size: 28px;
  font-weight: 600;
}

.feeling-section-heading > span {
  display: block;
  width: 42px;
  height: 2px;
  margin: 12px 0 18px;
  background: #b68842;
}

.feeling-editor textarea {
  display: block;
  width: 100%;
  height: 200px;
  min-height: 200px;
  resize: vertical;
  padding: 20px 22px;
  border: 1px solid #d9c8b1;
  border-radius: 12px;
  background:
    repeating-linear-gradient(180deg, transparent 0 41px, rgba(156, 126, 87, 0.11) 41px 42px),
    rgba(255, 255, 255, 0.66);
  color: #44352a;
  font: 17px/42px var(--font-heading);
}

.feeling-editor textarea::placeholder {
  color: #9a8b7b;
}

.feeling-editor textarea { background-position: 0 20px; }

.feeling-editor textarea:disabled {
  cursor: wait;
  opacity: 0.68;
}

.feeling-count-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: #756657;
  font-size: 15px;
}

.feeling-message {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--danger);
  font: 14px/1.6 var(--font-ui);
}

.feeling-actions {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.feeling-actions .assessment-button {
  min-width: 180px;
}

.feeling-privacy {
  margin: 12px 0 0;
  color: #7b6c5e;
  font-size: 14px;
}

.feeling-undo {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid #e2d3bd;
  border-radius: 9px;
  background: #fff9ed;
  color: #655140;
  font-family: var(--font-ui);
}

.feeling-undo button,
.feeling-failure button,
.feeling-failure a,
.feeling-safety button {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #986b2c;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.feeling-undo [data-undo-countdown] {
  margin-left: auto;
}

.feeling-failure {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(138, 70, 63, 0.25);
  border-radius: 12px;
  background: #fff8f3;
}

.feeling-failure h3,
.feeling-failure p {
  margin: 0 0 8px;
}

.feeling-failure > div {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-ui);
}

.feeling-hints ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.feeling-hints li {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border: 1px solid #e5d8c5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.54);
}

.feeling-hints li > span {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f5e8d4;
  color: #a47632;
}

.feeling-hints li p {
  margin: 0;
  font-size: 16px;
}

.feeling-hints > p {
  margin: 18px 0;
  padding-top: 16px;
  border-top: 1px solid #eadfce;
  color: #7a6b5c;
  font-size: 14px;
}

.feeling-switch {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #b58b4c;
  border-radius: 999px;
  color: #765231;
  font-weight: 600;
  text-decoration: none;
}

.feeling-analysis,
.feeling-result {
  min-height: 500px;
  padding: 54px;
  border: 1px solid rgba(164, 123, 71, 0.22);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 20px 60px rgba(92, 59, 25, 0.12);
  text-align: center;
}

.feeling-analysis {
  display: grid;
  place-content: center;
}

.feeling-analysis h2,
.feeling-result h2 {
  margin: 6px 0 12px;
  font-size: 34px;
}

.feeling-analysis > p:not(.assessment-kicker) {
  margin: 0 0 24px;
  color: #756454;
  font-size: 17px;
}

.feeling-ink {
  display: flex;
  height: 56px;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.feeling-ink i {
  width: 14px;
  border-radius: 50% 50% 35% 35%;
  background: #b68b48;
  animation: feeling-wave 1.2s ease-in-out infinite alternate;
}

.feeling-ink i:nth-child(1) { height: 26px; }
.feeling-ink i:nth-child(2) { height: 50px; animation-delay: 160ms; }
.feeling-ink i:nth-child(3) { height: 36px; animation-delay: 320ms; }

@keyframes feeling-wave {
  to { height: 18px; opacity: 0.48; }
}

.feeling-result {
  display: grid;
  align-content: center;
  text-align: left;
}

.feeling-result-main {
  width: min(780px, 100%);
  margin: 0 auto;
  text-align: center;
}

.feeling-result-main > p:not(.assessment-kicker, .feeling-concern, .feeling-result-note) {
  color: #675346;
  font-size: 18px;
  line-height: 1.8;
}

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

.feeling-dimension {
  padding: 12px;
  border: 1px solid #e2d3bd;
  border-radius: 10px;
  background: #fffaf1;
}

.feeling-dimension strong,
.feeling-dimension span {
  display: block;
}

.feeling-dimension span {
  margin-top: 4px;
  color: #866b52;
  font: 14px/1.4 var(--font-ui);
}

.feeling-concern,
.feeling-result-note {
  padding: 10px 14px;
  border-radius: 9px;
  background: #f8eedc;
  color: #755a3e;
}

.feeling-result-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.feeling-safety {
  width: min(820px, 100%);
  margin: 0 auto 24px;
  padding: 24px;
  border: 2px solid #9f4b43;
  border-radius: 16px;
  background: #fff8f4;
  color: #5f302c;
  text-align: left;
}

.feeling-safety h2 {
  margin-top: 0;
  color: #7e3832;
}

.feeling-safety p {
  font: 17px/1.8 var(--font-ui);
}

.feeling-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 54px;
  padding: 0;
  margin: 18px 0 0;
  color: #8a7b6c;
  font-family: var(--font-ui);
  list-style: none;
}

.feeling-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.feeling-steps li + li::before {
  width: 54px;
  height: 1px;
  margin-right: 0;
  background: #d7c7b0;
  content: "";
}

.feeling-steps li > span {
  width: 16px;
  height: 16px;
  border: 2px solid #d0c5b5;
  border-radius: 50%;
}

.feeling-steps .is-active {
  color: #9a6d2e;
  font-weight: 600;
}

.feeling-steps .is-active > span {
  border: 5px solid #ae8037;
}

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

  .feeling-hints {
    border-top: 1px solid #eadfce;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .feeling-shell {
    width: calc(100% - 24px);
  }

  .feeling-editor,
  .feeling-hints,
  .feeling-analysis,
  .feeling-result {
    padding: 24px 18px;
  }

  .feeling-actions,
  .feeling-result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .feeling-actions .assessment-button {
    width: 100%;
  }

  .feeling-dimensions {
    grid-template-columns: repeat(2, 1fr);
  }

  .feeling-steps {
    gap: 10px;
    font-size: 13px;
  }

  .feeling-steps li + li::before {
    width: 12px;
  }
}
