/* 한국반려식물산업협회 — 흰 바탕 · 짙은 초록 · 연한 베이지 · 큰 글자(결정요청 D-05 — 색은 여기 :root 한 곳) */
:root {
  --green: #1F5E3B;
  --green-dark: #154329;
  --green-soft: #E6F0EA;
  --beige: #F3EBDD;
  --beige-dark: #E4D6BE;
  --ink: #1d2420;
  --muted: #5a645e;
  --line: #d9ded9;
  --bg: #ffffff;
  --danger: #b3261e;
  --warn: #8a5a00;
  --radius: 12px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* T14 */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { line-height: 1.35; color: var(--ink); }
h1 { font-size: 1.75rem; margin: 0 0 .6em; }
h2 { font-size: 1.4rem; margin: 1.6em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: #fff; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.inline { display: inline; margin: 0; }

/* 머리 */
.site-head { border-bottom: 1px solid var(--line); background: #fff; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-dark); font-weight: 800; font-size: 1.25rem; }
.logo-mark { width: 34px; height: 34px; border-radius: 50% 50% 50% 8px; background: var(--green); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; left: 9px; top: 7px; width: 14px; height: 18px; border-radius: 0 100% 0 100%; background: var(--beige); }
.user-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 1rem; }
.user-nav a { text-decoration: none; color: var(--ink); }
.user-nav .btn-sm { background: var(--green); color: #fff; padding: 6px 14px; border-radius: 999px; }
.main-nav { background: var(--green); }
.nav-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-row a { color: #fff; text-decoration: none; padding: 14px 16px; font-weight: 700; white-space: nowrap; font-size: 1.05rem; }
.nav-row a.on, .nav-row a:hover { background: var(--green-dark); color: #fff; }

/* 버튼 */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 22px; border-radius: 10px; border: 2px solid var(--green); background: var(--green); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn.line { background: #fff; color: var(--green); }
.btn.line:hover { background: var(--green-soft); color: var(--green-dark); }
.btn.beige { background: var(--beige); border-color: var(--beige-dark); color: var(--ink); }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn.big { min-height: 58px; font-size: 1.15rem; padding: 12px 28px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

/* 카드 · 목록 */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card.beige { background: var(--beige); border-color: var(--beige-dark); }
.section { padding: 36px 0; }
.section.beige { background: var(--beige); }
.page-head { background: var(--beige); padding: 30px 0 24px; margin-bottom: 26px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid > * { min-width: 0; }
.list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--green); }
.list li { border-bottom: 1px solid var(--line); padding: 14px 4px; display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.list li a { text-decoration: none; color: var(--ink); font-weight: 600; }
.list li a:hover { color: var(--green); }
.pin { color: var(--green); font-weight: 800; margin-right: 6px; }

/* 행사 카드 */
.ev-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; text-decoration: none; color: var(--ink); }
.ev-card:hover { border-color: var(--green); }
.ev-img { aspect-ratio: 16/9; background: var(--green-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; }
.ev-img .ph { color: var(--green); font-weight: 800; font-size: 1.3rem; }
.ev-body { padding: 16px 18px 20px; }
.ev-body h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.ev-meta { margin: 0; font-size: 1rem; color: var(--muted); }
.ev-state { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--green); }

/* 배지 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .88rem; font-weight: 700; background: #eef0ee; color: var(--ink); white-space: nowrap; }
.b-event_kind-education, .b-member_status-active, .b-fee_status-paid, .b-reg_status-confirmed, .b-reg_status-attended, .b-inquiry_status-answered { background: var(--green-soft); color: var(--green-dark); }
.b-member_status-pending, .b-reg_status-applied, .b-reg_status-waiting, .b-inquiry_status-open, .b-fee_status-unpaid { background: #fff3d6; color: var(--warn); }
.b-member_status-suspended, .b-reg_status-absent { background: #fde8e6; color: var(--danger); }
.b-member_status-withdrawn, .b-reg_status-cancelled, .b-fee_status-waived { background: #eceeec; color: var(--muted); }
.b-event_kind-seminar { background: #e7eefb; color: #23468c; }
.b-event_kind-general_meeting { background: var(--beige); color: #6b4f1d; }
.b-event_kind-social { background: #f6e8f1; color: #7d2d63; }
.sample-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: #fff3d6; color: var(--warn); font-size: .8rem; font-weight: 700; vertical-align: middle; }

/* 폼 */
.form { max-width: 640px; }
.form .row { margin-bottom: 18px; }
.form label.lb { display: block; font-weight: 700; margin-bottom: 6px; }
.req { color: var(--danger); margin-left: 2px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 52px; padding: 10px 14px; border: 1.5px solid #b9c2bc; border-radius: 10px; font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 160px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgba(31,94,59,.18); }
[aria-invalid=true] { border-color: var(--danger) !important; }
.field-err { color: var(--danger); margin: 6px 0 0; font-size: .95rem; font-weight: 600; }
.hint { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 24px; height: 24px; margin-top: 4px; flex: none; accent-color: var(--green); }
.radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.radio-cards label { border: 2px solid var(--line); border-radius: 10px; padding: 14px; display: flex; gap: 10px; cursor: pointer; }
.radio-cards input { width: 22px; height: 22px; accent-color: var(--green); flex: none; margin-top: 4px; }
.radio-cards label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.agree-box { background: #f7f8f7; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: .95rem; max-height: 220px; overflow: auto; }

/* 알림 */
.flashes { margin-top: 16px; }
.flash { padding: 14px 18px; border-radius: 10px; margin-bottom: 10px; font-weight: 600; }
.flash-ok { background: var(--green-soft); color: var(--green-dark); }
.flash-info { background: var(--beige); color: #5b4318; }
.flash-error { background: #fde8e6; color: var(--danger); }
.notice-box { padding: 14px 18px; border-radius: 10px; background: var(--beige); margin: 12px 0; }
.notice-box.warn { background: #fff3d6; }
.notice-box.danger { background: #fde8e6; color: var(--danger); }

/* 표 */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 1rem; }
.tbl th, .tbl td { padding: 12px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: #f5f7f5; font-weight: 700; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
dl.info { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
dl.info dt { color: var(--muted); font-weight: 600; }
dl.info dd { margin: 0; }

/* 본문 */
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.3em; }
.prose h3 { color: var(--green-dark); }

/* 첫 화면 */
.hero { background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%); color: #fff; padding: 52px 0; }
.hero h1 { color: #fff; font-size: 2rem; margin: 0 0 10px; }
.hero p { margin: 0 0 22px; font-size: 1.15rem; opacity: .95; }
.hero .btn { background: var(--beige); border-color: var(--beige); color: var(--green-dark); }
.hero .btn.line { background: transparent; border-color: #fff; color: #fff; }
.quick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.quick a { display: block; padding: 18px; border-radius: var(--radius); background: var(--beige); text-decoration: none; color: var(--ink); font-weight: 700; text-align: center; }
.quick a:hover { background: var(--beige-dark); }

/* 행사 상세 · 신청 */
.ev-detail { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ev-detail { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.apply-box { position: sticky; top: 12px; }
.price-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.big-num { font-size: 1.6rem; font-weight: 800; color: var(--green-dark); }

/* 임원 · 갤러리 */
.person { text-align: center; }
.person .ph { width: 140px; height: 140px; border-radius: 50%; margin: 0 auto 12px; overflow: hidden; background: var(--green-soft); display: flex; align-items: center; justify-content: center; color: var(--green); font-weight: 800; font-size: 2rem; }
.person .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }

/* 쪽 이동 */
.pager { display: flex; gap: 6px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pager .on { background: var(--green); color: #fff; border-color: var(--green); }

.search-bar { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.search-bar input, .search-bar select { flex: 1 1 200px; width: auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tabs a.on { background: var(--green); color: #fff; border-color: var(--green); }

/* 꼬리 */
.site-foot { margin-top: 56px; background: #263029; color: #dfe6e1; padding: 30px 0 40px; font-size: .95rem; }
.site-foot a { color: #fff; }
.foot-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.foot-links { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 600px) {
  /* 주 메뉴 6개를 두 줄(3 × 2)로 — 옆으로 밀지 않아도 전부 보인다 */
  .nav-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: visible; padding: 0; }
  .nav-row a { text-align: center; padding: 11px 4px; font-size: 1rem; }
  /* 행사 상세 — 신청 상자를 본문보다 먼저 */
  .ev-detail > aside { order: -1; }
  .apply-box { position: static; }
  body { font-size: 17px; }
  h1 { font-size: 1.5rem; }
  .hero { padding: 36px 0; }
  .hero h1 { font-size: 1.6rem; }
  .card { padding: 18px; }
  .user-nav { gap: 10px; font-size: .95rem; }
  .head-row { min-height: 64px; }
  dl.info { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.info dd { margin-bottom: 10px; }
}
