:root {
  --brand-50: #f0f7f4;
  --brand-100: #dceee6;
  --brand-600: #2f6f5c;
  --brand-700: #27594b;
  --brand-800: #22483d;
  --warm-50: #faf8f5;
  --gold: #c9a962;
  --nav-active: #00CEAF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  background: var(--warm-50);
  color: #111;
  line-height: 1.5;
  padding-bottom: 5.5rem;
}

a { color: inherit; text-decoration: none; }

header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

header.site-header .logo img {
  height: 3rem;
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  header.site-header .logo img { height: 3.5rem; }
}

nav.desktop {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
}

nav.desktop a {
  padding: .65rem 1rem;
  font-size: .94rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
}

nav.desktop a:hover { color: var(--nav-active); }

nav.desktop a.active {
  background: var(--nav-active);
  color: #fff;
}

.header-social {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--nav-active);
}

.header-social a:hover { background: #e5e7eb; }

.header-social svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem;
}

.hero {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  color: #fff;
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(47,111,92,.25);
}
.hero h1 { font-size: 1.75rem; margin-top: .25rem; }
.hero p { margin-top: .75rem; opacity: .9; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tags span {
  background: rgba(255,255,255,.15);
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
}

.card {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #eee;
  margin-bottom: .75rem;
}

.card h2 { font-size: 1rem; color: var(--brand-800); margin-bottom: .5rem; }

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
}
.grid3 a {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem .5rem;
  text-align: center;
  border: 1px solid #eee;
  font-size: .75rem;
  font-weight: 600;
  color: #444;
}
.grid3 a:hover { border-color: var(--brand-100); }

.quote {
  border-left: 4px solid var(--gold);
  padding-left: 1rem;
  font-style: italic;
  color: #555;
  font-size: .9rem;
}
.quote cite { display: block; text-align: right; margin-top: .5rem; font-style: normal; font-size: .8rem; color: var(--brand-600); }

table { width: 100%; border-collapse: collapse; }
table tr { border-bottom: 1px solid #f0f0f0; }
table td { padding: .85rem 0; font-size: .9rem; }
table td:last-child { text-align: right; color: var(--brand-700); font-weight: 500; }

.tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: .75rem; }
.tabs button {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  padding: .45rem .9rem;
  font-size: .8rem;
  white-space: nowrap;
  cursor: pointer;
}
.tabs button.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

.video-box {
  background: #1d3c34;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8ddd0;
  text-align: center;
  padding: 1rem;
  font-size: .85rem;
}

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.95);
  border-top: 1px solid var(--brand-100);
  display: flex;
  justify-content: space-around;
  padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  font-size: .65rem;
  color: #999;
  padding: .35rem 0;
}
.bottom-nav a.active { color: var(--brand-600); font-weight: 700; }
.bottom-nav a span { display: block; font-size: 1.1rem; margin-bottom: .1rem; }

.install-bar {
  position: fixed;
  bottom: 4.2rem;
  left: .75rem; right: .75rem;
  max-width: 40rem;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--brand-100);
  border-radius: 1rem;
  padding: .85rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  z-index: 55;
  display: none;
}
.install-bar.show { display: flex; gap: .65rem; align-items: flex-start; }
.install-bar .icon {
  width: 2.5rem; height: 2.5rem;
  background: var(--brand-600);
  color: #fff;
  border-radius: .65rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.install-bar p.title { font-size: .85rem; font-weight: 700; color: var(--brand-800); }
.install-bar p.body { font-size: .72rem; color: #666; margin-top: .15rem; }
.install-bar button.close {
  border: none; background: none; color: #aaa; font-size: 1.2rem; cursor: pointer;
}

footer.note {
  text-align: center;
  font-size: .75rem;
  color: #888;
  padding: 2rem 1rem 1rem;
}

@media (min-width: 1024px) {
  body { padding-bottom: 2rem; }
  nav.desktop { display: flex; }
  .bottom-nav, .install-bar { display: none !important; }
  main { max-width: 56rem; padding: 1.5rem 2rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  nav.desktop { display: none; }
}
