:root {
  color-scheme: light;
  --ink: #1f2f2b;
  --muted: #64746f;
  --line: #d8e4dd;
  --paper: #ffffff;
  --bg: #f4fbf7;
  --mint: #ccefe5;
  --mint-dark: #08786d;
  --coral: #ff7e6f;
  --yellow: #ffd86a;
  --blue: #91b9ff;
  --pink: #ffb7c5;
  --shadow: 0 18px 46px rgba(27, 64, 56, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(8, 120, 109, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 120, 109, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  line-height: 1.8;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  overflow: hidden;
}

.ask-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(12px, 2vw, 22px);
  min-height: 100svh;
  padding: clamp(20px, 3.6vw, 40px) clamp(16px, 4vw, 48px) 16px;
}

.stage-copy {
  position: relative;
  z-index: 3;
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
}

.site-label,
.section-label,
.answer-category {
  margin: 0;
  color: var(--mint-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.title-logo {
  position: relative;
  width: min(760px, 100%);
  margin: -4px auto 12px;
  line-height: 1;
  letter-spacing: 0;
}

.title-graphic {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.title-lettering text {
  font-family: inherit;
  font-weight: 950;
  letter-spacing: 0;
  paint-order: stroke fill;
  stroke: var(--paper);
  stroke-linejoin: round;
  text-anchor: middle;
}

.title-top {
  fill: var(--coral);
  font-size: 79px;
  stroke-width: 12px;
}

.title-bottom {
  fill: var(--mint-dark);
  font-size: 106px;
  stroke-width: 14px;
}

.title-shadow {
  fill: #f6c95b;
  opacity: 0.86;
  stroke: #f6c95b;
}

.title-deco ellipse {
  fill: #fff3bc;
  stroke: rgba(8, 120, 109, 0.18);
  stroke-width: 3px;
}

.title-deco path {
  fill: #fff3bc;
  stroke: rgba(8, 120, 109, 0.18);
  stroke-linejoin: round;
  stroke-width: 3px;
}

.title-deco-right ellipse,
.title-deco-right path {
  fill: #ffd9df;
}

.title-deco text {
  fill: var(--mint-dark);
  font-family: inherit;
  font-size: 42px;
  font-weight: 950;
  paint-order: stroke fill;
  stroke: var(--paper);
  stroke-linejoin: round;
  stroke-width: 7px;
  text-anchor: middle;
}

.title-spark {
  fill: #ffd86a;
  opacity: 0.95;
  stroke: var(--paper);
  stroke-linejoin: round;
  stroke-width: 5px;
}

.title-spark-b {
  fill: var(--blue);
}

.title-underline {
  fill: none;
  stroke: #ffd86a;
  stroke-linecap: round;
  stroke-width: 13px;
}

.lead {
  width: min(620px, 100%);
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(0.96rem, 2vw, 1.12rem);
}

.orbit-area {
  position: relative;
  width: min(1120px, 100%);
  min-height: clamp(420px, 54svh, 580px);
  margin: 0 auto;
}

.doctor-center {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 49%;
  width: clamp(178px, 21vw, 252px);
  transform: translate(-50%, -50%);
  text-align: center;
}

.photo-ring {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: clamp(8px, 1.4vw, 13px);
  border: 2px solid rgba(8, 120, 109, 0.18);
  border-radius: 999px;
  background: conic-gradient(from 12deg, var(--yellow), var(--mint), var(--blue), var(--pink), var(--yellow));
  box-shadow: var(--shadow);
}

.photo-ring::after {
  position: absolute;
  right: 9%;
  bottom: 10%;
  display: grid;
  width: clamp(42px, 6vw, 58px);
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
  color: var(--paper);
  content: "?";
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(255, 126, 111, 0.26);
}

.photo-ring img {
  display: block;
  width: 100%;
  height: 100%;
  border: 8px solid var(--paper);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.doctor-center p {
  display: inline-block;
  margin: 12px 0 0;
  padding: 4px 12px;
  border: 1px solid rgba(8, 120, 109, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--mint-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.bubble-field {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.bubble-node {
  position: absolute;
  left: var(--left);
  top: var(--top);
  width: clamp(144px, 19vw, 214px);
  transform: translate(-50%, -50%) rotate(var(--tilt));
  animation: floaty var(--duration) ease-in-out var(--delay) infinite alternate;
}

.question-bubble {
  position: relative;
  display: grid;
  min-height: 76px;
  width: 100%;
  place-items: center;
  border: 2px solid rgba(31, 47, 43, 0.08);
  border-radius: 52% 48% 49% 51% / 48% 54% 46% 52%;
  background: var(--tone);
  box-shadow: 0 14px 26px rgba(41, 75, 68, 0.13);
  color: var(--ink);
  font-size: clamp(0.88rem, 1.55vw, 1.02rem);
  font-weight: 850;
  line-height: 1.45;
  padding: 14px 18px 16px;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.question-bubble::after {
  position: absolute;
  right: 12px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  border-right: 2px solid rgba(31, 47, 43, 0.08);
  border-bottom: 2px solid rgba(31, 47, 43, 0.08);
  background: inherit;
  content: "";
  transform: rotate(35deg);
}

.question-bubble:hover,
.question-bubble:focus-visible,
.bubble-node.is-active .question-bubble {
  border-color: rgba(8, 120, 109, 0.34);
  box-shadow: 0 18px 32px rgba(8, 120, 109, 0.18);
  transform: translateY(-3px) scale(1.04);
  outline: none;
}

.question-bubble small {
  display: block;
  color: rgba(31, 47, 43, 0.58);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
}

.shuffle-button {
  position: absolute;
  z-index: 5;
  right: clamp(4px, 2vw, 18px);
  bottom: clamp(4px, 2vw, 18px);
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--mint-dark);
  color: var(--paper);
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 16px 26px rgba(8, 120, 109, 0.25);
}

.shuffle-button:hover,
.shuffle-button:focus-visible {
  background: #055e56;
  outline: 3px solid rgba(255, 216, 106, 0.7);
}

.request-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 1fr);
  gap: clamp(22px, 5vw, 58px);
  width: min(1040px, calc(100% - 32px));
  margin: 10px auto 0;
  padding: clamp(34px, 6vw, 68px) 0;
  border-top: 1px solid var(--line);
}

.request-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.24;
}

.request-copy p:last-child {
  color: var(--muted);
}

.question-form {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(27, 64, 56, 0.08);
}

.question-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.question-form label span {
  font-size: 0.9rem;
}

.question-form textarea,
.question-form input {
  width: 100%;
  border: 1px solid #cbdad3;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.question-form textarea:focus,
.question-form input:focus {
  border-color: var(--mint-dark);
  box-shadow: 0 0 0 4px rgba(8, 120, 109, 0.12);
}

.question-form button {
  justify-self: start;
  border: 0;
  border-radius: 8px;
  background: var(--coral);
  color: var(--paper);
  font-weight: 900;
  padding: 11px 22px;
  box-shadow: 0 12px 20px rgba(255, 126, 111, 0.22);
}

.question-form button:hover,
.question-form button:focus-visible {
  background: #ef6657;
  outline: 3px solid rgba(255, 216, 106, 0.72);
}

.form-status {
  min-height: 1.8em;
  margin: 0;
  color: var(--mint-dark);
  font-weight: 800;
}

.notice-section {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto clamp(28px, 5vw, 52px);
  padding: 16px 18px;
  border: 1px solid #ead69b;
  border-radius: 8px;
  background: #fff8df;
  color: #6b5520;
  font-size: 0.92rem;
}

.notice-section p {
  margin: 0;
}

.answer-panel {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 20px;
}

.answer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(23, 38, 34, 0.34);
}

.answer-card {
  position: relative;
  width: min(680px, 100%);
  max-height: min(76svh, 640px);
  overflow: auto;
  border: 1px solid rgba(8, 120, 109, 0.14);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(16, 38, 33, 0.28);
  padding: clamp(22px, 4vw, 34px);
  transform: translateY(14px);
  animation: answerIn 180ms ease forwards;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #eef8f4;
  color: var(--mint-dark);
  font-size: 1.4rem;
  font-weight: 700;
}

.close-button:hover,
.close-button:focus-visible {
  background: var(--mint);
  outline: 3px solid rgba(255, 216, 106, 0.7);
}

.answer-card h2 {
  margin: 8px 42px 14px 0;
  font-size: clamp(1.28rem, 3vw, 1.9rem);
  line-height: 1.38;
}

.answer-card p:last-child {
  margin-bottom: 0;
  color: #354640;
}

[hidden] {
  display: none !important;
}

@keyframes floaty {
  0% {
    transform: translate(-50%, -50%) translate3d(-3px, 4px, 0) rotate(var(--tilt));
  }
  50% {
    transform: translate(-50%, -50%) translate3d(4px, -7px, 0) rotate(calc(var(--tilt) * -0.35));
  }
  100% {
    transform: translate(-50%, -50%) translate3d(2px, 5px, 0) rotate(var(--tilt));
  }
}

@keyframes answerIn {
  to {
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .ask-stage {
    min-height: 830px;
  }

  .orbit-area {
    min-height: 620px;
  }

  .doctor-center {
    top: 48%;
    width: clamp(178px, 49vw, 222px);
  }

  .doctor-center p {
    display: none;
  }

  .bubble-node {
    width: clamp(128px, 39vw, 168px);
  }

  .question-bubble {
    min-height: 64px;
    padding: 12px 13px 14px;
    font-size: 0.84rem;
  }

  .request-section {
    grid-template-columns: 1fr;
  }

  .answer-panel {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .ask-stage {
    min-height: 800px;
    padding-inline: 12px;
  }

  .stage-copy {
    text-align: left;
  }

  .lead {
    margin-left: 0;
  }

  .orbit-area {
    width: calc(100% + 8px);
    margin-left: -4px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
