.tx-entry {
  --tx-ink: var(--ink);
  --tx-muted: var(--mid);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 16px;
  color: var(--tx-ink);
  min-width: 0;
}
.tx-entry.tx-mine {
  align-items: flex-end;
}
.tx-bubble {
  max-width: min(89%, 42rem);
  min-width: 0;
  padding: 10px 13px;
  background: var(--bg);
  border-radius: 16px 16px 16px 5px;
}
.tx-mine .tx-bubble {
  background: var(--wash);
  border-radius: 16px 16px 5px 16px;
}
.tx-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.tx-entry pre,
.tx-entry code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
}
.tx-entry code {
  background: var(--soft);
  border-radius: 4px;
  padding: 1px 3px;
}
.tx-entry pre {
  margin: 5px 0;
  padding: 9px;
  background: var(--surface);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tx-time,
.tx-sender,
.tx-attachment small {
  font-size: 12px;
  color: var(--tx-muted);
}
.tx-time {
  padding-inline: 4px;
  font-variant-numeric: tabular-nums;
}
.tx-sender {
  display: flex;
  align-items: center;
  gap: 5px;
}
.tx-notice {
  margin: 10px 0;
  text-align: center;
  color: var(--mid);
  font-size: 13px;
  white-space: pre-wrap;
}
.tx-entry a {
  color: var(--blue);
  overflow-wrap: anywhere;
}
.tx-card {
  min-width: min(55vw, 15rem);
  max-width: 32rem;
}
.tx-card-title {
  display: block;
  line-height: 1.5;
  font-size: 15px;
}
.tx-card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 6px 0;
}
.tx-domain {
  color: var(--mid);
  font-size: 13px;
}
.tx-resolved,
.tx-detail,
.tx-options small {
  font-size: 13px;
  line-height: 1.5;
}
.tx-resolved {
  display: block;
  color: var(--mid);
  margin-top: 6px;
}
.tx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tx-choice,
.tx-file {
  min-height: 40px;
  margin: 4px 4px 0 0;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--blue);
  background: var(--surface);
  border: 1px solid var(--line);
  font: inherit;
  font-size: 14px;
}
.tx-choice:disabled,
.tx-file:disabled {
  opacity: 0.65;
}
.tx-attachment {
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.tx-attachment img {
  display: block;
  max-width: min(100%, 30rem);
  height: auto;
  border-radius: 10px;
}
.tx-attachment small {
  display: block;
}
.tx-field {
  display: grid;
  gap: 5px;
  margin: 9px 0;
  font-size: 14px;
}
.tx-field input:not([type='checkbox']),
.tx-field textarea,
.tx-field select,
.tx-options textarea {
  box-sizing: border-box;
  min-height: 42px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.tx-options {
  border: 0;
  padding: 0;
  margin: 8px 0;
}
.tx-options legend {
  margin-bottom: 6px;
}
.tx-options label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 3px;
  align-items: baseline;
}
.tx-options small {
  flex-basis: 100%;
  padding-inline-start: 25px;
  color: var(--tx-muted);
}
.tx-field input[type='checkbox'],
.tx-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.tx-sheet {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  width: min(92vw, 32rem);
  max-height: min(82dvh, 48rem);
  min-width: 0;
  padding: 0;
  overflow: auto;
}
.tx-sheet::backdrop {
  background: rgb(0 0 0 / 34%);
}
.tx-sheet > header {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.tx-sheet h2 {
  font-size: 18px;
  margin: 0;
}
.tx-sheet-body {
  padding: 12px 16px 20px;
}
.tx-sheet-body p {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.tx-sheet-body audio,
.tx-sheet-body input[type='range'] {
  width: 100%;
}
.tx-sheet-body details {
  margin-top: 12px;
}
.tx-sheet-body summary {
  cursor: pointer;
  min-height: 44px;
  padding-block: 10px;
}
.tx-player-controls,
.tx-message-actions,
.tx-reactions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.tx-message-actions .tx-choice {
  min-height: 26px;
  padding: 2px 8px;
  border-color: transparent;
  font-size: 12px;
  color: var(--mid);
}
.tx-message-actions button[aria-pressed='true'],
.tx-reactions button[aria-pressed='true'] {
  background: var(--wash);
  color: var(--blue);
}
.tx-thread-form {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  padding-block: 6px;
  background: var(--surface);
}
.tx-thread-form textarea {
  flex: 1;
  min-width: 0;
  resize: vertical;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 9px;
  padding: 8px;
}
.tx-photos {
  display: grid;
  gap: 3px;
  overflow: hidden;
  border-radius: 11px;
  width: min(58vw, 22rem);
}
.tx-photos-multiple {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tx-photo-tile {
  display: grid;
  place-items: center;
  position: relative;
  padding: 0;
  color: var(--ink);
  background: var(--soft);
  min-width: 0;
}
.tx-photo-tile img {
  width: 100%;
  height: auto;
  max-height: 18rem;
  min-height: 60px;
  object-fit: contain;
}
.tx-photos-multiple img {
  height: 100%;
  min-height: 0;
  aspect-ratio: 1;
  object-fit: cover;
}
.tx-photo-tile span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: #0007;
  font-weight: 650;
  font-size: 1.4rem;
}
.tx-photo-sheet {
  width: min(97vw, 55rem);
  max-height: 90dvh;
}
.tx-photo-stage {
  display: grid;
  place-items: center;
  min-height: 10rem;
  overflow: hidden;
}
.tx-photo-stage img:not([src]) {
  display: none;
}
.tx-photo-stage img {
  display: block;
  width: 100%;
  max-height: 55dvh;
  object-fit: contain;
}
.tx-photo-stage p:empty {
  display: none;
}
.tx-photo-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.tx-photo-actions a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
