@font-face {
  font-family: "Noto Sans Runic";
  src: url("/_a/noto-runic.1df38d3d5d.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+16A0-16FF;
}

:root {
  --glyph-font: "Noto Sans Runic";
}

.tool-shell {
  min-width: 0;
  padding: clamp(.9rem, 3vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .95rem;
  box-shadow: 0 4px 0 #ddd4c3;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.3rem;
}

.tool-label,
.tool-alphabet {
  display: block;
  margin: 0 0 .4rem;
  font-size: .9rem;
  font-weight: 690;
}

.tool-entry [data-input],
.tool-alphabet select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .55rem .7rem;
  color: var(--ink);
  background: white;
  border: 1px solid #898e80;
  border-radius: .45rem;
  font: inherit;
}

.tool-entry textarea {
  min-height: 4rem;
  resize: vertical;
}

.tool-entry [aria-invalid="true"] {
  border-color: #912f21;
}

.tool-count,
.tool-note,
.tool-error,
.tool-status {
  margin: .35rem 0 0;
  font-size: .83rem;
  color: var(--muted);
}

.tool-count {
  font-variant-numeric: tabular-nums;
}

.tool-error {
  color: #912f21;
}

.tool-options,
.tool-examples,
.tool-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .65rem;
  margin: .7rem 0 0;
}

.tool-options {
  min-width: 0;
  padding: 0;
  border: 0;
}

.tool-options label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  min-height: 2rem;
  font-size: .9rem;
  cursor: pointer;
}

.tool-options input {
  margin: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.tool-options .glyph {
  font-size: 1.16rem;
}

.tool-alphabet {
  margin: .55rem 0 0;
}

.tool-alphabet select {
  margin-top: .3rem;
  font-weight: 500;
}

.tool-display {
  min-height: 6.3rem;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: .7rem;
  border: 1px solid #e0d3ba;
  border-radius: .55rem;
  background: var(--wash);
}

.tool-result {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.22;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tool-result.is-cartouche {
  position: relative;
  padding: .27rem .8rem;
  border: 2px solid currentColor;
  border-radius: 2rem;
}

.tool-result.is-cartouche::after {
  position: absolute;
  top: 50%;
  right: -2px;
  height: 75%;
  max-height: 3.1rem;
  border-right: 2px solid currentColor;
  transform: translateY(-50%);
  content: "";
}

.tool-shell button {
  min-height: 44px;
  padding: .4rem .8rem;
  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: .45rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
}

.tool-shell .tool-copy {
  min-width: 5.4rem;
  color: white;
  background: var(--accent);
}

.tool-shell button:not(:disabled):hover {
  background: #e6eee6;
}

.tool-shell .tool-copy:not(:disabled):hover {
  background: var(--accent-dark);
}

.tool-shell button:disabled {
  opacity: .55;
  cursor: default;
}

.tool-status:empty {
  margin: 0;
}

.tool-breakdown {
  margin-top: .95rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}

.tool-breakdown summary {
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
}

.tool-breakdown ul {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .5rem;
  padding: 0;
  margin: .55rem 0 0;
  list-style: none;
}

.tool-breakdown li {
  max-width: 100%;
  padding: .15rem .42rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  font-size: .81rem;
  overflow-wrap: anywhere;
}

.tool-sign {
  font-size: 1.12rem;
}

@media (max-width: 44rem) {
  .tool-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem;
  }
}
