.tn-wbh-page { width: 100%; max-width: 1180px; min-width: 0; margin-inline: auto; }
.tn-wbh-page .tn-wbh-ad { display: flow-root; width: 100%; max-width: 900px; margin-inline: auto; background: transparent; }
.tn-wbh-page .tn-wbh-ad--top { min-height: 90px; margin: 54px auto 20px; }
.tn-wbh-page .tn-wbh-ad--bottom { min-height: 250px; margin: 24px auto 28px; }
.tn-wbh-tool {
  --wbh-ink: #1a1208; --wbh-muted: #5a4a30; --wbh-line: #b8a888; --wbh-soft: #ddd4be;
  --wbh-paper: #faf6ee; --wbh-wash: #f5efdf; --wbh-button: #ede6d4; --wbh-hover: #dfd4bb;
  --wbh-accent: #c44a00; --wbh-primary: #6a3b1f; --wbh-primary-text: #f7ead1;
  --wbh-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif;
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; align-items: start;
  width: 100%; color: var(--wbh-ink); -webkit-text-fill-color: var(--wbh-ink);
  font: 14px/1.55 var(--wbh-sans); color-scheme: light;
}
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-d="dark"], [data-scheme="auto"][data-l="dark"]) .tn-wbh-tool,
html:is([data-scheme="dark"], [data-scheme="inverse"], .theme-dark) body:not([data-scheme="light"]) .tn-wbh-tool {
  --wbh-ink: #efe6d2; --wbh-muted: #c3b492; --wbh-line: #6f6047; --wbh-soft: #574a37;
  --wbh-paper: #241d12; --wbh-wash: #322a1a; --wbh-button: #322a1a; --wbh-hover: #4a3116;
  --wbh-accent: #e8823f; --wbh-primary: #6a3b1f; --wbh-primary-text: #f7ead1;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-wbh-tool, html[data-scheme="auto"] body:not([data-scheme="light"]) .tn-wbh-tool {
    --wbh-ink: #efe6d2; --wbh-muted: #c3b492; --wbh-line: #6f6047; --wbh-soft: #574a37;
    --wbh-paper: #241d12; --wbh-wash: #322a1a; --wbh-button: #322a1a; --wbh-hover: #4a3116;
    --wbh-accent: #e8823f; --wbh-primary: #6a3b1f; --wbh-primary-text: #f7ead1; color-scheme: dark;
  }
}
.tn-wbh-tool, .tn-wbh-tool * { box-sizing: border-box; }
.tn-wbh-tool [hidden] { display: none !important; }
.tn-wbh-tool :is(h2,h3,p,fieldset,legend,dl,dt,dd,label) { margin: 0; padding: 0; }
.tn-wbh-tool :is(.tn-wbh-input-pane,.tn-wbh-result-pane) { min-width: 0; border-top: 3px double var(--wbh-line); }
.tn-wbh-tool .tn-wbh-pane-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 6px 18px; min-height: 58px; padding: 11px 0 12px; border-bottom: 1px solid var(--wbh-line); }
.tn-wbh-tool .tn-wbh-pane-heading h2 { color: var(--wbh-ink); -webkit-text-fill-color: var(--wbh-ink); font: 700 17px/1.35 var(--wbh-sans); }
.tn-wbh-tool .tn-wbh-kicker { display: block; margin-bottom: 2px; color: var(--wbh-accent); -webkit-text-fill-color: var(--wbh-accent); font: 700 10px/1.3 var(--wbh-sans); letter-spacing: .11em; }
.tn-wbh-tool .tn-wbh-pane-heading p { color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 12px; }
.tn-wbh-compact-summary { display: none; }
.tn-wbh-tool .tn-wbh-days { display: grid; }
.tn-wbh-tool .tn-wbh-day { min-width: 0; border: 0; border-bottom: 1px solid var(--wbh-soft); padding: 12px 0 14px; }
.tn-wbh-tool .tn-wbh-day legend { float: none; width: 100%; padding: 0; color: var(--wbh-ink); -webkit-text-fill-color: var(--wbh-ink); font: 700 15px/1.4 var(--wbh-sans); }
.tn-wbh-tool .tn-wbh-day legend strong { float: right; color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font: 800 13px/1.4 var(--wbh-sans); font-variant-numeric: lining-nums tabular-nums; }
.tn-wbh-tool .tn-wbh-mode { display: inline-flex; flex-wrap: wrap; gap: 0; margin-top: 7px; border: 1px solid var(--wbh-line); }
.tn-wbh-tool button { min-width: 40px; min-height: 40px; margin: 0; padding: 7px 12px; border: 1px solid var(--wbh-line); border-radius: 0; box-shadow: none; background: var(--wbh-button); color: var(--wbh-ink); -webkit-text-fill-color: var(--wbh-ink); font: 700 12px/1.3 var(--wbh-sans); letter-spacing: normal; text-transform: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.tn-wbh-tool button:hover:not(:disabled) { background: var(--wbh-hover); transform: none; box-shadow: none; }
.tn-wbh-tool button:disabled { opacity: .55; cursor: not-allowed; }
.tn-wbh-tool :is(button,input):focus-visible { outline: 2px solid var(--wbh-accent); outline-offset: 2px; }
.tn-wbh-tool .tn-wbh-mode button { min-height: 36px; border: 0; border-right: 1px solid var(--wbh-line); background: var(--wbh-paper); }
.tn-wbh-tool .tn-wbh-mode button:last-child { border-right: 0; }
.tn-wbh-tool .tn-wbh-mode button[aria-pressed="true"] { background: var(--wbh-primary); color: var(--wbh-primary-text); -webkit-text-fill-color: var(--wbh-primary-text); }
.tn-wbh-tool .tn-wbh-mode button[aria-pressed="true"]:hover { background: #824826; }
.tn-wbh-tool .tn-wbh-periods { display: grid; gap: 10px; margin-top: 12px; }
.tn-wbh-tool .tn-wbh-day:not([data-mode="open"]) .tn-wbh-periods,
.tn-wbh-tool .tn-wbh-day:not([data-mode="open"]) .tn-wbh-add { display: none; }
.tn-wbh-tool .tn-wbh-period { display: grid; grid-template-columns: minmax(0,1fr) 12px minmax(0,1fr) auto; gap: 0 8px; align-items: end; min-width: 0; }
.tn-wbh-tool .tn-wbh-period label { display: grid; gap: 5px; min-width: 0; color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 11px; font-weight: 600; }
.tn-wbh-tool .tn-wbh-period label span { display: block; }
.tn-wbh-tool input[type="time"] { display: block; appearance: auto; width: 100%; min-width: 0; max-width: 100%; height: 44px; margin: 0; padding: 6px 8px; border: 1px solid var(--wbh-line); border-radius: 0; box-shadow: none; background: var(--wbh-paper); color: var(--wbh-ink); -webkit-text-fill-color: var(--wbh-ink); font: 600 17px/1.3 var(--wbh-sans); font-variant-numeric: lining-nums tabular-nums; }
.tn-wbh-tool input::placeholder { font-weight: 400; opacity: .35; }
.tn-wbh-tool .tn-wbh-time-separator { align-self: end; display: grid; place-items: center; height: 44px; color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); }
.tn-wbh-tool .tn-wbh-remove { min-height: 44px; margin-left: 2px; padding: 6px 11px; background: transparent; }
.tn-wbh-tool .tn-wbh-period-note { grid-column: 1 / -1; min-height: 17px; margin-top: 3px; color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 11px; }
.tn-wbh-tool .tn-wbh-period.is-invalid input { border-color: var(--wbh-accent); }
.tn-wbh-tool .tn-wbh-period.is-invalid .tn-wbh-period-note,
.tn-wbh-tool .tn-wbh-day.is-invalid .tn-wbh-message { color: var(--wbh-accent); -webkit-text-fill-color: var(--wbh-accent); }
.tn-wbh-tool .tn-wbh-add { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; margin-top: 8px; padding: 6px 10px; border-color: var(--wbh-soft); background: transparent; color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); }
.tn-wbh-tool .tn-wbh-message { margin-top: 4px; color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 11px; }
.tn-wbh-tool .tn-wbh-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.tn-wbh-tool .tn-wbh-total-card { padding: 24px 20px 20px; border-bottom: 1px solid var(--wbh-line); background: var(--wbh-wash); }
.tn-wbh-tool .tn-wbh-total-card > span { color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 12px; }
.tn-wbh-tool #wbhTotal { display: block; margin: 6px 0 10px; color: var(--wbh-ink); -webkit-text-fill-color: var(--wbh-ink); font: 800 clamp(30px,3.3vw,44px)/1.25 var(--wbh-sans); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.tn-wbh-tool #wbhStatus { color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 12px; }
.tn-wbh-tool .tn-wbh-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--wbh-soft); }
.tn-wbh-tool .tn-wbh-metrics dt { color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 11px; }
.tn-wbh-tool .tn-wbh-metrics dd { margin-top: 5px; font: 800 16px/1.4 var(--wbh-sans); font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.tn-wbh-tool .tn-wbh-breakdown { padding: 18px 0; }
.tn-wbh-tool .tn-wbh-breakdown h3 { margin-bottom: 12px; color: var(--wbh-ink); -webkit-text-fill-color: var(--wbh-ink); font: 700 13px/1.4 var(--wbh-sans); }
.tn-wbh-tool .tn-wbh-bars { display: grid; gap: 9px; }
.tn-wbh-tool .tn-wbh-bar-row { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 8px; align-items: center; font-size: 11px; }
.tn-wbh-tool .tn-wbh-bar-track { display: block; height: 7px; background: var(--wbh-soft); }
.tn-wbh-tool .tn-wbh-bar-fill { display: block; height: 100%; background: var(--wbh-accent); }
.tn-wbh-tool .tn-wbh-bar-value { min-width: 53px; text-align: right; font: 800 11px/1.4 var(--wbh-sans); font-variant-numeric: lining-nums tabular-nums; }
.tn-wbh-tool .tn-wbh-rule { padding: 14px 0; border-top: 1px solid var(--wbh-soft); color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 11px; }
.tn-wbh-tool #wbhCopy { width: 100%; min-height: 44px; background: var(--wbh-primary); border-color: var(--wbh-primary); color: var(--wbh-primary-text); -webkit-text-fill-color: var(--wbh-primary-text); }
.tn-wbh-tool #wbhCopy:hover:not(:disabled) { background: #824826; }
.tn-wbh-tool #wbhCopyStatus { min-height: 16px; margin-top: 6px; color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 11px; }
@media (max-width: 760px) {
  .tn-wbh-page .tn-wbh-ad--top { margin-top: 48px; }
  .tn-wbh-tool { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .tn-wbh-tool .tn-wbh-compact-summary { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--wbh-soft); color: var(--wbh-muted); -webkit-text-fill-color: var(--wbh-muted); font-size: 12px; }
  .tn-wbh-tool #wbhCompactTotal { color: var(--wbh-ink); -webkit-text-fill-color: var(--wbh-ink); font: 800 15px/1.4 var(--wbh-sans); font-variant-numeric: lining-nums tabular-nums; }
}
@media (max-width: 390px) {
  .tn-wbh-tool .tn-wbh-period { grid-template-columns: minmax(0,1fr) 9px minmax(0,1fr) 40px; gap: 0 5px; }
  .tn-wbh-tool input[type="time"] { padding-inline: 3px; font-size: 15px; }
  .tn-wbh-tool .tn-wbh-remove { margin-left: 0; padding-inline: 4px; font-size: 11px; }
  .tn-wbh-tool .tn-wbh-total-card { padding: 20px 15px; }
}
