/**
 * soopforest — Material Design 3 (dark, green seed · 숲으로 가다)
 * @see https://m3.material.io/
 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Noto+Sans+KR:wght@400;500;700&display=swap');

:root {
  /* M3 dark · green primary */
  --md-sys-color-primary: #9fd89f;
  --md-sys-color-on-primary: #003910;
  --md-sys-color-primary-container: #005318;
  --md-sys-color-on-primary-container: #b8f0b8;

  --md-sys-color-secondary: #b8ccb8;
  --md-sys-color-on-secondary: #243428;
  --md-sys-color-secondary-container: #3a4b3e;
  --md-sys-color-on-secondary-container: #d4e8d4;

  --md-sys-color-surface: #101410;
  --md-sys-color-surface-dim: #101410;
  --md-sys-color-surface-bright: #363a36;
  --md-sys-color-surface-container-lowest: #0b0f0b;
  --md-sys-color-surface-container-low: #191d19;
  --md-sys-color-surface-container: #1d211d;
  --md-sys-color-surface-container-high: #272b27;
  --md-sys-color-surface-container-highest: #323632;

  --md-sys-color-on-surface: #e2e3de;
  --md-sys-color-on-surface-variant: #c2c8bd;
  --md-sys-color-outline: #8c9388;
  --md-sys-color-outline-variant: #424940;

  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;

  --md-sys-elevation-1: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px 1px rgba(0,0,0,.25);
  --md-sys-elevation-2: 0 1px 2px rgba(0,0,0,.35), 0 2px 6px 2px rgba(0,0,0,.25);
  --md-sys-elevation-3: 0 4px 8px 3px rgba(0,0,0,.3);

  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 9999px;

  --md-sys-font: 'Roboto', 'Noto Sans KR', system-ui, sans-serif;
  --md-sys-motion: cubic-bezier(0.2, 0, 0, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--md-sys-font) !important;
  font-size: 14px !important;
  line-height: 1.43;
  letter-spacing: 0.01em;
  background: var(--md-sys-color-surface) !important;
  color: var(--md-sys-color-on-surface) !important;
}

a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  transition: color 0.2s var(--md-sys-motion);
}
a:hover { color: var(--md-sys-color-on-primary-container); }

/* —— Top app bar (M3) —— */
#hd {
  background: var(--md-sys-color-surface-container) !important;
  box-shadow: var(--md-sys-elevation-1);
  border: none !important;
}

#tnb {
  background: var(--md-sys-color-surface-container-low) !important;
  border-bottom: 1px solid var(--md-sys-color-outline-variant) !important;
}
#tnb a, #hd_qnb a, #hd_define a {
  color: var(--md-sys-color-on-surface-variant) !important;
  font-size: 12px !important;
  font-weight: 500;
  letter-spacing: 0.04em;
}
#tnb a:hover, #hd_qnb a:hover {
  color: var(--md-sys-color-on-surface) !important;
}
#hd_define li.active a {
  color: var(--md-sys-color-primary) !important;
}

#hd_wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px !important;
  background: transparent !important;
  border: none !important;
}

/* M3 search bar — filled */
#hd_sch {
  background: var(--md-sys-color-surface-container-highest) !important;
  border: none !important;
  border-radius: var(--md-sys-shape-corner-full) !important;
  box-shadow: none !important;
  height: 48px;
  display: flex;
  align-items: center;
}
#sch_stx {
  background: transparent !important;
  color: var(--md-sys-color-on-surface) !important;
  font-size: 16px !important;
}
#sch_stx::placeholder { color: var(--md-sys-color-on-surface-variant); }
#sch_submit {
  background: var(--md-sys-color-primary) !important;
  color: var(--md-sys-color-on-primary) !important;
  border-radius: var(--md-sys-shape-corner-full) !important;
  border: none !important;
  min-width: 40px;
  height: 40px;
  margin: 4px;
}

.soop-logo-img, #logo img {
  height: 32px !important;
  max-width: 200px;
}

#wrapper, #container_wr, #container {
  background: var(--md-sys-color-surface) !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#ft, #ft_wr {
  background: var(--md-sys-color-surface-container-low) !important;
  color: var(--md-sys-color-on-surface-variant) !important;
  border-top: 1px solid var(--md-sys-color-outline-variant) !important;
}
#ft a { color: var(--md-sys-color-on-surface-variant) !important; }
#ft_copy {
  background: var(--md-sys-color-surface-container-lowest) !important;
  color: var(--md-sys-color-outline) !important;
  font-size: 12px;
}

/* —— Hero / M3 elevated card —— */
.vc-hero, .soop-hero {
  margin: 24px 0 32px;
  padding: 32px 28px 28px;
  background: var(--md-sys-color-surface-container-high) !important;
  border: none !important;
  border-radius: var(--md-sys-shape-corner-extra-large) !important;
  box-shadow: var(--md-sys-elevation-2);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.vc-hero::after, .soop-hero::after { display: none; }

/* M3 assist chip */
.vc-badge, .m3-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  border-radius: var(--md-sys-shape-corner-small);
  border: none;
}

.vc-title, .soop-hero h1, .soop-hero h2 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--md-sys-color-on-surface) !important;
}

.vc-sub, .soop-hero p {
  margin: 0 auto 24px;
  max-width: 520px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface-variant) !important;
}

.vc-actions, .soop-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* M3 buttons */
.vc-btn, .soop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--md-sys-shape-corner-full);
  text-decoration: none !important;
  transition: box-shadow 0.2s var(--md-sys-motion), background 0.2s var(--md-sys-motion);
}

/* Filled */
.vc-btn-primary, .soop-btn:not(.soop-btn-outline):not(.vc-btn-secondary) {
  background: var(--md-sys-color-primary) !important;
  color: var(--md-sys-color-on-primary) !important;
  border: none;
  box-shadow: var(--md-sys-elevation-1);
}
.vc-btn-primary:hover, .soop-btn:not(.soop-btn-outline):not(.vc-btn-secondary):hover {
  box-shadow: var(--md-sys-elevation-2);
  filter: brightness(1.05);
  color: var(--md-sys-color-on-primary) !important;
}

/* Outlined */
.vc-btn-secondary, .soop-btn-outline {
  background: transparent !important;
  color: var(--md-sys-color-primary) !important;
  border: 1px solid var(--md-sys-color-outline) !important;
}
.vc-btn-secondary:hover, .soop-btn-outline:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent) !important;
  color: var(--md-sys-color-primary) !important;
}

/* —— M3 cards (latest) —— */
.lt_wr, .latest_wr, .latest_top_wr {
  background: transparent !important;
  display: grid;
  gap: 16px;
}
.latest_top_wr {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.latest_wr {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.lat {
  background: var(--md-sys-color-surface-container) !important;
  border: none !important;
  border-radius: var(--md-sys-shape-corner-large) !important;
  box-shadow: var(--md-sys-elevation-1) !important;
  overflow: hidden;
  transition: box-shadow 0.2s var(--md-sys-motion);
}
.lat:hover {
  box-shadow: var(--md-sys-elevation-2) !important;
}

.lat_title {
  background: var(--md-sys-color-surface-container-high) !important;
  border-bottom: 1px solid var(--md-sys-color-outline-variant) !important;
  padding: 16px !important;
}
.lat_title a {
  color: var(--md-sys-color-on-surface) !important;
  font-size: 14px;
  font-weight: 500;
}
.lat ul li {
  border-color: var(--md-sys-color-outline-variant) !important;
  padding: 12px 16px !important;
}
.lat ul li a {
  color: var(--md-sys-color-on-surface) !important;
  font-size: 14px;
}
.lat .lt_date, .lat .lt_info {
  color: var(--md-sys-color-on-surface-variant) !important;
  font-size: 12px;
}

#ol_before, #ol_after, .ol {
  background: var(--md-sys-color-surface-container) !important;
  border: 1px solid var(--md-sys-color-outline-variant) !important;
  border-radius: var(--md-sys-shape-corner-large) !important;
  box-shadow: var(--md-sys-elevation-1);
}

.btn_submit, .btn_b01, .btn_b02, button[type="submit"] {
  background: var(--md-sys-color-primary) !important;
  color: var(--md-sys-color-on-primary) !important;
  border: none !important;
  border-radius: var(--md-sys-shape-corner-full) !important;
  font-weight: 500 !important;
  min-height: 40px;
  padding: 0 24px !important;
  box-shadow: var(--md-sys-elevation-1);
}

#hd_login_msg {
  background: var(--md-sys-color-primary-container) !important;
  color: var(--md-sys-color-on-primary-container) !important;
  font-size: 14px;
}

/* Board — M3 list surfaces */
#bo_list, #bo_v, .tbl_wrap table {
  background: var(--md-sys-color-surface-container) !important;
  color: var(--md-sys-color-on-surface) !important;
  border-radius: var(--md-sys-shape-corner-medium);
  overflow: hidden;
}
.tbl_head01 thead th {
  background: var(--md-sys-color-surface-container-high) !important;
  color: var(--md-sys-color-on-surface-variant) !important;
  font-size: 12px;
  font-weight: 500;
  border-color: var(--md-sys-color-outline-variant) !important;
}
.tbl_head01 tbody td {
  border-color: var(--md-sys-color-outline-variant) !important;
}
.tbl_head01 tbody tr:hover {
  background: var(--md-sys-color-surface-container-highest) !important;
}

#bo_list a, #bo_v a, #bo_w a {
  color: var(--md-sys-color-primary) !important;
}
#bo_v_con { color: var(--md-sys-color-on-surface) !important; }

input, select, textarea {
  background: var(--md-sys-color-surface-container-highest) !important;
  color: var(--md-sys-color-on-surface) !important;
  border: 1px solid var(--md-sys-color-outline) !important;
  border-radius: var(--md-sys-shape-corner-small) !important;
  min-height: 48px;
  padding: 8px 16px !important;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 0;
  border-color: transparent !important;
}

.pg_page, .pg_current {
  background: var(--md-sys-color-surface-container-high) !important;
  color: var(--md-sys-color-on-surface) !important;
  border: none !important;
  border-radius: var(--md-sys-shape-corner-full) !important;
  min-width: 40px;
  line-height: 40px;
}
.pg_current {
  background: var(--md-sys-color-primary-container) !important;
  color: var(--md-sys-color-on-primary-container) !important;
}

#bo_list .btn_bo_user button,
#bo_v_top .btn_bo_user button {
  background: var(--md-sys-color-secondary-container) !important;
  color: var(--md-sys-color-on-secondary-container) !important;
  border: none !important;
  border-radius: var(--md-sys-shape-corner-full) !important;
}

/* Logo — on-surface */
.soop-logo-img { filter: none; }

/* Mobile navigation drawer */
@media (max-width: 768px) {
  #hd_wrapper { padding: 8px 16px !important; }
  #wrapper, #container { padding: 0 16px; }

  /* mobile.css 2em 아이콘 덮어쓰기 */
  #gnb_open,
  #user_btn,
  #gnb_close,
  #user_close {
    font-size: 18px !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #gnb_open .fa,
  #user_btn .fa,
  #gnb_close .fa,
  #user_close .fa {
    font-size: 18px !important;
    line-height: 1 !important;
  }

  #logo {
    padding: 6px 48px !important;
    height: 48px !important;
    text-align: center;
  }
  #logo img {
    margin-top: 0 !important;
    max-height: 28px !important;
    width: auto !important;
  }

  #hd_nb li {
    width: 100% !important;
    float: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
  }
  #hd_nb li a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  #hd_nb li i,
  #hd_nb li .fa {
    font-size: 16px !important;
    width: 20px !important;
    margin-right: 0 !important;
    text-align: center;
    flex-shrink: 0;
  }
  #hd_nb {
    background: var(--md-sys-color-surface-container) !important;
    border-bottom: 1px solid var(--md-sys-color-outline-variant) !important;
  }

  .vc-hero, .soop-hero {
    padding: 24px 20px;
    border-radius: var(--md-sys-shape-corner-large) !important;
  }
  .soop-hero--mobile { margin: 16px 0 20px; }

  #hd, header#hd {
    background: var(--md-sys-color-surface-container) !important;
  }
  #gnb, #user_menu, .hd_div {
    background: var(--md-sys-color-surface-container-high) !important;
    box-shadow: var(--md-sys-elevation-3);
  }
  #gnb a, #hd_nb a, .gnb_1da {
    color: var(--md-sys-color-on-surface) !important;
  }
  .gnb_1da {
    font-size: 15px !important;
    padding: 12px 16px !important;
  }
  .gnb_1dli button.btn_gnb_op {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
  }
  .lat { margin: 0 0 12px !important; }
}

/* SNS 홈: 상단 이중 헤더 정리 (모바일) */
@media (max-width: 768px) {
  body.sns-home-page #tnb {
    display: none !important;
  }
  body.sns-home-page #hd_wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 44px !important;
    padding: 4px 8px !important;
    position: sticky;
    top: 0;
    z-index: 70;
    background: rgba(16, 20, 16, 0.96) !important;
    backdrop-filter: blur(12px);
  }
  body.sns-home-page #logo {
    display: none !important;
  }
  body.sns-home-page #gnb_open,
  body.sns-home-page #user_btn {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    flex-shrink: 0;
  }
  body.sns-home-page #gnb_open { order: 1; }
  body.sns-home-page #hd_wrapper .soop-home-title {
    order: 2;
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--md-sys-color-on-surface);
    pointer-events: none;
  }
  body.sns-home-page #user_btn { order: 3; }
  body.sns-home-page #gnb,
  body.sns-home-page #user_menu {
    order: 10;
  }
  body.sns-home-page .sns-home-header {
    position: static;
    padding-top: 10px;
    background: transparent;
    backdrop-filter: none;
  }
}

/* 접속자 집계 비표시 */
#visit,
.visit_bar,
.ft_visit {
  display: none !important;
}

/* Font Awesome · 아이콘 크기 통일 */
#sch_submit .fa,
#sch_submit i {
  font-size: 16px !important;
  line-height: 1 !important;
}

#hd_nb .fa,
#hd_nb i,
.hd_nb .fa,
#snb_open .fa,
#user_btn .fa {
  font-size: 18px !important;
  line-height: 1 !important;
  vertical-align: middle;
}

#logo img.soop-logo-img {
  height: 32px !important;
  width: auto !important;
  max-height: 32px !important;
}

.sns-feed .new_icon,
.sns-feed .hot_icon,
.lat .new_icon,
.lat .hot_icon {
  font-size: 10px !important;
  padding: 1px 5px !important;
  line-height: 1.3 !important;
  vertical-align: middle;
}

#bo_list .fa,
#bo_v .fa,
#bo_w .fa {
  font-size: 14px !important;
}