
:root {
  /* E-um Forest & Walnut design system */
  --primary: #2B5029;
  --primary-dark: #234222;
  --walnut: #B87945;
  --walnut-dark: #9F6538;
  --brass: #D8AA61;
  --background: #F7F4EF;
  --surface: #FFFDF9;
  --surface-soft-green: #E9EEE6;
  --surface-warm: #F5E9D6;
  --surface-tab: #F1DFC1;
  --text: #293D39;
  --muted: #65716B;
  --border: #DDD8CF;
  --accent: #D8AA61;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Malgun Gothic", Arial, sans-serif;
  background: var(--background);
  color: var(--text);
}

header {
  padding: 24px 20px;
  background: var(--primary);
  color: white;
}

.wrap {
  width: min(1100px, 100%);
  margin: auto;
}

header h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

header p {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
}

nav {
  background: white;
  border-bottom: 1px solid var(--border);
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
}

.menu button {
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.menu button.active {
  background: var(--primary);
  color: white;
}

main {
  padding: 30px 18px;
}

.page {
  display: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  min-height: 250px;
}

.page.active {
  display: block;
}

h2 {
  margin-top: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.card {
  padding: 22px;
  border-radius: 12px;
  background: var(--background);
  border: 1px solid var(--border);
}

.card h3 {
  margin: 0 0 10px;
}

.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.notice {
  margin-top: 20px;
  color: #69756a;
  font-size: 14px;
}

footer {
  text-align: center;
  color: #69756a;
  padding: 28px;
  font-size: 12px;
}

@media (max-width: 650px) {
  header h1 {
    font-size: 20px;
  }

  .menu {
    gap: 4px;
  }

  .menu button {
    padding: 10px;
    font-size: 13px;
  }

  .page {
    padding: 20px;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}


/* 입력 요소의 글꼴과 크기 통일 */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}

/* 입력 항목의 제목 */
label {
  display: block;
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

/* 입력창과 선택창 */
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}

/* 입력창 선택 시 강조 */
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* 단가 표시 */
#lumber-price {
  margin-top: 12px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}


.lumber-inputs {
  margin-top: 20px;
}

.calculation-result {
  margin-top: 24px;
  padding: 20px;
  background: #E4EEE3;
  border: 1px solid #E4EEE3;
  border-radius: 12px;
}

.calculation-result h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

#wood-calculation {
  margin: 0;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}


.price-note {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 400;
  color: #69756a;
}


/* 계산기 종류 전환 */
.calculator-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0 20px;
}

.calc-tab {
  padding: 15px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.calc-tab.active {
  background: #E4EEE3;
  border-color: #E4EEE3;
  color: #2B5029;
}

.calculator-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.calculator-panel[hidden] {
  display: none;
}

.calculator-panel h3 {
  margin-top: 0;
}

@media (max-width: 650px) {
  .calc-tab {
    padding: 12px 8px;
    font-size: 13px;
  }

  .calculator-panel {
    padding: 16px;
  }
}


/* =================================
   재료비 산출기 공통 글꼴 및 크기
================================= */

#calculator {
  font-family: "Malgun Gothic", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* 계산기 제목 */
.calculator-panel > h3 {
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
}

/* 제품 등록 개수 */
#lumber-count,
#panels-count {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: #69756a;
  margin: 0 0 18px;
}

/* 항목 이름 */
.calculator-panel label {
  display: block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
}

/* 목재 선택창 및 치수 입력창 */
.calculator-panel input,
.calculator-panel select {
  width: 100%;
  min-height: 44px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
}

/* 목재 규격 및 단가 표시 */
#lumber-price,
#panel-price {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--primary);
  margin: 12px 0 20px;
}

/* 예상 재료비 제목 */
.calculator-panel .calculation-result h3 {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

/* 재료비 계산 결과 */
#wood-calculation,
#panel-calculation {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--primary);
  margin: 0;
}

/* 결과 안내 문구 */
.calculator-panel .price-note {
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  color: #69756a;
  margin-top: 6px;
}


/* 프로젝트 재료 목록 */
.project-materials {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.project-materials h3 {
  margin: 0 0 20px;
  font-size: 20px;
}

#material-list {
  margin-top: 20px;
}

.material-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.project-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 20px;
  background: #E4EEE3;
  border-radius: 12px;
  color: var(--primary);
}

.project-total strong {
  font-size: 22px;
}

@media (max-width: 650px) {
  .project-materials {
    padding: 16px;
  }

  .project-total strong {
    font-size: 19px;
  }
}


/* 상단 학원명 + 메뉴 고정 */
.site-top {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
}

/* 스크롤 시 아래쪽에 은은한 경계선 */
.site-top {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}


/* 프로젝트 재료 추가 버튼 */
.add-material-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 18px;
  border: 1px solid #2B5029;
  border-radius: 8px;
  background: #2B5029;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.add-material-btn:hover {
  background: #234321;
}

/* 목록 항목의 상세 정보 */
.material-details {
  flex: 1;
  min-width: 0;
}

.material-details strong {
  display: block;
  font-size: 14px;
}

.material-details small {
  display: block;
  margin-top: 5px;
  color: #69756a;
  font-size: 12px;
}

/* 금액과 삭제 버튼 */
.material-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.material-actions strong {
  white-space: nowrap;
  color: var(--primary);
}

.material-delete {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

@media (max-width: 650px) {
  .material-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .material-actions {
    width: 100%;
    justify-content: space-between;
  }
}


/* 프로젝트 저장 버튼 */
.project-save-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.project-save-actions button {
  flex: 1;
  padding: 13px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  font-weight: 600;
  cursor: pointer;
}

#save-project {
  color: white;
  background: var(--primary);
}

#new-project {
  color: var(--primary);
  background: white;
}

#project-save-status {
  color: #69756a;
  font-size: 13px;
}

/* 저장된 프로젝트 카드 */
.saved-project {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 14px;
}

.saved-project h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.saved-project p {
  color: #69756a;
  font-size: 13px;
}

.saved-project strong {
  color: var(--primary);
  font-size: 20px;
}

.saved-project-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.saved-project-actions button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #E4EEE3;
  color: var(--primary);
  cursor: pointer;
}

.saved-project-actions button:last-child {
  background: white;
  color: var(--text);
}

@media (max-width: 650px) {
  .project-save-actions {
    flex-direction: column;
  }
}


/* 프로젝트 백업 및 복원 */
.project-backup {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
}

.project-backup h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.project-backup p {
  font-size: 13px;
  line-height: 1.7;
  color: #69756a;
}

.backup-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.backup-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#export-projects {
  background: var(--primary);
  color: white;
}

#import-projects {
  background: #E4EEE3;
  color: var(--primary);
}

#import-project-file {
  display: none;
}

#backup-status {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--primary);
}

@media (max-width: 650px) {
  .project-backup {
    padding: 16px;
  }

  .backup-actions {
    flex-direction: column;
  }
}


/* 목재 단가표 */
.price-table-section {
  margin-top: 26px;
}

.price-table-section h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.price-table-section > p {
  color: #69756a;
  font-size: 13px;
  line-height: 1.7;
}

.price-table-scroll {
  width: 100%;
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.wood-price-table {
  width: 100%;
  min-width: 750px;
  border-collapse: collapse;
  font-size: 14px;
}

.wood-price-table th {
  padding: 14px 12px;
  background: #E4EEE3;
  color: #2B5029;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.wood-price-table td {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.wood-price-table tbody tr:nth-child(even) {
  background: #F6F8F7;
}

.wood-price-table th:nth-last-child(2),
.wood-price-table td:nth-last-child(2) {
  text-align: right;
  white-space: nowrap;
}

.wood-price-table td:nth-last-child(2) {
  color: var(--primary);
  font-weight: 700;
}

.wood-price-table th:last-child,
.wood-price-table td:last-child {
  text-align: center;
  white-space: nowrap;
}

.price-availability {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.price-availability.available {
  color: #2B5029;
  background: #E5EEE2;
}
.price-availability.reference {
  color: #777269;
  background: #F0EEE9;
}

.price-table-notice {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--background);
  color: #69756a;
  font-size: 12px;
  line-height: 1.8;
}


/* 단가표 모바일 가로 스크롤 안내 */
.table-scroll-hint {
  display: none;
}

@media (max-width: 650px) {
  .table-scroll-hint {
    display: block;
    margin: 12px 0 6px;
    color: #69756a;
    font-size: 12px;
    text-align: right;
  }
}


/* PC 재료 입력 + 프로젝트 목록 2단 배치 */
.calculator-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 20px;
}

.calculator-workspace > .calculator-panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.calculator-workspace > .project-materials {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin-top: 0;
  position: sticky;
  top: 175px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}

/* 좁은 PC 및 모바일에서는 세로 배치 */
@media (max-width: 900px) {
  .calculator-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .calculator-workspace > .calculator-panel {
    grid-column: 1;
    grid-row: 1;
  }

  .calculator-workspace > .project-materials {
    grid-column: 1;
    grid-row: 2;
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}




/* 목재비 외 추가 청구 금액 */
.extra-cost {
  margin-top: 18px;
}
.extra-cost label {
  margin: 0 0 8px;
}
.extra-cost input {
  width: 100%;
  min-height: 44px;
  text-align: right;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.extra-cost small {
  display: block;
  color: #69756a;
  font-size: 12px;
  margin-top: 6px;
}
.final-charge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 20px;
  background: #2B5029;
  color: white;
  border-radius: 12px;
}
.final-charge strong {
  font-size: 22px;
  text-align: right;
}
@media (max-width: 650px) {
  .final-charge strong { font-size: 19px; }
}

/* 회원용 산출내역서 */
.statement-open-btn {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #2B5029;
  border-radius: 9px;
  background: #E4EEE3;
  color: #2B5029;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.statement-open-btn small {
  font-size: 11px;
  font-weight: 400;
}
.statement-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.statement-toolbar button {
  padding: 12px 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.statement-back {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
}
.statement-print {
  background: #2B5029;
  border: 1px solid #2B5029;
  color: white;
  font-weight: 700 !important;
}
.statement-recipient-form {
  background: #F6F8F7;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.statement-recipient-form label { margin-top: 0; }
.statement-recipient-form p {
  margin: 8px 0 0;
  color: #69756a;
  font-size: 12px;
}
.statement-document {
  max-width: 790px;
  margin: 0 auto;
  padding: 34px 38px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #202B29;
}
.statement-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 2px solid #2B5029;
}
.statement-brand {
  color: #2B5029;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}
.statement-heading h2 {
  font-size: 26px;
  margin: 0;
}
.statement-subheading {
  color: #69756a;
  margin: 5px 0 0;
  font-size: 12px;
}
.statement-mark {
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 52px;
  padding: 8px;
  background: #E4EEE3;
  color: #2B5029;
  font-weight: 700;
  border-radius: 12px;
}
.statement-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin: 26px 0 30px;
}
.statement-info > div { display: flex; flex-direction: column; min-width: 0; }
.statement-info span { color: #69756a; font-size: 12px; }
.statement-info strong { font-size: 14px; overflow-wrap: anywhere; }
.statement-section-title {
  font-size: 17px;
  margin: 0 0 12px;
}
.statement-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.statement-table th {
  padding: 11px 9px;
  text-align: left;
  background: #E4EEE3;
  color: #2B5029;
  font-size: 13px;
}
.statement-table th:last-child { width: 29%; text-align: right; }
.statement-table td {
  padding: 13px 9px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.statement-table td strong { display: block; font-size: 14px; }
.statement-table td small { display: block; font-size: 12px; color: #69756a; margin-top: 3px; }
.statement-table td.statement-money {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}
.statement-summary { margin: 26px 0 18px; }
.statement-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.statement-grand-total {
  background: #E4EEE3;
  color: #2B5029;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 18px;
  font-weight: 700;
}
.statement-grand-total strong { font-size: 24px; white-space: nowrap; }
.statement-vat-note, .statement-legal-note {
  color: #69756a;
  font-size: 11px;
  line-height: 1.7;
  margin: 10px 0 0;
}
.statement-legal-note { margin-top: 20px; }
.statement-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: #69756a;
}
@media (max-width: 650px) {
  .statement-document { padding: 20px 16px; border-radius: 8px; }
  .statement-heading h2 { font-size: 21px; }
  .statement-mark { display: none; }
  .statement-info { gap: 13px; }
  .statement-grand-total { flex-direction: column; align-items: flex-start; }
  .statement-grand-total strong { font-size: 23px; }
  .statement-table th:last-child { width: 32%; }
  .statement-table td { padding: 12px 5px; }
  .statement-toolbar { flex-direction: column; }
}
@page { size: A4; margin: 14mm; }
@media print {
  body { background: white !important; margin: 0; }
  .site-top, footer, .statement-toolbar, .statement-recipient-form { display: none !important; }
  main.wrap { width: 100%; max-width: none; padding: 0; }
  .page, .page.active { display: none !important; }
  #statement.page { display: block !important; padding: 0; border: 0; min-height: 0; }
  .statement-document { width: 100%; max-width: none; padding: 0; border: 0; border-radius: 0; }
  .statement-grand-total, .statement-table th, .statement-mark {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .statement-table tr, .statement-grand-total, .statement-summary { break-inside: avoid; page-break-inside: avoid; }
}

/* 이음목공학원 공식 로고 */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.footer-logo {
  display: block;
  width: 195px;
  max-width: 70vw;
  height: auto;
}
.site-footer p {
  margin: 0;
  font-size: 10px;
  color: #857B70;
  line-height: 1.5;
  text-align: center;
}
.statement-logo {
  display: block;
  width: 220px;
  max-width: 42%;
  height: auto;
  object-fit: contain;
  object-position: top right;
  flex-shrink: 0;
}
@media (max-width: 650px) {
  .statement-logo {
    display: block;
    width: 155px;
    max-width: 40%;
  }
  .statement-heading { gap: 12px; }
}
@media print {
  .statement-logo {
    display: block !important;
    width: 220px;
    max-width: 42%;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* A4 산출내역서 밀도 개선 (2026-11-23) */
.statement-logo {
  width: 132px;
  max-width: 26%;
}
.statement-document {
  padding: 24px 28px;
  font-size: 12px;
  line-height: 1.3;
}
.statement-heading {
  gap: 14px;
  padding-bottom: 12px;
}
.statement-heading h2 {
  font-size: 20px;
  line-height: 1.2;
}
.statement-subheading {
  font-size: 10px;
  line-height: 1.25;
  margin-top: 3px;
}
.statement-info {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 15px 0 17px;
}
.statement-info span {
  font-size: 10px;
  line-height: 1.2;
}
.statement-info strong {
  font-size: 12px;
  line-height: 1.25;
  margin-top: 2px;
}
.statement-section-title {
  font-size: 15px;
  margin-bottom: 7px;
}
.statement-table th {
  padding: 7px 7px;
  font-size: 11px;
  line-height: 1.2;
}
.statement-table th:last-child {
  width: 23%;
}
.statement-table td {
  padding: 7px 7px;
  vertical-align: middle;
}
.statement-item-line {
  font-size: 10px;
  line-height: 1.25;
  /* 한 줄을 우선하되 긴 제품명도 PDF에서 절대 생략하지 않음 */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.statement-table td.statement-money {
  font-size: 11px;
}
.statement-summary {
  margin: 14px 0 8px;
}
.statement-summary > div {
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
}
.statement-grand-total {
  gap: 10px;
  padding: 11px 13px;
  margin-top: 8px;
}
.statement-grand-total strong {
  font-size: 20px;
}
.statement-vat-note,
.statement-legal-note {
  font-size: 10px;
  line-height: 1.2;
  margin: 4px 0 0;
}
.statement-legal-note { margin-top: 5px; }
.statement-footer {
  margin-top: 10px;
  padding-top: 6px;
  font-size: 9px;
}
@media (max-width: 650px) {
  .statement-logo {
    width: 95px;
    max-width: 32%;
  }
  .statement-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }
  .statement-document { padding: 18px 15px; }
  .statement-heading h2 { font-size: 19px; }
  .statement-grand-total strong { font-size: 20px; }
  .statement-table td { padding: 8px 5px; }
}
@media print {
  .statement-logo {
    display: block !important;
    width: 132px !important;
    max-width: 26% !important;
  }
  .statement-info {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px 12px !important;
  }
  .statement-document {
    font-size: 11px;
    line-height: 1.25;
  }
  .statement-table td { padding: 6px 6px; }
  .statement-item-line { font-size: 10px; line-height: 1.2; }
  .statement-heading h2 { font-size: 20px !important; }
  .statement-grand-total {
    flex-direction: row !important;
    align-items: center !important;
  }
  .statement-grand-total strong { font-size: 20px !important; }
}


/* =====================================================
   FOREST & WALNUT — COMPLETE COLOR LAYER
   Brand green for identity/actions, walnut for materials,
   warm beige for selection/calculation, ivory for surfaces.
   Keep layout and compact A4 print rules intact.
===================================================== */

/* Overall page and navigation */
body { background: var(--background); color: var(--text); }
nav { background: #FBF8F2; border-bottom-color: var(--border); }
.site-top { background: #FBF8F2; }
.menu button { color: var(--text); }
.menu button:hover:not(.active) { background: #F3EEE4; }
.menu button.active,
.menu button.active:hover { background: var(--primary); color: #FFFFFF; }
.page,
.calculator-panel,
.project-materials,
.saved-project,
.statement-document { background: var(--surface); border-color: var(--border); }
.card { background: #F9F4EB; border-color: var(--border); }
.card h3 { color: var(--primary); }
.notice,
#lumber-count,
#panels-count,
.material-details small,
.saved-project p,
.price-table-section > p,
.price-table-notice,
.table-scroll-hint,
#project-save-status,
#backup-status,
.extra-cost small,
.statement-recipient-form p { color: var(--muted); }

/* Fields — warm white input surfaces, walnut focus */
input,
select,
textarea,
.calculator-panel input,
.calculator-panel select,
.extra-cost input {
  background: #FFFEFB;
  color: var(--text);
  border-color: var(--border);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--walnut);
  outline-offset: 1px;
  border-color: var(--walnut);
  box-shadow: 0 0 0 3px rgba(184, 121, 69, .12);
}
label,
.calculator-panel label { color: var(--text); }

/* Calculator selection and intermediate results */
.calc-tab { background: #F7F3EB; border-color: var(--border); color: var(--text); }
.calc-tab:hover:not(.active) { background: #EFE7DA; }
.calc-tab.active {
  background: var(--surface-tab);
  border-color: #DCC397;
  color: var(--primary);
}
.calculation-result {
  background: var(--surface-warm);
  border-color: #E6D1B5;
}
.calculation-result h3 { color: #5E4428; }
#wood-calculation,
#panel-calculation { color: #654425; }
#lumber-price,
#panel-price { color: var(--primary); }
.price-note,
.calculator-panel .price-note { color: #746652; }

/* Distinctive walnut = add materials, forest = save/payable total */
#add-lumber,
#add-panel,
.add-material-btn {
  color: #FFFFFF;
  background: var(--walnut);
  border-color: var(--walnut);
}
#add-lumber:hover,
#add-panel:hover,
.add-material-btn:hover {
  background: var(--walnut-dark);
  border-color: var(--walnut-dark);
}
.project-total {
  background: var(--surface-soft-green);
  color: var(--primary);
}
.final-charge {
  background: var(--primary);
  color: #FFFFFF;
}
.final-charge strong { color: #FFFFFF; }
.material-actions strong { color: #8B582E; }
.material-delete {
  background: #FBF6F1;
  color: #714832;
  border-color: #E4C8B5;
}
.material-delete:hover { background: #F3E4D8; }
#save-project,
#export-projects,
.statement-print {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}
#save-project:hover,
#export-projects:hover,
.statement-print:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
#new-project,
.statement-back {
  background: #FBF8F2;
  border-color: var(--border);
  color: var(--text);
}
#new-project:hover,
.statement-back:hover { background: #F2ECE2; }
.statement-open-btn {
  background: var(--surface-tab);
  border-color: #DCC397;
  color: #584223;
}
.statement-open-btn:hover { background: #EBD1A8; }
.statement-open-btn small { color: #705536; }

/* Saved projects and JSON backup */
.saved-project { border-color: var(--border); }
.saved-project > strong { color: var(--primary); }
.saved-project-actions button {
  background: var(--surface-soft-green);
  color: var(--primary);
  border-color: var(--border);
}
.saved-project-actions button:hover { background: #DDE8D9; }
.saved-project-actions button:last-child {
  background: #FBF8F2;
  color: var(--text);
}
.project-backup,
.price-table-notice,
.statement-recipient-form {
  background: #F9F4EB;
  border-color: var(--border);
}
#import-projects {
  background: var(--surface-tab);
  color: #584223;
  border-color: #DCC397;
}
#import-projects:hover { background: #EBD1A8; }

/* Material price tables */
.wood-price-table th {
  background: #EEE2C8;
  color: var(--primary);
}
.wood-price-table tbody tr:nth-child(even) { background: #FAF7F1; }
.wood-price-table td:last-child { color: #86542D; }

/* Member statement: restrained warm stationery palette */
.statement-heading { border-bottom-color: var(--primary); }
.statement-brand { color: var(--primary); }
.statement-heading h2,
.statement-section-title { color: var(--text); }
.statement-subheading,
.statement-info span,
.statement-footer,
.statement-legal-note,
.statement-vat-note { color: var(--muted); }
.statement-table th {
  background: #EEE2C8;
  color: var(--primary);
}
.statement-table td.statement-money { color: var(--text); }
.statement-summary { color: var(--text); }
.statement-grand-total {
  background: var(--primary);
  color: #FFFFFF;
}
.statement-grand-total strong { color: #FFFFFF; }

/* Footer and logos — SVG colors unchanged */
.site-footer {
  background: #F4EFE6;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.site-footer p { color: var(--muted); }

/* Print stays compact, legible and economical in ink. */
@media print {
  body, .statement-document, #statement.page { background: #FFFFFF !important; }
  .statement-table th {
    background: #EEE2C8 !important;
    color: var(--primary) !important;
  }
  .statement-grand-total {
    background: var(--surface-soft-green) !important;
    color: var(--primary) !important;
    border: 1px solid #C7D4C3;
  }
  .statement-grand-total strong { color: var(--primary) !important; }
}


/* =======================================================
   브랜드 헤더 B안: Ivory Editorial + Forest & Walnut
   제목/부제목 문구는 index.html의 .brand-header에서 변경
   로고의 실제 원본은 assets/eum-academy-logo.svg 유지
======================================================= */
.brand-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 19px 20px 18px;
  background: linear-gradient(112deg, #FBF8F2 0%, #F7F2E9 72%, #EFE4D3 100%);
  color: var(--text);
  border-bottom: 1px solid #DED7CA;
}
.brand-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 86px;
}
.brand-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
}
.brand-header .brand-eyebrow {
  margin: 0 0 10px;
  color: #795333;
  opacity: 1;
  font-family: "Pretendard", "Malgun Gothic", sans-serif;
  font-weight: 750;
  font-size: 11px;
  letter-spacing: .16em;
  line-height: 1.2;
}
.brand-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand-icon {
  position: relative;
  display: block;
  overflow: hidden;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  border-radius: 6px;
}
.brand-icon img {
  display: block;
  width: 153px;
  height: auto;
  max-width: none;
}
.brand-header h1 {
  margin: 0;
  color: var(--primary);
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: clamp(26px, 3.25vw, 36px);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.brand-title-divider {
  display: block;
  flex: 0 0 1px;
  height: 28px;
  margin: 0 3px 0 7px;
  background: #C6AF8D;
}
.brand-header .brand-service-name {
  margin: 0;
  opacity: 1;
  font-family: "Pretendard", "Malgun Gothic", sans-serif;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: #55493D;
}
.brand-header .brand-caption {
  margin: 9px 0 0 59px;
  opacity: 1;
  font-family: "Pretendard", "Malgun Gothic", sans-serif;
  color: #7B7165;
  font-size: 12px;
  line-height: 1.35;
}
.brand-wood-art {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  right: -75px;
  top: -68px;
  width: 335px;
  height: 200px;
  opacity: .45;
  transform: rotate(-17deg);
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at 78% 90%,
      transparent 0 12px, rgba(177, 120, 67, .14) 13px 14px, transparent 15px 24px),
    radial-gradient(ellipse at 76% 85%,
      rgba(216,170,97,.29), transparent 67%);
}

/* 상단 메뉴는 브랜드 헤더와 별개의 밝은 중성 배경 */
.brand-header + nav {
  background: #FFFDF9;
}
.brand-header + nav .menu {
  align-items: center;
}
.brand-header + nav .menu button.active {
  background: var(--primary);
  color: white;
}

@media (max-width: 900px) {
  .brand-wood-art { right: -160px; opacity: .28; }
  .brand-header h1 { font-size: 30px; }
  .brand-header .brand-service-name { font-size: 15.6px; }
  .brand-title-row { gap: 12px; }
}
@media (max-width: 650px) {
  /* 맛집 앱처럼 로고 높이에 맞춰 상하 여백 최소화 */
  .brand-header { padding: 16px; }
  .brand-header-inner { min-height: 0; }
  .brand-header .brand-eyebrow {
    font-size: 9px;
    letter-spacing: .11em;
    margin-bottom: 7px;
  }
  .brand-icon { width: 30px; height: 30px; flex-basis: 30px; }
  .brand-icon img { width: 107px; }
  /* 모바일도 학원명 | 서비스명 한 줄 배치 */
  .brand-title-row { gap: 7px; flex-wrap: nowrap; }
  .brand-header h1 {
    font-size: clamp(18px, 4.6vw, 23px);
    flex: 0 0 auto;
  }
  .brand-title-divider {
    display: block;
    flex: 0 0 1px;
    height: 22px;
    margin: 0 1px;
  }
  .brand-header .brand-service-name {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 0;
    font-size: clamp(10px, 2.75vw, 13px);
    line-height: 1.3;
    white-space: normal;
  }
  .brand-header .brand-caption { display: none; }
  .brand-wood-art { opacity: .14; right: -200px; }
  .brand-header + nav .menu {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .brand-header + nav .menu button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
@media print {
  .brand-header { display: none !important; }
}

/* 목재 단가표 종류 탭: 재료비 산출기의 탭과 동일한 디자인 */
.price-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 20px;
}
.price-tab {
  padding: 15px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #F7F3EB;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
}
.price-tab:hover:not(.active) {
  background: #EFE7DA;
}
.price-tab.active {
  background: var(--surface-tab);
  color: var(--primary);
  border-color: #DCC397;
  font-weight: 700;
}
.price-table-section[hidden] {
  display: none !important;
}
.price-tabs + .price-table-section {
  margin-top: 0;
}
@media (max-width: 650px) {
  .price-tab {
    padding: 12px 8px;
    font-size: 13px;
  }
}

/* 특히 좁은 휴대전화 화면에서도 세로로 쌓이지 않도록 유지 */
@media (max-width: 380px) {
  .brand-icon { width: 26px; height: 26px; flex-basis: 26px; }
  .brand-icon img { width: 93px; }
  .brand-title-row { gap: 5px; }
  .brand-header h1 { font-size: 18px; }
  .brand-header .brand-service-name { font-size: 10px; }
}


/* ===== 산출 방법: 모바일 친화적인 사용설명서 ===== */
.guide-page { color: var(--text); }
.guide-intro {
  background: linear-gradient(110deg,#F8F1E6,#F7F4EF);
  border: 1px solid #E6D9C7;
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
.guide-eyebrow { margin: 0 0 7px; color: #996637; font-size: 11px; font-weight: 750; letter-spacing: .14em; }
.guide-intro h2 { color: var(--primary); margin: 0 0 8px; font-size: 24px; }
.guide-intro > p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.guide-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; }
.guide-flow > span:not(.guide-flow-arrow) { padding: 9px 13px; border-radius: 8px; background: #F2E6D7; color: #674624; font-size: 12px; }
.guide-flow b { margin-right: 5px; color: #8A582E; }
.guide-flow-arrow { color: #B8A58D; }
.guide-accordion { display: grid; gap: 10px; }
.guide-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #FFFDF9; }
.guide-item[open] { border-color: #CDB996; box-shadow: 0 3px 13px rgba(74,58,32,.05); }
.guide-item summary { display: flex; align-items: center; gap: 12px; padding: 17px 19px; list-style: none; cursor: pointer; font-size: 15px; font-weight: 700; }
.guide-item summary::-webkit-details-marker { display: none; }
.guide-item summary:focus-visible { outline: 2px solid var(--walnut); outline-offset: -3px; }
.guide-item[open] summary { background: #F4E8D8; color: var(--primary); }
.guide-num { font-size: 12px; font-weight: 800; color: #A5683B; }
.guide-chevron { margin-left: auto; width: 9px; height: 9px; border-right: 2px solid #8D7A61; border-bottom: 2px solid #8D7A61; transform: rotate(45deg); transition: transform .2s; }
.guide-item[open] .guide-chevron { transform: rotate(225deg); }
.guide-content { padding: 18px 22px 22px; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.75; }
.guide-content p { margin: 0 0 13px; }
.guide-content h3 { font-size: 15px; color: var(--primary); margin: 19px 0 8px; }
.guide-steps { margin: 0 0 12px; padding-left: 24px; }
.guide-steps li { padding-left: 4px; margin-bottom: 13px; }
.guide-steps li::marker { color: #A5683B; font-weight: 700; }
.guide-steps p { color: #57625B; margin: 3px 0 0; }
.guide-formula { display: grid; gap: 7px; background: #F5E9D6; border-left: 3px solid var(--walnut); border-radius: 8px; padding: 15px 18px; margin: 14px 0; }
.guide-formula-label { font-size: 12px; color: #86623B; font-weight: 700; margin-top: 4px; }
.guide-formula strong { font-size: 14px; color: #47392B; font-weight: 650; overflow-wrap: anywhere; }
.guide-example { display: grid; gap: 6px; border: 1px solid #E0DAD0; background: #FCFAF6; padding: 15px 18px; border-radius: 9px; margin: 10px 0; }
.guide-example span { color: #63594C; font-size: 13px; }
.guide-example strong { color: var(--primary); font-size: 16px; }
.guide-content .guide-footnote { font-size: 12px; color: #6A716B; margin: 10px 0 0; }
.guide-warning { background: #EDF1EB; border: 1px solid #D8E2D5; border-radius: 8px; padding: 13px 16px; margin-top: 16px; }
.guide-warning strong { color: var(--primary); }
.guide-warning p { margin: 6px 0 0; font-size: 13px; }
.guide-go { display: inline-flex; align-items: center; gap: 20px; padding: 11px 16px; background: var(--primary); color: #fff; border: 1px solid var(--primary); border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.guide-go:hover { background: var(--primary-dark); }
.guide-endnote { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.guide-diagram { display: flex; align-items: center; gap: 28px; padding: 12px 15px; margin: 14px 0; border-radius: 9px; border: 1px solid #E7DED2; background: #FBF8F3; }
.guide-diagram p { font-size: 12px; color: #706557; margin: 0; }
.guide-lumber-visual { position: relative; flex: 0 0 138px; height: 65px; margin: 13px 0 4px; background: linear-gradient(125deg,#C18B57,#DFBB89); box-shadow: inset 0 0 0 2px #9C6938; transform: skewY(-8deg); border-radius: 3px; }
.guide-lumber-visual span { position: absolute; font-size: 10px; font-weight: 700; color: #593B20; }
.guide-lumber-visual span:nth-child(1) { left: 53px; top: 24px; }
.guide-lumber-visual span:nth-child(2) { right: 0; top: -16px; }
.guide-lumber-visual span:nth-child(3) { left: 0; bottom: -20px; }
.guide-panel-visual { flex: 0 0 138px; width: 138px; height: 94px; padding: 9px; background: #DFBD8C; border: 2px solid #A87846; position: relative; }
.guide-panel-visual > div { width: 48%; height: 51%; display: grid; place-items: center; background: #B87945; color: white; font-size: 10px; }
.guide-panel-visual > small { position: absolute; bottom: 4px; right: 6px; font-size: 10px; color: #664829; }
@media (max-width: 650px) {
  .guide-intro { padding: 17px; }
  .guide-intro h2 { font-size: 21px; }
  .guide-flow { gap: 5px; }
  .guide-flow > span:not(.guide-flow-arrow) { font-size: 11px; padding: 7px 8px; }
  .guide-item summary { padding: 15px 12px; font-size: 14px; gap: 9px; }
  .guide-content { padding: 14px; font-size: 13px; }
  .guide-diagram { gap: 12px; flex-wrap: wrap; }
  .guide-formula strong { font-size: 13px; }
}
@media print { .guide-page { display: none !important; } }

/* 산출 방법 하단: 향후 회원 포털 구축 계획 안내 */
.guide-portal-notice {
  margin-top: 28px;
  padding: 24px 26px;
  background: linear-gradient(115deg, #F7F0E6, #FFF9F0);
  border: 1px solid #E4D4BC;
  border-left: 4px solid #B87945;
  border-radius: 12px;
  color: #4C493F;
}
.guide-portal-header {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}
.guide-portal-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  background: #EBDAC0;
  color: #8F5B31;
  border-radius: 9px;
  font-size: 21px;
}
.guide-portal-label {
  display: block;
  color: #925F35;
  font-size: 11px;
  letter-spacing: .04em;
  font-weight: 700;
  margin-bottom: 4px;
}
.guide-portal-header h3 {
  margin: 0;
  color: var(--primary);
  font-size: 17px;
  line-height: 1.4;
}
.guide-portal-notice > p {
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 10px;
}
.guide-portal-notice > p.guide-portal-caveat {
  margin: 15px 0 0;
  padding-top: 10px;
  border-top: 1px solid #E4D4BC;
  font-size: 11px;
  line-height: 1.5;
  color: #827263;
}
@media (max-width: 650px) {
  .guide-portal-notice { margin-top: 22px; padding: 18px 15px; }
  .guide-portal-header { align-items: flex-start; gap: 10px; }
  .guide-portal-icon { flex-basis: 32px; width: 32px; height: 32px; }
  .guide-portal-header h3 { font-size: 15px; }
  .guide-portal-notice > p { font-size: 12px; line-height: 1.7; }
}

/* 목재 구매 정보 · PC 2열 / 모바일 1열 */
.supplier-intro {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #E3D6C4;
  background: linear-gradient(115deg, #F9F3E9, #F4E9D8);
  margin-bottom: 22px;
}
.supplier-eyebrow { color: #946334; font-size: 11px; font-weight: 750; letter-spacing: .13em; }
.supplier-intro h2 { color: var(--primary); margin: 7px 0 10px; }
.supplier-intro p { margin: 0; color: #605C53; line-height: 1.7; font-size: 14px; }
.supplier-controls { display: grid; gap: 9px; margin-bottom: 23px; }
.supplier-controls label, .supplier-filter-group legend { font-size: 13px; font-weight: 700; color: var(--text); }
#supplier-search { width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 9px; }
.supplier-filter-group { border: 0; padding: 0; margin: 7px 0 0; min-width: 0; }
.supplier-filter-group legend { margin-bottom: 10px; }
.supplier-filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.supplier-filter {
  padding: 8px 13px; border-radius: 8px;
  border: 1px solid #DDD8CF; background: #FFFDF9;
  color: var(--text); font: inherit; font-size: 12px; cursor: pointer;
}
.supplier-filter:hover:not(.active) { background: #F4ECE0; }
.supplier-filter.active { background: var(--primary); color: white; border-color: var(--primary); }
.supplier-results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.supplier-results-heading h3 { font-size: 17px; margin: 0; }
.supplier-results-heading > span { color: var(--muted); font-size: 12px; }
.supplier-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.supplier-card {
  display: flex; flex-direction: column; gap: 13px; min-width: 0;
  border: 1px solid var(--border); background: #FFFDF9; padding: 19px;
  border-radius: 12px;
}
.supplier-card-top { display: flex; align-items: center; gap: 13px; }
.supplier-icon {
  flex: 0 0 55px; width: 55px; height: 55px; display: grid; place-items: center;
  background: #F0E3CE; color: #886036; font-size: 30px;
  border-radius: 11px;
}
.supplier-card-heading { min-width: 0; }
.supplier-card-heading h4 { font-size: 18px; margin: 0 0 5px; color: var(--text); }
.supplier-region { color: var(--muted); font-size: 12px; margin: 0; }
.supplier-card-tags, .supplier-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.supplier-product-tag {
  background: #F3E8D8; color: #75502F;
  font-size: 12px; padding: 5px 8px; border-radius: 5px;
}
.supplier-method {
  background: #E9EEE6; color: #2B5029;
  font-size: 12px; padding: 5px 8px; border-radius: 5px;
}
.supplier-description, .supplier-address, .supplier-service, .supplier-note {
  font-size: 12px; color: #5F655F; line-height: 1.65; margin: 0; overflow-wrap: anywhere;
}
.supplier-address::before { content: "주소 · "; font-weight: 700; color: var(--text); }
.supplier-note { padding: 10px; border-radius: 7px; background: #F4F1EB; }
.supplier-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid var(--border); padding-top: 14px; margin-top: auto;
}
.supplier-link {
  display: inline-block; text-decoration: none; border-radius: 8px;
  padding: 9px 12px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--border); color: var(--text); background: white;
}
.supplier-link:hover { filter: brightness(.95); }
.supplier-link-main { background: var(--primary); border-color: var(--primary); color: white; }
.supplier-link-secondary { background: #F6EEE1; color: #5C4936; border-color: #E6D6BE; }
.supplier-empty { grid-column: 1 / -1; padding: 30px 12px; text-align: center; color: var(--muted); }
.supplier-reset { display: block; margin: 14px auto 0; padding: 8px 14px; border: 1px solid var(--border); background: white; border-radius: 8px; cursor: pointer; }
.supplier-disclaimer { background: #EDF1EB; padding: 17px 19px; margin-top: 23px; border-radius: 9px; border: 1px solid #D9E2D5; }
.supplier-disclaimer strong { color: var(--primary); font-size: 13px; }
.supplier-disclaimer p { font-size: 12px; color: #606E62; line-height: 1.6; margin: 5px 0 0; }
@media (max-width: 700px) {
  .supplier-grid { grid-template-columns: 1fr; }
  .supplier-intro { padding: 18px; }
  .supplier-card { padding: 16px; }
}
@media print { .suppliers-page { display: none !important; } }

/* 노션에 등록한 구매처 대표 이미지 */
.supplier-icon.has-image { background: #FFFDF9; }
.supplier-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}


/* 여섯 메뉴의 공통 소개 타이틀: 산출 방법·목재 구매 정보 형식으로 통일 */
.page .section-intro {
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid #E3D6C4;
  border-radius: 12px;
  background: linear-gradient(115deg, #F9F3E9 0%, #F4E9D8 100%);
  margin: 0 0 22px;
}
.page .section-intro .section-eyebrow,
.page .section-intro .guide-eyebrow,
.page .section-intro .supplier-eyebrow {
  display: block;
  color: #946334;
  margin: 0 0 7px;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: .13em;
}
.page .section-intro h2 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}
.page .section-intro > p:last-child {
  color: #605C53;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}
@media (max-width: 650px) {
  .page .section-intro {
    padding: 18px;
    margin-bottom: 20px;
  }
  .page .section-intro h2 { font-size: 21px; }
  .page .section-intro > p:last-child { font-size: 13px; }
}

/* 재료비 산출 소개 영역: 재고 확인 안내 */
.page .section-intro .calculator-stock-notice {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 11px 0 0;
  color: #986039;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}
.page .calculator-stock-notice span { flex: none; font-size: 14px; }
@media (max-width: 650px) {
  .page .section-intro .calculator-stock-notice { font-size: 12px; }
}

/* 목재 단가표 상단: 재고 확인과 별도 주문 안내 */
.page .section-intro .price-stock-notices {
  margin-top: 12px;
  display: grid;
  gap: 5px;
}
.page .section-intro .price-stock-notices p {
  margin: 0;
  display: flex;
  gap: 7px;
  color: #986039;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}
.page .section-intro .price-stock-notices p::before {
  content: "ⓘ";
  font-size: 14px;
  flex: none;
}
@media (max-width: 650px) {
  .page .section-intro .price-stock-notices p { font-size: 12px; }
}


/* Keep the page centered when the vertical scrollbar appears. */
html { overflow-y: scroll; }

/* Include the complete outline of the cropped academy symbol. */
.brand-icon { flex-basis: 46px; width: 46px; }
@media (max-width: 650px) {
  .brand-icon { flex-basis: 32px; width: 32px; }
}
@media (max-width: 380px) {
  .brand-icon { flex-basis: 28px; width: 28px; }
}


/* Reading space: move the sticky header without shifting the document layout. */
@media screen {
  .site-top { transform: translateY(0); transition: transform 220ms ease; }
  .site-top.reading-compact { transform: translateY(calc(-1 * var(--brand-height, 0px))); }
  .site-top.reading-hidden { transform: translateY(-100%); }
  .reading-top-button {
    position: fixed; right: max(20px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom)); z-index: 990;
    padding: 11px 15px; border: 1px solid #2B5029; border-radius: 24px;
    background: #2B5029; color: white; font-weight: 700; cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,.18);
  }
  .reading-top-button[hidden] { display: none; }
  .reading-top-button:focus-visible { outline: 3px solid #B87945; outline-offset: 3px; }
  @media (prefers-reduced-motion: reduce) { .site-top { transition: none; } }
}


/* Member portal additions */
.brand-service-name small{display:block;font-size:.62em;letter-spacing:.13em;margin-top:3px}.draft-badge{font-size:.48em;background:#b57818;color:#fff;padding:.25em .55em;border-radius:99px;vertical-align:middle}.draft-notice{margin:18px 0;padding:16px;border-left:4px solid #b57818;background:#fff6df;line-height:1.65}.rules-content{display:grid;gap:10px;margin:24px 0 45px}.rules-content details{border:1px solid #dfdfd6;border-radius:8px;background:#fff}.rules-content summary{cursor:pointer;padding:16px 18px;font-weight:700;color:#244525}.rules-content p{padding:0 18px 16px;line-height:1.7}.coming-page{padding:50px 0;min-height:35vh}.coming-page p{color:#687166}.menu button[data-external]{white-space:nowrap}
/* Member portal navigation */
.site-top { position: relative; transform: none !important; }
.portal-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); max-width: 1500px; margin: 0 auto; align-items: start; }
.portal-nav { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; background: #fbf8f2; border: 0; border-right: 1px solid #e3dfd4; padding: 18px 10px; }
.portal-nav .menu { display: flex; flex-direction: column; align-items: stretch; gap: 3px; overflow: visible; padding: 0; }
.portal-nav .menu button, .portal-group > summary { display: block; width: 100%; text-align: left; border: 0; border-radius: 8px; padding: 12px 14px; background: transparent; color: #28422b; font: inherit; cursor: pointer; }
.portal-nav .menu button:hover, .portal-group > summary:hover { background: #e9eee5; }
.portal-nav .menu button.active { background: #315b35; color: white; }
.portal-group > summary { font-weight: 700; list-style: none; }
.portal-group > summary::after { content: '▾'; float: right; }
.portal-group[open] > summary::after { content: '▴'; }
.portal-group button { padding-left: 27px !important; font-size: .92em !important; }
.portal-layout > main.wrap { width: min(100% - 40px, 1100px); min-width: 0; }
.mobile-menu-toggle { display: none; }
@media (max-width: 767px) {
 .site-top { position: relative; }
 .mobile-menu-toggle { display: block; margin: 0 16px 10px; border: 1px solid #cdd8ca; border-radius: 7px; background: white; color: #294b2b; padding: 9px 14px; font: inherit; }
 .portal-layout { display: block; }
 .portal-nav { display: none; position: fixed; top: 0; bottom: 0; left: 0; z-index: 1000; width: min(290px, 85vw); max-height: 100dvh; box-shadow: 4px 0 20px #0003; }
 .portal-nav.is-open { display: block; }
 .portal-layout > main.wrap { width: calc(100% - 32px); }
}
@media print { .portal-nav, .mobile-menu-toggle { display:none !important; } .portal-layout { display:block; } }

.mobile-menu-close { display:none; }
@media (max-width:767px) { .mobile-menu-close { display:block; margin:0 0 10px auto; padding:10px; border:0; background:transparent; color:#28422b; font:inherit; } }

.portal-wood-category { margin-left:12px; border-left:1px solid #d9e2d5; }
.portal-wood-category summary { padding:9px 8px!important; font-size:.87em; line-height:1.4; font-weight:600; cursor:pointer; }
.portal-wood-category summary::after { content:"▾"; float:right; }
.portal-wood-category[open] summary::after { content:"▴"; }
.portal-nav .portal-wood-category .wood-side-item { padding:8px 10px 8px 18px!important; font-size:.84em!important; line-height:1.4; }
.portal-nav .wood-side-item .wood-card-info { display:block; }
.portal-nav .wood-side-item .wood-card-info strong { font-size:1em; font-weight:500; }
.portal-nav .wood-side-item .wood-pending { display:block; }
.portal-nav .wood-side-item[aria-current="page"] { background:#e1ebdd; }

.portal-nav #wood-portal-list .portal-wood-link { display:block; text-align:left; padding:10px 12px 10px 26px; font-size:.9em; line-height:1.4; }
.portal-nav #wood-portal-list .portal-wood-link[aria-current="page"] { background:#e1ebdd; color:#234222; font-weight:700; }

/* Portal title accommodates the longer audience label. */
.brand-header .brand-service-name { white-space: normal; line-height: 1.3; }
.brand-service-name small { white-space: normal; }
@media (max-width:650px) { .brand-header .brand-service-name { font-size: clamp(10px, 2.5vw, 14px); } .brand-service-name small { letter-spacing:.05em; } }

/* Unified type and navigation flyouts */
body, button, input, select, textarea { font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif; }
@media (min-width:768px) {
 .portal-nav { overflow: visible; z-index: 50; }
 .portal-group { position:relative; }
 .portal-group > summary::after { content:'›'; }
 .portal-group[open] > summary::after { content:'›'; }
 .portal-group > .portal-submenu { position:absolute; left:100%; top:0; z-index:60; width:240px; max-height:min(70vh,500px); overflow-y:auto; box-sizing:border-box; padding:8px; background:#fff; border:1px solid #d9dfd5; border-radius:0 10px 10px 10px; box-shadow:0 8px 22px #263a2826; }
 .portal-nav #wood-portal-list .portal-wood-link, .portal-group .portal-submenu button { padding:10px 12px!important; }
}
@media (max-width:767px) { .portal-group > .portal-submenu { position:static; } }

/* Give content more room on small screens. */
@media screen and (max-width: 650px) {
  .portal-layout > main.wrap { box-sizing:border-box; width:100%; max-width:none; padding:16px 12px 24px; }
  .portal-layout > main.wrap > .page { box-sizing:border-box; padding:0; border:0; border-radius:0; background:transparent; min-width:0; }
  .page .section-intro { padding:16px; margin-bottom:16px; }
  .draft-notice { margin:14px 0 0; padding:12px; }
  .rules-content { margin:16px 0 30px; }
  .rules-content summary { padding:14px; }
  .rules-content p { padding:0 14px 14px; }
}

/* Notion rule spacing and safe color palette */
.rules-content { line-height:1.8; }
.rules-content details { margin:0; }
.rules-content details > summary { line-height:1.55; }
.rules-content details > p { padding:0; margin:0 18px 1em; line-height:1.8; }
.rules-content details > ul,.rules-content details > ol { margin:0 18px 1.3em; padding-left:1.5em; line-height:1.8; }
.rules-content li { margin:.4em 0; }
.rules-content blockquote { margin:0 0 1.3em; padding:0 0 0 16px; border-left:3px solid #777; line-height:1.8; }
.rules-table-scroll { overflow-x:auto; }
.rules-content table { border-collapse:collapse; } .rules-content td { padding:8px; border:1px solid #ddd; }
.notion-color-gray{color:#787774!important}.notion-color-brown{color:#9f6b53!important}.notion-color-orange{color:#d9730d!important}.notion-color-yellow{color:#ad8301!important}.notion-color-green{color:#448361!important}.notion-color-blue{color:#337ea9!important}.notion-color-purple{color:#9065b0!important}.notion-color-pink{color:#c14c8a!important}.notion-color-red{color:#d44c47!important}
.notion-bg-gray{background:#f1f1ef}.notion-bg-brown{background:#f4eeee}.notion-bg-orange{background:#fbecdd}.notion-bg-yellow{background:#fbf3db}.notion-bg-green{background:#edf3ec}.notion-bg-blue{background:#e7f3f8}.notion-bg-purple{background:#f6f3f9}.notion-bg-pink{background:#faf1f5}.notion-bg-red{background:#fdebec}.notion-inline-code{font-family:monospace;background:#f5f2ef;border-radius:3px;padding:0 .2em}

/* Match Notion quote height to the text it contains. */
.rules-content blockquote > p { margin: 4px 0 0; padding: 0; line-height: inherit; }
.rules-content blockquote > p + p { margin-top: .5em; }

/* Preserve intentional line breaks and empty Notion paragraph blocks. */
.rules-content span { white-space:pre-wrap; }
.rules-content p:empty { min-height:1em; }
