:root {
  --bg: #fafafa;
  --card: #ffffff;
  --line: #dbdbdb;
  --text: #111111;
  --muted: #737373;
  --accent1: #feda75;
  --accent2: #d62976;
  --accent3: #4f5bd5;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  background: #fafafa;
  color: var(--text);
}

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

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

iframe {
    max-width: 100% !important;
}

.container {
  width: min(100%, calc(100% - 24px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  height: 68px;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  gap: 12px;
}

.brand__link {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.custom-logo-link img {
  width: auto;
  max-height: 38px;
}

.search-mini input {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: #efefef;
  padding: 10px 12px;
}

.desktop-nav {
  justify-self: end;
}

.desktop-nav ul,
.mobile-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 14px;
}

.site-main {
  padding-block: 18px 96px;
}

.stories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 18px;
}

.story-slider {
  position: relative;
  margin-bottom: 18px;
}

.story-slider__track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 4px;
}

.story-slider__track::-webkit-scrollbar,
.stories::-webkit-scrollbar {
  display: none;
}

.story-slider__btn {
     position: absolute;
    top: 42px;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 1px solid #e2e2e2;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #555;
    font-size: 25px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.story-slider__btn--prev {
  left: -8px;
}

.story-slider__btn--next {
  right: -8px;
}

.story-slider__empty {
  margin: 8px 0;
  color: var(--muted);
}

.story {
  width: 78px;
  flex-shrink: 0;
  text-align: center;
}

.story__ring {
  width: 66px;
  height: 66px;
  margin-inline: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--accent1), var(--accent2), var(--accent3));
}

.story__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.story__avatar--thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.story-slider .story {
  width: 124px;
}

.story-slider .story__ring {
  width: 106px;
  height: 106px;
}

.story-slider .story__avatar {
  width: 100px;
  height: 100px;
}

.story-slider .story__name {
  margin-top: 9px;
  font-size: 20px;
  color: #1f1f1f;
}

.story__name {
  font-size: 12px;
  margin-top: 6px;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(260px, 1fr);
  gap: 24px;
  align-items: start;
}

.side-rail-stack {
  display: grid;
  gap: 12px;
  align-content: start;
  align-items: start;
}

.index-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.insta-side-menu-wrap {
  position: relative;
  width: 260px;
}

.insta-side-menu {
  position: sticky;
  top: 86px;
  left: auto;
  width: auto;
  height: calc(100vh - 110px);
  overflow-y: auto;
}

.insta-side-menu-wrap {
  position: sticky;
  top: 86px;
  align-self: start;
  height: calc(100vh - 110px);
}

.insta-side-menu-wrap .insta-side-menu {
  position: static;
  top: auto;
  height: 100%;
}

.insta-side-menu__toggle,
.insta-side-menu__backdrop,
.insta-side-menu__mobile-head,
.insta-side-menu__close {
  display: none;
}

.insta-side-menu__brand {
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 18px;
  padding-left: 6px;
}

.insta-side-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.insta-side-menu__list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  transition: background-color 0.2s ease;
}

.insta-side-menu__list a span:first-child {
  width: 28px;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.insta-side-menu__list a span:last-child {
  font-size: 16px;
  font-weight: 600;
}

.insta-side-menu__list a:hover {
  background: #f1f1f1;
}

.insta-side-menu__list .is-active a {
  background: #FFF;
}

.post-card,
.single-card,
.suggestions__box,
.comments-wrap,
.archive-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post-card {
  overflow: hidden;
  margin-bottom: 20px;
}

.feed-loading {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0 16px;
}

.feed-sentinel {
  height: 1px;
}

.post-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #efefef;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.avatar i {
  font-size: 15px;
  line-height: 1;
}

.meta__author,
.meta__date {
  margin: 0;
}

.meta__author {
  font-size: 14px;
  font-weight: 700;
}

.meta__date {
  font-size: 12px;
  color: var(--muted);
}

.post-card__thumb {
  display: block;
  background: #f4f4f4;
}

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

.post-card__placeholder {
  height: 420px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.post-card__actions {
  display: flex;
  gap: 14px;
  padding: 12px 14px 0;
  font-size: 18px;
}

.post-card__body {
  padding: 12px 14px 16px;
}

.post-card__title {
  margin: 0 0 6px;
  font-size: 16px;
}

.post-card__body p {
  margin: 0;
  color: #262626;
  line-height: 1.6;
}

.suggestions {
  position: sticky;
  top: 86px;
  align-self: start;
}

.home .side-rail-stack > .suggestions {
  position: sticky;
  top: 86px;
  align-self: start;
}

.ranking-panel {
  background: transparent;
  margin-bottom: 16px;
}

.ranking-panel__tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid #d6d6d6;
  background: #f4f4f4;
}

.ranking-panel__tab {
  border: 0;
  border-right: 1px solid #d6d6d6;
  background: #f4f4f4;
  color: #666;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 4px;
  cursor: pointer;
}

.ranking-panel__tab:last-child {
  border-right: 0;
}

.ranking-panel__tab.is-active {
  color: #e12b44;
  background: #fbfbfb;
}

.ranking-panel__list {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}

.ranking-panel__list.is-hidden {
  display: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ranking-item__thumb {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  background: #e9e9e9;
  overflow: hidden;
}

.ranking-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-item__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 26px;
  background: linear-gradient(135deg, #cfcfcf, #aaaaaa);
}

.ranking-item__badge {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dd3049;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  z-index: 2;
}

.ranking-item__badge.is-muted {
  background: #767676;
}

.ranking-item__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
}

.ranking-item__title a {
  color: #1f1f1f;
}

.ranking-item__tags {
  margin: 6px 0 0;
  color: #7a7a7a;
  font-size: 12px;
  line-height: 1.4;
}

.ranking-panel__empty {
  color: var(--muted);
}

.suggestions__box {
  padding: 16px;
}

.suggestions__box h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.suggestions__box--cloud {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.tag-tile-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tag-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #d9d9d9;
}

.tag-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tag-tile__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d6d6d6, #bdbdbd);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.tag-tile__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.56);
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 8px;
}

.tag-tile:hover .tag-tile__overlay,
.tag-tile:focus-visible .tag-tile__overlay {
  opacity: 1;
}

.tag-tile__title {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.brand-cloud__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
}

.brand-chip {
  display: inline-block;
  background: #bdbec0;
  color: #f6f6f6;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.suggestions__box ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.suggestions__box li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.suggestions__box .brand-cloud__list {
  display: flex;
  gap: 12px 10px;
}

.suggestions__box .brand-cloud__list li {
  display: block;
}

.suggestions__box .tag-tile-grid {
  display: grid;
  gap: 8px;
}

.suggestions__box .tag-tile-grid li {
  display: block;
}

@media (hover: none) {
  .tag-tile__overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08));
    align-items: end;
    padding: 8px 6px;
  }
}

.single-wrap {
  max-width: 760px;
  margin-inline: auto;
}

.single-card {
  padding: 18px;
}

.single-card__header h1 {
  margin: 0;
  font-size: 24px;
}

.single-card__meta {
  color: var(--muted);
  margin: 6px 0 0;
}

.single-card__thumb {
  margin-top: 14px;
  border-radius: 12px;
  overflow: hidden;
}

.single-card__content {
  margin-top: 16px;
  line-height: 1.8;
}

.archive-head {
  padding: 16px;
  margin-bottom: 16px;
}

.archive-head h1,
.archive-head p {
  margin: 0;
}

.archive-head p {
  color: var(--muted);
  margin-top: 6px;
}

.tag-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.tag-archive-card__link {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: #e6e6e6;
}

.tag-archive-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-archive-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #cfcfcf, #a9a9a9);
}

.tag-archive-card__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 10px;
}

.tag-archive-card__link:hover .tag-archive-card__overlay,
.tag-archive-card__link:focus-visible .tag-archive-card__overlay {
  opacity: 1;
}

.tag-archive-card__title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
}

.comments-wrap {
  margin-top: 14px;
  padding: 16px;
}

.comment-list {
  margin: 0;
  padding-left: 20px;
}

.site-footer {
  padding: 24px 0;
  color: var(--muted);
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  display: none;
}

.mobile-nav__menu {
  height: 100%;
  justify-content: space-around;
  align-items: center;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  background: #111;
  color: #fff;
  border-radius: 999px;
}

@media (max-width: 960px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .search-mini,
  .desktop-nav,
  .suggestions {
    display: none;
  }

  .layout-grid {
    grid-template-columns: 1fr;
  }

  .index-shell {
    grid-template-columns: 1fr;
  }

  .insta-side-menu__toggle {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 80;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 0;
  }

  .insta-side-menu__toggle span {
    width: 20px;
    height: 2px;
    background: #222;
    border-radius: 99px;
  }

  .insta-side-menu__backdrop {
    position: fixed;
    inset: 0;
    z-index: 75;
    background: rgba(0, 0, 0, 0.35);
  }

  .insta-side-menu {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    width: min(86vw, 320px);
    height: 100vh;
    background: #fff;
    border-right: 0;
    border-left: 1px solid var(--line);
    padding: 14px 12px 18px;
    transform: translateX(105%);
    transition: transform 0.22s ease;
    box-shadow: -12px 0 28px rgba(0, 0, 0, 0.16);
    overflow-y: auto;
  }

  .insta-side-menu-wrap.is-open .insta-side-menu {
    transform: translateX(0);
  }

  .insta-side-menu-wrap.is-open .insta-side-menu__backdrop {
    display: block;
  }

  .insta-side-menu__mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--muted);
  }

  .insta-side-menu__close {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 22px;
    line-height: 1;
    padding: 0;
  }

  .insta-side-menu__list a {
    padding: 12px 12px;
  }

  body.insta-menu-open {
    overflow: hidden;
  }

  .mobile-nav {
    display: block;
  }

  .story-slider__btn {
    display: none;
  }

  .story-slider .story {
    width: 94px;
  }

  .story-slider .story__ring {
    width: 82px;
    height: 82px;
  }

  .story-slider .story__avatar {
    width: 76px;
    height: 76px;
  }

  .tag-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ranking-panel {
    display: none;
  }
}
