:root {
  color-scheme: light;
  --ink: #151c21;
  --muted: #52656e;
  --line: #e9edf0;
  --accent: #009fd0;
  --accent-text: #06799f;
  --accent-fill: #007aa6;
  --surface: #fff;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f2f5f7;
  color: var(--ink);
}

button, summary, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent-fill);
  outline-offset: 3px;
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 23px;
  height: 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feed {
  min-height: 100svh;
  margin-inline: auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 47px;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: #008bb8;
  font-size: clamp(24px, 6vw, 28px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.055em;
  line-height: 1;
}

.icon-button, .bottom-nav > * {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.icon-button:hover {
  background: #eff6f8;
}

.menu {
  position: relative;
  z-index: 1;
}

.menu summary {
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: max-content;
  min-width: 158px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px #132b4026;
}

.menu-panel > * {
  display: flex;
  align-items: center;
  min-height: 40px;
  width: 100%;
  padding: 7px 11px;
  border: 0;
  background: none;
  border-radius: 6px;
  text-align: start;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
}

.menu-panel > *:hover {
  background: #eff6f8;
}

.profiles {
  padding: 10px 13px 11px;
  border-bottom: 4px solid #f5f6f7;
}

.profiles-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: clamp(10px, 2.75vw, 12px);
  line-height: 1.2;
}

.profile-ring {
  display: block;
  width: min(100%, 58px);
  aspect-ratio: 1;
  padding: 2px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.profile img, .creator-photo {
  display: block;
  object-fit: cover;
  border-radius: 50%;
  background: #dfe9ef;
}

.profile img {
  width: 100%;
  height: 100%;
}

.post-copy {
  padding: 11px 16px 10px;
}

.creator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-photo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.creator-name {
  display: grid;
  gap: 2px;
  line-height: 1.13;
}

.creator-name strong {
  font-size: 15px;
}

.creator-name span, .post-visibility {
  font-size: 12px;
  color: var(--muted);
}

.post-visibility {
  margin-inline-start: auto;
}

.caption {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  text-wrap: pretty;
}

.tags {
  color: var(--accent-text);
}

.media {
  --media-blur: 6px;
  position: relative;
  isolation: isolate;
  min-height: 330px;
  aspect-ratio: .92;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #242d35;
  color: #fff;
}

/* The cover art fills the sides of portrait video. */
.media::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -24px;
  background: url("assets/cover.webp") center / cover no-repeat;
  filter: blur(9px);
  opacity: .72;
  pointer-events: none;
}

.media-preview, .media-cover, .media-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.media-preview, .media-cover {
  filter: blur(var(--media-blur));
}

.media-preview {
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.media-cover {
  object-fit: cover;
  object-position: 50% 43%;
  transform: scale(1.075);
}

.media-shade {
  background: linear-gradient(160deg, #1118213d, #11182166 55%, #0b131d78);
}

.media-overlay {
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  width: min(100%, 350px);
  padding: 18px;
  text-align: center;
}

.media-overlay h1 {
  margin: 11px 0 0;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.2;
  text-shadow: 0 1px 8px #111821a6;
}

.media-overlay p {
  margin: 7px 0 0;
  color: #f2f6f8;
  font-size: 13px;
  line-height: 1.45;
  text-wrap: balance;
  text-shadow: 0 1px 6px #111821ce;
}

.lock-badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid #39c8ee;
  border-radius: 50%;
  background: #139dd625;
}

.lock-badge .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.15;
}

.unlock {
  min-height: 46px;
  min-width: 188px;
  margin-top: 17px;
  padding: 10px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #70d8f080;
  border-radius: 999px;
  background: linear-gradient(#007fae, #00729c);
  box-shadow: 0 7px 24px #00b4eb50, inset 0 1px #b2edff30;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .025em;
  text-transform: uppercase;
  cursor: pointer;
}

.unlock[href]:hover {
  background: #006789;
}

.unlock[aria-disabled="true"] {
  cursor: default;
}

.unlock:focus-visible {
  outline-color: #fff;
}

.media-overlay .sponsored-note {
  margin-top: 8px;
  font-size: 11px;
}

.post-actions {
  padding: 3px 11px 4px;
  display: flex;
  gap: 1px;
  align-items: center;
}

.reaction[aria-pressed="true"] {
  color: var(--accent-fill);
}

.reaction[aria-pressed="true"] .icon {
  fill: currentColor;
}

.bookmark {
  margin-inline-start: auto;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  min-height: 54px;
  margin-top: auto;
  padding: 3px 6px max(3px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: #60737e;
}

.bottom-nav > * {
  min-width: 0;
}

.bottom-nav > :hover {
  color: var(--accent-text);
}

.bottom-nav > :first-child {
  color: var(--accent-fill);
}

.video-shortcut span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--accent-fill);
  color: #fff;
}

@media (min-width: 560px) {
  body {
    padding: 21px 16px;
  }

  .feed {
    width: min(100%, 478px);
    min-height: 0;
    border: 1px solid #e2e9ed;
    border-radius: 15px;
    box-shadow: 0 12px 42px #21374b0d;
  }

  .topbar {
    min-height: 51px;
  }

  .profiles {
    padding-block: 12px;
  }

  .post-copy {
    padding-block: 12px;
  }

  .media {
    height: clamp(365px, 53svh, 505px);
    aspect-ratio: auto;
  }

  .bottom-nav {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
