  :root {
    --bg: #08080a;
    --card: #19191d;
    --ink: #f5f2ec;
    --muted: rgba(245, 242, 236, .6);
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
  }
  button { font: inherit; color: inherit; }

  /* header */
  .top {
    position: fixed;
    inset: 0 0 auto 0;
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(8, 8, 10, .92), rgba(8, 8, 10, .5) 55%, rgba(8, 8, 10, 0));
    pointer-events: none;
  }
  .top > * { pointer-events: auto; }
  .brand { display: flex; align-items: center; gap: 9px; }
  .logo { font-size: 17px; font-weight: 700; letter-spacing: -.03em; }
  .badge {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -.02em;
    color: var(--muted);
  }

  /* feed */
  #feed {
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  #feed::-webkit-scrollbar { display: none; }

  .short {
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: grid;
    place-items: center;
    padding: 0;
  }
  .frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--card);
    overflow: hidden;
    isolation: isolate;
  }

  .media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 14px 128px;
    background:
      radial-gradient(95% 75% at 50% 42%, var(--tint, #24242a) 0%, #16161a 62%, #101013 100%);
  }
  .media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 60px rgba(0, 0, 0, .55);
  }
  .missing {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
  }
  .missing code {
    font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--ink);
    opacity: .55;
    word-break: break-all;
  }

  .caption {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 90px 20px calc(24px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(8, 8, 10, .94), rgba(8, 8, 10, .55) 45%, transparent);
    pointer-events: none;
  }
  .caption h2 {
    margin: 0 0 7px;
    font-size: clamp(19px, 4.6vw, 25px);
    font-weight: 650;
    letter-spacing: -.02em;
    line-height: 1.15;
    white-space: pre-line;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    max-width: 30ch;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .6);
  }

  .empty {
    height: 100%;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    padding: 24px;
  }

  @media (min-width: 700px) {
    .short { padding: 64px 20px 20px; }
    .frame {
      max-width: 440px;
      max-height: 820px;
      border-radius: 18px;
      box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
    }
    .media { padding: 24px 20px 128px; }
    .caption { padding: 90px 22px 24px; }
  }
