/* Shared mobile layouts, loaded after the product hardware and document styles. */
[data-plany-color="blue"] { --swatch: #19b9f5; }
[data-plany-color="purple"] { --swatch: #a881f4; }
[data-plany-color="pink"] { --swatch: #f38bb8; }
[data-plany-color="green"] { --swatch: #68d3a7; }
[data-plany-color="orange"] { --swatch: #ffb271; }
.menu-backdrop { position: fixed; inset: 0; z-index: 90; width: 100%; height: 100%; background: #0008; border: 0; }
.film-presentation { flex-direction: column; gap: 16px; align-items: center; }
.film-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; }
.film-controls button {
  position: static; margin: 0; min-height: 44px; padding: 12px 17px;
  border: 1px solid #484848; border-radius: 24px; background: #292929;
  color: #eee; font: inherit; font-size: 13px; max-width: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center;
}
.film-status { font-size: 13px; margin-top: 10px; }
.film-status:empty { display: none; }
/* Preview visibility follows its state, including a second tap or Enter. */
body.product-home .task-demo:focus-visible:not(.is-complete) .task-after { opacity: 0; }

/* The five-phone hero dissolves into the page, retaining its staggered tops. */
.product-home .hero-phones.phone-lineup {
  height: auto; min-height: 0; aspect-ratio: 2.25 / 1;
  overflow: clip; padding: clamp(12px, 2.2vw, 24px) 2% 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, rgb(0 0 0 / .92) 83%, rgb(0 0 0 / .55) 90%, rgb(0 0 0 / .16) 96%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, rgb(0 0 0 / .92) 83%, rgb(0 0 0 / .55) 90%, rgb(0 0 0 / .16) 96%, transparent 100%);
}

@media (max-width: 800px) {
  html { scroll-padding-top: 88px; }
  .site-header { padding-top: env(safe-area-inset-top, 0px); }
  .site-nav.open { max-height: calc(100dvh - 88px); overscroll-behavior: contain; }
  .site-nav a, .site-footer nav a { min-height: 44px; display: flex; align-items: center; }
  .site-footer nav { gap: 4px; }
  .hero { padding-inline: 16px; }
  .hero-actions { flex-wrap: wrap; }
  .hero-actions > a { min-height: 48px; }
  /* Keep all five tops visible above the same soft fade on mobile. */
  .product-home .hero-phones.phone-lineup {
    padding: 18px 8px 0;
  }
  .product-home .phone-lineup .lineup-phone { flex-basis: 25%; width: 25%; margin-inline: -3.4%; }
  .product-home .phone-lineup .lineup-phone:nth-child(1),
  .product-home .phone-lineup .lineup-phone:nth-child(5) { display: block; margin-top: clamp(24px, 5vw, 42px); }
  .product-home .phone-lineup .lineup-phone:nth-child(2),
  .product-home .phone-lineup .lineup-phone:nth-child(4) { margin-top: clamp(12px, 2.5vw, 21px); }
  .product-home .phone-lineup .lineup-phone:nth-child(3) { margin-top: 0; }
  .product-home .today-film { padding: 28px 20px; }
  .film-presentation { min-width: 0; }
  .product-home .film-presentation .iphone-film { width: min(100%, 250px); }
  .product-home .features-section { margin-top: 64px; }
  .section-heading { margin-bottom: 28px; }
  .product-home .editorial-rail { gap: 16px; scroll-padding-inline: 1px; touch-action: pan-x pan-y; }
  .editorial-rail .feature-card { flex-basis: 88%; min-width: 0; }
  .editorial-rail .feature-visual { height: 460px; }
  body.product-home .editorial-rail .feature-visual .device {
    width: min(78%, 200px); max-width: 100%; margin: 24px auto 0; transform: none;
  }
  .rail-controls { flex-wrap: wrap; gap: 12px; }
  .rail-controls button { width: 48px; height: 48px; }
  .product-home .planning-partner, .product-home .task-story, .product-home .mood-story {
    margin-top: 64px; gap: 24px;
  }
  .planning-partner > *, .task-story > *, .mood-story > * { min-width: 0; }
  .product-home .plany-preview { padding: 24px 18px 18px; }
  body.product-home .plany-preview-phone { width: min(100%, 260px); max-width: 100%; }
  .product-home .task-demo { height: auto; padding: 24px 18px 18px; }
  body.product-home .task-demo-phone { width: min(100%, 260px); max-width: 100%; margin: 0 auto; }
  .task-demo-hint { position: relative; display: block; padding: 0; margin-top: 18px; }
  .plany-preview-hint, .task-demo-hint, .mood-hint { font-size: 13px; line-height: 1.5; }
  .product-home .mood-demo { min-height: 0; padding: 28px 24px; }
  .mood-character { margin-block: 28px 20px; }
  .plany-guide { padding-inline: 16px; }
  .character-studio { padding: 24px 16px; }
  .studio-controls, .studio-bottom { gap: 20px; }
  .shape-options, .color-options { flex-wrap: wrap; justify-content: center; }
  .shape-options button, .scenario-tabs button, .personality-controls button { min-height: 44px; font-size: 13px; }
  .shape-options button { padding: 10px 14px; }
  .color-options { gap: 10px; }
  .color-options button { width: 44px; height: 44px; border-width: 8px; }
  .scenario-demo { padding: 22px 18px; }
  .scenario-request { flex-direction: column; align-items: flex-start; }
  .scenario-request > div, .scenario-result { min-width: 0; }
  .character-cards article:not(:first-child) { grid-template-columns: 1fr; }
  .character-cards article:not(:first-child) .character-art { grid-row: auto; }
  .character-cards article:not(:first-child) p { font-size: 15px; }
  .parade-faces { gap: 12px; }
  .parade-plany { width: clamp(48px, 17vw, 100px); height: clamp(48px, 17vw, 100px); }
  .document-hero h1 { font-size: clamp(34px, 10vw, 46px); overflow-wrap: anywhere; }
  .document-content { padding-inline: 0; overflow-wrap: anywhere; }
  .site-footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  html:not(.js) .site-header { height: auto; flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .menu-button { display: none; }
  html:not(.js) .site-nav { display: flex; position: static; flex-wrap: wrap; width: 100%; }
}

@media (max-width: 360px) {
  .color-options { gap: 8px; }
  .shape-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions > a { font-size: 14px; }
  .hero-description { font-size: 17px; }
  .product-home .today-film { padding: 24px 18px; }
  .today-film-copy h2 { font-size: 34px; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
}

/* Shared download treatment works before JavaScript and in every page header. */
.app-store-download { align-items: center; justify-content: center; gap: 9px; white-space: nowrap; }
.app-store-download .apple-download-icon { display: block; flex: none; width: 18px; height: 20px; }
.site-header .app-store-download { gap: 7px; }
.site-header .apple-download-icon { width: 15px; height: 18px; }
.app-store-download:focus-visible, .menu-button:focus-visible { outline: 2px solid #74c6ff; outline-offset: 4px; }

/* One mobile scale, loaded after page-specific artwork and layout rules. */
@media (max-width: 800px) {
  :root {
    --mobile-gutter: 20px;
    --mobile-section-gap: 64px;
    --mobile-title: clamp(38px, 10vw, 48px);
    --mobile-heading: clamp(30px, 8.2vw, 38px);
    --mobile-card-radius: 24px;
  }
  html { scroll-padding-top: 88px; }
  .site-header {
    width: calc(100% - 24px); height: 60px; min-height: 60px;
    top: max(10px, env(safe-area-inset-top)); margin-top: 10px;
    padding: 6px 8px 6px 14px; gap: 8px; border-radius: 32px;
  }
  .site-header .brand { order: 0; margin-right: auto; font-size: 20px; gap: 7px; white-space: nowrap; }
  .site-header .brand img { width: 28px; height: 28px; flex: none; }
  .site-header .header-cta {
    display: inline-flex; order: 1; flex: none; min-height: 44px;
    padding: 10px 14px; font-size: 13px; line-height: 20px;
  }
  .site-header .menu-button { order: 2; flex: none; width: 44px; height: 44px; margin: 0; }
  .site-header .site-nav { order: 3; top: 68px; }
  .site-header .site-nav.open { gap: 4px; overflow-y: auto; max-height: calc(100dvh - 100px); }
  .site-header .site-nav a { min-height: 48px; padding: 12px 16px; font-size: 16px; }
  .button-primary, .button-secondary { min-height: 48px; padding: 13px 20px; font-size: 14px; line-height: 22px; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 400px); margin-inline: auto; }
  .hero-actions > a { padding-inline: 12px; }
  .hero { padding-inline: var(--mobile-gutter); padding-top: 48px; }
  .product-home .meet-plany-title { font-size: var(--mobile-title); }
  .hero-description { font-size: 17px; line-height: 1.6; margin-block: 24px 28px; }
  .hero-device-icons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; width: 100%; max-width: 360px; }
  .hero-device-icons a { min-width: 0; min-height: 64px; font-size: 10px; gap: 8px; text-align: center; }
  .hero-device-icons svg { width: 26px; height: 26px; }
  .product-home > main > :is(.features-section, .plany-overview, .planning-partner, .task-story, .mood-story, .day-help, .launch-section, .faq-section) {
    width: auto; margin-inline: var(--mobile-gutter);
  }
  .product-home > main > :is(.features-section, .plany-overview, .planning-partner, .task-story, .mood-story, .day-help, .faq-section) {
    margin-top: var(--mobile-section-gap); margin-bottom: 0;
  }
  .product-home > main > .launch-section { margin-top: var(--mobile-section-gap); margin-bottom: 0; }
  .product-home :is(.section-heading h2, .partner-copy h2, .task-story-copy h2, .mood-copy h2, .faq-heading h2, .launch-section h2, .day-help h2, .plany-overview-copy h2),
  .plany-simple :is(.plany-connections h2, .plany-customize-showcase h2, .plany-onboarding-capabilities > h2, .today-film h2),
  .development-page :is(.upcoming-heading h2, .plany-device-section h2) {
    font-size: var(--mobile-heading); line-height: 1.12; letter-spacing: -.04em;
  }
  .product-home :is(.partner-copy > p, .task-story-copy > p, .mood-copy > p, .launch-section > div:first-child > p, .plany-overview-copy > p) {
    font-size: 16px; line-height: 1.65;
  }
  .product-home :is(.plany-preview, .task-demo, .mood-demo, .plany-preview-bubble, .launch-section) { border-radius: var(--mobile-card-radius); }
  .product-home .feature-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
  .product-home .editorial-rail .card-copy { padding: 24px 20px 0; }
  .product-home .editorial-rail .card-copy h3 { font-size: 24px; line-height: 1.2; }
  .product-home .editorial-rail .card-copy p { font-size: 15px; line-height: 1.6; }
  .product-home .faq-list summary { min-height: 56px; padding-block: 18px; font-size: 16px; line-height: 1.45; }
  .product-home .faq-list p { font-size: 15px; line-height: 1.7; }
  .download-actions { width: 100%; }
  .download-actions .button-primary { width: 100%; max-width: 320px; }
  .download-actions .availability-note { font-size: 13px; line-height: 1.7; }
  .plany-simple .plany-guide { width: calc(100% - 2 * var(--mobile-gutter)); padding-inline: 0; }
  .plany-simple .plany-page-intro { padding-top: 48px; }
  .plany-simple .plany-page-intro h1, .development-page .plany-page-intro h1, .development-intro h1 { font-size: var(--mobile-title); line-height: 1.08; }
  .development-main, .plany-detail-main { width: calc(100% - 2 * var(--mobile-gutter)); }
  .development-intro, .development-page .plany-page-intro { padding-top: 48px; }
  .development-details { padding-inline: 0; }
  .plany-simple .plany-capability-list { gap: 16px; }
  .plany-simple .plany-capability-list li { padding: 24px; border-radius: var(--mobile-card-radius); }
  .document-main { padding: 48px var(--mobile-gutter) 64px; }
  .document-hero { padding: 28px 24px; border-radius: var(--mobile-card-radius); }
  .document-hero h1 { font-size: var(--mobile-title); line-height: 1.08; overflow-wrap: normal; hyphens: auto; }
  .document-content { padding: 36px 0 0; overflow-wrap: anywhere; }
  .document-content h2 { font-size: 28px; line-height: 1.2; }
  .summary-box, .notice-box { padding: 24px; }
  .summary-box h2, .notice-box h2 { font-size: 20px; }
  .support-grid, .form-row { grid-template-columns: 1fr; }
  .field input, .field select, .field textarea { font-size: 16px; min-width: 0; }
  .consent-field { min-height: 44px; }
  .form-action .submit-button { min-height: 48px; }
  .document-content .page-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer, .development-page .site-footer {
    width: auto; margin: 64px var(--mobile-gutter) 0; padding-top: 32px;
  }
  .site-footer nav a { font-size: 14px; line-height: 1.5; }
  .footer-top { gap: 28px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top > div { grid-column: 1 / -1; }
  .footer-bottom { flex-wrap: wrap; font-size: 12px; line-height: 1.6; gap: 8px 20px; }
}
@media (max-width: 360px) {
  :root { --mobile-gutter: 16px; }
  .site-header { gap: 4px; padding-left: 10px; }
  .site-header .brand { font-size: 18px; gap: 6px; }
  .site-header .brand img { width: 24px; height: 24px; }
  .site-header .header-cta { padding-inline: 11px; font-size: 12px; }
  .hero-actions { grid-template-columns: 1fr; }
  .hero-actions > a { font-size: 14px; }
  .hero-device-icons a { font-size: 9px; }
  .document-hero { padding: 24px 20px; }
}
