:root {
  --bg-cream: #f7f3ed;
  --bg-sage: #e8f1ee;
  --primary: #7bae9e;
  --accent: #f28c7a;
  --info: #8fbce6;
  --warn: #d77474;
  --text: #2f3e39;
  --muted: #6c7a75;
  --card: #ffffff;
  --shadow: 0 24px 70px rgba(52, 74, 64, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-cream), var(--bg-sage));
  min-height: 100vh;
}

.ambient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.65), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(123, 174, 158, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(242, 140, 122, 0.15), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.app-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-mark {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: white;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
  font-family: "IBM Plex Sans JP", sans-serif;
}

h1, h2, h3 {
  margin: 0 0 6px;
  font-family: "Zen Maru Gothic", sans-serif;
}

p {
  margin: 0;
  line-height: 1.6;
}

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

.view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hidden {
  display: none;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero h2 {
  font-size: 1.6rem;
}

.mode-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 20px 0;
}

.mode-card {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 18px;
  background: #f9fbfa;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mode-card[data-selected="true"] {
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(123, 174, 158, 0.25);
}

.mode-card:hover {
  transform: translateY(-2px);
}

.mode-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.mode-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.mode-desc {
  font-size: 0.95rem;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 12px 0 18px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  font-family: "IBM Plex Sans JP", sans-serif;
}

.btn.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 18px 40px rgba(242, 140, 122, 0.35);
}

.btn.secondary {
  background: var(--primary);
  color: white;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid #d4ded9;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.info-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.info-card {
  background: rgba(255, 255, 255, 0.7);
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(123, 174, 158, 0.2);
}

.progress {
  height: 8px;
  background: #eef2ef;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #a1c6ba);
  transition: width 0.25s ease;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
}

.section-tag {
  background: rgba(143, 188, 230, 0.25);
  color: #395c78;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.question-title {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.options {
  display: grid;
  gap: 12px;
}

.option-card {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid #e3e9e6;
  padding: 12px 16px;
  display: grid;
  gap: 6px;
  background: #fafcfb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-card input {
  position: absolute;
  opacity: 0;
}

.option-card .option-body {
  display: grid;
  gap: 4px;
}

.option-card input:checked + .option-body {
  border-radius: var(--radius-sm);
  background: rgba(123, 174, 158, 0.12);
  padding: 10px 12px;
  border: 1px solid rgba(123, 174, 158, 0.4);
}

.option-label {
  font-weight: 600;
}

.option-example {
  color: var(--muted);
  font-size: 0.85rem;
}

.hint {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.alert {
  background: rgba(215, 116, 116, 0.12);
  border: 1px solid rgba(215, 116, 116, 0.35);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  color: #7f3a3a;
}

.result-hero h2 {
  margin-bottom: 6px;
}

.result-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 18px;
}

.result-card {
  background: #f9fbfa;
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid rgba(123, 174, 158, 0.25);
  display: grid;
  gap: 10px;
}

.rank {
  font-weight: 700;
  color: var(--primary);
  font-family: "IBM Plex Sans JP", sans-serif;
}

.list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.checklist {
  background: rgba(143, 188, 230, 0.12);
  padding: 12px;
  border-radius: 12px;
}

.plan {
  display: grid;
  gap: 8px;
  background: #f9fbfa;
  padding: 16px;
  border-radius: var(--radius-sm);
}

.template {
  background: rgba(123, 174, 158, 0.12);
  padding: 14px;
  border-radius: 12px;
}

.share-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.input {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d6dfdb;
  font-family: "IBM Plex Sans JP", sans-serif;
}

.muted {
  color: var(--muted);
}

@media (max-width: 720px) {
  .app {
    padding: 24px 16px 48px;
  }
  .nav-row {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}
