


#finalWordWrapper {
  margin-top: 24px;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
  padding: 0 16px;
}
#finalWordLabels {
  position: relative;
}
#finalWord {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: nowrap;
  column-gap: 0.214em;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 28px;
  font-weight: 800;
  
  padding: 52px 0.214em 10px;
}

.graphemeSlot {
  position: relative; 
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 1.6em;
  border: 0.0715em solid rgba(55, 65, 81, 0.35);
  border-radius: 0.357em;
  background: rgba(255, 255, 255, 0.35);
  padding: 0.214em 0.286em 0.214em;
}




.graphemeSlot.role-vowel {
  border: 0.107em solid #1d4ed8;
  background: #eff6ff;
}
.graphemeSlot.role-consonant {
  border: 0.0715em solid #475569;
}
.graphemeSlot.role-digraph {
  border: 0.089em dashed #b45309;
  background: #fffbeb;
}
.graphemeSlot.role-silent {
  border: 0.0715em dotted #6b7280;
}

.graphemeSlot.role-vowel-team {
  border: 0.107em dashed #1d4ed8;
  background: #eff6ff;
}


.suffixGroup {
  display: inline-flex;
  align-items: flex-end;
}
.suffixGroup > .graphemeSlot {
  border-radius: 0;
}
.suffixGroup > .graphemeSlot:first-child {
  border-top-left-radius: 0.357em;
  border-bottom-left-radius: 0.357em;
}
.suffixGroup > .graphemeSlot:last-child {
  border-top-right-radius: 0.357em;
  border-bottom-right-radius: 0.357em;
}
.suffixGroup > .graphemeSlot + .graphemeSlot {
  border-left: none;
}

#finalWord .phonemeHint,
#finalWord .silentMark {
  min-width: 1.6em;
  text-align: center;
}

.phonemeHint {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 0.12em;
  text-align: center;
}
.phonemeHint[data-phoneme] {
  min-width: 1.6em;
}
.phonemeHint::after {
  content: attr(data-phoneme);
  position: absolute;
  top: -1.9em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--phoneme-color, #111827);
  background: transparent;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
}
.graphemeSlot[data-phoneme] .phonemeHint,
.graphemeSlot[data-phoneme] .plainGrapheme {
  color: var(--phoneme-color, inherit);
}
.phonemeHint { outline: none; }

.silentMark {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.silentMark::before {
  content: "🤫";
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  line-height: 1;
}
.silentMark::after { display: none !important; }

.sylLetters {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.28em;
  border-bottom: 3px solid transparent;
  border-radius: 8px;
  padding: 4px 0;
  transition: border 0.25s ease, border-radius 0.25s ease, background 0.25s ease,
    opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease,
    box-shadow 0.25s ease, padding 0.25s ease;
}
.sylLetters.syl-active {
  border-bottom-width: 3px;
  border-bottom-color: #1d4ed8;
  background: rgba(29, 78, 216, 0.05);
}

.sylLetters.syl-dimmed {
  opacity: 0.25;
  filter: grayscale(90%);
}
#finalWord.multi-syl { column-gap: 0.25em; }
#finalWord.multi-syl .sylDivider { display: none; }
#finalWord.multi-syl .sylLetters {
  border-bottom: 3px solid var(--sylc, #e5e7eb);
  background: var(--sylc-bg, #f3f4f6);
  animation: sylChipPop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
  animation-delay: calc(var(--syl-order, 0) * 0.11s);
}
#finalWord.multi-syl .syl-c0 { --sylc:#3b82f6; --sylc-bg:#eff6ff; }
#finalWord.multi-syl .syl-c1 { --sylc:#16a34a; --sylc-bg:#f0fdf4; }
#finalWord.multi-syl .syl-c2 { --sylc:#d97706; --sylc-bg:#fffbeb; }
#finalWord.multi-syl .syl-c3 { --sylc:#7c3aed; --sylc-bg:#faf5ff; }
#finalWord.multi-syl .syl-c4 { --sylc:#dc2626; --sylc-bg:#fff1f2; }
#finalWord.multi-syl .syl-c5 { --sylc:#0891b2; --sylc-bg:#ecfeff; }

#finalWord.multi-syl .sylLetters.syl-dimmed {
  animation: none;
  opacity: 0.25;
  filter: grayscale(90%);
  transform: none;
  box-shadow: none;
}
#finalWord.multi-syl .sylLetters.syl-active {
  animation: none;
  opacity: 1;
  filter: none;
  border: 4px solid #1d4ed8;
  border-radius: 12px;
  background: #dbeafe;
  padding: 7px 9px;
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.45), 0 0 0 4px rgba(29, 78, 216, 0.16);
  transform: translateY(-4px) scale(1.08);
}
@keyframes sylChipPop {
  from { opacity:0; transform:translateY(6px) scale(0.92); }
  to   { opacity:1; transform:translateY(0)   scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #finalWord.multi-syl .sylLetters { animation: none; }
  #finalWord.multi-syl .sylLetters.syl-active { transform: none; }
}


.graphemeSlot.vowel-glow {
  background: #fef08a;
  outline: 0.14em solid #92400e;
  outline-offset: 0.07em;
  box-shadow: 0 0 0.5em 0.15em rgba(250, 204, 21, 0.75);
  animation: vowelGlowPulse 0.9s ease-out 1;
}
.graphemeSlot.vowel-glow::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -0.42em;
  height: 0.16em;
  border-radius: 0.1em;
  background: #92400e;
}
@keyframes vowelGlowPulse {
  0%   { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
  40%  { box-shadow: 0 0 0.9em 0.35em rgba(250, 204, 21, 0.95); }
  100% { box-shadow: 0 0 0.5em 0.15em rgba(250, 204, 21, 0.75); }
}
@media (prefers-reduced-motion: reduce) {
  .graphemeSlot.vowel-glow { animation: none; }
}

.sylDivider {
  display: inline-block;
  width: 2px;
  height: 3em;
  background: #374151;
  margin: 0 6px;
  align-self: flex-end;
  margin-bottom: 8px;
  border-radius: 1px;
}


.sylHyphen {
  display: inline-block;
  align-self: center;
  font-weight: 800;
  font-size: 1em;
  color: #6b7280;
  padding: 0 1px;
}

#structureMetric {
  
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin: 10px auto 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}


#finalWord.dds3-host { position: relative; padding-bottom: 40px; }
.dds3-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; }
.dds3-svg path { fill: none; stroke: #1d4ed8; stroke-width: 3; stroke-linecap: round; }
.dds3-svg line { stroke-width: 4; stroke-linecap: round; }
#finalWord .graphemeSlot { cursor: pointer; }
#finalWord .graphemeSlot.dds3-lit { background: #e0ecfb; box-shadow: 0 0 0 2px #1d4ed8 inset; }
#finalWord .graphemeSlot:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
#finalWord.dds3-loop-mode .graphemeSlot { opacity: .5; }
#finalWord.dds3-loop-mode .graphemeSlot.dds3-lit { opacity: 1; background: #1d4ed8; box-shadow: 0 0 0 3px #14245e inset; color: #fff; }
#finalWord.dds3-loop-mode .graphemeSlot.dds3-lit .plainGrapheme,
#finalWord.dds3-loop-mode .graphemeSlot.dds3-lit .phonemeHint,
#finalWord.dds3-loop-mode .graphemeSlot.dds3-lit .silentMark { color: #fff; }
#finalWord .graphemeSlot.dds3-hide { opacity: 0; transform: translateY(5px); transition: opacity .2s ease, transform .2s ease; }
#finalWord .dds3-ch { display: inline-block; }
#finalWord .dds3-ch.dds3-ch-active { background: #1d4ed8; color: #fff; border-radius: 4px; }
.dds3-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; margin: 30px 0 8px; }

body.dds3-focus-active #prototypeNotice,
body.dds3-focus-active #highlightDemo,
body.dds3-focus-active #wordRow,
body.dds3-focus-active #retryBtn,
body.dds3-focus-active #analysisStatus,
body.dds3-focus-active #privacyNotice,
body.dds3-focus-active #landingTopBar,
body.dds3-focus-active #landingStartHint,
body.dds3-focus-active #tutorModeBtn,
body.dds3-focus-active #pictureInput,
body.dds3-focus-active #globalLangSelector,
body.dds3-focus-active #syllableDivisionNotice,
body.dds3-focus-active .dds3-bar {
  display: none;
}
.dds3-focusBackBtn {
  display: block;
  margin: 10px auto 0;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  border: 2px solid #1c355e;
  background: #fff;
  color: #1c355e;
}
.dds3-btn { font: inherit; font-weight: 800; font-size: 14px; border-radius: 999px; padding: 9px 16px; cursor: pointer; border: 2px solid #1c355e; background: #33CCFF; color: #1c355e; }
.dds3-btn:disabled { opacity: .45; cursor: default; }
.dds3-hint { flex-basis: 100%; text-align: center; font-size: 13px; font-weight: 700; color: #1AA6E0; margin-bottom: 4px; }

.dds3-group { flex-basis: 100%; text-align: center; }
.dds3-groupLabel { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; color: #64748b; margin: 10px 0 6px; }
.dds3-groupBtns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; }
.dds3-btn.dds3-btn-active { background: #1c355e; color: #fff; }

.dds3-speed-row { flex-basis: 100%; display: flex; gap: 8px; justify-content: center; margin-top: 2px; }
.dds3-btn.dds3-btn-speed { font-size: 12px; font-weight: 700; padding: 5px 12px; border-width: 1px; opacity: .8; }
.dds3-btn.dds3-btn-speed.dds3-btn-active { opacity: 1; }

.dds3-audio-indicator { flex-basis: 100%; text-align: center; font-size: 13px; font-weight: 700; color: #1AA6E0; margin-top: 2px; min-height: 1em; }

.dds3-guidance { flex-basis: 100%; text-align: center; font-size: 13px; font-weight: 700; color: #1c355e; margin-top: 6px; }

@media (min-width: 640px) {
  .dds3-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto 1fr auto auto; column-gap: 24px; row-gap: 8px; align-items: start; max-width: 760px; margin-left: auto; margin-right: auto; }
  .dds3-bar > .dds3-hint { grid-column: 1 / -1; grid-row: 1; }
  .dds3-bar > .dds3-speed-row { grid-column: 1 / -1; grid-row: 2; }
  .dds3-bar > div.dds3-group:nth-of-type(1) { grid-column: 1; grid-row: 3 / span 2; }
  .dds3-bar > div.dds3-group:nth-of-type(2) { grid-column: 2; grid-row: 3 / span 2; }
  .dds3-bar > div.dds3-group:nth-of-type(3) { grid-column: 3; grid-row: 3 / span 2; }
  .dds3-bar > .dds3-audio-indicator { grid-column: 1 / -1; grid-row: 5; }
  .dds3-bar > .dds3-guidance { grid-column: 1 / -1; grid-row: 6; }
  .dds3-bar .dds3-groupLabel { margin-top: 0; }
  .dds3-bar .dds3-groupBtns { flex-direction: column; flex-wrap: nowrap; gap: 10px; align-items: stretch; }
}


.quizBlank {
  background: repeating-linear-gradient(45deg, rgba(29,78,216,0.07), rgba(29,78,216,0.07) 6px, rgba(29,78,216,0.14) 6px, rgba(29,78,216,0.14) 12px) !important;
  border: 0.089em dashed #1d4ed8 !important;
  opacity: 0.55;
}

.quizBlank.quizBlankActive {
  opacity: 1;
  animation: quizBlankPulse 1.1s ease-in-out infinite;
}
@keyframes quizBlankPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(29,78,216,0.35); }
  50% { box-shadow: 0 0 0 6px rgba(29,78,216,0); }
}
@media (prefers-reduced-motion: reduce) {
  .quizBlank.quizBlankActive { animation: none; }
}
.quizBlankMark { display: inline-block; min-width: 0.7em; color: #1d4ed8; }
.quizRevealed { animation: quizPop 0.4s ease; }
@keyframes quizPop { from { transform: scale(1.3); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .quizRevealed { animation: none; }
}

.quizBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 8px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
.quizPrompt { flex-basis: 100%; text-align: center; font-size: 14px; font-weight: 700; color: #334155; }
.quizClue { flex-basis: 100%; text-align: center; font-size: 14px; font-weight: 600; color: #92400e; }
.quizClue:empty { display: none; }
.quizOptions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.quizOptBtn {
  min-width: 44px;
  min-height: 44px;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  border: 2px solid #1d4ed8;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
}
.quizOptBtn:active { transform: scale(0.94); }
.quizOptBtn.quizWrong {
  animation: quizShake 0.4s ease;
  background: #fef2f2;
  border-color: #dc2626;
  color: #dc2626;
}
@keyframes quizShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes quizSettle {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
.quizOptBtn.quizCorrect { animation: quizSettle 200ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  .quizOptBtn.quizWrong, .quizOptBtn.quizCorrect { animation: none; }
}
.quizShowBtn {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  cursor: pointer;
}


.stepBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 8px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.stepPrompt {
  flex-basis: 100%;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: #1c355e;
  margin-bottom: 2px;
  animation: stepPromptPop 0.28s ease both;
}
@keyframes stepPromptPop {
  from { opacity: 0; transform: translateY(-6px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .stepPrompt { animation: none; }
}
.stepNextBtn, .stepRestartBtn {
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.stepNextBtn { border: 2px solid #1d4ed8; background: #1d4ed8; color: #fff; }
.stepNextBtn:disabled { opacity: .45; cursor: default; }
.stepRestartBtn { border: 2px solid #cbd5e1; background: #fff; color: #475569; }


#finalWord .graphemeSlot.tilePanelOpen { background: #e0ecfb; box-shadow: 0 0 0 2px #1d4ed8 inset; }

.tilePanel { display: flex; justify-content: center; margin: 10px 0 8px; }
.tilePanelInner {
  position: relative;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 14px 40px 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  animation: tilePanelPop 0.2s ease both;
}
@keyframes tilePanelPop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tilePanelInner { animation: none; }
}
.tilePanelCloseBtn {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 40px;
  min-height: 40px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}
.tilePanelHeading { margin: 0 0 6px; font-size: 20px; font-weight: 900; color: #1c355e; text-align: center; }
.tilePanelBody { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: #334155; text-align: center; }


.writeItBlank {
  min-height: 1.4em;
  border-style: dashed;
  border-color: #94a3b8;
  background: repeating-linear-gradient(45deg, rgba(100,116,139,0.06), rgba(100,116,139,0.06) 6px, rgba(100,116,139,0.12) 6px, rgba(100,116,139,0.12) 12px);
}
.writeItBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 8px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
.writeItPrompt { flex-basis: 100%; text-align: center; font-size: 14px; font-weight: 700; color: #334155; }
.writeItInput {
  flex: 1 1 220px;
  min-width: 160px;
  min-height: 44px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  padding: 8px 12px;
  border: 2px solid #1d4ed8;
  border-radius: 10px;
  background: #eff6ff;
  color: #1c355e;
}
.writeItSubmitBtn {
  min-height: 44px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: 999px;
  border: 2px solid #1d4ed8;
  background: #1d4ed8;
  color: #fff;
  cursor: pointer;
}

@keyframes writeItSettle {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
.writeItCorrect { box-shadow: 0 0 0 2px #16a34a inset; animation: writeItSettle 200ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  .writeItCorrect { animation: none; }
}
.writeItWrong {
  position: relative;
  border-color: #dc2626;
  background: #fef2f2;
  min-height: 1.4em;
}
.writeItFeedback { display: flex; justify-content: center; margin: 10px 0 8px; }
.writeItFeedbackInner {
  width: 100%;
  max-width: 460px;
  box-sizing: border-box;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
.writeItAllCorrect { margin: 0; font-size: 16px; font-weight: 800; color: #15803d; text-align: center; }
.writeItFeedbackList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.writeItFeedbackItem {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  line-height: 1.5;
}



.chartScroll { overflow-x: auto; padding-bottom: 1.3rem; position: relative; }

.wlChartLegend { font-size: .85rem; color: #4b5563; margin: -.6rem 0 .8rem; line-height: 1.4; }
.wlChart { border-collapse: collapse; width: 100%; table-layout: fixed; }
.wlChart td { border: 1px solid; padding: .5rem .35rem;
              text-align: center; height: 3rem; white-space: nowrap; overflow: hidden; }
.wlChart td.rowlab { text-align: left; padding-left: .7rem;
                     width: 9.5rem;
                     font-size: .85rem; font-weight: 600; }

.wlChart td.rowlab .rowterm,
.wlChart td.rowlab .rowdef { display: block; white-space: normal; line-height: 1.2; }
.wlChart td.rowlab .rowdef { font-size: .72rem; font-weight: 500; opacity: 1; margin-top: 2px; }

.wlChart td.cell.sound-colored { --tile-tint: color-mix(in srgb, var(--tile-color) 12%, #fff); }

.wlChart tr.r-phoneme td.cell.sound-colored { background-color: var(--tile-tint); color: color-mix(in srgb, var(--tile-color) 70%, #000); font-weight: 600; }
.wlChart tr.r-grapheme td.cell.sound-colored { box-shadow: inset 0 -3px 0 0 var(--tile-color); }
.wlChart td.cell.live { box-shadow: inset 0 0 0 2px currentColor; }
.wlChart td.cell.syl-break { border-right-width: 3px; }

.wlChart td.cell.replayable { cursor: pointer; }
.wlChart td.cell.replayable:focus-visible { outline: 3px solid #1d4ed8; outline-offset: -3px; }
@media (hover: hover) {
  .wlChart td.cell.replayable:hover { filter: brightness(0.96); }
}
.wlChart tr.r-rank td.cell { font-size: .9rem; }
.wlChart tr.r-sheet td.cell { font-size: .85rem; font-weight: 600; color: #c8102e; padding: .35rem .5rem; }

.wlChart tr.r-grapheme td.cell { font-size: 1.2rem; }

.wlChart tr.r-grapheme td.cell { font-weight: 700; }



@keyframes wlChartCellFill {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wlChartWordComplete {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .55); }
  100% { box-shadow: 0 0 0 14px rgba(22, 163, 74, 0); }
}
@keyframes wlChartLivePulse {
  0%, 100% { box-shadow: inset 0 0 0 2px currentColor; }
  50% { box-shadow: inset 0 0 0 2px currentColor, 0 0 0 3px rgba(29, 78, 216, .25); }
}
.wlChart td.cell.just-filled { animation: wlChartCellFill 420ms ease-out; }
.wlChart td.cell.live { animation: wlChartLivePulse 1.8s ease-in-out infinite; }
.wlChart.word-complete { animation: wlChartWordComplete 900ms ease-out 1; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  .wlChart td.cell.just-filled, .wlChart td.cell.live, .wlChart.word-complete { animation: none; }
}


.wlChart td.cell.syl-highlight { box-shadow: inset 0 0 0 2px currentColor; }


.wlChart td.cell.sound-active { background-color: var(--sound-fill-color); }


.wlChart td.cell.link-top, .wlChart td.cell.link-bottom { position: relative; --link-color: #1d4ed8; }

.wlChart td.cell.link-top { border-bottom-color: transparent; }
.wlChart td.cell.link-bottom { border-top-color: transparent; }
.wlChart td.cell.link-top::before, .wlChart td.cell.link-bottom::before {
  content: ''; position: absolute; left: 1px; right: 1px; pointer-events: none;
  border: 2.5px solid var(--link-color);
}
.wlChart td.cell.link-top::before { top: 2px; bottom: -1px; border-bottom: none; border-radius: 10px 10px 0 0; }
.wlChart td.cell.link-bottom::before { top: -1px; bottom: 2px; border-top: none; border-radius: 0 0 10px 10px; }
.wlChart td.cell.link-top::after {
  content: ''; position: absolute; left: 50%; bottom: 3px; margin-left: -6px; pointer-events: none;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--link-color);
}

.wlChart tr.r-phoneme td.cell.live.link-top, .wlChart tr.r-grapheme td.cell.live.link-bottom { box-shadow: none; animation: none; }
.wlChart tr.r-grapheme td.cell.live.link-bottom.sound-colored { box-shadow: inset 0 -3px 0 0 var(--tile-color); }
@keyframes wlChartLinkPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.wlChart td.cell.live.link-top::before, .wlChart td.cell.live.link-top::after,
.wlChart td.cell.live.link-bottom::before { animation: wlChartLinkPulse 1.8s ease-in-out infinite; }
.wlChart td.cell.sound-link::before, .wlChart td.cell.sound-link::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .wlChart td.cell.live.link-top::before, .wlChart td.cell.live.link-top::after,
  .wlChart td.cell.live.link-bottom::before { animation: none; }
}

.wlChartSoundCaret { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; }
.wlChartSoundCaret path { fill: none; stroke-width: 3; stroke-linecap: round; }
.wlChartSylUnderline {
  position: absolute;
  height: 3px;
  background: #1d4ed8;
  border-radius: 2px;
  pointer-events: none;
}
