:root {
  /* 明るいオレンジ(#F5723D)と明るい水色(#85D0F2) — eurekaseven.jp キャラクター画像から抽出 */
  --bg: #fffaf6;
  --panel: #ffffff;
  --panel-2: #fef1e6;
  --summary-bg: #e8f7fc;
  --border: rgba(43, 33, 24, 0.12);
  --text: #24211d;
  --muted: rgba(36, 33, 29, 0.62);
  --accent: #f5723d;
  --accent-hover: #dd5a24;
  --accent-contrast: #ffffff;
  --accent2: #1596c4;
  --accent2-light: #85d0f2;
  --ok: #1a8f4c;
  --ng: #d1293d;
  --manual: #b3590f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header h1 {
  margin: 0 0 4px;
  font-size: 26px;
  position: relative;
  display: inline-block;
}

header h1::after {
  content: "";
  display: block;
  height: 4px;
  width: 64px;
  margin-top: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2-light));
}

.subtitle {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.check-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

#urlInput {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
}

#urlInput:focus {
  outline: 2px solid var(--accent2-light);
  outline-offset: -1px;
  border-color: var(--accent2);
}

#siteTypeSelect {
  padding: 12px 30px 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  width: 230px;
  flex-shrink: 0;
}

#siteTypeSelect:focus {
  outline: 2px solid var(--accent2-light);
  outline-offset: -1px;
  border-color: var(--accent2);
}

#submitBtn {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: bold;
  cursor: pointer;
  font-size: 15px;
}

#submitBtn:hover:not(:disabled) {
  background: var(--accent-hover);
}

#submitBtn:disabled {
  opacity: 0.6;
  cursor: default;
}

.note {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.status {
  min-height: 24px;
  margin-bottom: 12px;
  font-size: 14px;
}

.status.error { color: var(--ng); }
.status.loading { color: var(--accent2); }

.summary {
  background: var(--summary-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.score-big {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
}

.score-big span {
  font-size: 20px;
  color: var(--muted);
  font-weight: normal;
}

.summary-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.summary-meta a {
  color: var(--accent2);
  text-decoration: underline;
}

.chapter {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(26, 26, 46, 0.04);
}

.chapter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--panel-2);
}

.chapter-na {
  opacity: 0.6;
}

.chapter-na .chapter-head {
  background: var(--panel);
}

.chapter-na-note {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0;
}

.chapter-head h3 {
  margin: 0;
  font-size: 15px;
}

.chapter-score {
  font-weight: bold;
  color: var(--accent);
  white-space: nowrap;
  margin-left: 12px;
}

.chapter-score.na {
  color: var(--muted);
  font-weight: normal;
  font-size: 12.5px;
}

.chapter-body {
  padding: 4px 18px 14px;
  display: none;
}

.chapter.open .chapter-body {
  display: block;
}

.chapter.open .chevron {
  transform: rotate(90deg);
}

.chevron {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.15s ease;
  color: var(--muted);
}

.chapter.open .chapter-head {
  background: var(--summary-bg);
}

ul.item-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

ul.item-list li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

ul.item-list li:last-child { border-bottom: none; }

.badge {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  margin-top: 1px;
}

.badge.ok { background: rgba(26,143,76,0.12); color: var(--ok); }
.badge.ng { background: rgba(209,41,61,0.10); color: var(--ng); }
.badge.manual { background: rgba(179,89,15,0.12); color: var(--manual); }

.item-text {
  flex: 1;
}

.item-detail {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.item-label-manual { color: var(--muted); }

.print-header { display: none; }

.result-toolbar {
  margin-bottom: 16px;
}

#pdfBtn {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: #ffffff;
  color: var(--accent);
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
}

#pdfBtn:hover {
  background: var(--panel-2);
}

@media print {
  @page {
    margin: 16mm 14mm;
  }

  .no-print {
    display: none !important;
  }

  header {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .print-header {
    display: block;
    margin-bottom: 20px;
  }

  .print-title {
    font-size: 22px;
    font-weight: 800;
  }

  .print-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
  }

  .chapter-body {
    display: block !important;
  }

  .chevron {
    display: none !important;
  }

  .chapter {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .summary {
    break-inside: avoid;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
