/* ==========================================================================
   Responsive layout
   ========================================================================== */

@media (max-width: 1240px) {
  .topbar-inner {
    gap: 14px;
  }

  .top-search {
    max-width: 218px;
  }

  .nav-link {
    padding-inline: 11px;
  }

  .home-grid {
    grid-template-columns: 210px minmax(0, 1fr) 290px;
    gap: 18px;
  }

  .loading-grid {
    grid-template-columns: 210px minmax(0, 1fr) 290px;
    gap: 18px;
  }

  .hero {
    padding-inline: 36px;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }

  .hero-photo-card {
    width: 265px;
    right: 9px;
  }

  .hero-photo-card img {
    height: 145px;
  }

  .hero-note-card {
    width: 171px;
  }

  .hero-people-card {
    right: -2px;
  }

  .explore-hero,
  .friends-hero {
    padding-inline: 38px;
  }

  .friend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .top-search {
    max-width: 195px;
  }

  .user-chip-name,
  .user-chip-chevron {
    display: none;
  }

  .user-chip {
    padding-right: 3px;
  }

  .home-grid,
  .loading-grid {
    grid-template-columns: 214px minmax(0, 1fr);
  }

  .home-grid {
    grid-template-areas: "left feed";
  }

  .sidebar--right,
  .loading-grid .loading-side:last-child {
    display: none;
  }

  .feed-column {
    max-width: none;
  }

  .category-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .friend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-copy h1 {
    font-size: clamp(40px, 5vw, 55px);
  }

  .auth-collage {
    transform: scale(0.92);
    transform-origin: bottom left;
  }

  .auth-photo-card {
    width: 265px;
  }

  .auth-photo-card img {
    height: 138px;
  }
}

@media (max-width: 1040px) {
  .topbar-inner {
    gap: 11px;
  }

  .brand-text small {
    display: none;
  }

  .main-nav {
    gap: 0;
  }

  .nav-link {
    padding-inline: 10px;
    font-size: 11px;
  }

  .nav-icon {
    width: 15px;
    height: 15px;
  }

  .top-search {
    max-width: 172px;
  }

  .btn--compose {
    padding-inline: 13px;
    font-size: 12px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(286px, 0.83fr);
    padding: 32px 32px;
  }

  .hero-copy h1 {
    font-size: clamp(29px, 3.35vw, 38px);
  }

  .hero-photo-card {
    width: 240px;
  }

  .hero-photo-card img {
    height: 130px;
  }

  .hero-note-card {
    width: 162px;
    padding: 15px 15px 13px;
  }

  .hero-note-card p {
    font-size: 15px;
  }

  .hero-people-card {
    display: none;
  }

  .hero-sticker {
    width: 70px;
    height: 70px;
    left: 15px;
  }

  .hero-sticker strong {
    font-size: 29px;
  }

  .explore-hero,
  .friends-hero {
    grid-template-columns: minmax(0, 1.16fr) minmax(285px, 0.84fr);
    padding: 35px 32px;
  }

  .explore-photo {
    width: 280px;
    right: 16px;
  }

  .explore-photo img {
    height: 175px;
  }

  .explore-sticker {
    left: 23px;
  }

  .explore-stat-card {
    left: -7px;
  }

  .friends-avatar-stack {
    right: 25px;
    transform: translateY(-50%) scale(0.91);
  }

  .friends-hero-note {
    right: -3px;
  }

  .profile-hero {
    padding: 31px 30px 27px;
  }

  .profile-hero-inner {
    gap: 20px;
  }

  .profile-hero-stats {
    gap: 16px;
  }

  .profile-hero-stats strong {
    font-size: 23px;
  }

  .profile-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 282px;
  }

  .post-detail-card {
    padding: 24px 25px 20px;
  }

  .comments-card {
    padding-inline: 23px;
  }
}

@media (max-width: 980px) {
  .top-search {
    display: none;
  }

  .btn--compose {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .main-nav {
    margin-left: 4px;
  }

  .home-grid,
  .loading-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-grid {
    grid-template-areas: "feed";
  }

  .sidebar--left {
    display: none;
  }

  .feed-column {
    max-width: 790px;
    width: 100%;
    margin-inline: auto;
  }

  .mobile-feed-search {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 5px 5px 5px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: rgba(255, 253, 248, 0.7);
  }

  .mobile-feed-search > .icon {
    width: 16px;
    height: 16px;
    color: var(--muted-light);
  }

  .mobile-feed-search input {
    width: 100%;
    min-width: 0;
    height: 34px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 11px;
  }

  .mobile-feed-search input::placeholder {
    color: var(--muted-light);
  }

  .mobile-feed-search button {
    flex: none;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    color: var(--cream);
    background: var(--ink);
    font-size: 10px;
    font-weight: 650;
  }

  .mobile-channels {
    display: flex;
    gap: 5px;
    margin: 0 0 12px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-channels::-webkit-scrollbar {
    display: none;
  }

  .mobile-channel {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--muted);
    background: rgba(255, 253, 248, 0.54);
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-channel.is-active {
    color: var(--cream);
    border-color: var(--ink);
    background: var(--ink);
  }

  .explore-hero,
  .friends-hero {
    min-height: auto;
    padding: 33px 30px;
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .explore-copy h1,
  .friends-hero-copy h1 {
    font-size: clamp(33px, 5vw, 44px);
  }

  .explore-photo {
    width: 250px;
    right: 0;
    bottom: -27px;
  }

  .explore-photo img {
    height: 158px;
  }

  .explore-sticker {
    top: 22px;
    left: 7px;
    width: 66px;
    height: 66px;
  }

  .explore-stat-card {
    width: 138px;
    padding: 12px;
    bottom: 22px;
    left: -19px;
  }

  .explore-stat-card strong {
    font-size: 34px;
  }

  .friends-avatar-stack {
    right: 12px;
    transform: translateY(-50%) scale(0.82);
  }

  .friends-hero-orbit--one {
    transform: scale(0.88);
  }

  .friends-hero-orbit--two {
    transform: scale(0.88);
  }

  .friends-hero-heart {
    right: 1px;
  }

  .friends-hero-note {
    display: none;
  }

  .explore-lower {
    grid-template-columns: minmax(0, 1fr);
  }

  .active-people-card .people-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
  }

  .person-row + .person-row {
    border-top: 0;
  }

  .active-people-card .person-row:nth-child(n + 3) {
    border-top: 1px solid rgba(24, 44, 39, 0.055);
  }

  .profile-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .detail-aside .community-guideline-card {
    grid-column: span 2;
  }

  .auth-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 40px 28px;
    background:
      radial-gradient(circle at 14% 3%, rgba(28, 155, 131, 0.15), transparent 23rem),
      radial-gradient(circle at 94% 9%, rgba(255, 201, 74, 0.21), transparent 23rem),
      #f7f2e8;
  }

  .auth-panel::before {
    display: none;
  }

  .auth-mobile-brand {
    display: block;
  }

  .auth-panel-inner {
    max-width: 410px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 253, 248, 0.75);
    box-shadow: 0 22px 55px rgba(30, 51, 43, 0.08);
    backdrop-filter: blur(18px);
  }
}

@media (max-width: 900px) {
  .container {
    width: calc(100% - 32px);
  }

  body {
    padding-bottom: 74px;
  }

  body.auth-active {
    padding-bottom: 0;
  }

  .topbar-inner {
    height: 66px;
  }

  .topbar .main-nav {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .brand-pi {
    font-size: 25px;
  }

  .brand-text strong {
    font-size: 16px;
  }

  .brand-text small {
    display: block;
    margin-top: 2px;
    font-size: 6.5px;
  }

  .icon-btn {
    width: 39px;
    height: 39px;
  }

  .user-chip {
    padding: 2px;
  }

  .user-chip .avatar {
    width: 35px;
    height: 35px;
  }

  .page {
    padding-top: 16px;
    padding-bottom: 94px;
  }

  .page-stack {
    gap: 17px;
  }

  .site-footer {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    right: 10px;
    bottom: 9px;
    left: 10px;
    z-index: 300;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 64px;
    padding: 7px 10px calc(6px + env(safe-area-inset-bottom));
    border: 1px solid rgba(24, 44, 39, 0.11);
    border-radius: 21px;
    background: rgba(255, 253, 248, 0.91);
    box-shadow: 0 18px 38px rgba(20, 39, 32, 0.15);
    backdrop-filter: blur(20px);
  }

  .mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    color: var(--muted-light);
    font-size: 7.5px;
    font-weight: 600;
    line-height: 1.2;
  }

  .mobile-nav-link .icon {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-link .avatar {
    width: 21px;
    height: 21px;
    font-size: 8px;
  }

  .mobile-nav-link.is-active {
    color: var(--ink);
  }

  .mobile-nav-link.is-active .icon {
    color: var(--teal);
  }

  .mobile-compose {
    display: flex;
    width: 49px;
    height: 49px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    align-self: start;
    margin-top: -20px;
    border: 4px solid var(--bg);
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(140deg, var(--coral), #ff9856);
    box-shadow: 0 12px 25px rgba(215, 72, 43, 0.27);
  }

  .mobile-compose .icon {
    width: 21px;
    height: 21px;
  }

  .hero {
    display: block;
    min-height: auto;
    padding: 31px 28px 26px;
    border-radius: 27px;
  }

  .hero-collage {
    display: none;
  }

  .hero-copy {
    max-width: 600px;
    padding-right: 0;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 5vw, 38px);
  }

  .hero-description {
    max-width: 540px;
  }

  .hero-meta-row {
    margin-top: 20px;
  }

  .home-grid {
    margin-top: 15px;
  }

  .feed-heading {
    margin-top: 18px;
  }

  .post-card {
    padding: 17px 18px 13px;
  }

  .post-title {
    font-size: 18px;
  }

  .explore-hero,
  .friends-hero {
    display: block;
    min-height: auto;
    padding: 31px 28px;
    border-radius: 27px;
  }

  .explore-art,
  .friends-hero-art {
    display: none;
  }

  .explore-copy {
    max-width: 650px;
  }

  .explore-copy h1 {
    font-size: clamp(36px, 6.2vw, 50px);
  }

  .friends-hero-copy h1 {
    font-size: clamp(34px, 6vw, 48px);
  }

  .friends-summary {
    width: calc(100% - 26px);
    margin-top: -21px;
  }

  .friends-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .friend-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .friend-tabs::-webkit-scrollbar {
    display: none;
  }

  .friend-tab {
    flex: none;
  }

  .friends-toolbar-note {
    display: none;
  }

  .tab-heading {
    padding-top: 2px;
  }

  .profile-hero {
    padding: 29px 26px 25px;
    border-radius: 27px;
  }

  .profile-avatar-large .avatar {
    width: 86px;
    height: 86px;
    font-size: 30px;
  }

  .profile-hero-inner {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .profile-hero-stats {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 27px;
    margin-top: 4px;
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 248, 232, 0.13);
  }

  .profile-hero-stats div {
    text-align: left;
  }

  .profile-hero-stats strong {
    font-size: 24px;
  }

  .post-detail-card {
    border-radius: 25px;
  }

  .detail-breadcrumb {
    padding-bottom: 2px;
  }

  .toast-stack {
    right: 16px;
    bottom: 89px;
    left: 16px;
    align-items: center;
  }

  .toast {
    max-width: min(380px, 100%);
  }
}

@media (max-width: 760px) {
  .category-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-tile {
    min-height: 172px;
    padding: 14px;
  }

  .category-tile-index {
    margin-top: 15px;
  }

  .explore-banner {
    flex-wrap: wrap;
    gap: 14px;
    padding: 22px;
  }

  .explore-banner .btn {
    width: 100%;
    margin-left: 0;
  }

  .explore-banner-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 31px;
  }

  .explore-banner h2 {
    font-size: 18px;
  }

  .friends-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(100% - 18px);
  }

  .friends-summary-item:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .friends-summary-item:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .friends-summary-item {
    padding: 13px 15px;
  }

  .friend-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .friend-card {
    min-height: 210px;
  }

  .profile-layout {
    gap: 18px;
  }

  .profile-aside,
  .detail-aside {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-aside .community-guideline-card {
    grid-column: auto;
  }

  .profile-hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }

  .profile-avatar-large {
    margin-top: 0;
  }

  .profile-hero-copy {
    flex: 1 1 250px;
  }

  .profile-hero-stats {
    flex: 1 1 100%;
  }

  .profile-name-line h1 {
    font-size: 27px;
  }

  .post-detail-card {
    padding: 20px 18px 16px;
  }

  .detail-title {
    margin-top: 16px;
    font-size: 24px;
  }

  .detail-body {
    font-size: 13px;
    line-height: 1.9;
  }

  .comments-card {
    padding: 19px 17px 14px;
  }

  .comments-header-note {
    display: none;
  }

  .comment-form {
    padding: 10px;
  }

  .comment-form > .avatar {
    display: none;
  }

  .comment-form-foot > span {
    display: none;
  }

  .detail-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
    gap: 6px;
  }

  .like-button--large {
    flex: 1;
    justify-content: center;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .section-heading h2 {
    font-size: 22px;
  }

  .active-people-card .people-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .active-people-card .person-row:nth-child(n + 2) {
    border-top: 1px solid rgba(24, 44, 39, 0.055);
  }

  .modal-overlay {
    padding: 16px;
  }

  .modal-card {
    max-height: calc(100vh - 32px);
    padding: 21px 20px;
    border-radius: 24px;
  }

  .composer-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .composer-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .composer-footer-actions {
    width: 100%;
  }

  .composer-footer-actions .btn {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 26px);
  }

  .topbar-inner {
    height: 62px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 12px;
  }

  .brand-pi {
    font-size: 23px;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .brand-text small {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .icon-btn {
    width: 37px;
    height: 37px;
  }

  .icon-btn .icon {
    width: 18px;
    height: 18px;
  }

  .notification-badge {
    top: 0;
    right: 0;
    border-color: rgba(247, 242, 233, 0.95);
  }

  .user-chip .avatar {
    width: 33px;
    height: 33px;
  }

  .notification-panel {
    position: fixed;
    top: 70px;
    right: 13px;
    left: 13px;
    width: auto;
    max-height: min(68vh, 520px);
    border-radius: 20px;
  }

  .hero {
    padding: 26px 21px 23px;
    border-radius: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(26px, 7vw, 34px);
    line-height: 1.24;
  }

  .hero-copy .eyebrow {
    margin-bottom: 11px;
    font-size: 8px;
    letter-spacing: 0.11em;
  }

  .hero-description {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.8;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-actions .btn {
    min-height: 39px;
    padding: 8px 14px;
    font-size: 11px;
  }

  .hero-actions .btn .icon {
    width: 15px;
    height: 15px;
  }

  .hero-meta-row {
    gap: 8px;
    margin-top: 17px;
    font-size: 8.5px;
  }

  .hero-meta-row strong {
    font-size: 15px;
  }

  .hero-watermark {
    right: -10px;
    bottom: -50px;
    font-size: 210px;
  }

  .composer-card {
    padding: 10px 11px 8px;
    border-radius: 19px;
  }

  .composer-main {
    gap: 9px;
  }

  .composer-main .avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .composer-placeholder strong {
    font-size: 11px;
  }

  .composer-placeholder small {
    font-size: 8px;
  }

  .composer-bar-caption {
    display: none;
  }

  .composer-mini-submit {
    margin-left: auto;
  }

  .mobile-feed-search {
    margin-top: 10px;
  }

  .mobile-channels {
    margin-bottom: 8px;
  }

  .feed-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    margin-top: 16px;
    margin-bottom: 11px;
  }

  .feed-heading h2 {
    font-size: 20px;
  }

  .feed-heading p {
    max-width: 290px;
    font-size: 9.5px;
  }

  .sort-tabs {
    align-self: stretch;
  }

  .sort-tab {
    flex: 1;
    padding: 6px 7px;
    text-align: center;
  }

  .post-card {
    padding: 15px 14px 11px;
    border-radius: 20px;
  }

  .post-head {
    gap: 8px;
  }

  .post-author-name {
    max-width: 130px;
    font-size: 12px;
  }

  .post-meta-line {
    font-size: 8.5px;
  }

  .post-head-right .category-pill {
    max-width: none;
    overflow: visible;
    padding: 4px 7px;
    text-overflow: clip;
    white-space: nowrap;
  }

  .post-detail-card .post-head-right .category-pill {
    display: none;
  }

  .post-title {
    margin-top: 11px;
    font-size: 17px;
    line-height: 1.48;
  }

  .post-excerpt {
    font-size: 11px;
    line-height: 1.8;
  }

  .post-cover {
    margin-top: 10px;
    border-radius: 13px;
    aspect-ratio: 1.8 / 1;
  }

  .post-tags {
    margin-top: 9px;
    gap: 4px;
  }

  .tag {
    padding: 4px 7px;
    font-size: 9.5px;
  }

  .post-footer {
    margin-top: 10px;
    padding-top: 8px;
  }

  .post-actions {
    gap: 13px;
  }

  .post-action {
    font-size: 9.5px;
  }

  .post-action .action-icon {
    width: 14px;
    height: 14px;
  }

  .post-views {
    display: none;
  }

  .feed-end {
    padding-top: 20px;
  }

  .explore-hero,
  .friends-hero {
    padding: 26px 21px;
    border-radius: 24px;
  }

  .explore-copy h1,
  .friends-hero-copy h1 {
    margin-top: 13px;
    font-size: clamp(29px, 8.4vw, 39px);
  }

  .explore-copy > p,
  .friends-hero-copy > p {
    font-size: 11px;
    line-height: 1.8;
  }

  .explore-topic-chips {
    margin-top: 16px;
  }

  .category-tile-grid {
    gap: 9px;
  }

  .category-tile {
    min-height: 158px;
    padding: 12px;
    border-radius: 18px;
  }

  .category-tile-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
  }

  .category-tile-index {
    margin-top: 15px;
  }

  .category-tile h3 {
    font-size: 16px;
  }

  .category-tile p {
    font-size: 8.5px;
  }

  .category-tile-count {
    font-size: 8.5px;
  }

  .topic-cloud-card {
    padding: 18px 15px;
    min-height: 0;
  }

  .topic-chip {
    padding: 7px 11px;
    font-size: 11px;
  }

  .topic-chip--1 {
    font-size: 14px;
  }

  .topic-cloud-foot {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 18px;
  }

  .explore-banner {
    padding: 18px;
  }

  .friends-summary {
    width: calc(100% - 8px);
    margin-top: -14px;
    border-radius: 18px;
  }

  .friends-summary-item {
    padding: 12px 13px;
  }

  .friends-summary-item strong {
    font-size: 22px;
  }

  .friend-tab {
    padding: 7px 11px;
    font-size: 9.5px;
  }

  .tab-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .tab-heading h2 {
    font-size: 21px;
  }

  .tab-heading .text-button {
    font-size: 10px;
  }

  .friend-card {
    padding: 16px;
    border-radius: 20px;
  }

  .profile-page {
    gap: 13px;
  }

  .profile-breadcrumb,
  .detail-breadcrumb {
    font-size: 9px;
  }

  .profile-hero {
    padding: 23px 19px 21px;
    border-radius: 24px;
  }

  .profile-avatar-large .avatar {
    width: 73px;
    height: 73px;
    font-size: 25px;
    border-width: 3px;
  }

  .profile-hero-copy {
    flex: 1 1 190px;
  }

  .profile-name-line h1 {
    font-size: 25px;
  }

  .profile-badge {
    height: 19px;
    font-size: 7px;
  }

  .profile-handle {
    font-size: 8.5px;
    line-height: 1.7;
  }

  .profile-bio {
    font-size: 10.5px;
  }

  .profile-actions .btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 9.5px;
  }

  .profile-relation {
    min-height: 32px;
    font-size: 9px;
  }

  .profile-hero-stats {
    gap: 23px;
    padding-top: 12px;
  }

  .profile-hero-stats strong {
    font-size: 21px;
  }

  .profile-posts .feed-heading {
    flex-direction: row;
    align-items: flex-end;
  }

  .profile-posts .feed-heading .btn {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 9.5px;
  }

  .post-detail-card {
    padding: 17px 14px 14px;
    border-radius: 21px;
  }

  .detail-title {
    font-size: 21px;
  }

  .detail-body {
    font-size: 12.5px;
  }

  .detail-image-wrap {
    border-radius: 15px;
  }

  .detail-actions {
    gap: 4px;
  }

  .like-button--large {
    padding: 7px 8px;
    font-size: 9px;
  }

  .like-button--large .action-label {
    display: none;
  }

  .comments-card {
    padding: 16px 14px 11px;
  }

  .comments-header h2 {
    font-size: 18px;
  }

  .comments-header {
    padding-bottom: 12px;
  }

  .comment-form {
    border-radius: 15px;
  }

  .comment-item {
    padding: 13px 0;
  }

  .comment-body {
    font-size: 10.5px;
  }

  .author-side-card,
  .anonymous-side-card,
  .detail-side-card,
  .community-guideline-card {
    border-radius: 20px;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card,
  .composer-modal .modal-card {
    width: 100%;
    max-height: 93vh;
    padding: 21px 17px calc(20px + env(safe-area-inset-bottom));
    border-radius: 25px 25px 0 0;
  }

  .modal-heading h2 {
    font-size: 21px;
  }

  .modal-heading p {
    font-size: 9.5px;
  }

  .composer-form {
    gap: 12px;
    padding-top: 14px;
  }

  .category-option-inner {
    padding: 6px 8px;
    font-size: 9px;
  }

  .text-input--body {
    min-height: 130px;
  }

  .upload-placeholder {
    flex-wrap: wrap;
  }

  .upload-placeholder > div {
    flex: 1 1 150px;
  }

  .upload-placeholder > .btn {
    width: 100%;
    margin-left: 53px;
  }

  .upload-preview img {
    height: 150px;
  }

  .composer-footer > p {
    font-size: 7.5px;
  }

  .auth-panel {
    padding: 22px 14px;
  }

  .auth-panel-inner {
    padding: 22px 17px;
    border-radius: 23px;
  }

  .auth-heading {
    margin: 22px 0 17px;
  }

  .auth-heading h2 {
    font-size: 25px;
  }

  .auth-heading p {
    font-size: 9.5px;
  }

  .auth-form {
    gap: 10px;
  }

  .auth-submit {
    min-height: 46px;
  }

  .demo-entry {
    padding: 11px;
  }

  .demo-entry-icon {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .auth-demo-hint {
    font-size: 8px;
  }

  .error-page {
    margin: 30px auto;
    padding: 48px 22px;
    border-radius: 22px;
  }

  .error-page h1 {
    font-size: 24px;
  }

  .error-actions {
    flex-wrap: wrap;
  }

  .fatal-card {
    padding: 28px 22px;
    border-radius: 23px;
  }

  .fatal-card h1 {
    font-size: 23px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .brand-text strong {
    font-size: 14.5px;
  }

  .topbar-actions {
    gap: 3px;
  }

  .hero-meta-row i {
    display: none;
  }

  .hero-meta-row {
    gap: 10px;
  }

  .category-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-tile {
    min-height: 150px;
    padding: 11px;
  }

  .category-tile-top {
    align-items: flex-start;
  }

  .category-tile-index {
    margin-top: 12px;
  }

  .category-tile h3 {
    font-size: 15px;
  }

  .category-tile p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 8.5px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .category-tile-count {
    font-size: 7.5px;
  }

  .friend-card-actions .btn {
    flex: 1;
  }

  .profile-hero-inner {
    gap: 11px;
  }

  .profile-avatar-large .avatar {
    width: 65px;
    height: 65px;
  }

  .profile-name-line h1 {
    font-size: 23px;
  }

  .post-head-right .category-pill {
    max-width: none;
  }

  .post-author-name {
    max-width: 110px;
  }

  .post-actions {
    gap: 10px;
  }

  .auth-panel-inner {
    padding: 19px 14px;
  }

  .auth-tab {
    padding: 8px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
