:root {
  --ink: #14171c;
  --ink-sub: #454d58;
  --ink-hint: #646d79;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --line: #e3e6ea;
  --accent: #00c27a;
  --accent-text: #007a4d;
  --accent-soft: #e6f7ef;
  --on-accent: #14171c;
  --danger: #cc2f2f;
  --notice: #b76e00;
  --radius-card: 20px;
  --radius-button: 14px;
  --font: Pretendard, 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic',
    'Noto Sans KR', system-ui, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}

/* 머리 */
.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.mark {
  width: 28px;
  height: 28px;
  fill: var(--accent);
  flex: none;
}

.mark.big {
  width: 56px;
  height: 56px;
}

.lang {
  font-size: 15px;
  color: var(--ink-sub);
  text-decoration: none;
  padding: 10px 4px;
}

.lang:hover {
  color: var(--ink);
}

/* 본문 */
main.wrap {
  flex: 1 0 auto;
  padding-top: 32px;
  padding-bottom: 48px;
}

#delete-flow {
  margin-bottom: 20px;
}

h1 {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h2 {
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
}

h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}

p,
ul,
ol {
  margin: 0 0 12px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

.lead {
  font-size: 18px;
  color: var(--ink-sub);
}

.meta {
  color: var(--ink-hint);
  font-size: 14px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 16px 0;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.path {
  font-weight: 600;
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 14px;
}

.notice {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 16px;
}

.muted {
  color: var(--ink-sub);
}

/* 소개 */
.hero {
  padding: 24px 0 8px;
}

.hero h1 {
  font-size: 34px;
  margin-top: 16px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.features li {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin: 0;
}

.features strong {
  display: block;
  font-size: 17px;
  margin-bottom: 2px;
}

.features span {
  color: var(--ink-sub);
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

/* 법률 문서 */
.legal h2 {
  font-size: 18px;
  scroll-margin-top: 16px;
}

.toc {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 20px 0 8px;
  font-size: 15px;
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2 240px;
  column-gap: 24px;
}

.toc li {
  margin: 0 0 4px;
  break-inside: avoid;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 1.55;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  min-width: 96px;
}

th {
  background: var(--bg);
  font-weight: 600;
}

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

/* 버튼과 입력 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-button);
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.danger {
  background: var(--danger);
  color: #ffffff;
}

.button[disabled] {
  background: var(--line);
  color: var(--ink-hint);
  cursor: not-allowed;
}

.button.link {
  background: none;
  color: var(--accent-text);
  padding: 0 4px;
  text-decoration: underline;
}

.button.provider {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  padding: 0 14px;
}

input.code {
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}

.providers {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
}

.or {
  color: var(--ink-hint);
  font-size: 14px;
  margin: 16px 0 0;
}

.banner {
  background: #fff6e5;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 15px;
}

.error {
  color: var(--danger);
  font-weight: 600;
  margin-top: 12px;
}

.done {
  border-left: 4px solid var(--accent);
  padding-left: 14px;
}

[hidden] {
  display: none !important;
}

/* 바닥 */
.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 0 32px;
  font-size: 14px;
  color: var(--ink-sub);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 12px;
}

.foot-links a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
}

.foot-links a:hover {
  text-decoration: underline;
}

.foot p {
  margin: 0 0 4px;
}

@media (max-width: 420px) {
  h1 {
    font-size: 24px;
  }

  .hero h1 {
    font-size: 28px;
  }
}

@media print {
  .top,
  .foot,
  .toc {
    display: none;
  }

  body {
    background: #ffffff;
  }
}
