/* 美業靈感日報誌 (glow.chiba.tw) — 傳承 AIDaily 早報板資訊架構 × 暖白低飽和美業誌美學
 * 嚴格滿足 360px 零橫向溢位 (A21)、WCAG AA 對比度與清晰鍵盤 :focus-visible 焦點環。
 */
:root {
  --plum: #281e21;
  --plum-2: #382a2e;
  --rose: #b86b5e;
  --rose-light: #e4a99e;
  --paper: #faf7f4;
  --paper-2: #f2ece6;
  --card: #ffffff;
  --ink: #231b1d;
  --ink-2: #4f4346;
  --muted: #6e6064;
  --line: #e4dcd5;
  --focus: #b86b5e;
  --c-nails: #b86b5e;
  --c-lashes_brows: #7e6b8f;
  --c-nonmedical_skincare: #4c7460;
  --c-salon_business: #967240;
  --sans: "Noto Sans TC", "PingFang TC", "Hiragino Sans", "Microsoft JhengHei", -apple-system, sans-serif;
  --num: "Inter", "Noto Sans TC", -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.72 var(--sans);
  overflow-x: clip;
  min-width: 0;
}

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

img, svg { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--rose-light);
  color: #1f1416;
  font-weight: 700;
  padding: 10px 16px;
  z-index: 999;
}
.skip:focus { left: 12px; top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 頂部導覽列 Masthead */
.masthead {
  background: var(--plum);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 58px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; }
.brand i { font-style: normal; color: var(--rose-light); font-weight: 600; font-size: 13px; margin-left: 4px; }

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.topnav a {
  font-size: 14px;
  color: #e4d9dc;
  font-weight: 500;
  padding: 3px 0;
}
.topnav a:hover { color: #fff; }
.topnav a.cta-nav {
  background: rgba(228, 169, 158, 0.16);
  border: 1px solid rgba(228, 169, 158, 0.4);
  color: #fbece9;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
}

/* 試營運公開揭露橫幅 */
.demo-banner {
  background: #f3e6e2;
  color: #4a2e29;
  font-size: 13px;
  border-bottom: 1px solid #e2cdc6;
  padding: 7px 0;
}
.demo-banner .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  justify-content: space-between;
}
.demo-banner a { text-decoration: underline; font-weight: 600; }

/* 早報板 Board（AIDaily 經典大日期 + 左大右小重點網格，改暖深可可底） */
.board {
  background: linear-gradient(180deg, var(--plum) 0%, var(--plum-2) 100%);
  color: #fff;
  padding: 26px 0 32px;
  position: relative;
  overflow: hidden;
}
.board::after {
  content: "";
  position: absolute;
  right: -180px;
  top: -240px;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  border: 80px solid rgba(228, 169, 158, 0.05);
  pointer-events: none;
}
.board .wrap { position: relative; }

.board-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 24px;
  align-items: end;
}
.date { display: flex; flex-direction: column; line-height: 1; margin: 0; }
.date .md {
  font-family: var(--num);
  font-weight: 800;
  font-size: 58px;
  letter-spacing: -0.04em;
}
.date .md b { color: var(--rose-light); font-weight: 800; }
.date .yw {
  margin-top: 8px;
  font-size: 14px;
  color: #d7c8cc;
  font-weight: 500;
}
.stat {
  margin: 0 0 4px;
  font-size: 16px;
  color: #f3eaec;
  max-width: 38em;
}
.daynav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--num);
  font-size: 13px;
  font-weight: 500;
}
.daynav a {
  color: #e4d7da;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px 12px;
}
.daynav a:hover { color: #fff; border-color: rgba(255, 255, 255, 0.55); }

/* 今日 3 則重點卡片（左 1 大卡 + 右 2 橫卡） */
.picks {
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 14px 16px;
}
.pick {
  position: relative;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pick:first-child { grid-column: 1; grid-row: 1 / 3; }
.pick:not(:first-child) { grid-column: 2; flex-direction: row; align-items: stretch; }
.pick-img {
  display: block;
  aspect-ratio: 1.91 / 1;
  background: #1f1619;
  overflow: hidden;
}
.pick:first-child .pick-img { min-height: 200px; }
.pick:not(:first-child) .pick-img {
  flex: 0 0 36%;
  aspect-ratio: 1.5 / 1;
  align-self: center;
  margin: 10px 0 10px 10px;
  border-radius: 8px;
}
.pick-img img { width: 100%; height: 100%; object-fit: cover; }
.pick-body {
  padding: 12px 15px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.pick .n {
  font-family: var(--num);
  font-weight: 800;
  font-size: 12px;
  color: var(--rose-light);
  letter-spacing: 0.04em;
}
.pick-title {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.45;
  color: #fff;
  overflow-wrap: anywhere;
}
.pick:first-child .pick-title { font-size: 21px; line-height: 1.38; }
.pick-why {
  font-size: 13.5px;
  line-height: 1.62;
  color: #dfd2d6;
  overflow-wrap: anywhere;
}
.pick-src {
  margin-top: auto;
  padding-top: 4px;
  font-size: 12px;
  color: #cbbac0;
  position: relative;
  z-index: 2;
}
.pick:hover { border-color: rgba(228, 169, 158, 0.5); }
.pick:hover .pick-title { color: var(--rose-light); }

/* 整卡覆蓋連結（GEO 友善：無文字覆蓋 a，h3 維持純文字） */
.cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cover:focus-visible { outline: 3px solid var(--rose-light); outline-offset: -3px; }

/* 黏頂分類導覽列 Catbar */
.catbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 244, 0.92);
  backdrop-filter: saturate(1.3) blur(8px);
  border-bottom: 1px solid var(--line);
}
.catbar .wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 9px;
  padding-bottom: 9px;
  scrollbar-width: none;
}
.catbar .wrap::-webkit-scrollbar { display: none; }
.catbar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}
.catbar a:hover { color: var(--ink); border-color: var(--rose); }
.catbar a small, .cat h2 small {
  font-family: var(--num);
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-nails { background: var(--c-nails); }
.dot-lashes_brows { background: var(--c-lashes_brows); }
.dot-nonmedical_skincare { background: var(--c-nonmedical_skincare); }
.dot-salon_business { background: var(--c-salon_business); }

/* 內文與今日導讀區 */
.body { padding: 12px 18px 56px; }
.digest h2 { font-size: 20px; margin: 24px 0 12px; }
.editorial {
  font-size: 16.5px;
  line-height: 1.82;
  color: var(--ink);
  background: var(--card);
  border-left: 4px solid var(--rose);
  border-radius: 0 12px 12px 0;
  padding: 15px 18px;
  margin: 0 0 16px;
  box-shadow: 0 1px 3px rgba(40, 30, 33, 0.04);
}
.about { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; max-width: 54em; }
.about a { color: var(--rose); font-weight: 600; text-decoration: underline; }

.stats {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 0 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.stats th, .stats td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.stats th { color: var(--muted); font-weight: 600; font-size: 12px; background: var(--paper-2); }
.stats td:nth-child(2) { font-family: var(--num); font-weight: 700; white-space: nowrap; }
.stats td a { font-weight: 700; color: var(--ink); }
.stats td a:hover { color: var(--rose); }

/* 分類條目卡片網格 */
.cat h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 21px;
  font-weight: 800;
  margin: 38px 0 14px;
}
.cat-sublink {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--rose);
}
.items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.item {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.item:hover { border-color: var(--rose); }
.item .thumb {
  display: block;
  aspect-ratio: 1.91 / 1;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
}
.badge-comm {
  background: #f8ebe6;
  color: #8c4539;
  border: 1px solid #e6c6bc;
}
.badge-event {
  background: #efe9dc;
  color: #6b5226;
}
.item .t {
  margin: 0;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.item:hover .t { color: var(--rose); }
.sum {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.why-box {
  position: relative;
  z-index: 2;
  background: var(--paper);
  border-left: 3px solid var(--rose);
  padding: 8px 11px;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
}
.why-box strong { color: var(--rose); font-weight: 700; }

.correction-pill {
  position: relative;
  z-index: 2;
  background: #fff6e5;
  border: 1px solid #e6c88a;
  color: #69490f;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
}

.item-meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12.5px;
  color: var(--muted);
  align-items: center;
  position: relative;
  z-index: 2;
}
.item-meta a.ext-link {
  color: var(--rose);
  font-weight: 700;
  text-decoration: underline;
}

/* 內頁通用版面（詳頁、分類、歸檔、政策、投稿、後台） */
.page { padding: 30px 18px 60px; }
.page h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.35;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumb a { text-decoration: underline; }

.story-card-full {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  max-width: 820px;
}
.story-hero-img {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 14px 0 8px;
}
.credit-line { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.evidence-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.evidence-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}
.evidence-list blockquote {
  margin: 6px 0 0;
  padding-left: 10px;
  border-left: 3px solid var(--muted);
  color: var(--ink-2);
  font-style: italic;
  overflow-wrap: anywhere;
}

/* 表單樣式（投稿與管理後台） */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 5px;
  color: var(--ink);
}
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field input[type="password"],
.field input[type="date"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbbec2;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}
.field-check input { margin-top: 5px; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--plum);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--rose); }
.btn-secondary {
  background: var(--paper-2);
  color: var(--ink);
  border-color: var(--line);
}
.btn-danger {
  background: #8e2c2c;
  color: #fff;
}

.alert {
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-ok { background: #e8f3ec; border: 1px solid #b5d6c1; color: #1f4c30; }
.alert-err { background: #fbeae8; border: 1px solid #e5b5ae; color: #6e2219; }

.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px 16px;
  align-items: baseline;
}
.archive-list a.date-link {
  font-family: var(--num);
  font-weight: 800;
  font-size: 18px;
  color: var(--plum);
}
.archive-list a.date-link:hover { color: var(--rose); }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 13.5px;
  padding: 24px 0 34px;
}
.site-footer p { margin: 0 0 6px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0;
}
.footer-links a { text-decoration: underline; font-weight: 600; }

/* 響應式行動優先（確保 360px 零橫向捲軸） */
@media (max-width: 880px) {
  .board-head { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .date .md { font-size: 46px; }
  .picks { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .pick:first-child { grid-column: 1; grid-row: auto; }
  .pick:not(:first-child) { grid-column: 1; flex-direction: column; }
  .pick:not(:first-child) .pick-img {
    flex: none;
    width: 100%;
    margin: 0;
    border-radius: 0;
    aspect-ratio: 1.91 / 1;
  }
  .items { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .wrap { padding: 0 14px; }
  .stats th:nth-child(3), .stats td:nth-child(3) { display: none; }
  .archive-list li { grid-template-columns: minmax(0, 1fr); }
  .story-card-full, .form-card { padding: 15px; }
  .page h1 { font-size: 23px; }
}
