:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-deep: #e9e2d5;
  --card: #fffdf8;
  --ink: #17181c;
  --muted: #646158;
  --line: #d9d1c4;
  --accent: #ff6138;
  --accent-dark: #c83718;
  --blue: #2459e8;
  --lime: #d8fb73;
  --warning: #9b341b;
  --danger: #c52a2a;
  --shadow: 0 22px 70px rgb(44 36 21 / 12%);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgb(23 24 28 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 24 28 / 3%) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

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

:focus-visible {
  outline: 3px solid #1671ff;
  outline-offset: 3px;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px 4px 10px 4px;
  background: var(--lime);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.header-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: 590px;
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
  grid-template-columns: minmax(0, 1fr) minmax(310px, 410px);
  padding: 64px 50px 96px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.eyebrow span {
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 6vw, 78px);
  font-weight: 920;
  letter-spacing: -0.065em;
  line-height: 1.04;
}

.hero h1 strong {
  position: relative;
  color: var(--accent-dark);
  font-weight: inherit;
  white-space: nowrap;
}

.hero h1 strong::after {
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 5px;
  left: -4px;
  height: 14px;
  background: var(--lime);
  content: "";
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  letter-spacing: -0.025em;
  line-height: 1.72;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 253 248 / 72%);
  color: #47443e;
  font-size: 13px;
  font-weight: 750;
}

.trust-list li::before {
  margin-right: 6px;
  color: var(--accent-dark);
  content: "✓";
}

.receipt {
  position: relative;
  padding: 34px 32px 40px;
  border: 1px solid #d7cdbd;
  background: #fffdf7;
  box-shadow: 12px 14px 0 var(--ink), var(--shadow);
  transform: rotate(2.3deg);
}

.receipt::before,
.receipt::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 12px;
  background: linear-gradient(135deg, transparent 8px, #fffdf7 0) 0 0 / 16px 16px repeat-x,
    linear-gradient(45deg, #fffdf7 8px, transparent 0) 0 0 / 16px 16px repeat-x;
  content: "";
}

.receipt::before {
  top: -11px;
}

.receipt::after {
  bottom: -11px;
  transform: rotate(180deg);
}

.receipt-head,
.receipt-item,
.receipt-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.receipt-head {
  margin-bottom: 36px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.receipt-item {
  margin: 13px 0;
  font-size: 15px;
}

.receipt-item strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.receipt-item.muted {
  color: #6e695f;
}

.receipt-divider {
  margin: 25px 0;
  border-top: 2px dashed #aca498;
}

.receipt-total {
  align-items: flex-end;
}

.receipt-total span {
  font-size: 13px;
  font-weight: 750;
}

.receipt-total strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(28px, 3.2vw, 39px);
  letter-spacing: -0.06em;
}

.receipt > p {
  margin: 28px 0 0;
  padding: 15px;
  border-radius: 10px;
  background: var(--lime);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
  text-align: center;
}

.calculator-section {
  margin-bottom: 100px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-xl);
  background: #1c1d22;
  box-shadow: 0 24px 80px rgb(20 18 15 / 20%);
  color: #fff;
}

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

.section-heading h2,
.explain-section h2,
.notice-section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.section-heading > div > p:last-child {
  margin: 12px 0 0;
  color: #aaa9a4;
  font-size: 15px;
}

.section-heading > div > p strong {
  color: #fff;
}

.secondary-button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #52545d;
  border-radius: 13px;
  background: #292a30;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.secondary-button:hover {
  border-color: #8d8f98;
  background: #32343b;
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 720px);
}

.product-grid.has-comparison {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--ink);
}

.comparison-card {
  box-shadow: inset 0 0 0 2px #6988ee;
}

.card-heading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.product-label {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 14px 5px 14px 5px;
  background: var(--lime);
  font-weight: 950;
}

.product-label.alternate {
  background: #dce5ff;
  color: #153ca8;
}

.card-heading h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.card-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: #efebe3;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.product-form,
.coupon-fields {
  display: grid;
  gap: 18px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  min-width: 0;
}

.full-field {
  grid-column: 1 / -1;
}

.field label {
  display: flex;
  min-height: 21px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.field label span {
  color: #8a857c;
  font-size: 11px;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  height: 52px;
  border: 1px solid #d7d1c8;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 720;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field input {
  padding: 0 16px;
}

.field select {
  padding: 0 42px 0 16px;
}

.field input::placeholder {
  color: #b0aba2;
  font-weight: 550;
}

.field input:focus,
.field select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgb(23 24 28 / 10%);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgb(197 42 42 / 10%);
}

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

.input-with-unit input {
  padding-right: 46px;
  text-align: right;
}

.input-with-unit > span {
  position: absolute;
  top: 50%;
  right: 15px;
  color: #7f796f;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  transform: translateY(-50%);
}

.field-error {
  min-height: 0;
  margin: 6px 2px 0;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.field-error:empty {
  display: none;
}

.coupon-box {
  overflow: clip;
  border: 1px solid #ded8ce;
  border-radius: 15px;
  background: #f7f3eb;
}

.coupon-box summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
}

.coupon-box summary::-webkit-details-marker {
  display: none;
}

.coupon-box summary > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.coupon-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px 3px 8px 3px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}

.summary-hint {
  color: #777168;
  font-size: 11px;
}

.summary-hint::after {
  display: inline-block;
  margin-left: 8px;
  content: "⌄";
  transition: transform 160ms ease;
}

.coupon-box[open] .summary-hint::after {
  transform: rotate(180deg);
}

.coupon-content {
  padding: 0 16px 18px;
  border-top: 1px dashed #d8d0c4;
}

.coupon-content > .field {
  padding-top: 16px;
}

.coupon-fields {
  margin-top: 16px;
}

.percent-only {
  grid-column: 1 / -1;
}

.primary-button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 850;
  transition: transform 130ms ease, background 130ms ease;
}

.primary-button:hover {
  background: #313238;
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(1px);
}

.alternate-button {
  background: var(--blue);
}

.alternate-button:hover {
  background: #1647cf;
}

.result-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid #d2caba;
  border-radius: 18px;
  background: #f1ecdf;
}

.result-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.result-topline p {
  margin: 0;
  color: #5c574e;
  font-size: 12px;
  font-weight: 800;
}

.discount-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #dff2be;
  color: #2e5b12;
  font-size: 10px;
  font-weight: 900;
}

.discount-badge.warning {
  background: #f7d7ce;
  color: var(--warning);
}

.discount-badge.neutral {
  background: #e4e0d9;
  color: #565149;
}

.unit-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 8px 0 22px;
}

.unit-price strong {
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 920;
  letter-spacing: -0.07em;
}

.unit-price span {
  color: #777168;
  font-size: 13px;
  font-weight: 750;
}

.result-breakdown {
  margin: 0;
}

.result-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  color: #676158;
  font-size: 13px;
}

.result-breakdown dt,
.result-breakdown dd {
  margin: 0;
}

.result-breakdown dd {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.result-breakdown .result-total {
  margin: 8px 0;
  padding: 13px 0;
  border-top: 1px dashed #bdb4a6;
  border-bottom: 1px dashed #bdb4a6;
  color: var(--ink);
  font-weight: 850;
}

.result-breakdown .result-total dd {
  font-size: 17px;
}

.result-note {
  margin: 14px 0 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: #fff7dd;
  color: #725a13;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.copy-button {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border: 1px solid #bfb7aa;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.copy-button:hover {
  background: #fffaf0;
}

.comparison-result {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-top: 20px;
  padding: 25px;
  border-radius: 18px;
  background: var(--lime);
  color: var(--ink);
}

.comparison-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
  font-weight: 950;
}

.comparison-result .section-kicker {
  margin-bottom: 6px;
  color: #384a00;
}

.comparison-result h3 {
  margin: 0;
  font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: -0.045em;
}

.comparison-result p:last-child {
  margin: 8px 0 0;
  color: #465226;
  font-size: 13px;
  line-height: 1.65;
}

.calculator-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.text-button {
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #c9c7c2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.text-button:hover {
  background: #2b2d33;
  color: #fff;
}

.explain-section {
  display: grid;
  gap: clamp(50px, 8vw, 110px);
  grid-template-columns: minmax(240px, 0.8fr) minmax(420px, 1.2fr);
  padding: 40px 50px 110px;
}

.explain-copy > p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.formula-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.formula-list li {
  display: grid;
  gap: 20px;
  grid-template-columns: 42px 1fr;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}

.formula-list li > span {
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 850;
}

.formula-list strong {
  font-size: 17px;
  letter-spacing: -0.03em;
}

.formula-list p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.notice-section {
  margin-bottom: 100px;
  padding: clamp(28px, 5vw, 54px);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--ink);
}

.notice-section h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.notice-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.notice-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.notice-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 15px;
}

.site-footer {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  gap: 24px;
  grid-template-columns: 1fr auto;
  margin: 0 auto;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  font-size: 14px;
}

.footer-brand .brand-mark {
  width: 28px;
  height: 28px;
  border-width: 1px;
  border-radius: 8px 3px 8px 3px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 12px;
}

.site-footer > div > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.site-footer nav a,
.site-footer nav button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.site-footer nav a:hover,
.site-footer nav button:hover {
  color: var(--ink);
  text-decoration: underline;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  color: #8a857d;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 24px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 13px 17px;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 0 12px 40px rgb(0 0 0 / 25%);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  transform: translateX(-50%);
}

.clipboard-fallback {
  position: fixed;
  top: -1000px;
  left: -1000px;
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
    gap: 70px;
    grid-template-columns: 1fr;
    padding: 64px 28px 100px;
  }

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

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

  .product-grid.has-comparison {
    grid-template-columns: 1fr;
  }

  .explain-section {
    gap: 45px;
    grid-template-columns: 1fr;
    padding-right: 28px;
    padding-left: 28px;
  }

  .notice-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 68px;
  }

  .site-header {
    width: min(100% - 28px, 1180px);
    min-height: 68px;
  }

  .brand {
    font-size: 14px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px 3px 8px 3px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .header-cta {
    min-height: 40px;
    padding: 0 14px;
    font-size: 12px;
  }

  main {
    width: min(100% - 20px, 1240px);
  }

  .hero {
    gap: 54px;
    padding: 42px 10px 86px;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  .hero h1 strong::after {
    bottom: 2px;
    height: 10px;
  }

  .hero-lead {
    margin-top: 22px;
    font-size: 16px;
  }

  .trust-list {
    margin-top: 24px;
  }

  .trust-list li {
    padding: 8px 10px;
    font-size: 11px;
  }

  .receipt {
    width: calc(100% - 30px);
    padding: 28px 24px 34px;
    box-shadow: 8px 9px 0 var(--ink), var(--shadow);
    transform: rotate(1deg);
  }

  .receipt-total {
    display: block;
  }

  .receipt-total strong {
    display: block;
    margin-top: 6px;
    font-size: 33px;
    text-align: right;
  }

  .calculator-section {
    margin-bottom: 76px;
    padding: 24px 12px 20px;
    border-radius: 24px;
  }

  .section-heading {
    display: block;
    padding: 4px 8px 0;
  }

  .section-heading h2 {
    font-size: 31px;
  }

  .secondary-button {
    width: 100%;
    margin-top: 22px;
  }

  .product-card {
    padding: 22px 17px;
    border-radius: 18px;
  }

  .product-grid.has-comparison {
    gap: 12px;
  }

  .card-heading p {
    display: none;
  }

  .product-form,
  .coupon-fields {
    grid-template-columns: 1fr;
  }

  .field,
  .percent-only {
    grid-column: 1 / -1;
  }

  .field input,
  .field select {
    height: 54px;
    font-size: 16px;
  }

  .coupon-box summary {
    min-height: 56px;
  }

  .result-panel {
    padding: 20px 17px;
  }

  .result-topline {
    display: block;
  }

  .discount-badge {
    display: inline-block;
    margin-top: 8px;
  }

  .unit-price {
    margin-top: 6px;
  }

  .unit-price strong {
    font-size: 39px;
  }

  .comparison-result {
    display: block;
    padding: 22px 19px;
  }

  .comparison-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
  }

  .calculator-actions {
    justify-content: center;
  }

  .explain-section {
    padding: 10px 10px 78px;
  }

  .notice-section {
    margin: 0 2px 76px;
    padding: 28px 22px;
    border-radius: 24px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .notice-grid {
    gap: 23px;
  }

  .site-footer {
    display: block;
    width: min(100% - 40px, 1180px);
  }

  .site-footer nav {
    justify-content: flex-start;
    margin-top: 28px;
  }

  .copyright {
    margin-top: 28px;
  }
}

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

@media (prefers-contrast: more) {
  .field input,
  .field select,
  .coupon-box,
  .result-panel {
    border-color: var(--ink);
  }
}
