:root{
  --bg: #F7F6F4;
  --card: #FFFFFF;
  --text: #2E2E2E;
  --muted: #5A5F63;
  --line: rgba(46,46,46,.10);
  --sage: #8FAEA3;
  --sageDark: #6E9488;
  --blueGray: #9AA7B2;
  --shadow: 0 8px 30px rgba(0,0,0,.06);
  --radius: 18px;
  --max: 1040px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.7;
  letter-spacing: 0.1px;
}

a{color: inherit; text-decoration: none}
a:focus, button:focus, input:focus, textarea:focus, select:focus{outline: 3px solid rgba(143,174,163,.45); outline-offset: 2px}

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(247,246,244,.75);
  border-bottom: 1px solid var(--line);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 650;
  letter-spacing: .2px;
}

.brand-mark{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(143,174,163,.85), rgba(154,167,178,.55));
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.nav{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}
.nav a{
  font-size: 14px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
}
.nav a:hover{background: rgba(46,46,46,.04); color: var(--text);}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor:pointer;
  font-weight: 650;
  font-size: 15px;
  line-height: 1;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}
.btn:active{transform: translateY(1px)}
.btn-primary{
  background: var(--sage);
  color: #0f1b17;
  border-color: rgba(0,0,0,.06);
}
.btn-primary:hover{background: var(--sageDark)}
.btn-ghost{
  background: rgba(255,255,255,.55);
  border-color: rgba(46,46,46,.12);
  color: var(--text);
}
.btn-ghost:hover{background: rgba(255,255,255,.75)}

.hero{ padding: 28px 0 10px; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items: stretch;
}
.hero-card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  background: rgba(255,255,255,.55);
  position: relative;
  min-height: 440px;
}
.hero-media{
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg, rgba(247,246,244,.85), rgba(247,246,244,.75)),
    url("../img/hero.jpg");
  background-size: cover;
  background-position: center;
}
.hero-content{ position: relative; padding: 34px 30px; }
.kicker{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(46,46,46,.10);
}

h1{
  font-family: "Noto Serif KR", "Nanum Myeongjo", serif;
  letter-spacing: .2px;
  line-height: 1.25;
  margin: 14px 0 10px;
  font-size: 40px;
}
.lead{
  max-width: 46ch;
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 18px;
}
.hero-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 10px;
}
.smallnote{ color: var(--muted); font-size: 13px; margin-top: 12px; }

.side{ display:flex; flex-direction:column; gap: 12px; }
.panel{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadow);
  padding: 18px 18px;
}
.panel h3{ margin: 0 0 8px; font-size: 16px; }
.panel p{ margin: 0; color: var(--muted); font-size: 14px; }

.quicklinks{ display:flex; flex-direction:column; gap: 10px; margin-top: 12px; }
.quicklinks a{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(46,46,46,.10);
  background: rgba(255,255,255,.6);
  font-size: 14px;
  color: var(--text);
}
.quicklinks a:hover{background: rgba(255,255,255,.8)}
.badge{
  display:inline-block;
  font-size: 12px;
  color: #0f1b17;
  background: rgba(143,174,163,.20);
  border: 1px solid rgba(143,174,163,.35);
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 8px;
}

.section{ padding: 26px 0; }
.section-title{
  font-family: "Noto Serif KR","Nanum Myeongjo",serif;
  font-size: 24px;
  margin: 0 0 10px;
}
.section-desc{
  color: var(--muted);
  margin: 0 0 14px;
  max-width: 70ch;
}

.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadow);
  padding: 16px 16px;
}
.card h4{margin: 0 0 6px; font-size: 16px}
.card p{margin: 0; color: var(--muted); font-size: 14px}

.list{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.55);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.list label{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 14px;
}
.list label:hover{background: rgba(46,46,46,.03)}
.list input{margin-top: 4px}

.cta-row{ display:flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.steps{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.step{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.6);
  padding: 14px;
  box-shadow: var(--shadow);
}
.step .num{
  width: 32px; height: 32px;
  border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(154,167,178,.18);
  border: 1px solid rgba(154,167,178,.30);
  font-weight: 700;
  margin-bottom: 10px;
}
.step p{margin: 0; color: var(--muted); font-size: 14px}

.quotes{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quote{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.65);
  padding: 16px;
  box-shadow: var(--shadow);
}
.quote p{margin: 0; color: var(--muted)}
.quote .who{margin-top: 10px; font-size: 12px; color: rgba(46,46,46,.65)}

.footer{
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
.footer small{color: var(--muted)}
.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}
.notice{
  border: 1px solid rgba(46,46,46,.10);
  background: rgba(255,255,255,.55);
  border-radius: var(--radius);
  padding: 14px;
}

/* =========================
   FORM INPUTS
   ========================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.75);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 14px;
  transition: border-color .2s ease, background .2s ease;
}

input:focus,
textarea:focus,
select:focus{
  background: #fff;
  border-color: var(--sage);
}

textarea{
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

label{
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text);
}

/* =========================
   POST LIST (게시글 목록)
   ========================= */
.post-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-item{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  transition: all .2s ease;
  border-left: 3px solid transparent;
}

.post-item:hover{
  background: rgba(255,255,255,.85);
  border-left-color: var(--sage);
  box-shadow: 0 8px 30px rgba(0,0,0,.10);
}

.post-meta{
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.post-category{
  display: inline-block;
  padding: 4px 10px;
  background: rgba(143,174,163,.15);
  color: var(--sageDark);
  border: 1px solid rgba(143,174,163,.25);
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
}

.post-title{
  font-size: 17px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 8px;
  display: block;
  transition: color .2s;
  line-height: 1.4;
}

.post-title:hover{
  color: var(--sageDark);
}

.post-preview{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer{
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* =========================
   POST VIEW (글 상세)
   ========================= */
.post-view{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadow);
  padding: 32px 30px;
  margin-bottom: 28px;
}

.post-view h1{
  font-family: "Noto Serif KR", "Nanum Myeongjo", serif;
  font-size: 26px;
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.45;
}

.post-view .post-meta{
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.post-body{
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================
   COMMENTS
   ========================= */
.comments-section{
  margin-top: 28px;
}

.comments-section h3{
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 650;
}

.comment-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-item{
  background: rgba(143,174,163,.08);
  border: 1px solid rgba(143,174,163,.20);
  border-left: 3px solid var(--sage);
  border-radius: 14px;
  padding: 14px 16px;
}

.comment-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-author{
  font-weight: 650;
  font-size: 14px;
  color: var(--text);
}

.comment-date{
  font-size: 12px;
  color: var(--muted);
}

.comment-body{
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================
   ADMIN STYLES
   ========================= */
.admin-nav{
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-nav a{
  color: var(--muted);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 500;
  margin-right: 8px;
}

.admin-nav a:hover{
  background: rgba(46,46,46,.04);
  color: var(--text);
}

.admin-nav a.active{
  color: var(--sage);
  font-weight: 650;
  background: rgba(143,174,163,.12);
}

.stat-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.stat-number{
  font-size: 36px;
  font-weight: 700;
  color: var(--sage);
  margin-bottom: 8px;
  font-family: "Noto Serif KR", serif;
}

.stat-label{
  color: var(--muted);
  font-size: 14px;
}

.admin-table{
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th,
.admin-table td{
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.admin-table th{
  background: rgba(143,174,163,.08);
  font-weight: 650;
  font-size: 14px;
  color: var(--text);
}

.admin-table td{
  font-size: 14px;
  color: var(--text);
}

.admin-table tr:last-child td{
  border-bottom: none;
}

.admin-table tbody tr:hover{
  background: rgba(143,174,163,.04);
}

.admin-table tr.hidden{
  background: rgba(0,0,0,.03);
  opacity: 0.65;
}

.report-detail{
  background: rgba(255,165,0,0.10);
  border: 1px solid rgba(255,165,0,0.25);
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text);
}

.tab-nav{
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--line);
}

.tab-btn{
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: -2px;
  transition: all .2s ease;
  font-family: inherit;
}

.tab-btn:hover{
  color: var(--text);
  background: rgba(46,46,46,.03);
}

.tab-btn.active{
  color: var(--sage);
  border-bottom-color: var(--sage);
}

.tab-content{
  display: none;
}

.tab-content.active{
  display: block;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 980px){
  .hero-grid{grid-template-columns: 1fr}
  .hero-card{min-height: 420px}
  .cards{grid-template-columns: 1fr}
  .steps{grid-template-columns: 1fr 1fr}
  .quotes{grid-template-columns: 1fr}
  h1{font-size: 34px}
  
  .stat-grid{grid-template-columns: repeat(2, 1fr)}
  .admin-table{font-size: 13px}
  .admin-table th,
  .admin-table td{padding: 10px 12px}
}

@media (max-width: 520px){
  h1{font-size: 30px}
  .hero-content{padding: 28px 18px}
  .panel{padding: 16px}
  .steps{grid-template-columns: 1fr}
  
  .post-view{padding: 20px 16px}
  .post-view h1{font-size: 22px}
  .stat-grid{grid-template-columns: 1fr}
  
  .admin-table{display: block; overflow-x: auto}
  .admin-nav{padding: 12px 0}
  .admin-nav a{font-size: 13px; padding: 6px 10px}
}