/* Wabun translator on /wabun-code: one panel in the site's tokens, the kana tiles first, then the signals as text. */
.wabun-tool { display: grid; gap: 16px; margin: 28px 0 0; padding: clamp(16px, 4vw, 24px); border-radius: var(--r-panel); background: var(--panel); box-shadow: var(--shadow); }
.article .wabun-tool h2 { margin: 0; font-size: 26px; }
.article .wabun-tool p { margin: 0; }
.article .wabun-tool .wabun-note { color: var(--sec); font-size: 15px; }
.wabun-app { display: grid; gap: 16px; min-width: 0; }
.wabun-app[hidden] { display: none; }
.wabun-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.wabun-seg { display: inline-flex; max-width: 100%; padding: 4px; border-radius: 16px; background: var(--fill); }
.wabun-seg button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: none; font-size: 15px; font-weight: 600; color: var(--sec); cursor: pointer; }
.wabun-seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.wabun-field { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--sec); }
.wabun-field select { min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--fill); font-size: 16px; font-weight: 600; color: var(--ink); }
.wabun-source { position: relative; }
.wabun-source textarea {
  display: block; width: 100%; min-height: 64px; max-height: 240px; padding: 6px 52px 6px 2px;
  border: 0; border-bottom: 2px solid var(--line); border-radius: 0; outline: 0; resize: none; background: none;
  font-size: 24px; line-height: 1.3; field-sizing: content;
}
.wabun-source textarea::placeholder { color: var(--ter); }
.wabun-source:focus-within textarea { border-bottom-color: var(--ink); }
.wabun-source textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.wabun-clear { position: absolute; right: 0; top: 4px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--fill); cursor: pointer; }
.wabun-clear svg { width: 18px; height: 18px; }
.article .wabun-tool .wabun-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--sec); font-size: 15px; }
.wabun-examples[hidden] { display: none; }
.wabun-examples button { min-height: 44px; min-width: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--fill); font-size: 18px; cursor: pointer; }
/* .article ol adds a margin and an indent to every list; the tiles need neither. */
.article .wabun-tool .words, .article .wabun-tool .letters { margin: 0; padding: 0; }
.wabun-tool .words[hidden] { display: none; }
.wabun-tool .tile { min-width: 52px; min-height: 80px; padding: 10px 10px 14px; }
.wabun-tool .tile .ch { font-size: 28px; font-weight: 400; }
.wabun-tool .tile .code { --u: 5px; }
.wabun-result { display: grid; gap: 8px; min-width: 0; }
.wabun-result-label { font-size: 14px; color: var(--sec); }
.article .wabun-tool .wabun-result-text { padding: 14px 16px; border-radius: var(--r-tile); background: var(--tile); font-size: 20px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.wabun-result-text:empty, .wabun-result-label:empty { display: none; }
.wabun-result-text .nb { white-space: nowrap; }
.article .wabun-tool .wabun-issues { margin: 0; padding-left: 20px; color: var(--sec); font-size: 15px; }
.wabun-issues:empty { display: none; }
.wabun-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
