.tn-text-comparator-page {
  --tc-paper: #faf6ee;
  --tc-surface: rgba(255, 252, 244, .74);
  --tc-wash: #f5efdf;
  --tc-ink: #1a1208;
  --tc-muted: #5a4a30;
  --tc-line: #b8a888;
  --tc-soft-line: #ddd4be;
  --tc-button: #ede6d4;
  --tc-button-hover: #dfd4bb;
  --tc-accent: #c44a00;
  --tc-added: #2f7d54;
  max-width: 1180px;
  width: calc(100% - 10px);
  margin-inline: auto;
  color: var(--tc-ink);
  -webkit-text-fill-color: var(--tc-ink);
}

.tn-text-comparator-page *, .tn-text-comparator-page *::before, .tn-text-comparator-page *::after { box-sizing: border-box; }
.tn-text-comparator-page .tc-ad { width: min(900px, 100%); min-height: 90px; margin-inline: auto; background: transparent; }
.tn-text-comparator-page .tc-ad--top { margin-top: 54px; margin-bottom: 18px; }
.tn-text-comparator-page .tc-ad--bottom { margin-top: 16px; margin-bottom: 26px; }
.tn-text-comparator-page .tc-ad ins { max-width: 100%; }

.tn-text-comparator-page .tc-tool {
  padding: 18px;
  border: 1px solid var(--tc-line);
  background: var(--tc-paper);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.tn-text-comparator-page .tc-tool :is(button, input, textarea) { font: inherit; }
.tn-text-comparator-page .tc-tool :is(button, input[type="checkbox"], input[type="file"]) { cursor: pointer; }
.tn-text-comparator-page .tc-tool :is(button, input, textarea):focus-visible,
.tn-text-comparator-page .tc-diff-row:focus-visible { outline: 2px solid var(--tc-accent); outline-offset: 2px; }
.tn-text-comparator-page .tc-tool :is(button, input, textarea):disabled { cursor: not-allowed; opacity: .54; }
.tn-text-comparator-page .tc-tool :is(h2, h3, p) { margin: 0; }
.tn-text-comparator-page .tc-tool :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
.tn-text-comparator-page .tc-commandbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding-bottom: 14px; }
.tn-text-comparator-page .tc-local-note { color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font-size: 12px; line-height: 1.4; }

.tn-text-comparator-page .tc-input-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tn-text-comparator-page .tc-input-pane { min-width: 0; border: 1px solid var(--tc-line); background: var(--tc-surface); }
.tn-text-comparator-page .tc-pane-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 45px; padding: 8px 12px; border-bottom: 1px solid var(--tc-soft-line); }
.tn-text-comparator-page .tc-pane-head :is(h2, label) { color: var(--tc-ink); -webkit-text-fill-color: var(--tc-ink); font-size: 14px; font-weight: 800; line-height: 1.35; }
.tn-text-comparator-page .tc-pane-number { margin-right: 7px; color: var(--tc-accent); -webkit-text-fill-color: var(--tc-accent); font: 700 11px/1 "Courier New", monospace; }
.tn-text-comparator-page .tc-pane-head .tc-file-label { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; min-height: 40px; padding: 7px 9px; border: 1px solid var(--tc-line); background: var(--tc-button); font: 800 11px/1.2 "Courier New", monospace; cursor: pointer; }
.tn-text-comparator-page .tc-file-label:focus-within { outline: 2px solid var(--tc-accent); outline-offset: 2px; }
.tn-text-comparator-page .tc-file-label input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tn-text-comparator-page .tc-pane-head :is(small, span) { color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tn-text-comparator-page .tc-input-pane textarea { display: block; width: 100%; min-height: 270px; max-width: 100%; padding: 13px 14px; resize: vertical; border: 0; border-radius: 0; outline-offset: -3px; background: transparent; color: var(--tc-ink); -webkit-text-fill-color: var(--tc-ink); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.tn-text-comparator-page .tc-input-pane textarea::placeholder { color: var(--tc-muted); opacity: .6; -webkit-text-fill-color: var(--tc-muted); }
.tn-text-comparator-page .tc-pane-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--tc-soft-line); color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font-size: 12px; }
.tn-text-comparator-page .tc-pane-foot :is(small, span) { min-width: 0; overflow-wrap: anywhere; }

.tn-text-comparator-page .tc-comparebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.tn-text-comparator-page .tc-options { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.tn-text-comparator-page .tc-options label, .tn-text-comparator-page .tc-results-toolbar label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.tn-text-comparator-page .tc-options input, .tn-text-comparator-page .tc-results-toolbar label input { width: 16px; height: 16px; margin: 0; accent-color: var(--tc-accent); }
.tn-text-comparator-page .tc-actions, .tn-text-comparator-page .tc-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tn-text-comparator-page .tc-tool button { display: inline-grid; place-items: center; min-height: 40px; padding: 9px 13px; border: 1px solid var(--tc-line); border-radius: 0; background: var(--tc-button); color: var(--tc-ink); -webkit-text-fill-color: var(--tc-ink); box-shadow: none; font: 800 12px/1.25 "Courier New", monospace; text-align: center; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.tn-text-comparator-page .tc-tool button:not(:disabled):hover { background: var(--tc-button-hover); border-color: var(--tc-ink); }
.tn-text-comparator-page .tc-tool button:not(:disabled):active { transform: scale(.96); }
.tn-text-comparator-page .tc-tool button.tc-primary { min-width: 168px; background: var(--tc-ink); border-color: var(--tc-ink); color: var(--tc-paper); -webkit-text-fill-color: var(--tc-paper); }
.tn-text-comparator-page .tc-tool button.tc-primary:not(:disabled):hover { background: var(--tc-accent); border-color: var(--tc-accent); }
.tn-text-comparator-page .tc-status { min-height: 27px; margin-top: 10px !important; color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font-size: 13px; line-height: 1.5; }
.tn-text-comparator-page [data-state="error"] .tc-status,
.tn-text-comparator-page [data-state="stale"] .tc-status { color: var(--tc-accent); -webkit-text-fill-color: var(--tc-accent); }
.tn-text-comparator-page .tc-hint { margin: 9px 0 0 !important; color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font-size: 12px; line-height: 1.5; }

.tn-text-comparator-page .tc-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 14px; border: 1px solid var(--tc-line); background: var(--tc-surface); }
.tn-text-comparator-page .tc-summary[hidden] { display: none; }
.tn-text-comparator-page .tc-summary > * { min-width: 0; padding: 11px 13px; border-right: 1px solid var(--tc-soft-line); }
.tn-text-comparator-page .tc-summary > *:last-child { border-right: 0; }
.tn-text-comparator-page .tc-summary :is(span, small) { display: block; color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font-size: 12px; }
.tn-text-comparator-page .tc-summary strong { display: block; margin-top: 3px; color: var(--tc-ink); -webkit-text-fill-color: var(--tc-ink); font-size: 23px; font-weight: 800; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.tn-text-comparator-page .tc-summary > :first-child strong { color: var(--tc-added); -webkit-text-fill-color: var(--tc-added); }
.tn-text-comparator-page .tc-summary > :nth-child(2) strong { color: var(--tc-accent); -webkit-text-fill-color: var(--tc-accent); }

.tn-text-comparator-page .tc-results-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 16px; padding: 10px 0; border-top: 1px solid var(--tc-line); border-bottom: 1px solid var(--tc-soft-line); }
.tn-text-comparator-page .tc-results-toolbar h2 { font-size: 15px; font-weight: 800; }
.tn-text-comparator-page .tc-results-columns { display: grid; grid-template-columns: 82px repeat(2, minmax(0, 1fr)); padding: 8px 0; border-bottom: 1px solid var(--tc-line); background: var(--tc-wash); color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font-size: 12px; font-weight: 700; text-align: center; }
.tn-text-comparator-page .tc-results-columns > * + * { border-left: 1px solid var(--tc-soft-line); }
.tn-text-comparator-page .tc-results { min-width: 0; min-height: 74px; border-bottom: 1px solid var(--tc-line); }
.tn-text-comparator-page .tc-empty { display: grid; place-items: center; min-height: 135px; padding: 18px; color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); text-align: center; }
.tn-text-comparator-page .tc-empty > span { font: 700 22px/1 "Courier New", monospace; }
.tn-text-comparator-page .tc-empty strong { display: block; font-size: 14px; }
.tn-text-comparator-page .tc-empty p { margin: 3px 0 0; font-size: 12px; }
.tn-text-comparator-page .tc-results.is-stale { opacity: .52; }
.tn-text-comparator-page .tc-diff-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); border-top: 1px solid var(--tc-soft-line); scroll-margin-top: 84px; }
.tn-text-comparator-page .tc-diff-row[hidden] { display: none; }
.tn-text-comparator-page .tc-diff-row:first-child { border-top: 0; }
.tn-text-comparator-page .tc-diff-row.is-current { outline: 2px solid var(--tc-accent); outline-offset: -2px; }
.tn-text-comparator-page .tc-diff-kind { display: flex; align-items: flex-start; padding: 12px 8px; border-right: 1px solid var(--tc-soft-line); color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font: 800 11px/1.3 "Courier New", monospace; white-space: nowrap; }
.tn-text-comparator-page .tc-diff-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
.tn-text-comparator-page .tc-diff-cell { display: grid; grid-template-columns: 39px minmax(0, 1fr); min-width: 0; }
.tn-text-comparator-page .tc-diff-cell--old { border-right: 1px solid var(--tc-soft-line); }
.tn-text-comparator-page .tc-line-number { padding: 11px 6px; border-right: 1px solid var(--tc-soft-line); color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); text-align: right; font: 600 11px/1.55 "Courier New", monospace; font-variant-numeric: tabular-nums; }
.tn-text-comparator-page .tc-diff-text { min-width: 0; padding: 10px 11px; color: var(--tc-ink); -webkit-text-fill-color: var(--tc-ink); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.tn-text-comparator-page .tc-diff-text:empty::after { content: ' '; white-space: pre; }
.tn-text-comparator-page .tc-diff-row--add { background: rgba(47, 125, 84, .09); }
.tn-text-comparator-page .tc-diff-row--delete { background: rgba(196, 74, 0, .09); }
.tn-text-comparator-page .tc-diff-row--modify { background: var(--tc-wash); }
.tn-text-comparator-page .tc-diff-row--add .tc-diff-kind { color: var(--tc-added); -webkit-text-fill-color: var(--tc-added); }
.tn-text-comparator-page .tc-diff-row--delete .tc-diff-kind { color: var(--tc-accent); -webkit-text-fill-color: var(--tc-accent); }
.tn-text-comparator-page .tc-diff-cell--old mark { background: rgba(196, 74, 0, .2); color: inherit; -webkit-text-fill-color: inherit; }
.tn-text-comparator-page .tc-diff-cell--new mark { background: rgba(47, 125, 84, .2); color: inherit; -webkit-text-fill-color: inherit; }

body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-text-comparator-page,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-text-comparator-page {
  --tc-paper: #241d12;
  --tc-surface: #322a1a;
  --tc-wash: #2c2517;
  --tc-ink: #efe6d2;
  --tc-muted: #c3b492;
  --tc-line: #6f6047;
  --tc-soft-line: #574a37;
  --tc-button: #2f2115;
  --tc-button-hover: #473723;
  --tc-accent: #e8823f;
  --tc-added: #91c5a3;
}
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-text-comparator-page .tc-tool button.tc-primary,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-text-comparator-page .tc-tool button.tc-primary { background: #6a3b1f; border-color: #e8823f; color: #f7ead1; -webkit-text-fill-color: #f7ead1; }
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-text-comparator-page .tc-tool button:not(.tc-primary),
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-text-comparator-page .tc-tool button:not(.tc-primary) { color: #f7ead1; -webkit-text-fill-color: #f7ead1; }
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-text-comparator-page .tc-diff-row--add,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-text-comparator-page .tc-diff-row--add { background: #283528; }
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-text-comparator-page .tc-diff-row--delete,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-text-comparator-page .tc-diff-row--delete { background: #3c281b; }
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-text-comparator-page .tc-diff-cell--old mark,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-text-comparator-page .tc-diff-cell--old mark { background: #6a3b1f; }
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-text-comparator-page .tc-diff-cell--new mark,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-text-comparator-page .tc-diff-cell--new mark { background: #2f5d40; }
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-text-comparator-page:not(.force-light) {
    --tc-paper: #241d12; --tc-surface: #322a1a; --tc-wash: #2c2517; --tc-ink: #efe6d2; --tc-muted: #c3b492; --tc-line: #6f6047; --tc-soft-line: #574a37; --tc-button: #2f2115; --tc-button-hover: #473723; --tc-accent: #e8823f; --tc-added: #91c5a3;
  }
  body[data-scheme="auto"] .tn-text-comparator-page .tc-tool button.tc-primary { background: #6a3b1f; border-color: #e8823f; color: #f7ead1; -webkit-text-fill-color: #f7ead1; }
  body[data-scheme="auto"] .tn-text-comparator-page .tc-tool button:not(.tc-primary) { color: #f7ead1; -webkit-text-fill-color: #f7ead1; }
  body[data-scheme="auto"] .tn-text-comparator-page .tc-diff-row--add { background: #283528; }
  body[data-scheme="auto"] .tn-text-comparator-page .tc-diff-row--delete { background: #3c281b; }
  body[data-scheme="auto"] .tn-text-comparator-page .tc-diff-cell--old mark { background: #6a3b1f; }
  body[data-scheme="auto"] .tn-text-comparator-page .tc-diff-cell--new mark { background: #2f5d40; }
}

@media (max-width: 720px) {
  .tn-text-comparator-page .tc-ad--top { margin-top: 48px; }
  .tn-text-comparator-page .tc-tool { padding: 9px; }
  .tn-text-comparator-page .tc-input-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .tn-text-comparator-page .tc-input-pane textarea { min-height: 190px; }
  .tn-text-comparator-page .tc-comparebar { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .tn-text-comparator-page .tc-tool button.tc-primary { width: 100%; }
  .tn-text-comparator-page .tc-actions { width: 100%; }
  .tn-text-comparator-page .tc-actions button { flex: 1 1 auto; }
  .tn-text-comparator-page .tc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-text-comparator-page .tc-summary > :nth-child(2) { border-right: 0; }
  .tn-text-comparator-page .tc-summary > :nth-child(-n+2) { border-bottom: 1px solid var(--tc-soft-line); }
  .tn-text-comparator-page .tc-diff-row { display: block; }
  .tn-text-comparator-page .tc-diff-kind { padding: 7px 9px; border-right: 0; border-bottom: 1px solid var(--tc-soft-line); }
  .tn-text-comparator-page .tc-diff-pair { grid-template-columns: minmax(0, 1fr); }
  .tn-text-comparator-page .tc-diff-cell--old { border-right: 0; border-bottom: 1px solid var(--tc-soft-line); }
  .tn-text-comparator-page .tc-diff-cell::before { grid-column: 1 / -1; padding: 5px 9px; border-bottom: 1px solid var(--tc-soft-line); color: var(--tc-muted); -webkit-text-fill-color: var(--tc-muted); font: 700 11px/1.2 "Courier New", monospace; }
  .tn-text-comparator-page .tc-diff-cell--old::before { content: '원본'; }
  .tn-text-comparator-page .tc-diff-cell--new::before { content: '수정본'; }
  .tn-text-comparator-page .tc-results-toolbar { align-items: flex-start; }
  .tn-text-comparator-page .tc-results-columns { display: none; }
  .tn-text-comparator-page .tc-result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .tn-text-comparator-page .tc-result-actions button { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-text-comparator-page .tc-tool button { transition: none; }
  .tn-text-comparator-page .tc-tool button:not(:disabled):active { transform: none; }
}
