:root {
  --aohige-ink: #17202a;
  --aohige-muted: #5d6673;
  --aohige-line: #d9e1e8;
  --aohige-soft: #f5f8fb;
  --aohige-panel: #ffffff;
  --aohige-teal: #137c75;
  --aohige-blue: #2563eb;
  --aohige-amber: #b7791f;
  --aohige-red: #b42318;
  --aohige-shadow: 0 14px 38px rgba(23, 32, 42, 0.10);
}

.aohige-page {
  background: #f7fafc;
  color: var(--aohige-ink);
  min-height: 100vh;
}

.aohige-container {
  margin: 0 auto;
  max-width: 1080px;
  padding: 0 18px;
  width: 100%;
}

.aohige-main-visual {
  align-items: center;
  background: #102333;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  margin: 0 auto 20px;
  min-height: 260px;
  overflow: hidden;
  position: relative;
  width: min(100%, 420px);
}

.aohige-inline-preview {
  border-radius: 8px;
  display: block;
  margin: 0 auto 18px;
  max-height: 360px;
  max-width: 100%;
  object-fit: contain;
}

/* v2.2 E4: プレビュー領域の高さを事前確保し、選択直後の-20px相当の重なり/レイアウトシフトを防ぐ */
.aohige-page .preview_img {
  min-height: 0;
}

.aohige-page .preview_img:not(:empty) {
  min-height: 200px;
}

.aohige-question-box {
  background: #fff;
  border: 1px solid var(--aohige-line);
  border-radius: 8px;
  margin: 22px auto 30px;
  max-width: 580px;
  padding: 20px;
  text-align: left;
}

.aohige-question-box h2 {
  color: var(--aohige-ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.35;
  margin: 0 0 14px;
  text-align: center;
}

#aohige-questions-title:focus {
  outline: none;
}

.aohige-submit.select_btn {
  border: 0;
  cursor: pointer;
  display: block;
  font-family: inherit;
  margin: 24px auto 0;
  max-width: 340px;
  width: 100%;
}

.aohige-page .select_btn {
  background: #988CDB;
}

.aohige-page .select_btn:hover {
  background: #8578C9;
}

.aohige-page.aohige-hasfile .select_btn:not(.aohige-submit) {
  background: #fff;
  color: #988CDB;
  border: 1.5px solid #B9CDD1;
}

.aohige-page.aohige-hasfile .select_btn:not(.aohige-submit):hover {
  background: #F3F0FB;
}

.aohige-wire-form .run_btn {
  background: #EDF1F3;
  border: 2px solid #E2E5EA;
  color: #9AA5AF;
  cursor: not-allowed;
  font-family: inherit;
}

.aohige-wire-form .run_btn:not(:disabled) {
  background: #988CDB;
  border-color: #988CDB;
  color: #ffffff;
  cursor: pointer;
}

.aohige-wire-form .run_btn:not(:disabled):hover {
  background: #8578C9;
  border-color: #8578C9;
}

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

.aohige-hero {
  background: linear-gradient(180deg, #ffffff 0%, #eef5f7 100%);
  border-bottom: 1px solid var(--aohige-line);
  padding: 34px 0 28px;
}

.aohige-hero__grid,
.aohige-result-hero__grid {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
}

.aohige-eyebrow,
.aohige-step {
  color: var(--aohige-teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.aohige-hero h1,
.aohige-result-summary h1 {
  color: var(--aohige-ink);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.12;
  margin: 0;
}

.aohige-result-summary h1 {
  font-size: clamp(26px, 4vw, 40px);
}

.aohige-lead,
.aohige-result-copy {
  color: var(--aohige-muted);
  font-size: 16px;
  line-height: 1.85;
  margin: 18px 0 0;
}

.aohige-hero__facts,
.aohige-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.aohige-hero__facts span,
.aohige-result-tags span {
  background: #ffffff;
  border: 1px solid var(--aohige-line);
  border-radius: 999px;
  color: var(--aohige-muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 9px 12px;
}

.aohige-visual {
  align-items: center;
  background: #102333;
  border-radius: 8px;
  box-shadow: var(--aohige-shadow);
  display: flex;
  justify-content: center;
  min-height: 300px;
  overflow: hidden;
  position: relative;
}

.aohige-visual__face {
  background: #f1c6a7;
  border-radius: 46% 46% 44% 44%;
  box-shadow: inset 0 -34px 60px rgba(77, 47, 35, 0.18);
  height: 210px;
  position: relative;
  width: 168px;
}

.aohige-visual__eye {
  background: #18212d;
  border-radius: 999px;
  height: 10px;
  position: absolute;
  top: 70px;
  width: 26px;
}

.aohige-visual__eye:first-child {
  left: 42px;
}

.aohige-visual__eye:nth-child(2) {
  right: 42px;
}

.aohige-visual__nose {
  border: solid rgba(69, 42, 31, 0.35);
  border-width: 0 2px 2px 0;
  height: 34px;
  left: 80px;
  position: absolute;
  top: 86px;
  transform: rotate(22deg);
  width: 16px;
}

.aohige-visual__mouth {
  background: #5f2f34;
  border-radius: 999px;
  height: 8px;
  left: 60px;
  position: absolute;
  top: 140px;
  width: 48px;
}

.aohige-visual__beard {
  background: linear-gradient(180deg, rgba(63, 91, 114, 0.28), rgba(33, 55, 71, 0.42));
  border-radius: 0 0 70px 70px;
  bottom: 18px;
  height: 72px;
  left: 24px;
  position: absolute;
  width: 120px;
}

.aohige-visual__score {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  bottom: 18px;
  color: var(--aohige-ink);
  display: grid;
  gap: 3px;
  left: 18px;
  padding: 12px 14px;
  position: absolute;
}

.aohige-visual__score span {
  color: var(--aohige-muted);
  font-size: 12px;
  font-weight: 700;
}

.aohige-visual__score b {
  font-size: 17px;
  letter-spacing: 0;
}

.aohige-form-band,
.aohige-result-section {
  padding: 28px 0 54px;
}

.aohige-form {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.aohige-panel,
.aohige-result-card,
.aohige-note {
  background: var(--aohige-panel);
  border: 1px solid var(--aohige-line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(23, 32, 42, 0.06);
  padding: 22px;
}

.aohige-section-head h2,
.aohige-note h2,
.aohige-safety h2 {
  color: var(--aohige-ink);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.35;
  margin: 0;
}

.aohige-section-head p:not(.aohige-step),
.aohige-note p,
.aohige-safety p {
  color: var(--aohige-muted);
  font-size: 14px;
  line-height: 1.75;
  margin: 8px 0 0;
}

.aohige-upload {
  align-items: center;
  background: #f8fbfd;
  border: 2px dashed #a7b8c6;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  justify-items: center;
  margin-top: 18px;
  min-height: 210px;
  padding: 22px;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.aohige-upload:hover,
.aohige-upload:focus-within {
  background: #edf7f6;
  border-color: var(--aohige-teal);
}

.aohige-upload input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.aohige-upload__icon {
  border: 3px solid var(--aohige-teal);
  border-radius: 8px;
  display: block;
  height: 54px;
  position: relative;
  width: 64px;
}

.aohige-upload__icon::before {
  border: solid var(--aohige-teal);
  border-width: 0 3px 3px 0;
  content: "";
  height: 16px;
  left: 26px;
  position: absolute;
  top: 16px;
  transform: rotate(45deg);
  width: 10px;
}

.aohige-upload__title {
  color: var(--aohige-ink);
  display: block;
  font-size: 18px;
  font-weight: 800;
  margin-top: 14px;
}

.aohige-upload__text {
  color: var(--aohige-muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.aohige-preview {
  margin-top: 16px;
}

.aohige-preview img {
  aspect-ratio: 4 / 5;
  background: #e9eef2;
  border: 1px solid var(--aohige-line);
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.aohige-preview__clear {
  background: transparent;
  border: 0;
  color: var(--aohige-blue);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  margin-top: 10px;
  min-height: 44px;
  padding: 8px 0;
}

.aohige-fieldset {
  border: 0;
  margin: 20px 0 0;
  padding: 0;
}

.aohige-fieldset legend {
  color: var(--aohige-ink);
  font-size: 15px;
  font-weight: 850;
  margin-bottom: 10px;
  padding: 0;
}

.aohige-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aohige-options--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.aohige-options label {
  cursor: pointer;
  display: block;
}

.aohige-options input {
  opacity: 0;
  position: absolute;
}

.aohige-options span {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--aohige-line);
  border-radius: 8px;
  color: var(--aohige-ink);
  display: flex;
  font-size: 14px;
  font-weight: 750;
  justify-content: center;
  line-height: 1.35;
  min-height: 48px;
  padding: 10px;
  text-align: center;
}

.aohige-options input:checked + span {
  background: #F3F0FB;
  border: 2px solid #988CDB;
  color: var(--aohige-ink);
  font-weight: 850;
}

.aohige-options input:focus-visible + span,
.aohige-adult-check input:focus-visible + span,
.aohige-submit:focus-visible,
.aohige-secondary-link:focus-visible,
.aohige-pr-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

.aohige-adult-check {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--aohige-line);
  border-radius: 8px;
  color: var(--aohige-muted);
  cursor: pointer;
  display: grid;
  font-size: 14px;
  gap: 10px;
  grid-template-columns: 22px 1fr;
  line-height: 1.65;
  margin-top: 22px;
  padding: 14px;
}

.aohige-adult-check strong {
  color: var(--aohige-ink);
  font-weight: 850;
}

.aohige-adult-check input {
  accent-color: #988CDB;
  height: 20px;
  margin-top: 3px;
  width: 20px;
}

.aohige-form-error,
.aohige-alert {
  background: #fff4ed;
  border: 1px solid #fec9a8;
  border-radius: 8px;
  color: #8a3b12;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
  margin: 0 0 16px;
  padding: 12px 14px;
}

.aohige-form-error {
  margin: 18px 0 0;
}

.aohige-submit {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 850;
  margin-top: 18px;
  min-height: 56px;
  padding: 14px 18px;
  width: 100%;
}

.aohige-page .aohige-submit {
  background: #988CDB;
  color: #fff;
}

.aohige-page .aohige-submit:hover {
  background: #8578C9;
}

.aohige-submit[aria-busy="true"] {
  cursor: progress;
  opacity: 0.78;
}

.aohige-note {
  margin-top: 18px;
}

.aohige-note ul,
.aohige-tip-list {
  color: var(--aohige-ink);
  display: grid;
  gap: 10px;
  line-height: 1.75;
  margin: 14px 0 0;
  padding-left: 1.2em;
}

.aohige-result-hero {
  background: #ffffff;
  border-bottom: 1px solid var(--aohige-line);
  padding: 28px 0;
}

.aohige-result-photo {
  background: #e7edf1;
  border: 1px solid var(--aohige-line);
  border-radius: 8px;
  overflow: hidden;
}

.aohige-result-photo img,
.aohige-result-photo__empty {
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  width: 100%;
}

.aohige-result-photo__empty {
  align-items: center;
  color: var(--aohige-muted);
  display: flex;
  font-weight: 800;
  justify-content: center;
}

.aohige-result-summary {
  min-width: 0;
}

.aohige-score-ring {
  align-items: center;
  background:
    radial-gradient(circle at center, #ffffff 0 60%, transparent 61%),
    conic-gradient(var(--aohige-teal) var(--score-pct), #e4ebf0 0);
  border-radius: 50%;
  display: inline-grid;
  height: 132px;
  justify-items: center;
  margin-bottom: 18px;
  place-content: center;
  width: 132px;
}

.aohige-score-ring__value {
  color: var(--aohige-ink);
  font-size: 40px;
  font-weight: 950;
  line-height: 1;
}

.aohige-score-ring__label {
  color: var(--aohige-muted);
  font-size: 13px;
  font-weight: 800;
}

.aohige-result-band {
  color: var(--aohige-teal);
  font-size: 17px;
  font-weight: 850;
  margin: 12px 0 0;
}

.aohige-result-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
}

.aohige-result-card + .aohige-result-card,
.aohige-result-card {
  margin-top: 18px;
}

.aohige-result-grid .aohige-result-card {
  margin-top: 0;
}

.aohige-result-grid .aohige-pr-area {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.aohige-result-score-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin: 10px auto 20px;
}

.aohige-result-photo-circle {
  align-items: center;
  background: #e7edf1;
  border-radius: 50%;
  display: flex;
  height: 132px;
  justify-content: center;
  overflow: hidden;
  width: 132px;
}

.aohige-result-photo-circle img {
  display: block;
  height: 132px;
  object-fit: cover;
  width: 132px;
}

.aohige-result-comment {
  margin-inline: auto;
  max-width: 560px;
}

.aohige-legacy-section {
  background: #fff;
  border: 1px solid var(--aohige-line);
  border-radius: 8px;
  margin: 24px auto;
  max-width: 620px;
  padding: 20px;
  text-align: left;
}

.aohige-legacy-section h2 {
  color: var(--aohige-ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.4;
  margin: 0 0 14px;
  text-align: center;
}

.aohige-section-note {
  color: var(--aohige-muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 14px;
  text-align: center;
}

.aohige-metrics {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.aohige-metric__head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.aohige-metric__head span {
  color: var(--aohige-ink);
  font-size: 15px;
  font-weight: 850;
}

.aohige-metric__head b {
  color: var(--aohige-teal);
  font-size: 20px;
  font-weight: 950;
}

.aohige-meter {
  background: #e8eef2;
  border-radius: 999px;
  height: 10px;
  margin-top: 8px;
  overflow: hidden;
}

.aohige-meter span {
  background: linear-gradient(90deg, var(--aohige-amber), var(--aohige-teal));
  border-radius: inherit;
  display: block;
  height: 100%;
  width: var(--pct);
}

.aohige-metric p {
  color: var(--aohige-muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 8px 0 0;
}

.aohige-pr-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.aohige-pr-card {
  background: #ffffff;
  border: 1px solid var(--aohige-line);
  border-left: 5px solid var(--aohige-teal);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 16px;
  text-decoration: none;
}

.aohige-pr-card:hover {
  border-left-color: var(--aohige-blue);
  box-shadow: 0 10px 26px rgba(23, 32, 42, 0.09);
  transform: translateY(-1px);
}

.aohige-pr-card span {
  color: var(--aohige-amber);
  font-size: 12px;
  font-weight: 850;
}

.aohige-pr-card b {
  color: var(--aohige-ink);
  font-size: 17px;
  line-height: 1.35;
}

.aohige-pr-card small {
  color: var(--aohige-muted);
  font-size: 13px;
  line-height: 1.65;
}

.aohige-pr-card em {
  color: var(--aohige-blue);
  font-size: 14px;
  font-style: normal;
  font-weight: 850;
}

.aohige-route-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.aohige-route {
  align-items: flex-start;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px 1fr;
}

.aohige-route span {
  align-items: center;
  background: #e7f5f3;
  border-radius: 999px;
  color: var(--aohige-teal);
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.aohige-route h3 {
  color: var(--aohige-ink);
  font-size: 17px;
  font-weight: 850;
  margin: 0;
}

.aohige-route p {
  color: var(--aohige-muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 5px 0 0;
}

.aohige-safety {
  border-color: #f0d8b5;
}

.aohige-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}

.aohige-secondary-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--aohige-line);
  border-radius: 8px;
  color: var(--aohige-ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  text-decoration: none;
}

@media (max-width: 820px) {
  .aohige-hero__grid,
  .aohige-result-hero__grid,
  .aohige-form,
  .aohige-result-grid {
    grid-template-columns: 1fr;
  }

  .aohige-visual {
    min-height: 240px;
  }

  .aohige-options,
  .aohige-options--compact {
    grid-template-columns: 1fr;
  }

  .aohige-hero h1,
  .aohige-result-summary h1 {
    font-size: 30px;
  }

  .aohige-panel,
  .aohige-result-card,
  .aohige-note {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .aohige-container {
    padding: 0 14px;
  }

  .aohige-hero,
  .aohige-result-hero {
    padding: 24px 0;
  }

  .aohige-lead,
  .aohige-result-copy {
    font-size: 15px;
  }

  .aohige-score-ring {
    height: 118px;
    width: 118px;
  }

  .aohige-score-ring__value {
    font-size: 36px;
  }
}

@media (max-width: 390px) {
  .aohige-options:not(.aohige-options--long),
  .aohige-options--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
