/* Texting Simulator — scoped to this panel. */
.tx-panel.block {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  color: #f4efe8;
  background: #3c1224;
  border: 1px solid rgba(224, 122, 106, 0.38);
  box-shadow: 0 18px 40px rgba(42, 8, 18, 0.18);
}

.tx-panel.block.is-chat {
  max-width: 480px;
}

.tx-panel.block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028),
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.5;
}

#txApp {
  position: relative;
  z-index: 1;
}

.tx-head {
  margin-bottom: 1.1rem;
}

.tx-title {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 400;
  line-height: 1.05;
  color: #f7f2eb;
}

.tx-title-end {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.tx-sub,
.tx-band,
.tx-block p,
.tx-prompt,
.tx-disclaimer,
.tx-match,
.tx-card p,
.tx-now,
.tx-wait,
.tx-note,
.tx-why,
.tx-ru {
  font-family: "Manrope", sans-serif;
  line-height: 1.45;
}

.tx-sub {
  margin: 0.4rem 0 0;
  max-width: 38rem;
  font-size: 1.05rem;
  color: #f0e4da;
}

.tx-scenarios {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.tx-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: 0;
  padding: 1rem 1rem 0.95rem;
  border-radius: 16px;
  background: #2a0d18;
  border: 1px solid rgba(244, 239, 232, 0.08);
}

.tx-card-level {
  margin: 0 0 0.35rem;
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e7a99c;
}

.tx-card h3,
.tx-block h3,
.tx-free h3,
.tx-free h4 {
  margin: 0 0 0.4rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  color: #f7f2eb;
}

.tx-card h3 {
  font-size: 1.55rem;
}

.tx-card p {
  margin: 0 0 1rem;
  color: #f3e7df;
  flex: 1 1 auto;
}

.tx-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tx-now {
  margin: 0;
  color: #f0e4da;
  text-align: right;
}

.tx-hud {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin-bottom: 0.8rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: #2a0d18;
}

.tx-count,
.tx-rapport {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
  color: #f4efe8;
}

.tx-rapport {
  justify-self: end;
}

.tx-rapport strong {
  font-weight: 700;
  color: #f0b2a6;
}

.tx-bar,
.tx-meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(244, 239, 232, 0.16);
  overflow: hidden;
}

.tx-bar > span,
.tx-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #e07a6a;
}

.tx-phone {
  border-radius: 18px;
  background: #2a0d18;
  border: 1px solid rgba(224, 122, 106, 0.28);
  overflow: hidden;
}

.tx-contact {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  background: #4a1730;
}

.tx-avatar {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #9d3a48;
  color: #fff8f4;
  font-family: "Manrope", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tx-contact-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tx-contact-copy strong {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #f7f2eb;
}

.tx-contact-copy em {
  font-style: normal;
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  color: #f0b2a6;
}

.tx-contact-copy em::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: #e07a6a;
  vertical-align: 0.05rem;
}

.tx-log {
  list-style: none;
  margin: 0;
  padding: 0.85rem 0.75rem 0.4rem;
  max-height: min(52vh, 28rem);
  overflow-y: auto;
  overflow-x: hidden;
}

.tx-bubble {
  display: flex;
  flex-direction: column;
  max-width: min(85%, 22rem);
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.7rem 0.4rem;
  border-radius: 16px;
}

.tx-bubble.is-them {
  margin-right: auto;
  background: #f6efe8;
  color: #3c1224;
  border-bottom-left-radius: 5px;
}

.tx-bubble.is-you {
  margin-left: auto;
  background: #9d3a48;
  color: #fff8f4;
  border-bottom-right-radius: 5px;
}

.tx-who {
  font-family: "Manrope", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}

.tx-bubble p {
  margin: 0.12rem 0 0.2rem;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.tx-bubble time {
  align-self: flex-end;
  font-family: "Manrope", sans-serif;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.tx-typing {
  display: flex;
  gap: 0.28rem;
  width: fit-content;
  margin: 0 0 0.55rem;
  padding: 0.7rem 0.75rem;
  border-radius: 16px;
  background: #f6efe8;
}

.tx-typing span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #9d3a48;
  animation: tx-dot 1s infinite ease-in-out;
}

.tx-typing span:nth-child(2) { animation-delay: 0.15s; }
.tx-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes tx-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.tx-dock {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(244, 239, 232, 0.08);
}

.tx-choices {
  display: grid;
  gap: 0.45rem;
}

.tx-choice,
.tx-go,
.tx-ghost,
.tx-textbtn {
  font-family: "Manrope", sans-serif;
}

.tx-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.75rem;
  text-align: left;
  color: #f7f2eb;
  background: #4c1830;
  border: 1px solid rgba(240, 178, 166, 0.35);
  border-radius: 14px;
  cursor: pointer;
}

.tx-choice span:last-child {
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.tx-letter {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f0b2a6;
}

.tx-choice:hover,
.tx-go:hover,
.tx-ghost:hover,
.tx-textbtn:hover {
  border-color: #f0b2a6;
}

.tx-go,
.tx-ghost,
.tx-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.tx-go {
  width: 100%;
  color: #2a0d18;
  background: #e7c7be;
  border: 1px solid #e7c7be;
  font-weight: 700;
}

.tx-card .tx-go {
  margin-top: auto;
}

.tx-ghost,
.tx-link {
  color: #f7f2eb;
  background: transparent;
  border: 1px solid rgba(240, 178, 166, 0.55);
}

.tx-textbtn {
  padding: 0.2rem 0;
  color: #f0b2a6;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
  cursor: pointer;
}

.tx-feedback {
  display: grid;
  gap: 0.45rem;
}

.tx-tone {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  color: #f0b2a6;
}

.tx-note,
.tx-why,
.tx-ru,
.tx-wait {
  margin: 0;
  color: #f6efe8;
}

.tx-expr {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(246, 239, 232, 0.08);
  font-family: "Manrope", sans-serif;
  color: #f7f2eb;
}

.tx-expr span {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e7a99c;
}

.tx-fold {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.tx-actions {
  display: grid;
  gap: 0.5rem;
  margin: 0.4rem 0 1.2rem;
}

.tx-block,
.tx-free {
  margin-top: 1rem;
  padding-top: 0.2rem;
}

.tx-lines {
  margin: 0;
  padding-left: 1.1rem;
  font-family: "Manrope", sans-serif;
  color: #f6efe8;
}

.tx-lines li {
  margin: 0.35rem 0;
}

.tx-lines strong {
  font-weight: 700;
}

.tx-free h3 span {
  margin-left: 0.35rem;
  font-family: "Manrope", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e7a99c;
}

.tx-free textarea {
  display: block;
  width: 100%;
  margin: 0.55rem 0;
  padding: 0.75rem;
  box-sizing: border-box;
  resize: vertical;
  min-height: 5.5rem;
  border-radius: 14px;
  border: 1px solid rgba(240, 178, 166, 0.45);
  background: #f6efe8;
  color: #3c1224;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  scroll-margin: 30vh;
}

.tx-free .tx-ghost {
  width: 100%;
}

.tx-disclaimer,
.tx-match {
  color: #f0e4da;
}

.tx-choice:focus-visible,
.tx-go:focus-visible,
.tx-ghost:focus-visible,
.tx-textbtn:focus-visible,
.tx-link:focus-visible,
.tx-free textarea:focus-visible {
  outline: 2px solid #f0b2a6;
  outline-offset: 2px;
}

.tx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tx-empty {
  margin: 0;
  font-family: "Manrope", sans-serif;
}

@media (min-width: 800px) {
  .tx-scenarios {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tx-log {
    max-height: min(46vh, 24rem);
  }

  .tx-actions .tx-go,
  .tx-actions .tx-ghost,
  .tx-actions .tx-link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tx-typing span {
    animation: none;
    opacity: 0.8;
  }

  .tx-choice,
  .tx-go,
  .tx-ghost,
  .tx-log {
    scroll-behavior: auto;
    transition: none;
  }
}
