/* Komponen iOS bersama: navigasi, daftar, tab bar, sheet, alert, penampil foto, cerita */

/* Lapisan aplikasi */
.app-layer {
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.12);
  border-radius: 48px;
  overflow: hidden;
  transition:
    transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.25s,
    border-radius 0.4s;
}
.app-layer.open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.app-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}
/* Komponen iOS umum */
.ios {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--grouped);
  color: var(--text);
}
.nav-head {
  flex: none;
  padding: 47px 16px 6px;
  background: var(--grouped);
}
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
}
.nav-l,
.nav-r {
  display: flex;
  align-items: center;
  gap: 14px;
}
.large-title {
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.15;
}
.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar {
  display: none;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--blue);
  margin-left: -8px;
  font-size: 17px;
}
.back svg {
  width: 24px;
  height: 24px;
}
.txt-btn {
  color: var(--blue);
  font-size: 17px;
}
.txt-btn.bold,
.bold {
  font-weight: 600;
}
.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--blue);
  border-radius: 50%;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}
.y {
  color: #e0a800 !important;
}
.r {
  color: #ff3b30 !important;
}
.o {
  color: #ff9f0a !important;
}
.red {
  color: var(--red) !important;
}
.link {
  color: var(--blue);
}
.muted {
  color: var(--sub);
}
.small {
  font-size: 14px;
}
.hl {
  color: var(--blue);
}
.pad {
  padding: 4px 16px;
}
.spacer {
  width: 60px;
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(118, 118, 128, 0.12);
  color: var(--sub);
  margin: 2px 0 8px;
}
.searchbar svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.searchbar input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  font-size: 17px;
  color: var(--text);
  min-width: 0;
}
.list {
  background: var(--card);
}
.list.inset {
  margin: 0 16px 22px;
  border-radius: 11px;
  overflow: hidden;
}
.list.plain {
  background: var(--bg);
}
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 16px;
  cursor: pointer;
}
.row + .row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 0.5px;
  background: var(--sep);
}
.row:has(.set-ic) + .row::before,
.row:has(.av) + .row::before {
  left: 60px;
}
.row:active {
  background: var(--fill);
}
.row > svg {
  width: 14px;
  height: 14px;
  color: #c4c4c7;
  flex: none;
}
.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.row-main b {
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-main b.big {
  font-size: 20px;
}
.row-main small {
  color: var(--sub);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.row-main small svg {
  width: 12px;
  height: 12px;
}
.row-meta {
  color: var(--sub);
  font-size: 16px;
  white-space: nowrap;
}
.row.col {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.row.col small {
  font-size: 14px;
}
.row.center {
  justify-content: center;
}
.row.missed .row-main b {
  color: var(--red);
}
.r-ico {
  width: 14px;
  color: var(--sub);
}
.r-ico svg {
  width: 13px;
  height: 13px;
}
.info-i {
  color: var(--blue);
  width: 24px;
  height: 24px;
}
.info-i svg {
  width: 22px;
  height: 22px;
}
.set-ic {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.set-ic svg {
  width: 19px;
  height: 19px;
}
.sec {
  margin: 6px 32px 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: 0.2px;
}
.letter {
  padding: 4px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub);
  background: var(--grouped);
  position: sticky;
  top: 0;
  z-index: 1;
}
.empty {
  padding: 26px 20px;
  text-align: center;
  color: var(--sub);
  font-size: 15px;
}
.empty.big {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 120px;
}
.empty.big svg {
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
}
.empty.big b {
  color: var(--text);
  font-size: 20px;
}
.foot-note {
  margin: 0 32px 40px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.4;
}
.foot-note.light {
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}
.av {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--fill);
}
.av.xs {
  width: 24px;
  height: 24px;
}
.av.sm {
  width: 36px;
  height: 36px;
}
.av.lg {
  width: 60px;
  height: 60px;
}
.av.xl {
  width: 92px;
  height: 92px;
}
.tabbar {
  flex: none;
  display: flex;
  justify-content: space-around;
  padding: 7px 4px 28px;
  background: var(--bar);
  border-top: 0.5px solid var(--sep);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.tabbar button {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #999;
  font-size: 10px;
  font-weight: 500;
}
.tabbar button svg {
  width: 26px;
  height: 26px;
}
.tabbar button.on {
  color: var(--blue);
}
.tabbar.icons-only button svg {
  width: 27px;
  height: 27px;
}
.tabbar.icons-only button.on {
  color: var(--text);
}
.tb-badge {
  position: absolute;
  top: -3px;
  left: 54%;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.tb-av {
  width: 27px;
  height: 27px;
}
.tabbar button.on .tb-av {
  box-shadow: 0 0 0 2px var(--text);
}
.chips {
  display: flex;
  gap: 8px;
  padding-bottom: 6px;
}
.chips button {
  padding: 6px 13px;
  border-radius: 16px;
  background: var(--fill);
  font-size: 14px;
  color: var(--sub);
}
.chips button.on {
  background: #d8fdd2;
  color: #0b6b3a;
  font-weight: 600;
}
.screen.dark .chips button.on {
  background: #103d26;
  color: #6fe3a1;
}
.switch {
  position: relative;
  width: 51px;
  height: 31px;
  flex: none;
}
.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(120, 120, 128, 0.2);
  transition: background 0.25s;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.15),
    0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s;
}
.switch input:checked + span {
  background: var(--green);
}
.switch input:checked + span::after {
  transform: translateX(20px);
}
.switch input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
/* Sheet, alert, pemilih */
.sheet-wrap {
  position: absolute;
  inset: 0;
  z-index: 30;
}
.sheet-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72%;
  display: flex;
  flex-direction: column;
  background: var(--grouped);
  border-radius: 14px 14px 0 0;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
  padding-bottom: 26px;
  color: var(--text);
}
.sheet.tall {
  height: 86%;
  max-height: none;
}
.sheet-wrap.show .sheet-bg {
  opacity: 1;
}
.sheet-wrap.show .sheet {
  transform: none;
}
.sheet-grab {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgba(120, 120, 128, 0.35);
  margin: 6px auto 0;
  flex: none;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 10px;
  flex: none;
}
.sheet-head b {
  font-size: 17px;
}
.sheet-list {
  flex: 1;
  overflow-y: auto;
  background: var(--card);
  margin: 0 16px;
  border-radius: 11px;
}
.srow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--sep);
}
.srow:last-child {
  border-bottom: 0;
}
.srow .av {
  width: 40px;
  height: 40px;
}
.srow b {
  display: block;
  font-weight: 500;
}
.srow small {
  color: var(--sub);
  font-size: 14px;
}
.srow:active {
  background: var(--fill);
}
.alert-wrap {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  animation: fade 0.2s;
}
.alert {
  width: 270px;
  border-radius: 14px;
  background: rgba(242, 242, 247, 0.94);
  color: #000;
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: pop 0.22s ease-out;
}
.screen.dark .alert {
  background: rgba(44, 44, 46, 0.96);
  color: #fff;
}
.alert > b {
  display: block;
  padding: 18px 16px 2px;
  font-size: 17px;
}
.alert p {
  margin: 4px 16px 16px;
  font-size: 13px;
  line-height: 1.35;
}
.alert-input {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 7px 8px;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  border-radius: 7px;
  background: #fff;
  color: #000;
  font-size: 15px;
  outline: none;
  text-align: center;
  letter-spacing: 6px;
}
.alert-btns {
  display: flex;
  border-top: 0.5px solid rgba(60, 60, 67, 0.3);
}
.alert-btns button {
  flex: 1;
  padding: 11px;
  color: #007aff;
  font-size: 17px;
}
.alert-btns button + button {
  border-left: 0.5px solid rgba(60, 60, 67, 0.3);
}
.alert-btns .bold {
  font-weight: 600;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
/* Penampil foto */
.viewer {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s;
}
.viewer.show {
  opacity: 1;
}
.vw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px 12px 8px;
}
.vw-close {
  color: #fff;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}
.vw-close svg {
  width: 24px;
  height: 24px;
}
.vw-title {
  text-align: center;
}
.vw-title b {
  display: block;
  font-size: 16px;
}
.vw-title small {
  font-size: 12px;
  opacity: 0.7;
}
.vw-count {
  width: 36px;
  font-size: 12px;
  opacity: 0.7;
  text-align: right;
}
.vw-stage {
  flex: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
}
.vw-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: fade 0.25s;
}
.vw-nav {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: grid;
  place-items: center;
}
.vw-nav svg {
  width: 20px;
  height: 20px;
}
.vw-nav.prev {
  left: 8px;
}
.vw-nav.next {
  right: 8px;
}
.vw-tools {
  display: flex;
  justify-content: space-around;
  padding: 14px 10px 34px;
}
.vw-tools button {
  color: #0a84ff;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.vw-tools button svg {
  width: 26px;
  height: 26px;
}
.vw-tools button.on {
  color: #ff375f;
}
/* Cerita / status */
.story {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: #000;
  color: #fff;
  animation: pop 0.25s ease-out;
}
.story.out {
  opacity: 0;
  transition: opacity 0.2s;
}
.st-bars {
  position: absolute;
  z-index: 2;
  top: 50px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}
.st-bars span {
  flex: 1;
  height: 2.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}
.st-bars i {
  display: block;
  height: 100%;
  background: #fff;
}
.st-head {
  position: absolute;
  z-index: 2;
  top: 62px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.st-head .av {
  width: 34px;
  height: 34px;
}
.st-head b {
  font-size: 15px;
}
.st-head small {
  opacity: 0.75;
  font-size: 13px;
}
.st-head button {
  margin-left: auto;
  color: #fff;
  font-size: 22px;
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 3;
}
.st-img {
  position: absolute;
  top: 46px;
  left: 0;
  width: 100%;
  height: calc(100% - 140px);
  object-fit: cover;
  border-radius: 10px;
}
.st-tap {
  position: absolute;
  top: 110px;
  bottom: 100px;
  z-index: 1;
  cursor: pointer;
}
.st-tap.left {
  left: 0;
  width: 35%;
}
.st-tap.right {
  right: 0;
  width: 65%;
}
.st-ring,
.ring {
  position: relative;
  flex: none;
  padding: 2.5px;
  border-radius: 50%;
  background: conic-gradient(#25d366, #1aa98c, #25d366);
  display: inline-grid;
}
.st-ring .av,
.ring .av {
  border: 2.5px solid var(--card);
}
.st-ring.seen,
.ring.seen {
  background: #c7c7cc;
}
.st-ring.none,
.ring.none {
  background: transparent;
}
.st-plus {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0a84ff;
  color: #fff;
  font-style: normal;
  font-size: 16px;
  font-weight: 600;
  display: grid;
  place-items: center;
  border: 2px solid var(--card);
  line-height: 1;
}

/* Kolom tulis komentar (Instagram) */
.cm-compose {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 30px;
  border-top: 0.5px solid var(--sep);
}
.cm-compose input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--sep);
  border-radius: 18px;
  outline: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
.cm-reply {
  margin-top: 2px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 600;
}

