/* Portals iOS 27 kit — tokens and primitives extracted from
   «Тестовое Portals» Figma file (Стартовый экран, 375×812).
   SF Pro is not available on this machine; Inter is substituted
   with the file’s sizes, weights and tracking. */

@font-face {
  font-family: "Inter";
  src: url("Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ios-bg: rgb(20, 20, 20);           /* Native/bg  0.079167 */
  --ios-canvas: rgb(41, 41, 41);       /* Figma page bg ≈ 0.162 */
  --ios-label: #ffffff;
  --ios-secondary-label: rgba(255, 255, 255, 0.55);
  --ios-tertiary-label: rgba(255, 255, 255, 0.35);
  --ios-blue: #1689FF;             /* rgb(22, 137, 255) — file primary */
  --ios-blue-cta: #1689FF;
  --ios-fill: rgba(255, 255, 255, 0.08);
  --ios-fill-elevated: rgb(58, 58, 58);    /* Button S secondary */
  --ios-fill-header: rgba(65, 63, 64, 0.4);
  --ios-fill-card: rgba(40, 39, 39, 0.64);
  --ios-fill-field: rgba(28, 28, 28, 0.8);
  --ios-fill-disclosure: rgba(40, 39, 39, 0.44);
  --ios-seg-track: #2c2c2e;
  --ios-seg-selected: #4a4a4d;
  --ios-separator: rgba(255, 255, 255, 0.12);
  --ios-glass-tint: rgba(255, 255, 255, 0.08);
  --ios-radius-phone: 44px;
  --ios-radius-card: 28px;          /* Gift card, smoothing 1 */
  --ios-radius-art: 26px;           /* Gift Image, smoothing 1 */
  --ios-radius-btn-s: 24px;         /* Button S 34px / icon 40px, clamps to pill on 34h */
  --ios-radius-disclosure: 18px;   /* Sale history, smoothing 1 */
  --ios-radius-icon-btn: 24px;     /* 40×40 glass */
  --ios-radius-pill: 999px;
  --ios-status-h: 54px;
  --ios-header-h: 32px;
  --ios-pill-h: 34px;
  --ios-tabbar-h: 96px;
  --ios-btn-h: 50px;
  --ios-btn-s-h: 34px;
  --ios-control-h: 40px;
  --ios-font: "Inter", "SF Pro Text", "SF Pro", -apple-system, system-ui, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--ios-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Generated tree nodes */
.n {
  position: absolute;
  box-sizing: border-box;
}
.n.t-text {
  overflow: visible;
  padding: 0;
  margin: 0;
}
.vec {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  overflow: visible;
}

/* Phone frame — iPhone X / 11, 375×812, continuous 44px corners */
.ios-phone,
.phone-root {
  position: relative;
  width: 375px;
  height: 812px;
  background: var(--ios-bg);
  border-radius: var(--ios-radius-phone);
  overflow: hidden;
  color: var(--ios-label);
  font-family: var(--ios-font);
}

/* Status bar */
.ios-status {
  height: var(--ios-status-h);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 24px 10px 27px;
  box-sizing: border-box;
}
.ios-time {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 22px;
  color: var(--ios-label);
}

/* Dynamic Island */
.ios-island {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: 125px;
  height: 37px;
  background: #000;
  border-radius: 18.5px;
  z-index: 20;
}

/* Header icon / text buttons — Liquid Glass regular small */
.ios-header-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 32px; /* r=32, smoothing 0 — exact capsule */
  background: var(--ios-fill-header);
  color: var(--ios-label);
  font-family: var(--ios-font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.08px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: inset 0 0.6px 0 rgba(255, 255, 255, 0.08);
}
.ios-header-btn.icon {
  width: 32px;
  padding: 0;
}

/* Balance / currency pills */
.ios-pill {
  height: var(--ios-pill-h);
  padding: 0 12px 0 8px;
  border-radius: 1000px; /* r=1000, smoothing 0.6 — stadium, radius clamped to 17 */
  background:
    linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06)),
    rgba(0, 0, 0, 0.55);
  color: var(--ios-label);
  font-family: var(--ios-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: inset 0 0.6px 0 rgba(255, 255, 255, 0.08);
}

/* Large title row (All items / Collections…) */
.ios-large-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 32px;
  color: var(--ios-label);
}
.ios-large-title.is-muted {
  color: var(--ios-tertiary-label);
}

/* Search field */
.ios-search {
  height: 40px;
  border-radius: 100px; /* r=100, smoothing 0 */
  background: var(--ios-fill-field);
  color: var(--ios-secondary-label);
  font-size: 14px;
  font-weight: 500;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  backdrop-filter: blur(20px) saturate(1.15);
}

/* 40×40 glass icon button */
.ios-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--ios-radius-icon-btn); /* 24px, smoothing 0 */
  background: var(--ios-fill-elevated);
  color: var(--ios-label);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: inset 0 0.6px 0 rgba(255, 255, 255, 0.08);
}

/* Filter / dropdown chip */
.ios-chip {
  height: 34px;
  padding: 0 12px;
  border-radius: 100px;
  background: var(--ios-fill-field);
  color: var(--ios-label);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Sales history row */
.ios-disclosure {
  height: 46px;
  border-radius: var(--ios-radius-disclosure);
  background: var(--ios-fill-disclosure);
  /* smoothing 1 — Figma squircle for 343×46 r=18 */
  clip-path: path('M 320 0 c 4.6475 0 6.9713 0 8.8959 0.4267 a 18.0000 18.0000 0 0 1 13.6774 13.6774 c 0.4267 1.9246 0.4267 4.2484 0.4267 8.8959 L 343 23 c 0 4.6475 0 6.9713 -0.4267 8.8959 a 18.0000 18.0000 0 0 1 -13.6774 13.6774 c -1.9246 0.4267 -4.2484 0.4267 -8.8959 0.4267 L 23 46 c -4.6475 0 -6.9713 0 -8.8959 -0.4267 a 18.0000 18.0000 0 0 1 -13.6774 -13.6774 c -0.4267 -1.9246 -0.4267 -4.2484 -0.4267 -8.8959 L 0 23 c 0 -4.6475 0 -6.9713 0.4267 -8.8959 a 18.0000 18.0000 0 0 1 13.6774 -13.6774 c 1.9246 -0.4267 4.2484 -0.4267 8.8959 -0.4267 Z');
  -webkit-clip-path: path('M 320 0 c 4.6475 0 6.9713 0 8.8959 0.4267 a 18.0000 18.0000 0 0 1 13.6774 13.6774 c 0.4267 1.9246 0.4267 4.2484 0.4267 8.8959 L 343 23 c 0 4.6475 0 6.9713 -0.4267 8.8959 a 18.0000 18.0000 0 0 1 -13.6774 13.6774 c -1.9246 0.4267 -4.2484 0.4267 -8.8959 0.4267 L 23 46 c -4.6475 0 -6.9713 0 -8.8959 -0.4267 a 18.0000 18.0000 0 0 1 -13.6774 -13.6774 c -0.4267 -1.9246 -0.4267 -4.2484 -0.4267 -8.8959 L 0 23 c 0 -4.6475 0 -6.9713 0.4267 -8.8959 a 18.0000 18.0000 0 0 1 13.6774 -13.6774 c 1.9246 -0.4267 4.2484 -0.4267 8.8959 -0.4267 Z');
  color: var(--ios-label);
  font-size: 16px;
  font-weight: 600;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Gift card */
.ios-gift-card {
  width: 165.5px;
  height: 253px;
  border-radius: var(--ios-radius-card);
  background: var(--ios-fill-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* smoothing 1 — Figma squircle 165.5×253 r=28 */
  clip-path: path('M 109.5 0 c 26.3987 0 39.5980 0 47.7990 8.2010 a 28.0000 28.0000 0 0 1 0.0000 0.0000 c 8.2010 8.2010 8.2010 21.4003 8.2010 47.7990 L 165.5 197 c 0 26.3987 0 39.5980 -8.2010 47.7990 a 28.0000 28.0000 0 0 1 0.0000 0.0000 c -8.2010 8.2010 -21.4003 8.2010 -47.7990 8.2010 L 56 253 c -26.3987 0 -39.5980 0 -47.7990 -8.2010 a 28.0000 28.0000 0 0 1 0.0000 0.0000 c -8.2010 -8.2010 -8.2010 -21.4003 -8.2010 -47.7990 L 0 56 c 0 -26.3987 0 -39.5980 8.2010 -47.7990 a 28.0000 28.0000 0 0 1 0.0000 0.0000 c 8.2010 -8.2010 21.4003 -8.2010 47.7990 -8.2010 Z');
  -webkit-clip-path: path('M 109.5 0 c 26.3987 0 39.5980 0 47.7990 8.2010 a 28.0000 28.0000 0 0 1 0.0000 0.0000 c 8.2010 8.2010 8.2010 21.4003 8.2010 47.7990 L 165.5 197 c 0 26.3987 0 39.5980 -8.2010 47.7990 a 28.0000 28.0000 0 0 1 0.0000 0.0000 c -8.2010 8.2010 -21.4003 8.2010 -47.7990 8.2010 L 56 253 c -26.3987 0 -39.5980 0 -47.7990 -8.2010 a 28.0000 28.0000 0 0 1 0.0000 0.0000 c -8.2010 -8.2010 -8.2010 -21.4003 -8.2010 -47.7990 L 0 56 c 0 -26.3987 0 -39.5980 8.2010 -47.7990 a 28.0000 28.0000 0 0 1 0.0000 0.0000 c 8.2010 -8.2010 21.4003 -8.2010 47.7990 -8.2010 Z');
}
.ios-gift-card .art {
  width: 149.5px;
  height: 149.5px;
  border-radius: var(--ios-radius-art);
  margin: 8px auto 0;
  overflow: hidden;
  background: rgb(40, 39, 39);
  /* smoothing 1 — Figma squircle 149.5×149.5 r=26 */
  clip-path: path('M 97.5 0 c 24.5130 0 36.7696 0 44.3848 7.6152 a 26.0000 26.0000 0 0 1 0.0000 0.0000 c 7.6152 7.6152 7.6152 19.8717 7.6152 44.3848 L 149.5 97.5 c 0 24.5130 0 36.7696 -7.6152 44.3848 a 26.0000 26.0000 0 0 1 0.0000 0.0000 c -7.6152 7.6152 -19.8717 7.6152 -44.3848 7.6152 L 52 149.5 c -24.5130 0 -36.7696 0 -44.3848 -7.6152 a 26.0000 26.0000 0 0 1 0.0000 0.0000 c -7.6152 -7.6152 -7.6152 -19.8717 -7.6152 -44.3848 L 0 52 c 0 -24.5130 0 -36.7696 7.6152 -44.3848 a 26.0000 26.0000 0 0 1 0.0000 0.0000 c 7.6152 -7.6152 19.8717 -7.6152 44.3848 -7.6152 Z');
  -webkit-clip-path: path('M 97.5 0 c 24.5130 0 36.7696 0 44.3848 7.6152 a 26.0000 26.0000 0 0 1 0.0000 0.0000 c 7.6152 7.6152 7.6152 19.8717 7.6152 44.3848 L 149.5 97.5 c 0 24.5130 0 36.7696 -7.6152 44.3848 a 26.0000 26.0000 0 0 1 0.0000 0.0000 c -7.6152 7.6152 -19.8717 7.6152 -44.3848 7.6152 L 52 149.5 c -24.5130 0 -36.7696 0 -44.3848 -7.6152 a 26.0000 26.0000 0 0 1 0.0000 0.0000 c -7.6152 -7.6152 -7.6152 -19.8717 -7.6152 -44.3848 L 0 52 c 0 -24.5130 0 -36.7696 7.6152 -44.3848 a 26.0000 26.0000 0 0 1 0.0000 0.0000 c 7.6152 -7.6152 19.8717 -7.6152 44.3848 -7.6152 Z');
}
.ios-gift-card .name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 22px;
  padding: 8px 12px 0;
}
.ios-gift-card .sku {
  font-size: 12px;
  font-weight: 600;
  color: var(--ios-secondary-label);
  padding: 0 12px;
  line-height: 14px;
}

/* Primary CTA / price button */
.ios-btn {
  height: var(--ios-btn-s-h);
  border: 0;
  border-radius: var(--ios-radius-btn-s); /* 24px; on 34px height this is a pill */
  background: var(--ios-blue);
  color: #fff;
  font-family: var(--ios-font);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 14px;
}
.ios-btn.block {
  height: var(--ios-btn-h);
  width: 100%;
  border-radius: 25px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.ios-btn.secondary {
  background: var(--ios-fill-elevated);
  color: var(--ios-label);
}

/* Tab bar — liquid glass */
.ios-tabbar {
  height: var(--ios-tabbar-h);
  padding: 8px 12px 24px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(to top, rgba(20, 20, 20, 0.92), rgba(20, 20, 20, 0.4) 70%, transparent);
}
.ios-tab {
  flex: 1;
  height: 54px;
  border-radius: 27px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ios-secondary-label);
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
  backdrop-filter: blur(24px) saturate(1.15);
  box-shadow: inset 0 0.6px 0 rgba(255, 255, 255, 0.08);
}
.ios-tab.is-selected {
  color: var(--ios-label);
  background: rgba(255, 255, 255, 0.14);
}
.ios-tab.is-selected svg,
.ios-tab.is-selected .ico { color: var(--ios-blue); }

/* Home indicator */
.ios-home-indicator {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: #fff;
}

/* iOS segmented control (Safe | Balanced | Risky) */
.ios-segmented {
  display: flex;
  align-items: stretch;
  height: 32px;
  padding: 2px;
  border-radius: 999px;
  background: var(--ios-seg-track);
  position: relative;
}
.ios-segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  color: #8e8e93;
  font-family: var(--ios-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.08px;
  border-radius: 999px;
  position: relative;
}
.ios-segmented button.is-selected {
  background: var(--ios-seg-selected);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 0.5px 0 rgba(255, 255, 255, 0.18);
}
.ios-segmented button.div:not(.is-selected)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.18);
}

/* iOS stepper (−  3  +) */
.ios-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
}
.ios-stepper .count {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}
.ios-stepper .num {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.8px;
  line-height: 44px;
  color: var(--ios-label);
}
.ios-stepper .caption {
  font-size: 13px;
  font-weight: 500;
  color: var(--ios-secondary-label);
  margin-top: 2px;
}
.ios-stepper .spin {
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--ios-label);
  font-size: 24px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

/* Hint under pack */
.ios-hint {
  font-size: 13px;
  font-weight: 500;
  color: var(--ios-secondary-label);
  text-align: center;
  letter-spacing: -0.08px;
}

/* Page dots */
.ios-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.ios-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: block;
}
.ios-dots i.is-on {
  width: 16px;
  border-radius: 3px;
  background: #fff;
}
