/* QTube Community Posts — mobile-first, existing visual language */

.cpost-body {
  overflow-x: hidden;
}

.cpost-shell {
  width: min(48rem, calc(100% - 1.5rem));
  margin: 1rem auto 2.5rem;
  display: grid;
  gap: 0.85rem;
}

.cpost-shell--index {
  gap: 0.55rem;
}

.cpost-shell--index .cpost-hero {
  gap: 0.28rem;
}

.cpost-shell--index .cpost-hero__actions {
  margin-top: 0.15rem;
}

.cpost-crumb {
  font-size: 0.82rem;
  color: var(--qtube-muted, #9aa3ad);
  overflow-wrap: anywhere;
}

.cpost-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--qtube-muted, #9aa3ad);
}

.cpost-kicker .token-logo-box {
  width: 1.35rem;
  height: 1.35rem;
}

.cpost-kicker__label {
  overflow-wrap: anywhere;
}

.cpost-hero,
.cpost-detail__header {
  display: grid;
  gap: 0.4rem;
}

.cpost-hero h1,
.cpost-detail__header h1 {
  margin: 0;
  overflow-wrap: anywhere;
}

.cpost-hero-post__title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cpost-hero-post {
  position: relative;
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.05rem 0.9rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--qtube-border, rgba(255, 255, 255, 0.12)) 80%, transparent);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--qtube-surface, #141414) 92%, #000);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.cpost-hero-post::before {
  content: "";
  position: absolute;
  inset: 0.55rem auto 0.55rem 0;
  width: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--qtube-color-red, #c1121f) 72%, transparent);
}

.cpost-lede,
.cpost-hold-hint,
.cpost-empty,
.cpost-compose__help {
  margin: 0;
  color: var(--qtube-muted, #9aa3ad);
}

.cpost-callout,
.cpost-empty--compact {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--qtube-border, rgba(255, 255, 255, 0.12)) 70%, transparent);
  background: rgba(255, 255, 255, 0.03);
  color: var(--qtube-muted, #9aa3ad);
  font-size: 0.9rem;
}

.cpost-hero__actions,
.cpost-actions,
.cpost-compose__actions,
.cpost-composer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
}

.cpost-actions {
  margin-top: 0.35rem;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.cpost-actions__primary,
.cpost-actions__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.15rem;
  align-items: center;
}

.cpost-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  margin: 0;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--qtube-muted, #9aa3ad);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}

.cpost-action:hover,
.cpost-reply[open] > summary.cpost-action {
  color: var(--qtube-text, #f4f4f5);
  background: rgba(255, 255, 255, 0.05);
}

.cpost-action--tip {
  color: color-mix(in srgb, var(--qtube-color-gold, #c9a227) 85%, #fff);
}

.cpost-action--danger {
  color: color-mix(in srgb, var(--qtube-color-red, #c1121f) 55%, #fda4af);
  font-weight: 500;
}

.cpost-action--quiet {
  font-weight: 500;
  color: color-mix(in srgb, var(--qtube-muted, #9aa3ad) 88%, transparent);
}

.cpost-action:focus-visible,
.cpost-vote__btn:focus-visible,
.cpost-reply > summary:focus-visible,
.cpost-mod > summary:focus-visible,
.cpost-edit > summary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--qtube-color-blue, #3d7ea6) 75%, #fff);
  outline-offset: 2px;
}

.cpost-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  width: fit-content;
  margin: 0.1rem 0 0.15rem;
  padding: 0.18rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.cpost-sort__link {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  border-radius: 999px;
  color: var(--qtube-muted, #9aa3ad);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.cpost-sort__link:hover {
  color: var(--qtube-text, #f4f4f5);
}

.cpost-sort__link.is-active {
  color: var(--qtube-text, #f4f4f5);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.cpost-list,
.cpost-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.cpost-list {
  gap: 0.65rem;
}

.cpost-card,
.cpost-comment {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.035);
}

.cpost-comment__body {
  min-width: 0;
}

.cpost-card {
  min-height: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.055) 0%,
      rgba(255, 255, 255, 0.02) 100%
    );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cpost-card > .cpost-vote {
  align-self: start;
  position: relative;
  z-index: 1;
}

.cpost-card:hover,
.cpost-card:focus-within {
  border-color: color-mix(in srgb, var(--qtube-color-blue, #3d7ea6) 42%, rgba(255, 255, 255, 0.18));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.cpost-card:has(.cpost-card__link:focus-visible) {
  outline: 2px solid color-mix(in srgb, var(--qtube-color-blue, #3d7ea6) 75%, #fff);
  outline-offset: 2px;
}

.cpost-card__body {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 0.18rem;
  align-content: start;
}

.cpost-card__title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cpost-card__link {
  color: inherit;
  text-decoration: none;
}

.cpost-card__link:hover {
  text-decoration: underline;
}

.cpost-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cpost-card__link:focus {
  outline: none;
}

.cpost-card__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  min-width: 0;
  font-size: 0.8rem;
  color: var(--qtube-muted, #9aa3ad);
}

.cpost-card__byline .cpost-author {
  display: contents;
}

.cpost-card__byline .cpost-author__avatar {
  width: 1.25rem;
  height: 1.25rem;
}

.cpost-card__byline .cpost-author__name,
.cpost-card__replies,
.cpost-card__locked {
  position: relative;
  z-index: 1;
}

.cpost-card__replies {
  overflow-wrap: anywhere;
}

.cpost-card__locked {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.35rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--qtube-muted, #9aa3ad);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cpost-card__excerpt {
  margin: 0.12rem 0 0;
  color: color-mix(in srgb, var(--qtube-muted, #9aa3ad) 82%, #fff);
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.cpost-card__meta {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--qtube-muted, #9aa3ad);
  overflow-wrap: anywhere;
}

.cpost-empty-state {
  display: grid;
  justify-items: start;
  gap: 0.7rem;
  margin: 0.15rem 0 0;
  padding: 0.9rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.cpost-empty-state .cpost-empty {
  margin: 0;
  font-size: 0.95rem;
}

.cpost-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
  min-width: 0;
  margin: 0 0 0.45rem;
}

.cpost-author--compact {
  margin-bottom: 0.3rem;
}

.cpost-author__avatar {
  width: 1.45rem;
  height: 1.45rem;
}

.cpost-author__name {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 600;
  color: var(--qtube-text, #f4f4f5);
  text-decoration: none;
}

.cpost-author__name:hover {
  text-decoration: underline;
}

.cpost-author__sep,
.cpost-author__time,
.cpost-author__edited {
  color: var(--qtube-muted, #9aa3ad);
  font-size: 0.8rem;
  font-weight: 400;
}

.cpost-starter-label,
.profile-starter-label {
  color: var(--qtube-muted, #9aa3ad);
  font-size: 0.72rem;
  font-weight: 500;
}

.cpost-op {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.32rem;
  border-radius: 0.3rem;
  border: 1px solid color-mix(in srgb, var(--qtube-color-red, #c1121f) 45%, transparent);
  color: color-mix(in srgb, var(--qtube-color-red, #c1121f) 70%, #fff);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cpost-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 2.75rem;
  flex: 0 0 2.75rem;
  gap: 0.05rem;
  padding: 0.15rem 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.cpost-vote--spacer {
  min-height: 1px;
  background: transparent;
  border: 0;
}

.cpost-vote__btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 0.45rem;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1;
  appearance: none;
}

.cpost-vote__btn:hover:not(:disabled):not(.is-static) {
  background: rgba(255, 255, 255, 0.07);
}

.cpost-vote__btn.is-static {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.cpost-vote__btn.is-active {
  color: #7dd3fc;
}

.cpost-vote__btn.is-down.is-active {
  color: #fda4af;
}

.cpost-vote__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cpost-vote__score {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-height: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1;
}

.cpost-prose {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
}

.cpost-prose p,
.cpost-prose ul,
.cpost-prose ol,
.cpost-prose blockquote,
.cpost-prose pre {
  margin: 0 0 0.7rem;
}

.cpost-prose p:last-child,
.cpost-prose ul:last-child,
.cpost-prose ol:last-child,
.cpost-prose blockquote:last-child,
.cpost-prose pre:last-child {
  margin-bottom: 0;
}

.cpost-prose pre,
.cpost-prose code {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.cpost-prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.28);
}

.cpost-prose blockquote {
  padding-left: 0.75rem;
  border-left: 3px solid color-mix(in srgb, var(--qtube-color-gold, #c9a227) 55%, transparent);
  color: var(--qtube-muted, #9aa3ad);
}

.cpost-prose a {
  overflow-wrap: anywhere;
}

.cpost-detail__layout {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.cpost-comments {
  display: grid;
  gap: 0.7rem;
}

.cpost-comments__heading {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0.15rem 0 0;
  font-size: 1rem;
  font-weight: 650;
}

.cpost-comments__count {
  color: var(--qtube-muted, #9aa3ad);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cpost-composer {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

.cpost-composer__avatar {
  margin-top: 0.2rem;
}

.cpost-composer .cpost-comment-form textarea {
  min-height: 2.4rem;
  height: 2.4rem;
  resize: none;
  padding: 0.5rem 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.cpost-composer .cpost-composer__actions {
  display: none;
}

.cpost-composer:focus-within .cpost-comment-form textarea,
.cpost-composer.is-open .cpost-comment-form textarea {
  min-height: 5.5rem;
  height: auto;
  resize: vertical;
}

.cpost-composer:focus-within .cpost-composer__actions,
.cpost-composer.is-open .cpost-composer__actions {
  display: flex;
}

.cpost-thread-replies {
  list-style: none;
  margin: 0 0 0 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.cpost-reply-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.85rem;
  display: grid;
  gap: 0.4rem;
  border-left: 2px solid color-mix(in srgb, var(--qtube-color-gold, #d4a017) 45%, rgba(255, 255, 255, 0.12));
}

.cpost-comment--reply {
  padding: 0.5rem 0.65rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.cpost-reply-to {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  color: var(--qtube-muted, #9aa3ad);
}

.cpost-reply-to a {
  color: inherit;
}

.cpost-tip {
  font-weight: 700;
}

.cpost-comment-form,
.cpost-compose,
.cpost-edit form,
.cpost-edit__form {
  display: grid;
  gap: 0.5rem;
}

.cpost-shell--compose .cpost-compose {
  gap: 0.85rem;
}

.cpost-comment-form textarea,
.cpost-compose input,
.cpost-compose textarea,
.cpost-edit textarea,
.cpost-mod input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  color: inherit;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.6rem;
  padding: 0.55rem 0.65rem;
}

.cpost-reply > summary,
.cpost-mod > summary,
.cpost-edit > summary {
  list-style: none;
  cursor: pointer;
}

.cpost-reply > summary::-webkit-details-marker,
.cpost-mod > summary::-webkit-details-marker,
.cpost-edit > summary::-webkit-details-marker {
  display: none;
}

.cpost-reply__form,
.cpost-edit__form,
.cpost-mod__form {
  margin-top: 0.4rem;
}

.cpost-reply[open] {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.cpost-reply[open] .cpost-reply__form {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
}

.cpost-reply[open] textarea {
  width: 100%;
  max-width: 100%;
  min-height: 5.5rem;
  box-sizing: border-box;
}

.cpost-inline-form {
  display: inline;
}

.cpost-mod {
  position: relative;
}

.cpost-mod__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.cpost-mod-banner,
.cpost-deleted {
  margin: 0 0 0.5rem;
  color: var(--qtube-muted, #9aa3ad);
}

.cpost-comment.is-hidden {
  opacity: 0.75;
}

.cpost-shell--compose {
  width: min(64rem, calc(100% - 1.5rem));
  --hub-accent: var(--qtube-color-gold, #d4a017);
}

.cpost-shell--compose[data-chain="ethereum"] {
  --hub-accent: var(--qtube-color-gold, #d4a017);
}

.cpost-shell--compose[data-chain="solana"] {
  --hub-accent: var(--qtube-color-purple, #7c5cbf);
}

.cpost-shell--compose[data-chain="ton"] {
  --hub-accent: var(--qtube-color-blue, #4c8dff);
}

.cpost-shell--compose[data-chain="robinhood"] {
  --hub-accent: var(--qtube-color-green, #3dba7e);
}

.cpost-compose-hero {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.95rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--hub-accent) 32%, var(--qtube-border, rgba(255, 255, 255, 0.12)));
  background:
    radial-gradient(ellipse 80% 90% at 0% 0%, color-mix(in srgb, var(--hub-accent) 22%, transparent), transparent 58%),
    color-mix(in srgb, var(--qtube-surface, #141414) 94%, #000);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--hub-accent) 20%, transparent);
}

.cpost-compose-hero__identity {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
}

.cpost-compose-hero__identity .token-logo-box {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  box-shadow: 0 0 1.2rem color-mix(in srgb, var(--hub-accent) 28%, transparent);
}

.cpost-compose-hero__identity .token-logo-box--fallback {
  background: linear-gradient(145deg, var(--hub-accent), var(--qtube-color-orange, #e07820));
}

.cpost-compose-hero__titles {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.cpost-compose-hero__kicker {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
  min-width: 0;
}

.cpost-compose-hero__name,
.cpost-compose-hero h1,
.cpost-compose-hero__lede {
  overflow-wrap: anywhere;
}

.cpost-compose-hero__name {
  font-weight: 700;
  color: var(--qtube-text, #f4f6f8);
}

.cpost-compose-hero__ticker {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--hub-accent) 72%, #fff);
}

.cpost-compose-hero__kind {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--qtube-muted, #9aa3ad);
}

.cpost-compose-hero h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.cpost-compose-hero__lede,
.cpost-compose-hero__access,
.cpost-compose-hero__links {
  margin: 0;
  color: var(--qtube-muted, #9aa3ad);
  font-size: 0.9rem;
}

.cpost-compose-hero__access {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hub-accent) 28%, transparent);
  background: color-mix(in srgb, var(--hub-accent) 12%, transparent);
  color: color-mix(in srgb, var(--hub-accent) 70%, #fff);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.cpost-compose-hero__links {
  font-size: 0.82rem;
}

.cpost-compose-layout {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.cpost-compose-main,
.cpost-compose-guide {
  min-width: 0;
}

.cpost-compose-guide {
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--qtube-border, rgba(255, 255, 255, 0.12)) 80%, transparent);
  background: rgba(255, 255, 255, 0.03);
}

.cpost-compose-guide h2 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}

.cpost-compose-guide ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--qtube-muted, #9aa3ad);
  font-size: 0.88rem;
}

.cpost-compose-guide li + li {
  margin-top: 0.28rem;
}

.cpost-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.cpost-field__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  justify-content: space-between;
}

.cpost-field label {
  font-weight: 600;
}

.cpost-count {
  font-size: 0.78rem;
  color: var(--qtube-muted, #9aa3ad);
  font-variant-numeric: tabular-nums;
}

.cpost-compose-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cpost-compose-chips li {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--qtube-border, rgba(255, 255, 255, 0.12)) 80%, transparent);
  background: rgba(255, 255, 255, 0.03);
  color: var(--qtube-muted, #9aa3ad);
  font-size: 0.75rem;
}

.cpost-compose input:focus-visible,
.cpost-compose textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--qtube-color-red, #c1121f) 70%, #fff);
  outline-offset: 2px;
}

@media (min-width: 880px) {
  .cpost-compose-layout {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 16.5rem);
    align-items: start;
  }
}

@media (max-width: 640px) {
  .cpost-shell {
    width: min(100% - 1rem, 48rem);
    margin-top: 0.7rem;
  }

  .cpost-card,
  .cpost-comment,
  .cpost-detail__layout {
    gap: 0.45rem;
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .cpost-card {
    padding: 0.55rem 0.65rem;
  }

  .cpost-card__excerpt {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .cpost-sort {
    width: 100%;
  }

  .cpost-sort__link {
    flex: 1 1 auto;
    min-height: 2.25rem;
  }

  .cpost-vote,
  .cpost-vote--spacer {
    width: 2.5rem;
    flex-basis: 2.5rem;
  }

  .cpost-thread-replies {
    margin-left: 0.35rem;
  }

  .cpost-reply-list {
    padding-left: 0.45rem;
  }

  .cpost-actions,
  .cpost-actions__primary,
  .cpost-actions__secondary {
    width: 100%;
  }

  .cpost-action,
  .cpost-actions .button,
  .cpost-reply > summary,
  .cpost-mod > summary,
  .cpost-edit > summary {
    min-height: 2.5rem;
  }

  .cpost-author__name {
    flex: 1 1 8rem;
  }

  .cpost-hero-post {
    padding: 0.85rem 0.8rem 0.8rem 0.95rem;
  }

  .cpost-shell--compose {
    width: min(100% - 1rem, 64rem);
  }

  .cpost-compose-hero,
  .cpost-compose-guide,
  .cpost-compose,
  .cpost-field,
  .cpost-compose-chips {
    max-width: 100%;
  }

  .cpost-compose-hero__identity {
    gap: 0.6rem;
  }

  .cpost-compose-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
