:root {
  --bg: #f4f7f7;
  --surface: #ffffff;
  --surface-soft: #edf4f4;
  --foreground: #192e2e;
  --muted: #607474;
  --border: #cad8d8;
  --primary: #1a6b6b;
  --primary-dark: #134f4f;
  --success: #247a55;
  --success-soft: #e9f6ef;
  --warning: #956515;
  --warning-soft: #fff6df;
  --error: #a63d3d;
  --error-soft: #fff0f0;
  --focus: #3b8fce;
  --shadow: 0 18px 50px rgb(25 46 46 / 8%);
  --radius: 18px;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--foreground);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--foreground); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, .drop-zone:focus-within, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 20; padding: 10px 16px; color: #fff; background: var(--primary-dark); white-space: nowrap; }
.skip-link:focus { top: 16px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { width: min(1040px, calc(100% - 40px)); min-height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: var(--primary); font-weight: 800; }
.brand p { margin: 0; }
.brand-name { font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.brand-sub { margin-top: 2px !important; color: var(--muted); font-size: 12px; }
.case-badge { padding: 8px 13px; border: 1px solid var(--border); border-radius: 999px; color: var(--primary-dark); background: var(--surface-soft); font-size: 13px; font-weight: 700; }

.page-shell { width: min(880px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 72px; }
.hero { text-align: center; }
.eyebrow, .card-kicker { margin: 0 0 8px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); letter-spacing: .02em; }
.lead { max-width: 690px; margin: 16px auto 0; color: var(--muted); font-size: 15px; line-height: 1.9; }

.trust-banner { margin: 32px 0 28px; padding: 14px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border: 1px solid #bcd2d2; border-radius: 14px; background: var(--surface-soft); }
.trust-banner div { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; }
.trust-banner span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--primary); font-size: 11px; font-weight: 800; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 20px; }
.step { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.step:not(:last-child)::after { content: ""; position: absolute; left: calc(50% + 62px); right: calc(-50% + 62px); top: 15px; height: 1px; background: var(--border); }
.step span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); font-size: 12px; font-weight: 800; }
.step p { margin: 0; font-size: 13px; font-weight: 700; }
.step.is-current { color: var(--primary-dark); }
.step.is-current span, .step.is-done span { border-color: var(--primary); color: #fff; background: var(--primary); }

.work-card { margin-top: 20px; padding: clamp(24px, 5vw, 40px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.card-heading h2, .downloads-card h2 { margin: 0; font-size: 23px; }
.format-note { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.drop-zone { min-height: 238px; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; border: 2px dashed #9ababa; border-radius: 14px; background: #fbfdfd; transition: .18s ease; cursor: pointer; text-align: center; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--primary); background: var(--surface-soft); transform: translateY(-1px); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { color: var(--primary-dark); font-size: 17px; }
.drop-zone > span:not(.upload-icon) { color: var(--muted); font-size: 13px; }
.drop-zone small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.upload-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 14px; color: #fff; background: var(--primary); font-size: 24px; font-weight: 500; }
.file-chip { margin-top: 14px; padding: 13px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.file-chip > span { padding: 7px 8px; border-radius: 7px; color: #fff; background: var(--primary-dark); font-size: 10px; font-weight: 800; }
.file-chip div { min-width: 0; flex: 1; }
.file-chip strong, .file-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { margin-top: 3px; color: var(--muted); }
.file-chip button { padding: 7px 9px; border: 0; color: var(--error); background: transparent; font-size: 12px; font-weight: 700; }

.primary-button, .secondary-button { width: 100%; min-height: 52px; margin-top: 22px; border-radius: 12px; font-weight: 800; transition: .18s ease; }
.primary-button { border: 1px solid var(--primary); color: #fff; background: var(--primary); box-shadow: 0 8px 20px rgb(26 107 107 / 18%); }
.primary-button:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.primary-button:disabled { border-color: #aabbbb; background: #aabbbb; box-shadow: none; cursor: not-allowed; }
.secondary-button { border: 1px solid var(--border); color: var(--primary-dark); background: var(--surface); }
.secondary-button:hover { border-color: var(--primary); background: var(--surface-soft); }

.status-panel, .message-panel { margin-top: 20px; padding: 18px 20px; display: flex; align-items: flex-start; gap: 14px; border-radius: 14px; }
.status-panel { border: 1px solid #b9d7e8; background: #edf7fc; }
.status-panel p, .message-panel p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.spinner { width: 24px; height: 24px; flex: none; border: 3px solid #b9d7e8; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-panel { border: 1px solid #e2baba; background: var(--error-soft); }
.error-panel > div:first-child, .warning-panel > div:first-child { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; color: #fff; font-weight: 800; }
.error-panel > div:first-child { background: var(--error); }
.error-panel h2 { margin: 2px 0 0; color: var(--error); font-size: 16px; }
.error-panel ul { margin: 10px 0 0; padding-left: 20px; color: var(--error); font-size: 12px; }
.warning-panel { border: 1px solid #e8d5a5; background: var(--warning-soft); }
.warning-panel > div:first-child { background: var(--warning); }

.success-chip { padding: 7px 11px; border-radius: 999px; color: var(--success); background: var(--success-soft); font-size: 12px; font-weight: 800; }
.stats-grid { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats-grid div { padding: 17px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fbfdfd; }
.stats-grid dt { color: var(--muted); font-size: 11px; }
.stats-grid dd { margin: 8px 0 0; font-size: 25px; font-weight: 800; }
.stats-grid dd small { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.stats-grid .accent-stat { border-color: #93bcbc; background: var(--surface-soft); }
.stats-grid .accent-stat dd { color: var(--primary-dark); }
.output-preview { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.output-preview h3 { margin: 0 0 12px; font-size: 14px; }
.output-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.output-list > div { padding: 13px; display: flex; align-items: center; gap: 11px; border-radius: 11px; background: var(--bg); }
.pdf-icon { padding: 7px 6px; border-radius: 6px; color: #fff; background: #b94a48; font-size: 9px; font-weight: 900; }
.output-list p { margin: 0; }
.output-list strong, .output-list small { display: block; }
.output-list strong { font-size: 13px; }
.output-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.downloads-card { text-align: center; }
.completion-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%; color: #fff; background: var(--success); font-size: 28px; }
.downloads-card > p:not(.card-kicker):not(.expiry-note) { color: var(--muted); }
.download-links { margin-top: 24px; display: grid; gap: 10px; text-align: left; }
.download-link { padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--border); border-radius: 12px; color: var(--foreground); background: #fbfdfd; text-decoration: none; }
.download-link:first-child { border-color: var(--primary); background: var(--surface-soft); }
.download-link:hover { border-color: var(--primary); transform: translateY(-1px); }
.download-link strong, .download-link small { display: block; }
.download-link small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.download-link > span:last-child { color: var(--primary); font-size: 12px; font-weight: 800; }
.expiry-note { margin: 15px 0 0; color: var(--muted); font-size: 11px; }
.site-footer { padding: 25px 20px 35px; display: flex; justify-content: center; gap: 22px; border-top: 1px solid var(--border); color: var(--muted); background: var(--surface); font-size: 11px; }
.site-footer p { margin: 0; }

@media (max-width: 720px) {
  .page-shell { width: min(100% - 24px, 880px); padding-top: 36px; }
  .header-inner { width: calc(100% - 24px); min-height: 68px; }
  .brand-sub { display: none; }
  .case-badge { font-size: 11px; }
  .trust-banner { grid-template-columns: 1fr; }
  .trust-banner div { justify-content: flex-start; }
  .step { flex-direction: column; gap: 5px; text-align: center; }
  .step p { font-size: 10px; }
  .step:not(:last-child)::after { left: calc(50% + 24px); right: calc(-50% + 24px); }
  .card-heading { display: block; }
  .format-note { margin-top: 8px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .output-list { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 13px; }
  .case-badge { padding: 6px 8px; }
  .work-card { padding: 22px 18px; }
  .drop-zone { min-height: 210px; padding: 22px 14px; }
  .site-footer { flex-direction: column; align-items: center; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}
