:root {
  color-scheme: light;
  --green: #1b8a3e;
  --green-dark: #146b30;
  --green-soft: #eaf6ed;
  --orange: #e8650d;
  --yellow: #fff4bd;
  --blue: #165d9c;
  --ink: #1a1a1a;
  --muted: #5b625d;
  --line: #d9dfda;
  --bg: #f4f6f3;
  --card: #fff;
  --danger: #b3261e;
}

* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.7;
  word-break: keep-all;
}
button, input, select { font: inherit; }
a { color: inherit; }

.site-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--card);
  box-shadow: 0 0 32px rgba(20, 50, 28, .08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--green);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.brand strong { display: block; font-size: 1.05rem; font-weight: 900; }
.brand small { display: block; color: var(--muted); font-size: .72rem; line-height: 1.3; }
.top-home {
  flex: 0 0 auto;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: .85rem;
  font-weight: 900;
  text-decoration: none;
}

main { padding: 18px 16px 44px; }
.hero {
  padding: 22px 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, #0f5727, #1b8a3e);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -75px;
  bottom: -90px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
}
.hero .eyebrow { color: #dff7e5; font-size: .82rem; font-weight: 800; }
.hero h1 { margin: 5px 0 8px; font-size: clamp(1.55rem, 7vw, 2.15rem); line-height: 1.3; font-weight: 900; }
.hero p { margin: 0; color: #eefbf1; font-size: .96rem; }
.updated { margin-top: 10px; color: #d9f2df; font-size: .76rem; }

.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 14px 0 20px; }
.share-row button {
  min-height: 48px;
  border: 2px solid var(--green);
  border-radius: 11px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 900;
  cursor: pointer;
}
.share-row button:first-child { background: var(--green); color: #fff; }
.copy-status { min-height: 24px; margin: -12px 0 10px; color: var(--green-dark); font-size: .82rem; font-weight: 800; text-align: center; }

.guide-grid { display: grid; gap: 11px; margin-top: 18px; }
.guide-link {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 82px;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.guide-link:active { transform: scale(.99); border-color: var(--green); }
.guide-link .icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--green-soft); font-size: 1.45rem; }
.guide-link strong { display: block; font-size: 1rem; font-weight: 900; line-height: 1.35; }
.guide-link small { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.guide-link .arrow { color: var(--green); font-size: 1.3rem; font-weight: 900; }

.section {
  margin-top: 16px;
  padding: 18px 16px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.section h2 { margin: 0 0 12px; font-size: 1.18rem; line-height: 1.4; font-weight: 900; }
.section h3 { margin: 18px 0 8px; color: var(--green-dark); font-size: 1rem; font-weight: 900; }
.section p { margin: 8px 0; }
.section ul, .section ol { margin: 8px 0; padding-left: 1.35rem; }
.section li { margin: 7px 0; }
.section b, .section strong { font-weight: 900; }

.checklist { list-style: none; padding: 0 !important; margin: 0 !important; }
.checklist li {
  position: relative;
  padding: 10px 10px 10px 41px;
  border-bottom: 1px solid #edf0ed;
  margin: 0;
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "□";
  position: absolute;
  left: 8px;
  top: 6px;
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 900;
}

.note, .warning, .legal-note {
  margin: 13px 0;
  padding: 13px 14px;
  border-radius: 11px;
  font-size: .9rem;
}
.note { border: 1.5px solid #e8cf72; background: #fff9df; }
.warning { border: 1.5px solid #edb0aa; background: #fff0ee; color: #6f211c; }
.legal-note { border: 1.5px solid #b9d3eb; background: #eef7ff; color: #214761; }

.scroll-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .82rem; }
th, td { padding: 8px 7px; border: 1px solid var(--line); text-align: center; }
th { background: var(--green-soft); color: var(--green-dark); font-weight: 900; }
td.blank { height: 31px; }
.formula { font-family: Consolas, monospace; font-weight: 800; color: var(--blue); word-break: break-all; }

.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .8rem; color: var(--muted); font-weight: 800; }
.field input, .field select {
  width: 100%;
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}
.calc-result { margin-top: 12px; padding: 15px; border-radius: 11px; background: var(--green-soft); text-align: center; }
.calc-result strong { display: block; color: var(--green-dark); font-size: 1.45rem; }

.term-list { display: grid; gap: 9px; }
.term { padding: 12px 13px; border-left: 4px solid var(--green); border-radius: 8px; background: #f7faf7; }
.term dt { color: var(--green-dark); font-weight: 900; }
.term dd { margin: 3px 0 0; color: #353a36; font-size: .9rem; }
.term-search { width: 100%; min-height: 50px; margin-bottom: 12px; padding: 10px 13px; border: 2px solid var(--green); border-radius: 11px; font-size: 1rem; }

.official-links { display: grid; gap: 8px; }
.official-links a { display: block; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 9px; color: var(--blue); font-size: .88rem; font-weight: 800; text-decoration: none; }

.worknote-preview { position: relative; margin: 14px 0; overflow: hidden; border: 2px solid #dce4dd; border-radius: 16px; background: #f8faf8; box-shadow: 0 8px 22px rgba(17, 54, 31, .08); }
.worknote-sample-label { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 4px 8px; border-radius: 999px; background: #eef1ee; color: #647067; font-size: .68rem; font-weight: 900; }
.worknote-setting { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px 86px 12px 14px; background: #fff; }
.worknote-setting span, .worknote-summary span { display: grid; gap: 2px; }
.worknote-setting small, .worknote-summary small { color: var(--muted); font-size: .68rem; font-weight: 800; }
.worknote-setting b { font-size: .86rem; }
.worknote-month { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px 8px; }
.worknote-month b { color: var(--green-dark); font-size: 1.02rem; }
.worknote-month span { color: var(--muted); font-size: .68rem; }
.preview-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0 10px 12px; }
.weekday { padding: 3px 0 5px; color: #697069; font-size: .68rem; font-weight: 900; text-align: center; }
.weekday.sun { color: #d84e45; }
.weekday.sat { color: #3974b9; }
.preview-day { position: relative; min-height: 51px; padding: 5px 3px; border: 1px solid #e3e8e3; border-radius: 8px; background: #fff; text-align: center; }
.preview-day.empty { visibility: hidden; }
.preview-day i { display: block; color: #616a63; font-size: .65rem; font-style: normal; }
.preview-day b { display: grid; place-items: center; width: 28px; height: 28px; margin: 2px auto 0; border-radius: 50%; color: #fff; font-size: .7rem; }
.preview-day.unit-1 b { background: #3478c7; }
.preview-day.unit-15 b { background: #e5a915; }
.preview-day.unit-2 b { background: #d65349; }
.preview-day.unit-off b { background: #858c87; font-size: .59rem; }
.worknote-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 13px 14px; border-top: 1px solid #dce4dd; background: #fff; text-align: center; }
.worknote-summary b { color: var(--green-dark); font-size: .95rem; }
.worknote-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; padding: 9px 12px; color: var(--muted); font-size: .67rem; }
.worknote-legend span { display: inline-flex; align-items: center; gap: 4px; }
.worknote-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-blue { background: #3478c7; } .legend-yellow { background: #e5a915; } .legend-red { background: #d65349; } .legend-gray { background: #858c87; }
.worknote-steps { margin: 14px 0 !important; padding-left: 1.45rem !important; }
.worknote-steps li { padding-left: 3px; }
.open-worknote { display: block; padding: 14px 16px; border-radius: 11px; background: var(--green); color: #fff; text-align: center; font-size: 1rem; font-weight: 900; text-decoration: none; }
.open-worknote:active { transform: scale(.99); }

.cta {
  margin-top: 20px;
  padding: 19px 16px;
  border-radius: 15px;
  background: #123d22;
  color: #fff;
  text-align: center;
}
.cta strong { display: block; font-size: 1.08rem; }
.cta p { margin: 5px 0 12px; color: #dcebe0; font-size: .88rem; }
.cta a { display: inline-block; padding: 12px 18px; border-radius: 10px; background: #fff; color: var(--green-dark); font-weight: 900; text-decoration: none; }

.back-list { display: block; margin-top: 15px; padding: 13px; border: 2px solid var(--green); border-radius: 11px; color: var(--green-dark); text-align: center; font-weight: 900; text-decoration: none; }
footer { padding: 20px 16px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; text-align: center; }

@media (max-width: 520px) {
  html { font-size: 17px; }
  .brand small { display: none; }
  .hero { padding: 20px 16px; }
  .calc-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .worknote-setting { padding-right: 76px; }
  .preview-day { min-height: 47px; }
}

@media print {
  body { background: #fff; }
  .site-shell { width: 100%; box-shadow: none; }
  .topbar, .share-row, .copy-status, .cta, .back-list, .open-worknote, footer { display: none !important; }
  main { padding: 0; }
  .hero { color: #000; background: #fff; border: 2px solid #000; }
  .hero p, .hero .eyebrow, .updated { color: #222; }
  .section { break-inside: avoid; border-color: #777; }
  .scroll-table { overflow: visible; }
  table { min-width: 0; font-size: 10px; }
  th, td { padding: 4px 3px; }
  @page { size: A4; margin: 12mm; }
}
