@font-face {
  font-family: "SB Sans";
  src: url("../../assets/fonts/sb-sans-display.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --text-primary: #262626;
  --muted: #f0f1f4;
  --blue: #1175da;
  --rope: #8c99ad;
  --color-icon-secondary-default: #949494;
  --color-border-inverse: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #fff;
  color: var(--text-primary);
  font-family: "SB Sans Text", "SB Sans", sans-serif;
}

.phone-surface {
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  background: #fff;
}

body:is(.is-preview, .is-viewer) .useful-block {
  padding-top: 24px;
  padding-bottom: 24px;
}

.useful-block {
  width: 100%;
  max-width: 838px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  overflow: hidden;
}

.useful-block h1 {
  margin: 0 0 12px;
  color: #262626;
  font-family: "SB Sans Display", "SB Sans", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: 0;
}

.card-strip {
  width: calc(100% + 16px);
  height: 168px;
  display: flex;
  gap: 4px;
  align-items: flex-start;
  margin-right: -16px;
  padding: 0 16px 28px 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

@media (hover: hover) and (pointer: fine) {
  .card-strip {
    cursor: grab;
  }

  .card-strip.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
  }
}

.skeleton-card,
.feature-card {
  width: 142px;
  height: 140px;
  flex: 0 0 142px;
  scroll-snap-align: start;
}

.skeleton-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--muted);
}

.feature-card {
  position: relative;
}

.card-shell {
  position: relative;
  width: 142px;
  height: 140px;
  padding: 16px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--muted);
}

.muted-card .card-shell {
  background: var(--muted);
}

.green-card .card-shell {
  background: var(--muted);
}

.card-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0;
}

.house-illustration {
  position: absolute;
  right: 6px;
  bottom: 4px;
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.badge-rig {
  position: absolute;
  z-index: 2;
  left: -4px;
  top: 108px;
  width: 88px;
  height: 58px;
  pointer-events: none;
}

.rope-layer {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.rope {
  stroke: var(--rope);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.pin {
  fill: var(--color-icon-secondary-default);
  stroke: var(--color-border-inverse);
  stroke-width: 2;
}

.swing-badge {
  position: absolute;
  left: var(--badge-x, 34px);
  top: var(--badge-y, 38px);
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 6px rgba(17, 117, 218, 0.22);
  transform: translate(-50%, -50%) rotate(var(--badge-angle, 0deg));
  transform-origin: center;
  will-change: transform, left, top;
}

.swing-badge span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0;
  white-space: nowrap;
}

.badge-anchor {
  position: absolute;
  top: 2px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.badge-anchor-left {
  left: 16px;
}

.badge-anchor-right {
  right: 16px;
}

@media (max-width: 359px) {
  .useful-block {
    padding-right: 12px;
    padding-left: 12px;
  }

  .card-strip {
    width: calc(100% + 12px);
    margin-right: -12px;
    padding-right: 12px;
  }
}

@media (min-width: 600px) {
  .useful-block {
    padding: 32px 24px 48px;
  }

  .card-strip {
    width: calc(100% + 24px);
    gap: 8px;
    margin-right: -24px;
    padding-right: 24px;
  }
}

@media (min-width: 900px) {
  .useful-block {
    padding: 48px 40px 64px;
  }

  .useful-block h1 {
    margin-bottom: 16px;
  }

  .card-strip {
    width: 100%;
    gap: 12px;
    margin-right: 0;
    padding-right: 0;
    justify-content: center;
  }

  body.is-viewer .useful-block {
    max-width: 420px;
  }

  body.is-viewer .card-strip {
    justify-content: flex-start;
    scroll-snap-type: none;
  }

  body.is-viewer .card-strip.is-dragging {
    scroll-snap-type: none;
    user-select: none;
  }
}
