@font-face {
  font-family: "Inter";
  src: url("/assets/img/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #0b8cff;
  --text: #090909;
  --muted: #7e7e7e;
  --comment: #f0f1f6;
  --action: #f3f4f9;
}

* {
  box-sizing: border-box;
}

html {
  background: #f5f6f8;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 280px;
  color: var(--text);
  background: #f5f6f8;
  font-family: "Inter", Arial, sans-serif;
  font-synthesis: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.mobile-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-height: 106px;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  background: #fff;
  box-shadow: 0 4px 9.6px rgb(0 0 0 / 10%);
}

.topbar__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 40px;
}

.facebook-logo {
  width: 40px;
  height: 40px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 19px;
}

.icon-button,
.menu-button,
.nav-button,
.post-options {
  display: grid;
  place-items: center;
}

.search-button {
  width: 38px;
  height: 40px;
}

.search-button img {
  width: 38px;
  height: 40px;
}

.menu-button {
  width: 25px;
  height: 40px;
}

.menu-button img {
  width: 25px;
  height: 12px;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 30px;
}

.nav-button {
  width: 30px;
  height: 30px;
}

.nav-button img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.feed {
  padding: 40px 20px;
}

.post-card {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 14px rgb(0 0 0 / 10%);
}

.post-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 10px 7px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 4px 4px rgb(0 0 0 / 6%);
}

.post-author {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.post-author__avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author__details {
  min-width: 0;
  margin-left: 10px;
}

.post-author__details h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 19px;
}

.post-author__details time {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 17px;
}

.post-options {
  width: 24px;
  height: 24px;
  margin-left: auto;
}

.post-options img {
  width: 18px;
}

.post-copy {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.post-copy p {
  margin: 0 0 19px;
}

.post-copy p:last-child,
.post-copy__lead:last-child {
  margin-bottom: 0;
}

.post-copy__lead {
  margin-bottom: 0;
}

.expanded-story:not([hidden]) {
  display: inline;
}

#expanded-story-rest:not([hidden]) {
  display: block;
}

#expanded-story-rest {
  margin-top: 19px;
}

.see-more {
  display: inline;
  color: #696969;
  font-weight: 500;
  white-space: nowrap;
}

.see-more:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}

.post-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.post-reactions {
  display: flex;
  align-items: center;
  height: 18px;
}

.post-reactions img {
  width: 47px;
  height: 18px;
}

.post-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 6px 0;
}

.post-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 30px;
  border-radius: 100px;
  color: rgb(9 9 9 / 60%);
  background: var(--action);
  font-size: 12px;
  font-weight: 500;
}

.post-actions button.is-liked {
  color: #078bfa;
  background: #e7f3ff;
  font-weight: 700;
}

.post-actions button.is-liked img {
  filter: invert(42%) sepia(94%) saturate(3157%) hue-rotate(190deg) brightness(101%) contrast(101%);
}

.post-actions img {
  width: 18px;
  height: 18px;
}

.comments {
  padding: 24px 10px 27px;
}

.comments-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 19px;
}

.comments-sort img {
  width: 13px;
  height: 8px;
}

.comment-composer,
.reply-composer {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.comment-composer {
  margin-bottom: 24px;
}

.comment-composer__avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #eef0f4;
}

.comment-composer__avatar img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  opacity: 0.68;
}

.comment-composer__field {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 40px;
  padding: 7px 7px 7px 13px;
  border-radius: 20px;
  background: var(--comment);
}

.comment-composer textarea,
.reply-composer textarea {
  flex: 1;
  min-width: 0;
  height: 25px;
  max-height: 120px;
  padding: 3px 0;
  overflow-y: auto;
  resize: none;
  border: 0;
  outline: 0;
  color: #151515;
  background: transparent;
  font: 450 14px/1.25 "Inter", Arial, sans-serif;
}

.comment-composer textarea::placeholder,
.reply-composer textarea::placeholder {
  color: #777b82;
  opacity: 1;
}

.comment-composer__send {
  flex: 0 0 auto;
  display: grid;
  width: 26px;
  height: 26px;
  margin-left: 5px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1689ef;
  font-size: 13px;
  line-height: 1;
  transform: rotate(-22deg);
}

.reply-composer {
  margin-left: 48px;
  width: calc(100% - 48px);
}

.reply-composer__main {
  min-width: 0;
}

.reply-composer__cancel {
  margin: 4px 0 0 13px;
  color: #6f737a;
  font-size: 11px;
  font-weight: 600;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
}

.comment.is-reply {
  grid-template-columns: 40px minmax(0, 1fr);
  margin-left: 48px;
}

.comment.is-reply::before {
  position: absolute;
  left: -21px;
  top: 8px;
  content: "↳";
  color: #333;
  font-size: 18px;
}

.comment__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment__avatar--user {
  padding: 8px;
  background: #eef0f4;
  object-fit: contain;
  opacity: 0.72;
}

.comment__content {
  min-width: 0;
}

.comment__bubble {
  position: relative;
  padding: 5px 10px;
  border-radius: 18px;
  background: var(--comment);
  font-size: 14px;
  font-weight: 450;
  line-height: 1.25;
}

.comment__name {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 17px;
}

.verified {
  display: inline-grid;
  width: 12px;
  height: 12px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #1689ef;
  font-size: 8px;
  line-height: 1;
}

.comment__role {
  display: block;
  margin-top: 1px;
  color: #727272;
  font-size: 9px;
  font-weight: 500;
  line-height: 11px;
}

.comment__text {
  margin: 1px 0 0;
  white-space: pre-line;
}

.comment__install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin-top: 12px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #1689ef;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

.comment__install::before {
  display: grid;
  width: 12px;
  height: 12px;
  place-items: center;
  border-radius: 50%;
  content: "✓";
  color: #1689ef;
  background: #fff;
  font-size: 8px;
}

.comment__meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 17px;
  color: #7d7d7d;
  font-size: 12px;
  font-weight: 450;
  line-height: 15px;
}

.comment__meta .like {
  margin-left: 8px;
  color: #078bfa;
  font-weight: 600;
}

.comment__meta .like.is-liked {
  color: #006fda;
  font-weight: 800;
}

.comment__count {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.comment__count.is-empty {
  display: none;
}

.comment__count img {
  width: 14px;
  height: 14px;
}

.comment__proof-button {
  display: block;
  width: fit-content;
  margin-top: 8px;
  border-radius: 7px;
  cursor: zoom-in;
}

.comment__proof {
  width: auto;
  max-width: 93px;
  max-height: 166px;
  border-radius: 7px;
  object-fit: contain;
}

.comment__proof-button:focus-visible {
  outline: 3px solid #1689ef;
  outline-offset: 3px;
}

.install-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  margin-left: 48px;
  padding: 5px 10px;
  border-radius: 10px;
  background: var(--comment);
}

.install-strip__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  color: #fff;
  background: #1689ef;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

.install-strip__approved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #727272;
  font-size: 9px;
  white-space: nowrap;
}

.install-strip__approved::before {
  display: grid;
  width: 12px;
  height: 12px;
  place-items: center;
  border-radius: 50%;
  content: "✓";
  color: white;
  background: #1689ef;
  font-size: 8px;
}

.modal-open {
  overflow: hidden;
}

.photo-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  padding: 50px 18px 28px;
  place-items: center;
  background: rgb(0 0 0 / 92%);
  animation: photo-modal-in 160ms ease-out;
}

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

.photo-modal__image {
  width: auto;
  max-width: min(100%, 760px);
  max-height: calc(100vh - 78px);
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 12px 50px rgb(0 0 0 / 45%);
}

.photo-modal__close {
  position: fixed;
  z-index: 1;
  top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgb(255 255 255 / 15%);
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}

@keyframes photo-modal-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 350px) {
  .topbar {
    padding-inline: 16px;
  }

  .feed {
    padding: 28px 12px;
  }

  .post-copy {
    font-size: 15px;
  }

  .comment.is-reply {
    margin-left: 30px;
  }

  .reply-composer {
    margin-left: 30px;
    width: calc(100% - 30px);
  }

  .install-strip {
    margin-left: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
