.tn-reaction-page {
  --reaction-paper: #faf6ee;
  --reaction-wash: #f5efdf;
  --reaction-ink: #1a1208;
  --reaction-muted: #5a4a30;
  --reaction-line: #b8a888;
  --reaction-soft: #ddd4be;
  --reaction-button: #ede6d4;
  --reaction-button-text: #1a1208;
  --reaction-hover: #dfd4bb;
  --reaction-primary: #1a1208;
  --reaction-primary-hover: #873600;
  --reaction-primary-text: #f7ead1;
  --reaction-focus: #a83d00;
  --reaction-ready: #2f7d54;
  --reaction-ready-text: #ffffff;
  --reaction-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif;
  --reaction-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: var(--reaction-ink);
  -webkit-text-fill-color: var(--reaction-ink);
}
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-d="dark"], [data-scheme="auto"][data-l="dark"]) .tn-reaction-page,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-reaction-page {
  --reaction-paper: #241d12;
  --reaction-wash: #322a1a;
  --reaction-ink: #efe6d2;
  --reaction-muted: #c3b492;
  --reaction-line: #6f6047;
  --reaction-soft: #574a37;
  --reaction-button: #2f2115;
  --reaction-button-text: #f7ead1;
  --reaction-hover: #3a2a1b;
  --reaction-primary: #6a3b1f;
  --reaction-primary-hover: #824826;
  --reaction-primary-text: #f7ead1;
  --reaction-focus: #e8823f;
  --reaction-ready: #20583b;
  --reaction-ready-text: #f7ead1;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-reaction-page {
    --reaction-paper: #241d12; --reaction-wash: #322a1a; --reaction-ink: #efe6d2;
    --reaction-muted: #c3b492; --reaction-line: #6f6047; --reaction-soft: #574a37;
    --reaction-button: #2f2115; --reaction-button-text: #f7ead1; --reaction-hover: #3a2a1b;
    --reaction-primary: #6a3b1f; --reaction-primary-hover: #824826; --reaction-primary-text: #f7ead1;
    --reaction-focus: #e8823f; --reaction-ready: #20583b; --reaction-ready-text: #f7ead1;
    color-scheme: dark;
  }
}
.tn-reaction-page [hidden] { display: none !important; }
.tn-reaction-page .tn-reaction-tool {
  width: 100%; min-width: 0; margin: 0;
  color: var(--reaction-ink); -webkit-text-fill-color: var(--reaction-ink);
  font-family: var(--reaction-sans); font-size: 14px; line-height: 1.6;
}
.tn-reaction-tool, .tn-reaction-tool *, .tn-reaction-tool *::before, .tn-reaction-tool *::after { box-sizing: border-box; }
.tn-reaction-tool :is(ul, ol, li, dl, dt, dd) { list-style: none; padding: 0; margin: 0; }
.tn-reaction-tool li::before { content: none; }
.tn-reaction-tool :is(p, h2, h3) { margin: 0; }
.tn-reaction-tool .tn-reaction-settings {
  display: grid; grid-template-columns: 130px 190px minmax(0, 1fr); align-items: end;
  gap: 12px; padding: 0 0 16px; min-width: 0;
}
.tn-reaction-tool .tn-reaction-field { display: grid; gap: 5px; min-width: 0; padding: 0; border: 0; background: none; }
.tn-reaction-tool label { margin: 0; padding: 0; font-size: 13px; font-weight: 700; line-height: 20px; }
.tn-reaction-tool select {
  appearance: none; width: 100%; min-width: 0; height: 40px; margin: 0; padding: 0 28px 0 10px;
  border: 1px solid var(--reaction-line); border-radius: 0; box-shadow: none;
  color: var(--reaction-ink); -webkit-text-fill-color: var(--reaction-ink); background-color: var(--reaction-wash);
  background-image: linear-gradient(45deg, transparent 50%, var(--reaction-ink) 50%), linear-gradient(135deg, var(--reaction-ink) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
  font: 600 14px var(--reaction-sans); cursor: pointer;
}
.tn-reaction-tool select option { background: var(--reaction-paper); color: var(--reaction-ink); }
.tn-reaction-tool .tn-reaction-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.tn-reaction-tool .tn-reaction-button {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  height: 40px; min-height: 40px; max-width: 100%; padding: 0 12px; margin: 0;
  border: 1px solid var(--reaction-line); border-radius: 0; box-shadow: none; outline: none;
  background: var(--reaction-button); color: var(--reaction-button-text); -webkit-text-fill-color: var(--reaction-button-text);
  font: 700 13px/1 var(--reaction-mono); letter-spacing: normal; text-transform: none; cursor: pointer;
}
.tn-reaction-tool .tn-reaction-button:hover:not(:disabled) { background: var(--reaction-hover); }
.tn-reaction-tool .tn-reaction-primary { background: var(--reaction-primary); color: var(--reaction-primary-text); -webkit-text-fill-color: var(--reaction-primary-text); }
.tn-reaction-tool .tn-reaction-primary:hover:not(:disabled) { background: var(--reaction-primary-hover); }
.tn-reaction-tool .tn-reaction-button:disabled { opacity: .55; cursor: not-allowed; }
.tn-reaction-tool :is(button, select, textarea):focus-visible { outline: 2px solid var(--reaction-focus); outline-offset: 2px; }
.tn-reaction-tool .tn-reaction-workspace { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.tn-reaction-tool .tn-reaction-stage, .tn-reaction-tool .tn-reaction-results { display: grid; gap: 12px; min-width: 0; }
.tn-reaction-tool .tn-reaction-stage-label { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 13px; font-weight: 700; }
.tn-reaction-tool .tn-reaction-pad {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  width: 100%; min-height: 280px; height: auto; padding: 28px 16px; margin: 0;
  border: 1px solid var(--reaction-line); border-radius: 0; background: var(--reaction-wash);
  color: var(--reaction-ink); -webkit-text-fill-color: var(--reaction-ink);
  font-family: var(--reaction-sans); text-align: center; text-transform: none; letter-spacing: normal;
  box-shadow: none; outline: none; cursor: pointer; touch-action: manipulation; user-select: none;
  transition: none !important; animation: none !important;
}
.tn-reaction-tool .tn-reaction-pad * { transition: none !important; animation: none !important; }
.tn-reaction-tool #tnReactionSignal { font: 800 clamp(23px, 2.5vw, 34px)/1.35 var(--reaction-sans); font-variant-numeric: lining-nums tabular-nums; }
.tn-reaction-tool #tnReactionHint { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.tn-reaction-tool .tn-reaction-shape { display: block; width: 30px; height: 30px; border: 2px solid currentColor; }
.tn-reaction-tool .tn-reaction-pad[data-state="waiting"] { background: var(--reaction-paper); }
.tn-reaction-tool .tn-reaction-pad[data-state="ready"] { background: var(--reaction-ready); color: var(--reaction-ready-text); -webkit-text-fill-color: var(--reaction-ready-text); border-color: var(--reaction-ready); }
.tn-reaction-tool .tn-reaction-pad[data-state="ready"] :is(strong, span) { color: var(--reaction-ready-text); -webkit-text-fill-color: var(--reaction-ready-text); }
.tn-reaction-tool .tn-reaction-pad[data-state="ready"] .tn-reaction-shape { border-radius: 50%; background: currentColor; }
.tn-reaction-tool .tn-reaction-pad[data-state="error"] { border-color: var(--reaction-focus); }
.tn-reaction-tool .tn-reaction-pad[data-state="error"] .tn-reaction-shape { transform: rotate(45deg); }
.tn-reaction-tool .tn-reaction-hint { color: var(--reaction-muted); -webkit-text-fill-color: var(--reaction-muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.tn-reaction-tool .tn-reaction-notice { min-height: 46px; padding: 10px 12px; border: 1px solid var(--reaction-soft); background: var(--reaction-paper); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.tn-reaction-tool .tn-reaction-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-reaction-tool .tn-reaction-metric { min-width: 0; padding: 14px; border: 1px solid var(--reaction-line); background: var(--reaction-paper); }
.tn-reaction-tool .tn-reaction-metric > span { font-size: 13px; color: var(--reaction-muted); -webkit-text-fill-color: var(--reaction-muted); }
.tn-reaction-tool .tn-reaction-metric p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-top: 5px; }
.tn-reaction-tool .tn-reaction-number { color: var(--reaction-ink); -webkit-text-fill-color: var(--reaction-ink); font-family: var(--reaction-sans); font-weight: 800; font-variant-numeric: lining-nums tabular-nums; letter-spacing: normal; line-height: 1.2; white-space: nowrap; }
.tn-reaction-tool .tn-reaction-metric .tn-reaction-number { font-size: clamp(28px, 3vw, 42px); }
.tn-reaction-tool .tn-reaction-metric--small .tn-reaction-number { font-size: 24px; }
.tn-reaction-tool .tn-reaction-metric p > span { font-size: 12px; }
.tn-reaction-tool .tn-reaction-trials { display: grid; gap: 7px; min-width: 0; }
.tn-reaction-tool .tn-reaction-trials li { position: relative; padding: 5px 9px; border: 1px solid var(--reaction-soft); background: var(--reaction-paper); font: 600 13px/1.6 var(--reaction-sans); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.tn-reaction-tool .tn-reaction-trials li::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: var(--reaction-width, 0%); background: var(--reaction-focus); pointer-events: none; }
.tn-reaction-tool .tn-reaction-records { display: grid; gap: 12px; padding: 18px; margin-top: 20px; border: 1px solid var(--reaction-line); background: var(--reaction-paper); }
.tn-reaction-tool .tn-reaction-record-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.tn-reaction-tool .tn-reaction-record-heading h2 { font: 700 15px/1.5 var(--reaction-sans); }
.tn-reaction-tool .tn-reaction-pb { font-size: 13px; line-height: 1.8; }
.tn-reaction-tool .tn-reaction-pb strong { margin-left: 8px; font-size: 23px; }
.tn-reaction-tool .tn-reaction-history { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.tn-reaction-tool .tn-reaction-history li { padding: 8px 0; border-bottom: 1px solid var(--reaction-soft); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.tn-reaction-tool #tnReactionCopyText { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--reaction-line); border-radius: 0; background: var(--reaction-paper); color: var(--reaction-ink); -webkit-text-fill-color: var(--reaction-ink); font: 14px/1.6 var(--reaction-sans); }
.tn-reaction-tool #tnReactionCopyStatus:empty { display: none; }
.tn-reaction-tool .tn-reaction-disclaimer, .tn-reaction-tool noscript p { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--reaction-line); color: var(--reaction-muted); -webkit-text-fill-color: var(--reaction-muted); font-size: 12px; line-height: 1.8; }
.tn-reaction-page .tn-reaction-ad { width: 100%; max-width: 900px; min-height: 90px; height: auto; max-height: none; margin: 24px auto; border: 0; background: transparent; overflow: visible; }
.tn-reaction-page .tn-reaction-ad--top { margin-top: 0; }
@media (max-width: 720px) {
  .tn-reaction-tool .tn-reaction-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tn-reaction-tool .tn-reaction-settings > .tn-reaction-actions { grid-column: 1 / -1; }
  .tn-reaction-tool .tn-reaction-workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tn-reaction-tool .tn-reaction-pad { min-height: 240px; padding: 24px 14px; }
  .tn-reaction-tool .tn-reaction-metric { padding: 12px; }
  .tn-reaction-tool .tn-reaction-records { padding: 12px; }
  .tn-reaction-tool .tn-reaction-history { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .tn-reaction-tool *, .tn-reaction-tool *::before, .tn-reaction-tool *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
