/* Same look as the official site (acornlab.app): cream paper, brown outlines, orange sunburst header. */
@import url("https://fonts.googleapis.com/css2?family=Jua&family=Nunito:wght@800;900&display=swap");
:root {
  --bg: #fff3dc;
  --card: #fffaf0;
  --ink: #3b2414;
  --muted: #7a5a43;
  --accent: #b9530f;
  --line: #ead7bc;
  --sun: #ffc94a;
  --cream: #fff6e6;
  --display: "Nunito", "Jua", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
:lang(en) { word-break: normal; }
main { max-width: 800px; margin: 0 auto; padding: 24px 16px 48px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ---------- header banner ---------- */
header {
  position: relative; overflow: hidden; isolation: isolate;
  margin-bottom: 18px; padding: 24px 170px 24px 24px;
  border: 3px solid var(--ink); border-radius: 28px;
  box-shadow: 0 6px 0 var(--ink);
  background:
    repeating-conic-gradient(from 0deg at 82% 70%, rgba(255, 255, 255, .17) 0 9deg, transparent 9deg 18deg),
    radial-gradient(120% 120% at 80% 60%, #ffe7a3 0%, #ffc44f 45%, #f59a3a 100%);
}
header::before {
  content: ""; display: block; width: 56px; height: 56px; margin-bottom: 12px;
  background: url(img/icon.png) center / cover; border-radius: 50%;
  border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
}
header::after {
  content: ""; position: absolute; right: 8px; bottom: -6px; z-index: -1;
  width: 150px; height: 150px;
  background: url(img/squirrel.webp) center bottom / contain no-repeat;
}
h1 {
  margin: 0 0 6px;
  font: 900 clamp(30px, 6vw, 44px) / 1.15 var(--display);
  color: var(--cream);
  -webkit-text-stroke: .14em var(--ink); paint-order: stroke fill;
  text-shadow: 0 .08em 0 var(--ink);
}
.sub { margin: 0; color: var(--ink); font-weight: 700; }
h2 { font: 900 1.3rem / 1.35 var(--display); margin: 30px 0 10px; }
h3 { font: 800 1.05rem / 1.4 var(--display); margin: 20px 0 6px; }
p, li { margin: 6px 0; }
b, strong { font-weight: 800; }

/* ---------- pill buttons (language + page nav) ---------- */
.lang, .nav { display: flex; flex-wrap: wrap; gap: 8px; }
.lang { margin: 14px 0 0; }
.nav { margin: 0 0 18px; }
.lang a, .nav a {
  display: inline-block; padding: 6px 14px; text-decoration: none;
  background: var(--cream); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink);
  font: 800 14px / 1.3 var(--display);
  transition: transform .15s ease, box-shadow .15s ease;
}
.lang a:hover, .nav a:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.lang a:active, .nav a:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- paper: each language section (and loose cards) ---------- */
main > section, main > .card {
  background: var(--card);
  border: 3px solid var(--ink); border-radius: 24px;
  box-shadow: 0 5px 0 rgba(59, 36, 20, .25);
  padding: 8px 24px 20px; margin: 0 0 22px;
}
main > section > h2:first-child, main > section > .card:first-child > h2:first-child, main > .card > h2:first-child { margin-top: 14px; }
/* cards inside a section: lighter boxes */
section .card {
  background: #fff3e0; border: 2px solid var(--line); border-radius: 18px;
  padding: 2px 18px 14px; margin: 16px 0;
}
section .card h2 { margin-top: 14px; }

/* ---------- tables ---------- */
table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 10px 0 14px;
  font-size: .95rem; border: 2px solid var(--line); border-radius: 14px; overflow: hidden;
}
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: #ffe9c2; color: var(--ink); font-weight: 800; }
tbody tr:nth-child(even) td { background: #fff6e8; }

/* ---------- footer ---------- */
footer {
  margin-top: 30px; padding: 22px 16px 0; text-align: center;
  color: var(--muted); font: 800 .9rem / 1.5 var(--display);
}
footer::before {
  content: ""; display: block; height: 40px; margin: 0 -16px 14px;
  background: url(img/ground.webp) 0 0 / 200px auto repeat-x;
  border-radius: 14px; opacity: .9;
}

/* ---------- mobile ---------- */
@media (max-width: 520px) {
  header { padding: 20px 18px 20px; border-radius: 22px; }
  header::after { width: 96px; height: 96px; right: 2px; bottom: auto; top: 8px; }
  main > section, main > .card { padding: 4px 16px 16px; border-radius: 20px; }
  section .card { padding: 2px 14px 12px; }
  table, thead, tbody, tr, th, td { display: block; }
  table { border-radius: 12px; }
  thead { display: none; }
  td { border: 0; padding: 2px 12px; background: transparent !important; }
  td:first-child { font-weight: 800; padding-top: 10px; }
  td:last-child { padding-bottom: 10px; }
  tr { border-bottom: 1px solid var(--line); }
  tbody tr:nth-child(even) { background: #fff6e8; }
  tr:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lang a, .nav a { transition: none; }
}
