:root {
  color-scheme: dark;
  --bg: #050505;
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.64);
  --accent: #ff4f6d;
  --glass: rgba(18, 18, 20, 0.54);
  --glass-strong: rgba(18, 18, 20, 0.78);
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
}

body {
  overscroll-behavior: none;
  touch-action: manipulation;
}

.app-shell {
  min-height: 100dvh;
}

.feed-frame {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: #050505;
}

.feed {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  touch-action: none;
}

.feed-item {
  position: relative;
  height: 100dvh;
  width: 100%;
}

.media-wrap {
  position: relative;
  min-height: 100dvh;
  background: #111;
}

.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media.hidden,
.hidden {
  display: none !important;
}

.media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 28%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.12), transparent 16%);
}

.caption-wrap {
  position: absolute;
  left: 1rem;
  right: 5.25rem;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 2;
}

.category-line {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.62rem 0.88rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.56);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.glyphs {
  position: absolute;
  right: 0.75rem;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.glyph,
.count-pill {
  border-radius: 999px;
}

.glyph {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

.glyph:hover {
  background: rgba(24, 24, 28, 0.62);
}

.icon-wrap {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  align-items: center;
  justify-content: center;
}

.icon-wrap svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heart-glyph.is-hot {
  color: var(--accent);
  border-color: rgba(255, 107, 129, 0.4);
  background: rgba(255, 107, 129, 0.16);
}

.heart-glyph.is-hot svg {
  fill: currentColor;
  stroke: currentColor;
}

.vote-up {
  color: #d4f0c2;
}

.vote-down {
  color: #f1d7a4;
}

.vote-remove {
  color: #ffb4b4;
}

.count-pill {
  min-width: 3rem;
  padding: 0.4rem 0.66rem;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--line);
  color: rgba(245, 245, 247, 0.92);
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.curator-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.top-chrome {
  position: fixed;
  top: max(0.9rem, env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0 1rem;
}

.brand-pill,
.status-pill {
  padding: 0.48rem 0.76rem;
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.56);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.brand-pill {
  color: rgba(245, 245, 247, 0.94);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.status-pill {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
}

.unlock-shell {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: block;
}

.unlock-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 3, 0.44);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.unlock-card {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 9;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  background: var(--glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.unlock-copy,
.unlock-controls {
  position: static;
}

.unlock-copy {
  margin-bottom: 0.95rem;
}

.unlock-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.unlock-copy label {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.unlock-text {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.unlock-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

.empty-state {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(5, 5, 5, 0.84);
}

.empty-card {
  width: 100%;
  max-width: 18rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(15, 15, 18, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.empty-card button {
  width: 100%;
  height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.unlock-controls input {
  min-width: 0;
  height: 3.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  appearance: none;
  -webkit-appearance: none;
}

.unlock-controls input::placeholder {
  color: rgba(245, 245, 247, 0.34);
}

.unlock-controls input:focus {
  border-color: rgba(255, 215, 107, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 4px rgba(255, 215, 107, 0.08);
}

.unlock-controls button,
.empty-card button {
  font: inherit;
}

.unlock-controls button {
  width: auto;
  min-width: 5.5rem;
  height: 3.1rem;
  padding: 0 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

@media (min-width: 700px) {
  .feed-frame {
    max-width: 430px;
    margin: 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
  }
}
