/* ════════════════════════════════════════════════════════════
   TAKE DETAIL — sticky header, featured hero take, AI judge,
   comments discussion thread, and desktop layout
   ════════════════════════════════════════════════════════════ */

/* ── Container & Layout ─────────────────────────────────────── */

.take-detail {
  min-width: 0;
  background: var(--color-surface);
  border-left: var(--line);
  border-right: var(--line);
  border-bottom: var(--line);
  min-height: calc(100vh - 60px);
}

@media (min-width: 1025px) {
  .take-detail {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2);
    overflow: hidden;
    max-width: 760px;
  }
}

@media (min-width: 1200px) {
  .app-main--take .take-detail {
    max-width: none;
    width: 100%;
  }

  .app-main--take .side-column {
    display: block;
    position: sticky;
    top: var(--space-4);
  }
}

@media (max-width: 640px) {
  .take-detail {
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-bottom: 0;
    border-radius: 0;
  }
}

/* ── Sticky Top Navigation ─────────────────────────────────── */

.take-head {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--line);
}

.take-head__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 var(--space-4);
}

.take-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.take-back-link:hover {
  color: var(--color-text);
  background: var(--color-surface-soft);
  border-color: var(--color-border-strong);
  transform: translateX(-1px);
}

.take-back-link .app-icon {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

.take-head__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

@media (max-width: 640px) {
  .take-head__inner {
    padding: 0 var(--space-3);
  }
}

/* ── Featured Hero Take Post (#take-detail-stream) ─────────── */

#take-detail-stream .take-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  padding: 22px var(--space-4) 18px;
  border-bottom: var(--line);
  background: var(--color-surface);
  transition: none;
  content-visibility: visible;
  contain: none;
}

#take-detail-stream .take-item:hover {
  background: var(--color-surface);
}

#take-detail-stream .take-item__avatar {
  width: 46px;
  height: 46px;
  font-size: 0.88rem;
  border: 1px solid var(--color-border-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#take-detail-stream .take-item__meta {
  margin-bottom: 8px;
}

#take-detail-stream .take-item__user {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

#take-detail-stream .take-item__text {
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  font-weight: 450;
  letter-spacing: -0.012em;
  color: var(--color-text);
  margin-top: 8px;
  margin-bottom: 14px;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
}

#take-detail-stream .take-item__media {
  margin-top: 14px;
  margin-bottom: 6px;
  border-radius: var(--radius-2);
  overflow: hidden;
  border: 1px solid var(--color-border);
  max-height: min(560px, 70vh);
}

#take-detail-stream .take-vote-split {
  margin-top: 18px;
}

#take-detail-stream .take-vote-meta {
  margin-top: 12px;
}

#take-detail-stream .take-item__actions-wrapper {
  margin-top: 18px;
  padding-top: 14px;
  border-top: var(--line);
}

#take-detail-stream .take-action--vote {
  min-height: 50px;
}

@media (max-width: 640px) {
  #take-detail-stream .take-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 16px var(--space-3) 14px;
  }

  #take-detail-stream .take-item__avatar {
    width: 40px;
    height: 40px;
  }
}

/* ── AI Judge Panel ────────────────────────────────────────── */

.ai-judge {
  margin: 18px var(--space-4);
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: border-color var(--transition-fast);
}

.ai-judge__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.ai-judge__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6d7dff;
}

.ai-judge__eyebrow .app-icon {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

.ai-judge__title {
  margin: 4px 0 0;
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.ai-judge__trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  color: #6d7dff;
  background: color-mix(in srgb, #6d7dff 10%, transparent);
  border: 1px solid color-mix(in srgb, #6d7dff 28%, transparent);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.ai-judge__trigger:hover:not([disabled]) {
  background: #6d7dff;
  color: #ffffff;
  border-color: #6d7dff;
  box-shadow: 0 2px 10px rgba(109, 125, 255, 0.3);
}

.ai-judge__trigger[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-judge__countdown {
  margin-top: 14px;
}

.ai-judge__countdown[hidden] {
  display: none !important;
}

.ai-judge__note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ── AI Judge Progress Card ────────────────────────────────── */

.ai-judge-progress-card {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-judge-progress-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-judge-progress-card__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ai-judge-progress-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #6d7dff;
}

.ai-judge-progress-card__icon .app-icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.ai-judge-progress-card__title {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.ai-judge-progress-card__pct {
  font-size: 0.84rem;
  font-weight: 800;
  color: #6d7dff;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.ai-judge-progress-card__track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-vote-track);
  overflow: hidden;
}

.ai-judge-progress-card__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #6d7dff, #8b5cf6);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-judge-progress-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-judge-progress-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
}

.ai-judge-progress-card__stat strong {
  color: var(--color-text);
}

.ai-judge-progress-card__stat.is-met {
  color: var(--color-agree);
  border-color: var(--color-agree-border);
  background: var(--color-agree-bg);
}

.ai-judge-progress-card__stat.is-met strong {
  color: var(--color-agree);
}

.ai-judge-progress-card__callout {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.ai-judge-progress-card__subtext {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.ai-judge-progress-card--side-needed .ai-judge-progress-card__icon {
  color: var(--color-text-muted);
}

.ai-judge__status {
  margin: 12px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.ai-judge__status.is-error {
  color: var(--color-disagree);
}

.ai-judge__status[hidden] {
  display: none !important;
}

.ai-judge__loading {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.ai-judge__loading[hidden] {
  display: none !important;
}

.ai-judge__loading-line {
  display: block;
  height: 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-surface-soft) 25%, var(--color-surface-strong) 50%, var(--color-surface-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.ai-judge__loading-line--lg { width: 92%; }
.ai-judge__loading-line--sm { width: 56%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ai-judge__result {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface-soft);
  display: grid;
  gap: 12px;
}

.ai-judge__result[hidden] {
  display: none !important;
}

.ai-judge__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.ai-judge__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.ai-judge__value {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.ai-judge__reason {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text);
}

.ai-judge__meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.ai-judge__picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.ai-judge__pick {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-1);
  background: var(--color-surface);
  display: grid;
  gap: 6px;
}

.ai-judge__pick-title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.ai-judge__pick-copy {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--color-text);
  font-style: italic;
}

.ai-judge__pick-jump {
  justify-self: start;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ai-judge__pick-jump:hover {
  background: var(--color-hover);
  border-color: var(--color-border-strong);
}

@media (max-width: 640px) {
  .ai-judge {
    margin: 14px var(--space-3);
    padding: 16px;
  }
}

/* ── Comments Shell & Section Header ───────────────────────── */

.comments-shell {
  border-top: var(--line);
  background: var(--color-surface);
}

.comments-shell__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px var(--space-4) 14px;
  border-bottom: var(--line);
}

.comments-shell__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.comments-shell__title h2 {
  margin: 2px 0 0;
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.comments-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.comments-sort:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.comments-sort .app-icon {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

.comments-sort select {
  border: 0;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  padding-right: 2px;
}

.comments-sort select:focus {
  outline: none;
}

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

/* ── Comment Compose Box ───────────────────────────────────── */

.comment-compose {
  margin: 14px var(--space-4) 18px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  background: var(--color-surface-muted);
  display: grid;
  gap: 10px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-compose:focus-within {
  border-color: var(--color-border-strong);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.comment-compose__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.comment-compose__subtitle {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.comment-compose__replying {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.comment-compose__replying[hidden] {
  display: none !important;
}

.comment-compose__cancel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.74rem;
  cursor: pointer;
}

.comment-compose__cancel .app-icon {
  font-size: 11px;
}

.comment-compose__cancel:hover {
  text-decoration: underline;
}

.comment-compose__field textarea {
  width: 100%;
  min-height: 48px;
  max-height: 180px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-1);
  padding: 10px 12px;
  background: var(--color-surface);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--color-text);
  resize: none;
  transition: border-color var(--transition-fast), min-height var(--transition-fast);
}

.comment-compose__field textarea:focus {
  outline: none;
  border-color: var(--color-border-strong);
}

.comment-compose.comment-compose--expanded .comment-compose__field textarea {
  min-height: 90px;
}

.comment-compose__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-compose__count {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-text-placeholder);
  font-variant-numeric: tabular-nums;
}

.comment-compose__footer .btn--primary {
  min-width: 76px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .comments-shell__head {
    padding: 16px var(--space-3) 12px;
  }

  .comment-compose {
    margin: 12px var(--space-3) 16px;
    padding: 14px;
  }
}

/* ── Comments Thread & Items ───────────────────────────────── */

.comments-thread {
  display: grid;
  contain: layout;
}

.comment-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  position: relative;
  padding: 16px var(--space-4);
  border-bottom: var(--line);
  transition: background var(--transition-fast);
}

.comment-item:hover {
  background: color-mix(in srgb, var(--color-surface-muted) 50%, transparent);
}

.comment-item--root::before {
  content: "";
  position: absolute;
  left: calc(var(--space-4) + 19px);
  top: 58px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
  border-radius: 1px;
}

.comment-item--root:last-child::before {
  display: none;
}

.comment-item__avatar {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  flex-shrink: 0;
  text-decoration: none;
}

.comment-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-item__body {
  min-width: 0;
}

.comment-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  line-height: 1.35;
}

.comment-item__user {
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.comment-item__user:hover {
  text-decoration: underline;
}

.comment-item__handle {
  color: var(--color-text-muted);
  font-weight: 500;
  text-decoration: none;
}

.comment-item__dot {
  color: var(--color-text-placeholder);
  font-size: 0.7rem;
}

.comment-item__time {
  color: var(--color-text-placeholder);
  font-size: 0.75rem;
}

.comment-item__text {
  margin: 6px 0 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--color-text);
  word-break: break-word;
}

.comment-item__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.comment-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.comment-action:hover {
  color: var(--color-text);
}

.comment-action--like {
  --comment-like-icon-size: 15px;
}

.comment-action--like .comment-action__icon .app-icon {
  width: var(--comment-like-icon-size);
  height: var(--comment-like-icon-size);
  font-size: var(--comment-like-icon-size);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comment-action--like.is-active {
  color: #e11d48;
}

.comment-action--like.is-active .comment-action__icon .app-icon {
  color: #e11d48;
}

.comment-action--like.is-motion-enter .comment-action__icon .app-icon {
  transform: scale(1.28);
}

.comment-action--icon-plain {
  color: var(--color-text-muted);
}

.comment-action--icon-plain:hover {
  color: var(--color-text);
}

.comment-action--danger:hover {
  color: #dc2626;
}

/* ── Nested Replies ────────────────────────────────────────── */

.comment-replies {
  margin-top: 10px;
  padding-left: 20px;
  border-left: 2px solid var(--color-border);
}

.comment-item--reply {
  padding: 12px 0 0;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.comment-item--reply .comment-item__avatar {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
}

.comment-item--reply .comment-item__text {
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .comment-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 14px var(--space-3);
  }

  .comment-item__avatar {
    width: 34px;
    height: 34px;
  }

  .comment-item--root::before {
    left: calc(var(--space-3) + 16px);
  }
}

/* ── Badges ────────────────────────────────────────────────── */

.comment-item__badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.comment-badge--ai-pick {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  min-height: 17px;
  padding: 0 6px 0 5px;
  border-radius: var(--radius-pill);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6d7dff;
  background: color-mix(in srgb, #6d7dff 10%, var(--color-surface));
  border: 1px solid color-mix(in srgb, #6d7dff 35%, var(--color-border));
  cursor: default;
  user-select: none;
}

.comment-badge--tier {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 5.5px;
  border-radius: var(--radius-pill);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  user-select: none;
  cursor: default;
  white-space: nowrap;
}

/* ── Search Entry Mode (?from=search) ───────────────────────── */

/* Notification links show the selected post as a feed card. */
html.take-page--from-notifications .app-main--take {
  display: block !important;
}

html.take-page--from-notifications .side-column,
html.take-page--from-notifications .ai-judge,
html.take-page--from-notifications .comments-shell {
  display: none !important;
}

html.take-page--from-notifications #take-detail-stream .take-item {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 16px;
}

html.take-page--from-notifications #take-detail-stream .take-item__text {
  font-size: clamp(0.98rem, 0.94rem + 0.28vw, 1.16rem);
  line-height: 1.44;
}

html.take-page--from-notifications #take-detail-stream .take-item__actions-wrapper {
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}

html.take-page--from-search .take-detail {
  border: 0;
  background: transparent;
  max-width: 860px;
  margin-inline: auto;
}

html.take-page--from-search .app-main--take {
  display: block !important;
  max-width: 1180px;
}

html.take-page--from-search .side-column {
  display: none !important;
}

html.take-page--from-search .take-head {
  display: none;
}

html.take-page--from-search #take-detail-stream {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 20px var(--space-4) 28px;
}

html.take-page--from-search #take-detail-stream .take-item {
  grid-template-columns: 40px minmax(0, 1fr);
  align-content: start;
  gap: 14px 12px;
  position: relative;
  width: min(100%, 860px);
  min-width: 0;
  margin: 0 auto;
  padding: 18px 0 0;
  border-bottom: 0;
  background: transparent;
}

html.take-page--from-search #take-detail-stream .take-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--color-border-strong), transparent);
}

html.take-page--from-search #take-detail-stream .take-ai-judge {
  display: none;
}

html.take-page--from-search .ai-judge,
html.take-page--from-search .comments-shell {
  display: none;
}

/* ── Delete Take Confirmation Modal ────────────────────────── */

.delete-take-modal {
  position: fixed;
  inset: 0;
  z-index: 115;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.delete-take-modal[hidden] {
  display: none !important;
}

.delete-take-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

:root[data-theme="dark"] .delete-take-modal__backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.delete-take-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100% - 32px, 380px);
  transform: translate(-50%, -46%) scale(0.96);
  border: var(--line);
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  padding: 24px 22px 20px;
  text-align: center;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.delete-take-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.delete-take-modal.is-open .delete-take-modal__backdrop {
  opacity: 1;
}

.delete-take-modal.is-open .delete-take-modal__panel {
  transform: translate(-50%, -50%) scale(1);
}

.delete-take-modal__icon-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.delete-take-modal__title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.delete-take-modal__desc {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.delete-take-modal__actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.delete-take-modal__btn-cancel {
  width: 100%;
  min-height: 42px;
  font-weight: 600;
  border-radius: var(--radius-2);
}

.delete-take-modal__btn-confirm {
  width: 100%;
  min-height: 42px;
  font-weight: 600;
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #dc2626;
  border-radius: var(--radius-2);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.delete-take-modal__btn-confirm:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.delete-take-modal__btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Dark Theme Refinements ────────────────────────────────── */

:root[data-theme="dark"] .take-detail {
  background: var(--color-surface);
}

:root[data-theme="dark"] .take-head {
  background: var(--color-surface);
}

:root[data-theme="dark"] .ai-judge {
  background: var(--color-surface);
}

:root[data-theme="dark"] .ai-judge-progress-card {
  background: var(--color-surface-muted);
}

:root[data-theme="dark"] .ai-judge__result {
  background: var(--color-surface-muted);
}

:root[data-theme="dark"] .comment-compose {
  background: var(--color-surface-muted);
}

:root[data-theme="dark"] .comment-action--like.is-active {
  color: #fb7185;
}

:root[data-theme="dark"] .comment-action--like.is-active .comment-action__icon .app-icon {
  color: #fb7185;
}
