:root {
  --ink: #102535;
  --muted: #536878;
  --line: #dce6e5;
  --surface: #ffffff;
  --surface-soft: #f5faf8;
  --green: #087d64;
  --green-dark: #07654f;
  --mint: #daf4eb;
  --mint-deep: #b9ead9;
  --blue: #edf6fb;
  --orange: #fff3e7;
  --shadow: 0 16px 40px rgba(16, 37, 53, 0.07);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-icon {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.brand-name {
  color: var(--green);
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #3b515e;
  font-size: 0.96rem;
  font-weight: 650;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--green);
}

.hero {
  overflow: hidden;
  border-bottom: 1px solid #d7ece6;
  background:
    radial-gradient(circle at 90% 20%, rgba(181, 242, 220, 0.8), transparent 32%),
    linear-gradient(100deg, #f7fbfc 0%, #f6fbf8 60%, #e4f8ef 100%);
}

.hero-grid {
  min-height: 495px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 42px;
  padding: 66px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--green);
  font-size: 0.89rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

h1 {
  max-width: 590px;
  margin: 0 0 19px;
  font-size: clamp(2.55rem, 4.7vw, 3.45rem);
  letter-spacing: -0.085em;
  line-height: 1.2;
}

.lead {
  max-width: 590px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1.06rem;
  letter-spacing: -0.035em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--green-dark);
  font-weight: 700;
  transition: 0.2s ease;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

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

.trust-pills li {
  padding: 7px 13px;
  color: #345261;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e1ece9;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
}

.preview {
  padding: 28px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(219, 229, 227, 0.9);
  border-radius: 29px;
  box-shadow: var(--shadow);
}

.preview.showcase {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: none;
}

.showcase-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px) scale(0.99);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.showcase-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.showcase-link {
  display: block;
  width: 100%;
  height: 100%;
}

.showcase-link:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -5px;
}

.showcase-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  transform-origin: center center;
}

.showcase-slide:nth-of-type(1) img,
.showcase-slide:nth-of-type(2) img {
  transform: scale(1.075);
  transform-origin: center bottom;
}

.lotto-showcase {
  height: 100%;
  padding: clamp(28px, 6vw, 48px);
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 12%, rgba(250, 206, 96, 0.34), transparent 35%),
    linear-gradient(145deg, #ffffff 0%, #f6faf8 100%);
}

.lotto-showcase h3 {
  margin: 8px 0 8px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.055em;
}

.lotto-showcase p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.lotto-showcase-balls {
  display: flex;
  gap: 8px;
  margin: clamp(20px, 4vw, 34px) 0 28px;
}

.lotto-showcase-balls span {
  width: clamp(38px, 7.2vw, 50px);
  height: clamp(38px, 7.2vw, 50px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 760;
}

.lotto-showcase-balls span:nth-child(1),
.lotto-showcase-balls span:nth-child(2) {
  background: #e6a321;
}

.lotto-showcase-balls span:nth-child(4) {
  background: #d76456;
}

.lotto-showcase-balls span:nth-child(5) {
  background: #657686;
}

.lotto-showcase strong {
  color: var(--green);
}

.showcase-controls {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.showcase-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #b9ccc7;
  transition: width 0.25s ease, background 0.25s ease;
}

.showcase-dot.is-active {
  width: 23px;
  background: var(--green);
}

.showcase-dot:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .showcase-slide,
  .showcase-dot {
    transition: none;
  }
}

.notice {
  padding: 17px 0;
  color: #35564e;
  background: #e3f7ee;
  border-bottom: 1px solid #d1ece1;
  font-size: 0.93rem;
}

.notice strong {
  margin-right: 13px;
  color: var(--green-dark);
}

.section {
  padding: 72px 0;
}

.section.soft {
  background: var(--surface-soft);
}

.section-heading {
  max-width: 700px;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  margin-bottom: 9px;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  letter-spacing: -0.065em;
  line-height: 1.25;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.tool-intro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 35px;
}

.linked-tools {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 34px 0 0;
}

.tool-card {
  padding: 25px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.tool-card span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
}

.tool-card h3 {
  margin: 0 0 8px;
  font-size: 1.17rem;
  letter-spacing: -0.045em;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

a.tool-card {
  transition: border-color 0.2s ease, transform 0.2s ease;
}

a.tool-card:hover {
  border-color: var(--mint-deep);
  transform: translateY(-2px);
}

.tool-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--green);
  font-size: 0.89rem;
  font-weight: 700;
}

.calculator-box {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tabs {
  display: flex;
  padding: 8px;
  gap: 7px;
  background: #f5f9f8;
  border-bottom: 1px solid var(--line);
}

.tab {
  flex: 1;
  min-height: 53px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
}

.tab[aria-selected="true"] {
  color: #fff;
  background: var(--green);
}

.panel {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 28px;
  padding: 34px;
}

.panel[hidden] {
  display: none;
}

.panel h3 {
  margin: 0 0 7px;
  font-size: 1.34rem;
  letter-spacing: -0.05em;
}

.panel-description {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 0.93rem;
}

.fields {
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 55px;
  padding: 0 15px;
  border: 1px solid #cfdcd9;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 1.08rem;
  font-weight: 650;
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(8, 125, 100, 0.18);
  border-color: var(--green);
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.quick-buttons button {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--surface-soft);
  font-size: 0.84rem;
  font-weight: 650;
}

.result {
  align-self: stretch;
  padding: 26px;
  border-radius: 18px;
  background: #f6faf9;
}

.result-title {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.metric {
  margin-top: 12px;
  padding: 15px 17px;
  border-radius: 13px;
  background: var(--mint);
}

.metric.blue {
  background: var(--blue);
}

.metric.orange {
  background: var(--orange);
}

.metric span {
  display: block;
  color: #3d635c;
  font-size: 0.82rem;
}

.metric output {
  display: inline-block;
  margin-top: 4px;
  color: var(--green-dark);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric small {
  margin-left: 4px;
  color: var(--muted);
}

.result-note,
.validation {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.validation {
  color: #b5443e;
  font-weight: 650;
}

.info-grid,
.article-grid,
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.info-card,
.article-card {
  padding: 27px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.info-card h3,
.article-card h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  letter-spacing: -0.04em;
}

.info-card p,
.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.article-card a {
  display: inline-block;
  margin-top: 14px;
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.ad-area {
  min-height: 94px;
  display: grid;
  place-items: center;
  margin: 54px auto 0;
  color: #8a9b9d;
  border: 1px dashed #cadad6;
  border-radius: 16px;
  background: #fbfdfc;
  font-size: 0.79rem;
}

.site-footer {
  padding: 45px 0 33px;
  background: #102c31;
  color: #d8e4e4;
}

.footer-grid {
  grid-template-columns: 1.45fr 0.8fr 0.8fr;
  margin-bottom: 32px;
}

.footer-brand {
  margin-bottom: 9px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 750;
}

.site-footer p {
  max-width: 410px;
  margin: 0;
  color: #adc2c2;
  font-size: 0.88rem;
}

.footer-links strong {
  display: block;
  margin-bottom: 11px;
  color: #fff;
  font-size: 0.9rem;
}

.footer-links a {
  display: block;
  margin-bottom: 7px;
  color: #c1d2d2;
  font-size: 0.88rem;
}

.copyright {
  padding-top: 22px;
  border-top: 1px solid rgba(216, 228, 228, 0.18);
  color: #9eb5b5;
  font-size: 0.8rem;
}

.page-hero {
  padding: 64px 0 50px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.page-hero p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
}

.content-wrap {
  max-width: 780px;
  padding: 55px 0 78px;
}

.content-wrap h2 {
  margin: 38px 0 12px;
  font-size: 1.4rem;
}

.content-wrap h2:first-child {
  margin-top: 0;
}

.content-wrap p,
.content-wrap li {
  color: #455c69;
}

.content-wrap ul {
  padding-left: 21px;
}

.callout {
  margin: 26px 0;
  padding: 20px 22px;
  background: var(--mint);
  border-radius: 16px;
  color: #28564c;
}

.tool-page {
  padding: 48px 0 76px;
  background: var(--surface-soft);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1.04fr 0.86fr;
  gap: 22px;
  align-items: start;
}

.form-card,
.result-card,
.upload-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
}

.form-card h2,
.result-card h2,
.upload-card h2 {
  margin-bottom: 8px;
  font-size: 1.38rem;
}

.lotto-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 211, 102, 0.24), transparent 32%),
    var(--surface-soft);
}

.lotto-tool {
  display: grid;
  gap: 26px;
}

.lotto-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lotto-select-card,
.lotto-result {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
  box-shadow: var(--shadow);
}

.lotto-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.lotto-card-heading h2,
.lotto-result h2 {
  margin: 0 0 8px;
  font-size: 1.38rem;
}

.lotto-card-heading .eyebrow,
.lotto-result .eyebrow {
  margin-bottom: 7px;
}

.lotto-card-heading .exclude {
  color: #b84940;
}

.lotto-number-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
  margin-top: 20px;
}

.lotto-number {
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #405663;
  background: #fff;
  font-size: 0.87rem;
}

.lotto-number:hover {
  border-color: var(--mint-deep);
  background: #f1faf6;
}

.lotto-number-grid.include .lotto-number.selected {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.lotto-number-grid.exclude .lotto-number.selected {
  border-color: #c94d45;
  color: #fff;
  background: #c94d45;
}

.lotto-actions {
  text-align: center;
}

.lotto-generate {
  min-width: min(280px, 100%);
}

.lotto-result {
  text-align: center;
  background: linear-gradient(145deg, #fff, #f6fbf8);
}

.lotto-balls {
  min-height: 62px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 27px 0;
}

.lotto-ball {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 9px 18px rgba(16, 37, 53, 0.12);
}

.lotto-ball.yellow { background: #e4a126; }
.lotto-ball.blue { background: #358ac8; }
.lotto-ball.red { background: #ce5a51; }
.lotto-ball.gray { background: #657787; }
.lotto-ball.green { background: #198665; }

.lotto-result-actions {
  justify-content: center;
}

.lotto-guide-card {
  max-width: 820px;
  margin: 34px auto 0;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
}

.lotto-guide-card h2 {
  margin: 8px 0 20px;
  font-size: clamp(1.3rem, 3vw, 1.58rem);
  letter-spacing: -0.05em;
}

.lotto-steps {
  display: grid;
  gap: 13px;
  margin: 0;
  padding-left: 22px;
  color: #405663;
  line-height: 1.65;
}

.lotto-steps strong {
  color: var(--ink);
}

.lotto-detail-card {
  margin-top: 22px;
  padding: clamp(25px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
}

.lotto-detail-card h3 {
  margin: 8px 0 13px;
  font-size: clamp(1.3rem, 3vw, 1.58rem);
  letter-spacing: -0.05em;
}

.lotto-detail-card > p:not(.eyebrow):not(.micro-note):not(.lotto-caution) {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.lotto-pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 22px 0;
}

.lotto-pattern-grid div {
  padding: 15px 17px;
  border-radius: 14px;
  background: #f4f9f7;
}

.lotto-pattern-grid strong,
.lotto-pattern-grid span {
  display: block;
}

.lotto-pattern-grid strong {
  margin-bottom: 6px;
  color: var(--green);
}

.lotto-pattern-grid span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.lotto-caution {
  margin: 0;
  padding: 15px 17px;
  border-radius: 13px;
  color: #52646e;
  background: #f8f7ef;
  font-size: 0.91rem;
  line-height: 1.7;
}

.lotto-tax-table {
  margin: 23px 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.tax-row {
  display: grid;
  grid-template-columns: 1fr 118px;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: #405663;
}

.tax-row + .tax-row {
  border-top: 1px solid var(--line);
}

.tax-row.heading {
  color: #51666f;
  background: #f4f8f7;
  font-size: 0.9rem;
  font-weight: 700;
}

.tax-row strong {
  color: var(--green);
}

.tax-example {
  margin: 0 0 17px;
  padding: 17px 18px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.tax-example strong {
  color: var(--ink);
}

.tax-example p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.lotto-detail-card .micro-note a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-card .fields {
  margin-top: 25px;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.selection-button {
  min-height: 49px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.selection-button[aria-pressed="true"] {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.check-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.check-option input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.result-list {
  display: grid;
  gap: 10px;
  margin-top: 23px;
}

.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-radius: 11px;
  background: #f4f8fa;
  color: var(--muted);
  font-size: 0.91rem;
}

.result-line b {
  color: var(--ink);
  font-size: 1.05rem;
}

.result-total {
  margin-top: 15px;
  padding: 19px;
  border-radius: 15px;
  color: #fff;
  background: var(--green);
}

.result-total output {
  display: block;
  margin-top: 3px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.status-pill {
  display: inline-flex;
  margin-top: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

.reference-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
}

.dropzone {
  padding: 49px 22px;
  border: 2px dashed #c9d9d6;
  border-radius: 19px;
  background: #fbfdfd;
  text-align: center;
  transition: 0.2s ease;
}

.dropzone.dragover {
  border-color: var(--green);
  background: #f0fbf7;
}

.drop-mark {
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
  border-radius: 18px;
  background: var(--mint);
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 800;
}

.upload-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.processing {
  padding: 45px 10px;
  text-align: center;
}

.progress-track {
  max-width: 330px;
  height: 9px;
  margin: 20px auto 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5eeec;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 0.2s ease;
}

.receipt-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.table-wrap {
  overflow-x: auto;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.receipt-table th,
.receipt-table td {
  padding: 10px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.receipt-table th {
  color: var(--muted);
  font-size: 0.82rem;
}

.receipt-table input {
  max-width: 100%;
  min-height: 41px;
  padding: 0 9px;
  border: 1px solid #d7e2df;
  border-radius: 8px;
}

.receipt-table .numeric {
  width: 98px;
  text-align: right;
}

.plain-action {
  border: 0;
  color: #af4541;
  background: transparent;
  font-weight: 700;
}

.receipt-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
}

.receipt-summary strong {
  color: var(--green-dark);
}

.micro-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.83rem;
}

.instruction-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
}

.instruction-card {
  padding: 29px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.instruction-card h3 {
  margin: 0 0 17px;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.steps {
  margin: 0;
  padding-left: 21px;
  color: #455c69;
}

.steps li {
  margin-bottom: 9px;
  padding-left: 4px;
}

.caution-box {
  padding: 23px;
  border-radius: 16px;
  background: #eaf7f2;
  color: #31594f;
}

.caution-box h3 {
  margin-bottom: 13px;
  color: var(--green-dark);
}

.caution-box p {
  margin: 0 0 10px;
  font-size: 0.93rem;
}

.caution-box p:last-child {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .container {
    width: min(100% - 32px, 560px);
  }

  .header-row {
    min-height: 0;
    padding: 12px 0 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .nav {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.88rem;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .hero-grid {
    display: block;
    min-height: 0;
    padding: 49px 0;
  }

  .preview {
    margin-top: 38px;
  }

  .section {
    padding: 53px 0;
  }

  .tool-intro,
  .info-grid,
  .article-grid,
  .footer-grid,
  .panel {
    grid-template-columns: 1fr;
  }

  .tool-layout,
  .inline-fields,
  .instruction-grid {
    grid-template-columns: 1fr;
  }

  .form-card,
  .result-card,
  .upload-card {
    padding: 22px;
  }

  .lotto-select-grid {
    grid-template-columns: 1fr;
  }

  .lotto-select-card,
  .lotto-result {
    padding: 22px;
  }

  .lotto-number-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 5px;
  }

  .lotto-number {
    min-height: 34px;
    font-size: 0.8rem;
  }

  .lotto-pattern-grid {
    grid-template-columns: 1fr;
  }

  .tax-row {
    grid-template-columns: 1fr auto;
    padding: 13px 14px;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    min-width: 117px;
  }

  .panel {
    padding: 23px;
  }

  .footer-grid {
    gap: 30px;
  }
}
