/* Odyssey 1999-2001 UBB Archive — Warm Parchment + Mobile-Readable (>=17px at 390px) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0 0 40px 0;
  background: #E3C18F;
  color: #1e1408;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}
a { color: #473416; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #800000; }
acronym, abbr { text-decoration: none; border-bottom: none; }
img { max-width: 100%; height: auto; vertical-align: middle; }

/* Top archive navigation bar */
.archive-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #473416;
  color: #f8ecd5;
  padding: 10px 14px;
  font-size: 17px;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  border-bottom: 2px solid #8a642e;
}
.archive-bar a { color: #ffe6b3; text-decoration: none; font-weight: 600; }
.archive-bar a:hover { text-decoration: underline; }
.archive-bar .archive-links { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.archive-bar .archive-tag {
  font-size: 14px;
  background: #6b4c1e;
  color: #fff3d6;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Container for index and board pages */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 14px;
}
.site-header {
  text-align: center;
  background: #D9AD6C;
  border: 1px solid #b58845;
  border-radius: 8px;
  padding: 16px 14px;
  margin-bottom: 16px;
}
.site-header img.banner {
  display: block;
  margin: 0 auto 10px auto;
  border-radius: 4px;
}
.site-header h1 {
  margin: 0 0 8px 0;
  font-size: 23px;
  line-height: 1.3;
  color: #5c1909;
}
.site-header .subtitle {
  margin: 0;
  font-size: 17px;
  color: #3d2a10;
}
.notice-box {
  background: #f2dfc0;
  border-left: 4px solid #800000;
  padding: 12px 14px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 18px;
  font-size: 17px;
}

/* Category sections on index page */
.cat-section {
  margin-bottom: 22px;
}
.cat-heading {
  background: #D9AD6C;
  color: #473416;
  font-size: 20px;
  font-weight: 700;
  padding: 10px 14px;
  margin: 0;
  border: 1px solid #b58845;
  border-radius: 6px 6px 0 0;
}
.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #b58845;
  border-top: none;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}
.board-item {
  background: #E9CDA5;
  border-bottom: 1px solid #cfa569;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
}
.board-item:nth-child(even) { background: #E7C798; }
.board-item:last-child { border-bottom: none; }
.board-name {
  font-size: 19px;
  font-weight: 700;
}
.board-num {
  font-size: 15px;
  color: #6b4c1e;
  font-weight: 400;
  margin-left: 6px;
}
.board-meta {
  font-size: 17px;
  color: #4f3a1c;
  white-space: nowrap;
}

/* Topic list on board pages */
.breadcrumb {
  font-size: 17px;
  margin: 0 0 12px 0;
  color: #4f3a1c;
}
.board-header {
  background: #D9AD6C;
  border: 1px solid #b58845;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.board-header h1 {
  margin: 0 0 6px 0;
  font-size: 22px;
  color: #5c1909;
}
.board-header .meta {
  margin: 0;
  font-size: 17px;
  color: #3d2a10;
}
.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #b58845;
  border-radius: 6px;
  overflow: hidden;
}
.topic-row {
  background: #E9CDA5;
  border-bottom: 1px solid #cfa569;
  padding: 11px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.topic-row:nth-child(even) { background: #E7C798; }
.topic-row:last-child { border-bottom: none; }
.topic-title {
  font-size: 18px;
  font-weight: 600;
  flex: 1 1 240px;
}
.topic-page2 {
  font-size: 16px;
  margin-left: 8px;
  font-weight: 400;
}
.topic-date {
  font-size: 17px;
  color: #5a4221;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pager-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0;
  font-size: 17px;
}
details.empty-boards {
  background: #ebd3ae;
  border: 1px solid #c59b5f;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 20px;
  font-size: 17px;
}
details.empty-boards summary {
  cursor: pointer;
  font-weight: 700;
  color: #473416;
}
details.empty-boards ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

/* Legacy UBB topic pages: preserve classic parchment look, upgrade legibility to >=17px */
.ubb-topic-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 12px 24px 12px;
}
.ubb-topic-wrap center {
  text-align: left;
}
.ubb-topic-wrap font[size="3"] { font-size: 18px; line-height: 1.65; }
.ubb-topic-wrap font[size="2"] { font-size: 17px; line-height: 1.55; }
.ubb-topic-wrap font[size="1"] { font-size: 14px; line-height: 1.5; color: #6b4c1e !important; }
.ubb-topic-wrap table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: separate;
}
.ubb-topic-wrap td {
  vertical-align: top;
  padding: 6px 10px;
}
.ubb-topic-wrap td:empty {
  display: none;
}
.ubb-topic-wrap blockquote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 3px solid #9b6f35;
  background: rgba(255, 255, 255, 0.25);
}
.ubb-topic-wrap hr {
  border: none;
  border-top: 1px solid #b88c4f;
  margin: 8px 0;
}
.ubb-topic-wrap p {
  margin: 8px 0;
}
.muted-action {
  color: #705531;
}
.archive-footer-nav {
  margin: 14px 0 8px 0;
  padding: 10px 12px;
  background: #D9AD6C;
  border: 1px solid #b58845;
  border-radius: 6px;
  font-size: 17px;
  text-align: center;
}

/* Phone-friendly layout at <= 720px (verified at 390px viewport) */
@media (max-width: 720px) {
  body { font-size: 18px; }
  .ubb-topic-wrap { padding: 8px 10px 20px 10px; }
  .ubb-topic-wrap table,
  .ubb-topic-wrap tbody,
  .ubb-topic-wrap tr,
  .ubb-topic-wrap td {
    display: block;
    width: auto !important;
    max-width: 100%;
  }
  .ubb-topic-wrap td[nowrap],
  .ubb-topic-wrap td {
    white-space: normal !important;
    text-align: left !important;
    padding: 4px 0;
  }
  .ubb-topic-wrap tr[bgcolor="#E9CDA5"],
  .ubb-topic-wrap tr[bgcolor="#E7C798"] {
    margin-bottom: 12px;
    border: 1px solid #b88c4f;
    border-radius: 6px;
    overflow: hidden;
  }
  .ubb-topic-wrap tr[bgcolor="#E9CDA5"] > td:first-child,
  .ubb-topic-wrap tr[bgcolor="#E7C798"] > td:first-child {
    background: #dfc090;
    border-bottom: 1px solid #c79a5b;
    padding: 8px 12px;
  }
  .ubb-topic-wrap tr[bgcolor="#E9CDA5"] > td:last-child,
  .ubb-topic-wrap tr[bgcolor="#E7C798"] > td:last-child {
    padding: 10px 12px;
  }
  .ubb-topic-wrap tr[bgcolor="#D9AD6C"] {
    border-radius: 6px;
    margin: 8px 0 10px 0;
    padding: 8px 12px;
    border: 1px solid #b58845;
  }
  .ubb-topic-wrap tr[bgcolor="#D9AD6C"] > td:first-child {
    display: none;
  }
  .board-item, .topic-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .topic-title {
    flex: none;
    width: 100%;
  }
  .board-meta, .topic-date {
    white-space: normal;
    font-size: 17px;
  }
  .site-header h1 { font-size: 21px; }
}


/* 1999 pre-UBB board cards */
.legacy-posts { display: flex; flex-direction: column; gap: 14px; }
.legacy-post {
  background: #E9CDA5;
  border: 1px solid #b88c4f;
  border-radius: 6px;
  overflow: hidden;
}
.legacy-post:nth-child(even) { background: #E7C798; }
.legacy-post-head {
  background: #D9AD6C;
  color: #3d2509;
  font-weight: 700;
  font-size: 17px;
  padding: 9px 13px;
  border-bottom: 1px solid #c29555;
}
.legacy-post-body {
  padding: 12px 14px;
  font-size: 18px;
  line-height: 1.65;
}
.legacy-post-body table {
  border-collapse: collapse;
  margin: 10px 0;
  width: 100%;
  font-size: 17px;
}
.legacy-post-body th, .legacy-post-body td {
  border: 1px solid #a87b3c;
  padding: 6px 8px;
}
.mayor-pics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.mayor-pic {
  border: 1px solid #9b6f35;
  border-radius: 4px;
  max-height: 220px;
  width: auto;
}
.missing-1999-note {
  background: #f2dfc0;
  border: 1px solid #c59b5f;
  border-left: 4px solid #800000;
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 17px;
  color: #3d2a10;
}


/* Public archive dead external URL text */
.ext-url-dead { color: #5c4627; word-break: break-all; }
