@font-face {
  font-family: Monoton;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Monoton-Regular.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  /* Overridden from the display scale script. 96/25.4 is the CSS mm fallback. */
  --px-per-mm: 3.7795;
  --pocket: #6e3ab5;
  --pocket-bg: rgb(175 82 222 / 0.22);
  --pro: #7a5600;
  --pro-bg: rgb(255 204 0 / 0.32);
  --text: #f5f5f7;
  --muted: #d2d2d7;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pocket: #e0b6ff;
    --pro: #ffe14a;
    --pro-bg: rgb(255 214 10 / 0.18);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  color: var(--text);
}

body { overflow-x: hidden; }

button, a, select { font: inherit; color: inherit; }

button, .save-link, .cta, .upsell-button, .text-cta {
  min-height: 44px;
  min-width: 44px;
}

:focus-visible {
  outline: 3px solid #0a84ff;
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 8px;
  top: 8px;
  transform: translateY(-150%);
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus { transform: none; }

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

.shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  container-type: size;
}

.device-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  container-type: size;
}

/* Body sizes: iPhone 18 Pro 71.9×150.0 mm; 11-inch iPad Pro 177.5×249.7 mm.
   --px-per-mm is physical CSS pixels per millimetre, so the cap is life size
   when the stage is large enough. The viewport terms shrink it when it is not. */
.device {
  position: relative;
  container-type: size;
  max-width: 100%;
  max-height: 100cqh;
  background:
    linear-gradient(145deg, #8e8e93 0%, #3a3a3c 16%, #1c1c1e 42%, #2c2c2e 68%, #0c0c0e 100%);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.28),
    inset 0 0 0 3px #111,
    0 18px 40px rgb(0 0 0 / 0.45);
}

.device[data-frame="iphone"][data-orient="portrait"] {
  width: min(calc(71.9 * var(--px-per-mm) * 1px), 100cqw, calc(100cqh * 433 / 882));
  max-height: min(calc(150 * var(--px-per-mm) * 1px), 100cqh);
  aspect-ratio: 433 / 882;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.device[data-frame="iphone"][data-orient="landscape"] {
  width: min(calc(150 * var(--px-per-mm) * 1px), 100cqw, calc(100cqh * 882 / 433));
  max-height: min(calc(71.9 * var(--px-per-mm) * 1px), 100cqh);
  aspect-ratio: 882 / 433;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.device[data-frame="ipad"][data-orient="portrait"] {
  width: min(calc(177.5 * var(--px-per-mm) * 1px), 100cqw, calc(100cqh * 177.5 / 249.7));
  max-height: min(calc(249.7 * var(--px-per-mm) * 1px), 100cqh);
  aspect-ratio: 177.5 / 249.7;
  border-radius: 4.5%;
}
.device[data-frame="ipad"][data-orient="landscape"] {
  width: min(calc(249.7 * var(--px-per-mm) * 1px), 100cqw, calc(100cqh * 249.7 / 177.5));
  max-height: min(calc(177.5 * var(--px-per-mm) * 1px), 100cqh);
  aspect-ratio: 249.7 / 177.5;
  border-radius: 3.2%;
}

.iphone-bezel {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  display: none;
}
.device[data-frame="iphone"] .iphone-bezel { display: block; }
.device[data-frame="iphone"] .hardware,
.device[data-frame="iphone"] .island { display: none; }
.device[data-frame="iphone"][data-orient="portrait"] .iphone-bezel {
  inset: 0;
  width: 100%;
  height: 100%;
}
.device[data-frame="iphone"][data-orient="landscape"] .iphone-bezel {
  width: 100cqh;
  height: 100cqw;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.hardware { position: absolute; inset: 0; pointer-events: none; }

.hw {
  position: absolute;
  background: linear-gradient(#6e6e73, #1c1c1e 55%, #3a3a3c);
  border-radius: 2px;
}

.device[data-frame="iphone"] .hw.camera,
.device[data-frame="ipad"] .island { display: none; }

.device[data-orient="portrait"] .silent { left: -3px; top: 15%; width: 3px; height: 3.4%; }
.device[data-orient="portrait"] .vol-up { left: -3px; top: 21%; width: 3px; height: 6.2%; }
.device[data-orient="portrait"] .vol-down { left: -3px; top: 28.5%; width: 3px; height: 6.2%; }
.device[data-orient="portrait"] .power { right: -3px; top: 22%; width: 3px; height: 9%; }
.device[data-orient="portrait"] .hw.camera {
  top: 1.2%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2c2c2e, #000 60%);
  box-shadow: inset 0 0 0 1px #3a3a3c;
}

.device[data-orient="landscape"] .silent { top: -3px; left: 15%; height: 3px; width: 3.4%; }
.device[data-orient="landscape"] .vol-up { top: -3px; left: 21%; height: 3px; width: 6.2%; }
.device[data-orient="landscape"] .vol-down { top: -3px; left: 28.5%; height: 3px; width: 6.2%; }
.device[data-orient="landscape"] .power { bottom: -3px; left: 22%; height: 3px; width: 9%; }
.device[data-orient="landscape"] .hw.camera {
  left: 1.2%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2c2c2e, #000 60%);
  box-shadow: inset 0 0 0 1px #3a3a3c;
}

.island { position: absolute; z-index: 5; pointer-events: none; background: #000; }

.device[data-frame="iphone"][data-orient="portrait"] .island {
  top: 1.5%;
  left: 50%;
  width: 31%;
  height: 4.3%;
  transform: translateX(-50%);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #1c1c1e;
}
.device[data-frame="iphone"][data-orient="landscape"] .island {
  left: 1.5%;
  top: 50%;
  height: 31%;
  width: 4.3%;
  transform: translateY(-50%);
  border-radius: 999px;
}

.screen {
  position: absolute;
  overflow: hidden;
  background: #000;
  container-type: size;
}

.device[data-frame="iphone"][data-orient="portrait"] .screen {
  left: 4.907%;
  top: 2.183%;
  width: 89.954%;
  height: 95.635%;
  right: auto;
  bottom: auto;
  border-radius: 14.31% / 6.61%;
}
.device[data-frame="iphone"][data-orient="landscape"] .screen {
  left: 2.183%;
  top: 5.104%;
  width: 95.635%;
  height: 89.954%;
  right: auto;
  bottom: auto;
  border-radius: 6.61% / 14.31%;
}
.device[data-frame="ipad"][data-orient="portrait"] .screen {
  left: 4.79%;
  right: 4.79%;
  top: 3.38%;
  bottom: 3.38%;
  border-radius: 2.6%;
}
.device[data-frame="ipad"][data-orient="landscape"] .screen {
  left: 3.38%;
  right: 3.38%;
  top: 4.79%;
  bottom: 4.79%;
  border-radius: 1.8%;
}

/* Logical-point profiles. Every in-screen length uses calc(100cqi * <pt> / var(--w)).
   cqi resolves against .screen (container-type: size), whose inline size is the screen width.
   --safe: iPhone 62pt matches the measured 91px top / notch band at 874pt height.
   iPad 24pt is the status-bar inset the native layout respects; the iPad preview was not measured. */
.screen[data-frame="iphone"][data-orient="portrait"] { --w: 402; --safe: 62; }
.screen[data-frame="iphone"][data-orient="landscape"] { --w: 874; --safe: 62; }
.screen[data-frame="ipad"][data-orient="portrait"] { --w: 834; --safe: 24; }
.screen[data-frame="ipad"][data-orient="landscape"] { --w: 1210; --safe: 24; }

/* In-screen components. Lengths are logical points scaled by the screen's inline size.
   Citations: ShutterButton, OrientationManager, ButtonSection, CollageButtons, LayoutConstants, CameraView. */

.settings-btn {
  position: absolute;
  z-index: 5;
  top: calc(16 * var(--pt));
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: calc(8 * var(--pt)) calc(12 * var(--pt));
  border: max(1px, calc(1 * var(--pt))) solid rgb(255 255 255 / 0.55);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
  color: #fff;
  backdrop-filter: blur(16px);
}

.screen[data-orient="portrait"] .settings-btn { right: calc(16 * var(--pt)); left: auto; }
.screen[data-orient="landscape"] .settings-btn { left: calc(16 * var(--pt)); right: auto; }

.settings-btn .icon {
  width: calc(28 * var(--pt));
  height: calc(28 * var(--pt));
}

.settings-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.icon { width: 22px; height: 22px; display: block; flex: none; }

.booth-body,
.collage {
  position: absolute;
  inset: 0;
  display: flex;
  min-width: 0;
  min-height: 0;
  background: #000;
  /* One screen-point, captured here so the gear stays screen-sized inside the preview slot. */
  --pt: calc(100cqi / var(--w));
}

.screen[data-orient="portrait"] .booth-body,
.screen[data-orient="portrait"] .collage {
  flex-direction: column;
  align-items: stretch;
  padding-top: calc(100cqi * var(--safe) / var(--w));
}

.screen[data-orient="landscape"] .booth-body,
.screen[data-orient="landscape"] .collage {
  flex-direction: row;
  align-items: stretch;
  padding-left: calc(100cqi * var(--safe) / var(--w)); /* notch-left only; reversed landscape is unmeasured */
}

.camera-slot {
  min-width: 0;
  min-height: 0;
  display: flex;
}

.screen[data-orient="portrait"] .booth-body .camera-slot {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
  container-type: size;
}

.screen[data-orient="landscape"] .booth-body .camera-slot {
  /* Prefer a full-height 3:2 preview; shrink if the shutter rail needs the room. */
  flex: 0 1 calc(100cqb * 3 / 2);
  min-width: 0;
  height: 100%;
  align-items: center;
  justify-content: flex-start;
  container-type: size;
}

.camera-well {
  position: relative;
  background: #000;
  overflow: hidden;
  border-radius: 0;
}

/* Largest 2:3 (portrait) or 3:2 (landscape) rectangle that fits the camera slot. */
.screen[data-orient="portrait"] .booth-body .camera-well {
  width: min(100cqi, calc(100cqb * 2 / 3));
  height: auto;
  aspect-ratio: 2 / 3;
  flex: none;
}

.screen[data-orient="landscape"] .booth-body .camera-well {
  width: min(100cqi, calc(100cqb * 3 / 2));
  height: auto;
  aspect-ratio: 3 / 2;
  flex: none;
  max-width: none;
}

.camera-well video,
.camera-well img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  border-radius: 0;
}

.camera-well video {
  transform: scaleX(-1);
  opacity: 0;
  min-width: 0;
  min-height: 0;
}
.camera-well video.is-live { opacity: 1; }

.controls,
.collage-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.screen[data-orient="portrait"] .controls { flex: 0 0 auto; }
.screen[data-orient="landscape"] .controls {
  flex: 1 1 auto;
  min-width: calc(100cqi * 110 / var(--w));
}

.screen[data-orient="portrait"] .collage .camera-slot {
  flex: 1 1 auto;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
}

.screen[data-orient="landscape"] .collage .camera-slot {
  flex: 1 1 auto;
  height: 100%;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.collage .camera-well {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
}

.collage .camera-well img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.screen[data-orient="landscape"] .collage .camera-well img { object-position: left center; }

.screen[data-orient="portrait"] .collage-actions {
  flex: 0 0 auto;
  flex-direction: row;
  gap: calc(100cqi * 32 / var(--w)); /* LayoutConstants.Spacing.medium */
  padding-block: calc(100cqi * 64 / var(--w)); /* Spacing.large; side padding compresses, row is centered */
}

.screen[data-orient="landscape"] .collage-actions {
  flex: 1 1 auto;
  min-width: calc(100cqi * 110 / var(--w));
  flex-direction: column;
  gap: calc(100cqi * 32 / var(--w));
}

/* Shutter: 4pt stroke centered on the 210×95 (portrait) path, plus an independent 193×77 fill.
   Visible outer is path + stroke = 214×99. Landscape transposes to 99×214 and 77×193.
   margin-bottom 20pt is ButtonSection's bottom padding, which lifts the control ~10pt. */
.shutter {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 0 calc(100cqi * 20 / var(--w));
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  min-width: 0;
  min-height: 0;
  touch-action: manipulation;
}

.screen[data-orient="portrait"] .shutter {
  width: calc(100cqi * 214 / var(--w));
  height: calc(100cqi * 99 / var(--w));
}

.screen[data-orient="landscape"] .shutter {
  width: calc(100cqi * 99 / var(--w));
  height: calc(100cqi * 214 / var(--w));
}

.shutter-ring {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: calc(100cqi * 4 / var(--w)) solid #fff; /* StrokeWidths.buttonBorder, centered on the path */
  border-radius: 999px;
  pointer-events: none;
}

.shutter-fill,
.shutter-face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.shutter-fill {
  position: relative;
  background: #fff;
  border-radius: 999px;
  z-index: 1;
}

.screen[data-orient="portrait"] .shutter-fill {
  width: calc(100cqi * 193 / var(--w));
  height: calc(100cqi * 77 / var(--w));
}

.screen[data-orient="landscape"] .shutter-fill {
  width: calc(100cqi * 77 / var(--w));
  height: calc(100cqi * 193 / var(--w));
}

.shutter-face { width: 100%; height: 100%; gap: calc(100cqi * 10 / var(--w)); } /* buttonSpacing = Padding.standard */
.screen[data-orient="portrait"] .shutter-face { flex-direction: row; }
.screen[data-orient="landscape"] .shutter-face { flex-direction: column; }

.shutter-icon { flex: none; }
.screen[data-orient="portrait"] .shutter-icon {
  width: calc(100cqi * 32 / var(--w)); /* IconConstants.standardSize */
  height: calc(100cqi * 32 / var(--w));
}
.screen[data-orient="landscape"] .shutter-icon {
  width: calc(100cqi * 24 / var(--w)); /* IconConstants.smallSize */
  height: calc(100cqi * 24 / var(--w));
}

.shutter-label,
.shutter-progress {
  font-weight: 700; /* FontConstants.buttonFontWeight .bold on .body */
  line-height: 1.05;
  text-align: center;
  color: #000;
  font-size: calc(100cqi * 17 / var(--w));
}

.shutter-progress { white-space: pre-line; }
.screen[data-orient="landscape"] .shutter-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}
.screen[data-orient="portrait"] #shutter-photos-word::before { content: " "; }

.shutter:active .shutter-fill { transform: scale(0.97); }

.gauge {
  position: relative;
  flex: none;
  width: calc(100cqi * 58 / var(--w));
  height: calc(100cqi * 58 / var(--w));
  display: grid;
  place-items: center;
}

.gauge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge circle {
  fill: none;
  stroke-width: 3.7; /* ~6pt on a 58pt gauge; viewBox is 36 */
  stroke-linecap: round;
}

.gauge-track { stroke: #a5a5a5; }
.gauge-value { stroke: #000; transition: stroke-dashoffset 200ms linear; }

.gauge-num {
  position: relative;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-size: calc(100cqi * 26 / var(--w)); /* body 17 × progressIndicatorScale 1.5 */
  line-height: 1;
  color: #000;
}

#restart,
#share,
.save-link {
  flex: none;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  margin: 0;
  touch-action: manipulation;
  line-height: 1.05;
  text-align: center;
}

/* Restart: 2pt stroke centered on a 70×70 rounded rect (corner 12). Visible outer 72×72. */
#restart {
  width: calc(100cqi * 72 / var(--w));
  height: calc(100cqi * 72 / var(--w));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(100cqi * 2 / var(--w));
  padding: calc(100cqi * 4 / var(--w));
  border-radius: calc(100cqi * 13 / var(--w));
  border: calc(100cqi * 2 / var(--w)) solid #fff;
  background: #000;
  color: #fff;
  font-size: calc(100cqi * 11 / var(--w));
  font-weight: 600;
}

#share,
.save-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(100cqi * 8 / var(--w));
  padding: calc(100cqi * 8 / var(--w));
  border: 0;
  border-radius: calc(100cqi * 12 / var(--w)); /* CornerRadius.button */
  background: #fff;
  color: #000;
  text-decoration: none;
  font-size: calc(100cqi * 17 / var(--w));
  font-weight: 700;
}

.screen[data-orient="portrait"] #share,
.screen[data-orient="portrait"] .save-link {
  width: calc(100cqi * 210 / var(--w)); /* 70 × shareToRestartWidthRatio 3 */
  height: calc(100cqi * 70 / var(--w));
  flex-direction: row;
}

.screen[data-orient="landscape"] #share,
.screen[data-orient="landscape"] .save-link {
  width: calc(100cqi * 70 / var(--w));
  height: calc(100cqi * 210 / var(--w));
  flex-direction: column;
}

.collage-icon {
  width: calc(100cqi * 22 / var(--w));
  height: calc(100cqi * 22 / var(--w));
  flex: none;
}

#restart .collage-icon {
  width: calc(100cqi * 20 / var(--w));
  height: calc(100cqi * 20 / var(--w));
}

#restart span,
#share span,
.save-link span {
  max-width: 100%;
}

.gate,
.flash { position: absolute; inset: 0; }

.gate {
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  background: rgb(0 0 0 / 0.72);
}

.gate p { margin: 0; max-width: 28ch; color: var(--text); }

#start-camera,
#try-again {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: #fff;
  color: #000;
  font-weight: 600;
}

.flash {
  z-index: 2;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.flash.on { animation: strobe 160ms ease-out; }

@keyframes strobe {
  from { opacity: 0.9; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .flash.on { animation: soft-fade 200ms linear; }
  .gauge-value { transition: none; }
  .shutter:active .shutter-fill { transform: none; }
}

@keyframes soft-fade {
  from { opacity: 0.28; }
  to { opacity: 0; }
}

.hint,
.text-cta {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.text-cta { color: #fff; }

.chrome {
  position: fixed;
  z-index: 20;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  pointer-events: none;
}

.chrome .selector { pointer-events: auto; }

.footer {
  position: fixed;
  z-index: 20;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  max-width: none;
  pointer-events: auto;
}

.store-badge {
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  line-height: 0;
}

.store-badge img { height: 40px; width: auto; }

.selector { margin-left: auto; }

.selector-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.segment {
  display: inline-flex;
  border: 1px solid #3a3a3c;
  border-radius: 12px;
  overflow: hidden;
}

.segment button {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 8px 12px;
}

.segment button[aria-pressed="true"] { background: #fff; color: #000; }

.selector-toggle {
  display: none;
  border: 1px solid #3a3a3c;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  padding: 8px 12px;
}

@media (max-width: 640px) {
  .chrome { flex-direction: column; align-items: stretch; }
  .selector { margin-left: 0; align-self: flex-end; }
  .selector-toggle { display: inline-flex; }
  .selector-panel { display: none; margin-top: 8px; }
  .selector.is-open .selector-panel { display: flex; }
}

.settings-root {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: transparent;
  color: #fff;
  color-scheme: dark;
}

.settings-dim {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  border: 0;
  padding: 0;
  background: rgb(0 0 0 / 0.4);
}

.settings-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: calc(100% - calc(100cqi * 10 / var(--w)));
  background: #1c1c1d;
  border-radius: calc(100cqi * 14 / var(--w)) calc(100cqi * 14 / var(--w)) 0 0;
  overflow: hidden;
}

.screen[data-frame="ipad"] .settings-root { display: block; }

.screen[data-frame="ipad"] .settings-sheet {
  position: absolute;
  left: 11.14%;
  top: 3.84%;
  width: 77.72%;
  height: 92.33%;
  border-radius: calc(100cqi * 18 / var(--w));
}

.settings-grabber {
  width: calc(100cqi * 36 / var(--w));
  height: calc(100cqi * 5 / var(--w));
  margin: calc(100cqi * 8 / var(--w)) auto 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.35);
  flex: none;
}

.settings-bar {
  display: grid;
  grid-template-columns: calc(100cqi * 36 / var(--w)) 1fr calc(100cqi * 36 / var(--w));
  align-items: center;
  gap: 8px;
  padding: calc(100cqi * 6 / var(--w)) calc(100cqi * 12 / var(--w)) calc(100cqi * 8 / var(--w));
  flex: none;
}

.settings-bar h2 {
  margin: 0;
  text-align: center;
  font-size: calc(100cqi * 17 / var(--w));
  font-weight: 600;
}

.settings-x {
  width: calc(100cqi * 30 / var(--w));
  height: calc(100cqi * 30 / var(--w));
  min-width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  justify-self: end;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #3a3a3c;
  color: #fff;
}

.settings-x svg { width: 55%; height: 55%; }

#settings-body {
  overflow: auto;
  padding-bottom: calc(100cqi * 24 / var(--w));
  -webkit-overflow-scrolling: touch;
}

.upsell-card,
.settings-card {
  margin: 0 calc(100cqi * 16 / var(--w)) calc(100cqi * 18 / var(--w));
  background: #2c2c2d;
  border-radius: calc(100cqi * 16 / var(--w));
  overflow: hidden;
}

.screen[data-frame="ipad"] .upsell-card,
.screen[data-frame="ipad"] .settings-card {
  margin-inline: calc(100cqi * 16 / var(--w));
  border-radius: calc(100cqi * 28 / var(--w)); /* ~56px card radius on the 2388px iPad capture */
}

.upsell-card { padding: calc(100cqi * 14 / var(--w)); }

.upsell-card h3,
.upsell-title { margin: 0; font-size: calc(100cqi * 15 / var(--w)); }

.upsell-title { font-weight: 600; }

.upsell-detail,
.row-desc,
.tier-truth {
  margin: calc(100cqi * 4 / var(--w)) 0 0;
  color: #aeaeb2;
  font-size: calc(100cqi * 13 / var(--w));
  line-height: 1.35;
}

.tier-truth { color: #d2d2d7; }

.upsell-block + .upsell-block { margin-top: calc(100cqi * 14 / var(--w)); }

.upsell-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.upsell-button.pocket,
.upsell-button.pro {
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.upsell-button.pocket { background: var(--pocket-bg); }
.upsell-button.pro { background: var(--pro-bg); }
.upsell-button.pocket *,
.upsell-button.pro * {
  color: #fff;
  -webkit-text-fill-color: #fff;
  stroke: #fff;
}
.upsell-button .icon { width: 18px; height: 18px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: calc(100cqi * 4 / var(--w)) calc(100cqi * 20 / var(--w)) calc(100cqi * 6 / var(--w));
  color: #8e8e93;
  font-size: calc(100cqi * 13 / var(--w));
  font-weight: 600;
}

.section-title .icon { width: 16px; height: 16px; }

.row {
  display: flex;
  align-items: center;
  gap: calc(100cqi * 12 / var(--w));
  width: 100%;
  min-height: calc(100cqi * 52 / var(--w));
  padding: calc(100cqi * 10 / var(--w)) calc(100cqi * 14 / var(--w));
  border: 0;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.settings-card > .row:first-child,
.settings-card > .layout-row:first-child { border-top: 0; }

.row-icon { display: grid; place-items: center; color: #fff; }
.row-icon .icon { width: calc(100cqi * 22 / var(--w)); height: calc(100cqi * 22 / var(--w)); }

.row-copy { flex: 1; min-width: 0; }

.row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: calc(100cqi * 16 / var(--w));
  font-weight: 400;
}

.row-title.single { flex: 1; }

.ipad-badge { font-size: calc(100cqi * 12 / var(--w)); color: #aeaeb2; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.pill.pocket,
.pill.pro {
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.pill.pocket { background: var(--pocket-bg); }
.pill.pro { background: var(--pro-bg); }

.chevron { color: #8e8e93; display: grid; place-items: center; }
.chevron .icon { width: 14px; height: 14px; }

.layout-row { border-top: 1px solid rgb(255 255 255 / 0.08); }

.layout-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: calc(100cqi * 44 / var(--w));
}

.layout-label select {
  min-height: 44px;
  max-width: 46%;
  border: 0;
  background: transparent;
  color: #3f8ef7;
  font-weight: 400;
  text-align: right;
}

.wordmark {
  margin: 8px 0 16px;
  text-align: center;
  font-family: Monoton, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

[hidden] { display: none !important; }

.screen { z-index: 1; }
