
:root {
  --canvas: #fbf3e8;
  --paper: #fffdf8;
  --ink: #3b2b25;
  --ink-strong: #241a17;
  --muted: #75675f;
  --terracotta: #ef6f51;
  --terracotta-dark: #d9593e;
  --coral: #f48d74;
  --sage: #7fa58c;
  --sage-pale: #e6e8dd;
  --butter: #f3d36b;
  --border: #d9cdbd;
  --shadow: 0 18px 48px rgba(59, 43, 37, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 4%, rgba(255, 255, 255, 0.75), transparent 26rem),
    radial-gradient(circle at 93% 11%, rgba(217, 108, 82, 0.08), transparent 24rem),
    var(--canvas);
  color: var(--ink);
  font-family:
    ui-rounded, "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Meiryo", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

main {
  overflow: hidden;
}

.site-header {
  width: min(1296px, calc(100% - 72px));
  margin: 0 auto;
  padding: 34px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(59, 43, 37, 0.2);
}

.project-mark {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.project-mark span,
.eyebrow {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.project-mark strong {
  min-width: 54px;
  padding: 7px 10px 6px;
  border-radius: 999px;
  background: var(--butter);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
}

.quiet-button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  padding: 8px 0;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.quiet-button:hover {
  border-color: currentColor;
  color: var(--ink);
}

.hero {
  position: relative;
  width: min(1296px, calc(100% - 72px));
  margin: 0 auto;
  padding: 72px 0 116px;
}

.pop-decor {
  position: absolute;
  top: 62px;
  right: 1%;
  width: 170px;
  height: 122px;
  pointer-events: none;
}

.pop-decor span {
  position: absolute;
  display: block;
}

.pop-decor span:nth-child(1) {
  top: 0;
  right: 18px;
  width: 70px;
  height: 70px;
  border: 13px solid var(--butter);
  border-radius: 50%;
}

.pop-decor span:nth-child(2) {
  right: 98px;
  bottom: 5px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--coral);
  transform: rotate(15deg);
}

.pop-decor span:nth-child(3) {
  right: 0;
  bottom: 0;
  width: 64px;
  height: 18px;
  border-radius: 999px;
  background: var(--sage);
  transform: rotate(-12deg);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 26px;
  color: var(--sage);
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  color: var(--ink-strong);
  font-size: clamp(4.35rem, 7.2vw, 7.1rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.075em;
}

.hero-lead {
  margin: 35px 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 600;
  line-height: 2;
  letter-spacing: 0.035em;
}

.calculator-layout {
  margin-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
}

.calculator-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.62);
  box-shadow: 0 12px 40px rgba(59, 43, 37, 0.055);
}

.calculator-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 12px;
  border-radius: 0 28px 0 12px;
  background: linear-gradient(90deg, var(--butter) 0 48%, var(--coral) 48% 73%, var(--sage) 73%);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 38px;
}

.section-title > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--paper);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 700;
}

.section-title p,
.section-title small {
  margin: 0;
}

.section-title p {
  font-size: 1.12rem;
  font-weight: 800;
}

.section-title small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

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

.field {
  display: block;
  min-width: 0;
}

.field > span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-width: 0;
  height: 78px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  background: var(--paper);
  color: var(--ink-strong);
  padding: 0 20px;
  font-size: clamp(1.2rem, 2.2vw, 1.72rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.field input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(240, 138, 114, 0.22);
}

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  padding-right: 52px;
}

.input-with-unit b {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
}

.form-action {
  margin-top: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.money-rule {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9e8c80;
  font-family: Georgia, serif;
}

.money-rule::before,
.money-rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.primary-button {
  min-width: 300px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
  border: 0;
  border-radius: 16px;
  background: var(--terracotta);
  color: white;
  padding: 0 28px 0 34px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(217, 108, 82, 0.22);
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.primary-button span {
  font-size: 1.7rem;
  font-weight: 400;
  transition: transform 180ms ease;
}

.primary-button:hover {
  background: var(--terracotta-dark);
  transform: translateY(-1px);
  box-shadow: 0 13px 30px rgba(217, 108, 82, 0.28);
}

.primary-button:hover span {
  transform: translateX(4px);
}

.primary-button:active {
  transform: scale(0.99);
}

.primary-button:focus-visible,
.share-button:focus-visible,
.quiet-button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.receipt {
  position: relative;
  min-height: 570px;
  padding: 54px 48px 42px;
  border: 1px solid var(--border);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(0.35deg);
  animation: receipt-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.receipt::before,
.receipt::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: -1px;
  width: calc(100% + 2px);
  height: 16px;
  background:
    radial-gradient(circle at 8px 0, transparent 7px, var(--paper) 7.7px) 0 0 /
      16px 16px repeat-x;
}

.receipt::before {
  top: -1px;
  transform: rotate(180deg);
}

.receipt::after {
  bottom: -1px;
}

.receipt-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.receipt-icon {
  display: grid;
  width: 48px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--butter);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.receipt-heading p,
.receipt-heading small {
  margin: 0;
}

.receipt-heading p {
  font-size: 1.18rem;
  font-weight: 850;
}

.receipt-heading small {
  display: block;
  max-width: 230px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-line {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px dashed #ad9c90;
}

.receipt-line span {
  font-size: 0.94rem;
  font-weight: 800;
}

.receipt-line strong {
  color: var(--ink-strong);
  font-family: Georgia, "Noto Serif JP", serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.receipt-line.major {
  min-height: 145px;
}

.receipt-line.major strong {
  font-size: clamp(3rem, 5.4vw, 5.2rem);
}

.status-stamp {
  margin-top: 28px;
  border: 2px dashed var(--sage);
  border-radius: 20px;
  background: var(--sage-pale);
  padding: 20px 22px;
  text-align: center;
}

.status-stamp strong {
  display: block;
  font-size: clamp(1.18rem, 2.4vw, 1.7rem);
  font-weight: 900;
  line-height: 1.35;
}

.status-stamp p {
  margin: 8px 0 0;
  color: #596052;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.65;
}

.receipt.good .status-stamp {
  border-color: var(--sage);
  background: #e1eadc;
}

.receipt.close .status-stamp {
  border-color: #c08c4e;
  background: #faedbb;
}

.receipt.review .status-stamp {
  border-color: var(--terracotta);
  background: #f9ded5;
}

.receipt.neutral .status-stamp,
.receipt.waiting .status-stamp {
  border-color: #a99c92;
  background: #eee8e2;
}

.share-button {
  width: 100%;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff8ea;
  padding: 13px 18px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.reading-section {
  width: min(1296px, calc(100% - 72px));
  margin: 0 auto;
  padding: 116px 0;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(48px, 8vw, 130px);
  border-top: 1px solid rgba(59, 43, 37, 0.2);
}

.reading-intro h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.reading-intro > p:last-child {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 2;
}

.reading-grid {
  display: grid;
  gap: 0;
}

.reading-grid article {
  display: grid;
  grid-template-columns: 46px minmax(130px, 0.7fr) 1.3fr;
  align-items: start;
  gap: 18px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
}

.reading-grid article:last-child {
  border-bottom: 1px solid var(--border);
}

.reading-grid span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  background: var(--butter);
  font-family: ui-monospace, monospace;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
}

.reading-grid h3,
.reading-grid p {
  margin: 0;
}

.reading-grid h3 {
  font-size: 1.1rem;
}

.reading-grid p {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.85;
}

.decision-section {
  padding: 132px 36px;
  background: var(--ink-strong);
  color: var(--paper);
  text-align: center;
}

.decision-section .eyebrow {
  color: #b8c1ad;
}

.decision-section blockquote {
  margin: 0 auto;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.055em;
}

.decision-section > p:last-child {
  max-width: 680px;
  margin: 36px auto 0;
  color: #d8cec7;
  font-size: 1rem;
  font-weight: 600;
  line-height: 2;
}

footer {
  width: min(1296px, calc(100% - 72px));
  margin: 0 auto;
  padding: 34px 0 46px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.8;
}

footer p {
  margin: 0;
}

footer p:first-child {
  font-family: ui-monospace, monospace;
  font-weight: 800;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

@keyframes receipt-in {
  from {
    opacity: 0.65;
    transform: translateY(8px) rotate(0.35deg) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0.35deg) scale(1);
  }
}

@media (max-width: 1060px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .receipt {
    width: min(620px, 100%);
    justify-self: center;
  }

  .reading-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header,
  .hero,
  .reading-section,
  footer {
    width: min(100% - 32px, 620px);
  }

  .site-header {
    padding: 22px 0 18px;
  }

  .project-mark {
    gap: 8px;
  }

  .project-mark span {
    font-size: 0.62rem;
  }

  .project-mark strong {
    font-size: 1.32rem;
  }

  .quiet-button {
    font-size: 0.82rem;
  }

  .hero {
    padding: 52px 0 78px;
  }

  .eyebrow {
    margin-bottom: 18px;
    font-size: 0.65rem;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(3.25rem, 16vw, 5.05rem);
    line-height: 1.02;
    letter-spacing: -0.085em;
  }

  .hero-lead {
    margin-top: 25px;
    font-size: 0.93rem;
    line-height: 1.95;
  }

  .desktop-break {
    display: none;
  }

  .calculator-layout {
    margin-top: 44px;
    gap: 44px;
  }

  .calculator-card {
    padding: 26px 20px 24px;
    border-radius: 22px;
  }

  .section-title {
    margin-bottom: 30px;
  }

  .section-title p {
    font-size: 1rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .field input {
    height: 72px;
    padding: 0 18px;
    font-size: 1.45rem;
  }

  .input-with-unit input {
    padding-right: 48px;
  }

  .input-with-unit b {
    right: 18px;
  }

  .form-action {
    margin-top: 28px;
  }

  .money-rule {
    display: none;
  }

  .primary-button {
    width: 100%;
    min-width: 0;
    height: 72px;
  }

  .receipt {
    min-height: 0;
    padding: 42px 22px 32px;
    scroll-margin-top: 18px;
    transform: none;
  }

  .pop-decor {
    top: 32px;
    right: -44px;
    transform: scale(0.68);
  }

  .receipt-line {
    min-height: 100px;
  }

  .receipt-line.major {
    min-height: 128px;
  }

  .receipt-line strong {
    font-size: clamp(2rem, 11vw, 3.15rem);
  }

  .receipt-line.major strong {
    font-size: clamp(2.8rem, 16vw, 4.45rem);
  }

  .status-stamp {
    padding: 18px 15px;
  }

  .reading-section {
    padding: 82px 0;
    gap: 40px;
  }

  .reading-intro h2 {
    font-size: 3.1rem;
  }

  .reading-grid article {
    grid-template-columns: 32px 1fr;
    gap: 12px 14px;
    padding: 25px 0;
  }

  .reading-grid article p {
    grid-column: 2;
  }

  .decision-section {
    padding: 92px 22px;
  }

  .decision-section blockquote {
    font-size: clamp(2.4rem, 11vw, 3.7rem);
  }

  footer {
    padding: 28px 0 38px;
    flex-direction: column;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
