:root {
  --gamma-primary: #6237c8;
  --gamma-ink: #272525;
  --gamma-bg: #fdfaf7;
  --gamma-grad: linear-gradient(90deg, #591ce6 5%, #f9598d 45%, #fb8b61 85%);
  --gamma-chrome: linear-gradient(135deg, #272525 0%, #3d2a6b 100%);
  --stage-w: 960px;
  --stage-display-ratio: 0.6;
  --chrome-h: 44px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--gamma-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--gamma-ink);
}

#wrap {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 0;
}

.gamma-stage {
  width: calc(100vw * var(--stage-display-ratio));
  max-width: calc(var(--stage-w) * var(--stage-display-ratio));
  margin: 0 auto;
  flex-shrink: 0;
}

html.embed,
html.embed body {
  height: auto;
  min-height: 0;
  overflow: visible;
  background: var(--gamma-bg);
}

html.embed.embed-hub,
html.embed.embed-hub body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

html.embed.embed-section #wrap {
  padding: 4px 8px 10px;
}

html.embed .gamma-browser {
  overflow: visible;
}

html.embed .gamma-browser__viewport {
  overflow: visible;
}

html.embed .gamma-callout {
  max-width: min(320px, 90%);
  padding: 13px 15px;
}

html.embed .gamma-callout__title {
  font-size: 14px;
}

html.embed .gamma-callout__body {
  font-size: 12px;
  line-height: 1.45;
}

html.embed #wrap {
  min-height: 0;
  height: auto;
  width: 100%;
  padding: 6px 10px 8px;
  align-items: flex-start;
  justify-content: center;
}

html.embed .gamma-hub {
  width: 100%;
  max-width: calc(var(--stage-w) * var(--stage-display-ratio));
}

html.embed .gamma-stage {
  width: 100%;
  max-width: none;
  transform: none;
}

html.embed #lang-switch,
html.embed .gamma-hub__lang,
html.embed .gamma-browser__lang {
  display: none;
}

/* ── Browser shell (Folio-style + Gamma) ── */
.gamma-browser {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(98, 55, 200, 0.12),
    0 12px 48px rgba(39, 37, 37, 0.14);
  background: #fff;
}

.gamma-browser__chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--chrome-h);
  padding: 0 14px;
  background: var(--gamma-chrome);
  position: relative;
}

.gamma-browser__chrome::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--gamma-grad);
}

.gamma-browser__dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.gamma-browser__dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.gamma-browser__dots span:nth-child(1) {
  background: #ff5f57;
  opacity: 0.85;
}
.gamma-browser__dots span:nth-child(2) {
  background: #febc2e;
  opacity: 0.85;
}
.gamma-browser__dots span:nth-child(3) {
  background: #28c840;
  opacity: 0.85;
}

.gamma-browser__title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.gamma-browser__lang {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.gamma-browser__lang a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.gamma-browser__lang a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.gamma-browser__lang a.is-active {
  color: #fff;
  background: rgba(98, 55, 200, 0.55);
}

.gamma-browser__lang-sep {
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
}

.gamma-browser__viewport {
  position: relative;
  background: #fff;
  line-height: 0;
}

.gamma-browser__viewport img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.gamma-callout--no-arrow .gamma-callout__arrow {
  display: none;
}

/* Red target pin removed — callout arrow only (see .gamma-callout__arrow). */
.gamma-target-pin {
  display: none !important;
}

.gamma-target-halo {
  display: none !important;
}

/* ── Callout bubble ── */
.gamma-callout {
  position: absolute;
  z-index: 3;
  max-width: min(340px, 88%);
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--gamma-primary);
  color: #fff;
  box-shadow: 0 12px 40px rgba(98, 55, 200, 0.35);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition:
    opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s;
  pointer-events: none;
}

.gamma-callout.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gamma-callout.is-visible .gamma-callout__arrow {
  animation: gamma-callout-arrow-breathe 1.5s ease-in-out infinite;
}

@keyframes gamma-callout-arrow-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

.gamma-callout--placement-top.is-visible .gamma-callout__arrow {
  animation: gamma-callout-arrow-nudge-down 1.5s ease-in-out infinite;
}

.gamma-callout--placement-bottom.is-visible .gamma-callout__arrow {
  animation: gamma-callout-arrow-nudge-up 1.5s ease-in-out infinite;
}

.gamma-callout--placement-left.is-visible .gamma-callout__arrow {
  animation: gamma-callout-arrow-nudge-right 1.5s ease-in-out infinite;
}

.gamma-callout--placement-right.is-visible .gamma-callout__arrow {
  animation: gamma-callout-arrow-nudge-left 1.5s ease-in-out infinite;
}

@keyframes gamma-callout-arrow-nudge-down {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(5px);
  }
}

@keyframes gamma-callout-arrow-nudge-up {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes gamma-callout-arrow-nudge-right {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(5px);
  }
}

@keyframes gamma-callout-arrow-nudge-left {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(-5px);
  }
}

.gamma-callout--wide {
  max-width: min(420px, 52%);
  padding: 12px 16px;
}

.gamma-callout--wide.gamma-callout--glass {
  max-width: min(380px, 46%);
}

.gamma-callout--glass {
  background: rgba(98, 55, 200, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(98, 55, 200, 0.2);
}

.gamma-callout--glass .gamma-callout__title,
.gamma-callout--glass .gamma-callout__body {
  text-shadow: 0 1px 2px rgba(39, 37, 37, 0.18);
}

.gamma-callout--glass.gamma-callout--placement-top .gamma-callout__arrow {
  border-top-color: rgba(98, 55, 200, 0.78);
}

.gamma-callout--glass.gamma-callout--placement-bottom .gamma-callout__arrow {
  border-bottom-color: rgba(98, 55, 200, 0.78);
}

.gamma-callout--glass.gamma-callout--placement-left .gamma-callout__arrow {
  border-left-color: rgba(98, 55, 200, 0.78);
}

.gamma-callout--glass.gamma-callout--placement-right .gamma-callout__arrow {
  border-right-color: rgba(98, 55, 200, 0.78);
}

html.embed .gamma-callout--wide {
  max-width: min(360px, 44%);
}

.gamma-callout--wide .gamma-callout__body {
  line-height: 1.45;
}

.gamma-callout__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.gamma-callout__body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.95;
  white-space: pre-line;
}

.gamma-callout__warning {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.92;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.gamma-callout__arrow {
  position: absolute;
  width: 0;
  height: 0;
  border: 9px solid transparent;
}

.gamma-callout--placement-top .gamma-callout__arrow {
  bottom: -17px;
  left: var(--arrow-x, 50%);
  transform: translateX(-50%);
  border-top-color: var(--gamma-primary);
  border-bottom: none;
}

.gamma-callout--placement-bottom .gamma-callout__arrow {
  top: -17px;
  left: var(--arrow-x, 50%);
  transform: translateX(-50%);
  border-bottom-color: var(--gamma-primary);
  border-top: none;
}

.gamma-callout--placement-left .gamma-callout__arrow {
  right: -17px;
  top: var(--arrow-y, 50%);
  transform: translateY(-50%);
  border-left-color: var(--gamma-primary);
  border-right: none;
}

.gamma-callout--placement-right .gamma-callout__arrow {
  left: -17px;
  top: var(--arrow-y, 50%);
  transform: translateY(-50%);
  border-right-color: var(--gamma-primary);
  border-left: none;
}

/* ── Step navigation (discreet arrows) ── */
.gamma-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 0;
}

.gamma-nav__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.gamma-nav__chapter {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(98, 55, 200, 0.65);
  user-select: none;
}

.gamma-nav__bridge {
  margin: 0;
  max-width: 28em;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 500;
  text-align: center;
  color: rgba(39, 37, 37, 0.55);
}

/* ── Chapter note (below slider) ── */
.gamma-founder-bridge {
  display: none;
  width: 100%;
  margin-top: 8px;
  padding: 0 4px;
}

.gamma-founder-bridge.is-visible {
  display: block;
}

.gamma-founder-bridge__card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(98, 55, 200, 0.18);
  background: #fff;
  box-shadow: 0 2px 12px rgba(98, 55, 200, 0.06);
  text-align: left;
}

.gamma-founder-bridge__card > div {
  min-width: 0;
  flex: 1;
}

.gamma-founder-bridge__avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(98, 55, 200, 0.15);
}

.gamma-founder-bridge__avatar[hidden] {
  display: none;
}

.gamma-founder-bridge__quote {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(39, 37, 37, 0.82);
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.gamma-founder-bridge__attr {
  margin: 8px 0 0;
  font-size: 10px;
  font-weight: 600;
  color: rgba(98, 55, 200, 0.85);
}

.gamma-nav__step {
  font-size: 11px;
  font-weight: 500;
  color: rgba(98, 55, 200, 0.5);
  min-width: 5.5em;
  text-align: center;
  user-select: none;
}

.gamma-nav__arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  color: rgba(98, 55, 200, 0.45);
  background: transparent;
  transition: color 0.15s, background 0.15s;
}

.gamma-nav__arrow:hover:not(:disabled) {
  color: var(--gamma-primary);
  background: rgba(98, 55, 200, 0.07);
}

.gamma-nav__arrow:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* ── Trial hub (accordion chapters) ── */
.gamma-hub {
  width: calc(100vw * var(--stage-display-ratio));
  max-width: calc(var(--stage-w) * var(--stage-display-ratio));
  margin: 0 auto;
}

.gamma-hub__lang {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
}

.gamma-hub__lang a {
  color: rgba(98, 55, 200, 0.55);
  text-decoration: none;
}

.gamma-hub__lang a:hover,
.gamma-hub__lang a.is-active {
  color: var(--gamma-primary);
}

.gamma-hub__lang-sep {
  color: rgba(98, 55, 200, 0.25);
}

.gamma-accordion {
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid rgba(98, 55, 200, 0.14);
  background: #fff;
  box-shadow: 0 2px 10px rgba(98, 55, 200, 0.05);
  overflow: hidden;
}

.gamma-accordion[hidden] {
  display: none;
}

.gamma-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.gamma-accordion__trigger:hover {
  background: rgba(98, 55, 200, 0.04);
}

.gamma-accordion--solo .gamma-accordion__trigger {
  cursor: default;
}

.gamma-accordion--solo .gamma-accordion__trigger:hover {
  background: transparent;
}

.gamma-accordion__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(98, 55, 200, 0.75);
  user-select: none;
}

.gamma-accordion__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  opacity: 0.45;
}

.gamma-accordion__chevron::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--gamma-primary);
  border-bottom: 2px solid var(--gamma-primary);
  transform: translate(-60%, -65%) rotate(-45deg);
  transition: transform 0.2s ease;
}

.gamma-accordion.is-open > .gamma-accordion__trigger .gamma-accordion__chevron::before {
  transform: translate(-50%, -35%) rotate(45deg);
}

.gamma-accordion--solo .gamma-accordion__chevron {
  display: none;
}

.gamma-accordion__panel {
  display: none;
  padding: 0 10px 12px;
}

.gamma-accordion.is-open > .gamma-accordion__panel {
  display: block;
}

.gamma-accordion__soon {
  margin: 0;
  padding: 4px 4px 8px;
  font-size: 11px;
  text-align: center;
  color: rgba(39, 37, 37, 0.45);
}

.gamma-accordion .gamma-stage {
  width: 100%;
  max-width: none;
}

.gamma-accordion .gamma-founder-bridge {
  display: block;
  margin-top: 10px;
  padding: 0;
}

.gamma-accordion--nested {
  margin-bottom: 6px;
  border-radius: 10px;
  border: 1px solid rgba(98, 55, 200, 0.1);
  box-shadow: none;
}

.gamma-accordion--nested .gamma-accordion__trigger {
  padding: 10px 12px;
}

.gamma-accordion--nested .gamma-accordion__title {
  font-size: 10px;
  letter-spacing: 0.05em;
}

.gamma-accordion__panel--nested {
  padding: 0 4px 8px;
}

.gamma-accordion--soon-only .gamma-accordion__panel {
  padding-top: 0;
}

.gamma-chapter-example {
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(98, 55, 200, 0.12);
  background: rgba(98, 55, 200, 0.03);
  overflow: hidden;
}

.gamma-chapter-example[hidden] {
  display: none;
}

.gamma-chapter-example__head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 6px 0;
}

.gamma-chapter-example__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  color: rgba(98, 55, 200, 0.7);
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.gamma-chapter-example__copy:hover {
  color: var(--gamma-primary);
  background: rgba(98, 55, 200, 0.08);
}

.gamma-chapter-example__copy.is-copied {
  color: #059669;
}

.gamma-chapter-example__copy svg {
  width: 14px;
  height: 14px;
}

.gamma-chapter-example__scroll {
  overflow-x: auto;
  max-width: 100%;
}

.gamma-chapter-example__pre {
  margin: 0;
  padding: 6px 10px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  line-height: 1.45;
  color: rgba(39, 37, 37, 0.82);
  white-space: pre;
  width: max-content;
  min-width: 100%;
}
