/* ════════════════════════════════════════════════════════════
   FEED — home head, feed stream, take items, actions, voting
   ════════════════════════════════════════════════════════════ */

.feed-stream {
  display: block;
  contain: layout;
}

body[data-page="home"] #feed-stream {
  display: block;
  padding: 0 var(--space-4) var(--space-5);
  contain: layout;
}

body[data-page="home"] #feed-stream .take-item {
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  gap: 12px;
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
  contain: layout style;
}

body[data-page="home"] #feed-stream .take-item + .take-item {
  margin-top: 12px;
  border-top: 0;
  padding-top: 18px;
}

body[data-page="home"] #feed-stream .take-item:hover {
  background: transparent;
}

body[data-page="home"] #feed-stream .take-item__meta {
  align-items: center;
  min-height: 36px;
  margin-bottom: 8px;
}

body[data-page="home"] #feed-stream .take-item__meta-main {
  min-height: 36px;
  align-items: center;
  gap: 7px;
}

body[data-page="home"] #feed-stream .take-item__user {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

body[data-page="home"] #feed-stream .take-item__meta-main time,
body[data-page="home"] #feed-stream .take-item__dot,
body[data-page="home"] #feed-stream .take-owner-badge,
body[data-page="home"] #feed-stream .take-item__open {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 640px) {
  body[data-page="home"] #feed-stream {
    padding: 0 var(--space-3) var(--space-4);
  }

  body[data-page="home"] #feed-stream .take-item {
    padding: 12px 0;
  }

  body[data-page="home"] #feed-stream .take-item + .take-item {
    margin-top: 10px;
    padding-top: 14px;
  }

  body[data-page="home"] #feed-stream .take-item__meta,
  body[data-page="home"] #feed-stream .take-item__meta-main {
    min-height: 34px;
  }

  body[data-page="home"] #feed-stream .take-item__user {
    font-size: 0.95rem;
  }

  .profile-feed > .feed-empty {
    padding: 44px var(--space-3);
    font-size: 1.1rem;
  }
}

/* ── Section typography helpers ────────────────────────────── */

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

.section-subtitle {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

/* ── Home header ───────────────────────────────────────────── */

.home-head {
  display: grid;
  gap: 0;
  padding: 0;
}

body[data-page="home"] .feed-head__inner {
  padding: 0;
}

.home-head__bar {
  display: none !important;
}

.home-head__spacer {
  width: 32px;
  height: 32px;
}

.home-head__brand {
  justify-self: center;
  width: 64px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-head__brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.home-head__actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
}

.home-head__utility {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text);
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.home-head__utility .app-icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.home-head__utility:hover {
  background: var(--color-hover);
}

.home-head .page-title {
  padding: 0;
}

.home-head .section-subtitle {
  margin-top: 4px;
}

/* ── Feed / following switch ───────────────────────────────── */

.home-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  align-items: stretch;
  gap: 8px;
  padding: 8px var(--space-4) 14px;
  border-bottom: 0;
}

.home-switch__btn {
  position: relative;
  min-height: 56px;
  padding: 8px 16px 14px;
  border-radius: 8px;
  font-size: clamp(1.02rem, 0.92rem + 0.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--color-text-muted);
  border: 0;
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.home-switch__btn:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-hover) 54%, transparent);
}

.home-switch__btn--active {
  color: var(--color-text);
  font-weight: 700;
  background: color-mix(in srgb, var(--color-surface-soft) 84%, transparent 16%);
}

.home-switch__btn--active::after {
  display: none;
}

/* ── Feed states ───────────────────────────────────────────── */

.feed-state,
.feed-empty {
  margin: 0;
  padding: 14px var(--space-4);
  border-bottom: var(--line);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.feed-state.is-error,
.feed-state.is-success {
  color: var(--color-text);
  background: var(--color-surface-muted);
}

.profile-feed > .feed-empty {
  padding: 56px var(--space-4);
  border-bottom: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: var(--color-text);
}

.feed-personalization {
  display: grid;
  gap: 14px;
  padding: 18px var(--space-4) 20px;
  border-bottom: var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 111, 77, 0.12), transparent 34%),
    linear-gradient(180deg, var(--color-surface-soft) 0%, var(--color-surface) 100%);
}

.feed-personalization__copy {
  display: grid;
  gap: 6px;
}

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

.feed-personalization__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.04rem + 0.35vw, 1.45rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.feed-personalization__text {
  margin: 0;
  max-width: 62ch;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.feed-personalization__chips,
.topic-list--chips,
.side-block__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feed-personalization__chip,
.topic-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.feed-personalization__chip:hover,
.topic-chip:hover {
  background: var(--color-hover);
}

.topic-chip--muted,
.side-block__muted {
  color: var(--color-text-muted);
}

/* ── Empty state (with visual) ─────────────────────────────── */

.feed-empty-visual {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 32px var(--space-4) 36px;
  border-bottom: var(--line);
}

.feed-empty-visual__art { display: none; }
.feed-empty-visual__glow { display: none; }
.feed-empty-visual__mark { display: none; }

.feed-empty-visual__copy {
  display: grid;
  gap: 8px;
}

.feed-empty-visual__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.feed-empty-visual__title {
  margin: 0;
  max-width: 28ch;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.feed-empty-visual__text {
  max-width: 52ch;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* ── Take card / feed item ─────────────────────────────────── */

.take-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px var(--space-4);
  border-bottom: var(--line);
  transition: background var(--transition-fast);
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
  contain: layout style;
}

.take-item:hover {
  background: var(--color-surface-muted);
}

.take-item--compact {
  padding-inline: 0;
}

/* ── Avatar ────────────────────────────────────────────────── */

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

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

/* ── Body ──────────────────────────────────────────────────── */

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

.take-item__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.take-item__meta-main {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.take-item__user {
  color: var(--color-text);
  font-weight: 700;
}

.take-item__user:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.take-item__open {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.take-item__open:hover {
  color: var(--color-text);
}

.take-item__dot {
  color: var(--color-dot);
  font-size: 0.6rem;
}

.take-item__share-mobile {
  display: none;
  flex-shrink: 0;
}

.take-pinned-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.take-pinned-header .app-icon {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  transform: rotate(-30deg);
}

.take-owner-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.take-item__text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.2rem);
  line-height: 1.44;
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-line;
}

/* ── Hashtags ──────────────────────────────────────────────── */

.take-item__hashtags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
}

.take-hashtag {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1px;
  transition: color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

.take-hashtag:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

.take-item__text .take-hashtag {
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 1.5px solid var(--color-border-strong);
  padding-bottom: 0;
}

.take-item__text .take-hashtag:hover {
  opacity: 0.65;
  border-color: var(--color-text);
}

.take-item__hashtags + .take-item__media {
  margin-top: 10px;
}

.take-item__hashtags + .take-item__actions-wrapper {
  margin-top: 8px;
}

/* ── Media ─────────────────────────────────────────────────── */
/* A photo fills a predictable frame. The frame never derives its height from
   the image's intrinsic dimensions, so portrait and panorama uploads align. */

.take-item__media {
  margin-top: 12px;
  border: var(--line);
  border-radius: var(--radius-2);
  overflow: hidden;
  background: var(--color-surface-soft);
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 100%;
  display: block;
  position: relative;
  transition: border-color var(--transition-fast);
}

.take-item__media[data-media-shape="portrait"] { aspect-ratio: 4 / 5; }
.take-item__media[data-media-shape="square"] { aspect-ratio: 1 / 1; }
.take-item__media[data-media-shape="landscape"] { aspect-ratio: 3 / 2; }
.take-item__media[data-media-shape="wide"] { aspect-ratio: 16 / 9; }

.take-item__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.take-item__media[data-media-shape="portrait"] > img { object-position: center 40%; }

.take-item__media--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  aspect-ratio: 3 / 2;
}

.take-item__media--split .take-item__media-slot {
  min-width: 0;
  min-height: 0;
  background: var(--color-surface-soft);
  position: relative;
  overflow: hidden;
}

.take-item__media--split .take-item__media-slot + .take-item__media-slot {
  border-left: var(--line);
}

.take-item__media--split .take-item__media-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ── Action wrapper ────────────────────────────────────────── */

.take-item__actions-wrapper {
  margin-top: 10px;
}

.take-item__actions-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Feed stream overrides (tighter density) ───────────────── */

.feed-stream .take-item,
.profile-feed:not(.profile-feed--grid) .take-item {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 16px;
}

.feed-stream .take-item__avatar,
.profile-feed:not(.profile-feed--grid) .take-item__avatar {
  width: 36px;
  height: 36px;
  font-size: 0.74rem;
}

.feed-stream .take-item__meta,
.profile-feed:not(.profile-feed--grid) .take-item__meta {
  gap: 5px;
  margin-bottom: 5px;
  font-size: 0.78rem;
}

.feed-stream .take-item__text,
.profile-feed:not(.profile-feed--grid) .take-item__text {
  font-size: clamp(0.98rem, 0.94rem + 0.28vw, 1.16rem);
  line-height: 1.44;
}

.feed-stream .take-item__hashtags,
.profile-feed:not(.profile-feed--grid) .take-item__hashtags {
  gap: 5px 8px;
  margin-top: 6px;
}

.feed-stream .take-item__hashtags .take-hashtag,
.profile-feed:not(.profile-feed--grid) .take-item__hashtags .take-hashtag {
  font-size: 0.78rem;
}

.feed-stream .take-item__media,
.profile-feed:not(.profile-feed--grid) .take-item__media {
  margin-top: 10px;
}

.feed-stream .take-item__actions-wrapper,
.profile-feed:not(.profile-feed--grid) .take-item__actions-wrapper {
  margin-top: 10px;
}

/* ── Action row ────────────────────────────────────────────── */

.take-item__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-left: 0;
}

.take-item__actions::-webkit-scrollbar {
  display: none;
}

.take-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-1);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: transparent;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.take-action .app-icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
}

.take-action[disabled] {
  opacity: 0.56;
  cursor: not-allowed;
}

/* ── Vote buttons — use semantic color tokens ─────────────── */

.take-action--vote {
  min-width: 64px;
  min-height: 56px;
  padding: 6px 10px;
  border-radius: var(--radius-1);
  color: var(--color-text-muted);
  background: transparent;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.take-action:not(.take-action--vote) {
  min-width: 44px;
  padding: 0 10px;
  color: var(--color-text-muted);
}

.take-action--pin {
  min-width: 44px;
  padding: 0 10px;
  color: var(--color-text-muted);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

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

.take-action--pin.is-pinned {
  color: var(--color-text);
}

.take-action--pin.is-pinned .app-icon {
  transform: rotate(-30deg);
}

.take-action--pin[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.take-action--judge {
  min-width: 78px;
  padding: 0 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  background: var(--color-surface);
}

.take-action--judge .take-action__lead {
  gap: 5px;
}

.take-action--judge .take-action__icon {
  color: color-mix(in srgb, var(--color-text) 70%, #6d7dff 30%);
}

.take-action--judge .take-action__icon .app-icon {
  width: 15px;
  height: 15px;
  font-size: 15px;
}

.take-action--judge:hover {
  background: var(--color-hover);
  border-color: var(--color-text-muted);
}

.take-item__actions-side {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.take-item__save-action {
  flex-shrink: 0;
}

.take-action__stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.take-action__lead {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.take-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.take-action__count {
  font-size: 0.72rem;
  font-weight: 700;
  color: inherit;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.take-action__count--comments {
  font-size: 0.8rem;
}

.take-action__label {
  display: inline-flex;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.92;
}

.take-action--vote .take-action__stack {
  gap: 3px;
}

.take-action--vote .take-action__count {
  font-size: 0.72rem;
}

@media (min-width: 641px) {
  body[data-page="home"] .take-action--vote {
    min-width: 74px;
  }

  body[data-page="home"] .take-action--vote .take-action__stack {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
      "icon count"
      "label label";
    column-gap: 6px;
    row-gap: 3px;
    justify-items: center;
    align-items: center;
  }

  body[data-page="home"] .take-action--vote .take-action__icon {
    grid-area: icon;
  }

  body[data-page="home"] .take-action--vote .take-action__count {
    grid-area: count;
    min-width: 0;
  }

  body[data-page="home"] .take-action--vote .take-action__label {
    grid-area: label;
  }
}

/* Hover states */
.take-action:not(.take-action--vote):hover {
  color: var(--color-text);
  background: var(--color-hover);
}

.take-action--agree:hover {
  color: var(--color-agree);
  background: var(--color-agree-bg);
  transform: translateY(-1px);
}

.take-action--disagree:hover {
  color: var(--color-disagree);
  background: var(--color-disagree-bg);
  transform: translateY(-1px);
}

/* Selected states */
.take-action--agree.is-selected {
  color: var(--color-agree);
  background: var(--color-agree-bg);
}

.take-action--agree.is-selected .take-action__icon,
.take-action--agree.is-selected .take-action__label,
.take-action--agree.is-selected .take-action__count {
  color: var(--color-agree);
}

.take-action--disagree.is-selected {
  color: var(--color-disagree);
  background: var(--color-disagree-bg);
}

.take-action--disagree.is-selected .take-action__icon,
.take-action--disagree.is-selected .take-action__label,
.take-action--disagree.is-selected .take-action__count {
  color: var(--color-disagree);
}

.take-action--bookmark {
  color: var(--color-text-muted);
}

:root:not([data-theme="dark"]) .take-action,
:root:not([data-theme="dark"]) .take-action--vote,
:root:not([data-theme="dark"]) .take-action:not(.take-action--vote),
:root:not([data-theme="dark"]) .take-action--bookmark {
  color: var(--color-text);
}

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

.take-action--bookmark .take-action__icon {
  color: inherit;
}

.take-action--bookmark.is-selected {
  color: var(--color-text);
}

.take-action--delete {
  color: var(--color-disagree);
}

.take-action--delete:hover {
  color: var(--color-disagree);
  background: var(--color-disagree-bg);
}

/* ── Share icon — forward-arrow style ──────────────────────── */



.take-action--share .take-action__icon .app-icon,
.take-item__share-mobile .app-icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
}

/* ── Vote bar ──────────────────────────────────────────────── */

.take-vote-split {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 3px;
  margin-top: 12px;
  border-radius: var(--radius-pill);
  background: var(--color-vote-track);
}

.take-vote-split__agree {
  background: var(--color-agree);
  transition: width 400ms ease;
}

.take-vote-split__disagree {
  background: var(--color-disagree);
  transition: width 400ms ease;
}

.take-vote-meta {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.take-ai-judge {
  margin-top: 10px;
  padding: 10px 12px;
  border: var(--line);
  border-radius: var(--radius-1);
  background: var(--color-surface-muted);
}

.take-ai-judge--loading,
.take-ai-judge--note {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.take-ai-judge__row,
.take-ai-judge__reason,
.take-ai-judge__pick {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--color-text);
}

.take-ai-judge__reason {
  margin-top: 6px;
}

.take-ai-judge__pick {
  margin-top: 6px;
  color: var(--color-text-muted);
}

/* ── Take AI Judge Countdown Indicator ─────────────────────── */

.take-judge-countdown {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-1);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.take-judge-countdown:hover {
  background: var(--color-hover);
  border-color: var(--color-border-strong);
}

.take-judge-countdown__lead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.take-judge-countdown__left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.take-judge-countdown__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #6d7dff;
}

.take-judge-countdown__icon .app-icon {
  width: 14px;
  height: 14px;
  display: block;
  font-size: 14px;
}

.take-judge-countdown__label {
  font-size: 0.77rem;
  font-weight: 550;
  color: var(--color-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.take-judge-countdown__pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6d7dff;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.take-judge-countdown__track {
  width: 100%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-vote-track);
  overflow: hidden;
  position: relative;
}

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

/* Side needed variant */
.take-judge-countdown--side-needed {
  background: var(--color-surface-muted);
}

.take-judge-countdown--side-needed .take-judge-countdown__icon {
  color: var(--color-text-muted);
}

.take-judge-countdown--side-needed .take-judge-countdown__label {
  color: var(--color-text-muted);
  font-weight: 500;
}

@media (max-width: 480px) {
  .take-judge-countdown {
    padding: 7px 10px;
    gap: 5px;
  }

  .take-judge-countdown__label {
    font-size: 0.73rem;
    white-space: normal;
    line-height: 1.35;
  }

  .take-judge-countdown__pct {
    font-size: 0.7rem;
  }
}

/* ── Profile grid takes ─────────────────────────────────────── */

.profile-grid-take {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-right: var(--line);
  border-bottom: var(--line);
  min-height: 240px;
  background: var(--color-surface);
  cursor: pointer;
  position: relative;
  transition: opacity var(--transition-base);
}

.profile-grid-take:hover {
  opacity: 0.86;
}

.profile-grid-take__media-wrap {
  position: relative;
  min-height: 0;
}

.profile-grid-take__media {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  background: var(--color-surface-soft);
  display: block;
}

.profile-grid-take__media-wrap--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
}

.profile-grid-take__media-slot {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--color-surface-soft);
  overflow: hidden;
}

.profile-grid-take__media-slot + .profile-grid-take__media-slot {
  border-left: var(--line);
}

.profile-grid-take__media-slot .profile-grid-take__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  display: block;
}

.profile-grid-take__media-wrap--split .profile-grid-take__overlay {
  grid-column: 1 / -1;
  z-index: 2;
}

.profile-grid-take__body {
  min-height: 180px;
  padding: var(--space-4);
  display: flex;
  align-items: end;
  background: linear-gradient(180deg, transparent 0%, var(--color-surface-muted) 100%);
}

.profile-grid-take__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 40px var(--space-4) var(--space-4);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.84) 100%);
}

:root[data-theme="dark"] .profile-grid-take__overlay {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
}

.profile-grid-take__excerpt {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-grid-take__overlay .profile-grid-take__excerpt {
  color: #ffffff;
}

.profile-grid-take__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 10px var(--space-4);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  border-top: var(--line);
}

.profile-grid-take__delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  transition: background var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

.profile-grid-take__delete .app-icon {
  width: 15px;
  height: 15px;
  font-size: 15px;
}

.profile-grid-take__delete:hover {
  background: rgba(197, 31, 31, 0.85);
}

.profile-grid-take__delete[disabled] {
  opacity: 0.56;
  cursor: not-allowed;
}

.profile-grid-take__pinned-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  letter-spacing: 0.02em;
  pointer-events: none;
}

.profile-grid-take__pinned-badge .app-icon {
  font-size: 0.68rem;
  transform: rotate(-30deg);
}

.profile-grid-take__pin {
  position: absolute;
  top: 8px;
  right: 44px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  transition: background var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

.profile-grid-take__pin .app-icon {
  width: 14px;
  height: 14px;
  font-size: 14px;
}

.profile-grid-take__pin:hover {
  background: rgba(0, 0, 0, 0.85);
}

.profile-grid-take__pin.is-pinned {
  background: var(--color-surface, #18181b);
  color: var(--color-text, #ffffff);
  border-color: rgba(255, 255, 255, 0.6);
}

.profile-grid-take__pin.is-pinned .app-icon {
  transform: rotate(-30deg);
}

.profile-grid-take__pin[disabled] {
  opacity: 0.56;
  cursor: not-allowed;
}

.profile-grid-take:not(:has(.profile-grid-take__delete)) .profile-grid-take__pin {
  right: 8px;
}

@media (max-width: 480px) {
  .profile-grid-take__delete,
  .profile-grid-take__pin {
    width: 26px;
    height: 26px;
    top: 6px;
  }
  .profile-grid-take__delete {
    right: 6px;
  }
  .profile-grid-take__pin {
    right: 36px;
  }
  .profile-grid-take:not(:has(.profile-grid-take__delete)) .profile-grid-take__pin {
    right: 6px;
  }
  .profile-grid-take__delete .app-icon,
  .profile-grid-take__pin .app-icon {
    font-size: 11px;
    width: 11px;
    height: 11px;
  }
  .profile-grid-take__pinned-badge {
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    font-size: 0.6rem;
  }
  .profile-grid-take__pinned-badge .app-icon {
    font-size: 0.6rem;
  }
}

.profile-grid-take__user {
  color: var(--color-text);
  font-weight: 700;
}

.profile-grid-vote {
  font-weight: 700;
}

.profile-grid-vote--agree {
  color: var(--color-agree);
}

.profile-grid-vote--disagree {
  color: var(--color-disagree);
}

/* =========================================================
   Take More — Bottom Sheet Modal
   ========================================================= */

.take-more-modal {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.take-more-modal[hidden] {
  display: none;
}

.take-more-modal.is-open {
  pointer-events: auto;
}

.take-more-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.22s ease;
  cursor: pointer;
}

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

.take-more-modal__sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  background: var(--color-surface);
  border-radius: 18px 18px 0 0;
  padding: 0 0 env(safe-area-inset-bottom, 8px);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

.take-more-modal.is-open .take-more-modal__sheet {
  transform: translateY(0);
}

.take-more-modal__handle-bar {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.take-more-modal__handle {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: var(--color-border);
}

.take-more-modal__header {
  padding: 4px 20px 8px;
}

.take-more-modal__actions {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.take-more-modal__item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  transition: background 0.15s ease;
}

.take-more-modal__item:hover,
.take-more-modal__item:focus-visible {
  background: var(--color-hover);
  outline: none;
}

.take-more-modal__item--danger {
  color: var(--color-danger, #e53e3e);
}

.take-more-modal__item--danger .take-more-modal__item-icon {
  color: var(--color-danger, #e53e3e);
}

.take-more-modal__item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface-alt, var(--color-hover));
  font-size: 15px;
  flex-shrink: 0;
}

.take-more-modal__item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.take-more-modal__item-title {
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.3;
}

.take-more-modal__footer {
  padding: 6px 12px 10px;
  border-top: 1px solid var(--color-border);
}

.take-more-modal__cancel-btn {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-lg, 12px);
  background: var(--color-hover);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.take-more-modal__cancel-btn:hover,
.take-more-modal__cancel-btn:focus-visible {
  background: var(--color-border);
  outline: none;
}

