:root {
  color-scheme: light;
  --ink: #102342;
  --text: #203656;
  --muted: #5c6e88;
  --line: #d8e6f2;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --blue: #2f6fd5;
  --blue-soft: #e7f1ff;
  --green: #1aa889;
  --green-soft: #e8fbf7;
  --yellow: #b98312;
  --yellow-soft: #fff7dd;
  --red: #d64b4b;
  --red-soft: #fff0f0;
  --shadow: 0 18px 50px rgba(55, 92, 135, 0.16);
  --radius: 8px;
  font-family: "Inter", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(160deg, #f7fbff 0%, #eef8ff 34%, #f7fbff 72%, #ffffff 100%);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 4px 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.2rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(47, 111, 213, 0.12);
}

.brand-mark svg {
  width: 31px;
  height: 31px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.privacy-pill,
.help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.privacy-pill span {
  color: var(--green);
}

.help-link {
  color: var(--blue);
  text-decoration: none;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.94fr);
  gap: 44px;
  align-items: start;
}

.eyebrow {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 8px;
}

.eyebrow.small {
  color: var(--green);
  font-size: 0.95rem;
}

h1 {
  color: var(--blue);
  font-size: 3.15rem;
  line-height: 1.12;
  margin: 0;
  font-weight: 900;
}

.lead {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.9;
  max-width: 620px;
  margin: 20px 0 18px;
  font-weight: 700;
}

.hero-visual {
  width: min(500px, 100%);
  height: 255px;
  margin-top: 10px;
  border-radius: 0;
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
}

.upload-panel {
  display: grid;
  gap: 16px;
  margin-top: 54px;
}

.drop-zone {
  position: relative;
  min-height: 300px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1.5px dashed #7fd1c3;
  border-radius: var(--radius);
  pointer-events: none;
}

.drop-zone > * {
  position: relative;
}

.upload-icon {
  width: 92px;
  height: 92px;
  margin-bottom: 10px;
}

.upload-icon svg {
  width: 100%;
  height: 100%;
}

.drop-title {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.muted {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.primary-button,
.ghost-button {
  border: 0;
  min-height: 44px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), #1aa889);
  box-shadow: 0 12px 24px rgba(47, 111, 213, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.help-link:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.small-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.drop-zone.is-dragover {
  background: #f2fffc;
  border-color: #6bcdbd;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

.privacy-note span {
  color: var(--green);
  font-weight: 900;
}

.privacy-note.compact {
  justify-content: flex-start;
  margin: 12px 0 22px;
}

.feature-grid {
  margin: 36px auto 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card,
.status-panel,
.result-panel,
.result-section {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-solid);
  box-shadow: 0 14px 34px rgba(55, 92, 135, 0.12);
}

.feature-card {
  min-height: 132px;
  padding: 24px;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  align-items: center;
}

.feature-card h2,
.result-section h3,
.status-panel h2,
.guide-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.4;
}

.feature-card p,
.result-section p,
.status-panel p,
.guide-section p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.7;
}

.feature-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid #8bd9ca;
  border-radius: var(--radius);
  font-size: 2rem;
  font-weight: 900;
}

.feature-icon.image {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #98bdf2;
}

.feature-icon.pdf {
  color: #ffffff;
  background: #28a97d;
  border-color: #28a97d;
  font-size: 1rem;
}

.status-panel {
  margin-top: 20px;
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-track {
  margin-top: 14px;
  width: min(420px, 100%);
  height: 8px;
  overflow: hidden;
  background: #eef4fb;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 180ms ease;
}

.status-panel.error {
  border-color: #ffd1d1;
  background: var(--red-soft);
}

.status-symbol {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--red);
  font-size: 1.5rem;
  font-weight: 900;
}

.result-panel {
  margin-top: 20px;
  padding: 24px;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.result-title-group {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.result-title-group h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.55rem;
}

.result-title-group p {
  margin: 5px 0 0;
  color: var(--text);
}

.status-badge {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--green);
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 900;
}

.result-panel.status-warning .status-badge {
  background: var(--yellow);
}

.result-panel.status-error .status-badge {
  background: var(--red);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-button {
  color: var(--blue);
  background: #ffffff;
  border: 1px solid #9fbdf0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid #9bdcd2;
  border-radius: var(--radius);
  background: #f6fffd;
  overflow: hidden;
}

.summary-item {
  padding: 18px 20px;
  border-right: 1px solid #b8e9e1;
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item .label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.summary-item .value {
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 900;
}

.result-layout {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.result-section {
  margin-top: 18px;
  padding: 20px;
}

.result-layout .result-section {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.issues-list {
  display: grid;
  gap: 10px;
}

.issue-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.issue-item.error {
  background: var(--red-soft);
  border-color: #ffcaca;
}

.issue-item.warning {
  background: var(--yellow-soft);
  border-color: #f3df9d;
}

.issue-severity {
  align-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.issue-item.error .issue-severity {
  background: var(--red);
}

.issue-item.warning .issue-severity {
  background: var(--yellow);
}

.issue-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
}

.issue-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-all;
}

.issue-desc {
  margin-top: 5px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.6;
}

.extension-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.extension-chip {
  padding: 9px 12px;
  color: var(--ink);
  background: #f4f8fd;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.image-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
}

.image-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: #f5f9fe;
}

.checker-bg {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #e8eef6 25%, transparent 25%),
    linear-gradient(-45deg, #e8eef6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8eef6 75%),
    linear-gradient(-45deg, transparent 75%, #e8eef6 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-meta {
  padding: 10px;
}

.image-meta strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.image-meta span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-button,
.file-table th button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--text);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-button.is-active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.table-wrap {
  overflow-x: auto;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.file-table th,
.file-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.file-table th {
  color: var(--muted);
  font-size: 0.8rem;
}

.file-table td:first-child {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.error {
  color: var(--red);
  background: var(--red-soft);
}

.status-pill.warning {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.report-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.guide-section {
  margin-top: 26px;
  padding: 26px 4px 0;
}

.guide-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.guide-grid p {
  min-height: 118px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.caution-text {
  margin-top: 18px;
  color: var(--muted);
}

.image-dialog {
  width: min(920px, calc(100% - 34px));
  border: 0;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 24px 80px rgba(16, 35, 66, 0.32);
}

.image-dialog::backdrop {
  background: rgba(16, 35, 66, 0.46);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
}

.dialog-image-wrap {
  min-height: 320px;
  max-height: 68vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dialog-image-wrap img {
  max-height: 68vh;
  object-fit: contain;
}

.dialog-meta {
  margin-top: 14px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.7;
}

.is-hidden {
  display: none !important;
}

.empty-state {
  color: var(--muted);
  background: #f7fafc;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.article-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-links a,
.article-index a {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease;
}

.article-links a:hover,
.article-index a:hover {
  border-color: #9fbdf0;
  transform: translateY(-1px);
}

.article-shell {
  max-width: 980px;
}

.article-page {
  padding: 36px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-page h1 {
  color: var(--ink);
  font-size: 2.3rem;
}

.article-description {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.article-body {
  margin-top: 30px;
  color: var(--text);
  line-height: 1.9;
}

.article-body h2 {
  margin: 34px 0 8px;
  color: var(--ink);
  font-size: 1.35rem;
}

.article-body p,
.article-body li {
  font-size: 1rem;
}

.article-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef4fb;
}

.article-index {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.article-index a {
  display: grid;
  gap: 6px;
  border-radius: var(--radius);
  padding: 18px;
}

.article-index span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 8px 0 38px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 6px 0;
  font-size: 0.88rem;
  line-height: 1.7;
}

.site-footer a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.footer-feedback {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  margin: 0;
  pointer-events: none;
}

.feedback-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #9bdcd2;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(55, 92, 135, 0.18);
  font-weight: 900;
  text-decoration: none;
  backdrop-filter: blur(16px);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  pointer-events: auto;
}

.feedback-button::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 1.7px solid currentColor;
  border-radius: 5px;
  opacity: 0.72;
  background:
    linear-gradient(currentColor, currentColor) 4px 5px / 8px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 9px / 6px 1.5px no-repeat;
}

.feedback-button:hover,
.feedback-button:focus-visible {
  border-color: #2f6fd5;
  box-shadow: 0 16px 34px rgba(47, 111, 213, 0.2);
  transform: translateY(-1px);
}

.is-feedback-dismissed .feedback-open-button {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 35, 66, 0.46);
}

.modal {
  width: min(620px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(16, 35, 66, 0.32);
}

.feedback-modal {
  display: grid;
  gap: 14px;
}

.feedback-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.feedback-modal h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.4rem;
}

.feedback-close-button {
  position: static;
  flex: 0 0 auto;
}

.feedback-form {
  display: grid;
  gap: 14px;
}

.feedback-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.feedback-form textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 12px 14px;
  color: var(--text);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.7;
}

.feedback-form textarea:focus {
  outline: 3px solid rgba(47, 111, 213, 0.16);
  border-color: #7fa7eb;
}

.field-hint,
.feedback-url,
.feedback-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.feedback-url span {
  overflow-wrap: anywhere;
}

.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-muted-action {
  color: var(--muted);
  box-shadow: none;
}

@media (max-width: 980px) {
  .hero-section,
  .feature-grid,
  .result-layout,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    gap: 26px;
  }

  .upload-panel {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
  }

  .feature-card {
    grid-template-columns: 70px 1fr;
  }

  .summary-grid,
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 16px;
  }

  .site-header,
  .result-head,
  .report-section,
  .section-heading,
  .feedback-actions,
  .feedback-modal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions,
  .result-actions,
  .table-tools {
    justify-content: flex-start;
  }

  .eyebrow {
    font-size: 1.45rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  .drop-zone {
    min-height: 280px;
    padding: 22px;
  }

  .summary-grid,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .summary-item {
    border-right: 0;
    border-bottom: 1px solid #b8e9e1;
  }

  .summary-item:last-child {
    border-bottom: 0;
  }

  .issue-item {
    grid-template-columns: 1fr;
  }

  .feedback-button {
    max-width: calc(100vw - 32px);
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 86vh;
    border-radius: 18px 18px 0 0;
  }
}
