:root {
  --alt-red: #ff2a17;
  --alt-orange: #ff7a00;
  --alt-orange-yellow: #ffbf00;
  --alt-yellow: #ffe100;
  --alt-green-yellow: #9ed200;
  --alt-green: #0b9f12;
  --alt-light-blue: #73b8ff;
  --alt-blue: #2f27e6;
  --alt-brown: #5f3317;
  --alt-ink: #14202e;
  --alt-muted: #5b6876;
  --alt-border: #c9d5df;
  --alt-surface: #ffffff;
  --alt-soft: #f4f8fb;
  --alt-spectrum-gap: 12px;
  --alt-bar-spectrum-gap: var(--alt-spectrum-gap);
  --alt-spectrum-column-min: 8.5rem;
  --alt-lookup-family-reveal-ms: 1000ms;
  --alt-lookup-entries-reveal-ms: 1000ms;
  --alt-font: Aptos, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  overflow-x: hidden;
}

body[data-page-config*="alt-dictionary"] {
  overflow-x: hidden;
  overflow-anchor: none;
}

.alt-dict {
  min-width: 0;
  max-width: 1220px;
  margin: 1.8rem auto 3.2rem;
  padding: 0 1rem;
  padding-bottom: var(--alt-collapse-scroll-reserve, 0px);
  color: var(--alt-ink);
  font-family: var(--alt-font);
  overflow-anchor: none;
}

.alt-dict--landing {
  padding-top: max(2rem, calc((100vh - var(--sb-header-h, 70px) - 15.85rem) / 2));
}

.alt-dict--lookup-entering {
  min-height: calc(100vh + 28rem);
}

.alt-dict__header {
  display: grid;
  gap: 0.95rem;
  margin-bottom: var(--alt-bar-spectrum-gap);
}

.alt-dict__identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.95rem;
  min-width: 0;
}

.alt-dict__logo {
  flex: 0 0 auto;
  width: clamp(2.8rem, 5vw, 3.65rem);
  height: clamp(2.8rem, 5vw, 3.65rem);
  object-fit: contain;
}

.alt-dict__header h1 {
  margin: 0;
  color: var(--banner);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.05;
  text-align: center;
}

.alt-admin-toggle {
  position: fixed;
  top: 5.4rem;
  right: 1rem;
  z-index: 60;
  min-width: 82px;
  min-height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 8px;
  background: #b91c1c;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}

.alt-admin-toggle.is-on {
  background: #15803d;
}

.alt-admin-toggle.is-off {
  background: #b91c1c;
}

.alt-admin-toggle:focus-visible {
  outline: 3px solid rgba(115, 184, 255, 0.42);
  outline-offset: 2px;
}

.alt-admin-only {
  display: none !important;
}

body.alt-admin-mode .alt-admin-only {
  display: flex !important;
}

body.alt-admin-mode .alt-entry__definition-block.alt-admin-only {
  display: grid !important;
}

body.alt-admin-mode .alt-entry.alt-admin-only {
  display: grid !important;
}

.alt-dict-search-shell {
  position: relative;
  width: 100%;
}

.alt-karaoke-settings-toggle {
  position: absolute;
  top: 50%;
  left: calc(-2rem - 0.25rem);
  z-index: 5;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5f6975;
  cursor: pointer;
  transform: translateY(-50%);
}

.alt-karaoke-settings-toggle:hover,
.alt-karaoke-settings-toggle:focus-visible,
.alt-karaoke-settings-toggle[aria-expanded="true"] {
  background: rgba(20, 32, 46, 0.08);
  color: #263646;
}

.alt-karaoke-settings-toggle:focus-visible {
  outline: 3px solid rgba(115, 184, 255, 0.42);
  outline-offset: 2px;
}

.alt-karaoke-settings-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.alt-karaoke-settings-panel {
  position: absolute;
  top: calc(100% + 0.48rem);
  left: 0;
  z-index: 45;
  width: min(100%, 760px);
  padding: 0.86rem;
  border: 1px solid rgba(148, 163, 184, 0.58);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.alt-karaoke-settings-panel[hidden] {
  display: none;
}

.alt-karaoke-settings-panel h2 {
  margin: 0 0 0.72rem;
  color: var(--alt-ink);
  font-size: 1.02rem;
  line-height: 1.2;
  text-align: center;
}

.alt-karaoke-settings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.alt-karaoke-settings-table th,
.alt-karaoke-settings-table td {
  width: 50%;
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.32);
  text-align: center;
  vertical-align: top;
}

.alt-karaoke-settings-table th {
  background: #f4f8fb;
  color: var(--alt-ink);
  font-size: 0.86rem;
  line-height: 1.22;
  font-weight: 850;
}

.alt-karaoke-settings-table th + th,
.alt-karaoke-settings-table td + td {
  border-left: 0;
}

.alt-karaoke-settings-table tbody tr + tr td {
  border-top: 0;
}

.alt-karaoke-settings-field {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  color: var(--alt-muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}

.alt-karaoke-settings-field span {
  text-transform: none;
}

.alt-karaoke-settings-field select {
  width: min(100%, 15rem);
  min-height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  background: #ffffff;
  color: var(--alt-ink);
  font: inherit;
  font-weight: 800;
  padding: 0.3rem 0.72rem;
}

.alt-karaoke-settings-field select:focus-visible {
  outline: 3px solid rgba(115, 184, 255, 0.36);
  outline-offset: 2px;
}

.alt-dict-bar {
  position: relative;
  width: 100%;
}

.alt-dict-bar input {
  width: 100%;
  min-height: 58px;
  border: 2px solid #b9c6d2;
  border-radius: 8px;
  background: #fff;
  padding: 0.82rem 6.6rem 0.82rem 1rem;
  color: #111827;
  font-family: inherit;
  font-size: 1.12rem;
  line-height: 1.35;
}

.alt-dict-bar input.is-default {
  color: #737f8d;
}

.alt-dict-bar input::placeholder {
  color: #737f8d;
  opacity: 1;
}

.alt-dict-bar input:focus {
  outline: 3px solid rgba(115, 184, 255, 0.35);
  border-color: #5588b8;
}

.alt-dict-bar__actions {
  position: absolute;
  top: 50%;
  right: 0.62rem;
  display: inline-flex;
  gap: 0.32rem;
  transform: translateY(-50%);
}

.alt-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8c4d0;
  border-radius: 8px;
  background: #f9fbfc;
  color: #263646;
  cursor: pointer;
}

.alt-icon-btn:hover,
.alt-icon-btn:focus-visible {
  background: #edf5fb;
}

.alt-icon-btn:disabled,
.alt-icon-btn:disabled:hover,
.alt-icon-btn:disabled:focus-visible {
  background: #eef3f7;
  color: #8794a3;
  cursor: not-allowed;
  opacity: 0.7;
}

.alt-icon-btn svg {
  width: 21px;
  height: 21px;
}

.alt-icon-btn.is-listening {
  color: #fff;
  border-color: #1a8d42;
  background: #1f9b4b;
}

.alt-dict__status {
  display: none;
  min-height: 1.2rem;
  margin: 0;
  color: var(--alt-muted);
  font-size: 0.96rem;
  font-weight: 650;
}

body.alt-admin-mode .alt-dict__status:not(:empty) {
  display: block;
}

.alt-dict__status:empty {
  display: none;
}

.alt-dict-warning {
  margin: var(--alt-bar-spectrum-gap) 0;
  padding: 0.9rem 1rem;
  border: 1px solid #f2b8a8;
  border-radius: 8px;
  background: #fff7f4;
  color: #8a2d18;
  font-weight: 650;
}

.alt-dict-result {
  min-width: 0;
  display: grid;
  gap: var(--alt-spectrum-gap);
}

.alt-dict-empty {
  max-width: 860px;
  padding: 1.2rem;
  border: 1px dashed var(--alt-border);
  border-radius: 8px;
  background: var(--alt-soft);
  color: var(--alt-muted);
}

.alt-lemma {
  min-width: 0;
  display: grid;
  gap: var(--alt-spectrum-gap);
  padding-top: 0;
}

.alt-lemma__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.alt-lemma__title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.06;
}

.alt-lemma__meta {
  margin: 0;
  color: var(--alt-muted);
  font-weight: 650;
}

.alt-pedigree-shell {
  position: relative;
  min-width: 0;
}

.alt-pedigree-toggle {
  position: absolute;
  top: calc((3.6rem - 2rem) / 2);
  left: calc(-2rem - 0.25rem);
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #666b70;
  cursor: pointer;
}

.alt-pedigree-toggle:hover,
.alt-pedigree-toggle:focus-visible {
  background: rgba(15, 23, 42, 0.06);
  outline: 2px solid rgba(85, 136, 184, 0.35);
  outline-offset: 2px;
}

.alt-pedigree-toggle__icon {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
  fill: #85888c;
  stroke: #5d6064;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transform-origin: 50% 50%;
  transition: transform 0.24s ease, fill 0.18s ease, stroke 0.18s ease;
}

.alt-pedigree-shell.is-collapsed .alt-pedigree-toggle__icon {
  transform: rotate(-90deg);
}

.alt-pedigree {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--alt-spectrum-gap);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: auto;
  padding: 0 0 0.2rem;
  transition: padding-bottom 0.24s ease;
}

.alt-pedigree__column {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  text-align: center;
  transition: gap 0.24s ease;
}

.alt-pedigree__label {
  height: 3.6rem;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  background: var(--group-color, #cbd5e1);
  padding: 0.24rem 0.32rem;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
}

.alt-pedigree__label span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.alt-pedigree__forms {
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  padding-bottom: 0.32rem;
  max-height: var(--alt-family-reveal-height, 24rem);
  overflow: hidden;
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: translateY(0);
  transition:
    max-height var(--alt-lookup-family-reveal-ms) cubic-bezier(0.22, 1, 0.36, 1),
    clip-path var(--alt-lookup-family-reveal-ms) cubic-bezier(0.22, 1, 0.36, 1),
    opacity var(--alt-lookup-family-reveal-ms) ease,
    padding-bottom var(--alt-lookup-family-reveal-ms) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--alt-lookup-family-reveal-ms) cubic-bezier(0.22, 1, 0.36, 1);
}

.alt-pedigree-shell.is-collapsed .alt-pedigree {
  padding-bottom: 0;
}

.alt-pedigree-shell.is-collapsed .alt-pedigree__column {
  gap: 0;
}

.alt-pedigree-shell.is-collapsed .alt-pedigree__forms {
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transform: translateY(-0.35rem);
}

.alt-form-separator {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0.8rem;
  color: #64748b;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.alt-helper-line {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  min-height: 1rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
}

.alt-helper-gap {
  flex: 0 0 100%;
  height: 0.085rem;
}

.alt-helper-word {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 0 0.02rem;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.alt-helper-word:hover,
.alt-helper-word:focus-visible {
  background: #edf5fb;
  outline: 2px solid rgba(85, 136, 184, 0.3);
}

.alt-helper-others,
.alt-helper-related {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #fff;
  padding: 0.2rem 0.65rem;
  color: var(--helper-button-color, var(--alt-light-blue));
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
}

.alt-helper-others:hover,
.alt-helper-others:focus-visible,
.alt-helper-related:hover,
.alt-helper-related:focus-visible {
  background: #edf5fb;
  outline: 2px solid rgba(85, 136, 184, 0.3);
}

.alt-form-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 999px;
  background: #fff;
  padding: 0.22rem 0.56rem;
  color: var(--chip-color, #111827);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.alt-form-chip:hover,
.alt-form-chip:focus-visible {
  background: #f4f8fb;
  outline: 2px solid rgba(20, 32, 46, 0.14);
}

.alt-forms-list {
  display: flex;
  gap: 0.48rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.65rem 0;
  border-top: 1px solid #e1e8ef;
  border-bottom: 1px solid #e1e8ef;
}

.alt-forms-list__label {
  color: var(--alt-muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.alt-forms-list__item {
  color: #172234;
  font-family: inherit;
  font-size: 1.02rem;
}

.alt-idioms {
  display: grid;
  gap: 0.45rem;
}

.alt-lemma > .alt-idioms,
.alt-lemma > .alt-entries {
  max-height: var(--alt-entry-reveal-height, 9000px);
  overflow: hidden;
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: translateY(0);
  transition:
    max-height var(--alt-lookup-entries-reveal-ms) cubic-bezier(0.22, 1, 0.36, 1),
    clip-path var(--alt-lookup-entries-reveal-ms) cubic-bezier(0.22, 1, 0.36, 1),
    opacity var(--alt-lookup-entries-reveal-ms) ease,
    transform var(--alt-lookup-entries-reveal-ms) cubic-bezier(0.22, 1, 0.36, 1);
}

.alt-lemma.alt-lemma--pre-reveal > .alt-idioms,
.alt-lemma.alt-lemma--pre-reveal > .alt-entries {
  max-height: 0;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transform: translateY(-0.35rem);
}

.alt-idioms h3,
.alt-entries h3 {
  margin: 0;
  color: #233143;
  font-size: 1rem;
}

.alt-idioms__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.alt-idioms__list button {
  min-height: 32px;
  border: 1px solid #d0dbe5;
  border-radius: 999px;
  background: #fff;
  padding: 0.22rem 0.68rem;
  color: #29384a;
  font-weight: 750;
  cursor: pointer;
}

.alt-idioms__list button:hover,
.alt-idioms__list button:focus-visible {
  background: #f1f6fa;
}

.alt-entries {
  display: grid;
  gap: 0.45rem;
}

.alt-entries__heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.alt-entries__heading-row h3 {
  margin: 0;
}

.alt-entries__deck {
  max-height: clamp(420px, 58vh, 720px);
  display: grid;
  gap: 0.85rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0.08rem 0 0.35rem;
}

.alt-entries__deck::-webkit-scrollbar {
  display: none;
}

.alt-entry {
  min-width: 0;
  display: grid;
  gap: 0;
  align-items: start;
  overflow: visible;
  border: 1px solid var(--alt-border);
  border-radius: 8px;
  background: var(--alt-surface);
  padding: 0.86rem;
}

.alt-entry.is-disabled {
  border-style: dashed;
  opacity: 0.64;
}

.alt-entry.is-disabled .alt-entry__word-main::after {
  content: "Disabled";
  display: block;
  margin-top: 0.25rem;
  color: #8a2d18;
  font-size: 0.94rem;
  font-weight: 850;
}

.alt-entry__definitions {
  min-width: 0;
  display: grid;
  gap: 0;
}

.alt-admin-tools {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.alt-admin-tools--entry {
  margin: 0 0 0.45rem;
}

.alt-admin-tools--definition {
  margin: -0.15rem 0 0.1rem;
}

.alt-admin-btn {
  min-height: 30px;
  border: 1px solid #bdccda;
  border-radius: 8px;
  background: #f8fbfe;
  color: #263646;
  padding: 0.18rem 0.52rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.alt-admin-btn:hover,
.alt-admin-btn:focus-visible {
  border-color: #7c96ad;
  background: #eef6fd;
}

.alt-admin-btn--primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.alt-admin-btn--primary:hover,
.alt-admin-btn--primary:focus-visible {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.alt-entry__definition-block {
  min-width: 0;
  display: grid;
  gap: 0;
}

.alt-entry__definition-block + .alt-entry__definition-block {
  margin-top: var(--alt-definition-rhythm-gap, 0.9rem);
}

.alt-entry__definition-block.is-disabled {
  border-left: 4px solid #cbd5e1;
  margin-left: 0.1rem;
  padding-left: 0.65rem;
  opacity: 0.58;
}

.alt-entry__definition-block.is-disabled .alt-entry__definition::before {
  content: "Disabled ";
  color: #8a2d18;
  font-style: normal;
  font-weight: 850;
}

.alt-entry__definition {
  margin: 0;
  color: #111827;
  font-size: 1rem;
  line-height: 1.35;
}

.alt-entry__definition-baseline-marker {
  display: inline-block;
  width: 0;
  height: 0;
  overflow: hidden;
  line-height: 0;
  vertical-align: baseline;
}

.alt-entry__word-main {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
  display: inline-block;
  overflow: visible;
  padding-block: 0 7px;
  white-space: nowrap;
}

.alt-entry__pronunciations {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  margin-left: 0.62rem;
  color: #6b7280;
  font-size: 0.42em;
  font-weight: 750;
  line-height: 1;
  vertical-align: middle;
}

.alt-pronunciation-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  padding: 0.13rem 0.34rem;
  font: inherit;
  line-height: 1.08;
  text-decoration: none;
  cursor: pointer;
}

.alt-pronunciation-link:hover,
.alt-pronunciation-link:focus-visible {
  background: rgba(107, 114, 128, 0.1);
  box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.14);
  outline: 0;
}

.alt-pronunciation-locale {
  color: #7b8794;
  font-size: 0.78em;
  font-weight: 850;
  letter-spacing: 0;
}

.alt-pronunciation-easy {
  text-decoration: none;
}

.alt-pronunciation-ipa {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.24rem);
  z-index: 40;
  min-width: max-content;
  transform: translateX(-50%) translateY(0.12rem);
  border: 1px solid rgba(148, 163, 184, 0.62);
  border-radius: 8px;
  background: #ffffff;
  color: #263646;
  padding: 0.22rem 0.38rem;
  font-size: 0.92em;
  font-weight: 750;
  line-height: 1.15;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.alt-pronunciation-link:hover .alt-pronunciation-ipa,
.alt-pronunciation-link:focus-visible .alt-pronunciation-ipa,
.alt-pronunciation-link:focus .alt-pronunciation-ipa {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.alt-entry__pos {
  font-style: italic;
  font-weight: 800;
}

.alt-entry__definition.is-pending {
  color: #7c4a16;
}

.alt-sample {
  display: grid;
  gap: 0.45rem;
  margin-top: var(--alt-definition-diagram-gap, 0.5rem);
}

.alt-sample__sentence {
  margin: 0;
  color: #334155;
  font-size: 0.94rem;
  line-height: 1.35;
}

.alt-diagram-shell {
  display: grid;
  gap: 0.5rem;
}

.alt-diagram-frame {
  --alt-diagram-control-buffer: 32px;
  position: relative;
  z-index: 2;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--alt-diagram-control-buffer);
  align-items: start;
  overflow: visible;
  background: transparent;
}

.alt-diagram-stage-lane {
  min-width: 0;
  justify-self: stretch;
  overflow: visible;
}

.alt-dict-ready-flag {
  position: absolute;
  top: 0.45rem;
  left: -0.55rem;
  z-index: 5;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(127, 29, 29, 0.26);
}

.alt-diagram-stage {
  position: relative;
  display: inline-block;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
}

.alt-diagram-stage[data-diagram-mode="condensed"] {
  width: fit-content;
}

.alt-diagram-image {
  position: relative;
  z-index: 1;
  display: block;
  max-width: none;
  width: auto;
  height: auto;
}

.alt-diagram-svg-anchor {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}

.alt-diagram-svg-anchor svg {
  display: block;
  width: 100%;
  height: auto;
}

.alt-karaoke-overlay-layer {
  position: fixed;
  inset: 0;
  z-index: 2060;
  overflow: visible;
  pointer-events: none;
}

.alt-karaoke-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  display: none;
  pointer-events: none;
}

.alt-diagram-frame--pending {
  min-height: 98px;
  display: grid;
  align-items: center;
  justify-items: center;
  color: #6f7c89;
  font-weight: 700;
}

.alt-diagram-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.alt-link-btn {
  border: 0;
  background: transparent;
  color: #245b89;
  font-weight: 800;
  cursor: pointer;
  padding: 0.2rem;
}

.alt-link-btn:hover,
.alt-link-btn:focus-visible {
  text-decoration: underline;
}

.alt-diagram-control {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(136, 154, 173, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  color: #263646;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.alt-diagram-control:hover,
.alt-diagram-control:focus-visible {
  background: #fff;
  border-color: #6a8198;
  color: #0f2f4f;
}

.alt-diagram-control:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.alt-diagram-control.is-playing {
  color: #8a4a05;
  border-color: rgba(245, 158, 11, 0.72);
}

.alt-diagram-control--play,
.alt-diagram-control--expand {
  position: static;
}

.alt-diagram-controls {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.alt-diagram-control svg {
  width: 20px;
  height: 20px;
}

.alt-diagram-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(15, 23, 42, 0.58);
}

.alt-diagram-modal[hidden] {
  display: none;
}

.alt-diagram-modal__panel {
  position: relative;
  max-width: min(96vw, 1280px);
  max-height: 92vh;
  overflow: auto;
  padding: 1rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.34);
}

.alt-diagram-modal__toolbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  pointer-events: none;
}

.alt-diagram-modal__toolbar .alt-diagram-control {
  pointer-events: auto;
}

.alt-diagram-modal__stage {
  display: inline-block;
  max-width: 100%;
}

.alt-diagram-modal__stage .alt-diagram-image {
  width: auto;
  max-width: 100%;
  max-height: calc(92vh - 6rem);
}

.alt-helper-modal {
  position: fixed;
  inset: 0;
  z-index: 1990;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(15, 23, 42, 0.42);
}

.alt-helper-modal[hidden] {
  display: none;
}

.alt-helper-modal__panel {
  width: min(94vw, 1120px);
  max-height: 88vh;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.26);
}

.alt-helper-modal__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.alt-helper-modal__columns {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  justify-content: center;
  column-gap: 0.16rem;
  row-gap: 0.2rem;
}

.alt-helper-modal--related .alt-helper-modal__columns {
  grid-template-columns: max-content;
}

.alt-helper-modal--single .alt-helper-modal__columns {
  display: none;
}

.alt-helper-modal__column {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.32rem;
}

.alt-other-helper-word {
  min-height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 0.1rem 0.24rem;
  color: var(--alt-light-blue);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 850;
  cursor: pointer;
}

.alt-helper-modal--related .alt-other-helper-word {
  color: var(--helper-word-color, #111827);
}

.alt-other-helper-word:hover,
.alt-other-helper-word:focus-visible {
  background: #edf5fb;
  outline: 2px solid rgba(85, 136, 184, 0.3);
}

.alt-helper-modal__preview {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  margin-top: 0.8rem;
  min-height: var(--alt-helper-preview-reserved-height, 0);
}

.alt-helper-modal__admin {
  display: grid;
  gap: 0.42rem;
  justify-items: start;
}

.alt-helper-modal__preview .alt-diagram-frame {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  overflow-x: auto;
  overflow-y: visible;
}

.alt-helper-modal__preview .alt-diagram-stage-lane {
  width: 100%;
  display: flex;
  justify-content: center;
}

.alt-helper-modal__preview .alt-diagram-stage {
  max-width: none;
}

.alt-helper-modal__preview .alt-diagram-image {
  width: auto;
  max-width: none;
}

.alt-helper-modal__preview .alt-diagram-controls {
  position: static;
  margin-top: 0.55rem !important;
  justify-content: center;
}

.alt-admin-modal {
  position: fixed;
  inset: 0;
  z-index: 2010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.42);
}

.alt-admin-modal[hidden] {
  display: none;
}

.alt-admin-modal [hidden] {
  display: none !important;
}

.alt-admin-modal__panel {
  width: min(720px, calc(100vw - 2rem));
  display: grid;
  gap: 0.85rem;
  border: 1px solid #bfccd8;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.alt-admin-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.alt-admin-modal__header h2 {
  margin: 0;
  color: #172234;
  font-size: 1.1rem;
}

.alt-admin-modal__close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bdccda;
  border-radius: 8px;
  background: #f8fbfe;
  color: #263646;
  cursor: pointer;
}

.alt-admin-modal__close svg {
  width: 21px;
  height: 21px;
}

.alt-admin-modal label {
  display: grid;
  gap: 0.28rem;
  color: #263646;
  font-size: 0.86rem;
  font-weight: 800;
}

.alt-admin-modal .alt-admin-modal__check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.alt-admin-modal input,
.alt-admin-modal textarea,
.alt-admin-modal select {
  width: 100%;
  border: 1px solid #b8c4d0;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  color: #111827;
  font: 600 1rem/1.35 var(--alt-font);
}

.alt-admin-modal__sense-row {
  display: grid;
  gap: 0.35rem;
}

.alt-admin-modal__sense-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #263646;
  font-size: 0.86rem;
  font-weight: 800;
}

.alt-admin-modal__sense-header .alt-admin-btn {
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
}

.alt-admin-modal .alt-admin-modal__check input[type="checkbox"] {
  width: auto;
  min-width: 1rem;
  accent-color: #0a8f2a;
}

.alt-admin-modal textarea {
  min-height: 118px;
  resize: vertical;
}

.alt-admin-modal input:focus,
.alt-admin-modal textarea:focus,
.alt-admin-modal select:focus,
.alt-admin-modal__close:focus-visible {
  outline: 3px solid rgba(115, 184, 255, 0.35);
  border-color: #5588b8;
}

.alt-admin-modal select option.alt-admin-sense-option--recommended {
  background: #eaf4ff;
  color: #0f2742;
  font-weight: 900;
}

.alt-admin-modal__status {
  min-height: 1.1rem;
  margin: 0;
  color: #5b6876;
  font-size: 0.9rem;
  font-weight: 700;
}

.alt-admin-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.alt-asset-status-modal__panel {
  max-width: min(720px, calc(100vw - 2rem));
}

.alt-asset-status__sentence {
  margin: 0;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.alt-asset-status__list {
  display: grid;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.alt-asset-status__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.75rem;
  align-items: center;
  border: 1px solid #d6e0ea;
  border-radius: 7px;
  padding: 0.65rem 0.75rem;
  background: #ffffff;
}

.alt-asset-status__item small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.alt-asset-status__state {
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
}

.alt-asset-status__item.is-ready .alt-asset-status__state {
  background: #15803d;
}

.alt-asset-status__item.is-missing .alt-asset-status__state {
  background: #b91c1c;
}

.alt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.alt-token {
  color: var(--alt-color, #111827);
}

.alt-inline-word-link {
  appearance: none;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 0 0.08em;
  font: inherit;
  cursor: pointer;
}

.alt-inline-word-link:hover,
.alt-inline-word-link:focus-visible {
  background: #edf5fb;
  outline: 2px solid rgba(85, 136, 184, 0.3);
}

.alt-role--content { --alt-color: var(--alt-red); }
.alt-role--content-modifier { --alt-color: var(--alt-orange); }
.alt-role--content-modifier-modifier { --alt-color: var(--alt-orange-yellow); }
.alt-role--deep-modifier { --alt-color: var(--alt-yellow); }
.alt-role--action-modifier-modifier { --alt-color: var(--alt-green-yellow); }
.alt-role--action-modifier { --alt-color: var(--alt-green); }
.alt-role--action-helper { --alt-color: var(--alt-light-blue); }
.alt-role--action { --alt-color: var(--alt-blue); }
.alt-role--connector { --alt-color: var(--alt-brown); }

.alt-dict-demo-refresh {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  min-width: 7.5rem;
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  background: #c82323;
  color: #fff;
  font: 800 1rem Aptos, "Segoe UI", sans-serif;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(100, 20, 20, 0.28);
  cursor: pointer;
}

.alt-dict-demo-refresh:hover,
.alt-dict-demo-refresh:focus-visible {
  background: #a91414;
  outline: 3px solid rgba(255, 155, 155, 0.75);
  outline-offset: 3px;
}

.alt-dict-demo-refresh:disabled {
  cursor: wait;
  opacity: 0.72;
}

.alt-dict-demo-refresh.is-loading {
  background: #7f1d1d;
}

.alt-underline--red-blue,
.alt-underline--orange-blue,
.alt-underline--green-blue,
.alt-underline--light-blue-blue {
  display: inline-block;
  --alt-underline-thickness: 0.32em;
  --alt-underline-gap: 1px;
  padding-bottom: calc(var(--alt-underline-thickness) + var(--alt-underline-gap));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% var(--alt-underline-thickness);
  text-shadow:
    1px 0 0 #fff,
    -1px 0 0 #fff,
    0 1px 0 #fff,
    0 -1px 0 #fff,
    1px 1px 0 #fff,
    -1px 1px 0 #fff,
    1px -1px 0 #fff,
    -1px -1px 0 #fff;
}

.alt-underline--red-blue { background-image: linear-gradient(90deg, var(--alt-red), var(--alt-blue)); }
.alt-underline--orange-blue { background-image: linear-gradient(90deg, var(--alt-orange), var(--alt-blue)); }
.alt-underline--green-blue { background-image: linear-gradient(90deg, var(--alt-green), var(--alt-blue)); }
.alt-underline--light-blue-blue { background-image: linear-gradient(90deg, var(--alt-light-blue), var(--alt-blue)); }

@media (max-width: 780px) {
  .alt-dict {
    padding: 0 0.65rem;
  }

  .alt-entry {
    grid-template-columns: 1fr;
  }

  .alt-pedigree {
    --alt-spectrum-column-min: 8.5rem;
  }

  .alt-pedigree-shell {
    padding-left: 2.35rem;
  }

  .alt-pedigree-toggle {
    left: 0;
  }

  .alt-pedigree__column {
    flex: 0 0 var(--alt-spectrum-column-min);
  }

  .alt-helper-modal__columns {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }

  .alt-helper-modal--related .alt-helper-modal__columns {
    grid-template-columns: max-content;
  }
}
