:root { color-scheme: light; }
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 40px 32px 100px;
  background: #FBF9F2;
  color: #12345B;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 1.65;
}
main { max-width: 1200px; margin: 0 auto; }
a { color: #2E9086; }
h1 { margin: 0 0 8px; font-size: 30px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.lede { margin: 0 0 4px; color: #4C5C6E; }
.warning { color: #B23B3B; font-weight: 700; }
.back { display: inline-block; margin: 0 0 24px; font-weight: 700; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.filters input, .filters select {
  padding: 8px 10px; border: 1px solid #D9D5CA; border-radius: 8px; background: #fff; color: #12345B; font-size: 14px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { display: block; border: 1px solid #E7E3D9; border-radius: 12px; overflow: hidden; background: #fff; text-decoration: none; color: inherit; }
.card .thumb { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #F0EDE4; }
.card-body { padding: 12px 14px 16px; }
.card-id { margin: 0; font-size: 12px; color: #4C5C6E; }
.card-title { margin: 2px 0 6px; font-size: 16px; }
.card-topic { margin: 0 0 8px; font-size: 13px; color: #4C5C6E; }
.card-meta { margin: 0 0 10px; font-size: 12px; color: #4C5C6E; }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-ready { background: #DFF1EC; color: #2E9086; }
.badge-unready { background: #FBEFD4; color: #8A6A1D; }
.badge-published { background: #E5EAF2; color: #12345B; }

.post-detail header { border-bottom: 2px solid #F6D97A; padding-bottom: 16px; margin-bottom: 20px; }
.post-detail .post-id { margin: 0; color: #4C5C6E; font-size: 13px; }
.post-detail h1 { margin: 4px 0; }
.post-detail .topic { margin: 0 0 6px; color: #4C5C6E; }
.post-detail .registry { margin: 0 0 10px; font-size: 13px; color: #4C5C6E; }
.publications ul { margin: 0; padding-left: 18px; font-size: 13px; }

.images { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 16px; }
.images img { height: 340px; width: auto; border-radius: 8px; border: 1px solid #E7E3D9; background: #fff; }

.cta-select, .caption-preview, .checks-section, .export, .source-note, .issues-section { margin: 28px 0; padding-top: 20px; border-top: 1px solid #E7E3D9; }
.cta-note { margin: 0 0 12px; font-size: 13px; color: #6B6355; }
.cta-options { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 8px; align-items: flex-start; }
.cta-option { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 8px; border: 1px solid #E7E3D9; border-radius: 10px; background: #fff; cursor: pointer; flex: 0 0 auto; }
.cta-option-head { display: flex; align-items: center; gap: 6px; font-size: 13px; max-width: 232px; }
.cta-option.selected, .cta-option:has(input:checked) { border-color: #2E9086; box-shadow: 0 0 0 2px rgba(46, 144, 134, 0.25); }
.cta-thumb { display: block; height: 232px; width: auto; border-radius: 6px; border: 1px solid #E7E3D9; background: #fff; }
.cta-thumb-none { display: flex; align-items: center; justify-content: center; height: 232px; width: 186px; color: #8C8474; font-size: 13px; background: #F6F4EF; }
.cta-reason { color: #B23B3B; font-weight: 700; }

.caption-preview h2 { display: flex; justify-content: space-between; align-items: baseline; }
#caption-body { white-space: pre-wrap; background: #fff; border: 1px solid #E7E3D9; border-radius: 10px; padding: 16px; font-family: inherit; font-size: 14px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th, table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #E7E3D9; }
tr.ok td:nth-child(2) { color: #2E9086; font-weight: 700; }
tr.ng td:nth-child(2) { color: #B23B3B; font-weight: 700; }
tr.error td:first-child { color: #B23B3B; font-weight: 700; }
tr.warn td:first-child { color: #8A6A1D; font-weight: 700; }

.manual-checks { list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; }

.export-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.export-buttons button {
  padding: 10px 16px; border-radius: 8px; border: none; background: #2E9086; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.export-buttons button:disabled { background: #C9C4B6; cursor: not-allowed; }
.export-reasons { margin: 10px 0 0; padding-left: 18px; color: #B23B3B; font-size: 13px; }

.sources { padding-left: 18px; font-size: 13px; }
.spec-path { color: #4C5C6E; font-size: 12px; }
.empty { color: #4C5C6E; }

[data-js-only] { display: none; }
.js-ready [data-js-only] { display: flex; }

@media (max-width: 680px) {
  body { padding: 24px 16px 80px; }
  h1 { font-size: 22px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .images img { height: 220px; }
}
