/* UP Board page — jump nav + PDF viewer */
.upboard-jump {
  position: relative;
  z-index: 20;
  margin: 16px 0 20px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 50%, #fff7ed 100%);
  border: 1px solid #dbeafe;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.upboard-jump-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.upboard-jump-title {
  display: block;
  font-size: 1.15rem;
  color: #0f172a;
}
.upboard-jump-sub {
  font-size: 0.92rem;
  color: #475569;
}
.upboard-jump-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.upboard-jump-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.upboard-jump-btn-light {
  background: #fff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.upboard-jump-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.upboard-jump-block {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--block-color, #1d4ed8);
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.upboard-jump-cat {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  margin-bottom: 10px;
}
.upboard-jump-cat-hi {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--block-color, #1d4ed8);
  line-height: 1.3;
}
.upboard-jump-cat-en {
  font-size: 0.88rem;
  color: #64748b;
}
.upboard-jump-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.upboard-jump-class {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.upboard-jump-class:hover {
  background: var(--block-color, #1d4ed8);
  color: #fff;
  border-color: var(--block-color, #1d4ed8);
}
.upboard-jump-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}
.upboard-viewer {
  margin: 28px 0 24px;
  padding: 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  scroll-margin-top: 20px;
}
.upboard-viewer.upboard-viewer-active {
  border-color: #2563eb;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.25);
}
.upboard-viewer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.upboard-viewer-title {
  margin: 0;
  font-size: 1.2rem;
  color: #f8fafc;
}
.upboard-viewer-sub {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #94a3b8;
}
.upboard-viewer-actions {
  display: flex;
  gap: 8px;
}
.upboard-viewer-btn {
  border: 1px solid #475569;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.9rem;
}
.upboard-viewer-btn-close {
  font-size: 1.3rem;
  line-height: 1;
  padding: 4px 10px;
}
.upboard-viewer-placeholder {
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed #475569;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
.upboard-viewer-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: #1d4ed8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.upboard-pdf-loader {
  text-align: center;
  padding: 32px 16px;
  color: #cbd5e1;
}
.upboard-loader-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border: 4px solid #334155;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: upboard-spin 0.8s linear infinite;
}
@keyframes upboard-spin {
  to { transform: rotate(360deg); }
}
.upboard-pdf-frame-wrap {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  min-height: 650px;
}
.upboard-pdf-frame {
  display: block;
  width: 100%;
  height: 75vh;
  min-height: 600px;
  border: none;
  background: #fff;
}
.upboard-section {
  margin-bottom: 28px;
}
.upboard-section-title {
  padding-bottom: 6px;
  border-bottom: 3px solid #dbeafe;
}
.upboard-class-block {
  margin: 18px 0;
}
.upboard-class-title {
  color: #1d4ed8;
  margin-bottom: 8px;
  font-size: 1.15rem;
  line-height: 1.35;
}
.upboard-class-intro {
  margin: 0 0 12px;
  color: #334155;
  line-height: 1.55;
}

/* ── PDF tables ── */
.upboard-table-wrap {
  margin: 12px 0 20px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.1), 0 1px 4px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
  background: #fff;
}
.upboard-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}
.upboard-table thead {
  background: var(--table-accent, #1d4ed8);
  background: linear-gradient(135deg, var(--table-accent, #1d4ed8) 0%, #1e3a8a 100%);
}
.upboard-table thead th {
  padding: 14px 16px;
  text-align: left;
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: none;
  white-space: nowrap;
}
.upboard-table thead th:first-child {
  width: 70px;
  text-align: center;
}
.upboard-table thead th:last-child {
  width: 150px;
  text-align: center;
}
.upboard-table tbody tr {
  transition: background 0.18s ease, transform 0.18s ease;
  border-bottom: 1px solid #f1f5f9;
}
.upboard-table tbody tr:last-child {
  border-bottom: none;
}
.upboard-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.upboard-table tbody tr:hover {
  background: #eff6ff;
}
.upboard-table td {
  padding: 12px 16px;
  color: #1e293b;
  border: none;
  vertical-align: middle;
}
.upboard-table td:first-child {
  text-align: center;
  font-weight: 700;
  color: var(--table-accent, #1d4ed8);
  font-size: 0.9rem;
}
.upboard-table td:nth-child(2) {
  font-weight: 500;
  color: #0f172a;
}
.upboard-table td:last-child {
  text-align: center;
}
.upboard-table .upboard-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--table-accent, #2563eb), #1e40af);
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none !important;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}
.upboard-table .upboard-view-btn::before {
  content: "↓";
  font-size: 0.9rem;
  opacity: 0.9;
}
.upboard-table .upboard-view-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.45);
  filter: brightness(1.08);
}
.upboard-table .upboard-view-btn:active {
  transform: translateY(0);
}

.upboard-official-links {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
#upboard-back-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  padding: 10px 14px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
@media print {
  .upboard-jump, #upboard-back-top, .upboard-viewer { display: none !important; }
}
@media (max-width: 600px) {
  .upboard-table-wrap {
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .upboard-table {
    min-width: 420px;
    font-size: 0.88rem;
  }
  .upboard-table thead th,
  .upboard-table td {
    padding: 10px 12px;
  }
  .upboard-table .upboard-view-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
  }
}
