@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.chiizu-wordmark {
  font-family: "Bebas Neue", "Arial Narrow", sans-serif;
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 0.92;
  user-select: none;
}

.chiizu-wordmark--header {
  font-size: clamp(1.45rem, 6cqw, 1.75rem);
  letter-spacing: 0.1em;
}

.chiizu-wordmark--hero {
  width: 100%;
  font-size: clamp(3.4rem, 17.5vw, 5.2rem);
  letter-spacing: 0.08em;
  text-align: center;
}

.chiizu-wordmark--auth {
  width: 100%;
  font-size: clamp(2.6rem, 14vw, 4rem);
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 4px;
}

.chiizu-wordmark--dark {
  color: #111;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e8e8e8;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.phone-frame {
  container-type: inline-size;
  container-name: app;
  width: 100%;
  max-width: 390px;
  aspect-ratio: 9 / 16;
  max-height: 100vh;
  max-height: 100dvh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(198, 230, 249, 0.35);
  --carousel-slide-size: clamp(268px, 84cqw, 358px);
  --carousel-slide-half: calc(var(--carousel-slide-size) / 2);
  --film-post-size: clamp(214px, 74cqw, 308px);
  --friend-avatar-size: clamp(54px, 17cqw, 68px);
  --nav-clearance: calc(78px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(ellipse 55% 85% at 0% 50%, #FCFCDF 0%, transparent 62%),
    radial-gradient(ellipse 55% 85% at 100% 50%, #FCFCDF 0%, transparent 62%),
    radial-gradient(ellipse 120% 80% at 50% 45%, #C6E6F9 0%, rgba(198, 230, 249, 0.6) 50%, transparent 75%),
    #C6E6F9;
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 8% 50%, rgba(252, 252, 223, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 92% 50%, rgba(252, 252, 223, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 50% 40%, rgba(198, 230, 249, 0.4) 0%, transparent 48%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}

.app-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 12px;
  flex-shrink: 0;
}

.app-header .logo,
.app-header .chiizu-wordmark--header {
  flex-shrink: 0;
}

.app-header .page-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.app-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.activity-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.activity-btn:hover,
.activity-btn:focus-visible {
  background: rgba(134, 232, 232, 0.16);
  color: #86E8E8;
}

.activity-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #F8A8C8;
  color: #1a1a1a;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.activity-badge[hidden] {
  display: none;
}

.activity-panel {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.activity-panel[hidden] {
  display: none;
}

.activity-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
}

.activity-panel-sheet {
  position: relative;
  width: min(100%, 390px);
  max-height: min(78vh, 560px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 0 0;
  background: #1a1a1a;
  border: 1px solid rgba(134, 232, 232, 0.18);
  border-bottom: none;
}

.activity-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
}

.activity-panel-title {
  margin: 0;
  font-size: 0.95rem;
}

.activity-panel-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.2rem;
  cursor: pointer;
}

.activity-panel-list {
  overflow-y: auto;
  padding: 0 14px 18px;
}

.activity-panel-empty {
  margin: 0;
  padding: 24px 18px 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
}

.activity-item {
  display: flex;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 8px;
}

.activity-item-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.activity-item-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-item-body {
  min-width: 0;
  flex: 1;
}

.activity-item-text {
  margin: 0 0 4px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.activity-item-meta {
  margin: 0;
  font-size: 0.64rem;
  color: rgba(255, 255, 255, 0.42);
}

.activity-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.activity-action-btn {
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.activity-action-accept {
  background: #86E8E8;
  color: #1a1a1a;
}

.activity-action-decline {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}

.activity-item-status {
  margin: 8px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
}

.activity-item-status.is-accepted {
  color: #86E8E8;
}

.activity-item-status.is-declined {
  color: rgba(255, 255, 255, 0.42);
}

.profile-private-banner {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.profile-private-banner-title {
  margin: 0 0 4px;
  font-size: 0.86rem;
  font-weight: 700;
}

.profile-private-banner-text {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.45;
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: #F8D8E2;
  color: #72C7E8;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(64, 168, 216, 0.15);
  overflow: hidden;
  position: relative;
  padding: 0;
}

.avatar-btn .avatar-image,
.profile-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.avatar-btn .avatar-initials,
.profile-avatar .avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.app-main {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px var(--nav-clearance, 96px);
  -webkit-overflow-scrolling: touch;
}

.app-main.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: var(--nav-clearance, 96px);
}

.placeholder-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 280px;
  box-shadow: 0 4px 16px rgba(64, 168, 216, 0.12);
}

.placeholder-card h1 {
  font-size: 1.2rem;
  color: #72C7E8;
  margin-bottom: 10px;
}

.placeholder-card p {
  font-size: 0.88rem;
  color: #8A8A8A;
  line-height: 1.5;
}

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

/* Home — full dark theme + hero carousel */
.home-page.phone-frame {
  background: #050505;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.home-page.phone-frame::before {
  display: none;
}

.home-page .app-header {
  background: #050505;
  padding-bottom: 8px;
}

.home-page .app-header .logo,
.home-page .app-header .chiizu-wordmark--header {
  color: #fff;
}

.home-page .avatar-btn {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 12px rgba(134, 232, 232, 0.2);
}

.home-page .app-main {
  padding: 0 0 var(--nav-clearance, 96px);
  background: #050505;
}

.home-page .bottom-nav-glass {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -1px 2px rgba(255, 255, 255, 0.06);
}

.home-page .bottom-nav-dock {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.home-page .nav-item.active svg:not(.nav-chat-icon):not(.nav-films-icon):not(.nav-profile-icon) {
  stroke: #86E8E8;
}

/* Profile page — dark background */
.profile-page.phone-frame {
  background: #050505;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.profile-page.phone-frame::before {
  display: none;
}

.profile-page .app-header {
  background: #050505;
}

.profile-page .app-main {
  background: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-page .bottom-nav-glass {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -1px 2px rgba(255, 255, 255, 0.06);
}

.profile-page .nav-item.active svg:not(.nav-chat-icon):not(.nav-films-icon):not(.nav-profile-icon) {
  stroke: #86E8E8;
}

.profile-posts-section {
  width: 100%;
  margin-top: 8px;
  padding: 0;
}

.profile-posts-top {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.profile-films-link {
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.profile-films-link svg {
  display: block;
  flex-shrink: 0;
}

.profile-films-link:hover,
.profile-films-link:focus-visible {
  color: #86E8E8;
}

.profile-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 10px;
  padding: 0 2px;
  align-items: start;
}

.profile-post-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

.profile-post-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8);
  background: #000;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.profile-post-card .profile-post-image {
  border-radius: 0;
}

.profile-post-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%) contrast(1.08);
  border-radius: 0;
}

.profile-post-image.is-photo {
  filter: none;
}

.profile-post-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.32;
  letter-spacing: -0.01em;
  height: 2.64em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.profile-post-title.is-empty {
  visibility: hidden;
}

.profile-post-date {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 0.76rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.3;
  margin-top: -4px;
  height: 1.3em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-post-item.is-empty-slot {
  cursor: default;
  pointer-events: none;
}

.profile-post-card-empty {
  background: rgba(255, 255, 255, 0.04);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.profile-page.is-editing .profile-posts-section {
  display: none;
}

/* Films page — see assets/films.css for Ilford strip layout */

.films-header .page-title {
  flex: 1;
  text-align: center;
}

.films-add-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  flex-shrink: 0;
}

.film-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  background: #000;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.film-crop-modal[hidden] {
  display: none !important;
}

.film-crop-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 0;
}

.film-crop-viewfinder-shell {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
}

.film-crop-viewfinder {
  width: min(100%, 420px);
}

.film-crop-modal .camera-crop-hint {
  margin: 0;
  padding: 0 12px 4px;
}

.film-crop-modal .camera-crop-actions {
  padding-bottom: 4px;
}

.film-composer-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

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

.film-composer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.film-composer-panel {
  position: relative;
  width: min(100%, 390px);
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(134, 232, 232, 0.12) 0%, transparent 55%),
    #121212;
  border: 1px solid rgba(134, 232, 232, 0.18);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.film-composer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.2rem;
  cursor: pointer;
}

.film-composer-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.film-composer-subtitle {
  margin: 0 0 16px;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.52);
  text-align: center;
  line-height: 1.45;
}

.film-composer-pick {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: none;
  border: 1.5px dashed rgba(134, 232, 232, 0.42);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
}

.film-composer-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-composer-preview[hidden] {
  display: none;
}

.film-composer-pick-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #86E8E8;
}

.film-composer-pick:has(.film-composer-preview:not([hidden])) .film-composer-pick-label {
  display: none;
}

.film-composer-field {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}

.film-composer-caption {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid rgba(134, 232, 232, 0.35);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 8px 0 10px;
  margin-bottom: 18px;
  outline: none;
}

.film-composer-publish {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: #86E8E8;
  color: #102028;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.film-composer-publish:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hero-carousel {
  position: relative;
  margin: 0;
  padding: 0 0 24px;
  background: #050505;
  overflow: hidden;
}

.home-page .hero-carousel.is-other-user {
  padding-top: 36px;
}

.home-page .hero-carousel.is-other-user .hero-carousel-head {
  margin-top: 0;
  padding-bottom: 12px;
}

.home-page .hero-carousel.is-other-user .carousel-viewport {
  margin-top: 10px;
  overflow: visible;
}

.hero-carousel-glow {
  position: absolute;
  top: 14%;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(134, 232, 232, 0.08) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero-carousel-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 6px;
  margin-top: -4px;
  overflow: visible;
}

.carousel-user-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  transition: color 0.15s ease;
}

.carousel-user-label:hover {
  color: rgba(134, 232, 232, 0.85);
}

.carousel-user-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-post-menu-btn {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 4;
  -webkit-tap-highlight-color: transparent;
}

.profile-post-menu-btn:hover,
.profile-post-menu-btn:focus-visible {
  background: transparent;
  box-shadow: none;
  color: #86E8E8;
}

.profile-post-menu-btn svg {
  display: block;
}

.profile-post-menu-btn[hidden] {
  display: none;
}

.profile-post-restore-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(134, 232, 232, 0.08);
  border: 1px solid rgba(134, 232, 232, 0.18);
}

.profile-post-restore-bar[hidden] {
  display: none;
}

.profile-post-restore-copy {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.carousel-viewport {
  position: relative;
  z-index: 1;
  perspective: 1200px;
  perspective-origin: 50% 34%;
  margin-top: 10px;
}

.carousel-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 calc(50% - var(--carousel-slide-half));
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex-shrink: 0;
  width: var(--carousel-slide-size);
  margin-right: calc(-1 * var(--carousel-slide-half));
  scroll-snap-align: center;
  transform-style: preserve-3d;
  transition:
    transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.45s ease,
    filter 0.45s ease;
  opacity: 0.32;
  transform: scale(0.62) translateZ(-140px) rotateY(16deg);
  filter: brightness(0.45) saturate(0.65);
  will-change: transform, opacity;
}

.carousel-slide:last-child {
  margin-right: 0;
}

.carousel-slide.is-active {
  opacity: 1;
  transform: scale(1) translateZ(56px) rotateY(0deg);
  filter: brightness(1) saturate(1);
  z-index: 3;
}

.carousel-slide.is-prev {
  opacity: 0.48;
  transform: scale(0.62) translateZ(-50px) rotateY(12deg);
  filter: brightness(0.52) saturate(0.72);
  z-index: 2;
}

.carousel-slide.is-next {
  opacity: 0.48;
  transform: scale(0.62) translateZ(-50px) rotateY(-12deg);
  filter: brightness(0.52) saturate(0.72);
  z-index: 2;
}

.carousel-card-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carousel-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.12),
    0 0 36px rgba(255, 255, 255, 0.06),
    0 20px 48px rgba(0, 0, 0, 0.65),
    0 4px 14px rgba(0, 0, 0, 0.45);
  transform: translateZ(0);
}

.home-page .hero-carousel:not(.profile-post-carousel) .carousel-reflection {
  border-radius: 0;
}

.home-page .hero-carousel:not(.profile-post-carousel) .carousel-meta {
  margin-top: -64px;
}

.home-page .hero-carousel:not(.profile-post-carousel) .post-interactions {
  margin-top: -8px;
}

.home-page .hero-carousel.is-friend-carousel {
  overflow: visible;
}

.home-page .hero-carousel.is-friend-carousel .carousel-reflection {
  display: none;
}

.home-page .hero-carousel.is-friend-carousel .hero-carousel-head {
  margin-top: 10px;
  padding-bottom: 10px;
}

.home-page .hero-carousel.is-friend-carousel .carousel-viewport {
  margin-top: 16px;
  padding-bottom: 18px;
  overflow: visible;
}

.home-page .hero-carousel.is-friend-carousel .carousel-track {
  overflow-y: visible;
  padding-bottom: 4px;
}

.home-page .hero-carousel.is-friend-carousel .carousel-meta {
  margin-top: 10px;
  padding-top: 0;
  background: transparent;
}

.home-page .hero-carousel.is-friend-carousel .carousel-post-title {
  margin-top: 6px;
}

.home-page .hero-carousel.is-friend-carousel .carousel-post-user {
  margin-top: 2px;
}

.home-page .hero-carousel.is-friend-carousel .carousel-filter {
  bottom: 8px;
}

.home-page .hero-carousel.is-friend-carousel .carousel-image.is-photo {
  background-size: contain;
  background-color: #0a0a0a;
}

.carousel-slide.is-active .carousel-card {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.22),
    0 0 48px rgba(255, 255, 255, 0.1),
    0 0 64px rgba(134, 232, 232, 0.12),
    0 28px 60px rgba(0, 0, 0, 0.72);
}

.carousel-slide.is-prev .carousel-card,
.carousel-slide.is-next .carousel-card {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.55);
}

.carousel-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.carousel-filter {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 9px;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.carousel-filter:hover,
.carousel-filter:focus-visible {
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
}

.carousel-reflection {
  width: 100%;
  height: 88px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 0;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, transparent 92%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, transparent 92%);
}

.carousel-reflection .carousel-image {
  height: var(--carousel-slide-size);
  transform: scaleY(-1);
  transform-origin: top center;
  opacity: 0.48;
  filter: blur(0.2px);
}

.carousel-slide.is-active .carousel-reflection .carousel-image {
  opacity: 0.62;
}

.carousel-slide.is-prev .carousel-reflection,
.carousel-slide.is-next .carousel-reflection {
  opacity: 0.35;
}

.carousel-meta {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 28px 6px;
  margin-top: -72px;
  background: #050505;
}

.carousel-post-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-size: 1.37rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.28;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.carousel-post-user {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 0.92rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
}

/* Everyone's Posts — friends grid */
.everyone-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

html.is-home-landing .phone-frame {
  animation: homeLandingFade 0.42s ease;
}

@keyframes homeLandingFade {
  from {
    opacity: 0.78;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.everyone-published-banner {
  width: min(100%, 360px);
  margin: 0 auto 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(248, 216, 226, 0.95), rgba(198, 230, 249, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 24px rgba(120, 90, 120, 0.12);
  animation: homeLandingFade 0.35s ease;
}

.everyone-published-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4a4a4a;
}

.everyone-published-desc {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #666;
}

.everyone-title-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 clamp(10px, 3cqw, 16px);
  padding: 0 8px;
}

.everyone-header-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 4.5cqw, 22px);
  max-width: 100%;
}

.everyone-search-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.everyone-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.everyone-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.everyone-search-clear[hidden] {
  display: none;
}

.everyone-search-clear:hover,
.everyone-search-clear:focus-visible {
  background: rgba(248, 168, 200, 0.16);
  color: #F8A8C8;
}

.everyone-search-clear svg {
  display: block;
}

.everyone-search-trigger svg {
  display: block;
  flex-shrink: 0;
}

.everyone-search-trigger:hover,
.everyone-search-trigger:focus-visible,
.everyone-search-trigger.is-active {
  color: #86E8E8;
}

.everyone-title-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.everyone-search-panel {
  width: min(100%, 340px);
  margin: 0 0 clamp(6px, 2cqw, 10px);
  padding: 0 4px;
}

.everyone-search-panel[hidden] {
  display: none;
}

.everyone-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.56);
}

.everyone-search-field:focus-within {
  border-color: rgba(134, 232, 232, 0.35);
  box-shadow: 0 0 0 2px rgba(134, 232, 232, 0.1);
}

.everyone-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
}

.everyone-search-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.everyone-search-submit {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.everyone-search-submit:hover,
.everyone-search-submit:focus-visible {
  color: #86E8E8;
  background: rgba(134, 232, 232, 0.12);
}

.everyone-search-submit svg {
  display: block;
}

.everyone-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-height: min(42vh, 320px);
  overflow-y: auto;
}

.everyone-search-results[hidden] {
  display: none;
}

.everyone-search-section-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.everyone-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

button.everyone-search-result {
  appearance: none;
}

.everyone-search-result:hover,
.everyone-search-result:focus-visible {
  background: rgba(134, 232, 232, 0.1);
  border-color: rgba(134, 232, 232, 0.28);
}

.everyone-search-result-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.everyone-search-result-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.everyone-search-result-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.everyone-search-result-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.everyone-search-empty {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.44);
  line-height: 1.45;
}

.everyone-search-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.everyone-search-history-item svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.38);
}

.everyone-search-history-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.everyone-search-history-item:hover,
.everyone-search-history-item:focus-visible {
  background: rgba(134, 232, 232, 0.1);
  border-color: rgba(134, 232, 232, 0.28);
}

.everyone-title-row .everyone-page-title {
  margin: 0;
}

.everyone-friends-toggle {
  --friends-toggle-size: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--friends-toggle-size);
  height: var(--friends-toggle-size);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}

.everyone-friends-toggle svg {
  display: block;
  transition: transform 0.2s ease;
}

.everyone-friends-toggle:hover,
.everyone-friends-toggle:focus-visible {
  background: rgba(134, 232, 232, 0.14);
  color: #86E8E8;
}

.everyone-main.is-all-friends-expanded .everyone-friends-toggle svg {
  transform: rotate(180deg);
}

.everyone-main.is-all-friends-expanded .friends-grid {
  max-width: 360px;
  margin-bottom: 8px;
}

.everyone-page .friends-grid {
  margin-top: clamp(14px, 4.5cqw, 26px);
}

.everyone-page-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
  margin: 0 0 clamp(18px, 5cqw, 28px);
  text-align: center;
}

.everyone-public-title {
  margin: clamp(14px, 4cqw, 22px) 0 0;
}

.everyone-public-block {
  width: 100%;
}

.everyone-public-carousel {
  width: calc(100% + 32px);
  margin: 8px -16px 0;
  padding: 0;
  background: transparent;
}

.everyone-public-carousel .carousel-viewport {
  margin-top: 4px;
}

.everyone-public-carousel::after {
  display: none;
}

.everyone-public-meta {
  width: calc(100% + 32px);
  margin: 10px -16px 0;
  padding: 0 28px 6px;
  background: transparent;
}

.everyone-public-actions {
  width: 100%;
  margin: 0;
  padding-top: 10px;
}

.film-sprockets {
  height: 17px;
  background-color: #000;
  background-image: repeating-linear-gradient(
    90deg,
    #ffffff 0 6px,
    #000000 6px 18px
  );
  background-size: 18px 6px;
  background-position: 9px center;
  background-repeat: repeat-x;
}

.film-sprockets-top {
  margin-bottom: 0;
}

.film-sprockets-bottom {
  margin-top: 0;
}

.film-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #000;
  padding: 8px calc(50% - var(--film-post-size) / 2);
}

.film-track::-webkit-scrollbar {
  display: none;
}

.film-frame {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6px;
  background: #000;
  border-left: 8px solid #000;
  border-right: 8px solid #000;
}

.film-frame:first-child {
  border-left-width: 0;
}

.film-frame:last-child {
  border-right-width: 0;
}

.film-post-card {
  position: relative;
  width: var(--film-post-size, 260px);
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8);
  background: #000;
}

.film-post-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.08);
  border-radius: 0;
}

.film-post-filter {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease;
}

.film-post-filter:hover,
.film-post-filter:focus-visible {
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
}

.film-post-user {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 0.76rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin: 6px 0 0;
  text-align: center;
  width: var(--film-post-size, 260px);
}

.friends-grid {
  width: 100%;
  max-width: 360px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 10px;
  padding: 0 8px;
  position: relative;
  z-index: 2;
}

.friend-avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  min-width: 0;
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1;
}

.friend-avatar-circle {
  width: var(--friend-avatar-size);
  height: var(--friend-avatar-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.82rem, 4.2cqw, 0.96rem);
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.48),
    0 0 18px rgba(255, 255, 255, 0.24),
    0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.friend-avatar-btn:hover .friend-avatar-circle,
.friend-avatar-btn:focus-visible .friend-avatar-circle {
  transform: scale(1.04);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.62),
    0 0 22px rgba(255, 255, 255, 0.34),
    0 6px 18px rgba(134, 232, 232, 0.16);
}

.friend-avatar-btn.is-viewed .friend-avatar-circle {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.friend-avatar-btn.is-viewed:hover .friend-avatar-circle,
.friend-avatar-btn.is-viewed:focus-visible .friend-avatar-circle {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.friend-avatar-name {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friends-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.88rem;
  padding: 24px 0;
}

.post-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 14px;
  background: #050505;
}

.post-interactions {
  background: #050505;
}

.everyone-public-interactions {
  width: calc(100% + 32px);
  margin: 0 -16px;
}

.post-comments-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 16px;
  background: #050505;
  max-height: min(240px, 32vh);
  overflow-y: auto;
}

.post-comments-history[hidden] {
  display: none;
}

.post-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  border-radius: 16px;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

.post-comment-item.is-long-pressing {
  background: rgba(255, 255, 255, 0.06);
}

.post-comment-item.is-comment-highlight {
  background: rgba(134, 232, 232, 0.12);
  box-shadow: inset 0 0 0 1px rgba(134, 232, 232, 0.35);
}

.comment-action-menu {
  position: fixed;
  inset: 0;
  z-index: 140;
}

.comment-action-menu[hidden] {
  display: none;
}

.comment-action-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.28);
}

.comment-action-menu-panel {
  position: fixed;
  min-width: 168px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(252, 252, 223, 0.12) 0%, transparent 55%),
    #1a1a1a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.comment-action-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.comment-action-menu-item[hidden] {
  display: none;
}

.comment-action-menu-item svg {
  flex-shrink: 0;
  color: #F9F896;
}

.comment-action-menu-item-danger svg {
  color: #F8A8C8;
}

.comment-action-menu-item:hover,
.comment-action-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.comment-action-menu-item-danger {
  color: #F8A8C8;
}

.post-comment-text,
.post-comment-username {
  user-select: text;
}

.comment-report-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.comment-report-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
  backdrop-filter: blur(4px);
}

.comment-report-modal-panel {
  position: relative;
  width: min(100%, 320px);
  padding: 22px 20px 18px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(252, 252, 223, 0.22) 0%, transparent 55%),
    #1a1a1a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.comment-report-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.comment-report-modal-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.comment-report-modal-subtitle {
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
}

.comment-report-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-report-reason {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.comment-report-reason:hover,
.comment-report-reason:focus-visible {
  background: rgba(252, 252, 223, 0.1);
  border-color: rgba(252, 252, 223, 0.35);
}

.action-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 160;
  max-width: min(calc(100% - 32px), 320px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(26, 26, 26, 0.94);
  border: 1px solid rgba(252, 252, 223, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.action-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.action-toast.has-undo.is-visible {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.chat-toast-undo {
  flex-shrink: 0;
  border: none;
  background: rgba(134, 232, 232, 0.16);
  color: #86E8E8;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.chat-toast-undo[hidden] {
  display: none;
}

.post-comment-item.author-liked {
  padding: 10px 12px;
  margin: 0 -6px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow:
    0 0 12px rgba(252, 252, 223, 0.45),
    0 0 16px rgba(198, 230, 249, 0.4);
}

.post-comment-item.author-liked::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #FCFCDF 0%, #C6E6F9 52%, #FCFCDF 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.95;
}

.post-comment-avatar-link {
  flex-shrink: 0;
  text-decoration: none;
}

.post-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.post-comment-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-comment-avatar .avatar-initials {
  display: block;
}

.post-comment-body {
  min-width: 0;
  flex: 1;
}

.post-comment-username {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.3;
  margin-bottom: 2px;
  text-decoration: none;
}

.post-comment-username:hover,
.post-comment-username:focus-visible {
  color: rgba(134, 232, 232, 0.92);
}

.post-comment-text {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

.comment-mention {
  color: #86E8E8;
  font-weight: 700;
  text-decoration: none;
}

.comment-mention:hover,
.comment-mention:focus-visible {
  color: #a8f0f0;
  text-decoration: underline;
}

.comment-mention-picker {
  position: fixed;
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(240px, 36vh);
  overflow-y: auto;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(252, 252, 223, 0.12) 0%, transparent 55%),
    #1a1a1a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.comment-mention-picker[hidden] {
  display: none;
}

.comment-mention-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.comment-mention-option:hover,
.comment-mention-option.is-active {
  background: rgba(134, 232, 232, 0.12);
  border-color: rgba(134, 232, 232, 0.28);
}

.comment-mention-option-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.comment-mention-option-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comment-mention-option-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-mention-option-username {
  font-size: 0.78rem;
  font-weight: 700;
  color: #86E8E8;
}

.comment-mention-option-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-comment-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-top: 2px;
}

.post-comment-actions .post-action-btn {
  padding: 2px;
}

.post-comment-actions .comment-like-count {
  min-width: 18px;
  font-size: 0.62rem;
}

.hero-carousel .post-actions-bar {
  margin-top: 10px;
  padding-top: 20px;
}

.post-comment-inline {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.comment-input-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.comment-input-wrap:focus-within {
  border-bottom-color: rgba(255, 255, 255, 0.42);
}

.comment-label {
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
}

.comment-inline-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  padding: 2px 0 4px;
  outline: none;
}

.comment-send-btn {
  flex-shrink: 0;
  align-self: flex-end;
  padding: 0 0 3px;
  margin-bottom: 1px;
}

.post-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  padding: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

.post-action-btn svg {
  display: block;
}

.post-actions-icons {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
}

.post-action-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 34px;
}

.post-action-count {
  border: none;
  background: none;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.42);
  min-width: 22px;
  text-align: center;
}

.post-action-count.is-clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.post-action-count.is-clickable:hover:not(:disabled),
.post-action-count.is-clickable:focus-visible:not(:disabled) {
  color: rgba(134, 232, 232, 0.88);
}

.post-action-count.is-clickable:disabled,
.post-action-count.is-empty {
  cursor: default;
  opacity: 0.55;
}

.likes-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.likes-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
  backdrop-filter: blur(4px);
}

.likes-modal-panel {
  position: relative;
  width: min(100%, 320px);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 22px 20px 18px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(252, 252, 223, 0.22) 0%, transparent 55%),
    #1a1a1a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.likes-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.likes-modal-title {
  margin: 0 0 16px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.likes-modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.likes-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.likes-modal-avatar-link {
  flex-shrink: 0;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.likes-modal-avatar-link:hover,
.likes-modal-avatar-link:focus-visible {
  transform: scale(1.06);
  opacity: 0.92;
}

.likes-modal-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
}

.likes-modal-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.likes-modal-username {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
  backdrop-filter: blur(4px);
}

.share-modal-panel {
  position: relative;
  width: min(100%, 340px);
  max-height: min(78vh, 480px);
  overflow-y: auto;
  padding: 22px 18px 18px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(252, 252, 223, 0.22) 0%, transparent 55%),
    #1a1a1a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.share-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.share-modal-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.share-modal-subtitle {
  margin: 0 0 12px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.56);
}

.share-modal-compose {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.share-modal-compose-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-search-wrap {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.share-modal-search {
  width: 100%;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 0.78rem;
}

.share-modal-search::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.share-modal-section-label {
  margin: 0;
  padding: 10px 14px 6px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.share-modal-selected-names {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  word-break: break-word;
}

.share-modal-selected-placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
}

.share-modal-selected-name {
  color: rgba(134, 232, 232, 0.92);
}

.share-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(42vh, 280px);
  overflow-y: auto;
}

.share-modal-friend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease;
}

.share-modal-friend:last-child {
  border-bottom: none;
}

.share-modal-friend:hover,
.share-modal-friend:focus-visible {
  background: rgba(134, 232, 232, 0.1);
  border-color: rgba(134, 232, 232, 0.28);
}

.share-modal-friend.is-selected {
  background: rgba(134, 232, 232, 0.12);
}

.share-modal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
}

.share-modal-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.share-modal-friend-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.share-modal-friend-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.share-modal-friend-username {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.48);
}

.share-modal-empty {
  margin: 0;
  padding: 16px 12px;
  text-align: center;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
}

.share-modal-send {
  flex-shrink: 0;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #86e8e8 0%, #72c7e8 100%);
  color: #1a1a1a;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.share-modal-send:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.share-modal-send:not(:disabled):hover,
.share-modal-send:not(:disabled):focus-visible {
  transform: translateY(-1px);
}

.post-action-btn:active {
  color: rgba(255, 255, 255, 0.72);
}

.post-action-btn.liked {
  color: #F85A5A;
}

.post-action-btn.liked .like-icon {
  fill: #F85A5A;
  stroke: #F85A5A;
}

@keyframes like-shake {
  0% { transform: scale(1); }
  15% { transform: scale(1.28) rotate(-10deg); }
  30% { transform: scale(1.22) rotate(10deg); }
  45% { transform: scale(1.26) rotate(-6deg); }
  60% { transform: scale(1.18) rotate(6deg); }
  75% { transform: scale(1.12) rotate(-3deg); }
  100% { transform: scale(1); }
}

.post-action-btn.like-shake {
  animation: like-shake 0.5s ease;
}

.post-comment-box {
  padding: 0 24px 20px;
  background: #050505;
}

.post-comment-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  padding: 10px 0 12px;
  outline: none;
}

.post-comment-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.hero-carousel::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #050505);
  pointer-events: none;
  z-index: 2;
}

.profile-post-carousel .carousel-viewport {
  overflow: hidden;
  perspective: none;
}

.profile-post-carousel .carousel-track {
  padding: 0;
  gap: 0;
}

.profile-post-carousel .carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  margin-right: 0;
  opacity: 1;
  transform: none;
  filter: none;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
}

.profile-post-carousel .carousel-card-stack {
  width: min(100%, var(--carousel-slide-size));
}

.profile-post-carousel .carousel-slide.is-active {
  transform: none;
  filter: none;
}

.profile-post-carousel .carousel-slide .carousel-card {
  overflow: visible;
}

.profile-post-carousel .carousel-slide .carousel-image {
  position: absolute;
  inset: 0;
}

.profile-post-carousel .carousel-filter-date {
  cursor: default;
  pointer-events: none;
}

/* Films detail: vertical swipe between posts */
.profile-post-carousel.is-vertical-films .carousel-viewport {
  min-height: min(68vh, 520px);
}

.profile-post-carousel.is-vertical-films .carousel-track,
.profile-post-carousel .carousel-track.is-vertical {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  height: min(68vh, 520px);
  max-height: min(68vh, 520px);
}

.profile-post-carousel.is-vertical-films .carousel-slide,
.profile-post-carousel .carousel-track.is-vertical .carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 100%;
  scroll-snap-align: center;
  align-items: center;
}

.profile-post-item:active .profile-post-card {
  transform: scale(0.98);
}



.post-card {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(64, 168, 216, 0.1);
}

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

.post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.post-meta {
  flex: 1;
  min-width: 0;
}

.post-username {
  font-size: 0.9rem;
  font-weight: 700;
  color: #5a5a5a;
}

.post-time {
  font-size: 0.72rem;
  color: #8A8A8A;
}

.filter-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #72C7E8;
  background: rgba(114, 199, 232, 0.15);
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.post-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.post-image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 12px;
}

.post-caption {
  padding: 10px 14px 4px;
  font-size: 0.88rem;
  color: #5a5a5a;
  line-height: 1.45;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 14px 14px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8A8A8A;
  cursor: pointer;
  padding: 4px 0;
}

.action-btn svg {
  display: block;
}

.action-btn.liked {
  color: #F8A8C8;
}

.action-btn.liked svg {
  fill: #F8A8C8;
  stroke: #F8A8C8;
}

.bottom-nav-dock {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.bottom-nav-dock > * {
  pointer-events: auto;
}

.bottom-nav-glass {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.14) 48%,
    rgba(255, 255, 255, 0.24) 100%
  );
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 10px 32px rgba(64, 168, 216, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.62),
    inset 0 -1px 2px rgba(255, 255, 255, 0.18);
}

.bottom-nav-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, transparent 46%);
  pointer-events: none;
}

.bottom-nav-glass .nav-item {
  position: relative;
  z-index: 1;
}

.bottom-nav {
  width: 100%;
  min-width: 0;
  height: 58px;
  border-radius: 999px;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 0 10px;
  overflow: visible;
}

.bottom-nav .nav-label {
  color: #86E8E8;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  text-decoration: none;
  color: #8A8A8A;
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 5px 2px 6px;
  box-sizing: border-box;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-icon-slot {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon-slot svg {
  width: 34px;
  height: 34px;
  display: block;
}

.nav-item.nav-chat {
  overflow: visible;
}

.nav-item.nav-chat .nav-icon-slot svg {
  opacity: 0.78;
  color: rgba(200, 200, 210, 0.95);
  filter: drop-shadow(0 1px 3px rgba(180, 180, 190, 0.35));
  transform-origin: center center;
  transition: transform 0.2s ease;
}

.nav-item.nav-films .nav-icon-slot svg {
  width: 26px;
  height: 26px;
  opacity: 0.78;
  color: rgba(200, 200, 210, 0.95);
  filter: drop-shadow(0 1px 3px rgba(180, 180, 190, 0.35));
  transform-origin: center center;
  transition: transform 0.2s ease;
}

.nav-item.nav-profile .nav-icon-slot svg {
  width: 26px;
  height: 26px;
  opacity: 0.78;
  color: rgba(200, 200, 210, 0.95);
  filter: drop-shadow(0 1px 3px rgba(180, 180, 190, 0.35));
  transform-origin: center center;
  transition: transform 0.2s ease;
}

.chat-nav-icon-slot {
  position: relative;
  overflow: visible;
  z-index: 2;
}

.chat-nav-icon-slot.chat-icon-pop svg {
  animation: chat-icon-pop 0.52s cubic-bezier(0.22, 0.85, 0.3, 1);
}

@keyframes chat-icon-pop {
  0% {
    transform: scale(1);
  }
  38% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.chat-float-bubble {
  position: fixed;
  z-index: 10000;
  width: 54px;
  height: 34px;
  margin-left: -27px;
  pointer-events: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(200, 200, 210, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(6px) scale(0.55);
  will-change: transform, opacity;
}

.chat-float-bubble::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(200, 200, 210, 0.32);
  border-bottom: 1px solid rgba(200, 200, 210, 0.32);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.06);
}

.chat-float-bubble-dots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.chat-float-bubble-dots i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(200, 200, 210, 0.55);
}

.chat-float-bubble.rise {
  animation: chat-bubble-rise 0.52s cubic-bezier(0.22, 0.85, 0.3, 1) forwards;
}

@keyframes chat-bubble-rise {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.55);
  }
  28% {
    opacity: 0.82;
    transform: translateY(-20px) scale(1);
  }
  68% {
    opacity: 0.62;
    transform: translateY(-34px) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
}

.nav-item.nav-chat.active .nav-icon-slot svg,
.nav-item.nav-films.active .nav-icon-slot svg,
.nav-item.nav-profile.active .nav-icon-slot svg {
  opacity: 0.88;
  stroke: rgba(200, 200, 210, 0.95);
}

.nav-home-puzzle {
  overflow: visible;
}

.nav-home-puzzle.active .puzzle-nav-img {
  opacity: 0.88;
}

.puzzle-nav-icon {
  position: relative;
  overflow: visible;
  z-index: 2;
}

.puzzle-nav-img,
.puzzle-stage-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.78;
  filter: drop-shadow(0 1px 3px rgba(180, 180, 190, 0.35));
}

.puzzle-shatter-stage {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
}

.puzzle-shatter-stage.phase-shake .puzzle-stage-img {
  animation: puzzle-shake 0.001s ease;
}

.puzzle-shard {
  position: absolute;
  background-repeat: no-repeat;
  opacity: 1;
  pointer-events: none;
  will-change: transform, opacity;
}

.puzzle-shard.fly {
  animation: puzzle-shard-fly 0.58s cubic-bezier(0.22, 0.85, 0.3, 1) forwards;
}

@keyframes puzzle-shard-fly {
  to {
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.55);
    opacity: 0;
  }
}

@keyframes puzzle-shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  8% { transform: translate(-4px, 2px) rotate(-14deg); }
  16% { transform: translate(4px, -2px) rotate(14deg); }
  24% { transform: translate(-4px, -2px) rotate(-12deg); }
  32% { transform: translate(4px, 2px) rotate(12deg); }
  40% { transform: translate(-3px, 1px) rotate(-10deg); }
  48% { transform: translate(3px, -1px) rotate(10deg); }
  56% { transform: translate(-3px, -1px) rotate(-8deg); }
  64% { transform: translate(3px, 1px) rotate(8deg); }
  72% { transform: translate(-2px, 0) rotate(-5deg); }
  80% { transform: translate(2px, 0) rotate(5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.nav-item.active {
  color: #40A8D8;
}

.nav-item.active svg:not(.nav-chat-icon):not(.nav-films-icon):not(.nav-profile-icon) {
  stroke: #40A8D8;
}

.nav-item.post-btn .nav-icon-wrap {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  flex: 0 0 28px;
  margin-top: 0;
  border-radius: 8px;
  aspect-ratio: 1;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(180, 180, 190, 0.12);
  transform-origin: center center;
  transform-style: preserve-3d;
}

.nav-item.post-btn .nav-icon-wrap.camera-folding {
  animation: camera-fold 0.44s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes camera-fold {
  0% {
    transform: perspective(500px) rotateY(0deg) scale(1);
  }
  45% {
    transform: perspective(500px) rotateY(90deg) scale(0.94);
  }
  100% {
    transform: perspective(500px) rotateY(0deg) scale(1);
  }
}

.nav-item.post-btn .nav-icon-wrap svg {
  width: 22px;
  height: 22px;
  opacity: 0.78;
  color: rgba(200, 200, 210, 0.95);
  filter: drop-shadow(0 1px 3px rgba(180, 180, 190, 0.35));
}

.nav-item.post-btn.active .nav-icon-wrap {
  background: rgba(255, 255, 255, 0.26);
}

.nav-item.post-btn.active .nav-icon-wrap svg {
  opacity: 0.88;
  stroke: rgba(200, 200, 210, 0.95);
}

.feed-empty {
  text-align: center;
  padding: 40px 20px;
  color: #8A8A8A;
  font-size: 0.9rem;
}

/* Camera Page */
.camera-page.phone-frame {
  background: #000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.camera-page.phone-frame::before {
  display: none;
}

.camera-top-bar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: #000;
  z-index: 2;
}

.camera-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.camera-top-bar .chiizu-wordmark--header {
  justify-self: center;
}

.camera-top-spacer {
  width: 40px;
}

.camera-page .camera-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0 var(--nav-clearance);
  overflow: hidden;
  background: #101010;
}

.camera-page .camera-compose-row {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  justify-content: center;
  padding: 4px 12px 0;
}

.camera-page .camera-viewfinder-shell {
  padding: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.camera-page .camera-viewfinder-tools {
  top: 10px;
  right: 10px;
}

.camera-page .camera-viewfinder-frame-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-viewfinder-stack {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.camera-page .camera-viewfinder-stack {
  width: 100%;
}

.camera-page .viewfinder-43 {
  width: 100%;
  max-height: min(68vh, calc(100vw * 0.94 * 3 / 4));
  background: #3a3a3a;
}

.camera-compose-row {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  position: relative;
}

.camera-album-btn {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 10px;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.camera-viewfinder-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-top: 0;
  padding-bottom: 0;
}

.camera-viewfinder-frame-wrap {
  position: relative;
  width: 100%;
}

.camera-viewfinder-tools {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.camera-viewfinder-tools[hidden] {
  display: none !important;
}

.viewfinder-43 {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: #3a3a3a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.camera-source-video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.camera-live-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.camera-live-canvas[hidden] {
  display: none !important;
}

.viewfinder-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(255, 255, 255, 0.72);
  border-style: solid;
  pointer-events: none;
  z-index: 3;
}

.viewfinder-corner-tl {
  top: 10px;
  left: 10px;
  border-width: 2px 0 0 2px;
}

.viewfinder-corner-tr {
  top: 10px;
  right: 10px;
  border-width: 2px 2px 0 0;
}

.viewfinder-corner-bl {
  bottom: 10px;
  left: 10px;
  border-width: 0 0 2px 2px;
}

.viewfinder-corner-br {
  bottom: 10px;
  right: 10px;
  border-width: 0 2px 2px 0;
}


.viewfinder-tool-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.viewfinder-tool-btn.is-on {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.viewfinder-flash-btn {
  position: relative;
}

.viewfinder-flash-btn .flash-off-slash {
  position: absolute;
  top: 50%;
  left: 7px;
  right: 7px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: translateY(-50%) rotate(-45deg);
  opacity: 0;
  pointer-events: none;
}

.viewfinder-flash-btn:not(.is-on) .flash-off-slash {
  opacity: 0.92;
}

.camera-capture-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.05s ease;
}

.camera-capture-flash.is-active {
  opacity: 1;
}

.viewfinder video,
.viewfinder img,
.viewfinder canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

.viewfinder.preview-mode {
  box-shadow: inset 0 0 0 2px rgba(248, 216, 226, 0.55);
}

.viewfinder.preview-mode img {
  object-fit: fill;
  will-change: filter;
}

.camera-crop-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  z-index: 2;
}

.camera-crop-layer:active {
  cursor: grabbing;
}

.camera-crop-layer[hidden] {
  display: none !important;
}

.camera-crop-layer img {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: unset;
  transform-origin: top left;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.viewfinder.crop-mode {
  box-shadow: inset 0 0 0 2px rgba(248, 216, 226, 0.55);
}

.camera-crop-hint {
  flex-shrink: 0;
  margin: -6px 0 0;
  padding: 0 18px 4px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.62);
}

.camera-crop-hint[hidden] {
  display: none !important;
}

.camera-crop-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 12px;
}

.camera-crop-actions[hidden] {
  display: none !important;
}

.camera-main.is-crop-mode .camera-compose-row {
  flex: 0 1 auto;
  align-items: flex-start;
  padding-top: 0;
  padding-bottom: 0;
}

.camera-main.is-crop-mode .camera-viewfinder-shell {
  padding-top: 36px;
  padding-bottom: 40px;
}

.camera-main.is-crop-mode .camera-crop-actions {
  padding-top: 0;
  padding-bottom: 4px;
}

.camera-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  line-height: 1.5;
  z-index: 5;
}

.camera-filter-section {
  flex-shrink: 0;
  padding: 10px 0 8px;
}

.filter-strip-viewport {
  position: relative;
  overflow: hidden;
}

.filter-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-strip::before,
.filter-strip::after {
  content: "";
  flex: 0 0 calc(50% - 28px);
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-thumb {
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  scroll-snap-align: center;
}

.filter-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 40px;
  min-width: 56px;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 4px 14px rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.filter-preview-icon {
  display: block;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.filter-preview-original {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.filter-preview-icon-img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.filter-preview-label {
  display: block;
  padding: 0 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.filter-preview-star {
  background:
    linear-gradient(145deg, rgba(255, 224, 120, 0.24) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.filter-preview-bubble {
  background:
    linear-gradient(145deg, rgba(168, 220, 255, 0.24) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.filter-preview-beach {
  background:
    linear-gradient(145deg, rgba(120, 188, 255, 0.24) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.filter-preview-cake {
  background:
    linear-gradient(145deg, rgba(255, 168, 188, 0.24) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.filter-preview-schoollife {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 200, 220, 0.12) 100%);
}

.filter-preview-pudding2 {
  background:
    linear-gradient(145deg, rgba(255, 210, 100, 0.30) 0%, rgba(200, 140, 60, 0.14) 100%);
}

.filter-preview-summer {
  background:
    linear-gradient(145deg, rgba(255, 224, 115, 0.30) 0%, rgba(115, 224, 185, 0.16) 100%);
}

.filter-preview-ocean {
  background:
    linear-gradient(145deg, rgba(90, 185, 250, 0.32) 0%, rgba(50, 110, 210, 0.16) 100%);
}

.filter-preview-ice {
  background:
    linear-gradient(145deg, rgba(185, 235, 255, 0.34) 0%, rgba(140, 200, 250, 0.16) 100%);
}

.filter-preview-math {
  background:
    linear-gradient(145deg, rgba(250, 70, 60, 0.32) 0%, rgba(180, 30, 40, 0.16) 100%);
}

.filter-thumb.active .filter-preview {
  border-color: rgba(114, 199, 232, 0.88);
  transform: scale(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 2px rgba(114, 199, 232, 0.28),
    0 4px 16px rgba(114, 199, 232, 0.16);
}

.filter-thumb.active .filter-preview-original {
  background: transparent;
  border-color: rgba(114, 199, 232, 0.88);
  box-shadow: 0 0 0 2px rgba(114, 199, 232, 0.22);
}

.camera-main.is-preview-mode {
  justify-content: center;
  padding-bottom: 108px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.camera-main.is-preview-mode .camera-compose-row {
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  margin-top: -64px;
}

.camera-main.is-preview-mode .camera-viewfinder-shell {
  padding-top: 0;
  padding-bottom: 0;
}

.camera-main.is-preview-mode .camera-viewfinder-stack {
  width: fit-content;
  max-width: 100%;
}

.camera-main.is-preview-mode .viewfinder-43 {
  width: min(100%, calc(40vh * 4 / 3));
  max-height: 40vh;
  margin-inline: auto;
}

.camera-main.is-preview-mode .camera-preview-actions {
  flex: 0 0 auto;
  justify-content: center;
  width: 100%;
  padding-top: 14px;
  padding-bottom: 0;
}

.camera-filter-section[hidden] {
  display: none !important;
}

.camera-album-btn[hidden] {
  display: none !important;
}

.camera-active-filter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.82);
}

.camera-filter-diamond {
  opacity: 0.75;
}

.camera-filter-name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.camera-shutter-row {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
}

.shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  transition: transform 0.12s ease;
}

.shutter-btn:active {
  transform: scale(0.94);
}

.camera-preview-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 12px;
}

.camera-preview-actions[hidden] {
  display: none !important;
}

.camera-shutter-row[hidden] {
  display: none !important;
}

.text-btn {
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
}

.use-photo-btn {
  border: none;
  background: #72C7E8;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(114, 199, 232, 0.35);
}

/* Post draft preview */
.post-draft {
  width: 100%;
  max-width: 320px;
}

.post-draft-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
  display: block;
  box-shadow: 0 4px 16px rgba(64, 168, 216, 0.15);
}

.post-draft-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  margin-bottom: 16px;
}

.post-draft-filter {
  font-size: 0.72rem;
  font-weight: 600;
  color: #72C7E8;
  background: rgba(114, 199, 232, 0.15);
  padding: 4px 10px;
  border-radius: 999px;
}

.post-draft-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #40A8D8;
  text-decoration: none;
}

.post-caption-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #8A8A8A;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  color: #5a5a5a;
  padding: 8px 0 10px;
  outline: none;
  margin-bottom: 20px;
}

.post-caption-input::placeholder {
  color: #8A8A8A;
}

.post-share-btn {
  width: 100%;
  border: none;
  background: #fff;
  color: #72C7E8;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(114, 199, 232, 0.25);
}

.post-share-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body.post-page-body {
  background: #000;
}

.post-page.phone-frame {
  background: #000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.post-page.phone-frame::before {
  display: none;
}

.post-page .app-header {
  background: #000;
}

.post-page .page-title {
  color: #fff;
}

.post-page .avatar-btn {
  border-color: rgba(255, 255, 255, 0.35);
}

.post-page .post-draft-image {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.post-page .post-caption-input {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.32);
}

.post-page .post-caption-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.post-page .post-draft-link {
  color: #72C7E8;
}

/* Chat page */
.chat-page.phone-frame {
  background: #050505;
}

.chat-page.phone-frame::before {
  display: none;
}

.chat-page .app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 48px;
  padding-inline: 12px;
}

.chat-header-inbox {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.chat-header-inbox[hidden] {
  display: none;
}

.chat-room-title[hidden] {
  display: none;
}

.chat-header-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-header-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.chat-header-icon-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-header-icon-btn.is-active,
.chat-header-icon-btn:hover,
.chat-header-icon-btn:focus-visible {
  background: rgba(134, 232, 232, 0.14);
  border-color: rgba(134, 232, 232, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

.chat-header-add-btn {
  font-size: 1.35rem;
}

.chat-search-bar {
  width: 100%;
}

.chat-search-bar[hidden] {
  display: none;
}

.chat-search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.78rem;
}

.chat-search-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.chat-header-tab {
  position: relative;
  border: none;
  border-radius: 999px;
  padding: 7px 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.chat-header-tab.is-active {
  background: rgba(134, 232, 232, 0.16);
  color: rgba(255, 255, 255, 0.92);
}

.chat-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 999px;
  background: #F8A8C8;
  color: #1a1a1a;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
}

.chat-tab-badge[hidden] {
  display: none;
}

.chat-back-link {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  font-weight: 600;
  color: #40A8D8;
  text-decoration: none;
  z-index: 1;
}

.chat-back-link[hidden] {
  display: none;
}

.chat-room-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.chat-page .page-title {
  justify-self: center;
  text-align: center;
}

.chat-main {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
  min-height: 0;
}

.chat-inbox-view,
.chat-room-view {
  width: 100%;
  min-height: 0;
  flex: 1;
}

.chat-room-view {
  display: flex;
  flex-direction: column;
}

.chat-room-view[hidden] {
  display: none;
}

.chat-inbox-view[hidden] {
  display: none;
}

.chat-inbox-empty,
.chat-room-empty {
  margin: 24px 8px 0;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.48);
}

.chat-inbox-empty[hidden],
.chat-room-empty[hidden] {
  display: none;
}

.chat-thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-thread-row-wrap {
  width: 100%;
}

.chat-thread-row.is-long-pressing {
  background: rgba(255, 255, 255, 0.08);
}

.chat-thread-row.is-unread {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.58),
    0 0 16px rgba(255, 255, 255, 0.48),
    0 0 28px rgba(255, 255, 255, 0.28);
}

.chat-thread-row.is-unread .chat-thread-name {
  color: rgba(255, 255, 255, 0.98);
}

.chat-thread-row.is-unread .chat-thread-preview {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.chat-thread-row.is-muted .chat-thread-preview {
  color: rgba(255, 255, 255, 0.48);
}

.chat-thread-trailing {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.chat-thread-mute-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86E8E8;
}

.chat-thread-mute-icon[hidden] {
  display: none;
}

.chat-thread-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-thread-care-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
}

.chat-thread-care-star[hidden] {
  display: none;
}

.chat-thread-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chat-thread-action-sheet[hidden] {
  display: none;
}

.chat-thread-action-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
  backdrop-filter: blur(4px);
}

.chat-thread-action-panel {
  position: relative;
  width: min(100%, 280px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(134, 232, 232, 0.22);
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(134, 232, 232, 0.18) 0%, transparent 55%),
    rgba(26, 26, 26, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.chat-thread-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-thread-action-item:hover,
.chat-thread-action-item:focus-visible {
  background: rgba(134, 232, 232, 0.1);
  border-color: rgba(134, 232, 232, 0.24);
}

.chat-thread-action-item-danger {
  color: #F8A8C8;
}

.chat-thread-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86E8E8;
}

.chat-thread-action-item-danger .chat-thread-action-icon {
  color: #F8A8C8;
}

.chat-add-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.chat-add-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
  backdrop-filter: blur(4px);
}

.chat-add-modal-panel {
  position: relative;
  width: min(100%, 340px);
  max-height: min(80vh, 520px);
  overflow-y: auto;
  padding: 22px 18px 18px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(252, 252, 223, 0.18) 0%, transparent 55%),
    #1a1a1a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.chat-add-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.chat-add-modal-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.chat-add-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.chat-add-tab {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.62);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-add-tab.is-active {
  background: rgba(134, 232, 232, 0.14);
  border-color: rgba(134, 232, 232, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

.chat-add-pane[hidden] {
  display: none;
}

.chat-add-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.62);
}

.chat-add-input {
  width: 100%;
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.82rem;
}

.chat-add-hint {
  margin: 0 0 8px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.48);
}

.chat-add-friend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.chat-add-friend-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-add-friend-option.is-selected {
  border-color: rgba(134, 232, 232, 0.34);
  background: rgba(134, 232, 232, 0.1);
}

.chat-add-friend-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.chat-add-friend-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-add-friend-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.chat-add-friend-username {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.48);
}

.chat-add-submit {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #86E8E8 0%, #C6E6F9 100%);
  color: #1a1a1a;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-thread-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-thread-row:hover,
.chat-thread-row:focus-visible {
  background: rgba(134, 232, 232, 0.08);
  border-color: rgba(134, 232, 232, 0.22);
}

.chat-thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.chat-thread-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-thread-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-thread-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.chat-thread-preview {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread-time {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.38);
}

.chat-message-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 12px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  -webkit-touch-callout: none;
  user-select: none;
}

.chat-message-avatar-link {
  flex-shrink: 0;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.chat-message-avatar-link:hover,
.chat-message-avatar-link:focus-visible {
  transform: scale(1.06);
  opacity: 0.92;
}

.chat-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.chat-message-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-message-outgoing {
  justify-content: flex-end;
}

.chat-message-outgoing .chat-message-avatar {
  display: none;
}

.chat-message-incoming {
  justify-content: flex-start;
}

.chat-message-outgoing .chat-text-bubble-wrap,
.chat-message-outgoing .chat-shared-post {
  margin-left: auto;
}

.chat-message-incoming .chat-text-bubble-wrap,
.chat-message-incoming .chat-shared-post {
  margin-right: auto;
}

.chat-message.is-long-pressing .chat-text-bubble,
.chat-message.is-long-pressing .chat-shared-post {
  opacity: 0.88;
  transform: scale(0.985);
}

.chat-text-bubble-wrap {
  max-width: min(100%, 78%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-text-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-message-outgoing .chat-text-bubble {
  background: rgba(198, 230, 249, 0.12);
  color: rgba(255, 255, 255, 0.96);
  border-color: rgba(134, 232, 232, 0.18);
  border-bottom-right-radius: 6px;
}

.chat-message-incoming .chat-text-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border-bottom-left-radius: 6px;
}

.chat-message-meta {
  margin: 0;
  padding-inline: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.38);
  text-align: right;
}

.chat-message-incoming .chat-message-meta {
  text-align: left;
}

.chat-shared-post {
  width: min(100%, 250px);
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease, border-color 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-shared-post:hover,
.chat-shared-post:focus-visible {
  border-color: rgba(134, 232, 232, 0.28);
  transform: translateY(-1px);
}

.chat-message-outgoing .chat-shared-post {
  border-color: rgba(134, 232, 232, 0.24);
}

.chat-shared-post-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  filter: grayscale(100%) contrast(1.05);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.chat-shared-post-image.is-photo {
  filter: none;
}

.chat-shared-post-body {
  padding: 10px 12px 12px;
}

.chat-shared-post-label {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(134, 232, 232, 0.82);
}

.chat-shared-post-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.35;
}

.chat-shared-post-author {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
}

.chat-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-compose[hidden] {
  display: none;
}

.chat-compose-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.82rem;
}

.chat-compose-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.chat-compose-input:disabled {
  opacity: 0.45;
}

.chat-compose-send {
  flex-shrink: 0;
  align-self: center;
  padding: 6px;
}

.chat-compose-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.chat-compose-blocked {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(248, 168, 200, 0.12);
  color: #F8A8C8;
  font-size: 0.74rem;
  text-align: center;
}

.chat-compose-blocked[hidden] {
  display: none;
}

.chat-message-action-menu {
  z-index: 145;
}

.chat-action-toast {
  z-index: 155;
}

.chat-typing-indicator {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(134, 232, 232, 0.82);
}

.chat-typing-indicator[hidden] {
  display: none;
}

.chat-reply-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border-left: 3px solid #86E8E8;
  background: rgba(134, 232, 232, 0.1);
}

.chat-reply-preview[hidden] {
  display: none;
}

.chat-reply-preview-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-reply-preview-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #86E8E8;
}

.chat-reply-preview-text {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-reply-preview-cancel {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-compose-tool-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1rem;
  cursor: pointer;
}

.chat-compose-add-btn {
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.88);
}

.chat-reply-quote {
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border-left: 3px solid rgba(134, 232, 232, 0.7);
  background: rgba(0, 0, 0, 0.18);
}

.chat-reply-quote-author {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  color: #86E8E8;
}

.chat-reply-quote-text {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-mention {
  color: #86E8E8;
  font-weight: 700;
}

.chat-message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.chat-message-reactions[hidden] {
  display: none;
}

.chat-reaction-chip {
  border: none;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  cursor: pointer;
}

.chat-image-grid {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: min(232px, 62vw);
  border-radius: 14px;
  overflow: hidden;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-image-grid[data-count="1"] {
  grid-template-columns: 1fr;
  max-width: min(220px, 62vw);
}

.chat-image-grid[data-count="2"],
.chat-image-grid[data-count="4"] {
  grid-template-columns: repeat(2, 1fr);
}

.chat-image-grid[data-count="3"],
.chat-image-grid[data-count="5"] {
  grid-template-columns: repeat(2, 1fr);
}

.chat-image-item {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.chat-image-grid:not([data-count="1"]) .chat-image-item {
  max-height: 140px;
  width: 100%;
}

.chat-sticker-bubble {
  font-size: 2.4rem;
  line-height: 1;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-message-action-panel {
  min-width: 190px;
}

.chat-reaction-picker,
.chat-sticker-picker {
  position: fixed;
  inset: 0;
  z-index: 165;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.chat-reaction-picker[hidden],
.chat-sticker-picker[hidden] {
  display: none;
}

.chat-reaction-picker-backdrop,
.chat-sticker-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
}

.chat-reaction-picker-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(100%, 360px);
  padding: 12px;
  border-radius: 18px;
  background: #1a1a1a;
  border: 1px solid rgba(134, 232, 232, 0.22);
}

.chat-reaction-picker-btn,
.chat-sticker-picker-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-sticker-picker-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(100%, 280px);
  padding: 14px;
  border-radius: 18px;
  background: #1a1a1a;
  border: 1px solid rgba(134, 232, 232, 0.22);
}

.chat-sticker-picker-btn {
  width: auto;
  height: 56px;
  font-size: 1.8rem;
}

.chat-group-info-modal {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chat-group-info-modal[hidden] {
  display: none;
}

.chat-group-info-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
}

.chat-group-info-panel {
  position: relative;
  width: min(100%, 320px);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 22px 18px;
  border-radius: 20px;
  background: #1a1a1a;
  border: 1px solid rgba(134, 232, 232, 0.22);
}

.chat-group-info-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-group-info-title {
  margin: 0 0 6px;
  text-align: center;
  font-size: 0.95rem;
}

.chat-group-info-subtitle {
  margin: 0 0 14px;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.52);
}

.chat-group-info-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.chat-group-info-member:hover,
.chat-group-info-member:focus-visible {
  background: rgba(134, 232, 232, 0.1);
}

.chat-group-info-member-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  overflow: hidden;
}

.chat-group-info-member-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-group-info-member-avatar .avatar-initials {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.chat-group-info-member-meta {
  min-width: 0;
}

.chat-group-info-member-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.chat-group-info-member-username {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.48);
}

.chat-group-info-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

.chat-group-info-avatar-btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.chat-group-info-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.chat-group-avatar-image,
.chat-thread-avatar .chat-group-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.chat-group-info-avatar-hint {
  margin: 6px 0 0;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.42);
}

.chat-group-settings {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-group-settings-label {
  display: grid;
  gap: 6px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.56);
}

.chat-group-settings-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.78rem;
}

.chat-group-settings-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(134, 232, 232, 0.14);
  color: #86E8E8;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-group-settings-danger {
  background: rgba(248, 168, 200, 0.12);
  color: #F8A8C8;
}

.chat-add-member-modal {
  position: fixed;
  inset: 0;
  z-index: 175;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.chat-add-member-modal[hidden] {
  display: none;
}

.chat-add-member-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 40, 55, 0.45);
}

.chat-add-member-panel {
  position: relative;
  width: min(100%, 320px);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 22px 18px;
  border-radius: 20px;
  background: #1a1a1a;
  border: 1px solid rgba(134, 232, 232, 0.22);
}

.chat-add-member-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-add-member-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.95rem;
}

.chat-add-member-confirm-top {
  width: 100%;
  margin-bottom: 10px;
}

.chat-add-member-search {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.78rem;
}

.chat-add-member-invite-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  color: rgba(249, 248, 150, 0.82);
}

.chat-group-invite-card {
  display: flex;
  gap: 10px;
  width: min(100%, 260px);
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-group-invite-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.chat-group-invite-body {
  min-width: 0;
  flex: 1;
}

.chat-group-invite-label {
  margin: 0 0 4px;
  font-size: 0.64rem;
  color: rgba(134, 232, 232, 0.82);
}

.chat-group-invite-title {
  margin: 0 0 2px;
  font-size: 0.86rem;
}

.chat-group-invite-subtitle {
  margin: 0;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.48);
}

.chat-group-invite-actions {
  margin-top: 10px;
}

.chat-group-invite-status {
  margin: 8px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
}

.chat-group-invite-status.is-accepted {
  color: #86E8E8;
}

.chat-add-member-list {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.chat-add-member-empty {
  margin: 0 0 12px;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
}

.carousel-private-empty {
  width: 100%;
  padding: 36px 24px;
  text-align: center;
}

.carousel-private-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
}

.carousel-private-text {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.52);
}

.carousel-empty-pinned {
  width: 100%;
  padding: 36px 24px;
  text-align: center;
}

.carousel-empty-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
}

.carousel-empty-text {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.52);
}

.carousel-image.is-photo {
  background-size: cover;
  background-repeat: no-repeat;
}

.chat-room-title.is-group-title {
  cursor: pointer;
  color: #86E8E8;
}

/* Real devices — fill the screen instead of a fixed 9:16 mockup */
@media (max-width: 520px), (hover: none) and (pointer: coarse) {
  body {
    align-items: stretch;
    min-height: 100vh;
    min-height: 100dvh;
  }

  body:has(.home-page),
  body:has(.films-page),
  body:has(.profile-page),
  body:has(.chat-page) {
    background: #050505;
  }

  .phone-frame {
    max-width: none;
    width: 100%;
    aspect-ratio: unset;
    max-height: none;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    box-shadow: none;
  }
}

@media (max-height: 780px) {
  .everyone-main {
    padding-top: 4px;
  }

  .everyone-public-actions,
  .everyone-public-meta {
    margin-top: 0;
  }
}

/* Touch devices — lighter nav rendering for smoother taps */
@media (hover: none) and (pointer: coarse) {
  .bottom-nav-dock {
    transform: translateZ(0);
  }

  .bottom-nav-glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.88);
  }

  .home-page .bottom-nav-glass,
  .profile-page .bottom-nav-glass {
    background: rgba(24, 24, 24, 0.94);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  .nav-item {
    transition: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-item:active {
    opacity: 0.72;
  }

  .nav-item.nav-chat .nav-icon-slot svg,
  .nav-item.nav-films .nav-icon-slot svg,
  .nav-item.nav-profile .nav-icon-slot svg {
    filter: none;
    transition: none;
  }

  .nav-item.post-btn .nav-icon-wrap {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .carousel-viewport {
    perspective: none;
  }

  .carousel-slide {
    transform: none;
    filter: none;
    opacity: 1;
    transition: none;
    will-change: auto;
  }

  .carousel-slide:not(.is-active) {
    opacity: 0.38;
  }

  .carousel-reflection {
    display: none;
  }

  .carousel-track,
  .film-track {
    scroll-behavior: auto;
  }

  .carousel-filter,
  .film-post-filter {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.58);
  }
}

.chat-page .app-header:has(.chat-room-header:not([hidden])) {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 44px 10px 72px;
}

.chat-page .app-header:has(.chat-room-header:not([hidden])) .chat-back-link {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.chat-page .app-header:has(.chat-room-header:not([hidden])) .chat-room-header {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(100% - 120px, 240px);
  z-index: 1;
  pointer-events: none;
}

.chat-page .app-header:has(.chat-room-header:not([hidden])) .chat-room-header-center,
.chat-page .app-header:has(.chat-room-header:not([hidden])) .chat-room-title {
  pointer-events: auto;
}

.chat-page .app-header:has(.chat-room-header:not([hidden])) .chat-room-search-bar {
  width: 100%;
  padding-top: 8px;
}

.chat-room-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.chat-room-search-btn[hidden] {
  display: none;
}

.chat-room-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.chat-room-header[hidden] {
  display: none;
}

.chat-room-header-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.chat-room-header .chat-room-title {
  min-width: 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-room-header .chat-room-title.is-group-title {
  cursor: pointer;
}

.chat-room-header .chat-room-title:hover,
.chat-room-header .chat-room-title:focus-visible {
  color: #86E8E8;
}

.chat-room-care-star {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.chat-room-care-star[hidden] {
  display: none;
}

.chat-room-search-bar {
  width: 100%;
  padding: 0 0 8px;
}

.chat-room-search-bar[hidden] {
  display: none;
}

.chat-stranger-banner {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(249, 248, 150, 0.22);
  background: rgba(249, 248, 150, 0.08);
}

.chat-stranger-banner[hidden] {
  display: none;
}

.chat-stranger-banner-text {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.chat-stranger-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-stranger-btn {
  flex: 1;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-stranger-btn-accept {
  border-color: rgba(134, 232, 232, 0.35);
  background: rgba(134, 232, 232, 0.14);
  color: #86E8E8;
}

.chat-stranger-btn-danger {
  border-color: rgba(248, 168, 200, 0.28);
  color: #F8A8C8;
}

.chat-thread-stranger-label {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(249, 248, 150, 0.12);
  color: rgba(249, 248, 150, 0.92);
  font-size: 0.58rem;
  font-weight: 700;
  vertical-align: middle;
}

.chat-thread-stranger-label[hidden] {
  display: none;
}

.chat-image-preview-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 6px;
  margin-top: auto;
}

.chat-image-preview-row[hidden] {
  display: none;
}

.chat-image-preview-chip {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-image-preview-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-image-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.chat-recalled-text {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.74rem;
  font-style: italic;
}

.chat-message-recalled {
  opacity: 0.88;
}

.chat-message.is-search-hit .chat-text-bubble,
.chat-message.is-search-hit .chat-shared-post,
.chat-message.is-search-hit .chat-image-grid {
  outline: 1px solid rgba(134, 232, 232, 0.45);
  outline-offset: 2px;
}

.chat-message-avatar-link {
  position: relative;
}

.chat-avatar-care-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(18, 18, 22, 0.88);
}

.chat-avatar-care-badge svg {
  width: 10px;
  height: 10px;
}

.chat-thread-row.is-cared {
  border-color: rgba(134, 232, 232, 0.22);
  background: rgba(134, 232, 232, 0.06);
}
