.pmpd-app {
  color-scheme: light;
  --ink: #241f2b;
  --muted: #675d6f;
  --line: #eadfec;
  --surface: #fffafc;
  --surface-strong: #ffffff;
  --shadow: 0 22px 60px rgba(58, 39, 78, 0.15);
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(240, 108, 155, 0.16), rgba(47, 191, 143, 0.1)),
    #fff7fb;
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Yu Gothic",
    sans-serif;
}

.pmpd-app,
.pmpd-app * {
  box-sizing: border-box;
}

.pmpd-app button,
.pmpd-app a {
  font: inherit;
}

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

.pmpd-app .app-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.pmpd-app .diagnosis-panel,
.pmpd-app .result-section {
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.pmpd-app .diagnosis-panel {
  padding: clamp(20px, 4vw, 42px);
}

.pmpd-app .intro {
  max-width: 1040px;
  margin: 0 auto 24px;
  text-align: center;
}

.pmpd-app .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.pmpd-app .hero-image {
  display: block;
  width: 100%;
  margin: 0 auto 18px;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(58, 39, 78, 0.18);
}

.pmpd-app .lead {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.3vw, 1.18rem);
  line-height: 1.85;
}

.pmpd-app .diagnosis-grid {
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(260px, 1fr);
  gap: 26px;
  align-items: center;
}

.pmpd-app .hand-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
}

.pmpd-app .hand-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.pmpd-app .choice-panel {
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.pmpd-app .choice-title {
  margin-bottom: 16px;
  font-size: 1.16rem;
  font-weight: 800;
}

.pmpd-app .choice-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 12px;
}

.pmpd-app .choice-button {
  min-height: 68px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(45, 34, 58, 0.08);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.pmpd-app .choice-button:hover,
.pmpd-app .choice-button:focus-visible {
  border-color: var(--button-color);
  box-shadow: 0 16px 30px rgba(45, 34, 58, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.pmpd-app .choice-button.is-selected {
  border-color: var(--button-color);
  background: color-mix(in srgb, var(--button-color), white 84%);
}

.pmpd-app .result-section {
  margin-top: 20px;
  padding: clamp(18px, 4vw, 34px);
}

.pmpd-app .result-section[hidden] {
  display: none;
}

.pmpd-app .result-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 5vw, 38px);
  border: 2px solid color-mix(in srgb, var(--result-color), white 42%);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
    var(--result-color);
}

.pmpd-app .result-label {
  margin-bottom: 8px;
  color: color-mix(in srgb, var(--result-color), #241f2b 34%);
  font-weight: 800;
}

.pmpd-app .result-image {
  display: block;
  width: min(100%, 520px);
  margin: 0 auto 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(24, 18, 40, 0.18);
}

.pmpd-app .result-image[hidden] {
  display: none;
}

.pmpd-app .result-card h2 {
  margin-bottom: 10px;
  font-size: clamp(1.52rem, 4vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.pmpd-app .result-subtitle {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.7;
}

.pmpd-app .result-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.pmpd-app .result-body p,
.pmpd-app .result-body li,
.pmpd-app .action-note {
  line-height: 1.8;
}

.pmpd-app .result-body p {
  margin-bottom: 0;
}

.pmpd-app .result-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
}

.pmpd-app .detail-teaser {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.pmpd-app .detail-title {
  margin-bottom: 8px;
  font-weight: 800;
}

.pmpd-app .result-code {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.pmpd-app .result-code span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.pmpd-app .result-code strong {
  font-size: 1.12rem;
}

.pmpd-app .action-panel,
.pmpd-app .share-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.pmpd-app .primary-action,
.pmpd-app .secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.pmpd-app .primary-action {
  min-width: min(100%, 280px);
  padding: 0 22px;
  background: #06c755;
  color: #ffffff;
}

.pmpd-app .secondary-action {
  margin-left: 8px;
  padding: 0 18px;
  border: 1px solid #cfc5d5;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.pmpd-app .action-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.pmpd-app .share-title {
  margin-bottom: 6px;
  font-size: 1.08rem;
  font-weight: 900;
}

.pmpd-app .share-lead {
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.pmpd-app .share-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pmpd-app .share-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #d8cde0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.pmpd-app .share-action[hidden] {
  display: none;
}

.pmpd-app .share-native {
  background: #241f2b;
  color: #ffffff;
}

.pmpd-app .share-x {
  background: #111111;
  color: #ffffff;
}

.pmpd-app .share-line {
  background: #06c755;
  color: #ffffff;
}

.pmpd-app .share-copy {
  background: #fff8e7;
}

@media (max-width: 820px) {
  .pmpd-app .app-shell {
    width: min(100% - 18px, 680px);
    padding-top: 10px;
  }

  .pmpd-app .diagnosis-panel,
  .pmpd-app .result-section {
    border-radius: 14px;
  }

  .pmpd-app .diagnosis-grid,
  .pmpd-app .result-body {
    grid-template-columns: 1fr;
  }

  .pmpd-app .choice-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pmpd-app .choice-button {
    min-height: 58px;
    border-radius: 12px;
  }

  .pmpd-app .result-image {
    width: 100%;
    margin-bottom: 16px;
  }

  .pmpd-app .primary-action,
  .pmpd-app .secondary-action,
  .pmpd-app .share-action {
    width: 100%;
  }

  .pmpd-app .secondary-action {
    margin: 10px 0 0;
  }

  .pmpd-app .share-actions {
    grid-template-columns: 1fr;
  }
}
