:root {
  color-scheme: light;
  --ink: #111827;
  --muted: rgba(17, 24, 39, 0.68);
  --card: #ffffff;
  --border: rgba(17, 24, 39, 0.14);
  --border-strong: rgba(17, 24, 39, 0.28);
  --shadow: 0 1px 0 rgba(17, 24, 39, 0.04);

  --state-have-bg: rgba(34, 197, 94, 0.16);
  --state-have-border: rgba(34, 197, 94, 0.42);
  --state-have-dot: rgba(34, 197, 94, 0.92);

  --state-need-bg: rgba(239, 68, 68, 0.16);
  --state-need-border: rgba(239, 68, 68, 0.42);
  --state-need-dot: rgba(239, 68, 68, 0.92);
  --state-need-text: rgb(127, 29, 29);

  --state-skip-bg: rgba(107, 114, 128, 0.18);
  --state-skip-border: rgba(107, 114, 128, 0.48);
  --state-skip-dot: rgba(107, 114, 128, 0.88);

  --group-border: rgba(17, 24, 39, 0.16);
  --group-bg: rgba(17, 24, 39, 0.02);
  --group-chip: rgba(17, 24, 39, 0.75);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  letter-spacing: 0;
  font-size: clamp(17px, 0.5vw + 15px, 18px);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(17, 24, 39, 0.35);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: rgba(17, 24, 39, 0.85);
}

.container {
  width: min(960px, 92vw);
  margin: 0 auto;
}

.site-header {
  padding: 22px 0 12px;
  border-bottom: 1px solid var(--border);
}

.site-title {
  display: inline-flex;
  align-items: center;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  color: var(--ink);
}

.site-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.site-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.scenario-hero {
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.scenario-title-main {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  line-height: 1.2;
}

.scenario-sub {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.progress-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.progress-sticky .container {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.progress-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.progress-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.92rem;
}

.progress-label {
  color: var(--muted);
  letter-spacing: 0.01em;
}

.progress-value {
  font-weight: 700;
  color: rgba(17, 24, 39, 0.92);
}

.progress-value.progress-done {
  color: var(--state-have-dot);
}

.progress-value.progress-unchecked {
  color: rgba(107, 114, 128, 0.9);
}

.progress-value.progress-need {
  color: var(--state-need-text);
}

.progress-track {
  grid-column: 1 / 2;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--state-have-dot);
  transition: width 0.2s ease;
}

.progress-clear {
  grid-column: 2 / 3;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: rgba(17, 24, 39, 0.92);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.progress-clear:hover {
  border-color: rgba(17, 24, 39, 0.45);
  background: rgba(17, 24, 39, 0.03);
}

.scenario-list {
  padding: 24px 0 40px;
}

.scenario-catch {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.need-section {
  padding: 8px 0 48px;
}

.need-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.need-title {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}

.need-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.need-text {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  height: calc(1.6em * 5 + 24px);
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
  overflow: auto;
  background: #fff;
  color: var(--ink);
}

.need-copy {
  border: 1px solid var(--border);
  background: #fff;
  color: rgba(17, 24, 39, 0.92);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.need-copy:hover {
  border-color: rgba(17, 24, 39, 0.45);
  background: rgba(17, 24, 39, 0.03);
}


.scenario-list h2 {
  font-size: 1.25rem;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

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

.scenario-grid.category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scenario-group {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--group-border);
  background: var(--group-bg);
}

.scenario-group-title {
  margin: 0 0 12px;
  font-size: 1.02rem;
  color: rgba(17, 24, 39, 0.84);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.scenario-group-title::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 1px;
  background: var(--group-chip);
}

.scenario-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: background-color 0.12s ease, border-color 0.12s ease;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.scenario-card:hover {
  background: rgba(17, 24, 39, 0.02);
  border-color: rgba(17, 24, 39, 0.28);
}

.scenario-title {
  font-weight: 650;
  font-size: 1.05rem;
  margin: 0;
}

.category-section {
  padding-bottom: 40px;
}

.category-block {
  margin-bottom: 28px;
}

.category-title {
  margin: 22px 0 12px;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  position: relative;
  padding-left: 14px;
  color: rgba(17, 24, 39, 0.92);
}

.category-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 3px;
  height: 1em;
  border-radius: 2px;
  background: var(--ink);
}

.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.item {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 14px 14px;
  position: relative;
  overflow: hidden;
  box-shadow: none;
  transition: border-color 0.12s ease, background-color 0.12s ease, opacity 0.12s ease;
}

.item:hover {
  border-color: rgba(17, 24, 39, 0.28);
}

.item.is-need {
  border-color: var(--state-need-border);
  background: rgba(239, 68, 68, 0.06);
}

.item.is-have {
  border-color: var(--state-have-border);
  background: rgba(34, 197, 94, 0.06);
}

.item.is-skip {
  opacity: 0.72;
  border-color: rgba(107, 114, 128, 0.30);
  background: rgba(107, 114, 128, 0.05);
}

.item.is-skip .item-title {
  text-decoration: line-through;
}

.item-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.item-title {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-name {
  font-weight: 700;
  font-size: 1.5rem;
}

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

.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
  align-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  width: min(100%, 360px);
  min-width: min(100%, 260px);
  margin-left: auto;
}

.segment-option {
  position: relative;
  display: flex;
  flex: 1 1 calc((100% - 16px) / 3);
  min-width: 86px;
}

.segment-option:hover .segment-label {
  border-color: rgba(17, 24, 39, 0.55);
}

.segment-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.segment-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  width: 100%;
  padding: 10px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  color: rgba(17, 24, 39, 0.88);
  font-size: 0.94rem;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.segment-text {
  white-space: nowrap;
}

.segment-check {
  display: none;
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 900;
}

.segment-option input:focus-visible + .segment-label {
  outline: 2px solid rgba(17, 24, 39, 0.55);
  outline-offset: 2px;
}

.segment-option input:checked + .segment-label {
  color: rgba(17, 24, 39, 0.92);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06);
}

.segment-option input:checked + .segment-label .segment-check {
  display: inline-block;
}

.segment-option input[value="have"]:checked + .segment-label {
  border-color: var(--state-have-border);
  background: rgba(34, 197, 94, 0.17);
}

.segment-option input[value="need"]:checked + .segment-label {
  border-color: var(--state-need-border);
  background: rgba(239, 68, 68, 0.17);
}

.segment-option input[value="skip"]:checked + .segment-label {
  border-color: var(--state-skip-border);
  background: rgba(107, 114, 128, 0.16);
}

.item-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-link-row {
  margin-top: 10px;
  display: none;
  text-align: center;
}

.item.is-need .item-link-row {
  display: block;
  animation: cta-pop 180ms ease-out;
}

.item-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(360px, 100%);
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.35);
  width: fit-content;
  font-size: 1.02rem;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.92);
  background: rgba(17, 24, 39, 0.02);
  text-decoration: none;
}

.item.is-need .item-link {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.20);
  color: var(--state-need-text);
}

.item-link:hover {
  border-color: rgba(17, 24, 39, 0.70);
  background: rgba(17, 24, 39, 0.05);
}

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

.site-footer {
  padding: 24px 0 48px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  text-decoration: none;
  background: #fff;
  color: rgba(17, 24, 39, 0.9);
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.footer-link:hover {
  border-color: rgba(17, 24, 39, 0.45);
  background: rgba(17, 24, 39, 0.03);
}

*:focus-visible {
  outline: 2px solid rgba(17, 24, 39, 0.55);
  outline-offset: 2px;
}

@keyframes cta-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .item-row {
    align-items: center;
  }

  .item-title {
    flex-basis: 100%;
    align-items: center;
    text-align: center;
  }

  .item-memo {
    text-align: center;
  }

  .item-actions {
    width: 100%;
    min-width: 0;
  }

  .footer-nav {
    justify-content: center;
  }
}

@media (min-width: 720px) {
  .item-row {
    flex-wrap: nowrap;
  }
}

body.print .filters,
body.print .site-footer,
body.print .site-header,
body.print .progress-sticky,
body.print .item-link-row {
  display: none;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .filters,
  .site-footer,
  .site-header {
    display: none !important;
  }

  .item {
    border: 1px solid #ccc;
    box-shadow: none;
    background: #fff;
  }

  .site-header {
    background: #fff !important;
    border-bottom: 1px solid #ccc;
  }

  .scenario-sub {
    color: #333;
  }
}