html.is-pending {
  overflow: hidden;
}

.page-skeleton {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: auto;
  background: #fafbfc;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

html.is-pending .page-skeleton {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html.is-ready .page-skeleton {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sk {
  display: block;
  background-image: linear-gradient(100deg, #e8eef3 0%, #f7fbfd 42%, #e8eef3 74%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.15s ease-in-out infinite;
  border-radius: 10px;
}

.sk-round { border-radius: 999px; }
.sk-lg { border-radius: 18px; }
.sk-xl { border-radius: 24px; }

@keyframes sk-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.sk-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 0 40px;
}

.sk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  margin-bottom: 28px;
}

.sk-logo {
  width: 118px;
  height: 40px;
  border-radius: 12px;
}

.sk-nav {
  display: none;
  align-items: center;
  gap: 16px;
}

.sk-pill { width: 72px; height: 14px; }
.sk-cta { width: 108px; height: 36px; }

.sk-hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 12px 0 40px;
}

.sk-copy { display: grid; gap: 14px; justify-items: start; }
.sk-badge { width: 160px; height: 28px; }
.sk-title { width: min(100%, 420px); height: 36px; }
.sk-title.w2 { width: min(78%, 280px); height: 32px; }
.sk-sub { width: min(100%, 460px); height: 14px; }
.sk-sub.w2 { width: min(88%, 380px); }
.sk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sk-btn { width: 148px; height: 44px; }
.sk-btn.ghost { width: 128px; }
.sk-photo { width: 100%; aspect-ratio: 4 / 3; min-height: 200px; }

.sk-band {
  margin: 8px 0 28px;
  padding: 32px 20px;
  border-radius: 24px;
  background: #f0f4f8;
}

.sk-center { display: grid; gap: 10px; justify-items: center; margin-bottom: 24px; }
.sk-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.sk-card {
  background: #ffffff;
  border: 1px solid #e6eef4;
  border-radius: 20px;
  padding: 24px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.sk-icon { width: 56px; height: 56px; border-radius: 16px; }
.sk-card-title { width: 55%; height: 18px; }
.sk-card-line { width: 90%; height: 12px; }
.sk-card-line.w2 { width: 72%; }

.sk-app {
  width: min(72rem, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.sk-app.narrow { width: min(28rem, calc(100% - 32px)); }

.sk-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sk-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 20px;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.sk-kicker { width: 140px; height: 10px; }
.sk-heading { width: 62%; height: 22px; }
.sk-line { width: 100%; height: 12px; }
.sk-line.short { width: 70%; }
.sk-rows { display: grid; gap: 10px; }
.sk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.sk-avatar { width: 40px; height: 40px; flex-shrink: 0; }
.sk-row-copy { flex: 1; display: grid; gap: 8px; }
.sk-chip { width: 68px; height: 22px; flex-shrink: 0; }

.sk-img {
  position: relative;
  overflow: hidden;
  background: #e8eef3;
}

.sk-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.65) 46%, transparent 74%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.15s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sk-img.is-loaded::after {
  opacity: 0;
}

.sk-img img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.sk-img.is-loaded img {
  opacity: 1;
}

.sk-img.circle {
  border-radius: 999px;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.sk-img.circle img {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.chat-sk {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-sk-bubble {
  height: 40px;
  max-width: 72%;
  border-radius: 16px 16px 16px 6px;
}

.chat-sk-bubble.mine {
  align-self: flex-end;
  max-width: 54%;
  border-radius: 16px 16px 6px 16px;
}

.sr-only-sk {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  .sk-header { height: 80px; }
  .sk-logo { width: 148px; height: 52px; }
  .sk-title { height: 48px; }
  .sk-cards { grid-template-columns: 1fr 1fr; }
  .sk-app { padding-top: 24px; }
}

@media (min-width: 1024px) {
  .sk-nav { display: flex; }
  .sk-hero { grid-template-columns: 1fr 1fr; padding-top: 36px; }
  .sk-cards { grid-template-columns: 1fr 1fr 1fr; }
  .sk-copy { justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  .sk,
  .sk-img::after {
    animation: none;
  }
  .page-skeleton {
    transition: none;
  }
}
