:root {
  --formal-ink: #171147;
  --formal-muted: #67608a;
  --formal-pink: #e33ca7;
  --formal-violet: #722bd3;
  --formal-orange: #ff9b62;
  --formal-line: rgba(96, 66, 160, 0.16);
  --formal-card: rgba(255, 255, 255, 0.82);
  --formal-shadow: 0 24px 70px rgba(53, 23, 105, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.formal-home-body {
  margin: 0;
  overflow-x: hidden;
  color: var(--formal-ink);
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 220, 244, 0.72), transparent 31rem),
    radial-gradient(circle at 86% 0%, rgba(213, 235, 255, 0.86), transparent 30rem),
    linear-gradient(180deg, #fff 0%, #fff8ff 44%, #f8f5ff 100%);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}

body.formal-home-body a {
  color: inherit;
}

body.formal-home-body main {
  padding: 0;
}

.formal-home {
  min-height: 100vh;
  overflow: clip;
}

.formal-alert,
.formal-preview {
  width: min(1120px, calc(100% - 40px));
  margin: 20px auto;
  padding: 16px 18px;
  border: 1px solid rgba(227, 60, 167, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--formal-shadow);
}

.formal-mobile {
  display: none;
}

.formal-desktop {
  display: block;
  min-width: 1000px;
}

.formal-desktop-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 310px 1fr 250px;
  align-items: center;
  gap: 24px;
  width: min(1390px, calc(100% - 72px));
  margin: 0 auto;
  padding: 28px 0;
}

.formal-logo,
.mobile-formal-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #151045;
}

.formal-logo span,
.mobile-formal-logo span {
  width: 30px;
  height: 30px;
  transform: rotate(45deg);
  border: 3px solid #1d1956;
  border-radius: 8px;
  box-shadow: 13px -13px 0 -9px #f05aa8, -13px 13px 0 -9px #8a36e4;
}

.formal-logo b,
.mobile-formal-logo b {
  font-size: 24px;
  letter-spacing: 0;
  white-space: nowrap;
}

.formal-desktop-header nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 2.2vw, 38px);
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.formal-desktop-header nav a,
.formal-header-actions a,
.formal-footer a,
.formal-section-copy a,
.formal-network span {
  text-decoration: none;
}

.formal-header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
}

.formal-header-actions a {
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.formal-header-actions a:first-child {
  color: #fff;
  background: rgba(10, 6, 35, 0.78);
}

.formal-header-actions a:last-child {
  color: #fff;
  background: linear-gradient(135deg, #ef4db0, #9338df);
  box-shadow: 0 14px 28px rgba(142, 53, 214, 0.26);
}

.formal-hero {
  position: relative;
  min-height: 910px;
  padding: 130px max(4vw, 44px) 70px;
  isolation: isolate;
}

.formal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 64% 48%, rgba(245, 166, 232, 0.34), transparent 24rem),
    linear-gradient(90deg, rgba(255,255,255,0.99) 0%, rgba(255,255,255,0.88) 37%, rgba(255,245,253,0.42) 58%, rgba(31,9,55,0.30) 100%);
}

.formal-hero-copy {
  position: relative;
  z-index: 5;
  width: min(590px, 40vw);
  margin-left: max(0px, calc((100vw - 1390px) / 2));
  padding-top: 80px;
}

.formal-hero-copy h1 {
  margin: 0;
  font-size: clamp(48px, 4.35vw, 76px);
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 10px 28px rgba(255,255,255,0.75);
}

.formal-hero-copy h1 span {
  display: block;
  white-space: nowrap;
}

.formal-hero-copy p {
  margin: 34px 0 0;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 18px;
  line-height: 2;
  font-weight: 700;
}

.formal-primary-cta,
.mobile-formal-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 68px;
  margin-top: 40px;
  padding: 0 42px;
  border-radius: 11px;
  color: #fff;
  text-decoration: none;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff5fa7 0%, #c629b9 56%, #ff9f64 100%);
  box-shadow: 0 18px 38px rgba(191, 39, 174, 0.34);
}

.formal-primary-cta span,
.mobile-formal-primary span {
  width: 28px;
  height: 22px;
  border: 4px solid currentColor;
  border-radius: 7px;
  position: relative;
}

.formal-primary-cta span::before,
.mobile-formal-primary span::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 7px;
  width: 10px;
  height: 6px;
  border-radius: 4px 4px 0 0;
  background: currentColor;
}

.formal-primary-cta::after,
.mobile-formal-primary::after {
  content: "›";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #d538ad;
  background: #fff;
  font-size: 32px;
  line-height: 1;
}

.formal-trust-row {
  display: flex;
  gap: 38px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-weight: 800;
}

.formal-trust-row li {
  position: relative;
  padding-left: 28px;
}

.formal-trust-row li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 17px;
  height: 17px;
  border: 2px solid #7843c7;
  border-radius: 5px;
}

.formal-small-note {
  display: grid;
  gap: 8px;
  width: 260px;
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: 7px;
  background: rgba(246, 244, 255, 0.85);
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 13px;
  color: #6b54a9;
}

.formal-hero-stage {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto auto;
  width: min(980px, 64vw);
  height: 920px;
}

.formal-hero-stage > img {
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 43% 0%;
  filter: saturate(1.07) contrast(1.02);
  mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 100%);
}

.formal-face-mesh {
  position: absolute;
  top: 240px;
  right: 326px;
  width: 315px;
  height: 315px;
  opacity: 0.78;
  background:
    linear-gradient(28deg, transparent 18%, rgba(255, 210, 249, 0.92) 19%, transparent 20%),
    linear-gradient(116deg, transparent 33%, rgba(255, 210, 249, 0.82) 34%, transparent 35%),
    linear-gradient(155deg, transparent 44%, rgba(255, 210, 249, 0.82) 45%, transparent 46%);
}

.formal-face-mesh span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px 5px rgba(244, 80, 191, 0.8);
}

.formal-face-mesh span:nth-child(1) { left: 74px; top: 64px; }
.formal-face-mesh span:nth-child(2) { left: 162px; top: 115px; }
.formal-face-mesh span:nth-child(3) { left: 122px; top: 184px; }
.formal-face-mesh span:nth-child(4) { left: 216px; top: 212px; }
.formal-face-mesh span:nth-child(5) { left: 58px; top: 238px; }

.formal-score-orb {
  position: absolute;
  right: 455px;
  bottom: 92px;
  display: grid;
  place-items: center;
  width: 178px;
  height: 178px;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 33% 28%, rgba(255,255,255,0.46), transparent 18%),
    radial-gradient(circle, rgba(102, 39, 150, 0.72), rgba(102, 39, 150, 0.92));
  border: 2px solid rgba(255, 165, 236, 0.78);
  box-shadow: 0 0 48px rgba(243, 92, 219, 0.72), inset 0 0 30px rgba(255,255,255,0.18);
  text-align: center;
}

.formal-score-orb span {
  margin-top: 18px;
  font-size: 17px;
}

.formal-score-orb b {
  font-size: 66px;
  line-height: 0.82;
  font-weight: 500;
}

.formal-score-orb em {
  margin-bottom: 16px;
  font-style: normal;
  font-size: 18px;
}

.formal-analysis-stack {
  position: absolute;
  top: 124px;
  right: max(30px, calc((100vw - 1410px) / 2));
  display: grid;
  gap: 10px;
  width: 178px;
}

.formal-analysis-stack article {
  min-height: 112px;
  padding: 15px 18px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 10px;
  color: #fff;
  background: rgba(30, 12, 49, 0.46);
  box-shadow: inset 0 0 24px rgba(255, 106, 221, 0.13);
  backdrop-filter: blur(12px);
}

.formal-analysis-stack span,
.formal-analysis-stack small,
.formal-analysis-stack em {
  display: block;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
}

.formal-analysis-stack span {
  font-size: 13px;
  font-weight: 800;
}

.formal-analysis-stack small {
  margin-top: 2px;
  color: rgba(255,255,255,0.78);
  font-size: 9px;
}

.formal-analysis-stack b {
  display: block;
  margin-top: 7px;
  font-size: 44px;
  line-height: 1;
  font-weight: 500;
}

.formal-analysis-stack em {
  margin-top: 4px;
  font-size: 12px;
  font-style: normal;
}

.formal-light-wave {
  position: absolute;
  z-index: 3;
  left: -8%;
  right: -8%;
  bottom: 0;
  height: 210px;
  background:
    radial-gradient(ellipse at 72% 66%, rgba(255, 255, 255, 0.98), transparent 26%),
    linear-gradient(166deg, transparent 0 34%, rgba(255, 166, 238, 0.42) 35% 38%, transparent 39%),
    linear-gradient(171deg, transparent 0 47%, rgba(133, 225, 255, 0.38) 48% 51%, transparent 52%),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.96) 92%);
  filter: blur(0.2px);
}

.formal-future {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(650px, 1.4fr);
  gap: 54px;
  align-items: end;
  width: min(1400px, calc(100% - 72px));
  margin: -24px auto 0;
  padding: 92px 0 64px;
}

.formal-section-copy p:first-child {
  color: #c37acb;
  font-size: 15px;
}

.formal-section-copy h2,
.formal-flow h2,
.formal-diagnosis h2,
.formal-night-cta h2 {
  margin: 12px 0 0;
  font-size: clamp(34px, 2.75vw, 46px);
  line-height: 1.55;
}

.formal-section-copy p:not(:first-child),
.formal-diagnosis-copy > p,
.formal-night-cta p {
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-weight: 700;
  line-height: 1.9;
}

.formal-section-copy a {
  display: inline-flex;
  margin-top: 26px;
  padding: 13px 23px;
  border: 1px solid rgba(77, 48, 130, 0.2);
  border-radius: 8px;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-weight: 800;
  background: #fff;
}

.formal-future-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 14px;
}

.formal-future-cards article {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-radius: 9px;
  box-shadow: 0 20px 42px rgba(24, 10, 58, 0.2);
}

.formal-future-cards img,
.formal-night-cta img,
.mobile-formal-rail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.formal-future-cards article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(13, 12, 43, 0.82));
}

.formal-future-cards div {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #fff;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
}

.formal-future-cards h3 {
  margin: 0;
  font-size: 14px;
}

.formal-future-cards p {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.formal-network {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 94px;
  padding: 0 max(4vw, 44px);
  border-top: 1px solid var(--formal-line);
  border-bottom: 1px solid var(--formal-line);
  background: rgba(255,255,255,0.74);
}

.formal-network p {
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-weight: 800;
  line-height: 1.7;
}

.formal-network span {
  text-align: center;
  font-size: 18px;
  color: rgba(23, 17, 71, 0.8);
}

.formal-flow {
  padding: 88px max(4vw, 44px) 72px;
  text-align: center;
}

.formal-flow > p {
  margin: 0;
  color: #5c4ba0;
  font-weight: 700;
}

.formal-flow ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 34px;
  width: min(1280px, 100%);
  margin: 70px auto 0;
  padding: 0;
  list-style: none;
}

.formal-flow ol::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 72px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ec9dde, #8c69e6, transparent);
}

.formal-flow li {
  position: relative;
  z-index: 1;
}

.formal-flow li > span {
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-weight: 800;
  font-size: 12px;
}

.formal-flow i {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 16px auto 26px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 54%, #fff4fd);
  box-shadow: var(--formal-shadow), inset 0 0 0 1px rgba(140, 105, 230, 0.12);
}

.formal-flow i::before {
  content: "✦";
  color: #d93aa9;
  font-size: 48px;
}

.formal-flow h3 {
  margin: 0;
  font-size: 16px;
}

.formal-flow li p {
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 12px;
  line-height: 1.9;
}

.formal-diagnosis {
  display: grid;
  grid-template-columns: 0.9fr 1.15fr;
  gap: 70px;
  align-items: center;
  width: min(1360px, calc(100% - 72px));
  margin: 0 auto 26px;
  padding: 78px 58px;
  border: 1px solid var(--formal-line);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 24px 80px rgba(35, 22, 85, 0.09);
}

.formal-diagnosis-copy ul {
  display: grid;
  gap: 20px;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
}

.formal-diagnosis-copy li {
  display: grid;
  gap: 7px;
  padding: 0 0 20px 58px;
  border-bottom: 1px solid var(--formal-line);
}

.formal-diagnosis-copy b {
  font-size: 17px;
}

.formal-diagnosis-copy span {
  color: var(--formal-muted);
}

.formal-form-panel,
.mobile-formal-diagnosis {
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 18px 58px rgba(25, 18, 63, 0.12);
}

.formal-upload-form {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 26px;
  border: 1px solid rgba(55, 34, 101, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 227, 249, 0.9), transparent 14rem),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(251,248,255,0.94));
  box-shadow: none;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
}

.formal-upload-main {
  display: grid;
  grid-template-columns: minmax(250px, 0.92fr) minmax(230px, 0.78fr);
  gap: 18px;
  align-items: stretch;
}

.formal-upload-heading {
  grid-column: 1 / -1;
  text-align: center;
}

.formal-upload-heading p,
.formal-upload-heading h3,
.formal-upload-heading span {
  margin: 0;
}

.formal-upload-heading p {
  color: #6d49b7;
  font-size: 14px;
  font-weight: 900;
}

.formal-upload-heading h3 {
  margin-top: 5px;
  color: var(--formal-ink);
  font-size: 21px;
}

.formal-upload-heading span {
  display: block;
  margin-top: 8px;
  color: var(--formal-muted);
  font-size: 13px;
  line-height: 1.6;
}

.formal-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 250px;
  padding: 26px;
  overflow: hidden;
  border: 1.5px dashed rgba(112, 70, 182, 0.42);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(250,244,255,0.98)),
    radial-gradient(circle at 30% 18%, rgba(255, 114, 209, 0.2), transparent 9rem);
  color: var(--formal-ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.formal-dropzone.is-dragover,
.formal-dropzone:focus-within {
  border-color: #dd45ab;
  box-shadow: 0 0 0 4px rgba(221, 69, 171, 0.14), 0 18px 42px rgba(145, 67, 190, 0.14);
  transform: translateY(-1px);
}

.formal-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.formal-dropzone-icon {
  width: 64px;
  height: 50px;
  border: 4px solid #311d69;
  border-radius: 15px;
  position: relative;
}

.formal-dropzone-icon::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 20px;
  width: 18px;
  height: 10px;
  border-radius: 8px 8px 0 0;
  background: #311d69;
}

.formal-dropzone-icon::after {
  content: "";
  position: absolute;
  inset: 13px 20px;
  border: 3px solid #e84bad;
  border-radius: 50%;
}

.formal-dropzone .photo-dropzone-title {
  font-size: 20px;
  font-weight: 900;
}

.formal-dropzone .photo-dropzone-copy,
.formal-file-name {
  max-width: 28ch;
  color: var(--formal-muted);
  font-size: 13px;
  line-height: 1.55;
}

.formal-file-name {
  display: inline-flex;
  justify-content: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(111, 68, 182, 0.08);
  font-weight: 800;
}

.formal-preview-frame {
  display: grid;
  place-items: center;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid rgba(55, 34, 101, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(247,243,255,0.92)),
    repeating-linear-gradient(45deg, rgba(110,70,180,0.04) 0 8px, transparent 8px 16px);
  color: var(--formal-muted);
  text-align: center;
}

.formal-preview-frame.has-image {
  align-content: stretch;
  background: #fff;
}

.formal-preview-frame img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.formal-preview-frame .preview-meta {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  color: #4c3b78;
  background: rgba(246, 241, 255, 0.94);
  font-size: 12px;
  font-weight: 800;
}

.formal-photo-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.formal-secondary-button,
.formal-clear-button {
  min-height: 48px;
  border-radius: 10px;
  font-weight: 900;
}

.formal-secondary-button {
  border: 1px solid rgba(112, 70, 182, 0.18);
  background: #fff;
  color: #39276c;
}

.formal-clear-button {
  border: 1px solid rgba(213, 77, 111, 0.22);
  background: #fff7f9;
  color: #a82e55;
}

.formal-upload-status {
  grid-column: 1 / -1;
  min-height: 42px;
  margin: 0;
  padding: 11px 14px;
  border-radius: 10px;
  color: #31566c;
  background: #eaf8ff;
  font-size: 13px;
  line-height: 1.55;
}

.formal-upload-status[data-state="success"] {
  color: #176341;
  background: #eafaf1;
}

.formal-upload-status[data-state="error"] {
  color: #8b1e3f;
  background: #fff0f5;
}

.formal-photo-guide {
  border: 1px solid rgba(55, 34, 101, 0.12);
  border-radius: 11px;
  background: rgba(255,255,255,0.78);
}

.formal-photo-guide summary {
  min-height: 46px;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 900;
}

.formal-photo-guide ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 18px 16px 34px;
  color: var(--formal-muted);
  font-size: 13px;
  line-height: 1.6;
}

.formal-upload-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.formal-upload-fields label {
  display: grid;
  gap: 8px;
  color: #34265f;
  font-size: 13px;
  font-weight: 900;
}

.formal-upload-fields select,
.formal-upload-fields input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(55, 34, 101, 0.18);
  border-radius: 10px;
  background: #fff;
  color: #171147;
  font: inherit;
  font-weight: 700;
}

.formal-consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 52px;
  margin: 0;
  padding: 14px 15px;
  border: 1px solid rgba(112, 70, 182, 0.14);
  border-radius: 12px;
  background: rgba(255,255,255,0.84);
  color: #392d65;
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
}

.formal-consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #d93aa9;
}

.formal-submit {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #f14fb1, #ad2bd0);
  box-shadow: 0 14px 26px rgba(169, 43, 208, 0.24);
  font-size: 17px;
  font-weight: 900;
}

.formal-submit:disabled {
  cursor: wait;
  filter: saturate(0.82);
}

.formal-upload-progress {
  padding: 14px;
  border-radius: 12px;
  background: rgba(244, 239, 255, 0.94);
}

.formal-upload-progress p {
  margin: 0 0 10px;
  font-weight: 900;
}

.formal-upload-progress ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
}

.formal-upload-progress li {
  min-height: 38px;
  padding: 8px 6px;
  border-radius: 8px;
  background: #fff;
  color: var(--formal-muted);
  text-align: center;
}

.formal-upload-progress li.is-active {
  color: #fff;
  background: linear-gradient(135deg, #e84bad, #7a41d8);
}

.formal-upload-progress li.is-done {
  color: #2d6b50;
  background: #e7f8ef;
}

.formal-privacy-note {
  margin: 0;
  color: var(--formal-muted);
  font-size: 12px;
  line-height: 1.75;
  text-align: center;
}

.formal-upload-form :focus-visible {
  outline: 3px solid rgba(232, 75, 173, 0.4);
  outline-offset: 3px;
}

.formal-safety {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 1fr);
  gap: 24px;
  align-items: center;
  width: min(1360px, calc(100% - 72px));
  margin: 0 auto 50px;
  padding: 26px 34px;
  border: 1px solid var(--formal-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
}

.formal-safety h2 {
  margin: 0;
  font-size: 21px;
}

.formal-safety article {
  display: grid;
  gap: 8px;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
}

.formal-safety span {
  color: var(--formal-muted);
  font-size: 13px;
  line-height: 1.6;
}

.formal-night-cta {
  position: relative;
  min-height: 270px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
}

.formal-night-cta img {
  position: absolute;
  inset: 0;
  filter: saturate(1.2);
}

.formal-night-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 6, 69, 0.86), rgba(67, 16, 91, 0.52), rgba(28, 6, 69, 0.84));
}

.formal-night-cta div {
  position: relative;
  z-index: 1;
}

.formal-night-cta .formal-primary-cta {
  margin-top: 24px;
}

.formal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 0 max(4vw, 44px);
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 12px;
  background: #fff;
}

.formal-footer nav {
  display: flex;
  gap: 28px;
}

@media (max-width: 1090px) {
  .formal-hero-copy h1 {
    font-size: 45px;
  }
  .formal-desktop-header {
    grid-template-columns: 255px 1fr 205px;
    width: calc(100% - 40px);
  }
  .formal-desktop-header nav {
    gap: 14px;
  }
}

@media (max-width: 767px) {
  body.formal-home-body {
    background: #fff;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  }

  .formal-desktop {
    display: none;
  }

  .formal-mobile {
    display: block;
    padding-bottom: 92px;
  }

  .mobile-formal-hero {
    position: relative;
    min-height: 730px;
    overflow: hidden;
    border-radius: 0 0 26px 26px;
    background: linear-gradient(90deg, #fff 0 42%, #fff3fb 100%);
  }

  .mobile-formal-header {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 24px 0;
  }

  .mobile-formal-logo b {
    font-size: 20px;
  }

  .mobile-formal-logo span {
    width: 24px;
    height: 24px;
  }

  .mobile-formal-menu {
    display: grid;
    gap: 7px;
    width: 44px;
    border: 0;
    background: transparent;
  }

  .mobile-formal-menu span {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: #171147;
  }

  .mobile-formal-hero > img {
    position: absolute;
    top: 0;
    right: -164px;
    width: 640px;
    height: 560px;
    object-fit: cover;
    object-position: 45% 0;
    filter: saturate(1.08);
    mask-image: linear-gradient(90deg, transparent, #000 20%, #000);
  }

  .mobile-formal-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 82% 39%, rgba(241, 89, 207, 0.24), transparent 12rem),
      linear-gradient(90deg, rgba(255,255,255,0.98) 0 40%, transparent 80%);
    pointer-events: none;
  }

  .mobile-formal-score {
    position: absolute;
    z-index: 4;
    right: 10px;
    top: 66px;
    display: grid;
    place-items: center;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    color: #fff;
    text-align: center;
    background: radial-gradient(circle at 35% 22%, rgba(255,255,255,0.48), transparent 18%), rgba(93, 28, 109, 0.86);
    border: 2px solid rgba(255, 160, 235, 0.78);
    box-shadow: 0 0 34px rgba(214, 70, 196, 0.6);
  }

  .mobile-formal-score span {
    margin-top: 12px;
    font-size: 12px;
  }

  .mobile-formal-score b {
    font-size: 43px;
    line-height: 0.95;
    font-weight: 500;
  }

  .mobile-formal-score em {
    margin-bottom: 10px;
    font-style: normal;
    font-size: 12px;
  }

  .mobile-formal-copy {
    position: relative;
    z-index: 5;
    width: min(310px, calc(100% - 46px));
    padding: 122px 0 0 24px;
  }

  .mobile-formal-copy h1 {
    margin: 0;
    font-size: clamp(28px, 7.4vw, 31px);
    line-height: 1.45;
    letter-spacing: 0;
  }

  .mobile-formal-copy h1 span {
    display: block;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .mobile-formal-copy p {
    margin: 28px 0 0;
    font-size: 16px;
    line-height: 1.75;
    font-weight: 700;
  }

  .mobile-formal-primary {
    width: min(316px, calc(100vw - 48px));
    min-height: 66px;
    margin-top: 42px;
    padding: 0 24px;
    border-radius: 11px;
    font-size: clamp(17px, 4.7vw, 20px);
    white-space: nowrap;
  }

  .mobile-formal-copy ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: min(316px, calc(100vw - 48px));
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
    font-weight: 800;
    font-size: 9px;
    text-align: center;
  }

  .mobile-formal-down {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 22px;
    width: 24px;
    height: 24px;
    border-right: 4px solid rgba(23, 17, 71, 0.36);
    border-bottom: 4px solid rgba(23, 17, 71, 0.36);
    transform: translateX(-50%) rotate(45deg);
  }

  .mobile-formal-analysis {
    margin: 22px 0 28px;
    padding: 28px 18px 24px;
    border-radius: 28px;
    color: #fff;
    background:
      radial-gradient(circle at 0% 42%, rgba(240, 87, 221, 0.34), transparent 13rem),
      linear-gradient(135deg, #120a47, #070727 68%, #1f0b59);
    box-shadow: 0 18px 50px rgba(16, 8, 61, 0.22);
  }

  .mobile-formal-analysis h2,
  .mobile-formal-future h2,
  .mobile-formal-final h2,
  .mobile-formal-diagnosis h2 {
    margin: 0;
    text-align: center;
    font-size: clamp(26px, 7vw, 36px);
    line-height: 1.45;
  }

  .mobile-analysis-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    gap: 4px;
    margin-top: 28px;
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
    text-align: center;
  }

  .mobile-analysis-grid article {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-analysis-grid span {
    display: block;
    min-height: 34px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
  }

  .mobile-analysis-grid b {
    display: block;
    margin-top: 10px;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
    font-size: clamp(20px, 5.4vw, 25px);
    font-weight: 500;
  }

  .mobile-analysis-grid i {
    display: block;
    height: 8px;
    margin-top: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff61c8, #ffb0df);
  }

  .mobile-formal-analysis a {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 58px;
    margin-top: 24px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    color: #fff;
    text-decoration: none;
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
    font-weight: 800;
    background: rgba(255,255,255,0.1);
  }

  .mobile-formal-future {
    padding: 0 20px 24px;
    text-align: center;
  }

  .mobile-formal-future p {
    margin: 10px 0 22px;
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
    color: var(--formal-muted);
    font-weight: 700;
  }

  .mobile-formal-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(176px, 46vw);
    gap: 16px;
    overflow-x: auto;
    padding: 0 2px 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .mobile-formal-rail::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .mobile-formal-rail article {
    position: relative;
    min-height: 238px;
    overflow: hidden;
    border-radius: 10px;
    color: #fff;
    text-align: left;
    background: #171147;
    scroll-snap-align: start;
    box-shadow: 0 14px 30px rgba(19, 11, 56, 0.2);
  }

  .mobile-formal-rail img {
    position: absolute;
    inset: 0;
  }

  .mobile-formal-rail article::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 34%, rgba(9, 14, 41, 0.9));
  }

  .mobile-formal-rail h3,
  .mobile-formal-rail p,
  .mobile-formal-rail a {
    position: relative;
    z-index: 1;
    margin-left: 16px;
    margin-right: 16px;
  }

  .mobile-formal-rail h3 {
    margin-top: 130px;
    margin-bottom: 0;
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 18px;
  }

  .mobile-formal-rail p {
    margin-top: 7px;
    color: #fff;
    font-size: 13px;
  }

  .mobile-formal-rail a {
    display: block;
    margin-top: 10px;
    color: #fff;
    text-decoration: none;
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
    font-weight: 800;
  }

  .mobile-formal-dots {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin: 9px 0 0;
  }

  .mobile-formal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dedce6;
  }

  .mobile-formal-dots .is-active {
    background: #e846ad;
  }

  .mobile-formal-scout {
    margin: 8px 22px 28px;
    min-height: 120px;
    padding: 26px 26px 24px 112px;
    border-radius: 15px;
    color: #fff;
    background:
      radial-gradient(circle at 90% 50%, rgba(238, 79, 215, 0.38), transparent 10rem),
      linear-gradient(135deg, #150b4e, #2b1268);
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  }

  .mobile-formal-scout h2 {
    margin: 0;
    font-size: 19px;
  }

  .mobile-formal-scout p {
    margin: 10px 0 0;
    line-height: 1.7;
  }

  .mobile-formal-final {
    margin: 0 0 22px;
    padding: 40px 26px 34px;
    border-radius: 32px 32px 0 0;
    text-align: center;
    background:
      radial-gradient(circle at 12% 24%, rgba(255,255,255,0.85), transparent 5rem),
      linear-gradient(180deg, #e6dbff, #f9ecff);
  }

  .mobile-formal-final p {
    margin: 18px 0 0;
    font-size: 18px;
    font-weight: 700;
  }

  .mobile-formal-final small {
    display: block;
    margin-top: 18px;
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
    color: #453c68;
  }

  .mobile-formal-diagnosis {
    margin: 20px;
    padding: 24px 14px 112px;
    scroll-margin-bottom: 96px;
  }

  .mobile-formal-diagnosis h2 {
    margin-bottom: 20px;
  }

  .mobile-formal-diagnosis .formal-upload-form {
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
  }

  .mobile-formal-diagnosis .formal-upload-main,
  .mobile-formal-diagnosis .formal-upload-fields,
  .mobile-formal-diagnosis .formal-photo-actions {
    grid-template-columns: 1fr;
  }

  .mobile-formal-diagnosis .formal-upload-heading h3 {
    font-size: 18px;
    line-height: 1.55;
  }

  .mobile-formal-diagnosis .formal-upload-heading span {
    font-size: 12px;
  }

  .mobile-formal-diagnosis .formal-dropzone {
    min-height: 180px;
    padding: 20px 14px;
  }

  .mobile-formal-diagnosis .formal-dropzone-icon {
    width: 54px;
    height: 43px;
  }

  .mobile-formal-diagnosis .formal-dropzone .photo-dropzone-title {
    font-size: 19px;
  }

  .mobile-formal-diagnosis .formal-preview-frame {
    min-height: 190px;
  }

  .mobile-formal-diagnosis .formal-preview-frame img {
    height: 184px;
  }

  .mobile-formal-diagnosis .formal-secondary-button,
  .mobile-formal-diagnosis .formal-clear-button,
  .mobile-formal-diagnosis .formal-upload-fields select,
  .mobile-formal-diagnosis .formal-upload-fields input {
    min-height: 50px;
  }

  .mobile-formal-diagnosis .formal-upload-fields select,
  .mobile-formal-diagnosis .formal-upload-fields input {
    font-size: 12px;
  }

  .mobile-formal-diagnosis .formal-consent {
    min-height: 58px;
    font-size: 12px;
  }

  .mobile-formal-diagnosis .formal-submit {
    min-height: 60px;
    font-size: 15px;
  }

  .mobile-formal-diagnosis .formal-upload-progress ol {
    grid-template-columns: 1fr;
  }

  .mobile-formal-diagnosis .formal-privacy-note {
    padding-bottom: 4px;
    font-size: 11px;
    text-align: left;
  }

  .mobile-formal-note {
    display: grid;
    gap: 12px;
    margin: 20px;
    padding-bottom: 18px;
  }

  .mobile-formal-note p {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 16px;
    border-radius: 14px;
    background: rgba(246, 242, 255, 0.9);
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  }

  .mobile-formal-bottom {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    min-height: 76px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 -12px 38px rgba(24, 14, 72, 0.14);
    font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  }

  .mobile-formal-bottom a {
    display: grid;
    place-items: center;
    min-height: 46px;
    color: #171147;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-formal-bottom .is-active {
    color: #e846ad;
  }

  .mobile-formal-main-tab {
    transform: translateY(-13px);
    border-radius: 999px;
    color: #fff !important;
    background: linear-gradient(135deg, #ff62b3, #bd2bc6);
    box-shadow: 0 13px 24px rgba(199, 45, 183, 0.35);
  }
}

@media (min-width: 768px) {
  .formal-desktop {
    display: block;
  }
}
