:root {
  --bg: #f4efe4;
  --surface: #fffaf2;
  --surface-2: #efe6d4;
  --fg: #1f2a24;
  --muted: #5c675f;
  --primary: #2f6b3a;
  --primary-fg: #f7f1e6;
  --accent: #d97728;
  --gym: #2b6cb0;
  --border: #e2d6c0;
  --pin: #c45c2a;
  --kakao: #fee500;
  --kakao-fg: #191919;
  --shadow:
    0 0 0 1px rgb(31 42 36 / 0.06),
    0 1px 2px -1px rgb(31 42 36 / 0.06),
    0 8px 24px -12px rgb(31 42 36 / 0.12);
  --shadow-hover:
    0 0 0 1px rgb(31 42 36 / 0.08),
    0 4px 12px -4px rgb(31 42 36 / 0.1),
    0 16px 32px -16px rgb(31 42 36 / 0.16);
  --font-sans: "Nunito", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Fredoka", "Nunito", ui-sans-serif, system-ui, sans-serif;
  --radius: 1rem;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  font-family: var(--font-display);
  text-wrap: balance;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
p { margin: 0; text-wrap: pretty; }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }

.wrap {
  width: min(64rem, calc(100% - 2rem));
  margin-inline: auto;
}
main.wrap { padding: 2rem 0 3rem; flex: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--bg) 90%, white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
}
.header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand img { height: 3rem; width: auto; flex-shrink: 0; }
.brand-text { min-width: 0; }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--primary);
  line-height: 1.15;
}
.brand-tag { display: block; font-size: 0.875rem; font-weight: 700; color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.nav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
}
.nav a {
  display: inline-flex;
  align-items: center;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--fg); }
.nav a.active { background: var(--primary); color: var(--primary-fg); }

.lang {
  display: flex;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.25rem;
  box-shadow: var(--shadow);
}
.lang button {
  height: 2.25rem;
  min-width: 2.75rem;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--muted);
}
.lang button.active { background: var(--primary); color: var(--primary-fg); }

.kakao-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--kakao);
  color: var(--kakao-fg);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.kakao-btn:hover { filter: brightness(0.97); }
.kakao-btn svg { width: 1.1rem; height: 1.1rem; }

.hero {
  display: grid;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-photo {
  min-height: 12rem;
  background: #d8c9ae center/cover no-repeat;
}
.hero-copy {
  padding: 1.5rem 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy .logo { height: 5rem; width: auto; align-self: start; }
.hero-copy h1 { margin-top: 1rem; font-size: 1.85rem; }
.hero-copy p { margin-top: 0.75rem; color: var(--muted); font-size: 1.05rem; max-width: 28rem; }

.section { margin-top: 3rem; }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.section-head h2 { font-size: 1.85rem; }
.section-head p { color: var(--muted); margin-top: 0.25rem; }
.section-head .row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background: var(--surface-2);
  padding: 0.25rem;
  border-radius: 999px;
  width: fit-content;
}
.pills button {
  height: 2.75rem;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--muted);
}
.pills button.active { background: var(--primary); color: var(--primary-fg); }

.notice-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.notice-card {
  display: block;
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.notice-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.notice-card.featured { padding: 1.5rem; }
.notice-card.pinned { box-shadow: var(--shadow), 0 0 0 1px color-mix(in oklab, var(--accent) 30%, transparent); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 800;
}
.badge svg { width: 0.85rem; height: 0.85rem; }
.badge.green { background: color-mix(in oklab, var(--primary) 12%, white); color: var(--primary); }
.badge.orange { background: color-mix(in oklab, var(--accent) 15%, white); color: var(--accent); }
.badge.blue { background: color-mix(in oklab, var(--gym) 12%, white); color: var(--gym); }
.badge.muted { background: var(--surface-2); color: var(--muted); }
.badge.pin { background: color-mix(in oklab, var(--pin) 12%, white); color: var(--pin); }
.date { margin-left: auto; font-size: 0.75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.notice-card h3 { margin-top: 0.75rem; font-size: 1.25rem; }
.notice-card.featured h3 { font-size: 1.6rem; }
.notice-card:hover h3 { color: var(--primary); }
.excerpt { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; white-space: pre-wrap; }
.read-more { display: inline-block; margin-top: 0.75rem; font-size: 0.875rem; font-weight: 800; color: var(--primary); }

.cards-3 {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.app-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.app-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.app-wash {
  height: 8rem;
  display: grid;
  place-items: center;
  color: var(--primary-fg);
}
.app-wash.phonics { background: var(--primary); }
.app-wash.speaking { background: var(--gym); }
.app-wash.numbers { background: var(--accent); }
.app-wash.games { background: var(--fg); }
.app-wash svg { width: 3rem; height: 3rem; }
.app-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.app-body h3 { margin-top: 0.5rem; font-size: 1.25rem; }
.app-body p { margin-top: 0.35rem; color: var(--muted); font-size: 0.9rem; flex: 1; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.9rem;
  border: 0;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-outline { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.app-body .btn { width: 100%; margin-top: 1rem; }

.article {
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.article h1 { margin-top: 1rem; font-size: 2rem; }
.article .posted { margin-top: 0.5rem; font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.article .body { margin-top: 1.5rem; font-size: 1.125rem; white-space: pre-wrap; line-height: 1.65; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.75rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--primary);
}

.about-card {
  overflow: hidden;
  background: var(--surface);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}
.about-logo {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  padding: 2.5rem 1.5rem;
}
.about-logo img { height: 10rem; width: auto; }
.about-copy { padding: 2rem 1.5rem; }
.kicker { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.about-copy h1 { margin-top: 0.4rem; font-size: 2rem; }
.about-copy p { margin-top: 1.25rem; font-size: 1.1rem; line-height: 1.65; max-width: 42rem; }

.info-card {
  margin-top: 1.5rem;
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.icon-bubble {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--primary) 12%, white);
  color: var(--primary);
  flex-shrink: 0;
}
.icon-bubble.kakao { background: var(--kakao); color: var(--kakao-fg); }
.info-card h2 { font-size: 1.4rem; }
.info-card p { margin-top: 0.4rem; }
.info-card .muted { color: var(--muted); }
.info-card .btn { margin-top: 1rem; }

.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  padding: 2rem 0;
  text-align: center;
}
.site-footer .brand-name { color: var(--primary); }
.site-footer .muted { color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }
.footer-kakao { margin-top: 0.9rem; }

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--fg);
  color: var(--primary-fg);
  padding: 0.8rem 1.1rem;
  border-radius: 0.9rem;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  z-index: 80;
  max-width: min(22rem, calc(100% - 2rem));
  text-align: center;
  transition: transform 0.25s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.empty {
  margin-top: 2rem;
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }

@media (min-width: 640px) {
  .brand img { height: 3.5rem; }
  .brand-text { display: block; }
  .hero-copy { padding: 2rem 2.25rem; }
  .hero-copy .logo { height: 8rem; }
  .hero-copy h1 { font-size: 2.25rem; }
  .notice-card.featured h3 { font-size: 1.85rem; }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-photo { min-height: 22rem; }
  .section-head { flex-direction: row; align-items: end; justify-content: space-between; }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .about-card { display: grid; grid-template-columns: minmax(0, 16rem) 1fr; }
  .article { padding: 2rem; }
}
@media (max-width: 639px) {
  .brand-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
