﻿:root {
  --color-bg: #f6f8fa;
  --color-surface: #ffffff;
  --color-text: #1f2933;
  --color-muted: #64707d;
  --color-line: #d8e0e8;
  --color-primary: #1f6f8b;
  --color-primary-dark: #185a72;
  --color-primary-soft: #e7f2f6;
  --color-accent: #2f8f83;
  --color-warning: #a64521;
  --shadow-card: 0 12px 32px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

button,
input {
  font: inherit;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.25;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.45;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  line-height: 1.5;
  letter-spacing: 0;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  padding: 28px 16px;
  place-items: center;
}

.auth-card {
  width: min(100%, 520px);
  padding: clamp(26px, 6vw, 42px);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-form label {
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--color-text);
}

.auth-error {
  min-height: 1.6em;
  margin-bottom: 0;
  color: var(--color-warning);
  font-weight: 700;
}

.page-shell {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 48px 0 96px;
}

.page-header {
  margin-bottom: 24px;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.eyebrow,
.section-label,
.step-label {
  margin-bottom: 8px;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.lead {
  margin-bottom: 16px;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.header-description {
  margin-bottom: 10px;
  color: var(--color-muted);
  font-size: 1rem;
  font-weight: 400;
}

.recommendation {
  display: inline-flex;
  margin: 8px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 700;
}

.section {
  margin-top: 24px;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading--with-action {
  display: flex;
  max-width: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading--with-action h2 {
  margin-bottom: 0;
}

.section-heading__action {
  flex: 0 0 auto;
  margin-top: 4px;
}

.compact-section p:last-child,
.section-heading p:last-child,
.page-header p:last-child {
  margin-bottom: 0;
}

.quick-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.quick-guide p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: #fbfcfd;
}

.quick-guide strong {
  color: var(--color-muted);
  font-size: 0.92rem;
}

.quick-guide span {
  color: var(--color-primary-dark);
  font-weight: 700;
  text-align: right;
}

.prompt-list {
  display: grid;
  gap: 16px;
}

.prompt-card {
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: #fbfcfd;
}

.prompt-card__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.prompt-card__number {
  flex: 0 0 auto;
  display: inline-grid;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 700;
  place-items: center;
}

.prompt-card__copy {
  flex: 0 0 auto;
}

.prompt-card__body {
  margin-left: 56px;
}

.prompt-card__fit {
  margin: 10px 0 10px;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.prompt-card__tendency {
  margin: 0 0 18px;
  padding: 10px 12px;
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  background: #eef8f5;
  color: #285d56;
  font-size: 0.94rem;
  font-weight: 700;
}

.prompt-details {
  margin-top: 18px;
  border-top: 1px solid var(--color-line);
}

.prompt-details summary {
  min-height: 46px;
  padding: 14px 0 0;
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 700;
}

.prompt-fulltext {
  max-height: 520px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 16px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.progress {
  padding: 18px 20px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: #fbfcfd;
}

.first-progress {
  margin-bottom: 18px;
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--color-muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.progress__track {
  height: 10px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8edf2;
}

.progress__bar {
  width: 25%;
  height: 100%;
  border-radius: 8px;
  background: var(--color-primary);
  transition: width 180ms ease;
}

.guide-step-card {
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: #fbfcfd;
}

.guide-step-card.is-active {
  animation: fadeIn 160ms ease-out;
}

.guide-step-card__body {
  max-width: 760px;
}

.note {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.instruction-figure {
  width: min(100%, 700px);
  margin: 22px 0 18px;
}

.instruction-figure a {
  display: block;
}

.instruction-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: #ffffff;
}

.instruction-figure figcaption {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.actions--wrap {
  flex-wrap: wrap;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.plain-list {
  margin: 0;
  padding-left: 1.3em;
  color: var(--color-muted);
}

.plain-list li + li {
  margin-top: 8px;
}

.notice-box {
  margin-top: 28px;
  padding: clamp(18px, 4vw, 24px);
  border: 1px solid #bfd7d2;
  border-radius: 8px;
  background: #f2faf8;
}

.notice-box h3 {
  margin-bottom: 10px;
}

.notice-list {
  margin: 0;
  padding-left: 1.3em;
  color: var(--color-text);
}

.notice-list li + li {
  margin-top: 10px;
}

.button {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.4;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.button--primary {
  background: var(--color-primary);
  color: #ffffff;
}

.button--primary:hover {
  background: var(--color-primary-dark);
}

.button--secondary {
  border-color: var(--color-primary);
  background: var(--color-surface);
  color: var(--color-primary);
}

.button--secondary:hover {
  background: var(--color-primary-soft);
}

.button--light {
  border-color: var(--color-line);
  background: #f8fafc;
  color: var(--color-text);
}

.button--light:hover {
  background: #eef3f7;
}

.button:focus-visible,
input:focus-visible,
.prompt-details summary:focus-visible {
  outline: 3px solid rgba(31, 111, 139, 0.28);
  outline-offset: 3px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--color-text);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(31, 41, 51, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .quick-guide,
  .two-column {
    grid-template-columns: 1fr;
  }

  .progress__meta,
  .actions {
    flex-direction: column;
  }

  .progress__meta {
    gap: 4px;
  }

  .prompt-card__header {
    display: grid;
    grid-template-columns: 38px 1fr;
  }

  .prompt-card__copy {
    grid-column: 1 / -1;
    width: 100%;
  }

  .prompt-card__body {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 920px);
    padding-top: 28px;
  }

  .auth-card,
  .page-header,
  .section,
  .prompt-card,
  .guide-step-card {
    padding: 20px;
  }

  .quick-guide p {
    display: block;
  }

  .quick-guide span {
    display: block;
    margin-top: 4px;
    text-align: left;
  }

  .button {
    width: 100%;
  }
}
