:root {
  --ink: #15221f;
  --muted: #60706a;
  --paper: #f5f2e9;
  --surface: #fffdf7;
  --line: #d8d7cc;
  --green: #0b604c;
  --green-dark: #073e32;
  --lime: #c9f26b;
  --orange: #ed7958;
  --shadow: 0 18px 50px rgba(21, 34, 31, 0.09);
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-dark); }
img { display: block; max-width: 100%; height: auto; }
code { padding: 0.12rem 0.35rem; border-radius: 0.25rem; background: #e7e5db; font-size: 0.92em; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }

.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: -10000px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 20; padding: 0.7rem 1rem; background: white; }

.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(216, 215, 204, 0.85); background: rgba(245, 242, 233, 0.92); backdrop-filter: blur(12px); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: var(--lime); background: var(--green-dark); font-size: 0.78rem; letter-spacing: 0.06em; }
nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
nav a { font-size: 0.94rem; font-weight: 650; text-decoration: none; }
.notice-bar { padding: 0.52rem 1rem; color: #542a1e; background: #ffe2d7; text-align: center; font-size: 0.84rem; }

main.shell { min-height: calc(100vh - 220px); padding-block: 5rem 6rem; }
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 4rem; min-height: 580px; }
.hero h1, .page-header h1, .form-layout h1, .prose-card h1 { margin: 0.35rem 0 1.1rem; font-size: clamp(2.25rem, 5vw, 4.7rem); line-height: 1.04; letter-spacing: -0.055em; }
.hero-image { filter: drop-shadow(0 25px 35px rgba(11, 96, 76, 0.18)); }
.eyebrow { margin: 0 0 0.35rem; color: var(--green); font-size: 0.76rem; font-weight: 850; letter-spacing: 0.17em; }
.lede { max-width: 680px; color: #3f504a; font-size: 1.12rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0.72rem 1.15rem; border: 1px solid var(--green-dark); border-radius: 0.45rem; color: white; background: var(--green-dark); font-weight: 750; text-decoration: none; }
.button:hover, button:hover { color: var(--lime); background: var(--green); }
.button.secondary { color: var(--green-dark); background: transparent; }
.button.secondary:hover { color: white; background: var(--green-dark); }

.search-panel { display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 2rem; align-items: end; margin: 2rem 0 6rem; padding: 2rem; border: 1px solid var(--line); border-radius: 0.8rem; background: var(--surface); box-shadow: var(--shadow); }
.search-panel.single { display: block; max-width: 760px; margin: 0 0 2.5rem; }
.search-panel h2 { margin: 0; }
label { display: block; margin-bottom: 0.42rem; font-weight: 720; }
input, select, textarea { width: 100%; padding: 0.78rem 0.85rem; border: 1px solid #aeb8b3; border-radius: 0.4rem; color: var(--ink); background: white; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(201, 242, 107, 0.75); border-color: var(--green); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 0.65rem; }

h2 { line-height: 1.2; letter-spacing: -0.035em; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 1.5rem; border: 1px solid var(--line); background: var(--line); }
.feature-grid article { min-height: 230px; padding: 1.5rem; background: var(--surface); }
.feature-grid span { color: var(--orange); font-weight: 800; }
.feature-grid h3 { margin-top: 2.4rem; }
.section-space { margin-top: 6rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.section-heading h2 { margin: 0; }

.page-header { max-width: 780px; margin-bottom: 3rem; }
.page-header h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.category-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.category-links a { padding: 0.55rem 0.85rem; border: 1px solid var(--green); border-radius: 999px; text-decoration: none; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card-grid.compact { grid-template-columns: repeat(3, 1fr); }
.product-card { display: flex; flex-direction: column; min-width: 0; padding: 1.4rem; border: 1px solid var(--line); border-radius: 0.65rem; background: var(--surface); box-shadow: 0 8px 22px rgba(21, 34, 31, 0.045); }
.product-card img { width: 100%; margin-bottom: 1.1rem; border-radius: 0.38rem; background: #dceadf; }
.product-card h2, .product-card h3 { margin: 0.25rem 0 0.65rem; line-height: 1.3; }
.product-card h2 a, .product-card h3 a { color: var(--ink); }
.product-card .category { margin: 0; color: var(--green); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.price { color: var(--green-dark); font-weight: 850; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; }
.pagination { align-items: center; justify-content: center; margin-top: 3rem; }
.pagination a { display: grid; place-items: center; min-width: 2.55rem; min-height: 2.55rem; padding: 0 0.7rem; border: 1px solid var(--line); border-radius: 0.35rem; background: var(--surface); }
.pagination a[aria-current="page"] { color: var(--lime); background: var(--green-dark); }

.breadcrumbs { margin-bottom: 2rem; color: var(--muted); font-size: 0.9rem; }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.detail-layout > img { width: 100%; border-radius: 0.75rem; background: #dceadf; }
.detail-layout h1 { margin: 0.35rem 0 1rem; font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1.05; letter-spacing: -0.05em; }
.facts { margin: 2rem 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 7rem 1fr; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; }
.link-list { padding-left: 1.2rem; }
.link-list li { margin: 0.55rem 0; }

.filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-bottom: 2rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--surface); }
.filter-form label { min-width: 210px; margin: 0; }
.filter-form .check { min-width: auto; padding-bottom: 0.7rem; }
.filter-form .check input { width: auto; }
.result-count { margin: 2rem 0; }
.empty-state { padding: 2rem; border: 1px dashed #9aa9a2; border-radius: 0.6rem; background: rgba(255, 255, 255, 0.45); }

.form-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 5rem; align-items: start; }
.form-layout h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
.form-card, .prose-card, .dynamic-panel { padding: 2rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--surface); box-shadow: var(--shadow); }
.form-card label:not(:first-child) { margin-top: 1rem; }
.form-card button { width: 100%; margin-top: 1.2rem; }
.form-error, .warning-card { padding: 0.85rem 1rem; border-left: 4px solid var(--orange); background: #ffe8df; }
.credentials { margin-top: 2rem; border-top: 1px solid var(--line); }
.credentials div { display: grid; grid-template-columns: 8rem 1fr; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.credentials dd { margin: 0; }
.prose-card { max-width: 760px; margin-inline: auto; }
.prose-card h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); }
.prose-card.danger { border-top: 5px solid var(--orange); }

.dynamic-panel { min-height: 260px; }
.status-line { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.5rem; font-weight: 720; }
.pulse { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(237, 121, 88, 0.5); animation: pulse 1.7s infinite; }
.pulse.ready { background: var(--green); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(237, 121, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(237, 121, 88, 0); } }

.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--line); color: var(--muted); background: #ece9df; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; }

@media (max-width: 900px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding-block: 1rem; gap: 0.8rem; }
  .site-header { position: static; }
  .hero, .detail-layout, .form-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding-block: 2rem; }
  .hero-image { max-width: 620px; }
  .feature-grid, .card-grid { grid-template-columns: repeat(2, 1fr); }
  .search-panel { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 24px, 1120px); }
  main.shell { padding-block: 3rem 4rem; }
  .feature-grid, .card-grid, .card-grid.compact { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form button { width: 100%; }
  .footer-grid, .section-heading { align-items: flex-start; flex-direction: column; }
  .notice-bar { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
