/* ==========================================================================
   Komponen khusus YPN, satu keluarga dengan token & komponen Sassly (--sx-*).
   Isi: shell mobile (topbar + tab bawah), avatar, kartu ekspedisi, detail trip,
   form ekspedisi, skyline, badge, kru, hitung mundur, halaman masuk.
   ========================================================================== */

/* ---------- Shell: desktop pakai sidebar, HP pakai topbar + tab bawah ---------- */
:root {
  --m-nav-h: 62px;
  --m-safe-bottom: env(safe-area-inset-bottom, 0px);
}

.topbar__brand {
  padding: 0;
}

.topbar__brand .brand__mark {
  width: 30px;
  height: 30px;
}

.topbar__title {
  display: none;
}

.page {
  padding-bottom: calc(var(--m-nav-h) + var(--m-safe-bottom) + var(--sx-space-8));
}

.m-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--sx-z-sticky);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--m-nav-h) + var(--m-safe-bottom));
  padding-bottom: var(--m-safe-bottom);
  background: color-mix(in srgb, var(--sx-surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -1px 0 var(--sx-line);
}

.m-nav__item {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  font-size: var(--sx-fs-xs);
  font-weight: 600;
  color: var(--sx-muted);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.m-nav__item .sx-icon {
  width: 21px;
  height: 21px;
  transition: transform var(--sx-dur-2) var(--sx-ease-spring);
}

.m-nav__item[aria-current="page"] {
  color: var(--sx-accent);
}

.m-nav__item[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28%;
  right: 28%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--sx-accent);
}

.m-nav__item:active .sx-icon {
  transform: scale(0.9);
}

/* Menu akun (avatar di topbar HP) memakai <details>, jalan tanpa JS */
.m-account {
  position: relative;
}

.m-account__toggle {
  display: block;
  list-style: none;
  border-radius: 50%;
  cursor: pointer;
}

.m-account__toggle::-webkit-details-marker {
  display: none;
}

.m-account__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--sx-z-drawer);
  display: grid;
  gap: 4px;
  width: 248px;
  padding: var(--sx-space-3);
  box-shadow: var(--sx-shadow-pop);
  animation: modal-in var(--sx-dur-2) var(--sx-ease-out);
}

.m-account__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--sx-line-soft);
}

.m-account__menu .sx-btn--block {
  justify-content: flex-start;
}

.m-account__label {
  padding: 8px 6px 2px;
  font-size: var(--sx-fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sx-faint);
}

@media (min-width: 1024px) {
  .m-nav,
  .topbar__brand,
  .m-account {
    display: none;
  }

  .topbar__title {
    display: block;
  }

  .page {
    padding-bottom: var(--sx-space-8);
  }
}

/* iOS men-zoom input < 16px; di HP pakai 16px. */
@media (max-width: 639px) {
  .sx-input {
    font-size: 16px;
  }

  /* Tombol "Catat trip" di topbar HP cukup ikon, supaya tidak dobel dengan tombol di halaman. */
  .topbar .sx-btn--accent {
    width: var(--_h);
    padding: 0;
  }

  .topbar .sx-btn--accent span {
    display: none;
  }

  .toolbar .sx-select {
    flex: 1 1 140px;
  }
}

/* ---------- Avatar anggota ---------- */
.avatar {
  position: relative;
  overflow: hidden;
  background: var(--avatar-bg, var(--sx-primary));
  color: #fff;
}

.avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--md { width: 36px; height: 36px; font-size: 13px; }
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.avatar--xl { width: 72px; height: 72px; font-size: 24px; box-shadow: 0 0 0 3px var(--sx-surface), 0 0 0 4px var(--sx-line); }

.avatar-stack {
  display: flex;
}

.avatar-stack .avatar {
  box-shadow: 0 0 0 2px var(--sx-surface);
}

.avatar-stack .avatar + .avatar {
  margin-left: -7px;
}

.avatar-stack__more {
  margin-left: 6px;
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
  align-self: center;
}

/* ---------- Tambahan komponen Sassly ---------- */
.kpi--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--sx-dur-2) var(--sx-ease-out), transform var(--sx-dur-2) var(--sx-ease-out);
}

.kpi--link:hover {
  box-shadow: var(--sx-shadow-3);
  transform: translateY(-2px);
}

.kpi--highlight {
  background: linear-gradient(160deg, var(--sx-surface), var(--sx-accent-soft));
}

.kpi__unit {
  font-size: var(--sx-fs-md);
  font-weight: 500;
  color: var(--sx-muted);
}

.kpi__value--text {
  font-size: var(--sx-fs-xl);
}

.plain-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--sx-space-3);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sx-line-soft);
}

.plain-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.panel__link {
  font-size: var(--sx-fs-base);
  font-weight: 600;
  color: var(--sx-accent-ink);
  text-decoration: none;
}

.panel__link:hover {
  text-decoration: underline;
}

.section-gap {
  margin-bottom: var(--sx-space-4);
}

.mdpl {
  font-family: var(--sx-font-mono);
  font-variant-numeric: tabular-nums;
}

.link-accent {
  color: var(--sx-accent-ink);
  font-weight: 600;
}

/* Grid kartu responsif */
.card-grid {
  display: grid;
  gap: var(--sx-space-3);
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dash-grid {
  display: grid;
  gap: var(--sx-space-4);
  margin-bottom: var(--sx-space-4);
}

@media (min-width: 1024px) {
  .dash-grid {
    grid-template-columns: 1.55fr 1fr;
    align-items: start;
  }
}

/* ---------- Kartu ekspedisi ---------- */
.exp-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--sx-dur-2) var(--sx-ease-out), transform var(--sx-dur-2) var(--sx-ease-out);
}

.exp-card:hover {
  box-shadow: var(--sx-shadow-3);
  transform: translateY(-2px);
}

.exp-card__cover {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: var(--sx-surface-3);
}

.cover-art,
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-img {
  object-fit: cover;
}

.exp-card__chips {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
}

.exp-card__mdpl {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: color-mix(in srgb, var(--sx-surface) 92%, transparent);
}

.exp-card__body {
  display: grid;
  gap: 6px;
  padding: var(--sx-space-3) var(--sx-space-4) var(--sx-space-4);
}

.exp-card__title {
  font-size: var(--sx-fs-lg);
}

.exp-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
}

.exp-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.exp-card__meta .sx-icon {
  width: 13px;
  height: 13px;
}

.year-group {
  margin-bottom: var(--sx-space-6);
}

.year-group__head {
  display: flex;
  align-items: baseline;
  gap: var(--sx-space-2);
  margin-bottom: var(--sx-space-3);
}

.year-group__title {
  font-size: var(--sx-fs-xl);
}

/* ---------- Hitung mundur trip berikutnya ---------- */
.next-trip {
  display: grid;
  gap: var(--sx-space-3);
  padding: var(--sx-space-5);
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(255, 255, 255, 0.12), transparent 60%),
    linear-gradient(140deg, var(--sx-primary), color-mix(in oklab, var(--sx-accent), black 18%));
  box-shadow: var(--sx-shadow-2);
  transition: transform var(--sx-dur-2) var(--sx-ease-out), box-shadow var(--sx-dur-2) var(--sx-ease-out);
}

.next-trip:hover {
  transform: translateY(-2px);
  box-shadow: var(--sx-shadow-3);
}

.next-trip__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--sx-fs-sm);
  color: rgba(255, 255, 255, 0.78);
}

.next-trip__title {
  font-size: var(--sx-fs-2xl);
  font-weight: var(--sx-display-weight);
  letter-spacing: var(--sx-display-tracking);
}

.next-trip__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: var(--sx-fs-base);
  color: rgba(255, 255, 255, 0.85);
}

.next-trip__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.countdown__big {
  padding: 4px 10px;
  border-radius: var(--sx-r-md);
  background: var(--sx-flag);
  font-size: var(--sx-fs-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.countdown__text {
  font-size: var(--sx-fs-base);
  font-weight: 500;
}

.next-trip--live .countdown__big {
  animation: sx-pulse 1.8s var(--sx-ease-in-out) infinite;
}

.next-trip .sx-chip {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

/* ---------- Detail ekspedisi ---------- */
.detail-cover {
  position: relative;
  aspect-ratio: 21 / 8;
  min-height: 160px;
  max-height: 260px;
  width: 100%;
  overflow: hidden;
  margin-bottom: var(--sx-space-4);
  border-radius: var(--sx-r-2xl);
  background: var(--sx-surface-3);
  box-shadow: var(--sx-shadow-1);
}

.detail-cover__chips {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-cover__chips .sx-chip {
  background: color-mix(in srgb, var(--sx-surface) 92%, transparent);
}

.info-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.info-list__row {
  display: flex;
  justify-content: space-between;
  gap: var(--sx-space-3);
  padding: 9px 0;
  border-bottom: 1px solid var(--sx-line-soft);
}

.info-list__row:last-child {
  border-bottom: 0;
}

.info-list dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sx-muted);
}

.info-list dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.crew-rows {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crew-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--sx-r-md);
  color: inherit;
  text-decoration: none;
}

.crew-row:hover {
  background: var(--sx-raised-hover);
}

.crew-row__meta {
  min-width: 0;
  flex: 1;
  line-height: 1.3;
}

.crew-row__name {
  font-weight: 600;
}

.crew-row__sub {
  display: block;
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
}

.story {
  font-size: var(--sx-fs-md);
  line-height: 1.75;
  color: var(--sx-ink-2);
  white-space: normal;
}

.highlight-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlight-list li {
  display: flex;
  gap: 10px;
}

.highlight-list .sx-icon {
  margin-top: 3px;
  color: var(--sx-accent);
}

.quote-card {
  margin: 0;
  padding: var(--sx-space-4);
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface-2);
  box-shadow: inset 3px 0 0 var(--sx-accent), inset 0 0 0 1px var(--sx-line-soft);
}

.quote-card blockquote {
  margin: 0;
  font-size: var(--sx-fs-lg);
  font-weight: 500;
  line-height: 1.5;
}

.quote-card figcaption {
  margin-top: 8px;
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
}

.memory {
  display: flex;
  gap: 10px;
  padding: var(--sx-space-3) 0;
  border-bottom: 1px solid var(--sx-line-soft);
}

.memory:last-child {
  border-bottom: 0;
}

.memory__body {
  min-width: 0;
  flex: 1;
}

.memory__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-bottom: 2px;
}

.memory__text {
  color: var(--sx-ink-2);
  line-height: 1.6;
}

.album-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sx-space-2);
}

/* ---------- Form ekspedisi ---------- */
.pick-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pick {
  position: relative;
}

.pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pick span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--sx-r-pill);
  font-size: var(--sx-fs-base);
  font-weight: 600;
  color: var(--sx-ink-2);
  background: var(--sx-surface);
  box-shadow: inset 0 0 0 1px var(--sx-line-strong);
  cursor: pointer;
  transition: background-color var(--sx-dur-1) ease, box-shadow var(--sx-dur-1) ease, transform var(--sx-dur-1) ease;
}

.pick small {
  font-family: var(--sx-font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--sx-muted);
}

.pick--person span {
  padding-left: 4px;
}

.pick input:checked + span {
  color: var(--sx-accent-ink);
  background: var(--sx-accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--sx-accent);
}

.pick input:focus-visible + span {
  box-shadow: var(--sx-focus-ring);
}

.pick:active span {
  transform: scale(0.97);
}

.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment label {
  position: relative;
}

.segment input:checked + .segment__item {
  background: var(--sx-surface);
  color: var(--sx-ink);
  box-shadow: var(--sx-shadow-1);
}

.segment input:focus-visible + .segment__item {
  box-shadow: var(--sx-focus-ring);
}

.form-section + .form-section {
  margin-top: var(--sx-space-4);
}

.form-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--sx-space-4);
  font-size: var(--sx-fs-lg);
}

.form-section__title .sx-icon {
  color: var(--sx-accent);
}

.participant {
  border-radius: var(--sx-r-lg);
  box-shadow: inset 0 0 0 1px var(--sx-line);
  transition: background-color var(--sx-dur-2) ease, box-shadow var(--sx-dur-2) ease;
}

.participant + .participant {
  margin-top: 6px;
}

.participant.is-on {
  background: var(--sx-accent-soft);
  box-shadow: inset 0 0 0 1px var(--sx-accent-line);
}

.participant__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-weight: 600;
  cursor: pointer;
}

.participant__toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--sx-accent);
}

.participant__details {
  display: none;
  gap: 8px;
  padding: 0 10px 10px 36px;
}

.participant.is-on .participant__details {
  display: grid;
  animation: fade-in var(--sx-dur-2) var(--sx-ease-out);
}

.participant__summits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.participant__fields {
  display: grid;
  gap: 8px;
}

@media (min-width: 640px) {
  .participant__fields {
    grid-template-columns: 1fr 1.4fr;
  }
}

.repeater {
  display: grid;
  gap: 8px;
}

.repeater:empty {
  display: none;
}

.repeater__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: fade-in var(--sx-dur-2) var(--sx-ease-out);
}

.repeater__row > :first-child {
  flex: 1;
  min-width: 0;
}

.repeater__grid {
  display: grid;
  gap: 8px;
}

@media (min-width: 640px) {
  .repeater__grid--2 {
    grid-template-columns: 170px 1fr;
  }

  .repeater__grid--2 > .span-2 {
    grid-column: 1 / -1;
  }
}

.repeater__add {
  justify-self: start;
  margin-top: 8px;
}

.sticky-actions {
  position: sticky;
  bottom: calc(var(--m-nav-h) + var(--m-safe-bottom) + 8px);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sx-space-2);
  margin-top: var(--sx-space-4);
  padding: 10px 12px;
  border-radius: var(--sx-r-xl);
  background: color-mix(in srgb, var(--sx-surface) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--sx-shadow-pop);
}

.sticky-actions__info {
  margin-right: auto;
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
}

@media (min-width: 1024px) {
  .sticky-actions {
    bottom: var(--sx-space-4);
  }
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--sx-surface), 0 0 0 3px transparent;
  transition: box-shadow var(--sx-dur-1) ease, transform var(--sx-dur-1) ease;
}

.swatch input {
  position: absolute;
  opacity: 0;
}

.swatch:has(input:checked) {
  box-shadow: 0 0 0 2px var(--sx-surface), 0 0 0 4px var(--sx-ink);
}

.swatch:has(input:focus-visible) {
  box-shadow: 0 0 0 2px var(--sx-surface), var(--sx-focus-ring);
}

.danger-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sx-space-3);
  margin-top: var(--sx-space-4);
  padding: var(--sx-space-4);
  border-radius: var(--sx-r-xl);
  box-shadow: inset 0 0 0 1px var(--sx-danger-line);
  background: color-mix(in srgb, var(--sx-danger-soft) 50%, transparent);
}

.danger-zone p {
  flex: 1 1 260px;
  color: var(--sx-ink-2);
}

/* ---------- Skyline Kita ---------- */
.skyline {
  overflow-x: auto;
  padding: var(--sx-space-3) var(--sx-space-2) var(--sx-space-2);
  border-radius: var(--sx-r-lg);
  background: linear-gradient(color-mix(in srgb, var(--sx-accent-soft) 80%, var(--sx-surface)), var(--sx-surface) 75%);
  -webkit-overflow-scrolling: touch;
}

.skyline__svg {
  width: 100%;
  height: auto;
}

.skyline__ground {
  stroke: var(--sx-line-strong);
  stroke-width: 2;
}

.skyline__peak {
  stroke: var(--sx-surface);
  stroke-width: 2;
  stroke-linejoin: round;
  transition: opacity var(--sx-dur-1) ease;
}

.skyline__svg:hover .skyline__peak {
  opacity: 0.72;
}

.skyline__svg .skyline__peak:hover {
  opacity: 1;
}

.skyline__mdpl {
  font-family: var(--sx-font-mono);
  font-size: 13px;
  font-weight: 700;
  fill: var(--sx-ink-2);
}

.skyline__name {
  font-family: var(--sx-font);
  font-size: 15px;
  font-weight: 650;
  fill: var(--sx-ink);
}

.skyline__count {
  font-family: var(--sx-font);
  font-size: 12px;
  fill: var(--sx-muted);
}

/* ---------- Badge ---------- */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sx-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .badge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.badge {
  position: relative;
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 12px;
  border-radius: var(--sx-r-lg);
  box-shadow: inset 0 0 0 1px var(--sx-line);
  color: var(--sx-muted);
}

.badge__emoji {
  font-size: 22px;
  line-height: 1.3;
  filter: grayscale(1);
  opacity: 0.35;
}

.badge__name {
  font-size: var(--sx-fs-base);
  font-weight: 650;
}

.badge__detail {
  font-size: var(--sx-fs-sm);
  line-height: 1.4;
}

.badge.is-earned {
  color: var(--sx-ink);
  background: linear-gradient(160deg, var(--sx-surface), var(--sx-accent-soft));
  box-shadow: inset 0 0 0 1px var(--sx-accent-line);
}

.badge.is-earned .badge__emoji {
  filter: none;
  opacity: 1;
}

.badge.is-earned .badge__detail {
  color: var(--sx-ink-2);
}

.badge--manual.is-earned {
  background: linear-gradient(160deg, var(--sx-surface), var(--sx-flag-soft));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sx-flag) 30%, transparent);
}

.badge__remove {
  position: absolute;
  top: 6px;
  right: 6px;
}

.emoji-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emoji-pick label {
  position: relative;
}

.emoji-pick input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.emoji-pick span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--sx-r-md);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px var(--sx-line-strong);
  cursor: pointer;
}

.emoji-pick input:checked + span {
  background: var(--sx-accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--sx-accent);
}

.emoji-pick input:focus-visible + span {
  box-shadow: var(--sx-focus-ring);
}

.emoji-pick .sx-input {
  width: 110px;
}

/* ---------- Kru ---------- */
.crew-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--sx-space-4);
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--sx-dur-2) var(--sx-ease-out), transform var(--sx-dur-2) var(--sx-ease-out);
}

.crew-card:hover {
  box-shadow: var(--sx-shadow-3);
  transform: translateY(-2px);
}

.crew-card__meta {
  min-width: 0;
  flex: 1;
  line-height: 1.3;
}

.crew-card__name {
  font-weight: 650;
}

.crew-card__alias {
  display: block;
  overflow: hidden;
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.crew-card__badges {
  font-size: 15px;
  letter-spacing: 1px;
}

.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sx-space-4);
  margin-bottom: var(--sx-space-5);
}

.profile-head__meta {
  min-width: 0;
  flex: 1;
}

.profile-head__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--sx-fs-2xl);
  font-weight: var(--sx-display-weight);
  letter-spacing: var(--sx-display-tracking);
}

.profile-head__sub {
  margin-top: 4px;
  color: var(--sx-muted);
}

/* ---------- Kartu akses login (password sementara) ---------- */
.credential {
  display: grid;
  gap: var(--sx-space-3);
  padding: var(--sx-space-4);
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface-2);
  box-shadow: inset 0 0 0 1px var(--sx-line);
}

.credential__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.credential__value {
  font-family: var(--sx-font-mono);
  font-size: var(--sx-fs-lg);
  font-weight: 700;
}

/* ---------- Halaman masuk & setup ---------- */
.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: var(--sx-space-5) var(--sx-space-4);
}

.auth-main {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  padding: var(--sx-space-6);
  animation: modal-in var(--sx-dur-4) var(--sx-ease-out);
}

.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sx-space-5);
}

.auth-card__title {
  font-size: var(--sx-fs-2xl);
  font-weight: var(--sx-display-weight);
  letter-spacing: var(--sx-display-tracking);
}

.auth-card__desc {
  margin: 6px 0 var(--sx-space-5);
  color: var(--sx-muted);
}

.auth-art {
  height: 120px;
  margin: calc(var(--sx-space-6) * -1) calc(var(--sx-space-6) * -1) var(--sx-space-5);
  overflow: hidden;
  border-radius: var(--sx-card-radius) var(--sx-card-radius) 0 0;
}

.auth-art svg {
  width: 100%;
  height: 100%;
}

.auth-foot {
  margin-top: var(--sx-space-4);
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
  text-align: center;
}

.password-field {
  position: relative;
}

.password-field .sx-input {
  padding-right: 42px;
}

.password-field .sx-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
}

/* Item grid boleh menyusut; tanpa ini skyline/tabel lebar mendorong panel keluar layar di HP. */
.grid-2 > *,
.dash-grid > *,
.stack > *,
.card-grid > * {
  min-width: 0;
}

/* ==========================================================================
   Tahap 3 — Rencana trip
   ========================================================================== */

/* Tab rencana: bisa digeser di HP */
.tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.tabs .segment {
  flex-wrap: nowrap;
}

.tabs .segment__item {
  white-space: nowrap;
}

.plan-card {
  display: grid;
  gap: var(--sx-space-3);
}

.plan-card__title {
  margin: 8px 0 4px;
  font-size: var(--sx-fs-xl);
}

.plan-card__title a {
  text-decoration: none;
}

.plan-card__title a:hover {
  text-decoration: underline;
}

.plan-card .cell-sub .sx-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

.plan-card__rsvp {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-card__mine {
  width: 100%;
}

.plan-card__mine label {
  flex: 1;
}

.plan-card__mine .segment__item {
  width: 100%;
  justify-content: center;
}

.rsvp-pick {
  display: grid;
  gap: var(--sx-space-2);
}

.rsvp-pick .option-card {
  align-items: center;
}

.rsvp-group + .rsvp-group {
  margin-top: var(--sx-space-4);
  padding-top: var(--sx-space-3);
  border-top: 1px solid var(--sx-line-soft);
}

.rsvp-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rsvp-group__people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rsvp-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: var(--sx-r-pill);
  font-size: var(--sx-fs-base);
  font-weight: 600;
  text-decoration: none;
  background: var(--sx-fill);
}

.rsvp-person:hover {
  background: var(--sx-fill-strong);
}

/* Itinerary */
.itinerary-day + .itinerary-day {
  margin-top: var(--sx-space-5);
}

.itinerary-day__title {
  margin-bottom: 8px;
  font-size: var(--sx-fs-md);
  color: var(--sx-accent-ink);
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0 8px 18px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sx-accent);
  box-shadow: 0 0 0 3px var(--sx-accent-soft);
}

.timeline__item::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: -8px;
  left: 7px;
  width: 2px;
  background: var(--sx-line);
}

.timeline__item:last-child::after {
  display: none;
}

.timeline__time {
  min-width: 44px;
  padding-top: 1px;
  color: var(--sx-muted);
}

.timeline__body {
  min-width: 0;
  flex: 1;
}

/* Gear kelompok */
.gear-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gear-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--sx-line-soft);
}

.gear-row:target {
  background: var(--sx-accent-soft);
}

.gear-row__form {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 8px;
}

.gear-row__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gear-row__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}

.gear-qty {
  display: grid;
  gap: 2px;
}

@media (min-width: 900px) {
  .gear-row__form {
    grid-template-columns: minmax(160px, 1fr) 2.6fr;
    align-items: center;
  }

  .gear-row__fields {
    grid-template-columns: 70px 70px 1.2fr 1.2fr auto;
  }

  .gear-qty {
    grid-template-columns: 1fr;
  }
}

/* Checklist pribadi */
.checklist {
  display: grid;
  gap: 2px;
  margin: 0 0 var(--sx-space-4);
  padding: 0;
  list-style: none;
}

.checklist__item {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--sx-r-md);
}

.checklist__item:hover {
  background: var(--sx-raised-hover);
}

.checklist__toggle {
  min-width: 0;
  flex: 1;
}

.checklist__check {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.checklist__box {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 6px;
  color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--sx-line-strong);
  transition: background-color var(--sx-dur-1) ease, color var(--sx-dur-1) ease, transform var(--sx-dur-2) var(--sx-ease-spring);
}

.checklist__box .sx-icon {
  width: 13px;
  height: 13px;
}

.checklist__item.is-done .checklist__box {
  color: #fff;
  background: var(--sx-accent);
  box-shadow: none;
  transform: scale(1.06);
}

.checklist__item.is-done .checklist__label {
  color: var(--sx-muted);
  text-decoration: line-through;
}

.inline-add {
  display: flex;
  gap: 8px;
}

.inline-add .sx-input {
  min-width: 0;
  flex: 1;
}

/* Patungan */
.transfer-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.transfer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--sx-r-lg);
  box-shadow: inset 0 0 0 1px var(--sx-line);
}

.transfer.is-mine {
  background: var(--sx-flag-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sx-flag) 35%, transparent);
}

.transfer__who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.transfer__arrow {
  color: var(--sx-muted);
}

.transfer__amount {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Wishlist */
.wishlist {
  display: grid;
  gap: 2px;
  margin: var(--sx-space-4) 0 0;
  padding: 0;
  list-style: none;
}

.wishlist__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-top: 1px solid var(--sx-line-soft);
}

.wishlist__rank {
  width: 22px;
  font-weight: 700;
  color: var(--sx-faint);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.wishlist__body {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 200px;
}

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

.wishlist-add[open] summary {
  margin-bottom: 4px;
}

/* ==========================================================================
   Tahap 4 — Recap tahunan, kartu summit, "Hari ini X tahun lalu"
   ========================================================================== */
.story-layout {
  display: grid;
  gap: var(--sx-space-5);
  align-items: start;
}

@media (min-width: 900px) {
  .story-layout {
    grid-template-columns: minmax(280px, 380px) 1fr;
  }

  .story {
    position: sticky;
    top: calc(56px + var(--sx-space-4));
  }
}

.story {
  display: grid;
  gap: var(--sx-space-3);
  margin: 0;
}

.story__frame {
  overflow: hidden;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  border-radius: var(--sx-r-2xl);
  box-shadow: var(--sx-shadow-3);
  aspect-ratio: 9 / 16;
}

.story__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.story__actions {
  display: grid;
  gap: var(--sx-space-2);
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  justify-items: center;
}

.story__actions .sx-hint {
  text-align: center;
}

.on-this-day {
  display: flex;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--sx-dur-2) var(--sx-ease-out), transform var(--sx-dur-2) var(--sx-ease-out);
}

.on-this-day:hover {
  box-shadow: var(--sx-shadow-3);
  transform: translateY(-2px);
}

.on-this-day__art {
  position: relative;
  width: 120px;
  flex: none;
  background: var(--sx-surface-3);
}

.on-this-day__body {
  display: grid;
  gap: 6px;
  padding: var(--sx-space-4);
  min-width: 0;
}

.on-this-day__body .sx-chip {
  width: fit-content;
}

.on-this-day__title {
  font-size: var(--sx-fs-lg);
  font-weight: 650;
}

.crew-row-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.crew-row-wrap > .crew-row {
  min-width: 0;
  flex: 1;
}

/* ---------- Galeri foto (halaman Galeri & detail trip) ---------- */
.chip-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
}

.chip-scroll .sx-chip {
  flex: none;
  text-decoration: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1280px) {
  .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.photo-tile {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface-2);
  box-shadow: 0 0 0 1px var(--sx-line);
}

.photo-tile__link {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--sx-fill);
}

.photo-tile__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--sx-dur-3) var(--sx-ease-out);
}

@media (hover: hover) {
  .photo-tile__link:hover img {
    transform: scale(1.04);
  }
}

.photo-tile__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: color-mix(in srgb, var(--sx-accent) 88%, transparent);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}

.photo-tile__badge .sx-icon {
  width: 15px;
  height: 15px;
}

.photo-tile__foot {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 6px 10px;
}

.photo-tile__text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.photo-tile__text a {
  color: inherit;
  text-decoration: none;
}

/* Tombol aksi menempel di pojok kanan atas foto (kaca gelap), supaya teks di bawah tetap lega. */
.photo-tile__actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--sx-r-pill);
  background: rgb(10 20 16 / 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.photo-tile__actions .sx-btn {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  color: #fff;
}

.photo-tile__actions .sx-btn:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.18);
}

.photo-tile__actions .sx-btn .sx-icon {
  width: 16px;
  height: 16px;
}

.photo-tile__actions form {
  display: contents;
}

.photo-tile__actions .is-on,
.photo-tile__actions .is-on:hover {
  color: #8fe0b8;
}

.upload-panel__summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: var(--sx-accent-ink, var(--sx-accent));
  cursor: pointer;
  list-style: none;
}

.upload-panel__summary::-webkit-details-marker {
  display: none;
}

.upload-panel__summary .sx-icon {
  width: 18px;
  height: 18px;
}

.photo-drop {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-bottom: 14px;
  padding: 22px 16px;
  text-align: center;
  border: 1.5px dashed var(--sx-line-strong);
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface-2);
  cursor: pointer;
  transition: border-color var(--sx-dur-2) var(--sx-ease-out), background var(--sx-dur-2) var(--sx-ease-out);
}

.photo-drop:hover,
.photo-drop:focus-within,
.has-files .photo-drop {
  border-color: var(--sx-accent);
  background: var(--sx-accent-soft);
}

.photo-drop:focus-within {
  box-shadow: var(--sx-focus-ring);
}

.photo-drop__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 50%;
  color: var(--sx-accent);
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line);
}

.photo-drop__title {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.photo-drop__hint {
  font-size: var(--sx-fs-xs);
  color: var(--sx-muted);
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  background: rgb(8 14 12 / 0.94);
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox[open] {
  display: grid;
  place-items: center;
  animation: lightbox-in var(--sx-dur-3) var(--sx-ease-out);
}

@keyframes lightbox-in {
  from { opacity: 0; }
}

.lightbox__figure {
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: min(1200px, 100vw);
  margin: 0;
  padding: 56px 12px calc(16px + env(safe-area-inset-bottom, 0px));
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  border-radius: var(--sx-r-md);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.5);
}

.lightbox__caption {
  display: grid;
  gap: 2px;
  max-width: 640px;
  padding: 0 8px;
  text-align: center;
  font-size: var(--sx-fs-sm);
  color: rgb(255 255 255 / 0.75);
}

.lightbox__caption strong {
  font-size: var(--sx-fs-md);
  color: #fff;
}

.lightbox__count {
  font-size: var(--sx-fs-xs);
  color: rgb(255 255 255 / 0.5);
}

.lightbox__btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  cursor: pointer;
  transition: background var(--sx-dur-2) var(--sx-ease-out);
}

.lightbox__btn:hover {
  background: rgb(255 255 255 / 0.22);
}

.lightbox__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox__close {
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 10px;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  translate: 0 -50%;
}

.lightbox__prev {
  left: 10px;
}

.lightbox__next {
  right: 10px;
}

.lightbox__btn[hidden] {
  display: none;
}

/* ---------- Menu "Lainnya" (HP) ---------- */
.menu-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
}

.menu-hero__meta {
  display: grid;
  min-width: 0;
}

.menu-hero__meta strong {
  font-size: var(--sx-fs-lg);
}

.menu-group {
  margin-bottom: 20px;
}

.menu-group__label {
  margin: 0 4px 8px;
  font-size: var(--sx-fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sx-muted);
}

.menu-list {
  overflow: hidden;
  padding: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.menu-item + .menu-item {
  box-shadow: inset 0 1px 0 var(--sx-line-soft, var(--sx-line));
}

.menu-item:active {
  background: var(--sx-fill);
}

.menu-item__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--sx-r-md);
  color: var(--sx-accent);
  background: var(--sx-accent-soft);
}

.menu-item__text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.menu-item__text span {
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
}

.menu-item__chev {
  flex: none;
  color: var(--sx-faint, var(--sx-muted));
}

/* ---------- Tabel jadi daftar kartu di HP (.data-table--stack) ----------
   Baris = satu kartu: sel pertama melebar, tombol aksi di kanan, sel lain berjejer di bawahnya.
   [data-hide-mobile] disembunyikan, [data-full] satu baris penuh, [data-label] diberi label kecil. */
@media (max-width: 639px) {
  .data-table--stack,
  .data-table--stack tbody {
    display: block;
    width: 100%;
  }

  .data-table--stack thead,
  .data-table--stack [data-hide-mobile] {
    display: none;
  }

  .data-table--stack tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 12px 16px;
    box-shadow: inset 0 -1px 0 var(--sx-line);
  }

  .data-table--stack tbody tr:last-child {
    box-shadow: none;
  }

  .data-table--stack td {
    display: block;
    padding: 0;
    border: 0;
    text-align: left;
  }

  /* Baris pertama: sel utama + tombol aksi; sel lain turun ke baris berikutnya. */
  .data-table--stack td:first-child {
    flex: 1 1 calc(100% - 110px);
    min-width: 0;
  }

  .data-table--stack tr:not(:has(td.actions)) td:first-child {
    flex-basis: 100%;
  }

  .data-table--stack td.actions {
    margin-left: auto;
  }

  .data-table--stack td:not(:first-child):not(.actions) {
    order: 1;
  }

  .data-table--stack td[data-full] {
    flex-basis: 100%;
  }

  .data-table--stack td[data-label]::before {
    content: attr(data-label) " ";
    font-size: var(--sx-fs-xs);
    font-weight: 500;
    color: var(--sx-muted);
  }

  .data-table--stack td.num {
    font-size: var(--sx-fs-sm);
  }
}

/* ---------- Admin: foto gunung ---------- */
.mountain-photo {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .mountain-photo { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
}

.mountain-photo__preview {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--sx-r-lg);
  background: var(--sx-fill);
}

.mountain-photo__preview img,
.mountain-photo__preview .art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Panduan penggunaan (/panduan) ---------- */
.guide {
  display: grid;
  gap: 16px;
}

@media (min-width: 1024px) {
  .guide { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
  .guide__toc { position: sticky; top: 88px; }
}

.guide__toc {
  min-width: 0;
}

.guide__toc-label {
  display: block;
  margin: 0 4px 8px;
  font-size: var(--sx-fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sx-muted);
}

.guide__toc-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.guide__toc-list::-webkit-scrollbar { display: none; }

.guide__toc-list a {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--sx-r-pill);
  font-size: var(--sx-fs-sm);
  font-weight: 600;
  color: var(--sx-ink);
  text-decoration: none;
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line);
}

.guide__toc-list .sx-icon {
  width: 16px;
  height: 16px;
  color: var(--sx-accent);
}

@media (min-width: 1024px) {
  .guide__toc-list { display: grid; gap: 2px; overflow: visible; }
  .guide__toc-list a { border-radius: var(--sx-r-md); background: transparent; box-shadow: none; }
  .guide__toc-list a:hover { background: var(--sx-fill); }
}

.guide__body {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.guide-sec {
  scroll-margin-top: 88px;
}

.guide-sec--admin {
  box-shadow: inset 0 0 0 1px var(--sx-accent-line, var(--sx-accent)), var(--sx-card-shadow, none);
}

.guide-sec__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: var(--sx-fs-lg);
  font-weight: 750;
}

.guide-sec__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--sx-r-md);
  color: var(--sx-accent);
  background: var(--sx-accent-soft);
}

.guide-sub {
  margin: 18px 0 10px;
  font-size: var(--sx-fs-md);
  font-weight: 700;
}

.guide-sub:first-of-type {
  margin-top: 0;
}

.guide-steps,
.guide-points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.6;
}

.guide-steps {
  counter-reset: step;
}

.guide-steps li {
  position: relative;
  padding-left: 38px;
  counter-increment: step;
}

.guide-steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: var(--sx-fs-sm);
  font-weight: 750;
  color: #fff;
  background: var(--sx-accent);
}

.guide-points li {
  position: relative;
  padding-left: 20px;
}

.guide-points li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sx-flag);
}

.guide-sec code {
  padding: 1px 6px;
  border-radius: var(--sx-r-xs, 4px);
  font-family: var(--sx-font-mono);
  font-size: 0.9em;
  background: var(--sx-fill);
}

.guide-note {
  display: flex;
  gap: 10px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--sx-r-md);
  font-size: var(--sx-fs-sm);
  line-height: 1.55;
  background: var(--sx-surface-2);
}

.guide-note .sx-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--sx-accent);
}

.guide-faq {
  display: grid;
  gap: 8px;
}

.guide-faq details {
  border-radius: var(--sx-r-md);
  background: var(--sx-surface-2);
}

.guide-faq summary {
  padding: 12px 14px;
  font-weight: 650;
  cursor: pointer;
}

.guide-faq p {
  margin: 0;
  padding: 0 14px 14px;
  line-height: 1.6;
  color: var(--sx-ink-2, var(--sx-ink));
}

/* ---------- Pengaturan akun: foto profil ---------- */
.avatar-upload {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.avatar-upload > .avatar {
  flex: none;
}

/* ---------- Instagram ---------- */
.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--sx-fs-sm);
  font-weight: 600;
  color: var(--sx-accent-ink, var(--sx-accent));
  text-decoration: none;
}

.ig-link .sx-icon {
  width: 16px;
  height: 16px;
}

.ig-link:hover {
  text-decoration: underline;
}

/* ---------- Profil: pendakian di luar YPN ---------- */
.climb-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.climb-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--sx-r-md);
  background: var(--sx-surface-2);
}

.climb-list__dot {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--sx-r-md);
  color: #fff;
  background: var(--dot);
}

.climb-list__dot .sx-icon {
  width: 18px;
  height: 18px;
}

.climb-list__text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.climb-list__text span {
  font-size: var(--sx-fs-sm);
  color: var(--sx-muted);
}

.climb-list__item form {
  flex: none;
}

.crew-card__ig {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--sx-fs-xs);
  font-weight: 600;
  color: var(--sx-accent-ink, var(--sx-accent));
}

.crew-card__ig .sx-icon {
  width: 13px;
  height: 13px;
}

/* ---------- Tanda versi ---------- */
.app-version {
  display: block;
  margin-top: 10px;
  font-size: var(--sx-fs-xs);
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--sx-muted);
  text-decoration: none;
}

a.app-version:hover,
.app-version a:hover {
  color: var(--sx-accent);
}

.app-version a {
  color: inherit;
  text-decoration: none;
}

.app-version--center {
  margin: 18px 0 0;
  text-align: center;
}

/* ---------- Beranda: ringkasan statistik (dua kolom) ---------- */
.dash-stats {
  display: grid;
  gap: var(--sx-space-4, 16px);
}

.dash-stats > * {
  min-width: 0;
}

@media (min-width: 1024px) {
  .dash-stats { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}

/* Skyline tidak membengkak di layar lebar (SVG tetap proporsional, ditaruh di tengah). */
.skyline__svg {
  max-height: 280px;
}
