.trend-page { padding: 36px 0 72px; }
.trend-shell { max-width: 1040px; }
.trend-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 24px; }
.trend-intro h1 { margin: 6px 0 10px; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.25; }
.trend-intro p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.8; }
.trend-intro-actions { display: flex; gap: 10px; align-items: center; }
.trend-back-link { white-space: nowrap; }
.trend-privacy { margin: 0 0 28px; padding: 14px 18px; border-left: 3px solid var(--primary); background: #edf8f2; color: #315b4b; }
.trend-card { margin-top: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(29, 66, 52, .06); }
.trend-card-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.trend-card-head h2 { margin: 0 0 6px; font-size: 1.35rem; }
.trend-card-head p { margin: 0; color: var(--muted); }
.trend-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.trend-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trend-metric { min-height: 96px; padding: 16px; border: 1px solid #dce9e3; border-radius: 8px; background: #f7fbf8; }
.trend-metric span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .88rem; }
.trend-metric strong { color: #173f31; font-size: 1.35rem; }
.trend-reading { margin: 18px 0 0; padding: 16px 18px; border-radius: 8px; background: #f1f8ea; line-height: 1.7; }
.trend-chart-wrap { overflow-x: auto; }
.trend-chart { display: block; width: 100%; min-width: 560px; height: auto; }
.trend-chart .grid { stroke: #dce7e1; stroke-width: 1; }
.trend-chart .line { fill: none; stroke: #15966f; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.trend-chart .point { fill: #fff; stroke: #087c5c; stroke-width: 4; }
.trend-chart text { fill: #607068; font: 13px "Noto Sans KR", sans-serif; }
.trend-table-wrap { overflow-x: auto; margin-top: 18px; }
.trend-table { width: 100%; border-collapse: collapse; }
.trend-table th, .trend-table td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.trend-table th { color: #52645c; font-size: .86rem; }
.trend-table-actions { display: flex; gap: 6px; }
.trend-small-button { padding: 7px 10px; border: 1px solid #c9d9d1; border-radius: 6px; background: #fff; color: #245b48; cursor: pointer; }
.trend-small-button.is-danger { color: #a33b3b; }
.trend-empty { padding: 34px 20px; text-align: center; border: 1px dashed #bed2c8; border-radius: 8px; background: #f8fbf9; }
.trend-empty h2 { margin-top: 0; }
.trend-edit { margin-top: 18px; padding: 20px; border: 1px solid #bcd5ca; border-radius: 8px; background: #f8fcfa; }
.trend-edit h3 { margin: 0 0 16px; }
.trend-edit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.trend-edit label span { display: block; margin-bottom: 6px; font-weight: 700; }
.trend-edit input, .trend-edit select { width: 100%; padding: 11px 12px; border: 1px solid #bfcfc7; border-radius: 6px; background: #fff; font: inherit; }
.trend-import-preview { margin-top: 14px; padding: 16px; border: 1px solid #bcd5ca; border-radius: 8px; background: #f8fcfa; }
.trend-status { min-height: 24px; margin: 12px 0 0; color: #32644f; }
.trend-backup-note { margin: 0 0 16px; color: var(--muted); line-height: 1.7; }
@media (max-width: 760px) {
  .trend-page { padding-top: 24px; }
  .trend-intro { grid-template-columns: 1fr; align-items: start; }
  .trend-intro-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .trend-intro-actions .button { justify-content: center; text-align: center; }
  .trend-card { padding: 18px; }
  .trend-card-head { display: block; }
  .trend-card-head .trend-actions { margin-top: 14px; }
  .trend-summary { grid-template-columns: repeat(2, 1fr); }
  .trend-edit-grid { grid-template-columns: 1fr; }
  .trend-chart { min-width: 0; }
  .trend-chart text { font-size: 11px; }
  .trend-table-wrap { overflow: visible; }
  .trend-table, .trend-table tbody, .trend-table tr, .trend-table td { display: block; width: 100%; }
  .trend-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .trend-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
  .trend-table td { padding: 0; border: 0; white-space: normal; }
  .trend-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #687a71; font-size: .76rem; }
  .trend-table-actions { grid-column: 1 / -1; }
  .trend-table-actions::before { width: 100%; }
}
@media print {
  .site-header, .site-footer, .trend-back-link, .trend-actions, .trend-backup-card, .trend-table-actions, .trend-edit { display: none !important; }
  .trend-page { padding: 0; }
  .trend-card { box-shadow: none; break-inside: avoid; }
}
