:root {
  color-scheme: light;
  --paper: #fffaf4;
  --paper-warm: #f8f1e3;
  --paper-pink: #fff1f5;
  --pink: #f1dce7;
  --pink-strong: #d87098;
  --plum: #460025;
  --plum-soft: #6d214a;
  --ink: #211709;
  --muted: #715463;
  --line: rgba(70, 0, 37, 0.16);
  --white: #ffffff;
  --radius: 10px;
  --radius-large: 14px;
  --max-width: 1240px;
  --font: "Avenir Next", "SF Pro Rounded", ui-rounded, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(70, 0, 37, 0.055) 0.7px, transparent 0.7px);
  background-size: 13px 13px;
  content: "";
  pointer-events: none;
}

::selection {
  background: #f2bdd2;
  color: var(--plum);
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

:focus-visible {
  outline: 3px solid #a62061;
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: 88px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--plum);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding-inline: max(20px, calc((100vw - var(--max-width)) / 2));
  border-block-end: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.94);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  color: var(--plum);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  border-radius: 9px;
  outline: 1px solid rgba(0, 0, 0, 0.1);
}

.site-header nav {
  display: flex;
  gap: 30px;
}

.site-header nav a {
  min-height: 44px;
  padding-block: 11px;
  color: #513543;
  font-size: 0.92rem;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.header-cta,
.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.header-cta {
  justify-self: end;
  padding-inline: 18px;
  background: var(--plum);
  color: white;
  font-size: 0.9rem;
}

.header-cta:hover,
.primary-button:hover {
  background: #650135;
}

.header-cta:active,
.primary-button:active,
.secondary-button:active {
  transform: scale(0.96);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 0.92fr);
  min-height: calc(100vh - 68px);
  max-width: var(--max-width);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
  margin-inline: auto;
  padding: clamp(64px, 8vw, 112px) 24px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  color: var(--plum);
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 20ch;
  margin-block-end: 26px;
  font-size: clamp(3rem, 4.4vw, 4.1rem);
  font-weight: 700;
  letter-spacing: -0.055em;
}

.hero-copy > p {
  max-width: 57ch;
  margin-block-end: 30px;
  color: #563c49;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.store-buttons,
.beta-platform-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.beta-platform-button {
  display: inline-flex;
  min-width: 202px;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border: 1px solid rgba(70, 0, 37, 0.2);
  border-radius: 9px;
  background: white;
  color: var(--plum);
  text-decoration: none;
}

.beta-platform-button:hover {
  border-color: var(--plum);
  background: var(--paper-pink);
}

.beta-platform-button:active {
  transform: scale(0.97);
}

.beta-platform-button svg {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.beta-platform-button span {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.beta-platform-button strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.beta-platform-button small {
  margin-block-start: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.store-button {
  display: inline-flex;
  min-width: 176px;
  min-height: 57px;
  align-items: center;
  gap: 11px;
  padding: 8px 15px;
  border-radius: 9px;
  background: #171116;
  color: white;
  text-decoration: none;
}

.store-button svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.store-button span {
  display: flex;
  flex-direction: column;
  font-size: 1.06rem;
  line-height: 1.15;
}

.store-button small {
  font-size: 0.66rem;
  font-weight: 400;
}

.store-button:hover {
  background: var(--plum);
}

.hero-copy .availability {
  margin-block: 12px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-copy .trial-note {
  max-width: 58ch;
  margin: 10px 0 0;
  color: var(--plum-soft);
  font-size: 0.88rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-copy .trial-note strong {
  color: var(--plum);
  font-weight: 700;
}

.trust-strip {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--paper-pink);
  color: var(--plum-soft);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
}

.trust-strip li span {
  margin-inline: 10px;
  color: var(--pink-strong);
}

.phone-stage {
  position: relative;
  min-height: 650px;
}

.phone-stage::before {
  position: absolute;
  z-index: 0;
  inset: 9% 0 8% 5%;
  border-radius: 50%;
  background: #f7d8e4;
  content: "";
}

.phone {
  position: absolute;
  z-index: 2;
  width: 250px;
  margin: 0;
}

.hero-bea {
  display: block;
  position: absolute;
  inset-block-start: 1%;
  inset-inline-start: 67%;
  z-index: 1;
  width: 210px;
  height: auto;
  aspect-ratio: 780 / 767;
  object-fit: contain;
  filter: drop-shadow(0 7px 8px rgba(70, 0, 37, 0.16));
  transform: translate(-50%, 18px) rotate(5deg);
  transform-origin: center bottom;
}

.phone figcaption {
  position: absolute;
  inset-block-end: -35px;
  width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.phone-ios {
  inset-block-start: 3%;
  inset-inline-start: 2%;
  transform: rotate(-4deg);
}

.phone-android {
  inset-block-end: 2%;
  inset-inline-end: 2%;
  transform: rotate(4deg);
}

.phone-screen {
  position: relative;
  aspect-ratio: 828 / 1792;
  overflow: hidden;
  border: 8px solid #211b1f;
  border-radius: 34px;
  background: white;
  box-shadow: 0 3px 8px rgba(70, 0, 37, 0.16);
  outline: 1px solid rgba(0, 0, 0, 0.1);
}

.phone-screen::after {
  position: absolute;
  inset-block-start: 9px;
  inset-inline-start: 50%;
  width: 28%;
  height: 15px;
  border-radius: 10px;
  background: #211b1f;
  content: "";
  transform: translateX(-50%);
}

.phone-screen img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform-origin: center top;
}

.phone-screen picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.section-heading {
  max-width: 760px;
  margin-block-end: 44px;
}

.section-heading h2,
.beta-copy h2 {
  margin-block-end: 18px;
  font-size: clamp(2.35rem, 4vw, 3.65rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.section-heading p,
.beta-copy > p {
  max-width: 64ch;
  margin-block-end: 0;
  color: var(--muted);
  font-size: 1.08rem;
  text-wrap: pretty;
}

.page-demo {
  content-visibility: auto;
  contain-intrinsic-size: auto 1250px;
  padding: clamp(76px, 10vw, 132px) max(24px, calc((100vw - var(--max-width)) / 2));
  background: var(--pink);
}

.demo-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.demo-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.demo-steps span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #b48a9d;
  border-radius: 50%;
  color: var(--plum);
  font-weight: 600;
}

.demo-steps strong {
  color: var(--plum);
}

.demo-steps p {
  margin: 0;
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: stretch;
  gap: 24px;
}

.page-form,
.reading-response {
  min-width: 0;
  border: 1px solid rgba(70, 0, 37, 0.12);
  border-radius: var(--radius-large);
  background: var(--paper);
}

.page-form {
  padding: clamp(20px, 3vw, 32px);
}

.mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7ede7;
}

.mode-picker legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.mode-picker label {
  cursor: pointer;
}

.mode-picker input {
  position: absolute;
  opacity: 0;
}

.mode-picker input + span {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 600;
}

.mode-picker img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
}

.mode-picker .mode-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.mode-picker .mode-copy small {
  margin-block-start: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.mode-picker input:checked + span {
  background: white;
  color: var(--plum);
  box-shadow: 0 1px 4px rgba(70, 0, 37, 0.1);
}

.mode-picker input:focus-visible + span {
  outline: 3px solid #a62061;
  outline-offset: 2px;
}

.upload-area {
  padding: 22px;
  border: 1.5px dashed #b48a9d;
  border-radius: var(--radius);
  background: #fffdf9;
}

.upload-area.is-dragging {
  border-color: var(--plum-soft);
  background: var(--paper-pink);
}

.upload-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-block-end: 18px;
}

.upload-copy strong {
  color: var(--plum);
  font-size: 1.04rem;
}

.upload-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-privacy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sample-book-button {
  display: flex;
  width: 100%;
  min-height: 74px;
  align-items: center;
  gap: 14px;
  margin-block-start: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7ede7;
  color: var(--plum);
  text-align: start;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.sample-book-button:hover {
  border-color: #a77c90;
  background: var(--paper-pink);
}

.sample-book-button:active {
  transform: scale(0.985);
}

.sample-book-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.sample-book-button img {
  width: 38px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: cover;
}

.sample-book-button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.sample-book-button strong {
  font-size: 0.96rem;
}

.sample-book-button cite {
  font-style: italic;
}

.sample-book-button small,
.sample-book-help {
  color: var(--muted);
  font-size: 0.8rem;
}

.sample-book-help {
  margin: 7px 2px 0;
}

.secondary-button {
  padding-inline: 15px;
  border: 1px solid #a77c90;
  background: white;
  color: var(--plum);
  font-size: 0.9rem;
}

.secondary-button:hover {
  border-color: var(--plum);
  background: var(--paper-pink);
}

.secondary-button svg,
.primary-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.file-input:focus-visible + .secondary-button {
  outline: 3px solid #a62061;
  outline-offset: 3px;
}

.field-error {
  min-height: 0;
  margin-block: 10px 0;
  color: #9d174d;
  font-size: 0.88rem;
}

.field-error:empty {
  display: none;
}

.page-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 84px;
  margin-block: 18px;
}

.empty-preview {
  grid-column: 1 / -1;
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-preview {
  position: relative;
  aspect-ratio: 0.76;
  overflow: hidden;
  border-radius: 8px;
  background: #eee3dc;
  outline: 1px solid rgba(0, 0, 0, 0.1);
}

.page-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-preview button {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: rgba(33, 23, 9, 0.86);
  color: white;
  cursor: pointer;
}

.page-preview button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.epub-preview {
  grid-column: 1 / -1;
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7ede7;
}

.epub-preview > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.epub-preview span,
.epub-preview small {
  color: var(--muted);
  font-size: 0.78rem;
}

.epub-preview strong {
  overflow: hidden;
  margin-block: 2px;
  color: var(--plum);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.epub-preview button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--plum);
  color: white;
  cursor: pointer;
}

.epub-preview button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.primary-button {
  padding-inline: 20px;
  background: var(--plum);
  color: white;
}

.page-form > .primary-button {
  width: 100%;
}

.primary-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.reading-response {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  padding: clamp(28px, 4vw, 48px);
  background: var(--paper-warm);
}

.response-topline {
  display: flex;
  min-height: 94px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.response-topline span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.response-topline h3 {
  margin-block: 6px 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: -0.025em;
}

.response-topline img {
  width: 94px;
  height: 94px;
  object-fit: contain;
}

.response-spark {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--pink-strong);
  stroke-width: 1.5;
}

.response-body {
  flex: 1;
  max-width: 66ch;
  padding-block: 28px;
  color: #33281d;
  font-size: 1.06rem;
  line-height: 1.68;
  white-space: pre-wrap;
}

.response-body p {
  margin-block-end: 0;
}

.bea-dialogue-stage {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(128px, 0.62fr) minmax(250px, 1.38fr);
  align-items: end;
  gap: clamp(8px, 2vw, 24px);
  min-height: 330px;
  padding-block: 18px 28px;
}

.bea-expression-frame {
  display: flex;
  min-height: 260px;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.bea-expression-frame img {
  width: min(360px, 100%);
  height: auto;
  transform-origin: 50% 82%;
}

.bea-expression-frame img.is-changing {
  animation: bea-mood-settle 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bea-dialogue-column {
  align-self: center;
}

.bea-dialogue-bubble {
  position: relative;
  width: 100%;
  min-height: 205px;
  padding: 48px 34px 40px;
  border-radius: 44% 47% 43% 46% / 15% 18% 16% 14%;
  background: #fff9f2;
  box-shadow: 0 4px 0 rgba(65, 35, 54, 0.12);
  color: #5a4650;
  cursor: pointer;
  text-align: start;
}

.bea-dialogue-bubble::before,
.bea-dialogue-bubble::after {
  position: absolute;
  z-index: -1;
  inset: 7px -3px -2px 4px;
  border-radius: 48% 44% 47% 43% / 14% 17% 13% 18%;
  background: #fff9f2;
  content: "";
}

.bea-dialogue-bubble::after {
  inset: -2px 5px 5px -4px;
  border-radius: 43% 48% 44% 49% / 18% 14% 17% 13%;
}

.bea-dialogue-bubble:disabled {
  cursor: default;
}

.bea-speaker-label {
  position: absolute;
  inset-block-start: -11px;
  inset-inline-start: 24px;
  min-width: 98px;
  padding: 9px 20px;
  border-radius: 12px;
  background: #aee895;
  color: #54203f;
  font-size: 1.08rem;
  font-weight: 700;
  text-align: center;
  transform: rotate(-3deg);
}

.bea-dialogue-line {
  display: block;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 650;
  line-height: 1.42;
}

.bea-dialogue-cue {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-start: 50%;
  color: #9b4f83;
  font-size: 1.1rem;
  transform: translateX(-50%);
}

.bea-dialogue-progress {
  display: block;
  min-height: 22px;
  margin-block-start: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.bea-choice-panel {
  display: grid;
  gap: 12px;
  padding-block: 0 22px;
}

.bea-choice-panel[hidden] {
  display: none;
}

.bea-choice-panel > p {
  margin: 0;
  color: var(--plum);
  font-weight: 700;
}

.bea-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bea-choice-button {
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid #a77c90;
  border-radius: 8px;
  background: #fff9f2;
  color: var(--plum);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: start;
}

.bea-choice-button:hover {
  border-color: var(--pink-strong);
  background: white;
}

.bea-choice-button:active {
  transform: translateY(1px);
}

.bea-write-own {
  width: fit-content;
  min-height: 44px;
  padding: 8px 2px;
  background: transparent;
  color: var(--plum);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.bea-reply-form {
  padding-block: 18px 22px;
  border-block-start: 1px solid var(--line);
}

.bea-reply-form > label {
  display: block;
  margin-block-end: 9px;
  color: var(--plum);
  font-size: 0.92rem;
  font-weight: 600;
}

.bea-reply-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.bea-reply-row input {
  min-width: 0;
  min-height: 46px;
  padding-inline: 13px;
  border: 1px solid #a77c90;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
}

.bea-reply-row input:focus-visible {
  outline: 3px solid #a62061;
  outline-offset: 2px;
}

.bea-reply-row .secondary-button {
  min-height: 46px;
}

.bea-reply-form > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.bea-reply-form > .field-error {
  color: #9d174d;
}

.response-points {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding-inline-start: 1.2em;
  white-space: normal;
}

.response-points li::marker {
  color: var(--pink-strong);
}

.response-status {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.86rem;
}

.tools-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 2100px;
  padding: clamp(80px, 10vw, 136px) max(24px, calc((100vw - var(--max-width)) / 2));
}

.tools-heading {
  max-width: 700px;
  margin-block-end: 28px;
}

.tool-filter-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-block-end: 26px;
}

.tool-filter-toggles {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.tool-filter-toggle > strong {
  color: var(--plum);
  font-size: 0.92rem;
}

.tool-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  cursor: pointer;
}

.tool-filter-bar > span {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: end;
}

.tool-filter-toggle input {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  margin: 0;
  appearance: none;
  border: 1px solid #9a7588;
  border-radius: 999px;
  background: #e7d9df;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.tool-filter-toggle input::before {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(70, 0, 37, 0.2);
  content: "";
  transition: transform 150ms ease;
}

.tool-filter-toggle input:checked {
  border-color: var(--plum);
  background: var(--plum);
}

.tool-filter-toggle input:checked::before {
  transform: translateX(20px);
}

.tool-filter-toggle input:focus-visible {
  outline: 3px solid #a62061;
  outline-offset: 3px;
}

.tool-groups {
  display: grid;
  gap: 64px;
}

.tool-group[hidden],
.tool-item[hidden],
.dollhouse-feature[hidden] {
  display: none !important;
}

.tool-group {
  min-width: 0;
}

.tool-group-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1.2fr);
  align-items: end;
  gap: 32px;
  margin-block-end: 10px;
}

.tool-group-heading h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: -0.035em;
}

.tool-group-heading p {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
}

.tool-carousel-controls {
  display: none;
}

.tool-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 190px;
  padding-block: 26px;
}

.tool-art {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-pink);
}

.tool-art img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.widget-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 31%;
}

.mystery-item .tool-art {
  background: var(--plum);
  color: white;
}

.mystery-item .tool-art span {
  font-size: 4.6rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(8deg);
}

.tool-item h4 {
  margin-block-end: 8px;
  color: var(--plum);
  font-size: 1.28rem;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.tool-item p {
  max-width: 43ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-wrap: pretty;
}

.tool-item .tool-access {
  margin-block-end: 7px;
  color: var(--plum-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.tool-catalog-toggle {
  display: block;
  min-height: 44px;
  margin: 36px auto 0;
  padding: 10px 16px;
  border: 1px solid var(--plum);
  border-radius: 8px;
  background: transparent;
  color: var(--plum);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tool-catalog-toggle:hover {
  background: var(--paper-pink);
}

.tool-catalog-toggle:focus-visible {
  outline: 3px solid #a62061;
  outline-offset: 3px;
}

.dollhouse-feature {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(32px, 6vw, 82px);
  margin-block-start: 64px;
  padding: clamp(30px, 5vw, 64px);
  border-radius: var(--radius-large);
  background: var(--plum);
  color: white;
}

.faq-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(44px, 8vw, 112px);
  max-width: var(--max-width);
  margin-inline: auto;
  padding: clamp(80px, 10vw, 132px) 24px;
  content-visibility: auto;
  contain-intrinsic-size: auto 760px;
}

.faq-heading {
  align-self: start;
}

.faq-heading h2 {
  max-width: 10ch;
  margin-block-end: 18px;
  font-size: clamp(2.45rem, 5vw, 4.2rem);
  letter-spacing: -0.05em;
}

.faq-heading p {
  max-width: 36ch;
  margin: 0;
  color: var(--muted);
}

.faq-list {
  border-block-start: 1px solid var(--line);
}

.faq-list details {
  border-block-end: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  min-height: 64px;
  padding: 20px 46px 20px 0;
  color: var(--plum);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 8px;
  width: 18px;
  height: 18px;
  background:
    linear-gradient(var(--plum), var(--plum)) center / 14px 2px no-repeat,
    linear-gradient(var(--plum), var(--plum)) center / 2px 14px no-repeat;
  content: "";
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.faq-list details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-list details p {
  max-width: 64ch;
  margin: 0;
  padding: 0 46px 24px 0;
  color: var(--muted);
}

.dollhouse-art {
  display: grid;
  min-height: 270px;
  place-items: center;
  border-radius: 10px;
  background: #f1dce7;
}

.dollhouse-art img {
  width: min(84%, 330px);
  max-height: 300px;
  object-fit: contain;
}

.feature-eyebrow {
  margin-block-end: 10px;
  color: #efbcd1;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dollhouse-feature h3 {
  margin-block-end: 16px;
  color: white;
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -0.04em;
}

.dollhouse-feature .dollhouse-trial-note {
  margin: 0 0 12px;
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
}

.dollhouse-feature > div:last-child > p:last-child {
  max-width: 54ch;
  margin: 0;
  color: #f3dce7;
  font-size: 1.05rem;
}

.beta-section {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: var(--plum);
  color: white;
  content-visibility: auto;
  contain-intrinsic-size: auto 650px;
}

.sticker-shelf {
  position: absolute;
  inset: 0 50% 0 0;
  isolation: isolate;
  overflow: hidden;
  overscroll-behavior: contain;
  background:
    radial-gradient(rgba(70, 0, 37, 0.09) 1px, transparent 1px),
    #f1dce7;
  background-size: 18px 18px;
}

.sticker {
  position: absolute;
  top: var(--y);
  left: var(--x);
  z-index: 1;
  width: clamp(48px, 6.5vw, 84px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.24));
  touch-action: none;
  transform: translate(-50%, -50%) rotate(var(--rotation)) scale(var(--scale));
  transform-origin: center;
  user-select: none;
}

.sticker:hover {
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.3));
}

.sticker:active,
.sticker.is-dragging {
  cursor: grabbing;
}

.sticker:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 4px;
}

.sticker img {
  width: 100%;
  height: auto;
  pointer-events: none;
}

.beta-copy {
  position: relative;
  z-index: 2;
  width: 50%;
  margin-inline-start: 50%;
  padding: clamp(80px, 9vw, 132px) max(28px, calc((100vw - var(--max-width)) / 2));
  padding-inline-start: clamp(48px, 7vw, 100px);
}

.beta-copy h2 {
  max-width: 11ch;
  color: white;
}

.beta-copy > p {
  max-width: 48ch;
  color: #f3dce7;
}

.beta-platform-buttons-bottom {
  max-width: 560px;
  margin-block-start: 34px;
}

.beta-platform-buttons-bottom .beta-platform-button {
  border-color: rgba(255, 255, 255, 0.32);
  background: white;
}

footer {
  display: flex;
  max-width: var(--max-width);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-inline: auto;
  padding: 30px 24px;
}

footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  white-space: nowrap !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

@media (prefers-reduced-motion: no-preference) {
  .phone-screen img {
    animation: widget-breathe 7s ease-in-out infinite;
  }

  .phone-android .phone-screen img {
    animation-delay: -2.5s;
  }

  .hero-bea {
    animation: bea-peek 6.5s ease-in-out infinite;
  }

  @keyframes widget-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.018) translateY(-0.35%); }
  }


  @keyframes bea-peek {
    0%, 100% { transform: translate(-50%, 18px) rotate(5deg); }
    44%, 62% { transform: translate(-50%, -6px) rotate(1deg); }
  }

  @keyframes bea-mood-settle {
    0% { opacity: 0.82; transform: translateY(5px) rotate(-0.45deg) scale(0.985); }
    100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bea-expression-frame img.is-changing {
    animation: none;
  }
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr 390px;
    gap: 36px;
  }

  .phone-stage {
    min-height: 570px;
  }

  .phone {
    width: 215px;
  }

  .hero-bea {
    width: 180px;
  }

  .demo-layout {
    grid-template-columns: 1fr;
  }

  .reading-response {
    min-height: 430px;
  }

  .tool-list {
    gap-inline: 30px;
  }

  .tool-item {
    grid-template-columns: 105px 1fr;
  }

  .tool-art {
    width: 105px;
    height: 105px;
  }

  .dollhouse-feature {
    grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
  }
}

@media (max-width: 780px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding-inline: 16px;
  }

  .site-header nav {
    display: none;
  }

  .brand span {
    max-width: 140px;
    line-height: 1.1;
  }

  .header-cta {
    padding-inline: 13px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 58px 20px 76px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .phone-stage {
    min-height: 560px;
  }

  .phone {
    width: min(52vw, 230px);
  }

  .phone-ios {
    inset-inline-start: 4%;
  }

  .phone-android {
    inset-inline-end: 4%;
  }

  .hero-bea {
    inset-block-start: -13%;
    inset-inline-start: 68%;
    width: min(56vw, 230px);
  }

  .page-demo,
  .tools-section {
    padding-inline: 20px;
  }

  .page-demo {
    padding-block: 76px;
  }

  .section-heading h2,
  .beta-copy h2 {
    font-size: clamp(2.35rem, 10vw, 3.25rem);
  }

  .demo-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tool-list {
    display: flex;
    width: calc(100% + 40px);
    min-width: 0;
    gap: 14px;
    margin-inline: -20px;
    padding: 0 40px 14px 20px;
    overflow-x: scroll;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 20px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .tool-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-block: -8px 12px;
  }

  .tool-carousel-status {
    min-width: 54px;
    margin-inline-end: 2px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: end;
  }

  .tool-carousel-controls button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--plum);
    cursor: pointer;
  }

  .tool-carousel-controls button:active {
    transform: scale(0.96);
  }

  .tool-carousel-controls button:disabled {
    opacity: 0.38;
    cursor: default;
  }

  .tool-carousel-controls button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .tool-carousel-controls [data-tool-previous] svg {
    transform: rotate(180deg);
  }

  .tool-groups {
    gap: 54px;
  }

  .tool-group-heading {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-block-end: 20px;
  }

  .tool-item,
  .tool-item:nth-last-child(-n + 2) {
    flex: 0 0 min(80vw, 330px);
    min-height: 210px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.54);
    scroll-snap-align: start;
  }

  .dollhouse-feature {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-block-start: 48px;
  }

  .dollhouse-art {
    min-height: 240px;
  }

  .faq-section {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 76px 20px;
  }

  .faq-heading h2 {
    max-width: 12ch;
  }

  .sticker-shelf {
    position: relative;
    inset: auto;
    width: 100%;
    height: 430px;
  }

  .beta-copy {
    width: 100%;
    margin: 0;
    padding: 64px 20px 76px;
  }

  .beta-copy h2 {
    max-width: 10ch;
  }
}

@media (max-width: 520px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .header-cta {
    display: none;
  }

  h1 {
    font-size: clamp(2.65rem, 12vw, 3.4rem);
  }

  .hero-copy > p {
    font-size: 1.02rem;
  }

  .store-buttons,
  .beta-platform-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .store-button,
  .beta-platform-button {
    justify-content: center;
  }

  .beta-platform-button {
    width: 100%;
  }

  .phone-stage {
    min-height: 480px;
  }

  .hero-bea {
    inset-block-start: -12%;
    inset-inline-start: 68%;
    width: min(58vw, 224px);
  }

  .phone {
    width: min(55vw, 205px);
  }

  .phone-screen {
    border-width: 6px;
    border-radius: 27px;
  }

  .phone-screen img,
  .hero-bea {
    animation: none !important;
  }

  .mode-picker {
    grid-template-columns: 1fr;
  }

  .tool-filter-toggle {
    gap: 10px;
  }

  .tool-filter-bar {
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
  }

  .tool-filter-toggles {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .page-form,
  .reading-response {
    border-radius: 10px;
  }

  .upload-actions {
    flex-direction: column;
  }

  .secondary-button {
    width: 100%;
  }

  .page-previews {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reading-response {
    padding: 24px 20px;
    background: var(--paper-warm);
  }

  .bea-dialogue-stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .bea-expression-frame {
    min-height: 180px;
  }

  .bea-expression-frame img {
    width: min(240px, 74vw);
  }

  .bea-dialogue-bubble {
    min-height: 190px;
    padding: 46px 28px 38px;
    border-radius: 42% 46% 43% 47% / 10% 12% 11% 9%;
  }

  .bea-choice-list {
    grid-template-columns: 1fr;
  }

  .bea-reply-row {
    grid-template-columns: 1fr;
  }

  .bea-reply-row .secondary-button {
    width: 100%;
  }

  .tool-item {
    grid-template-columns: 84px 1fr;
    gap: 18px;
  }

  .tool-art {
    width: 84px;
    height: 84px;
  }

  .dollhouse-feature {
    margin-inline: -4px;
    padding: 24px 20px 30px;
  }

  .dollhouse-art {
    min-height: 210px;
  }

  .sticker-shelf {
    height: 360px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }

  .mode-picker input:checked + span,
  .primary-button,
  .secondary-button,
  .header-cta {
    border: 1px solid ButtonText;
  }

  .tool-filter-toggle input {
    forced-color-adjust: none;
    border-color: ButtonText;
    background: Canvas;
  }

  .tool-filter-toggle input:checked {
    background: Highlight;
  }
}
