.situation-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 8px 18px rgba(58, 48, 38, 0.07);
  overflow: hidden;
}

.situation-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 54px;
  height: 15px;
  border: 1px solid rgba(216, 199, 173, 0.76);
  border-radius: 4px;
  background: rgba(248, 230, 192, 0.58);
  transform: translateX(-50%) rotate(1deg);
}

.situation-card::after {
  content: "⌁";
  position: absolute;
  right: 18px;
  top: 18px;
  color: rgba(143, 118, 88, 0.34);
  font-size: 20px;
  line-height: 1;
  transform: rotate(8deg);
  pointer-events: none;
}

.situation-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
}

.situation-head span {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--point-green);
  background: var(--paper-soft);
  font-family: var(--font-soft);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
}

.situation-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-soft);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.45;
  word-break: keep-all;
}

.situation-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.situation-grid button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 3px 9px rgba(58, 48, 38, 0.04);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  word-break: keep-all;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.situation-grid button::before {
  content: "";
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--situation-color, var(--point-green));
  border-radius: 999px;
  background: color-mix(in srgb, var(--situation-color, var(--point-green)) 12%, #fffdf8);
}

.situation-grid button:hover {
  border-color: rgba(143, 118, 88, 0.66);
  background: #fffdf8;
  transform: translateY(-1px);
}

.situation-grid button:active {
  box-shadow: var(--press-shadow);
  transform: translateY(1px) rotate(-0.2deg);
}

.situation-grid button.button-press {
  animation: paperPress 190ms ease both;
}

.situation-grid button.selected {
  color: #2f3529;
  border-color: var(--situation-color, var(--point-green));
  background: var(--situation-soft, #eef1e6);
  box-shadow: inset 0 0 0 1px rgba(126, 139, 107, 0.16), 0 4px 10px rgba(58, 48, 38, 0.05);
}

.situation-grid button.selected::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 8px;
  width: 24px;
  height: 8px;
  border-bottom: 1.5px solid color-mix(in srgb, var(--situation-color, var(--point-green)) 55%, #8f7658);
  border-radius: 50%;
  opacity: 0.58;
  transform: rotate(-7deg);
  pointer-events: none;
}

.message-card .message-top {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.message-card .message-mood {
  justify-content: flex-start;
  max-width: 100%;
  height: auto;
  min-height: 31px;
  white-space: normal;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.message-card #messageText {
  margin: 18px 0 22px;
  font-family: var(--font-soft);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.76;
  letter-spacing: 0;
  white-space: pre-line;
}

.message-card .message-scene {
  margin-top: 15px;
}

@media (max-width: 360px) {
  .situation-card {
    padding: 16px;
  }

  .message-card .message-mood {
    font-size: 11px;
    line-height: 1.45;
  }

  .message-card .message-scene {
    margin-top: 14px;
  }

  .message-card #messageText {
    margin: 17px 0 21px;
    font-size: 18px;
    line-height: 1.72;
  }
}
