* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  background: #f8fafc;
  line-height: 1.6;
}

header {
  padding: 18px 20px;
  background: linear-gradient(120deg, #0f172a, #1e293b);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

.header-wrap {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

header h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

header p {
  margin: 0;
  opacity: 0.92;
}

.header-badge {
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #dbeafe;
}

.hero {
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 18px 20px 8px;
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
}

.hero-sub {
  margin-top: 8px;
  color: #475569;
  max-width: 760px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.toolbar input {
  flex: 1;
  max-width: 340px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.toolbar button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

.toolbar button.primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.status {
  max-width: 1180px;
  margin: 8px auto 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: #4b5563;
  background: #ffffff;
}

main {
  display: block;
  padding: 18px 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.list-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.aside-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.aside-header h2 {
  margin: 0;
}

#listMeta {
  font-size: 12px;
  color: #6b7280;
}

#issueList {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

#issueList li {
  padding: 14px;
  border-radius: 12px;
  cursor: default;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#issueList li:hover,
#issueList li.active {
  border-color: #bfdbfe;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.issue-no {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.issue-date {
  font-size: 12px;
  color: #64748b;
}

.issue-link {
  display: block;
  color: #0f172a;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  min-height: 48px;
}

.issue-link:hover {
  color: #1d4ed8;
}

.card-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.open-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
}

.open-btn:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}

.detail-main {
  max-width: 980px;
}

.detail-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.back-link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.detail-meta {
  color: #64748b;
  font-size: 13px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  line-height: 1.35;
  color: #0f172a;
}

.markdown-body p,
.markdown-body li {
  color: #1e293b;
  font-size: 16px;
}

.markdown-body a {
  color: #2563eb;
}

.markdown-body pre {
  overflow: auto;
  border-radius: 10px;
  padding: 12px;
  background: #0b1220;
  color: #e2e8f0;
}

.markdown-body blockquote {
  margin: 12px 0;
  padding: 8px 12px;
  border-left: 3px solid #93c5fd;
  background: #f8fafc;
  color: #334155;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.pagination button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#pageInfo {
  font-size: 13px;
  color: #4b5563;
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: none;
}

.to-top.show {
  display: block;
}

.site-footer {
  margin-top: 20px;
  padding: 16px 20px 24px;
  color: #6b7280;
  font-size: 13px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.footer-grid h4 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 14px;
}

.footer-grid p {
  margin: 4px 0;
}

.site-footer a {
  color: #2563eb;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .header-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    margin-top: 10px;
    padding: 12px;
  }

  .hero-title {
    font-size: 22px;
  }

  .toolbar input {
    max-width: none;
    width: 100%;
  }

  main {
    padding: 12px;
  }

  .status {
    margin: 8px 12px 0;
  }

  .list-section {
    padding: 12px;
    border-radius: 12px;
  }

  .card-list {
    grid-template-columns: 1fr;
  }

  .pagination {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding-top: 8px;
  }

  .site-footer {
    padding: 16px 12px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
