:root {
  --bg: #f7f6f1;
  --paper: #fffdf8;
  --card: #ffffff;
  --ink: #263547;
  --muted: #6f7d8d;
  --line: #e2d9cb;
  --line-strong: #d2c5b3;
  --green: #9fb995;
  --green-strong: #6d9172;
  --cream: #fff4df;
  --sand: #d9b98c;
  --rose: #f1b6a8;
  --shadow: 0 18px 44px rgba(93, 74, 47, 0.11);
  --radius: 20px;
  --font: ui-sans-serif, system-ui, -apple-system, "Noto Sans TC", "PingFang TC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(159, 185, 149, 0.24), transparent 34rem),
    radial-gradient(circle at right 18%, rgba(241, 182, 168, 0.20), transparent 28rem),
    linear-gradient(180deg, #fffaf1 0%, var(--bg) 42%, #f4f7f2 100%);
  line-height: 1.65;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button:focus-visible,
a:focus-visible,
.board-row:focus-visible {
  outline: 3px solid rgba(109, 145, 114, 0.34);
  outline-offset: 3px;
}

.board-wrap {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px 16px 26px;
}

.board-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 138px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow);
}

.board-header::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(159, 185, 149, 0.38);
  border-radius: 16px;
  pointer-events: none;
}

.brand-block {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 10px 22px rgba(93, 74, 47, 0.08);
}

.brand-title {
  font-size: clamp(21px, 2.5vw, 28px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.16;
}

.brand-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.hero-icon {
  position: relative;
  z-index: 1;
  width: min(190px, 24vw);
  max-height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(93, 74, 47, 0.12));
}

.board-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  color: #42536a;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(93, 74, 47, 0.07);
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--chip-color, var(--green));
}

.chip.active {
  border-color: rgba(109, 145, 114, 0.48);
  background: #edf5e9;
  color: #304a35;
}

.board-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid rgba(226, 217, 203, 0.74);
}

.panel-head h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.board-stat {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(159, 185, 149, 0.42);
  border-radius: 999px;
  background: #f1f7ed;
  color: #486f4d;
  font-size: 13px;
  font-weight: 850;
}

.board-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.board-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(226, 217, 203, 0.82);
  border-radius: 18px;
  background: var(--card);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(93, 74, 47, 0.06);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.board-row:hover {
  transform: translateY(-1px);
  border-color: rgba(109, 145, 114, 0.42);
  box-shadow: 0 16px 36px rgba(93, 74, 47, 0.10);
}

.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f3efe5;
  color: #5a4a38;
  font-size: 12px;
  font-weight: 900;
}

.badge.pin {
  background: #ffe9dd;
  color: #a04d38;
}

.badge.category {
  background: #edf5e9;
  color: #486f4d;
}

.date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.row-title {
  margin: 0;
  color: #192638;
  font-size: 18px;
  font-weight: 920;
  line-height: 1.32;
}

.row-excerpt {
  display: -webkit-box;
  margin: 8px 0 0;
  color: #526274;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  color: #7b6d5f;
  font-size: 12px;
  font-weight: 800;
}

.row-arrow {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #6f8d73;
  background: #fffdf8;
}

.empty {
  padding: 24px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.empty strong {
  display: block;
  margin-bottom: 4px;
}

.board-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 4px;
  color: var(--muted);
  font-size: 13px;
}

.board-footer strong,
.board-footer span {
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.84);
  color: #526274;
  font-weight: 850;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(35, 30, 24, 0.48);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(700px, 100%);
  max-height: min(88vh, 820px);
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 24px 82px rgba(35, 30, 24, 0.28);
}

.modal-card:focus {
  outline: none;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px 15px;
  border-bottom: 1px solid rgba(226, 217, 203, 0.78);
  background:
    radial-gradient(circle at right top, rgba(159, 185, 149, 0.20), transparent 18rem),
    linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%);
}

.modal-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.modal-card h2 {
  margin: 6px 0 0;
  color: #192638;
  font-size: 21px;
  line-height: 1.25;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.close-btn,
.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  cursor: pointer;
}

.close-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-color: var(--line);
  background: #ffffff;
  color: #405267;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(93, 74, 47, 0.08);
}

.modal-scroll {
  max-height: calc(min(88vh, 820px) - 112px);
  overflow: auto;
  padding: 18px 20px 20px;
}

.detail-body {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(226, 217, 203, 0.82);
  border-radius: 18px;
  background: #ffffff;
  color: #33455b;
  font-size: 15px;
  line-height: 1.86;
  box-shadow: 0 10px 22px rgba(93, 74, 47, 0.05);
}

.detail-body p {
  margin: 0 0 12px;
}

.detail-body h3 {
  margin: 18px 0 8px;
  color: #253649;
  font-size: 16px;
}

.detail-body ul,
.detail-body ol {
  margin: 8px 0 14px 22px;
  padding: 0;
}

.detail-body li {
  margin: 5px 0;
}

.detail-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.detail-gallery {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(226, 217, 203, 0.9);
  border-radius: 20px;
  background:
    radial-gradient(circle at right top, rgba(241, 182, 168, 0.16), transparent 16rem),
    #fbf5eb;
  box-shadow: 0 10px 22px rgba(93, 74, 47, 0.05);
}

.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #405267;
}

.gallery-head strong {
  font-size: 15px;
  font-weight: 950;
}

.gallery-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.detail-images.single {
  display: flex;
  justify-content: center;
}

.detail-images.single .image-link {
  width: min(380px, 100%);
}

.image-link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  padding: 8px;
  box-shadow: 0 10px 22px rgba(93, 74, 47, 0.08);
}

.image-link img {
  display: block;
  width: 100%;
  max-height: min(62vh, 560px);
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.14s ease;
}

.image-link:hover img {
  transform: scale(1.012);
}

.lightbox {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 17, 16, 0.86);
}

.lightbox img {
  max-width: min(960px, 92vw);
  max-height: 86vh;
  border-radius: 16px;
  background: #111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.40);
}

.lightbox-close,
.lightbox-nav,
.lightbox-open {
  position: absolute;
  min-width: 44px;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 900;
}

.lightbox-close {
  top: 14px;
  right: 14px;
  font-size: 22px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
}

.lightbox-nav.prev {
  left: 14px;
}

.lightbox-nav.next {
  right: 14px;
}

.lightbox-open {
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .board-wrap {
    padding: 14px 12px 20px;
  }

  .board-header {
    min-height: 0;
    padding: 18px;
    border-radius: 22px;
  }

  .hero-icon {
    width: 116px;
    max-height: 96px;
  }

  .brand-title {
    font-size: 21px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .board-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .board-chips::-webkit-scrollbar {
    height: 0;
  }

  .panel-head,
  .board-row,
  .board-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .board-row {
    display: block;
    padding: 15px;
  }

  .row-arrow {
    display: none;
  }

  .detail-images {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .modal-overlay {
    align-items: flex-start;
    padding: 10px;
  }

  .board-header {
    align-items: flex-start;
    padding: 16px;
  }

  .board-header::before {
    inset: 10px;
  }

  .brand-block {
    width: 100%;
    align-items: flex-start;
    padding-right: 64px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }

  .brand-title {
    font-size: 19px;
    overflow-wrap: anywhere;
  }

  .brand-subtitle {
    max-width: 15em;
  }

  .hero-icon {
    position: absolute;
    right: 12px;
    bottom: 10px;
    width: 54px;
    max-height: 54px;
    opacity: 0.36;
  }

  .modal-card {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  .modal-head {
    position: relative;
    padding: 16px 16px 13px;
    padding-right: 58px;
  }

  .close-btn {
    position: absolute;
    top: 13px;
    right: 13px;
  }

  .modal-scroll {
    max-height: calc(100vh - 126px);
    padding: 14px;
  }

  .detail-images.single .image-link {
    width: min(320px, 100%);
  }

  .detail-body {
    padding: 14px;
  }

  .detail-gallery {
    padding: 12px;
  }
}
