@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.css');

/* Shared by the daily briefing and greenhouse simulator, including embeds. */
:root { --fm-ink: #26392e; --fm-muted: #58675d; --fm-line: #dce5dd; }
body { font-family: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; color: var(--fm-ink); letter-spacing: -.015em; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; }
button, input, select, textarea { font-family: inherit; font-size: 16px; letter-spacing: inherit; }
button, select, input:not([type=range]):not([type=checkbox]):not([type=radio]) { min-height: 44px; }
a { text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #387244; outline-offset: 3px; }
h1, h2, summary { letter-spacing: -.03em; text-wrap: balance; }
p, li { line-height: 1.85; }
strong, b { font-weight: 650; }

body:has(.page-head) { max-width: 1060px; margin: 0 auto; padding: 24px 20px; font-size: 18px; line-height: 1.85; }
.page-head { padding: 0 0 28px; }
.page-head h1 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.35; font-weight: 750; margin-bottom: 12px; }
.page-head .date { color: var(--fm-muted); font-size: 15px; }
.lead { font-size: 18px; color: var(--fm-ink); padding: 24px 28px; line-height: 1.85; background: #f0f5ee; border-color: #3e633b; margin-bottom: 28px; }
.page-head ~ .card { border-color: var(--fm-line); padding: 28px 32px; margin-bottom: 28px; }
.page-head ~ .card h2 { font-size: 24px; line-height: 1.45; margin-bottom: 22px; color: #173e29; }
.page-head ~ .card p, .page-head ~ .card > ul { max-width: 100%; }
.page-head ~ .card p { margin-bottom: 20px; }
.page-head ~ .card li { margin-bottom: 12px; }
.subhead { margin: 26px 0 12px; font-size: 19px; color: #173e29; }
.alert, .tip { font-size: 16px; line-height: 1.85; padding: 18px 20px; }
.src, .trend-note, .tab-sub, .footer-note { color: var(--fm-muted); font-size: 14px; line-height: 1.8; }
.src { margin-top: 16px; }
.page-head ~ .card table { font-size: 16px; line-height: 1.65; }
.page-head ~ .card :is(th,td) { padding: 12px 10px; }
.page-head ~ .card td:nth-child(n+2) { font-variant-numeric: tabular-nums; }
.chart-title { font-size: 17px; line-height: 1.6; margin-bottom: 12px; }
.chart-axis-label, .crow, .cval { font-size: 14px; }
.tab-btn { font-size: 15px; padding: 8px 16px; }
#local-app .lc-s, #local-app .lc-foot { font-size: 15px !important; line-height: 1.8 !important; color: var(--fm-muted) !important; }
#local-app .lc-k { font-size: 15px !important; color: #455b4a !important; }
#local-app :is(select,input) { font-size: 16px !important; }

/* Keep settings legible without reducing the simulation's drawing area. */
.wrap { padding: 28px 20px; font-size: 16px; line-height: 1.75; }
.wrap header { margin-bottom: 24px; }
.wrap header h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.4; margin-bottom: 14px; }
.wrap header p { font-size: 17px; color: #455b4a; max-width: 100%; line-height: 1.85; }
.wrap .top { gap: 12px; margin-bottom: 24px; }
.wrap .grid { grid-template-columns: 360px minmax(0, 1fr); gap: 24px; }
.wrap .main, .wrap .side { min-width: 0; }
.wrap .card { border-color: var(--fm-line); padding: 20px; margin-bottom: 20px; }
.wrap .card h2 { font-size: 20px; line-height: 1.55; margin-bottom: 18px; }
.wrap details > summary { font-size: 18px; line-height: 1.6; margin-bottom: 16px; }
.wrap .fld { font-size: 16px; padding: 10px 0; gap: 12px; }
.wrap .fld :is(select,input[type=number]) { font-size: 16px; padding: 8px; max-width: 100%; }
.wrap .fld .fl { min-width: 0; }
.wrap .fl i, .wrap .numw em, .wrap .axisw b, .wrap .note, .wrap #status { font-size: 14px; color: var(--fm-muted); line-height: 1.75; }
.wrap .axisw { max-width: 180px; }
.wrap .axisw select { max-width: 180px; }
.wrap .btn, .wrap .ctl select, .wrap .top select { font-size: 16px; padding: 9px 12px; }
.wrap .btn.sm { font-size: 14px; }
.wrap .about, .wrap .tips li, .wrap .sumt, .wrap #calout p { font-size: 16px; line-height: 1.85; }
.wrap .sumt :is(th,td) { padding: 12px 10px; }
.wrap .note, .wrap .leg, .wrap #chips span { font-size: 14px; }
.wrap small[style*="color:#888"] { color: var(--fm-muted) !important; font-size: 14px !important; }
.wrap #calcard > p[style] { font-size: 16px !important; line-height: 1.85; }

@media (max-width: 1050px) { .wrap .grid { grid-template-columns: 1fr; } .wrap .side { position: static; max-height: none; overflow: visible; } }
@media (max-width: 600px) {
  body:has(.page-head) { padding: 20px 12px; font-size: 17px; }
  .lead { padding: 20px; font-size: 17px; }
  .page-head ~ .card { padding: 22px 18px; margin-bottom: 20px; }
  .page-head ~ .card h2 { font-size: 22px; }
  .page-head ~ .card table { font-size: 14px; }
  .page-head ~ .card :is(th,td) { padding: 10px 6px; }
  .page-head ~ .card th:nth-child(2), .page-head ~ .card td:nth-child(2) { overflow-wrap: anywhere; }
  .wrap { padding: 20px 12px; }
  .wrap .card { padding: 18px 16px; }
  .wrap header h1 small { display: block; margin-top: 8px; }
  .wrap .sumt th:first-child { width: auto; min-width: 90px; }
  .wrap .fld .axisw { max-width: 170px; }
  .wrap .fld .axisw select { max-width: 170px; }
  .wrap .ctl input[type=range] { flex-basis: 100%; }
}

/* Embedded pages share the host site's content edges. Standalone gutters stay intact. */
html.farmily-embedded body:has(.page-head) { box-sizing: border-box; width: 100%; max-width: none; padding-left: 0; padding-right: 0; }
html.farmily-embedded .wrap { box-sizing: border-box; width: 100%; max-width: none; padding-left: 0; padding-right: 0; }

/* ── FARMILY 사이트 톤 맞춤 (2026-11-15) : 오늘의 농업 소식 전용. 되돌리려면 이 주석부터 끝까지 삭제 ── */
body:has(.page-head) { --fd-ink: #10211D; --fd-text: #2B3832; --fd-muted: #66716B; --fd-line: #E5EAE2; --fd-soft: #F6F8F4; --fd-green: #2E7D5B; color: var(--fd-text); }
body:has(.page-head) a { color: #1F5A45; text-decoration-color: #B9D3C1; text-decoration-thickness: 1px; }
body:has(.page-head) a:hover { color: var(--fd-green); text-decoration-color: currentColor; }

/* 머리말 */
.page-head { padding: 4px 0 28px !important; }
.page-head h1::before { content: "DAILY FARM BRIEFING"; display: block; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--fd-green); }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px) !important; font-weight: 800 !important; color: var(--fd-ink); letter-spacing: -.02em; margin: 0 0 10px !important; }
.page-head .date { font-size: 14px !important; color: var(--fd-muted) !important; }

/* 오늘의 한 줄 요약 */
.lead { background: var(--fd-soft) !important; border: 1px solid var(--fd-line) !important; border-left: 4px solid var(--fd-green) !important; border-radius: 20px !important; color: var(--fd-text) !important; }

/* 카드 */
.page-head ~ .card { border: 1px solid var(--fd-line) !important; border-radius: 20px !important; box-shadow: 0 1px 2px rgba(16,33,29,.03); }
.page-head ~ .card h2 { display: flex; align-items: center; gap: 10px; font-size: 22px !important; font-weight: 800 !important; color: var(--fd-ink) !important; letter-spacing: -.02em; padding-bottom: 18px; border-bottom: 1px solid var(--fd-line); margin-bottom: 24px !important; }
.page-head ~ .card .subhead { display: flex; align-items: center; gap: 8px; margin: 30px 0 12px !important; font-size: 17px !important; font-weight: 700; color: var(--fd-ink) !important; }
.page-head ~ .card .subhead::before { content: ""; flex: none; width: 4px; height: 16px; border-radius: 2px; background: var(--fd-green); }
.page-head ~ .card li::marker { color: var(--fd-green); }
.page-head ~ .card li strong:first-child { color: var(--fd-ink); }

/* 주의 상자 · 출처 */
.page-head ~ .card .alert { background: #FFF6E5 !important; border: 1px solid #F5DFB3; border-radius: 14px !important; color: #4A3A12; }
.page-head ~ .card .src { margin-top: 20px !important; padding-top: 14px; border-top: 1px dashed var(--fd-line); font-size: 13px !important; color: var(--fd-muted) !important; }

/* 시세 표 */
.page-head ~ .card table { border-collapse: separate !important; border-spacing: 0; width: 100%; border: 1px solid var(--fd-line); border-radius: 14px; overflow: hidden; }
.page-head ~ .card th { background: var(--fd-soft) !important; color: var(--fd-muted) !important; font-size: 14px; font-weight: 600; text-align: left; border-bottom: 1px solid var(--fd-line) !important; }
.page-head ~ .card td { border-bottom: 1px solid #EEF2EC !important; }
.page-head ~ .card tr:last-child td { border-bottom: 0 !important; }
.page-head ~ .card td:first-child { font-weight: 600; color: var(--fd-ink); }
.page-head ~ .card tbody tr:hover td { background: #FAFCF9; }
.page-head ~ .card .up { color: #D9452F !important; font-weight: 600; }
.page-head ~ .card .down { color: #2563C9 !important; font-weight: 600; }
.page-head ~ .card .cbar { border-radius: 3px; }
.page-head ~ .card .cbar.up-bg { background: #E8705A !important; }
.page-head ~ .card .cbar.down-bg { background: #5B8DD9 !important; }
.page-head ~ .card .chart-title { color: var(--fd-ink); }

/* 품목 탭 · 기간 버튼 */
.page-head ~ .card .tab-btn { border-radius: 999px !important; border: 1px solid #D5DDD3 !important; background: #fff !important; color: var(--fd-text) !important; font-weight: 600; }
.page-head ~ .card .tab-btn:hover { border-color: var(--fd-green) !important; color: var(--fd-green) !important; }
.page-head ~ .card .tab-btn.active { background: var(--fd-ink) !important; border-color: var(--fd-ink) !important; color: #fff !important; }

/* 맺음말 */
.footer-note { margin-top: 8px !important; padding: 20px 24px; border-radius: 16px; background: var(--fd-soft); font-size: 14px !important; color: var(--fd-muted) !important; }

@media (max-width: 600px) {
  .page-head ~ .card h2 { font-size: 20px !important; padding-bottom: 14px; margin-bottom: 18px !important; }
  .lead, .page-head ~ .card { border-radius: 16px !important; }
  .page-head ~ .card table { border-radius: 10px; }
  .footer-note { padding: 16px 18px; }
}
