:root {
  --navy: #15334a;
  --navy-soft: #31596d;
  --aqua: #0c9bae;
  --aqua-dark: #087988;
  --aqua-pale: #eafafd;
  --aqua-line: #cde7ec;
  --bg: #f6fbfd;
  --surface: #ffffff;
  --muted: #667b8b;
  --critical: #c23b4a;
  --critical-pale: #fff2f3;
  --warning: #a86609;
  --warning-pale: #fff8e9;
  --success: #17845c;
  --info: #34758e;
  --shadow: 0 20px 52px rgba(28, 71, 91, .09);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--navy);
  background:
    radial-gradient(circle at 8% 6%, rgba(76, 206, 214, .10), transparent 26rem),
    linear-gradient(180deg, #f8fdff 0, #fff 30rem, #f8fcfd 100%);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  border-bottom: 1px solid rgba(185, 219, 226, .8);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
}
.topbar-inner {
  width: min(1360px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.auth-link { padding: 7px 12px; border: 1px solid var(--aqua-line); border-radius: 999px; color: var(--aqua-dark); background: #fff; font-size: 10px; font-weight: 800; text-decoration: none; }
.auth-link:hover { background: var(--aqua-pale); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(145deg, var(--aqua), #4cced6);
  font: 900 21px "Zen Maru Gothic"; box-shadow: 0 8px 19px rgba(12, 155, 174, .22);
}
.brand strong { display: block; font-size: 15px; letter-spacing: .01em; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.service-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.service-state i { width: 8px; height: 8px; border-radius: 50%; background: #b5c4ca; }
.service-state.online i { background: #36b783; box-shadow: 0 0 0 5px rgba(54, 183, 131, .10); }
.service-state.error i { background: var(--critical); }

main { width: min(1360px, calc(100% - 40px)); margin: 0 auto; }
.hero { min-height: 280px; display: grid; grid-template-columns: 1.22fr .78fr; align-items: center; gap: 48px; padding: 44px 32px 32px; }
.eyebrow { margin: 0 0 9px; color: var(--aqua-dark); font-size: 10px; font-weight: 800; letter-spacing: .22em; }
.hero h1 { margin: 0; max-width: 760px; font: 900 clamp(35px, 4.2vw, 58px)/1.24 "Zen Maru Gothic", sans-serif; letter-spacing: -.035em; }
.hero h1 em { color: var(--aqua); font-style: normal; }
.hero-lead { max-width: 720px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.hero-badges span { padding: 6px 12px; border: 1px solid var(--aqua-line); border-radius: 999px; background: rgba(255,255,255,.8); color: var(--aqua-dark); font-size: 11px; font-weight: 700; }
.hero-visual { position: relative; align-self: stretch; min-height: 230px; overflow: hidden; }
.mascot { position: absolute; z-index: 2; right: 46px; bottom: -49px; width: 274px; height: 274px; object-fit: cover; border-radius: 50%; filter: drop-shadow(0 22px 26px rgba(59, 116, 137, .12)); }
.lab-orbit { position: absolute; border: 1px solid rgba(32, 172, 184, .20); border-radius: 50%; }
.orbit-one { width: 270px; height: 270px; right: 44px; bottom: -38px; }
.orbit-two { width: 360px; height: 360px; right: -2px; bottom: -83px; }
.molecule { position: absolute; right: 18px; top: 31px; width: 96px; height: 56px; }
.molecule:before, .molecule:after { content: ""; position: absolute; height: 1px; background: #81ced6; transform-origin: left center; }
.molecule:before { width: 52px; top: 20px; left: 16px; transform: rotate(22deg); }
.molecule:after { width: 45px; top: 39px; left: 56px; transform: rotate(-34deg); }
.molecule b { position: absolute; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--aqua); box-shadow: 0 5px 12px rgba(12,155,174,.2); }
.molecule b:nth-child(1) { left: 7px; top: 13px; }.molecule b:nth-child(2) { left: 56px; top: 31px; }.molecule b:nth-child(3) { right: 0; top: 7px; }
.mascot-note { position: absolute; z-index: 3; right: 3px; bottom: 26px; padding: 9px 12px; border: 1px solid var(--aqua-line); border-radius: 13px; background: rgba(255,255,255,.94); color: var(--aqua-dark); font-size: 10px; font-weight: 800; line-height: 1.5; box-shadow: 0 10px 25px rgba(33,94,113,.10); }

.system-overview { margin: 0 0 22px; padding: 24px 27px; border: 1px solid var(--aqua-line); border-radius: var(--radius); background: rgba(255,255,255,.88); box-shadow: 0 14px 36px rgba(28,71,91,.06); }
.overview-heading { display: grid; grid-template-columns: .7fr 1.3fr; align-items: end; gap: 32px; }
.overview-heading h2 { margin: 0; font: 900 23px/1.35 "Zen Maru Gothic"; }
.overview-heading > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.spec-grid article { min-width: 0; display: flex; gap: 11px; padding: 14px; border: 1px solid #deedef; border-radius: 15px; background: linear-gradient(145deg, #fff, #f8fdfe); }
.spec-grid article > span { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--aqua-dark); background: var(--aqua-pale); font-size: 9px; font-weight: 900; }
.spec-grid strong { display: block; font-size: 11px; }
.spec-grid p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.architecture-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 10px 13px; border-radius: 12px; color: var(--navy-soft); background: #f2fafb; font-size: 10px; }
.architecture-flow span, .architecture-flow strong { padding: 4px 8px; border-radius: 8px; background: #fff; }
.architecture-flow i { color: var(--aqua); font-style: normal; }
.architecture-flow strong { color: var(--success); }

.workspace { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 22px; align-items: start; }
.workspace > *, .result-header > div, .ai-option > span:last-child { min-width: 0; }
.card { border: 1px solid var(--aqua-line); border-radius: var(--radius); background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.input-panel { padding: 24px; position: sticky; top: 86px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.section-heading h2 { margin: 0; font: 900 23px/1.35 "Zen Maru Gothic"; }
.step-pill { width: 35px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: var(--aqua-pale); color: var(--aqua-dark); font-size: 11px; font-weight: 800; }
.drop-zone { min-height: 164px; margin-top: 20px; padding: 22px 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border: 1.5px dashed #9fd5dc; border-radius: 18px; background: linear-gradient(145deg, #fbfeff, #f1fbfd); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--aqua); background: var(--aqua-pale); transform: translateY(-1px); }
.drop-zone input { display: none; }
.drop-zone strong { margin-top: 10px; font-size: 14px; }
.drop-zone > span:last-child { color: var(--muted); font-size: 10px; margin-top: 4px; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #bde2e7; border-radius: 14px; color: var(--aqua); background: #fff; box-shadow: 0 8px 18px rgba(12,155,174,.09); }
.upload-icon svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.selected-file { margin-top: 12px; padding: 11px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--aqua-line); border-radius: 14px; background: #f9fdfe; }
.file-type { flex: none; min-width: 48px; padding: 6px; border-radius: 9px; color: #fff; background: var(--aqua); font-size: 9px; font-weight: 800; text-align: center; }
.selected-file div { min-width: 0; flex: 1; }.selected-file strong, .selected-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file strong { font-size: 12px; }.selected-file small { color: var(--muted); font-size: 10px; }
.selected-file button { border: 0; background: none; color: var(--muted); font-size: 21px; cursor: pointer; }
.ai-option { margin: 15px 0; padding: 12px 0; display: flex; align-items: center; gap: 11px; border-top: 1px solid #e5f0f2; border-bottom: 1px solid #e5f0f2; cursor: pointer; }
.ai-option > span:last-child { flex: 1; }.ai-option strong, .ai-option small { display: block; }.ai-option strong { font-size: 12px; }.ai-option small { color: var(--muted); font-size: 10px; }
.ai-option.disabled { opacity: .55; cursor: not-allowed; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }.switch input { opacity: 0; position: absolute; }.switch i { position: absolute; inset: 0; border-radius: 99px; background: #cad9de; transition: .2s; }.switch i:after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: .2s; }.switch input:checked + i { background: var(--aqua); }.switch input:checked + i:after { transform: translateX(16px); }
.primary-button, .secondary-button { min-height: 48px; padding: 0 17px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.primary-button { width: 100%; border: 0; color: white; background: linear-gradient(135deg, var(--aqua), #13adbd); box-shadow: 0 10px 22px rgba(12,155,174,.20); }
.primary-button:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(12,155,174,.27); }
.primary-button:disabled { background: #b9cbd0; box-shadow: none; cursor: not-allowed; }
.primary-button svg, .secondary-button svg, .sample-link svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sample-link { margin: 12px auto 0; width: fit-content; display: flex; align-items: center; gap: 7px; color: var(--aqua-dark); font-size: 11px; font-weight: 700; text-decoration: none; }
.sample-link:hover { text-decoration: underline; }
.safety-note { display: flex; gap: 11px; margin-top: 18px; padding: 14px; border: 1px solid #dcebed; border-radius: 15px; background: #f8fcfd; }
.shield-icon { width: 25px; height: 25px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--success); background: #e7f7f0; font-weight: 900; }
.safety-note strong { font-size: 11px; }.safety-note p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }

.result-panel { min-height: 610px; padding: 27px; }
.empty-state, .loading-state { min-height: 552px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h2, .loading-state h2 { margin: 3px 0 8px; font: 900 24px "Zen Maru Gothic"; }.empty-state > p:not(.eyebrow), .loading-state > p:not(.eyebrow) { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; }
.empty-graphic { height: 118px; display: grid; place-items: center; }
.document-sheet { position: relative; width: 76px; height: 94px; padding: 25px 15px; border: 1px solid #acdce2; border-radius: 14px; background: white; box-shadow: 0 17px 36px rgba(31,101,120,.12); transform: rotate(-3deg); }
.document-sheet:before { content: ""; position: absolute; width: 52px; height: 69px; right: -21px; top: 17px; z-index: -1; border: 1px solid #d6e9ec; border-radius: 11px; background: #f7fcfd; transform: rotate(8deg); }
.document-sheet i { display: block; height: 4px; margin-bottom: 8px; border-radius: 4px; background: #d5eaed; }.document-sheet i:nth-child(2) { width: 70%; }.document-sheet b { position: absolute; right: -11px; bottom: -9px; width: 35px; height: 35px; display: grid; place-items: center; border: 4px solid white; border-radius: 50%; color: white; background: var(--success); font-size: 16px; box-shadow: 0 6px 16px rgba(23,132,92,.22); }
.review-flow { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 650px; gap: 9px; margin: 27px 0 0; padding: 0; list-style: none; }
.review-flow li { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid #dfedef; border-radius: 14px; text-align: left; background: #fbfeff; }.review-flow li > span { width: 25px; height: 25px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--aqua-dark); background: var(--aqua-pale); font-size: 10px; font-weight: 800; }.review-flow strong, .review-flow small { display: block; }.review-flow strong { font-size: 11px; }.review-flow small { color: var(--muted); font-size: 9px; }
.progress-ring { width: 76px; height: 76px; margin-bottom: 21px; padding: 6px; border-radius: 50%; background: conic-gradient(var(--aqua) 0 28%, #e4f1f3 28% 100%); animation: spin 1.25s linear infinite; }.progress-ring span { display: block; width: 100%; height: 100%; border-radius: 50%; background: white; }.progress-steps { display: flex; gap: 6px; margin-top: 20px; }.progress-steps i { width: 30px; height: 3px; border-radius: 3px; background: #d6e8eb; }.progress-steps i.active { background: var(--aqua); }
@keyframes spin { to { transform: rotate(360deg); } }

.result-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 19px; border-bottom: 1px solid #e2eef0; }.result-header h2 { max-width: 640px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 21px "Zen Maru Gothic"; }.result-time { margin: 4px 0 0; color: var(--muted); font-size: 10px; }.review-complete { padding: 6px 11px; border-radius: 999px; color: var(--success); background: #e9f8f2; font-size: 10px; font-weight: 800; white-space: nowrap; }
.summary-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 10px; margin-top: 17px; }.summary-card { min-height: 82px; padding: 14px 16px; border: 1px solid #dcebed; border-radius: 15px; background: #fbfeff; }.summary-card small { display: block; color: var(--muted); font-size: 10px; }.summary-card strong { display: inline-block; margin-top: 5px; font: 800 25px/1 "Noto Sans JP"; }.summary-card span { margin-left: 3px; color: var(--muted); font-size: 9px; }.summary-card.critical { border-color: #f0cbd0; background: var(--critical-pale); }.summary-card.critical strong { color: var(--critical); }.summary-card.warning { border-color: #eeddb8; background: var(--warning-pale); }.summary-card.warning strong { color: var(--warning); }.summary-card.info strong, .summary-card.total strong { color: var(--aqua-dark); }
.result-notices { margin-top: 13px; padding: 11px 13px; border-radius: 12px; color: var(--warning); background: var(--warning-pale); font-size: 10px; }.result-notices p { margin: 0; }.result-notices p + p { margin-top: 4px; }
.download-actions { display: flex; gap: 10px; margin-top: 15px; }.primary-button.compact { width: auto; flex: 1; min-height: 44px; }.secondary-button { flex: 1; min-height: 44px; border: 1px solid #aadbe2; color: var(--aqua-dark); background: #fff; }.secondary-button:hover { background: var(--aqua-pale); }
.findings-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #e2eef0; }.findings-toolbar strong { font-size: 15px; }.findings-toolbar > div:first-child span { margin-left: 7px; color: var(--muted); font-size: 10px; }.filters { display: flex; gap: 5px; }.filters button { padding: 6px 10px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); background: #f1f6f7; font-size: 10px; font-weight: 700; cursor: pointer; }.filters button.active { border-color: #acdce2; color: var(--aqua-dark); background: var(--aqua-pale); }
.finding-list { margin-top: 11px; max-height: 465px; overflow: auto; padding-right: 4px; scrollbar-color: #b8d9dd transparent; }.finding-item { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 14px; padding: 15px 3px; border-bottom: 1px solid #e4eef0; }.finding-item:last-child { border-bottom: 0; }.finding-aside { text-align: center; }.severity { display: block; padding: 5px 7px; border-radius: 8px; font-size: 9px; font-weight: 800; }.severity.critical { color: var(--critical); background: var(--critical-pale); }.severity.warning { color: var(--warning); background: var(--warning-pale); }.severity.info { color: var(--info); background: #edf8fb; }.finding-source { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; }.finding-body { min-width: 0; }.finding-meta { display: flex; gap: 8px; color: var(--muted); font-size: 9px; }.finding-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.finding-body h3 { margin: 3px 0 4px; font-size: 13px; line-height: 1.55; }.finding-body p { margin: 0; color: var(--navy-soft); font-size: 11px; }.finding-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }.finding-detail div { padding: 8px 10px; border-radius: 9px; background: #f5f9fa; }.finding-detail small { display: block; color: var(--muted); font-size: 8px; font-weight: 700; }.finding-detail span { display: block; margin-top: 2px; font-size: 10px; word-break: break-word; }.no-findings { padding: 32px; text-align: center; color: var(--muted); }.no-findings strong { display: block; color: var(--success); font-size: 16px; }

.history-section { padding: 42px 3px 58px; }.history-title { align-items: flex-end; }.text-button { border: 0; color: var(--aqua-dark); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }.history-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 17px; }.history-item { padding: 17px; border: 1px solid var(--aqua-line); border-radius: 17px; background: rgba(255,255,255,.9); cursor: pointer; transition: transform .18s, box-shadow .18s; }.history-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }.history-item header { display: flex; justify-content: space-between; gap: 10px; }.history-item strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.history-item time { color: var(--muted); font-size: 9px; white-space: nowrap; }.history-counts { display: flex; gap: 13px; margin-top: 13px; color: var(--muted); font-size: 9px; }.history-counts b { margin-right: 3px; font-size: 15px; }.history-counts .c b { color: var(--critical); }.history-counts .w b { color: var(--warning); }.history-counts .i b { color: var(--info); }.history-empty { grid-column: 1/-1; margin: 0; padding: 28px; border: 1px dashed var(--aqua-line); border-radius: 17px; color: var(--muted); text-align: center; }
footer { min-height: 84px; padding: 25px 20px; display: flex; justify-content: center; align-items: center; gap: 8px; border-top: 1px solid var(--aqua-line); background: white; color: var(--muted); font-size: 11px; }footer strong { color: var(--aqua-dark); }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; max-width: min(520px, calc(100% - 32px)); padding: 11px 17px; border-radius: 12px; color: white; background: var(--navy); box-shadow: 0 12px 30px rgba(21,51,74,.28); font-size: 11px; opacity: 0; transform: translate(-50%, 15px); pointer-events: none; transition: .25s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast.error { background: var(--critical); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr 300px; padding-left: 4px; padding-right: 4px; }
  .workspace { grid-template-columns: 340px minmax(0, 1fr); }
  .input-panel, .result-panel { padding: 20px; }
  .review-flow { grid-template-columns: 1fr; max-width: 420px; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .empty-state, .loading-state { min-height: 590px; }
}
@media (max-width: 760px) {
  .topbar-inner, main { width: min(100% - 28px, 680px); }
  .brand small { display: none; }.service-state span { display: none; }.topbar-actions { gap: 8px; }
  .hero { min-height: 310px; grid-template-columns: 1fr; padding: 36px 0 22px; }.hero-copy { position: relative; z-index: 3; }.hero h1 { font-size: 38px; }.hero-lead { padding-right: 4px; font-size: 13px; }.hero-visual { position: absolute; right: 7px; top: 120px; width: 150px; min-height: 145px; opacity: .18; }.mascot { width: 150px; height: 150px; right: 0; bottom: -8px; }.molecule, .mascot-note, .lab-orbit { display: none; }
  .system-overview { padding: 20px; }.overview-heading { grid-template-columns: 1fr; gap: 9px; }.spec-grid { grid-template-columns: 1fr; }.architecture-flow { justify-content: flex-start; }
  .workspace { grid-template-columns: minmax(0, 1fr); }.input-panel { position: static; }.result-panel { min-height: auto; }.empty-state, .loading-state { min-height: 470px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }.download-actions { flex-direction: column; }.review-flow { grid-template-columns: 1fr; }.finding-item { grid-template-columns: 68px minmax(0,1fr); gap: 10px; }.finding-detail { grid-template-columns: 1fr; }.findings-toolbar { align-items: flex-start; flex-direction: column; }.filters { max-width: 100%; overflow-x: auto; }.history-list { grid-template-columns: 1fr; }.history-section { padding-bottom: 40px; }footer { flex-direction: column; gap: 1px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
