/* ==========================================================================
   news.css — 電台消息報恁知：官網區塊樣式 + 後台樣式（共用品牌色）
   ========================================================================== */
:root {
  --paper: #faf6ef; --surface: #fff; --ink: #1f2b33; --ink-soft: #44535c; --muted: #64717a;
  --mint: #39bdb7; --mint-dark: #12807c; --peach: #f8ae78; --red: #e8434a;
  --line: rgba(31,43,51,.10); --line-strong: rgba(31,43,51,.16);
  --shadow-sm: 0 1px 2px rgba(31,43,51,.05), 0 4px 12px rgba(31,43,51,.05);
  --shadow-md: 0 2px 4px rgba(31,43,51,.05), 0 12px 32px rgba(82,61,42,.10);
  --ease-spring: cubic-bezier(.22,1,.36,1); --radius-lg: 24px; --radius-md: 16px;
}

/* ---------- 官網區塊 ---------- */
.news-section { padding: 72px 0 0; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.news-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-spring);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-card.is-pinned { border-color: rgba(232,67,74,.3); }
.news-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--paper); }
.news-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 0; }
.news-head time { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.news-pin { padding: 2px 10px; border-radius: 999px; background: rgba(232,67,74,.1); color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.news-card h3 { margin: 6px 22px 0; font-size: 21px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; }
.news-body { padding: 10px 22px 22px; color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.news-body p { margin: 0 0 .7em; }
.news-body h3, .news-body h4 { margin: .9em 0 .3em; color: var(--ink); font-size: 18px; }
.news-body ul, .news-body ol { margin: 0 0 .7em; padding-left: 1.4em; }
.news-body a { color: var(--mint-dark); text-decoration: underline; text-underline-offset: 3px; }
.news-body figure { margin: 10px 0; }
.news-body img { max-width: 100%; height: auto; border-radius: 12px; }
.news-body img.nr-emoji { display: inline-block; width: 1.5em; height: 1.5em; margin: 0 .08em; vertical-align: -.35em; border-radius: 0; }
.news-body .news-cover-hidden { display: none; }
.news-more { display: flex; justify-content: center; margin-top: 20px; }
.news-more button, .news-more a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 10px 22px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}
.news-more button:hover { background: var(--ink); color: #fff; }
.news-toggle { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 6px 14px; border: 0; border-radius: 999px; background: rgba(57,189,183,.12); color: var(--mint-dark); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.news-card.is-collapsed .news-body > *:nth-child(n+3):not(.news-toggle) { display: none; }
@media (max-width: 640px) { .news-section { padding-top: 56px; } .news-grid { grid-template-columns: 1fr; } }

/* ---------- 後台 ---------- */
.nr-admin { margin: 0; background: var(--paper); color: var(--ink); font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; font-size: 17px; line-height: 1.7; }
.nr-wrap { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 120px; }
.nr-admin main.nr-card { width: min(480px, calc(100% - 32px)); margin: 10vh auto; }
.nr-card { padding: 26px 28px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.nr-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.nr-admin h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.nr-admin h2 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.nr-help { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.nr-ok { padding: 12px 16px; border-radius: 12px; background: rgba(57,189,183,.12); color: var(--mint-dark); font-weight: 700; }
.nr-err { padding: 12px 16px; border-radius: 12px; background: rgba(232,67,74,.1); color: var(--red); font-weight: 700; }
.nr-admin label { display: block; margin: 0 0 14px; font-weight: 700; }
.nr-admin input[type="text"], .nr-admin input[type="password"], .nr-admin input[type="date"], .nr-admin select {
  display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface);
  font: inherit; font-size: 17px; color: var(--ink);
}
.nr-admin input:focus, .nr-admin select:focus, .nr-editor:focus { outline: 3px solid rgba(57,189,183,.45); outline-offset: 2px; border-color: var(--mint); }
.nr-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .3s, color .3s, transform .3s var(--ease-spring); }
.nr-btn:hover { background: rgba(57,189,183,.12); color: var(--mint-dark); }
.nr-btn:active { transform: scale(.96); }
.nr-btn.nr-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.nr-btn.nr-primary:hover { background: var(--mint-dark); border-color: var(--mint-dark); }
.nr-btn.nr-big { min-height: 52px; padding: 10px 24px; font-size: 17px; }
.nr-btn.nr-quiet { border-color: transparent; color: var(--muted); }
.nr-btn.nr-danger { color: var(--red); border-color: rgba(232,67,74,.3); }
.nr-btn.nr-danger:hover { background: rgba(232,67,74,.1); color: var(--red); }
.nr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.nr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nr-list li { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.nr-list li.is-draft { opacity: .7; }
.nr-thumb { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 12px; background: var(--surface); overflow: hidden; font-size: 28px; }
.nr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nr-meta { min-width: 0; }
.nr-meta strong { display: block; font-size: 17px; }
.nr-meta small { display: block; color: var(--muted); font-size: 14px; }
.nr-excerpt { display: block; color: var(--ink-soft); font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nr-row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.nr-row-actions form { margin: 0; }
.nr-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--paper); position: sticky; top: 0; z-index: 2; }
.nr-toolbar button { min-width: 44px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.nr-toolbar button:hover { background: rgba(57,189,183,.12); color: var(--mint-dark); }
.nr-sep { width: 1px; height: 28px; background: var(--line-strong); margin: 0 4px; }
.nr-editor { min-height: 260px; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 0 0 12px 12px; background: var(--surface); font-size: 18px; line-height: 1.8; }
.nr-editor:empty::before { content: attr(data-placeholder); color: var(--muted); }
.nr-editor img { max-width: 100%; height: auto; border-radius: 12px; }
.nr-editor img.nr-emoji { width: 1.5em; height: 1.5em; vertical-align: -.35em; border-radius: 0; }
.nr-editor h3 { font-size: 20px; margin: .8em 0 .3em; }
.nr-emoji-panel { padding: 14px; border: 1px solid var(--line-strong); border-bottom: 0; background: var(--surface); }
.nr-emoji-head { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; }
.nr-emoji-head span { color: var(--muted); font-size: 14px; }
.nr-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-bottom: 12px; }
.nr-emoji-grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font: inherit; font-size: 12px; color: var(--ink-soft); cursor: pointer; }
.nr-emoji-grid button:hover { background: rgba(57,189,183,.12); border-color: var(--mint); }
.nr-emoji-unicode { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.nr-emoji-unicode button { font-size: 26px; padding: 6px; }
.nr-upload-status { min-height: 1.4em; }
.nr-publish { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 16px 0 8px; }
.nr-check { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.nr-check input { width: 22px; height: 22px; accent-color: var(--mint-dark); }
.nr-sticky { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--surface) 70%, transparent); }
.nr-preview { max-width: 520px; }
@media (max-width: 720px) {
  .nr-two { grid-template-columns: 1fr; }
  .nr-list li { grid-template-columns: 56px 1fr; }
  .nr-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .nr-thumb { width: 56px; height: 56px; }
}

/* ---------- 節目表後台 ---------- */
.nr-warn { padding: 12px 16px; border-radius: 12px; background: rgba(248,174,120,.18); color: var(--ink); font-weight: 500; }
.nr-warn ul { margin: 6px 0 0; padding-left: 22px; }
.nr-warn li { margin: 4px 0; }
.nr-schedule-tools .nr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.nr-schedule-tools form { display: inline; }
.nr-slots { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.nr-slot { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; align-items: end; }
.nr-slot label { margin-bottom: 10px; }
.nr-slot-time { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.nr-slot-time input { font-variant-numeric: tabular-nums; }
.nr-slot-summary { grid-column: 1 / -1; }
.nr-slot-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.nr-slot-foot .nr-btn { min-height: 40px; font-size: 15px; }
@media (max-width: 640px) {
  .nr-slot { grid-template-columns: 1fr; }
}
