:root {
  --serif:
    "Shippori Mincho B1", "Noto Serif JP", "YuMincho",
    "Hiragino Mincho ProN", serif;
  --sans: "Inter", "Helvetica Neue", sans-serif;
  --display: "Cormorant Garamond", "Shippori Mincho B1", serif;

  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.82);
  --ink-mute: rgba(255, 255, 255, 0.6);
  --hairline: rgba(255, 255, 255, 0.22);

  --section-pad: clamp(7rem, 16vh, 12rem);
  --content-max: 56rem;
  --shadow-text: 0 1px 30px rgba(60, 50, 80, 0.35);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.95;
  background: #c4b6c8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-shadow: var(--shadow-text);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ----- Three.js canvas (fixed background) ----- */
#sky {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

.site {
  position: relative;
  z-index: 1;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ----- Hero ----- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.75rem 4rem;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  width: 100%;
  max-width: 64rem;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 880px) {
  .hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5rem;
  }
  .hero__text {
    align-items: flex-start;
    text-align: left;
  }
  .hero .hero__downloads {
    justify-content: flex-start;
  }
}

.hero__lead {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4rem, 4.6vw, 3.2rem);
  line-height: 1;
  color: var(--ink);
  margin: 0 0 1.6rem;
  letter-spacing: 0.01em;
  text-transform: none;
}

.hero__title {
  font-size: clamp(1.85rem, 4.6vw, 2.85rem);
  font-weight: 500;
  line-height: 2;
  margin: 0 0 2.5rem;
  letter-spacing: 0.04em;
}

.hero__sub {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 4rem;
  line-height: 2.1;
}

.hero__downloads {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.85rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    border-color 0.4s ease,
    background 0.4s ease;
}

.store-button:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.store-button[aria-disabled="true"] {
  color: var(--ink-mute);
  cursor: default;
}

.store-button[aria-disabled="true"]:hover {
  border-color: var(--hairline);
  background: rgba(255, 255, 255, 0.06);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-weight: 200;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 36px;
  margin: 0.7rem auto 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0)
  );
}

/* ----- Section base ----- */
section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section__eyebrow {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-transform: none;
  margin: 0 0 2rem;
}

.section__title {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 500;
  line-height: 2;
  margin: 0 0 2.5rem;
}

.section__body {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 2.1;
  margin: 0;
}

.section__body + .section__body {
  margin-top: 1.5rem;
}

/* ----- Concept ----- */
.concept {
  text-align: center;
}

.concept .section__title {
  font-size: clamp(1.55rem, 2.9vw, 2.05rem);
}

/* ----- Flow (scroll-pinned, single phone) ----- */
.flow {
  padding-bottom: 0;
}

.flow__intro {
  text-align: center;
  margin-bottom: 0;
}

.flow__pin-wrap {
  position: relative;
  height: 300vh;
  margin-top: clamp(3rem, 8vh, 5rem);
}

.flow__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
}

.flow__pin-inner {
  width: 100%;
  max-width: 56rem;
  height: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "eyebrow eyebrow"
    "caption phone";
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vh, 2.5rem) clamp(2.5rem, 6vw, 5rem);
  padding: clamp(4.5rem, 11vh, 7rem) 2rem 2rem;
}

.flow__pin-header {
  grid-area: eyebrow;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.flow__sticky-eyebrow {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-transform: none;
  margin: 0;
}

.flow__sticky-title {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 500;
  line-height: 1.8;
  margin: 0;
  letter-spacing: 0.04em;
}

.flow__captions {
  grid-area: caption;
  position: relative;
  display: grid;
  align-self: center;
}

.flow__caption {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.12s ease;
  max-width: 24rem;
}

.flow__caption:first-child {
  opacity: 1;
}

.flow__phone-stack {
  grid-area: phone;
  align-self: center;
  position: relative;
  width: clamp(220px, 24vw, 270px);
  aspect-ratio: 9 / 19.5;
  margin: 0 auto;
}

.flow__phone-stack > .phone {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.45s ease;
  aspect-ratio: auto;
}

.flow__phone-stack > .phone:first-child {
  opacity: 1;
}

.flow__step {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.32);
  margin: 0 0 1.2rem;
  line-height: 1;
  text-shadow: none;
}

.flow__verb {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 500;
  margin: 0 0 1.7rem;
  letter-spacing: 0.14em;
}

.flow__desc {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 2.1;
  margin: 0;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .flow__pin-wrap {
    height: 360vh;
  }
  .flow__pin-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "eyebrow"
      "caption"
      "phone";
    gap: 1.2rem;
    padding: clamp(3.5rem, 7vh, 5rem) 1.5rem 0;
    max-width: 24rem;
    align-items: start;
  }
  .flow__pin-header {
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .flow__sticky-title {
    font-size: 1.4rem;
  }
  .flow__captions {
    align-self: start;
    justify-items: center;
    text-align: center;
  }
  .flow__caption {
    margin: 0 auto;
    max-width: 22rem;
  }
  .flow__phone-stack {
    align-self: start;
    width: clamp(180px, 52vw, 220px);
  }
}

/* ----- Philosophy ----- */
.philosophy {
  text-align: center;
}

.philosophy__quote {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 500;
  line-height: 2.1;
  margin: 3.5rem auto 0;
  max-width: 32rem;
}

/* ----- Download ----- */
.download {
  text-align: center;
}

.download__note {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin: 2rem 0 0;
}

/* ----- Footer ----- */
footer {
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--hairline);
  margin-top: var(--section-pad);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.5rem;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer__row a {
  transition: color 0.4s ease;
}

.footer__row a:hover {
  color: var(--ink);
}

.footer__copy {
  text-align: center;
  margin: 2rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  font-family: var(--sans);
  font-weight: 300;
}

/* ----- Phone mocks ----- */
.phone {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 13% / 6%;
  background: linear-gradient(160deg, #2a242f 0%, #14111a 100%);
  padding: 0.5rem;
  box-shadow:
    0 40px 80px -30px rgba(40, 30, 60, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 0 2px rgba(255, 255, 255, 0.04);
}

.phone--lg {
  width: clamp(220px, 26vw, 280px);
}

.phone--sm {
  width: clamp(200px, 24vw, 250px);
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 11% / 5%;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    #b8a4c4 0%,
    #d4afae 45%,
    #efcdb6 100%
  );
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  color: rgba(50, 38, 56, 0.92);
  text-shadow: none;
}

.phone__notch {
  position: absolute;
  top: 1.6%;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 4.2%;
  border-radius: 999px;
  background: #14111a;
  z-index: 5;
}

.phone__statusbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4% 8% 0;
  height: 8.5%;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(50, 38, 56, 0.85);
  letter-spacing: 0.02em;
  z-index: 4;
}

.phone__icons {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.phone__app {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.4rem 1.6rem;
}

/* ----- Home variant ----- */
.phone--home .phone__app {
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.phone__label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.55rem;
  letter-spacing: 0.24em;
  color: rgba(50, 38, 56, 0.55);
  text-transform: uppercase;
  margin: 0.5rem 0 0;
}

.phone__letter {
  font-size: 0.92rem;
  line-height: 2.1;
  font-weight: 500;
  margin: auto 0;
  letter-spacing: 0.06em;
  color: rgba(45, 32, 50, 0.95);
}

.phone__date {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: rgba(50, 38, 56, 0.55);
  margin: 0;
}

.phone__dots {
  display: flex;
  gap: 0.35rem;
  margin: 0.6rem 0 1.2rem;
}

.phone__dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(50, 38, 56, 0.22);
}

.phone__dots span.is-active {
  background: rgba(50, 38, 56, 0.62);
}

.phone__plus {
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 200;
  color: rgba(45, 32, 50, 0.78);
  line-height: 1;
  padding-bottom: 0.1em;
}

/* ----- Write variant (白紙) ----- */
.phone--write .phone__app,
.phone--press .phone__app {
  padding: 1rem 1rem 1.2rem;
  background: linear-gradient(
    180deg,
    rgba(255, 250, 245, 0.25) 0%,
    rgba(255, 250, 245, 0.05) 100%
  );
}

.phone__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  color: rgba(50, 38, 56, 0.55);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.phone__write-area {
  flex: 1;
  position: relative;
}

.phone__cursor {
  display: inline-block;
  width: 1px;
  height: 0.95em;
  background: rgba(50, 38, 56, 0.7);
  vertical-align: middle;
  font-size: 0.7rem;
}

.phone__write-area::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.85rem;
  background: rgba(50, 38, 56, 0.6);
  margin-top: 0.4rem;
}

.phone__commit-wrap {
  display: flex;
  justify-content: center;
  margin-top: auto;
  position: relative;
}

.phone__commit-pill {
  font-family: var(--sans);
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: rgba(50, 38, 56, 0.7);
  border: 1px solid rgba(50, 38, 56, 0.4);
  border-radius: 999px;
  padding: 0.55em 1.7em;
  background: rgba(255, 255, 255, 0.32);
  text-transform: uppercase;
  position: relative;
}

/* ----- Press variant (長押し中) ----- */
.phone--press .phone__commit-pill {
  background: rgba(45, 32, 50, 0.88);
  color: rgba(255, 248, 240, 0.96);
  border-color: transparent;
  box-shadow: 0 6px 20px -8px rgba(40, 30, 60, 0.5);
}

.phone__press-ring {
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 240, 220, 0.18);
  pointer-events: none;
}

.phone__press-ring::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  border-top-color: rgba(255, 240, 220, 0.9);
  border-right-color: rgba(255, 240, 220, 0.9);
  border-bottom-color: rgba(255, 240, 220, 0.6);
  transform: rotate(135deg);
}

.phone__press-label {
  position: absolute;
  bottom: calc(100% + 0.9rem);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(45, 32, 50, 0.95);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.phone__press-label::after {
  content: "";
  display: block;
  width: 1px;
  height: 14px;
  margin: 0.4rem auto 0;
  background: rgba(45, 32, 50, 0.45);
}

/* ----- Receive variant (通知) ----- */
.phone--receive .phone__app {
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.phone__notification {
  position: absolute;
  top: 12%;
  left: 6%;
  right: 6%;
  background: rgba(255, 250, 245, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-radius: 1.1em;
  padding: 0.7em 0.85em;
  z-index: 6;
  box-shadow: 0 10px 24px rgba(40, 30, 60, 0.22);
  text-align: left;
}

.phone__notification-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.45rem;
  letter-spacing: 0.18em;
  color: rgba(60, 50, 80, 0.55);
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 0.25em;
}

.phone__notification-meta::before {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 0.16em;
  background: linear-gradient(
    135deg,
    rgba(50, 38, 56, 0.55),
    rgba(120, 90, 110, 0.45)
  );
  margin-right: 0.4em;
  vertical-align: middle;
}

.phone__notification-meta span:first-child {
  flex: 1;
}

.phone__notification-text {
  font-family: var(--serif);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(45, 32, 50, 0.95);
  letter-spacing: 0.05em;
}

.phone--receive .phone__app::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

/* ----- Reveal ----- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 1.6s ease,
    transform 1.6s ease;
}

.reveal.is-shown {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-shown {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ================================================================
   Legal / Support pages (privacy.html / terms.html / support.html)
   ================================================================ */

.site--legal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal__home {
  display: inline-block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.01em;
  padding: clamp(2rem, 6vh, 3.5rem) 0 0 clamp(1.75rem, 5vw, 3rem);
  text-decoration: none;
  transition: opacity 0.4s ease;
}

.legal__home:hover {
  opacity: 0.7;
}

.legal-page,
.support-page {
  flex: 1;
  padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 6rem);
}

.legal-page .container,
.support-page .container {
  max-width: 44rem;
}

.legal-page h1,
.support-page h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}

.last-updated {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin: 0 0 3rem;
}

.legal-page h2,
.support-page h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 3rem 0 1.2rem;
}

.legal-page p,
.support-page p {
  font-size: 1rem;
  line-height: 2.05;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

.legal-page ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
}

.legal-page li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 1rem;
  line-height: 2;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.legal-page li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 0.55rem;
  height: 1px;
  background: var(--hairline);
}

.legal-page a,
.support-page a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--hairline);
  transition: text-decoration-color 0.4s ease;
}

.legal-page a:hover,
.support-page a:hover {
  text-decoration-color: var(--ink);
}

/* ----- FAQ ----- */
.faq {
  margin: 2rem 0 0;
  border-top: 1px solid var(--hairline);
}

.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: var(--shadow-text);
  padding: 1.4rem 2.2rem 1.4rem 0;
  position: relative;
  transition: opacity 0.4s ease;
}

.faq-question:hover {
  opacity: 0.78;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-weight: 200;
  font-size: 1.3rem;
  color: var(--ink-soft);
  transition: transform 0.4s ease;
  text-shadow: none;
}

.faq-item.active .faq-question::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.faq-item.active .faq-answer {
  max-height: 600px;
}

.faq-answer p {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
  padding-right: 1.5rem;
}

/* ----- Contact ----- */
.contact-section {
  text-align: center;
  margin-top: 4.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--hairline);
}

.contact-section h2 {
  margin-top: 0;
}

.contact-section__mail {
  margin-top: 1.2rem;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .legal__home {
    padding-left: 1.5rem;
    padding-top: 2rem;
  }
  .legal-page h2,
  .support-page h2 {
    margin-top: 2.4rem;
  }
}
