@import url('./tokens.css');
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:#e7eef4;
  color:var(--text);
  font:16px/1.6 var(--font);
  -webkit-font-smoothing:antialiased
}
button,input {
  font:inherit
}
button {
  cursor:pointer;
  transition:background .18s,transform .18s,color .18s
}
button:disabled {
  cursor:not-allowed;
  opacity:.35
}
button:focus-visible,a:focus-visible,input:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:4px
}
button:not(:disabled):active {
  transform:translateY(1px)
}
button {
  border:0
}
a {
  color:inherit;
  text-decoration:none
}
[hidden] {
  display:none!important
}
/* Matches the shared GuidePageLayout header and MenuDrawer. */
.site-header {position:sticky;top:0;z-index:50;border-bottom:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(12px)}
.header-inner {max-width:1152px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 16px}
.header-heading {display:flex;align-items:center;gap:12px;min-width:0}
.header-titles {min-width:0}
.site-wordmark {display:block;font-size:12px;font-weight:600;letter-spacing:.18em;color:var(--accent)}
.header-title {font-size:18px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.menu-toggle {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#334155;box-shadow:0 1px 2px #0f172a0d}
.menu-toggle svg,.home-link svg {width:20px;height:20px;stroke-width:2}
.menu-toggle:hover,.home-link:hover {background:#f8fafc;color:#0f172a}
.home-link {display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#334155;font-size:14px;font-weight:500;white-space:nowrap}
.site-menu {position:fixed;inset:0 auto 0 0;margin:0;padding:0;width:min(88vw,384px);max-width:none;max-height:none;height:100dvh;border:0;border-right:1px solid var(--line);background:#fff;color:var(--text);box-shadow:0 25px 50px -12px #0f172a40}
.site-menu[open] {display:flex;flex-direction:column}
.site-menu::backdrop,.license-dialog::backdrop {background:#02061773;backdrop-filter:blur(2px)}
.menu-heading {display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line)}
.menu-heading .site-wordmark {letter-spacing:.28em}
.menu-heading .menu-toggle {width:40px;height:40px;box-shadow:none}
.menu-items {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 16px 24px}
.menu-items a,.menu-placeholder {display:block;margin-bottom:4px;border:1px solid var(--line);border-radius:16px;padding:12px;font-size:14px;font-weight:600;line-height:24px;background:#f8fafccc;color:#1e293b}
.menu-items a:hover {background:#f1f5f9}
.menu-items a[aria-current="page"] {border-color:#bae6fd;background:#f0f9ff;color:#0c4a6e}
.menu-placeholder {display:flex;align-items:center;justify-content:space-between;gap:8px;border-color:#fde68a;background:#fffbeb;color:#334155}
.menu-placeholder small {flex-shrink:0;border:1px solid #fde68a;border-radius:999px;padding:0 8px;background:#fff;color:#b45309;font-size:11px}
.menu-bottom {padding:12px 20px;border-top:1px solid var(--line)}
.license-dialog {width:min(560px,calc(100% - 32px));padding:24px;border:1px solid var(--line);border-radius:24px;color:var(--text);background:#fff;box-shadow:0 20px 50px #0f172a30}
.license-heading {display:flex;align-items:center;justify-content:space-between;gap:16px}
.license-heading h2 {margin:0;font-size:20px}
.license-dialog p {font-size:14px;line-height:1.8;color:#475569}
.license-links {display:flex;flex-wrap:wrap;gap:12px 20px;font-size:14px;color:var(--accent)}
.license-links a {text-decoration:underline;text-underline-offset:4px}
.license-label {font-size:11px;letter-spacing:normal}
body:has(dialog[open]) {overflow:hidden}
main {
  max-width:1152px;
  padding:40px 16px 0;
  margin:auto
}
.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px;
  padding:32px;
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:0 1px 2px #0f172a0d;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 55%,#f8fafc 100%)
}
.eyebrow {
  font-size:12px;
  letter-spacing:2px;
  font-weight:600;
  color:var(--accent)
}
h1 {
  font-size:36px;
  line-height:1.2;
  letter-spacing:-.9px;
  font-weight:700;
  margin:12px 0
}
h1 span {
  color:var(--accent)
}
.page-heading p,.download-note {
  margin:0;
  color:var(--muted);
  font-size:15px;
  font-weight:400;
  word-break:keep-all
}
.page-heading .workflow-intro {
  margin-top:8px
}
.download-link {
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:3px
}
.download-note {
  letter-spacing:normal
}
.support-link {
  box-shadow:0 1px 2px #0f172a0d;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius:30px;
  padding:9px 16px;
  color:#334155;
  font-size:14px;
  font-weight:600;
  white-space:nowrap;
  transition:background .18s,border-color .18s
}
.support-link:hover {
  background:#eff6ff;
  border-color:#bae6fd
}
.workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  border:1px solid var(--line);
  border-radius:24px;
  overflow:hidden;
  background:var(--panel)
}
.main-panel {
  min-width:0
}
.panel-top {
  height:66px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 24px
}
.section-label {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  font-weight:600
}
.step {
  font-size:11px;
  letter-spacing:1px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  border:1px solid #e2e8f0;
  padding:0 5px;
  border-radius:4px;
  line-height:20px
}
.quiet {
  background:transparent;
  color:var(--muted);
  font-size:14px;
  padding:6px
}
.quiet:not(:disabled):hover {
  color:var(--text)
}
.quiet span {
  padding-left:5px
}
.viewer {
  position:relative;
  background:#f8fafc;
  margin:0 24px;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  min-height:310px;
  height:310px;
  overflow:hidden;
  display:grid;
  place-items:center
}
.viewer.dragover {
  border-color:var(--accent);
  background:#eff6ff
}
.empty {
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:0;
  padding:20px
}
.file-glyph {
  width:55px;
  height:61px;
  position:relative;
  margin:0 0 12px;
  color:var(--accent)
}
svg {
  width:100%;
  height:100%;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round
}
.empty h2 {
  font-size:19px;
  font-weight:600;
  margin:0 0 5px
}
.empty p {
  color:var(--muted);
  font-size:14px;
  margin:0 0 20px
}
.primary {
  background:var(--accent);
  color:#fff;
  padding:12px 19px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  font-size:15px;
  font-weight:650
}
.primary:not(:disabled):hover {
  background:#0369a1
}
.primary:disabled {
  background:#e2e8f0;
  color:#64748b;
  opacity:.5
}
.empty-note {
  color:#64748b;
  font-size:12px;
  margin-top:13px
}
.viewer video {
  width:100%;
  height:100%;
  max-height:310px;
  background:#060907
}
.source-badge {
  color:#f8fafc;
  position:absolute;
  left:12px;
  top:12px;
  background:#0c1411ce;
  border:1px solid #3b4d41;
  border-radius:5px;
  padding:4px 8px;
  font-size:11px;
  letter-spacing:.7px;
  pointer-events:none
}
.video-unavailable {
  background:rgba(255,255,255,.96);
  border-radius:8px;
  position:absolute;
  text-align:center;
  padding:20px;
  color:var(--muted);
  font-size:14px;
  pointer-events:none
}
.file-strip {
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:13px 25px 20px;
  border-bottom:1px solid var(--line);
  font-size:12px;
  color:var(--muted)
}
#filename {
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  max-width:65%;
  color:#334155
}
#filemeta {
  white-space:nowrap
}
.graph-section {
  padding:20px 24px 15px
}
.graph-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px
}
.chart-tabs {
  display:flex;
  gap:2px;
  background:#f1f5f9;
  padding:3px;
  border-radius:7px
}
.chart-tabs button {
  font-size:12px;
  color:var(--muted);
  padding:5px 11px;
  border-radius:5px;
  background:transparent
}
.chart-tabs button.active {
  background:#fff;
  color:var(--text)
}
.legend {
  display:flex;
  gap:19px;
  align-items:center;
  font-size:12px;
  margin:17px 0 0;
  color:#64748b
}
.legend>span {
  display:flex;
  align-items:center;
  gap:7px
}
.legend i {
  width:7px;
  height:7px;
  border-radius:50%;
  display:inline-block
}
.original-dot {
  background:#64748b
}
.repaired-dot {
  background:var(--accent)
}
.legend-unit {
  margin-left:auto
}
.muted {
  opacity:.4
}
.chart-wrap {
  height:200px;
  position:relative
}
canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:pan-y
}
.chart-empty {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:#64748b;
  font-size:14px;
  pointer-events:none
}
.chart-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--muted);
  font-size:12px;
  gap:12px
}
.zoom {
  display:flex;
  gap:4px
}
.zoom button {
  background:#f1f5f9;
  color:#475569;
  border-radius:5px;
  min-width:28px;
  height:27px;
  font-size:12px
}
#pan {
  width:100%;
  accent-color:var(--accent);
  margin-top:10px
}
#tooltip {
  position:absolute;
  left:50px;
  top:5px;
  background:#fffffff2;
  border:1px solid #cbd5e1;
  border-radius:7px;
  padding:7px 10px;
  font-size:12px;
  pointer-events:none;
  white-space:pre;
  z-index:1
}
.repair-panel {
  background:#ffffff;
  border-left:1px solid var(--line);
  display:flex;
  flex-direction:column;
  min-width:0
}
.beta {
  color:var(--accent);
  font-size:10px;
  letter-spacing:1.5px;
  border:1px solid #bae6fd;
  border-radius:4px;
  padding:1px 5px
}
.filter-card {
  padding:7px 25px 0
}
.filter-icon {
  color:var(--accent);
  width:42px;
  height:42px;
  background:#e0f2fe;
  padding:8px;
  border-radius:10px;
  margin-bottom:18px
}
.filter-card h2 {
  font-size:23px;
  font-weight:600;
  letter-spacing:-.8px;
  margin:0
}
.technical-name {
  font-size:13px;
  color:var(--accent);
  margin:3px 0 21px
}
.filter-card p,.export-card p {
  font-size:14px;
  color:var(--muted);
  line-height:1.8;
  margin:17px 0 21px;
  word-break:keep-all
}
.full {
  width:100%
}
.quiet.full {
  text-align:center;
  margin-top:7px
}
.processing {
  padding:18px 25px;
  font-size:13px
}
.status-heading {
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#334155
}
.processing p {
  color:var(--muted);
  font-size:12px;
  line-height:1.7;
  margin:7px 0 0;
  overflow-wrap:anywhere
}
.processing.error #status {
  color:#b91c1c
}
progress {
  width:100%;
  height:5px;
  margin-top:13px;
  accent-color:var(--accent)
}
.stats {
  border-top:1px solid var(--line);
  margin:0 25px;
  padding:12px 0
}
.stats>div {
  display:flex;
  justify-content:space-between;
  font-size:12px;
  margin:5px 0;
  color:var(--muted)
}
.stats strong {
  font-size:13px;
  color:#334155;
  font-weight:500;
  font-variant-numeric:tabular-nums
}
.stats #after-max {
  color:var(--accent)
}
.suspect-regions {
  margin:0 25px 16px
}
.suspect-list {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  max-height:132px;
  overflow:auto;
  padding:4px;
  font-size:14px;
  color:var(--muted)
}
.suspect-list button {
  padding:6px 10px;
  border:1px solid #fde68a;
  border-radius:6px;
  background:#fffbeb;
  color:#92400e;
  font-size:14px;
  font-variant-numeric:tabular-nums
}
.suspect-list button:hover {
  background:#fef3c7
}
.suspect-regions p {
  margin:8px 0 0;
  font-size:13px;
  color:var(--muted)
}
.export-card {
  padding:21px 25px 24px;
  margin-top:auto;
  border-top:1px solid var(--line);
  background:#f8fafc
}
.export-title {
  font-size:15px;
  font-weight:600
}
.export-card p {
  margin:7px 0 17px;
  font-size:13px
}
.export-button {
  width:100%;
  padding:11px 15px;
  border-radius:8px;
  background:#eff6ff;
  border:1px solid #bae6fd;
  display:flex;
  justify-content:space-between;
  color:var(--accent);
  font-size:14px;
  font-weight:600
}
.export-button:not(:disabled):hover {
  background:#e0f2fe
}
#export-status {
  margin-top:12px;
  padding:10px 12px;
  border:1px solid #bae6fd;
  border-radius:8px;
  background:#eff6ff;
  color:var(--accent);
  font-size:1rem;
  font-weight:650;
  text-align:center;
  overflow-wrap:anywhere
}
#export-status.error {
  border-color:#fecaca;
  background:#fef2f2;
  color:#b91c1c
}
.export-card>span {
  font-size:11px;
  color:var(--muted);
  display:block;
  text-align:center;
  margin-top:11px
}
#export-next-step {
  margin:8px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
  text-align:center;
  word-break:keep-all
}
.processing p:empty {
  display:none
}
footer {
  margin-top:24px;
  padding:20px 0 28px;
  border-top:1px solid var(--line);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:15px;
  color:#64748b;
  font-size:11px;
  letter-spacing:1px
}
@media(min-width:1600px) {
  .viewer {
    height:350px;
    min-height:350px
  }
  .viewer video {
    max-height:350px
  }
  .chart-wrap {
    height:240px
  }
}
@media(max-width:1000px) {
  .workspace {
    grid-template-columns:minmax(0,1fr) 300px
  }
  .panel-top {
    padding:0 18px
  }
  .viewer {
    margin:0 18px
  }
  .graph-section {
    padding:18px
  }
  .filter-card,.processing,.export-card {
    padding-left:20px;
    padding-right:20px
  }
  .graph-heading {
    align-items:flex-start;
    flex-direction:column
  }
  .page-heading {
    align-items:flex-start
  }

}
@media(max-width:760px) {
  main {
    padding:24px 16px 0
  }
  .home-link {display:none}

  .page-heading {
    flex-direction:column;
    gap:16px;
    margin-bottom:22px;
    padding:24px 20px
  }
  h1 {
    font-size:30px
  }
  .workspace {
    grid-template-columns:1fr
  }
  .repair-panel {
    border-left:0;
    border-top:1px solid var(--line)
  }
  .viewer {
    min-height:290px;
    height:290px
  }
  .viewer video {
    max-height:290px
  }
  .graph-heading {
    flex-direction:row;
    align-items:center
  }
  .graph-heading .section-label {
    font-size:13px
  }
  .chart-tabs button {
    padding:5px 7px
  }
  .filter-card p br,.export-card p br {
    display:none
  }
  .filter-card {
    padding-top:4px
  }
  .filter-icon {
    float:right;
    margin:0 0 0 15px
  }
  .processing {
    padding-top:12px
  }
  .stats {
    padding-bottom:15px
  }
  .file-strip {
    flex-direction:column;
    gap:3px
  }
  #filename {
    max-width:100%
  }
  .chart-empty {
    text-align:center;
    font-size:13px
  }
  .export-card {
    padding-top:20px
  }
  footer {
    flex-direction:column;
    font-size:10px
  }
  .support-link {
    padding:7px 12px
  }
}
/* The body workspace has its own soft palette; header and menu keep site tokens. */
main {
  --text:#24364b;
  --muted:#4b6173;
  --accent:#0369a1;
  --line:#c7d7e3;
  --panel:#f8fbfe;
  color:var(--text);
}
main .page-heading {
  border-color:#bed2e1;
  background:linear-gradient(125deg,#d9eaf5 0%,#e9f2f8 65%,#e1edf4 100%);
  box-shadow:0 4px 18px #294b6510;
}
main .workspace {box-shadow:0 8px 24px #294b6512}
main .panel-top {background:#eaf2f8}
main .section-label {color:#263f54;font-weight:700}
main .step {background:#dce9f3;border-color:#aec5d8;color:#375d77;font-weight:700}
main .viewer {background:#dfeaf2;border-color:#9fb8cb}
main .viewer.dragover {background:#d2e5f3}
main .file-strip {background:#eff5f9}
main .graph-section {background:#f7fbff;border-top:1px solid #d3e1ec}
main .chart-tabs {background:#e2ecf4}
main .chart-tabs button.active {background:#fff;color:#244761;box-shadow:0 1px 3px #36536d20}
main .chart-empty,main .legend {color:#4b6173}
main .zoom button {background:#dfebf4;color:#3d5e77}
main .repair-panel {background:#eaf3f8}
main .repair-panel .panel-top {background:#dfeef6}
main .filter-icon {background:#d1e5f4;color:#0369a1}
main .primary {box-shadow:0 2px 5px #164d7320}
main .primary:disabled {background:#ccdde9;color:#49667b;opacity:.65;box-shadow:none}
main .export-card {background:#dfedf6}
main .export-button {background:#cfe5f4;border-color:#9fc4df;color:#19577f}
main .export-button:not(:disabled):hover {background:#bedcf0}
main #export-status {background:#f1f8fd;border-color:#a5c8e0;color:#19577f}
main #export-status.error {background:#fef2f2;border-color:#fecaca;color:#b91c1c}
main .support-link {background:#f6fbff;border-color:#b9cfdf;color:#315267}
main .support-link:hover {background:#e8f3fb}
main .license-notice {padding:24px;border:1px solid #bfcfdb;border-radius:20px;background:#f2f6fa;color:#40566a;letter-spacing:normal}
.notice-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.notice-heading h2 {font-size:15px;line-height:1.5;margin:0;color:#263f54}
.license-badge {padding:4px 10px;border:1px solid #a9c7db;border-radius:999px;background:#e0edf7;color:#245d80;font-size:11px;font-weight:700}
.notice-columns {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:28px}
.notice-columns p {margin:0 0 10px;font-size:12px;line-height:1.85;word-break:keep-all;overflow-wrap:anywhere}
.notice-columns strong {color:#263f54;font-weight:700}
.notice-authors strong {display:block}
.notice-change {padding-top:10px;border-top:1px solid #cddbe5}
.notice-terms {border-left:1px solid #cddbe5;padding-left:28px}
.license-notice .license-links {border-top:1px solid #cddbe5;margin-top:12px;padding-top:16px;font-size:13px;font-weight:600}
@media(max-width:760px) {
  main .license-notice {padding:20px}
  .notice-columns {grid-template-columns:1fr;gap:8px}
  .notice-terms {border-left:0;border-top:1px solid #cddbe5;padding:16px 0 0}
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
    scroll-behavior:auto!important
  }
}

/* Shared KOR / ENG navigation, independent of the repair engine. */
.language-switch{display:inline-flex;align-items:center;gap:2px;margin-left:auto;margin-right:12px;flex-shrink:0;border:1px solid #e2e8f0;background:#f8fafc;border-radius:8px;padding:2px;font-size:11px;font-weight:700;color:#94a3b8}
.language-switch button{border:0;background:transparent;color:#64748b;padding:7px 6px;border-radius:6px;min-height:30px}
.language-switch button[aria-pressed="true"]{background:#0284c7;color:#fff}
