:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #334155;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #64748b;
  --border: #e2e8f0;
  --blue: #2563eb;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
a { color: var(--blue); text-underline-offset: .22em; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
.skip-link { position: absolute; left: 24px; top: -90px; z-index: 20; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 92px; padding: 24px clamp(24px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #1e293b; text-decoration: none; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.file-icon { position: relative; display: inline-block; flex: 0 0 auto; width: 19px; height: 24px; border: 1.5px solid #64748b; border-radius: 2px; }
.file-icon::before { content: ""; position: absolute; right: -1.5px; top: -1.5px; width: 8px; height: 8px; background: #fff; border-left: 1.5px solid #64748b; border-bottom: 1.5px solid #64748b; }
.file-icon::after { content: ""; position: absolute; left: 4px; bottom: 5px; width: 8px; height: 1.5px; background: #94a3b8; box-shadow: 0 -4px #94a3b8; }
.home-page { min-height: 100svh; display: flex; flex-direction: column; }
.hero { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 70px 24px 100px; }
.eyebrow { margin: 0 0 24px; color: var(--muted); font-size: 13px; letter-spacing: .14em; }
.hero h1 { margin: 0; font-size: clamp(34px, 4.7vw, 60px); line-height: 1.5; font-weight: 700; letter-spacing: -.045em; color: #1e293b; }
.mobile-break { display: none; }
.hero-description { margin: 24px 0 38px; font-size: 16px; line-height: 2; color: var(--muted); }
.button { min-height: 48px; padding: 13px 24px; display: inline-flex; justify-content: center; align-items: center; gap: 28px; border: 1px solid transparent; border-radius: 5px; font-weight: 600; font-size: 14px; line-height: 1.5; text-decoration: none; }
.primary-button { color: #fff; background: var(--blue); }
.primary-button:hover { background: #1d4ed8; }
.hero .primary-button { padding-inline: 29px; min-width: 176px; }
.home-footer { text-align: center; padding: 24px 24px 36px; color: var(--muted); font-size: 12px; letter-spacing: .03em; }
.home-footer p { margin: 0; }
.home-footer span { margin: 0 11px; }
.home-link { color: var(--muted); font-size: 13px; text-decoration: none; padding-block: 12px; }
.home-link:hover { color: var(--blue); text-decoration: underline; }
.viewer-main { width: min(100%, 964px); margin: 0 auto; padding: 0 32px 80px; }
.empty-state { max-width: 620px; margin: clamp(36px, 9vh, 100px) auto 0; text-align: center; }
.empty-state .eyebrow { margin-bottom: 14px; }
.empty-state h1 { font-size: clamp(24px, 4vw, 30px); color: #1e293b; margin: 0 0 32px; letter-spacing: -.03em; }
.drop-zone { border: 1.5px dashed #cbd5e1; background: #f8fafc; border-radius: 6px; padding: 48px 24px 36px; display: flex; flex-direction: column; align-items: center; }
.large-file-icon { width: 32px; height: 40px; margin-bottom: 28px; background: white; }
.large-file-icon::before { width: 12px; height: 12px; }
.large-file-icon::after { left: 7px; bottom: 9px; width: 15px; box-shadow: 0 -6px #94a3b8; }
.drop-description { font-size: 14px; margin: 19px 0 0; }
.file-hint { font-size: 12px; color: var(--muted); margin: 20px 0 0; }
.privacy-note { margin: 24px 0 0; font-size: 12px; line-height: 1.9; color: var(--muted); }
.error-message { border-left: 3px solid #b91c1c; background: #fef2f2; color: #991b1b; margin: 20px 0; padding: 14px 18px; line-height: 1.8; overflow-wrap: anywhere; font-size: 14px; }
.status-message { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.document-toolbar { padding: 22px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0 42px; }
.filename { font-size: 13px; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.text-button { flex-shrink: 0; min-height: 44px; padding: 8px 0 8px 12px; background: transparent; color: var(--blue); border: 0; font-size: 13px; }
.text-button:hover { text-decoration: underline; text-underline-offset: .22em; }
.drop-indicator { pointer-events: none; position: fixed; inset: 14px; z-index: 10; display: grid; place-items: center; background: #eff6fff2; border: 2px dashed var(--blue); border-radius: 6px; color: #1d4ed8; font-size: 22px; font-weight: 600; }
.markdown-body { font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.markdown-body:focus { outline: none; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { color: #1e293b; font-weight: 650; line-height: 1.5; margin: 1.9em 0 .75em; letter-spacing: -.025em; }
.markdown-body h1 { font-size: 2em; padding-bottom: .4em; border-bottom: 1px solid var(--border); }
.markdown-body h2 { font-size: 1.5em; padding-bottom: .35em; border-bottom: 1px solid var(--border); }
.markdown-body h3 { font-size: 1.25em; }
.markdown-body h4 { font-size: 1.1em; }
.markdown-body h5, .markdown-body h6 { font-size: 1em; }
.markdown-body p, .markdown-body ul, .markdown-body ol, .markdown-body blockquote, .markdown-body pre, .markdown-body .table-scroll { margin: 0 0 1.4em; }
.markdown-body ul, .markdown-body ol { padding-left: 1.75em; }
.markdown-body li + li { margin-top: .3em; }
.markdown-body li > p { margin-block: .5em; }
.markdown-body li > ul, .markdown-body li > ol { margin-bottom: 0; }
.markdown-body blockquote { border-left: 3px solid #cbd5e1; padding: .25em 0 .25em 1.25em; color: var(--muted); }
.markdown-body blockquote > :last-child { margin-bottom: 0; }
.markdown-body code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .87em; background: #f1f5f9; padding: .18em .4em; border-radius: 3px; }
.markdown-body pre { max-width: 100%; overflow-x: auto; padding: 20px 24px; background: #f8fafc; border: 1px solid var(--border); border-radius: 4px; line-height: 1.7; tab-size: 4; overflow-wrap: normal; }
.markdown-body pre code { padding: 0; background: transparent; border-radius: 0; }
.table-scroll { width: 100%; overflow-x: auto; }
.markdown-body table { width: 100%; border-collapse: collapse; font-size: .9em; line-height: 1.7; overflow-wrap: normal; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: 10px 16px; text-align: left; min-width: 100px; }
.markdown-body th { background: #f8fafc; font-weight: 600; }
.markdown-body .align-center { text-align: center; }
.markdown-body .align-right { text-align: right; }
.markdown-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.image-placeholder { display: inline; padding: .2em .5em; background: #f8fafc; border: 1px solid var(--border); color: var(--muted); font-size: .9em; }
.empty-document { color: var(--muted); }
.not-found-title { font-size: clamp(26px, 4vw, 40px) !important; }
@media (max-width: 600px) {
  .site-header { min-height: 78px; padding: 20px; gap: 12px; }
  .brand { font-size: 15px; gap: 10px; }
  .hero { padding: 64px 24px 80px; }
  .hero h1 { font-size: 38px; line-height: 1.6; }
  .mobile-break { display: initial; }
  .hero-description { font-size: 14px; }
  .viewer-main { padding: 0 20px 48px; }
  .empty-state { margin-top: 40px; }
  .drop-zone { padding: 36px 16px 28px; }
  .drop-description { font-size: 12px; }
  .document-toolbar { align-items: flex-start; flex-direction: column; gap: 4px; margin-top: 8px; margin-bottom: 28px; padding: 12px 0; }
  .text-button { padding-left: 0; }
  .markdown-body { font-size: 15px; }
  .markdown-body pre { padding: 16px; }
}
@media print {
  .site-header, .skip-link, .document-toolbar, .empty-state, .error-message, .status-message, .drop-indicator, noscript { display: none !important; }
  .viewer-main { width: 100%; max-width: none; padding: 0; margin: 0; }
  .markdown-body { font-size: 11pt; line-height: 1.7; color: #000; }
  .markdown-body pre { white-space: pre-wrap; overflow-wrap: anywhere; border-color: #aaa; }
  .table-scroll { overflow: visible; }
  .markdown-body table { table-layout: fixed; overflow-wrap: anywhere; }
  .markdown-body th, .markdown-body td { min-width: 0; padding: 5px; }
  .markdown-body h1, .markdown-body h2, .markdown-body h3 { break-after: avoid; }
  .markdown-body a { color: inherit; }
  @page { margin: 18mm; }
}
