.tn-width-page {
  --width-paper: #faf6ee; --width-surface: #fffcf4; --width-wash: #f5efdf;
  --width-ink: #1a1208; --width-muted: #5a4a30; --width-line: #b8a888;
  --width-soft: #ddd4be; --width-button: #ede6d4; --width-hover: #dfd4bb;
  --width-accent: #c44a00; --width-primary: #1a1208; --width-primary-text: #faf6ee;
  --width-primary-hover: #c44a00;
  width: calc(100% - 10px); max-width: 1180px; margin-inline: auto;
  color: var(--width-ink); -webkit-text-fill-color: var(--width-ink);
  -webkit-font-smoothing: antialiased;
}
.tn-width-page *, .tn-width-page *::before, .tn-width-page *::after { box-sizing: border-box; }
.tn-width-page .tn-width-ad { width: min(900px, 100%); min-height: 90px; margin-inline: auto; background: transparent; }
.tn-width-page .tn-width-ad--top { margin-top: 54px; margin-bottom: 18px; }
.tn-width-page .tn-width-ad--bottom { margin-top: 16px; margin-bottom: 26px; }
.tn-width-page .tn-width-ad ins { max-width: 100%; }
.tn-width-page .tn-width-tool { font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif; }
.tn-width-page .tn-width-tool :is(h2, h3, p) { margin: 0; }
.tn-width-page .tn-width-tool :is(button, input, textarea) { font: inherit; }
.tn-width-page .tn-width-tool :is(button, input, textarea):focus-visible { outline: 2px solid var(--width-accent); outline-offset: 2px; }
.tn-width-page .tn-width-tool button {
  display: inline-grid; place-items: center; min-height: 40px; min-width: 40px;
  padding: 9px 13px; border: 1px solid var(--width-line); border-radius: 0;
  box-shadow: none; background: var(--width-button); color: var(--width-ink);
  -webkit-text-fill-color: var(--width-ink); font-size: 12px; font-weight: 750;
  line-height: 1.25; text-align: center; cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.tn-width-page .tn-width-tool button:not(:disabled):hover { background: var(--width-hover); border-color: var(--width-ink); }
.tn-width-page .tn-width-tool button:not(:disabled):active { transform: scale(.96); }
.tn-width-page .tn-width-tool button:disabled { cursor: not-allowed; opacity: .48; }
.tn-width-page .tn-width-direction { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-width: 430px; margin-bottom: 14px; }
.tn-width-page .tn-width-tool .tn-width-direction-btn { min-height: 46px; gap: 3px; padding: 8px 12px; }
.tn-width-page .tn-width-direction-btn small { font-size: 10px; font-weight: 500; letter-spacing: .04em; }
.tn-width-page .tn-width-tool .tn-width-direction-btn[aria-pressed="true"] { background: var(--width-wash); border-color: var(--width-accent); box-shadow: inset 0 -3px var(--width-accent); color: var(--width-ink); -webkit-text-fill-color: var(--width-ink); }
.tn-width-page .tn-width-workbench { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.tn-width-page :is(.tn-width-source, .tn-width-result) { display: flex; flex-direction: column; min-width: 0; padding: 0 16px 16px; border: 1px solid var(--width-line); background: var(--width-paper); }
.tn-width-page .tn-width-result { border-top: 3px double var(--width-line); }
.tn-width-page .tn-width-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; margin: 0 -16px 14px; padding: 12px 16px; border-bottom: 1px solid var(--width-soft); }
.tn-width-page .tn-width-result .tn-width-pane-head { min-height: 56px; }
.tn-width-page .tn-width-pane-head > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.tn-width-page .tn-width-pane-head h2 { font-size: 16px; line-height: 1.35; font-weight: 800; color: var(--width-ink); -webkit-text-fill-color: var(--width-ink); }
.tn-width-page .tn-width-index { font-size: 11px; font-weight: 800; color: var(--width-accent); -webkit-text-fill-color: var(--width-accent); }
.tn-width-page :is(.tn-width-count, #tnWidthChanged) { font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif; font-variant-numeric: lining-nums tabular-nums; font-weight: 800; }
.tn-width-page .tn-width-count { white-space: nowrap; font-size: 12px; color: var(--width-muted); -webkit-text-fill-color: var(--width-muted); }
.tn-width-page :is(.tn-width-input-label, .tn-width-output-label) { display: block; margin: 0 0 7px; padding: 0; border: 0; background: transparent; color: var(--width-ink); -webkit-text-fill-color: var(--width-ink); font-size: 12px; font-weight: 700; line-height: 1.5; }
.tn-width-page .tn-width-textarea {
  display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 250px;
  margin: 0; padding: 16px; border: 1px solid var(--width-line); border-radius: 0;
  box-shadow: none; background: var(--width-surface); color: var(--width-ink);
  -webkit-text-fill-color: var(--width-ink); font-size: 16px; font-weight: 400;
  line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical;
}
.tn-width-page #tnWidthOutput { flex: 1; background: var(--width-wash); }
.tn-width-page .tn-width-textarea::placeholder { color: var(--width-muted); -webkit-text-fill-color: var(--width-muted); opacity: .5; font-weight: 400; }
.tn-width-page .tn-width-input-help { margin-top: 9px !important; color: var(--width-muted); -webkit-text-fill-color: var(--width-muted); font-size: 12px; line-height: 1.6; text-wrap: pretty; }
.tn-width-page .tn-width-options { display: flex; flex-wrap: wrap; gap: 0 16px; min-width: 0; margin: 12px 0 10px; padding: 6px 0; border: 0; border-top: 1px solid var(--width-soft); border-bottom: 1px solid var(--width-soft); }
.tn-width-page .tn-width-options legend { padding: 0 6px 0 0; font-size: 11px; font-weight: 700; color: var(--width-muted); -webkit-text-fill-color: var(--width-muted); }
.tn-width-page .tn-width-options label { display: flex; align-items: center; gap: 6px; min-height: 40px; font-size: 12px; cursor: pointer; }
.tn-width-page .tn-width-options input { appearance: auto; width: 16px; height: 16px; margin: 0; accent-color: var(--width-accent); cursor: pointer; }
.tn-width-page .tn-width-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 4px; }
.tn-width-page .tn-width-result .tn-width-actions { padding-top: 0; }
.tn-width-page .tn-width-tool #tnWidthCopy { background: var(--width-primary); border-color: var(--width-primary); color: var(--width-primary-text); -webkit-text-fill-color: var(--width-primary-text); }
.tn-width-page .tn-width-tool #tnWidthCopy:not(:disabled):hover { background: var(--width-primary-hover); border-color: var(--width-primary-hover); }
.tn-width-page .tn-width-result-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0; font-size: 12px; line-height: 1.5; color: var(--width-muted); -webkit-text-fill-color: var(--width-muted); }
.tn-width-page #tnWidthChanged { color: var(--width-accent); -webkit-text-fill-color: var(--width-accent); font-size: 20px; }
.tn-width-page .tn-width-status { min-height: 20px; margin-top: 12px !important; color: var(--width-muted); -webkit-text-fill-color: var(--width-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-width-page,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-width-page {
  --width-paper: #241d12; --width-surface: #322a1a; --width-wash: #2c2517;
  --width-ink: #efe6d2; --width-muted: #c3b492; --width-line: #826744; --width-soft: #574a37;
  --width-button: #2f2115; --width-hover: #3a2a1b; --width-accent: #e8823f;
  --width-primary: #6a3b1f; --width-primary-text: #f7ead1; --width-primary-hover: #824826;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-width-page {
    --width-paper: #241d12; --width-surface: #322a1a; --width-wash: #2c2517;
    --width-ink: #efe6d2; --width-muted: #c3b492; --width-line: #826744; --width-soft: #574a37;
    --width-button: #2f2115; --width-hover: #3a2a1b; --width-accent: #e8823f;
    --width-primary: #6a3b1f; --width-primary-text: #f7ead1; --width-primary-hover: #824826;
    color-scheme: dark;
  }
}
@media (max-width: 760px) {
  .tn-width-page .tn-width-workbench { grid-template-columns: minmax(0, 1fr); }
  .tn-width-page :is(.tn-width-source, .tn-width-result) { padding-inline: 12px; padding-bottom: 12px; }
  .tn-width-page .tn-width-pane-head { margin-inline: -12px; margin-bottom: 8px; padding-inline: 12px; }
  .tn-width-page .tn-width-direction { margin-bottom: 8px; }
  .tn-width-page .tn-width-options { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; margin-top: 8px; margin-bottom: 6px; }
  .tn-width-page .tn-width-options legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .tn-width-page .tn-width-options label { min-width: 0; }
  .tn-width-page .tn-width-textarea { min-height: 145px; padding: 12px; }
  .tn-width-page #tnWidthOutput { flex: none; }
  .tn-width-page .tn-width-direction { max-width: none; }
  .tn-width-page .tn-width-ad--top { margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-width-page .tn-width-tool button { transition: none; }
  .tn-width-page .tn-width-tool button:not(:disabled):active { transform: none; }
}
