.tn-enc-page {
  --enc-paper: #faf6ee; --enc-wash: #f5efdf; --enc-ink: #1a1208; --enc-muted: #5a4a30;
  --enc-line: #b8a888; --enc-button: #ede6d4; --enc-hover: #dfd4bb; --enc-focus: #a83d00;
  width: min(1180px, 100%); margin: 0 auto; color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink);
}
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-d="dark"], [data-scheme="auto"][data-l="dark"]) .tn-enc-page,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-enc-page {
  --enc-paper: #241d12; --enc-wash: #322a1a; --enc-ink: #f7ead1; --enc-muted: #c3b492;
  --enc-line: #826744; --enc-button: #2f2115; --enc-hover: #3a2a1b; --enc-focus: #e8823f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-enc-page {
    --enc-paper: #241d12; --enc-wash: #322a1a; --enc-ink: #f7ead1; --enc-muted: #c3b492;
    --enc-line: #826744; --enc-button: #2f2115; --enc-hover: #3a2a1b; --enc-focus: #e8823f;
    color-scheme: dark;
  }
}
.tn-enc-page .tn-enc-tool {
  box-sizing: border-box; width: min(980px, 100%); min-width: 0; margin: 0 auto; border: 1px solid var(--enc-line); background: var(--enc-paper);
  color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif;
  font-size: 14px; line-height: 1.5;
}
.tn-enc-tool *, .tn-enc-tool *::before, .tn-enc-tool *::after { box-sizing: border-box; }
.tn-enc-tool [hidden] { display: none !important; }
.tn-enc-tool :is(p, label, output) { margin: 0; padding: 0; }
.tn-enc-tool :is(code, pre, kbd, samp) { padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; -webkit-text-fill-color: inherit; }
.tn-enc-tool .tn-enc-workspace { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); align-items: start; gap: 16px; padding: 16px; }
.tn-enc-tool .tn-enc-inputs { display: grid; align-content: start; gap: 12px; min-width: 0; }
.tn-enc-tool .tn-enc-field { display: grid; align-content: start; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.tn-enc-tool .tn-enc-field label { display: block; min-width: 0; color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink); font-size: 13px; font-weight: 700; line-height: 1.5; }
.tn-enc-tool .tn-enc-optional { color: var(--enc-muted); -webkit-text-fill-color: var(--enc-muted); font-weight: 400; }
.tn-enc-tool :is(input[type="text"], select) {
  display: block; width: 100%; min-width: 0; max-width: 100%; height: 40px; min-height: 40px;
  margin: 0; padding: 0 10px; border: 1px solid var(--enc-line); border-radius: 0;
  background: var(--enc-paper); color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink);
  font-family: inherit; font-size: 16px; font-weight: 400; line-height: normal; letter-spacing: normal; box-shadow: none;
}
.tn-enc-tool input::placeholder { color: var(--enc-muted); -webkit-text-fill-color: var(--enc-muted); opacity: 1; }
.tn-enc-tool input[aria-invalid="true"] { border-color: var(--enc-focus); }
.tn-enc-tool .tn-enc-select { position: relative; min-width: 0; }
.tn-enc-tool .tn-enc-select select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: none; font-size: 14px; cursor: pointer; }
.tn-enc-tool .tn-enc-select::after {
  content: ""; position: absolute; top: 15px; right: 13px; width: 7px; height: 7px;
  border-right: 1.5px solid var(--enc-ink); border-bottom: 1.5px solid var(--enc-ink);
  transform: rotate(45deg); pointer-events: none;
}
.tn-enc-tool select option { background: var(--enc-paper); color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink); }
.tn-enc-tool .tn-enc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.tn-enc-tool .tn-enc-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  min-width: 54px; height: 40px; min-height: 40px; margin: 0; padding: 0 12px;
  border: 1px solid var(--enc-line); border-radius: 0; background: var(--enc-button);
  color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink);
  font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: normal;
  text-transform: none; text-align: center; white-space: nowrap; box-shadow: none; cursor: pointer;
}
.tn-enc-tool .tn-enc-btn:hover:not(:disabled) { background: var(--enc-hover); }
.tn-enc-tool :is(button, input, select):focus-visible { outline: 2px solid var(--enc-focus); outline-offset: 2px; }
.tn-enc-tool .tn-enc-btn:disabled { opacity: .55; cursor: not-allowed; }
.tn-enc-tool .tn-enc-caption { min-width: 0; color: var(--enc-muted); -webkit-text-fill-color: var(--enc-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.tn-enc-tool .tn-enc-error { padding: 10px; border: 1px solid var(--enc-line); background: var(--enc-wash); color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink); overflow-wrap: anywhere; }
.tn-enc-tool .tn-enc-error:empty { display: none; }
.tn-enc-tool .tn-enc-result-frame { display: grid; align-content: start; gap: 12px; min-width: 0; }
.tn-enc-tool .tn-enc-split { color: var(--enc-muted); -webkit-text-fill-color: var(--enc-muted); font-size: 13px; overflow-wrap: anywhere; }
.tn-enc-tool .tn-enc-results { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.tn-enc-tool .tn-enc-result-row { display: grid; gap: 5px; min-width: 0; padding: 12px 0; border-top: 1px solid var(--enc-line); }
.tn-enc-tool .tn-enc-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink); font-size: 13px; font-weight: 700; }
.tn-enc-tool .tn-enc-result-heading span { min-width: 0; overflow-wrap: anywhere; }
.tn-enc-tool .tn-enc-result-row output {
  display: block; min-width: 0; max-width: 100%; border: 0; background: transparent;
  color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink); font-family: inherit;
  font-size: clamp(22px, 2.4vw, 26px); font-weight: 700; line-height: 1.4;
  white-space: normal; overflow-wrap: anywhere; word-break: normal;
}
.tn-enc-tool .tn-enc-breakdown { white-space: pre-line; }
.tn-enc-tool .tn-enc-breakdown:empty { display: none; }
.tn-enc-tool .tn-enc-status { min-width: 0; color: var(--enc-ink); -webkit-text-fill-color: var(--enc-ink); font-size: 13px; overflow-wrap: anywhere; }
.tn-enc-tool :is(.tn-enc-notice, .tn-enc-noscript) { padding: 12px 16px; border-top: 1px solid var(--enc-line); color: var(--enc-muted); -webkit-text-fill-color: var(--enc-muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.tn-enc-page .tn-enc-responsive-ad { width: 100%; max-width: 900px; min-height: 90px; height: auto; max-height: none; margin: 24px auto; background: transparent; border: 0; overflow: visible; }
@media (max-width: 760px) {
  .tn-enc-tool .tn-enc-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tn-enc-page { width: calc(100% - 10px); }
  .tn-enc-tool .tn-enc-workspace { padding: 12px; }
  .tn-enc-tool :is(.tn-enc-notice, .tn-enc-noscript) { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-enc-tool * { scroll-behavior: auto; transition: none; }
}
