.tn-hkc-page {
  --hkc-paper: #faf6ee;
  --hkc-surface: #fffcf4;
  --hkc-wash: #f5efdf;
  --hkc-ink: #1a1208;
  --hkc-muted: #5a4a30;
  --hkc-line: #b8a888;
  --hkc-soft: #ddd4be;
  --hkc-button: #ede6d4;
  --hkc-hover: #dfd4bb;
  --hkc-accent: #c44a00;
  width: min(1180px, calc(100% - 10px));
  min-width: 0;
  margin-inline: auto;
  color: var(--hkc-ink);
  -webkit-text-fill-color: var(--hkc-ink);
}
.tn-hkc-page *, .tn-hkc-page *::before, .tn-hkc-page *::after { box-sizing: border-box; }
.tn-hkc-page .hkc-ad { width: min(900px, 100%); min-height: 90px; margin-inline: auto; background: transparent; }
.tn-hkc-page .hkc-ad--top { margin-top: 54px; margin-bottom: 18px; }
.tn-hkc-page .hkc-ad--bottom { margin-top: 16px; margin-bottom: 26px; }
.tn-hkc-page .hkc-tool {
  min-width: 0;
  border: 1px solid var(--hkc-line);
  border-top: 2px solid var(--hkc-ink);
  background: var(--hkc-paper);
  color: var(--hkc-ink);
  -webkit-text-fill-color: var(--hkc-ink);
  font: 400 14px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
.tn-hkc-page .hkc-tool :is(p, h2) { margin: 0; }
.tn-hkc-page .hkc-tool :is(button, textarea) { font: inherit; border-radius: 0; box-shadow: none; }
.tn-hkc-page .hkc-tool :is(button, textarea):focus-visible { outline: 2px solid var(--hkc-accent); outline-offset: 2px; }
.tn-hkc-page .hkc-tool :is(code, pre, kbd, samp) { padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; -webkit-text-fill-color: inherit; }
.tn-hkc-page .hkc-tool button {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  min-width: 42px;
  padding: 8px 14px;
  border: 1px solid var(--hkc-line);
  background: var(--hkc-button);
  color: var(--hkc-ink);
  -webkit-text-fill-color: var(--hkc-ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.tn-hkc-page .hkc-tool button:not(:disabled):hover { background: var(--hkc-hover); border-color: var(--hkc-ink); }
.tn-hkc-page .hkc-tool button:disabled { opacity: .5; cursor: not-allowed; }
.tn-hkc-page .hkc-direction-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hkc-line);
  background: var(--hkc-wash);
}
.tn-hkc-page .hkc-direction-group { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tn-hkc-page .hkc-tool button[aria-pressed="true"] {
  background: var(--hkc-ink);
  border-color: var(--hkc-ink);
  color: var(--hkc-paper);
  -webkit-text-fill-color: var(--hkc-paper);
}
.tn-hkc-page .hkc-direction-bar__note { color: var(--hkc-muted); -webkit-text-fill-color: var(--hkc-muted); font-size: 12px; white-space: nowrap; }
.tn-hkc-page .hkc-editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tn-hkc-page .hkc-pane { display: flex; flex-direction: column; min-width: 0; background: var(--hkc-surface); }
.tn-hkc-page .hkc-pane--source { border-right: 1px solid var(--hkc-line); }
.tn-hkc-page .hkc-pane--result { background: var(--hkc-wash); }
.tn-hkc-page .hkc-pane-head, .tn-hkc-page .hkc-pane-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tn-hkc-page .hkc-pane-head { min-height: 55px; padding: 10px 16px; border-bottom: 1px solid var(--hkc-soft); }
.tn-hkc-page .hkc-pane-head :is(label, h2) { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; line-height: 1.3; color: var(--hkc-ink); -webkit-text-fill-color: var(--hkc-ink); }
.tn-hkc-page .hkc-pane-number { color: var(--hkc-accent); -webkit-text-fill-color: var(--hkc-accent); font-size: 11px; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.tn-hkc-page .hkc-pane-head small { flex: none; color: var(--hkc-muted); -webkit-text-fill-color: var(--hkc-muted); font-size: 12px; font-variant-numeric: lining-nums tabular-nums; }
.tn-hkc-page .hkc-pane textarea {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 210px;
  max-width: 100%;
  padding: 18px 16px;
  border: 0;
  resize: vertical;
  background: transparent;
  color: var(--hkc-ink);
  -webkit-text-fill-color: var(--hkc-ink);
  font-size: 17px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}
.tn-hkc-page .hkc-pane textarea::placeholder { color: var(--hkc-muted); -webkit-text-fill-color: var(--hkc-muted); opacity: 1; }
.tn-hkc-page .hkc-pane-foot { min-height: 65px; padding: 9px 16px; border-top: 1px solid var(--hkc-soft); }
.tn-hkc-page .hkc-pane-foot__label { color: var(--hkc-muted); -webkit-text-fill-color: var(--hkc-muted); font-size: 12px; }
.tn-hkc-page .hkc-samples, .tn-hkc-page .hkc-result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tn-hkc-page .hkc-samples button { min-height: 40px; padding: 7px 10px; background: transparent; font-size: 12px; font-weight: 700; }
.tn-hkc-page .hkc-result-actions button { min-height: 40px; padding: 7px 12px; }
.tn-hkc-page .hkc-tool button.hkc-copy { background: var(--hkc-ink); border-color: var(--hkc-ink); color: var(--hkc-paper); -webkit-text-fill-color: var(--hkc-paper); }
.tn-hkc-page .hkc-tool button.hkc-copy:not(:disabled):hover { background: var(--hkc-accent); border-color: var(--hkc-accent); }
.tn-hkc-page .hkc-trace-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; min-height: 58px; padding: 10px 16px; border-top: 1px solid var(--hkc-line); background: var(--hkc-paper); }
.tn-hkc-page .hkc-trace-label { flex: none; color: var(--hkc-muted); -webkit-text-fill-color: var(--hkc-muted); font-size: 12px; font-weight: 700; }
.tn-hkc-page .hkc-trace { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tn-hkc-page .hkc-key-pair { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid var(--hkc-soft); background: var(--hkc-wash); font-size: 13px; line-height: 1.3; }
.tn-hkc-page .hkc-key-pair kbd { min-width: 18px; text-align: center; font-weight: 700; }
.tn-hkc-page .hkc-key-pair b { color: var(--hkc-accent); -webkit-text-fill-color: var(--hkc-accent); font-weight: 800; }
.tn-hkc-page .hkc-tool-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 9px 16px; border-top: 1px solid var(--hkc-soft); color: var(--hkc-muted); -webkit-text-fill-color: var(--hkc-muted); font-size: 12px; line-height: 1.4; }
.tn-hkc-page .hkc-status { min-height: 1.4em; }
.tn-hkc-page .hkc-status:empty { display: none; }
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-hkc-page,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-hkc-page {
  --hkc-paper: #241d12; --hkc-surface: #322a1a; --hkc-wash: #2c2517; --hkc-ink: #efe6d2; --hkc-muted: #c3b492; --hkc-line: #6f6047; --hkc-soft: #574a37; --hkc-button: #3c321f; --hkc-hover: #4a3b27; --hkc-accent: #e8823f;
}
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-hkc-page .hkc-tool button,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-hkc-page .hkc-tool button { 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-hkc-page .hkc-tool button:is([aria-pressed="true"], .hkc-copy),
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-hkc-page .hkc-tool button:is([aria-pressed="true"], .hkc-copy) { background: #4a3116; border-color: #e8823f; color: #f7ead1; -webkit-text-fill-color: #f7ead1; }
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-hkc-page { --hkc-paper: #241d12; --hkc-surface: #322a1a; --hkc-wash: #2c2517; --hkc-ink: #efe6d2; --hkc-muted: #c3b492; --hkc-line: #6f6047; --hkc-soft: #574a37; --hkc-button: #3c321f; --hkc-hover: #4a3b27; --hkc-accent: #e8823f; }
  body[data-scheme="auto"] .tn-hkc-page .hkc-tool button { color: #f7ead1; -webkit-text-fill-color: #f7ead1; }
  body[data-scheme="auto"] .tn-hkc-page .hkc-tool button:is([aria-pressed="true"], .hkc-copy) { background: #4a3116; border-color: #e8823f; color: #f7ead1; -webkit-text-fill-color: #f7ead1; }
}
@media (max-width: 720px) {
  .tn-hkc-page .hkc-ad--top { margin-top: 48px; }
  .tn-hkc-page .hkc-direction-bar { align-items: stretch; flex-direction: column; padding: 10px; }
  .tn-hkc-page .hkc-direction-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-hkc-page .hkc-direction-group button { padding-inline: 5px; }
  .tn-hkc-page .hkc-editors { grid-template-columns: minmax(0, 1fr); }
  .tn-hkc-page .hkc-pane--source { border-right: 0; border-bottom: 1px solid var(--hkc-line); }
  .tn-hkc-page .hkc-pane textarea { min-height: 118px; padding: 14px 12px; font-size: 16px; }
  .tn-hkc-page .hkc-pane-head, .tn-hkc-page .hkc-pane-foot { padding-inline: 12px; }
  .tn-hkc-page .hkc-trace-row, .tn-hkc-page .hkc-tool-foot { padding-inline: 12px; }
}
@media (max-width: 390px) {
  .tn-hkc-page .hkc-pane--result .hkc-pane-foot { align-items: flex-start; flex-direction: column; }
  .tn-hkc-page .hkc-result-actions { width: 100%; }
  .tn-hkc-page .hkc-result-actions button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .tn-hkc-page .hkc-tool button { transition: none; } }
