:root {
  --ink: #1f2937;
  --ink-soft: #667085;
  --paper: #f5f4ef;
  --paper-deep: #ebeae4;
  --white: #ffffff;
  --lime: #f4c84a;
  --coral: #f97316;
  --purple: #0f766e;
  --purple-soft: #e6f3ef;
  --mint: #eef7f3;
  --line: rgba(31, 41, 55, 0.16);
  --shadow: 0 10px 26px rgba(31, 41, 55, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--purple);
  color: var(--white);
  font-family: inherit;
  font-weight: 900;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.privacy-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ca45c;
  box-shadow: 0 0 0 4px rgba(60, 164, 92, 0.13);
}

.hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 56px;
  position: relative;
}

.hero::after {
  display: none;
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 6.5vw, 78px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.hero h1 em {
  color: var(--purple);
  font-style: normal;
}

.hero-copy {
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.primary-button {
  min-width: 210px;
  padding: 15px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--purple);
  color: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 800;
}

.primary-button:hover {
  transform: translateY(-2px);
}

.hero-note {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.workspace {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 64px;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.section-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2,
.result-intro h2,
.how-it-works h2 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.section-heading > p {
  max-width: 380px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.section-number {
  margin: 0;
  min-width: 38px;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
}

.option-editor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.option-card {
  position: relative;
}

.title-field {
  max-width: 520px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 2px 10px;
}

.title-field > span {
  font-size: 13px;
  font-weight: 900;
}

.title-field > small {
  color: var(--ink-soft);
  font-size: 11px;
}

.title-field input {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  outline: none;
}

.title-field input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.sample-note {
  margin: -8px 0 18px;
  color: var(--ink-soft);
  font-size: 11px;
}

.option-label {
  margin: 0 0 5px 2px;
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.option-card input,
.criterion-name {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  outline: none;
}

.option-card input {
  padding: 14px 42px 14px 14px;
  font-weight: 800;
}

.option-card > .icon-button {
  top: auto;
  bottom: 0;
  width: 44px;
  height: 54px;
  line-height: 1;
  transform: none;
}

.option-card input:focus,
.criterion-name:focus,
select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(108, 99, 232, 0.13);
}

.icon-button {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.icon-button:hover {
  background: var(--paper-deep);
}

.text-button {
  margin-top: 14px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.text-button:hover {
  color: var(--coral);
}

.criteria-heading {
  margin-top: 56px;
}

.criteria-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.criteria-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.criteria-table th,
.criteria-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.criteria-table th {
  background: var(--purple-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.criteria-table th:first-child,
.criteria-table td:first-child {
  width: 30%;
  text-align: left;
}

.criteria-table tr:last-child td {
  border-bottom: 0;
}

.criterion-field {
  position: relative;
}

.criterion-name {
  padding: 12px 38px 12px 12px;
  background: var(--white);
  font-weight: 700;
}

.criterion-field .icon-button {
  right: 3px;
}

select {
  min-width: 122px;
  padding: 10px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}

.weight-cell {
  background: rgba(239, 237, 255, 0.55);
}

.results-panel {
  margin-top: 56px;
  padding: clamp(24px, 4vw, 46px);
  border-radius: 10px;
  background: #27313f;
  color: var(--white);
}

.result-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.result-intro h2 {
  color: var(--white);
}

.result-intro > p:last-child {
  flex-basis: 100%;
  max-width: 420px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.section-number.light {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.result-kicker {
  margin: 0;
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.result-list {
  margin-top: 36px;
  display: grid;
  gap: 18px;
}

.result-row {
  display: grid;
  grid-template-columns: minmax(90px, 170px) 1fr 62px;
  align-items: center;
  gap: 16px;
}

.result-name {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 280ms ease;
}

.result-score {
  font-family: inherit;
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}

.winner-card {
  margin-top: 34px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(255, 227, 122, 0.46);
  border-radius: 7px;
  background: rgba(255, 227, 122, 0.1);
}

.winner-card small {
  display: block;
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.winner-card strong {
  font-family: inherit;
  font-size: 26px;
  font-weight: 900;
}

.winner-badge {
  min-width: 72px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.result-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-export-settings {
  margin-top: 28px;
  display: grid;
  grid-template-columns: max-content minmax(230px, 360px);
  align-items: center;
  gap: 8px 14px;
}

.image-export-settings label {
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.image-export-settings select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.image-export-settings small {
  grid-column: 2;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.6;
}

.light-button,
.outline-button,
.quiet-button {
  padding: 13px 17px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.light-button {
  border: 1px solid var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.outline-button {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: transparent;
  color: var(--white);
}

.quiet-button {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
}

.action-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--lime);
  font-size: 12px;
}

.how-it-works {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.how-it-works ol {
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
}

.how-it-works li {
  min-height: 118px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.how-it-works li span {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--purple-soft);
  color: var(--purple);
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
}

.how-it-works li strong {
  font-size: 17px;
}

.how-it-works li small {
  color: var(--ink-soft);
}

footer {
  padding: 28px max(20px, calc((100% - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 28px);
    height: 56px;
  }

  .privacy-chip {
    padding: 7px 9px;
    font-size: 10px;
  }

  .hero {
    width: calc(100% - 32px);
    padding: 42px 0 40px;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 52px);
    line-height: 1.12;
  }

  .hero-copy br {
    display: none;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
  }

  .primary-button {
    width: 100%;
  }

  .option-editor {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section-heading > div {
    align-items: center;
  }

  .section-heading h2,
  .result-intro h2,
  .how-it-works h2 {
    font-size: 25px;
  }

  .criteria-heading {
    margin-top: 46px;
  }

  .criteria-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .criteria-table {
    min-width: 0;
    display: block;
  }

  .criteria-table thead {
    display: none;
  }

  .criteria-table tbody {
    display: grid;
    gap: 14px;
  }

  .criteria-table tr {
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
  }

  .criteria-table td,
  .criteria-table td:first-child {
    width: auto;
    padding: 12px;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .criteria-table td:first-child {
    background: var(--purple-soft);
  }

  .criteria-table td:not(:first-child) {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .criteria-table td::before {
    content: attr(data-label);
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
  }

  .criteria-table tr:last-child td {
    border-bottom: 1px solid var(--line);
  }

  .criteria-table select {
    width: 156px;
    min-width: 156px;
    font-size: 13px;
  }

  .weight-cell {
    background: var(--mint);
  }

  .results-panel {
    margin: 46px -10px 0;
    border-radius: 8px;
  }

  .result-row {
    grid-template-columns: 90px 1fr 44px;
    gap: 9px;
  }

  .result-score {
    font-size: 20px;
  }

  .winner-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .how-it-works ol {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .how-it-works li {
    min-height: 0;
    display: grid;
    grid-template-columns: 38px 1fr;
    column-gap: 12px;
    align-items: center;
  }

  .how-it-works li span {
    grid-row: 1 / 3;
    margin: 0;
  }

  .how-it-works li strong,
  .how-it-works li small {
    grid-column: 2;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-actions > button {
    width: 100%;
    min-height: 48px;
  }

  .image-export-settings {
    grid-template-columns: 1fr;
  }

  .image-export-settings small {
    grid-column: 1;
  }

  footer {
    flex-direction: column;
  }
}

@media print {
  .site-header,
  .hero,
  .option-editor,
  .text-button,
  .criteria-table-wrap,
  .section-heading,
  .result-actions,
  .how-it-works,
  footer {
    display: none !important;
  }

  body,
  .workspace {
    background: white;
  }

  .workspace {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}


.site-footer {
  margin-top: 0;
  padding: 40px max(20px, calc((100% - 1180px) / 2));
  display: block;
  border-top: 0;
  background: #17353b;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.footer-inner {
  display: grid;
  gap: 24px;
}

.footer-top,
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-links a:focus-visible {
  border-radius: 3px;
  outline: 2px solid #f3c84b;
  outline-offset: 4px;
}

.footer-notice {
  max-width: 820px;
  margin: 0;
  padding-left: 13px;
  border-left: 3px solid #f3c84b;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
}

.footer-meta {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}

@media (max-width: 720px) {
  .site-footer {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .footer-top,
  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    display: grid;
    gap: 12px;
  }
}
