:root {
  --canvas: #f7f4ec;
  --surface: #fffdf8;
  --surface-muted: #f0ece2;
  --sage: #dde5d8;
  --sage-soft: #eef2eb;
  --sage-line: #aab8a4;
  --blush: #ebd3ca;
  --blush-deep: #c98e79;
  --terracotta: #b8735d;
  --terracotta-hover: #a96551;
  --terracotta-focus: #8e5544;
  --charcoal: #303431;
  --soft-text: #5e625d;
  --hairline: #d9d4c8;
  --white: #ffffff;
  --taboo: #f4d7cc;
  --repeat: #e4e9d9;
  --punctuation: #e6dfef;
  --shadow: 0 24px 64px rgb(71 61 53 / 10%);
  --serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--charcoal);
  background: var(--canvas);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--charcoal);
  border-radius: 4px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 76px;
  margin-inline: auto;
  border-bottom: 1px solid rgb(170 184 164 / 48%);
}

.brand {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  text-decoration: none;
}

.shop-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid var(--charcoal);
}

.shop-link span {
  font-size: 15px;
  transition: transform 180ms ease;
}

.shop-link:hover span {
  transform: translate(2px, -2px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 24px 122px;
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border: 1px solid rgb(170 184 164 / 36%);
  border-radius: 50%;
}

.hero::before {
  width: 650px;
  height: 650px;
  top: -430px;
  left: -220px;
}

.hero::after {
  width: 720px;
  height: 720px;
  right: -480px;
  bottom: -420px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  margin-inline: auto;
  text-align: center;
}

.privacy-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
  padding: 7px 15px;
  color: #556052;
  background: var(--sage-soft);
  border: 1px solid rgb(170 184 164 / 48%);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.privacy-badge span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--surface);
  background: #81917c;
  border-radius: 50%;
  font-size: 10px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

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

h1 {
  max-width: none;
  margin-inline: auto;
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.28;
  white-space: nowrap;
}

.title-part {
  display: inline;
}

.hero__lead {
  margin: 0;
  color: var(--soft-text);
  font-family: var(--serif);
  font-size: clamp(15px, 2vw, 18px);
  letter-spacing: 0.06em;
  line-height: 2;
}

.checker-stage {
  position: relative;
  width: min(780px, calc(100% - 32px));
  margin: 72px auto 0;
}

.paper-back {
  position: absolute;
  border-radius: 2px;
}

.paper-back--sage {
  z-index: -2;
  top: -21px;
  right: -33px;
  width: 88%;
  height: 94%;
  background: var(--sage);
  transform: rotate(2.7deg);
}

.paper-back--blush {
  z-index: -1;
  bottom: -27px;
  left: -37px;
  width: 91%;
  height: 83%;
  background: #ebd3ca;
  transform: rotate(-2.4deg);
}

.checker-card {
  position: relative;
  padding: clamp(28px, 5vw, 52px);
  text-align: left;
  background: var(--surface);
  border: 1px solid rgb(217 212 200 / 82%);
  border-radius: 3px;
  box-shadow: var(--shadow);
}

.checker-card::before,
.checker-card::after {
  position: absolute;
  width: 32px;
  height: 1px;
  content: "";
  background: var(--sage-line);
}

.checker-card::before {
  top: 18px;
  left: 18px;
}

.checker-card::after {
  right: 18px;
  bottom: 18px;
}

.checker-card__heading,
.result-text-panel__head {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 7px;
  color: #758272;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.5;
}

.checker-card h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 29px);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.45;
}

.text-button,
.copy-button {
  flex: none;
  padding: 5px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.text-button:hover,
.copy-button:hover {
  border-color: var(--charcoal);
}

.input-label {
  display: block;
  margin: 32px 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

textarea {
  display: block;
  width: 100%;
  min-height: 216px;
  padding: 20px 22px;
  resize: vertical;
  color: var(--charcoal);
  background: #fbfaf6;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  outline: none;
  line-height: 1.9;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea::placeholder {
  color: #a19f97;
}

textarea:focus {
  background: var(--white);
  border-color: var(--sage-line);
  box-shadow: 0 0 0 3px rgb(170 184 164 / 18%);
}

.input-meta {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 9px;
  color: #7b7d78;
  font-size: 11px;
  line-height: 1.6;
}

.input-meta p {
  margin: 0;
}

.input-meta p:last-child {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.validation-message {
  min-height: 1.5em;
  margin: 7px 0 0;
  color: #9a4c3f;
  font-size: 12px;
  font-weight: 600;
}

.form-actions {
  display: flex;
  gap: 14px;
  align-items: stretch;
  justify-content: flex-end;
  margin-top: 18px;
}

.check-button,
.clear-button {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 13px 24px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.check-button {
  color: var(--white);
  background: var(--terracotta);
}

.check-button:hover {
  background: var(--terracotta-hover);
  transform: translateY(-1px);
}

.check-button:focus-visible {
  outline: 3px solid rgb(142 85 68 / 30%);
  outline-offset: 3px;
}

.check-button span {
  font-size: 18px;
  font-weight: 400;
}

.clear-button {
  color: var(--soft-text);
  background: transparent;
  border: 1px solid var(--hairline);
}

.clear-button:hover:not(:disabled) {
  background: var(--surface-muted);
}

.clear-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.section-inner {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.section-inner--narrow {
  width: min(850px, calc(100% - 48px));
}

.results {
  padding: 100px 0 112px;
  background: var(--surface);
  outline: none;
}

.result-heading {
  max-width: 710px;
  margin-bottom: 42px;
}

.result-heading h2,
.guide > .section-inner > h2,
.shop-cta h2,
.notes h2 {
  margin-bottom: 13px;
  font-family: var(--serif);
  font-size: clamp(28px, 4.5vw, 43px);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.result-heading > p:not(.eyebrow, .result-summary),
.guide__lead,
.shop-cta > p:not(.eyebrow) {
  margin: 0;
  color: var(--soft-text);
}

.result-summary {
  display: inline-block;
  margin: 21px 0 0;
  padding: 7px 12px;
  color: #6b554c;
  background: #f5e5df;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
}

.results[data-state="clear"] .result-summary {
  color: #52604f;
  background: var(--sage-soft);
}

.result-text-panel {
  padding: clamp(24px, 5vw, 42px);
  background: #f8f6f0;
  border: 1px solid var(--hairline);
}

.result-text-panel h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.copy-status {
  min-height: 1.5em;
  margin: 4px 0 0;
  color: #697466;
  font-size: 11px;
  text-align: right;
}

.highlighted-text {
  min-height: 120px;
  margin-top: 14px;
  padding: 22px;
  white-space: pre-wrap;
  background: var(--white);
  border: 1px solid #e5e1d8;
  font-size: 15px;
  line-height: 2.1;
}

.highlight {
  padding: 2px 1px;
  color: inherit;
  border-bottom: 2px solid;
  border-radius: 1px;
}

.highlight--taboo {
  background: var(--taboo);
  border-color: #c98168;
}

.highlight--repeat {
  background: var(--repeat);
  border-color: #8ca17f;
}

.highlight--punctuation {
  background: var(--punctuation);
  border-color: #9b83b1;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 16px;
  color: var(--soft-text);
  font-size: 11px;
}

.legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.legend__color {
  display: inline-block;
  width: 15px;
  height: 7px;
  border-radius: 999px;
}

.legend__color--taboo {
  background: #d69a86;
}

.legend__color--repeat {
  background: #9cad91;
}

.legend__color--punctuation {
  background: #a995bb;
}

.issue-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.issue-card {
  position: relative;
  padding: 28px 30px 27px 33px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--terracotta);
}

.issue-card--review {
  border-left-color: #8ea183;
}

.issue-card__heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.issue-card__term {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}

.issue-card__badges {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.tag--taboo {
  background: var(--taboo);
}

.tag--repeat {
  background: var(--repeat);
}

.tag--punctuation {
  background: var(--punctuation);
}

.tag--attention {
  color: #8a4838;
  background: transparent;
  border: 1px solid #d9a795;
}

.tag--review {
  color: #586652;
  background: transparent;
  border: 1px solid #a9b7a2;
}

.issue-card__reason {
  margin: 13px 0 17px;
  color: var(--soft-text);
  font-size: 13px;
  line-height: 1.8;
}

.issue-card__suggestion-label {
  margin: 0 0 7px;
  color: #7b7c77;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.suggestion-list li {
  padding: 5px 10px;
  color: #596256;
  background: var(--sage-soft);
  border-radius: 2px;
  font-size: 12px;
}

.issue-card__count {
  position: absolute;
  right: 28px;
  bottom: 25px;
  margin: 0;
  color: #96958f;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.no-issues {
  margin: 0;
  padding: 24px 28px;
  color: #546252;
  background: var(--sage-soft);
  border-left: 4px solid #899a83;
  font-family: var(--serif);
  font-size: 16px;
}

.shop-cta {
  position: relative;
  margin-top: 72px;
  padding: clamp(35px, 7vw, 66px);
  overflow: hidden;
  background: var(--blush);
}

.shop-cta::after {
  position: absolute;
  width: 260px;
  height: 260px;
  right: -150px;
  bottom: -170px;
  content: "";
  border: 1px solid rgb(184 115 93 / 40%);
  border-radius: 50%;
}

.shop-cta h2 {
  max-width: 630px;
  font-size: clamp(26px, 4vw, 38px);
}

.shop-cta > p:not(.eyebrow) {
  max-width: 630px;
  color: #655c58;
}

.shop-cta__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: center;
  margin-top: 29px;
}

.secondary-link {
  padding: 7px 0;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--charcoal);
}

.guide {
  padding: 115px 0 125px;
}

.guide > .section-inner > h2,
.guide > .section-inner > .eyebrow,
.guide__lead {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.guide__lead {
  line-height: 2;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
}

.guide-card {
  min-height: 310px;
  padding: 33px 30px 34px;
  background: var(--surface);
  border-top: 3px solid var(--sage-line);
}

.guide-card:nth-child(2) {
  border-top-color: var(--terracotta);
}

.guide-card:nth-child(3) {
  border-top-color: #aa96b7;
}

.guide-card__number {
  color: #9a9d94;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.guide-card h3 {
  margin: 30px 0 15px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.guide-card p {
  margin: 0;
  color: var(--soft-text);
  font-size: 13px;
  line-height: 1.9;
}

.notes {
  padding: 100px 0 108px;
  background: var(--surface);
}

.notes h2 {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--hairline);
  font-size: 33px;
}

.note-list {
  margin-top: 30px;
  border-top: 1px solid var(--hairline);
}

details {
  border-bottom: 1px solid var(--hairline);
}

summary {
  position: relative;
  padding: 22px 48px 22px 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  position: absolute;
  top: 50%;
  right: 8px;
  content: "+";
  color: #7b8378;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 300;
  transform: translateY(-50%);
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: -4px 0 23px;
  padding-right: 48px;
  color: var(--soft-text);
  font-size: 13px;
}

.sources {
  margin-top: 58px;
  padding: 28px 30px;
  background: #f8f6f0;
}

.sources h3 {
  margin-bottom: 9px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.sources p,
.sources ul {
  color: var(--soft-text);
  font-size: 12px;
}

.sources p {
  margin: 0;
}

.sources ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 12px 0 0;
  padding-left: 18px;
}

.sources a {
  text-underline-offset: 3px;
}

.site-footer {
  padding: 72px 24px 38px;
  color: #f7f4ec;
  background: var(--charcoal);
  text-align: center;
}

.site-footer .brand {
  display: inline-block;
  margin-bottom: 16px;
}

.site-footer p {
  margin: 0;
  color: #c9cbc7;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.site-footer .copyright {
  margin-top: 44px;
  color: #959993;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.noscript {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: 16px;
  left: 16px;
  margin: 0;
  padding: 14px;
  color: var(--white);
  background: #8d4d40;
  text-align: center;
}

:focus-visible {
  outline: 3px solid rgb(142 85 68 / 38%);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .site-header {
    width: calc(100% - 32px);
    min-height: 66px;
  }

  .brand {
    font-size: 21px;
  }

  .shop-link {
    font-size: 11px;
  }

  .hero {
    padding: 54px 16px 90px;
  }

  .privacy-badge {
    margin-bottom: 20px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: clamp(32px, 9.8vw, 42px);
    letter-spacing: 0.045em;
    white-space: normal;
  }

  .title-part {
    display: block;
    white-space: nowrap;
  }

  .desktop-break {
    display: none;
  }

  .hero__lead {
    font-size: 14px;
  }

  .checker-stage {
    width: calc(100% - 12px);
    margin-top: 54px;
  }

  .paper-back--sage {
    top: -13px;
    right: -14px;
  }

  .paper-back--blush {
    bottom: -17px;
    left: -14px;
  }

  .checker-card {
    padding: 28px 20px 24px;
  }

  .checker-card__heading {
    display: block;
  }

  .text-button {
    margin-top: 12px;
  }

  .input-label {
    margin-top: 26px;
  }

  textarea {
    min-height: 230px;
    padding: 16px;
    font-size: 16px;
  }

  .input-meta {
    align-items: flex-start;
  }

  .input-meta p:first-child {
    max-width: 220px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .clear-button,
  .check-button {
    width: 100%;
  }

  .clear-button {
    min-height: 46px;
  }

  .section-inner,
  .section-inner--narrow {
    width: calc(100% - 32px);
  }

  .results {
    padding: 76px 0 82px;
  }

  .result-heading {
    margin-bottom: 32px;
  }

  .result-text-panel {
    padding: 23px 18px;
  }

  .highlighted-text {
    padding: 17px;
    font-size: 14px;
  }

  .issue-card {
    padding: 24px 19px 25px 21px;
  }

  .issue-card__heading {
    display: block;
  }

  .issue-card__badges {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .issue-card__count {
    position: static;
    margin-top: 14px;
    text-align: right;
  }

  .shop-cta {
    margin-top: 52px;
  }

  .shop-cta__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-cta__actions .check-button {
    width: 100%;
  }

  .secondary-link {
    align-self: center;
  }

  .guide {
    padding: 82px 0 88px;
  }

  .guide__lead {
    text-align: left;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 40px;
  }

  .guide-card {
    min-height: auto;
    padding: 27px 25px 28px;
  }

  .guide-card h3 {
    margin-top: 18px;
  }

  .notes {
    padding: 78px 0 82px;
  }

  details p {
    padding-right: 0;
  }

  .sources {
    padding: 24px 21px;
  }

  .sources ul {
    display: block;
  }

  .sources li + li {
    margin-top: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
