/* ---------- SHARED THOUGHT CARDS + COMPOSER ---------- */

.thoughts-feed {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 16px;
}

.thought-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--profile-radius-md);
  border: 2px solid rgba(255, 197, 228, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 197, 228, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(33, 14, 60, 0.96), rgba(10, 8, 26, 0.96));
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 24px rgba(255, 124, 190, 0.08);
}

.thought-card--placeholder {
  background:
    linear-gradient(180deg, rgba(146, 240, 255, 0.05), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.thought-feed__empty {
  padding: 24px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.thought-card__author,
.thought-card__meta {
  margin: 0;
  color: #ffd2eb;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.thought-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 197, 228, 0.16);
  padding-top: 12px;
}

.thought-card__date {
  color: rgba(255, 247, 252, 0.72);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.thought-card__title-block {
  display: grid;
  gap: 3px;
}

.thought-card__topic-kicker {
  color: #ffd2eb;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.thought-card__title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.thought-card__summary {
  margin: 0;
  color: rgba(255, 247, 252, 0.84);
  line-height: 1.7;
  border-top: 1px solid rgba(255, 197, 228, 0.16);
  padding-top: 12px;
}

.thought-card__signal-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.thought-card__reactions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  color: #ffd2eb;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
}

.thought-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.thought-card__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid rgba(255, 197, 228, 0.16);
  padding-top: 12px;
}

.thought-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(255, 197, 228, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 197, 228, 0.1), rgba(19, 10, 35, 0.9)),
    rgba(14, 10, 30, 0.94);
  color: #fff7fc;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: default;
}

button.thought-card__action {
  cursor: pointer;
}

.thought-card__action--active {
  border-color: rgba(146, 240, 255, 0.6);
  background:
    linear-gradient(180deg, rgba(146, 240, 255, 0.22), rgba(25, 16, 54, 0.94)),
    rgba(14, 10, 30, 0.96);
}

.thought-card__reaction-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(255, 197, 228, 0.16);
  padding-top: 12px;
}

.thought-card__reaction-picker--hidden {
  display: none;
}

.thought-card__share-sheet {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(255, 197, 228, 0.16);
  padding-top: 12px;
}

.thought-card__comment-sheet {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(146, 240, 255, 0.16);
  padding-top: 12px;
}

.thought-card__comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.thought-card__comment-kicker {
  margin: 0;
  color: #92f0ff;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.thought-card__comment-dismiss {
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(146, 240, 255, 0.24);
  background: rgba(14, 10, 30, 0.92);
  color: #dffbff;
  min-height: 32px;
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.thought-card__comment-thread {
  display: grid;
  gap: 10px;
}

.thought-card__comment {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(146, 240, 255, 0.18);
  background: rgba(10, 12, 28, 0.84);
}

.thought-card__comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #bfefff;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thought-card__comment-signin {
  margin: 0;
  color: rgba(191, 239, 255, 0.7);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thought-card__comment-delete {
  margin-left: auto;
  padding: 0 6px;
  border: 1px solid rgba(255, 80, 120, 0.3);
  border-radius: var(--profile-radius-xs);
  background: transparent;
  color: rgba(255, 100, 130, 0.7);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.thought-card__comment-delete:hover {
  border-color: rgba(255, 80, 120, 0.7);
  background: rgba(255, 80, 120, 0.12);
  color: #ff6488;
}

.thought-card__comment-body,
.thought-card__comment-empty {
  margin: 0;
  color: #f9f3ff;
  line-height: 1.55;
}

.thought-card__comment-form {
  display: grid;
  gap: 10px;
}

.thought-card__share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thought-card__share-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(255, 197, 228, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 197, 228, 0.12), rgba(19, 10, 35, 0.92)),
    rgba(14, 10, 30, 0.96);
  color: #fff7fc;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.thought-card__share-button--primary {
  border-color: rgba(146, 240, 255, 0.48);
}

.thought-card__share-button--danger {
  border-color: rgba(255, 100, 130, 0.46);
}

.thought-card__share-composer {
  display: grid;
  gap: 10px;
}

.thought-card__share-label {
  color: #ffd2eb;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thought-card__share-input {
  width: 100%;
  min-height: 110px;
  padding: 12px;
  border-radius: var(--profile-radius-xs);
  border: 2px solid rgba(255, 197, 228, 0.24);
  background: rgba(6, 4, 18, 0.9);
  color: #fff7fc;
  resize: vertical;
}

.thought-card__reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(146, 240, 255, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(146, 240, 255, 0.12), rgba(19, 10, 35, 0.96)),
    rgba(14, 10, 30, 0.94);
  color: #fff7fc;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.thought-card__reaction-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(146, 240, 255, 0.54);
}

.thought-card__reaction-chip--selected {
  border-color: rgba(255, 197, 228, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 197, 228, 0.34), rgba(61, 21, 74, 0.96)),
    rgba(31, 10, 40, 0.96);
}

.thought-card__reaction-glyph {
  font-size: 1rem;
  line-height: 1;
}

.thought-card__reaction-count {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.thought-card__quoted-thought {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(146, 240, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(146, 240, 255, 0.08), rgba(19, 10, 35, 0.92)),
    rgba(14, 10, 30, 0.94);
}

.thought-card__quoted-thought--sheet {
  margin-top: 4px;
}

.thought-card__quoted-kicker,
.thought-card__quoted-author,
.thought-card__quoted-date {
  margin: 0;
  color: #ffd2eb;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.thought-card__quoted-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.thought-card__quoted-title,
.thought-card__quoted-summary {
  margin: 0;
}

.thought-card__quoted-title {
  font-size: 0.94rem;
  text-transform: uppercase;
}

.thought-card__quoted-summary {
  color: rgba(255, 247, 252, 0.82);
  line-height: 1.55;
}

.thought-card__delete {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid rgba(255, 80, 120, 0.35);
  border-radius: var(--profile-radius-xs);
  background: transparent;
  color: rgba(255, 100, 130, 0.7);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.thought-card__delete:hover {
  border-color: rgba(255, 80, 120, 0.7);
  background: rgba(255, 80, 120, 0.12);
  color: #ff6488;
}

.thought-composer {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--profile-radius-md);
  border: 1px solid rgba(var(--profile-panel-element-rgb, 255, 197, 228), 0.24);
  background:
    linear-gradient(var(--profile-panel-gradient-angle, 180deg), rgba(var(--profile-panel-custom-rgb, 14, 10, 30), var(--profile-panel-custom-opacity, 0.94)), rgba(var(--profile-panel-custom-rgb-2, 19, 10, 35), var(--profile-panel-custom-opacity, 0.94))),
    linear-gradient(180deg, rgba(var(--profile-panel-element-rgb, 255, 197, 228), 0.08), rgba(0, 0, 0, 0.18)),
    rgba(14, 10, 30, 0.94);
  color: rgb(var(--profile-panel-text-rgb, 255, 247, 252));
}

.thought-composer__subject,
.thought-composer__body {
  width: 100%;
  border-radius: var(--profile-radius-xs);
  border: 2px solid rgba(var(--profile-panel-element-rgb, 255, 197, 228), 0.34);
  background:
    linear-gradient(180deg, rgba(var(--profile-panel-element-rgb, 6, 4, 18), 0.24), rgba(0, 0, 0, 0.3)),
    rgba(var(--profile-panel-element-rgb, 6, 4, 18), 0.5);
  color: rgb(var(--profile-panel-text-rgb, 255, 247, 252));
}

.thought-composer__subject {
  min-height: 46px;
  padding: 0 14px;
  font-family: var(--font-display);
  font-size: 0.96rem;
  letter-spacing: 0.06em;
  text-transform: none;
}

.thought-composer__body {
  min-height: 128px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  line-height: 1.6;
  resize: vertical;
}

.thought-composer__subject:focus-visible,
.thought-composer__body:focus-visible {
  outline: none;
  border-color: rgba(153, 255, 255, 0.74);
  box-shadow: 0 0 0 2px rgba(153, 255, 255, 0.16);
}

.thought-composer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.thought-composer__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--profile-radius-pill);
  border: 1px solid rgba(var(--profile-panel-button-rgb, 255, 197, 228), 0.42);
  background:
    linear-gradient(180deg, rgba(var(--profile-panel-button-rgb, 255, 197, 228), 0.18), rgba(var(--profile-panel-button-rgb, 255, 121, 183), 0.08)),
    rgba(14, 10, 30, 0.94);
  color: rgb(var(--profile-panel-text-rgb, 255, 247, 252));
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.thought-composer__submit:hover,
.thought-composer__submit:focus-visible {
  outline: none;
  border-color: rgba(153, 255, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(153, 255, 255, 0.16);
}

.thought-composer__flash {
  margin: 0;
  color: #99ffff;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.thought-composer__photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.thought-composer__attach-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border: 1px solid rgba(255, 197, 228, 0.3);
  border-radius: var(--profile-radius-xs);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.thought-composer__attach-label:hover {
  border-color: rgba(255, 197, 228, 0.6);
  color: #fff;
}

.thought-composer__attach-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thought-composer__photo-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: var(--profile-radius-sm);
  border: 1px solid rgba(255, 197, 228, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 197, 228, 0.08), rgba(10, 8, 26, 0.92)),
    rgba(10, 8, 26, 0.92);
}

.thought-composer__photo-preview {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.thought-composer__photo-preview-img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(255, 197, 228, 0.16);
}

.thought-composer__photo-preview-copy,
.thought-composer__photo-fields {
  display: grid;
  gap: 10px;
}

.thought-composer__photo-name,
.thought-composer__field-label,
.thought-composer__toggle-copy {
  margin: 0;
  color: #ffd2eb;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.thought-composer__photo-name {
  color: #fff7fc;
  overflow-wrap: anywhere;
}

.thought-composer__photo-clear {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(255, 197, 228, 0.22);
  background: rgba(14, 10, 30, 0.86);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.thought-composer__field {
  display: grid;
  gap: 6px;
}

.thought-composer__field-input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(255, 197, 228, 0.22);
  background: rgba(6, 4, 18, 0.9);
  color: #fff7fc;
  font-size: 0.9rem;
}

.thought-composer__field-input--textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.thought-composer__field-input:focus-visible,
.thought-composer__photo-clear:hover,
.thought-composer__photo-clear:focus-visible {
  outline: none;
  border-color: rgba(153, 255, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(153, 255, 255, 0.16);
}

.thought-composer__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--profile-radius-xs);
  border: 1px solid rgba(255, 197, 228, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.thought-composer__toggle input {
  margin: 0;
}

.thought-card__image {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--profile-radius-xs);
  margin-bottom: 10px;
  cursor: pointer;
}

.thought-card__image:hover {
  opacity: 0.88;
  transition: opacity 120ms ease;
}

.friend-code-card {
  display: grid;
  gap: 14px;
}

.friend-code-card__label,
.friend-code-form__label {
  margin: 0;
  color: rgba(255, 197, 228, 0.72);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.friend-code-card__value {
  margin: 0;
  color: #fff7fc;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  letter-spacing: 0.16em;
}

.friend-code-card__helper,
.friend-code-form__flash {
  margin: 0;
  color: rgba(232, 225, 255, 0.84);
  font-size: 0.86rem;
  line-height: 1.6;
}

.friend-code-form {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.friend-code-form__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.friend-code-form__input {
  flex: 1 1 180px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--profile-radius-xs);
  border: 2px solid rgba(255, 197, 228, 0.22);
  background: rgba(6, 4, 18, 0.9);
  color: #fff7fc;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.friend-code-form__input:focus-visible {
  outline: none;
  border-color: rgba(153, 255, 255, 0.74);
  box-shadow: 0 0 0 2px rgba(153, 255, 255, 0.16);
}

.friend-code-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--profile-radius-pill);
  border: 1px solid rgba(255, 197, 228, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 197, 228, 0.16), rgba(255, 121, 183, 0.12)),
    rgba(14, 10, 30, 0.94);
  color: #fff7fc;
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.friend-code-form__submit:hover,
.friend-code-form__submit:focus-visible {
  outline: none;
  border-color: rgba(153, 255, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(153, 255, 255, 0.16);
}

@media (max-width: 640px) {
  .thought-composer__photo-preview {
    grid-template-columns: minmax(0, 1fr);
  }

  .thought-composer__actions {
    align-items: stretch;
  }
}
