:root {
  --bg: #000000;
  --title: #fcfcfc;
  --white: #ffffff;
  --text-footnote: 0.9375rem; /* 15 — iOS Subhead */
  --text-body: 1.0625rem; /* 17 — iOS Body */
  --text-title: 1.25rem; /* 20 — iOS Title 3 */
  --text-title-tablet: 1.5rem; /* 24 */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --leading: 1.3;
  --duration-snappy: 220ms;
  --ease-snappy: cubic-bezier(0.175, 0.885, 0.32, 1.1);
  --duration-smooth: 300ms;
  --ease-smooth: cubic-bezier(0.19, 1, 0.22, 1);
  --duration-swift: 800ms;
  --ease-swift: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--white);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  font-optical-sizing: auto;
  line-height: var(--leading);
  letter-spacing: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100svh;
  background: var(--bg);
  overflow-x: hidden;
  padding:
    calc(20px + env(safe-area-inset-top))
    32px
    calc(24px + env(safe-area-inset-bottom));
}

.powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 20px;
  margin: 0 auto;
  flex: 0 0 auto;
}

.powered-by,
.powered-grok {
  font-size: var(--text-footnote);
  font-weight: var(--weight-medium);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.powered-by {
  color: rgba(255, 255, 255, 0.3);
}

.powered-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
}

.grok-logo {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.powered-grok {
  color: rgba(255, 255, 255, 0.6);
}

.content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 338px;
  margin: 0 auto;
  gap: 40px;
  padding-top: 28px;
}

/* The desktop fallback is opt-in: hidden unless the device is a desktop. */
.content-desktop {
  display: none;
}

.ob {
  width: 100%;
  max-width: 338px;
  height: 294px;
  overflow: hidden;
  flex: 0 0 auto;
}

.ob-img {
  width: 100%;
  height: 294px;
  object-fit: cover;
  object-position: top center;
}

.ob-ipad {
  display: none;
}

.copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

h1 {
  margin: 0;
  width: 100%;
  align-self: stretch;
  padding: 0;
  color: var(--title);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: var(--text-title);
  font-weight: var(--weight-semibold);
  font-optical-sizing: auto;
  line-height: var(--leading);
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  mix-blend-mode: plus-lighter;
}

.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  min-height: 1.5em;
  white-space: nowrap;
}

.muted {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  opacity: 0.5;
  font-size: 1em;
  font-weight: var(--weight-regular);
  letter-spacing: normal;
  line-height: var(--leading);
}

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

.plus-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.add-text {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  font-size: 1em;
  font-weight: var(--weight-medium);
  letter-spacing: normal;
  line-height: var(--leading);
}

.glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}

.glass--icon {
  background: transparent;
  box-shadow:
    inset 0 2px 1px -1px rgba(255, 255, 255, 0.25),
    inset 0 -2px 1px -1px rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.glass--icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loc-ipad {
  display: none;
}

.step-ios27,
.step-ios-legacy {
  display: none;
}

html.device-phone.ios-27-plus .step-ios27,
html.device-phone.ios-below-27 .step-ios-legacy,
html.device-phone:not(.ios-27-plus):not(.ios-below-27) .step-ios-legacy,
html.device-tablet .step-ios-legacy {
  display: flex;
}

/* Desktop (also the no-JS default): swap the tutorial for a visible fallback
   that links back to the app instead of hiding everything. */
html.device-desktop .content {
  display: none;
}

html.device-desktop .content-desktop {
  display: flex;
  max-width: 420px;
}

.desktop-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  text-wrap: balance;
}

.desktop-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 2px 1px -1px rgba(255, 255, 255, 0.25),
    inset 0 -2px 1px -1px rgba(255, 255, 255, 0.25);
  color: var(--white);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.desktop-open:hover {
  background: rgba(255, 255, 255, 0.16);
}

html.device-tablet .page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(24px + env(safe-area-inset-top))
    24px
    calc(24px + env(safe-area-inset-bottom));
}

html.device-tablet .powered {
  display: none;
}

html.device-tablet .content {
  max-width: 634px;
  margin: 0;
  gap: 40px;
}

html.device-tablet .ob {
  max-width: 634px;
}

html.device-tablet .ob-phone {
  display: none;
}

html.device-tablet .ob-ipad {
  display: block;
}

html.device-tablet h1 {
  font-size: var(--text-title-tablet);
  letter-spacing: -0.015em;
}

html.device-tablet .step {
  gap: 10px;
}

html.device-tablet .glass {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

html.device-tablet .plus-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

html.device-tablet .loc-phone {
  display: none;
}

html.device-tablet .loc-ipad {
  display: inline;
}

@media (max-height: 700px) {
  html.device-phone .content {
    justify-content: center;
  }
}
