:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #19313d;
  background: #f4f6f5;
  font-synthesis: none;
  --ink: #19313d;
  --muted: #566773;
  --border: #d9e3e3;
  --teal: #176d69;
  --teal-dark: #11534f;
  --blue: #2367a3;
  --error: #9f3436;
  --warning: #835522;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, label.button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #247bba; outline-offset: 3px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 2px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { letter-spacing: -0.035em; }
p { line-height: 1.65; }
h2 { margin-bottom: 12px; font-size: 1.52rem; line-height: 1.35; }
h3 { margin-bottom: 12px; font-size: 1.12rem; line-height: 1.45; }
h4 { margin-bottom: 12px; font-size: 0.95rem; }
pre, code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; line-height: 1.6; }
#app { max-width: 1224px; margin: 0 auto; padding: 0 36px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; top: 8px; left: 8px; padding: 10px 16px; background: white; transform: translateY(-160%); z-index: 2; border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 88px; display: flex; flex-wrap: wrap; column-gap: 24px; row-gap: 12px; padding: 20px 0 14px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.support-nav { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 12px 22px; font-size: 0.8rem; line-height: 1.6; }
.clean-examples { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.clean-examples .button-row { margin-top: 10px; }
#privacy, #contact { scroll-margin-top: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.22rem; font-weight: 750; letter-spacing: -0.04em; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #effcfa; font-size: 0.8rem; font-weight: 800; letter-spacing: -0.05em; }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; font-size: 0.875rem; font-weight: 600; }
.site-nav > a { text-decoration: none; color: var(--muted); }
.site-nav > a:hover { color: var(--teal); }
.language-links { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: white; gap: 2px; }
.language-link { padding: 7px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 0.8rem; white-space: nowrap; }
.language-link.active { background: #e6f2ef; color: #15554f; }
.hero { display: grid; grid-template-columns: 1fr 280px; align-items: center; gap: 60px; padding: 64px 0 50px; }
.hero-copy { max-width: 760px; }
.eyebrow { color: var(--teal); font-weight: 750; font-size: 0.7rem; letter-spacing: 0.13em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { max-width: 720px; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.15; font-weight: 760; margin-bottom: 22px; }
.hero-intro { max-width: 650px; color: var(--muted); font-size: 1.03rem; line-height: 1.75; margin-bottom: 24px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.77rem; color: var(--muted); }
.trust-badges span { display: flex; align-items: center; gap: 7px; }
.trust-badges span::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--teal); }
.hero-graphic { min-height: 174px; position: relative; padding: 35px 28px; border: 1px solid #cfdddd; border-radius: 18px; background: #ecf2f0; transform: rotate(-3deg); }
.graphic-title { white-space: nowrap; font-family: ui-monospace, monospace; color: #53756e; font-size: 0.71rem; letter-spacing: -0.02em; padding-bottom: 23px; }
.graphic-line { height: 9px; background: #b1cbc4; border-radius: 3px; margin-bottom: 11px; }
.line-long { width: 100%; }
.line-short { width: 70%; }
.graphic-check { position: absolute; right: -10px; bottom: -13px; width: 48px; height: 48px; display: grid; place-items: center; background: var(--teal); color: white; border: 5px solid #f4f6f5; border-radius: 50%; font-size: 1.2rem; font-weight: 600; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; align-items: stretch; scroll-margin-top: 24px; }
.panel { background: white; border: 1px solid var(--border); border-radius: 15px; padding: 28px; min-width: 0; }
.section-heading { margin-bottom: 26px; }
.section-heading p:last-child { margin-bottom: 0; }
.section-heading .eyebrow { margin-bottom: 11px; }
.muted { color: var(--muted); font-size: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; margin-top: 20px; }
.field label { font-size: 0.82rem; font-weight: 650; line-height: 1.5; }
input:not([type="file"]), select, textarea { width: 100%; color: var(--ink); border: 1px solid #cbd7da; background: #fcfdfd; border-radius: 7px; padding: 10px 12px; min-width: 0; }
select { min-height: 43px; padding-right: 24px; }
input:not([type="file"]) { min-height: 43px; }
textarea { line-height: 1.6; resize: vertical; }
textarea::placeholder { color: #7b878f; }
#paste-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.82rem; }
.field-hint { color: var(--muted); font-size: 0.76rem; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.drop-zone { border: 1px dashed #94b7b0; border-radius: 10px; background: #f5faf8; display: flex; align-items: center; flex-direction: column; gap: 8px; padding: 25px 16px; text-align: center; }
.drop-zone strong { font-size: 0.92rem; }
.drop-zone .muted { font-size: 0.75rem; }
.drop-zone .button { margin-top: 7px; }
.drop-zone.is-dragover { background: #e0f1ea; border-color: var(--teal); }
.drop-zone:focus-within { outline: 3px solid #247bba; outline-offset: 3px; }
.upload-symbol { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e3efeb; color: var(--teal); font-size: 1.2rem; font-weight: 650; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 16px; font-size: 0.81rem; font-weight: 650; border: 1px solid #cad8d9; border-radius: 7px; background: white; color: var(--ink); line-height: 1.45; text-decoration: none; text-align: center; transition: background-color 120ms, border-color 120ms; }
.button:hover { background: #f0f5f4; border-color: #a4bcba; }
.button-primary { background: var(--teal); border-color: var(--teal); color: white; }
.button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.button-secondary { background: white; border-color: #b8cfca; color: #1e6159; }
.button-quiet { background: #f1f5f4; border-color: #f1f5f4; color: #3b5a63; }
.button:disabled { color: #687980; background: #edf1f1; border-color: #e0e7e7; }
.button-full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button-small { min-height: 36px; padding: 7px 11px; font-size: 0.75rem; }
.input-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-top: 18px; }
.input-actions > .field { flex: 1 1 170px; margin-top: 0; }
.input-actions .button-row { flex: 1 1 260px; justify-content: flex-end; }
.settings-panel .field:first-of-type { margin-top: 0; }
.settings-panel .field-hint { margin-top: 10px; }
.threshold-fields { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 12px; }
.threshold-fields .field { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; margin-top: 12px; gap: 12px; }
.counting-hint { color: #395d65; font-size: 0.77rem; line-height: 1.65; background: #eff6f5; padding: 13px 14px; border-radius: 7px; margin: 24px 0; }
.status-message { margin: 15px 0 0; min-height: 1.5em; color: var(--teal-dark); font-size: 0.8rem; line-height: 1.65; overflow-wrap: anywhere; }
.error-text { color: var(--error); }
.results-panel { margin-top: 24px; padding: 30px; }
.empty-state { padding: 35px 20px; border: 1px dashed var(--border); border-radius: 8px; text-align: center; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; margin-bottom: 22px; }
.stat { display: flex; align-items: baseline; gap: 10px; padding: 22px; background: #f8faf9; border-right: 1px solid var(--border); min-width: 0; }
.stat:last-child { border-right: none; }
.stat strong { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.04em; }
.stat span { font-size: 0.78rem; color: var(--muted); }
.stat-error strong { color: var(--error); }
.stat-warning strong { color: var(--warning); }
.notice { padding: 15px 17px; border-radius: 8px; line-height: 1.65; font-size: 0.82rem; margin-bottom: 24px; }
.notice strong { font-size: 0.9rem; }
.notice p { margin: 6px 0 0; }
.notice-error { color: #813435; border: 1px solid #edd3d1; background: #fdf4f2; }
.notice-success { color: var(--teal-dark); border: 1px solid #c6e0d6; background: #f1f8f4; }
.result-section + .result-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); }
.diagnostics { padding: 0; margin: 0; list-style: none; }
.diagnostic { padding: 15px 0; border-bottom: 1px solid #e7eeee; }
.diagnostic:last-child { border-bottom: none; }
.diagnostic-heading { display: flex; gap: 10px; align-items: baseline; }
.diagnostic-heading strong { font-size: 0.85rem; line-height: 1.5; }
.diagnostic > .field-hint { margin: 7px 0 0; }
.pill { display: inline-flex; flex-shrink: 0; border-radius: 5px; padding: 3px 7px; font-size: 0.66rem; font-weight: 750; line-height: 1.4; }
.pill-error { color: #873536; background: #fae8e4; }
.pill-warning { color: #77521f; background: #f7edda; }
.diagnostic-detail { margin-top: 5px; color: var(--muted); font-size: 0.74rem; }
.diagnostic-detail summary { cursor: pointer; width: fit-content; padding: 3px 0; }
.diagnostic-detail p { margin: 7px 0; overflow-wrap: anywhere; }
.diagnostic-detail pre { padding: 10px; background: #f4f7f7; border-radius: 5px; font-size: 0.72rem; }
.table-wrap { width: 100%; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cue-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.82rem; }
.cue-table th { background: #f5f8f7; color: #4f6670; text-align: left; font-size: 0.75rem; font-weight: 650; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.cue-table th:first-child { width: 13%; }
.cue-table th:nth-child(2) { width: 30%; }
.cue-table td { padding: 16px; vertical-align: top; border-bottom: 1px solid #e4eceb; }
.cue-table tbody tr:last-child td { border-bottom: 0; }
.cue-cell strong { display: block; font-size: 0.94rem; }
.cue-identifier { display: block; font-size: 0.68rem; color: var(--muted); overflow-wrap: anywhere; margin-top: 5px; }
.cue-note { display: block; font-size: 0.65rem; color: var(--warning); margin-top: 10px; line-height: 1.5; }
.time-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; margin-bottom: 8px; }
.time-row span { color: var(--muted); font-size: 0.65rem; min-width: 32px; }
.time-row code { font-size: 0.73rem; overflow-wrap: anywhere; }
.cue-editor { font-size: 0.82rem; min-height: 86px; background: white; }
.pager { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-top: 16px; }
.pager-buttons { display: flex; gap: 12px; align-items: center; }
.page-label { font-size: 0.73rem; color: var(--muted); }
.diff-card { margin-top: 20px; }
.diff-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff-columns > div { padding: 14px 16px; border-radius: 7px; border: 1px solid var(--border); min-width: 0; }
.diff-original { background: #f6f8f8; }
.diff-edited { background: #eff8f3; border-color: #cadfd2 !important; }
.diff-label { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 9px; font-weight: 650; }
.diff-columns pre { font-family: inherit; font-size: 0.84rem; }
.download-panel .field-hint { margin-top: 14px; }
.guide { margin: 64px 0 42px; scroll-margin-top: 24px; }
.guide-heading { max-width: 700px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-card { padding: 24px; background: #edf1f0; border: 1px solid #e0e7e5; border-radius: 10px; }
.guide-card p, .guide-card li { color: var(--muted); font-size: 0.82rem; line-height: 1.85; }
.guide-card p:last-child { margin-bottom: 0; }
.guide-card ol { padding-left: 19px; margin-bottom: 0; }
.guide-card li { padding-left: 4px; margin-bottom: 8px; }
.guide-card li:last-child { margin-bottom: 0; }
.worked-examples { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--border); }
.worked-examples > .muted { max-width: 860px; }
.worked-examples-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.worked-example { padding: 22px; background: white; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.example-index { display: block; color: var(--teal); font-size: 0.7rem; letter-spacing: 0.1em; font-weight: 750; margin-bottom: 12px; }
.worked-example h4 { font-size: 1rem; line-height: 1.45; margin-bottom: 22px; }
.example-label { margin: 0 0 9px; color: var(--muted); font-size: 0.7rem; font-weight: 650; line-height: 1.5; }
.example-code { padding: 13px 14px; background: #19313d; color: #e4f1ef; border-radius: 6px; font-size: 0.7rem; line-height: 1.8; }
.example-result { padding: 14px 0 14px 12px; border-left: 3px solid #aaccc1; font-size: 0.78rem; line-height: 1.8; color: #325951; margin: 18px 0; }
.example-explanation { color: var(--muted); font-size: 0.77rem; line-height: 1.85; margin: 18px 0 0; }
.sources { padding: 24px 0 0; }
.sources p { max-width: 860px; }
.sources ul { padding-left: 19px; font-size: 0.81rem; line-height: 2; }
.sources a { overflow-wrap: anywhere; }
.site-footer { padding: 26px 0 35px; border-top: 1px solid var(--border); font-size: 0.72rem; color: var(--muted); line-height: 1.6; }
@media (max-width: 1000px) {
  #app { padding: 0 24px; }
  .hero { gap: 30px; grid-template-columns: 1fr 220px; }
  .hero-graphic { padding: 30px 20px; }
  .worked-examples-grid { grid-template-columns: 1fr; }
  .graphic-title { font-size: 0.63rem; }
  .tool-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
  .panel { padding: 23px; }
  .input-actions .button-row { justify-content: flex-start; }
  .stat { padding: 18px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .cue-table td { padding: 12px; }
  .cue-table th { padding: 12px; }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 42px 0 34px; }
  .hero-graphic { display: none; }
  .hero h1 { max-width: 700px; }
  .tool-grid { grid-template-columns: 1fr; }
  .threshold-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .threshold-fields .field { display: flex; gap: 9px; align-items: stretch; }
  .threshold-fields label { min-height: 2.7em; }
  .counting-hint { margin: 20px 0; }
  .settings-panel .button-full { width: auto; min-width: 220px; }
  .guide { margin-top: 48px; }
}
@media (max-width: 600px) {
  #app { padding: 0 16px; }
  .site-header { min-height: 77px; gap: 12px; }
  .brand { gap: 8px; font-size: 1.02rem; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 0.7rem; }
  .site-nav { gap: 10px; }
  .site-nav > a { display: none; }
  .language-link { padding: 7px 8px; font-size: 0.72rem; }
  .hero { padding: 33px 0 29px; }
  .hero h1 { font-size: 2.2rem; margin-bottom: 18px; }
  .hero-intro { font-size: 0.92rem; }
  .trust-badges { gap: 9px 15px; font-size: 0.7rem; }
  .panel { padding: 20px; border-radius: 11px; }
  .section-heading { margin-bottom: 21px; }
  h2 { font-size: 1.35rem; }
  .muted { font-size: 0.83rem; }
  .drop-zone { padding: 22px 14px; }
  .input-actions { gap: 14px; }
  .input-actions .button-row { width: 100%; }
  .input-actions .button-row .button { flex: 1 1 auto; }
  .threshold-fields { gap: 10px; }
  .threshold-fields label { font-size: 0.74rem; min-height: 3em; }
  .threshold-fields input { padding-left: 9px; padding-right: 9px; }
  .settings-panel .button-full { width: 100%; }
  .results-panel { margin-top: 18px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 16px; flex-direction: row; gap: 10px; align-items: baseline; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .stat strong { font-size: 1.55rem; }
  .stat span { font-size: 0.72rem; }
  .diagnostic-heading { align-items: flex-start; }
  .diagnostic-heading strong { font-size: 0.81rem; }
  .cue-table, .cue-table tbody, .cue-table tr, .cue-table td { display: block; width: 100%; }
  .cue-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .cue-table tr { padding: 16px; border-bottom: 1px solid var(--border); }
  .cue-table tr:last-child { border-bottom: 0; }
  .cue-table td { padding: 0; border: 0; }
  .cue-table td::before { content: attr(data-label); display: block; font-size: 0.69rem; color: var(--muted); font-weight: 600; margin-bottom: 7px; }
  .cue-table .cue-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; margin-bottom: 13px; }
  .cue-cell .cue-note { margin: 0 0 0 auto; }
  .cue-cell .cue-identifier { margin-top: 0; }
  .cue-table .timing-cell { margin-bottom: 14px; }
  .time-row { display: inline-flex; margin: 0 15px 5px 0; }
  .time-row code { font-size: 0.7rem; }
  .cue-editor { min-height: 110px; }
  .pager { gap: 12px; }
  .pager-buttons { width: 100%; justify-content: space-between; gap: 8px; }
  .diff-columns { grid-template-columns: 1fr; gap: 8px; }
  .download-panel .button-row { flex-direction: column; align-items: stretch; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { padding: 20px; }
  .guide-card p, .guide-card li { font-size: 0.79rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .button { transition: none; } }
