.jtx-footprints,
.jtx-footprints * {
  box-sizing: border-box;
}

.jtx-footprints-page {
  max-width: 780px;
  margin: 1.5rem auto 3rem;
}

.jtx-footprints {
  overflow: hidden;
  border: 1px solid #eadbdd;
  border-radius: 18px;
  background: #f5f3ee;
  box-shadow: 0 14px 36px rgba(49, 35, 25, 0.08);
}

.jtx-footprints__intro {
  padding: 1.25rem 1.25rem 1rem;
  background: #fff;
}

.jtx-footprints__intro > p,
.jtx-footprints-invite__eyebrow {
  margin: 0 0 0.2rem;
  color: #bc2029;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.jtx-footprints__intro h2 {
  margin: 0 0 0.45rem;
  color: #2d2723;
  font-size: 1.45rem;
}

.jtx-footprints__intro span {
  color: #625954;
  font-size: 0.9rem;
  line-height: 1.7;
}

.jtx-footprints__status {
  margin: 0;
  padding: 0.7rem 1rem;
  background: #fff8f8;
  color: #655b56;
  font-size: 0.82rem;
  text-align: center;
}

.jtx-footprints__status.is-error {
  background: #fff0f0;
  color: #a31821;
  font-weight: 700;
}

.jtx-footprints__more {
  display: block;
  margin: 0.75rem auto 0;
  padding: 0.45rem 0.85rem;
  border: 1px solid #d9c4c6;
  border-radius: 999px;
  background: #fff;
  color: #9f1821;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.jtx-footprints__messages {
  display: flex;
  min-height: 180px;
  max-height: 430px;
  overflow-y: auto;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  scroll-behavior: smooth;
}

.jtx-footprint {
  display: flex;
  max-width: 88%;
  align-items: flex-start;
  gap: 0.55rem;
}

.jtx-footprint.is-owned {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.jtx-footprint__avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(48, 34, 24, 0.13);
  object-fit: cover;
}

.jtx-footprint__body {
  min-width: 0;
}

.jtx-footprint__meta {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0 0 0.2rem 0.25rem;
  color: #786e68;
  font-size: 0.68rem;
}

.jtx-footprint.is-owned .jtx-footprint__meta {
  justify-content: flex-end;
  margin-right: 0.25rem;
}

.jtx-footprint__meta strong {
  color: #514943;
  font-size: 0.72rem;
}

.jtx-footprint__bubble {
  position: relative;
  padding: 0.65rem 0.8rem;
  border-radius: 5px 15px 15px 15px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(45, 37, 31, 0.08);
}

.jtx-footprint.is-owned .jtx-footprint__bubble {
  border-radius: 15px 5px 15px 15px;
  background: #e3f5d9;
}

.jtx-footprint__bubble p {
  margin: 0;
  color: #2f2a27;
  font-size: 0.9rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.jtx-footprint__post-link {
  display: block;
  overflow: hidden;
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(159, 24, 33, 0.15);
  color: #a11b24;
  font-size: 0.7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jtx-footprint__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.jtx-footprint__actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #776c66;
  cursor: pointer;
  font-size: 0.68rem;
  text-decoration: underline;
}

.jtx-footprints__form {
  position: relative;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid #e3d7d0;
  background: rgba(255, 255, 255, 0.98);
}

.jtx-footprints__avatars {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  padding: 0;
  border: 0;
}

.jtx-footprints__avatars legend {
  float: left;
  margin-right: 0.25rem;
  color: #625954;
  font-size: 0.75rem;
  font-weight: 700;
}

.jtx-footprints__avatars label {
  position: relative;
  cursor: pointer;
}

.jtx-footprints__avatars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.jtx-footprints__avatars span {
  display: block;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 50%;
  background: #fff;
  transition: border-color 150ms ease, transform 150ms ease;
}

.jtx-footprints__avatars img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jtx-footprints__avatars input:checked + span {
  border-color: #c9232d;
  box-shadow: 0 0 0 2px #f2cfd2;
  transform: translateY(-2px);
}

.jtx-footprints__avatars input:focus-visible + span {
  outline: 3px solid #1473e6;
  outline-offset: 3px;
}

.jtx-footprints__message-field textarea {
  display: block;
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d9ceca;
  border-radius: 12px;
  background: #fff;
  color: #292421;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
}

.jtx-footprints__message-field textarea:focus {
  border-color: #c9232d;
  outline: 3px solid rgba(201, 35, 45, 0.12);
}

.jtx-footprints__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.jtx-footprints__form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.jtx-footprints__form-actions small {
  margin-right: auto;
  color: #817772;
  font-size: 0.7rem;
}

.jtx-footprints__form-actions button {
  min-height: 38px;
  padding: 0.45rem 0.9rem;
  border: 1px solid #d8c4c6;
  border-radius: 999px;
  background: #fff;
  color: #8c2027;
  cursor: pointer;
  font-weight: 700;
}

.jtx-footprints__form-actions button[type="submit"] {
  border-color: #bd1f28;
  background: #c9232d;
  color: #fff;
}

.jtx-footprints__form-actions button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.jtx-footprints__privacy {
  margin: 0.55rem 0 0;
  color: #776e68;
  font-size: 0.68rem;
  line-height: 1.55;
}

.jtx-footprints-invite {
  margin: 2.25rem 0;
  padding: 1.25rem;
  border: 1px solid #ead5d7;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #fff7f7 100%);
  text-align: center;
}

.jtx-footprints-invite h2 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
}

.jtx-footprints-invite > p:not(.jtx-footprints-invite__eyebrow) {
  margin: 0 auto 0.9rem;
  color: #625954;
  font-size: 0.88rem;
  line-height: 1.7;
}

.jtx-footprints-invite button {
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border: 1px solid #c9232d;
  border-radius: 999px;
  background: #c9232d;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.jtx-footprints-modal[hidden] {
  display: none !important;
}

.jtx-footprints-modal {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.jtx-footprints-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(25, 20, 18, 0.55);
  cursor: pointer;
}

.jtx-footprints-modal__sheet {
  position: relative;
  width: min(100%, 680px);
  max-height: min(88dvh, 820px);
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -18px 50px rgba(20, 15, 13, 0.25);
  animation: jtx-footprints-sheet-in 260ms ease-out both;
}

.jtx-footprints-modal__header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eadfe0;
  background: #fff;
}

.jtx-footprints-modal__header small {
  color: #bd1f28;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.jtx-footprints-modal__header h2 {
  margin: 0.05rem 0 0;
  font-size: 1.2rem;
}

.jtx-footprints-modal__header > button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4eeee;
  color: #493f3b;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.jtx-footprints-modal .jtx-footprints {
  max-height: calc(min(88dvh, 820px) - 68px);
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.jtx-footprints-modal-open {
  overflow: hidden;
}

@keyframes jtx-footprints-sheet-in {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jtx-footprint-rise {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.jtx-footprint.is-new {
  animation: jtx-footprint-rise 360ms ease-out both;
}

@media (min-width: 768px) {
  .jtx-footprints-modal {
    align-items: center;
    padding: 2rem;
  }

  .jtx-footprints-modal__sheet {
    border-radius: 22px;
  }
}

@media (max-width: 767px) {
  .jtx-footprints-modal__sheet {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .jtx-footprints__messages {
    max-height: 42dvh;
    padding: 0.85rem;
  }

  .jtx-footprint {
    max-width: 94%;
  }

  .jtx-footprints__form {
    padding: 0.75rem 0.85rem 0.85rem;
  }

  .jtx-footprints__avatars legend {
    width: 100%;
    margin-bottom: 0.35rem;
  }

  .jtx-footprints__avatars {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jtx-footprints-modal__sheet,
  .jtx-footprint.is-new,
  .jtx-footprints__avatars span {
    animation: none;
    transition: none;
  }
}
