:root {
  --page-bg: #5f5f5d;
  --page-ink: #f6f1e9;
  --page-accent: #ff9933;
  font-family: "Noto Serif Telugu", "Noto Sans Telugu", "Gautami", "Nirmala UI", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  background: var(--page-bg);
  color: var(--page-ink);
  margin: 0;
  min-height: 100vh;
}

.tc-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.tc-shell {
  width: min(100%, 960px);
}

.tc-title {
  color: var(--page-accent);
  font-family: "Noto Serif Telugu", "Noto Sans Telugu", "Gautami", "Nirmala UI", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 18px;
  text-align: center;
}

.telugu-chakra-panel {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  padding: 20px 28px 24px;
  position: relative;
}

.telugu-chakra-panel h3 {
  border-bottom: 1px solid rgba(255, 153, 51, 0.3);
  color: #ff9933;
  display: inline-block;
  font-family: "Noto Serif Telugu", "Noto Sans Telugu", "Gautami", "Nirmala UI", serif;
  font-size: 1.2rem;
  margin-block-end: 14px;
  margin-block-start: 0;
  padding-bottom: 4px;
  white-space: nowrap;
}


.telugu-chakra-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  position: relative;
}

.chakra-help-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  border: 0;
  box-shadow: none !important;
  color: #ff9933;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: "Noto Serif Telugu", "Noto Sans Telugu", "Gautami", "Nirmala UI", serif;
  font-size: 12px;
  line-height: 1;
  margin: 2px 0 0 auto;
  outline: 0 !important;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.chakra-help-trigger:hover,
.chakra-help-trigger:focus,
.chakra-help-trigger:focus-visible,
.chakra-help-trigger:active {
  background: transparent !important;
  box-shadow: none !important;
  color: #ffc47e;
  outline: 0 !important;
}

.chakra-help-window {
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid rgba(255, 153, 51, 0.28);
  border-radius: 6px;
  color: #eee;
  font-family: "Noto Serif Telugu", "Noto Sans Telugu", "Gautami", "Nirmala UI", serif;
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: min(82vw, 360px);
  padding: 12px 14px;
  position: absolute;
  right: 28px;
  top: 54px;
  width: 360px;
  z-index: 20;
}

.chakra-help-window[hidden] {
  display: none;
}

.chakra-help-window h4 {
  color: #ff9933;
  font-family: "Noto Serif Telugu", "Noto Sans Telugu", "Gautami", "Nirmala UI", serif;
  font-size: 12px;
  margin: 0 0 8px;
}

.chakra-help-window p {
  margin: 0 0 8px;
}

.chakra-help-window ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chakra-help-window li {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0;
}

.chakra-help-window li:first-child {
  border-top: 0;
}

.tc-app {
  --tc-paper: #fbfaf6;
  --tc-ink: #123d3d;
  --tc-line: #dce5e1;
  --tc-gold: #f4b400;
  --tc-shadow: 0 20px 52px rgba(0, 0, 0, 0.28);
  --tc-telugu: "Noto Serif Telugu", serif;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  width: min(100%, 620px);
}

.tc-wheel-wrap {
  --wheel-size: min(100%, 580px);
  background: var(--tc-paper);
  border: 7px solid #9fa7b3;
  border-radius: 50%;
  box-shadow: var(--tc-shadow);
  height: var(--wheel-size);
  max-height: 580px;
  max-width: 580px;
  padding: 20px;
  position: relative;
  width: var(--wheel-size);
}

.tc-wheel {
  aspect-ratio: 1;
  display: block;
  filter: drop-shadow(0 16px 22px rgba(20, 58, 58, 0.13));
  height: auto;
  overflow: visible;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
}

.tc-ring {
  cursor: grab;
  transform-box: fill-box;
  transform-origin: center;
}

.tc-ring.is-dragging {
  cursor: grabbing;
}

.tc-app.is-guiding .tc-ring {
  will-change: transform;
}

.tc-app.is-guiding .tc-wheel {
  pointer-events: none;
}

.tc-sector {
  stroke: var(--tc-line);
  stroke-width: 1;
}

.tc-label {
  fill: #1f4c49;
  font-family: var(--tc-telugu);
  font-size: 21px;
  font-weight: 700;
  pointer-events: none;
  text-anchor: middle;
  user-select: none;
  -webkit-user-select: none;
}

.tc-label.is-muted {
  fill: #6e827f;
  font-size: 18px;
}

.tc-pointer {
  background: transparent;
  height: 48px;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 36px;
  z-index: 5;
}

.tc-pointer-button {
  appearance: none;
  background: transparent !important;
  -webkit-tap-highlight-color: transparent;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit;
  cursor: pointer;
  filter: none !important;
  outline: 0 !important;
  padding: 0;
  transition: transform 140ms ease !important;
  z-index: 6;
}

.tc-pointer-button:hover,
.tc-pointer-button:focus,
.tc-pointer-button:focus-visible,
.tc-pointer-button:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
  transform: translateX(-50%) scale(1.08) !important;
}

.tc-pointer::before {
  background: #f4b400;
  border-radius: 999px;
  box-shadow: none !important;
  content: "";
  height: 28px;
  left: 50%;
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  width: 8px;
}

.tc-pointer::after {
  background: #f4b400;
  border-radius: 999px;
  box-shadow: none !important;
  content: "";
  height: 14px;
  left: 50%;
  position: absolute;
  top: 31px;
  transform: translateX(-50%);
  width: 14px;
}

.tc-pointer:hover::before,
.tc-pointer:hover::after,
.tc-pointer:focus::before,
.tc-pointer:focus::after,
.tc-pointer:focus-visible::before,
.tc-pointer:focus-visible::after,
.tc-pointer:active::before,
.tc-pointer:active::after {
  background: #f4b400 !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}

.tc-pointer-button.is-locking::before {
  animation: tc-marker-click-stem 520ms ease-out;
}

.tc-pointer-button.is-locking::after {
  animation: tc-marker-click-dot 520ms ease-out;
}

.tc-app.is-guiding .tc-pointer-button.is-locking {
  animation: tc-marker-guide-press 760ms ease-out;
}

.tc-app.is-guiding .tc-pointer-button.is-locking::after {
  animation: tc-marker-guide-dot 760ms ease-out;
}

.tc-focus {
  align-items: center;
  background: #f7faf8;
  border: 4px solid var(--tc-gold);
  border-radius: 999px;
  box-shadow:
    inset 0 0 24px rgba(18, 61, 61, 0.08),
    0 12px 30px rgba(18, 61, 61, 0.1);
  display: flex;
  height: 156px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 156px;
}

.tc-focus strong {
  color: var(--tc-ink);
  font-family: var(--tc-telugu);
  font-size: 4.1rem;
  font-weight: 800;
  line-height: 1;
}

.tc-focus.is-uncommon {
  background: #ffe3e0;
  border-color: #d93025;
  box-shadow:
    inset 0 0 28px rgba(217, 48, 37, 0.16),
    0 12px 30px rgba(217, 48, 37, 0.18);
}

.tc-focus.is-uncommon strong {
  color: #8f1d16;
}

.tc-builder {
  align-items: center;
  background: rgba(251, 250, 246, 0.78);
  border: 1px solid rgba(185, 198, 194, 0.75);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  display: flex;
  gap: 8px;
  padding: 6px;
  width: min(92%, 430px);
}

.tc-word {
  align-items: center;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid #d8caa4;
  border-radius: 999px;
  color: var(--tc-ink);
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  font-family: var(--tc-telugu);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  min-height: 42px;
  overflow-wrap: anywhere;
  padding: 4px 14px;
  position: relative;
  user-select: text;
  -webkit-touch-callout: default;
  -webkit-user-select: text;
}

.tc-word::before {
  color: rgba(26, 61, 61, 0.24);
  content: attr(data-hint);
  left: 14px;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 14px;
  top: 50%;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
  z-index: 0;
}

.tc-word.is-dictionary-valid {
  background: #e7f6ea;
  border-color: #66a86f;
  box-shadow: inset 0 0 0 1px rgba(57, 128, 70, 0.24);
}

.tc-word.is-dictionary-missing {
  background: #fff5cf;
  border-color: #d0a329;
  box-shadow: inset 0 0 0 1px rgba(208, 163, 41, 0.24);
}

.tc-word-part {
  border-radius: 8px;
  padding: 0 2px;
  position: relative;
  user-select: text;
  -webkit-user-select: text;
  z-index: 1;
}

.tc-word-part.is-uncommon {
  background: #ffe3e0;
  color: #8f1d16;
  box-shadow: inset 0 0 0 1px rgba(217, 48, 37, 0.28);
}

.tc-actions {
  display: flex;
  gap: 8px;
}

.tc-button {
  appearance: none;
  align-items: center;
  background: #f7faf8 !important;
  border: 1px solid #b9c6c2;
  border-radius: 999px;
  color: var(--tc-ink);
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  font-size: 0;
  height: 38px;
  justify-content: center;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 120ms ease;
  width: 38px;
}

.tc-button::before {
  align-items: center;
  display: flex;
  font-family: Arial, "Segoe UI Symbol", sans-serif;
  font-size: 24px;
  font-weight: 700;
  inset: 0;
  justify-content: center;
  line-height: 1;
  position: absolute;
  transform: none;
  z-index: 1;
}

.tc-button:hover,
.tc-button:focus,
.tc-button:focus-visible,
.tc-button:active {
  background: #eef2ef !important;
  border-color: #aebbb7;
  box-shadow: inset 0 0 0 1px rgba(18, 61, 61, 0.06);
  outline: 0;
}

#deleteAksharam::after {
  background: #b9efc3;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  transition: width 180ms ease;
  width: var(--tc-delete-progress, 0%);
}

#deleteAksharam::before {
  content: "−";
  font-size: 25px;
  transform: translateY(-1px);
}

#deleteAksharam.is-word-complete {
  border-color: #6fbd7c;
  box-shadow: 0 0 0 4px rgba(105, 184, 119, 0.18);
}

#nextChallenge::before {
  content: "›";
  font-size: 32px;
  transform: translate(1px, -1px);
}

.tc-button-primary {
  background: #f4b400;
  border-color: #d69d00;
  color: #183b34;
}

.tc-button:active::before {
  transform: none;
}

.tc-button.is-guided-click {
  animation: tc-guided-click 420ms ease-out;
}

.tc-word.is-guiding-word {
  animation: tc-guided-word 700ms ease-out;
}

@keyframes tc-guided-click {
  0%,
  100% {
    transform: none;
  }

  45% {
    box-shadow: 0 0 0 7px rgba(244, 180, 0, 0.22);
    transform: scale(0.9);
  }
}

@keyframes tc-marker-click-stem {
  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }

  45% {
    opacity: 0.72;
    transform: translateX(-50%) scaleY(0.88);
  }
}

@keyframes tc-marker-guide-press {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }

  42% {
    transform: translateX(-50%) scale(1.18);
  }
}

@keyframes tc-marker-guide-dot {
  0%,
  100% {
    box-shadow: none;
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }

  42% {
    box-shadow:
      0 0 0 10px rgba(244, 180, 0, 0.24),
      0 0 0 20px rgba(244, 180, 0, 0.12);
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
  }
}

@keyframes tc-marker-click-dot {
  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }

  45% {
    opacity: 0.72;
    transform: translateX(-50%) scale(0.82);
  }
}

@keyframes tc-guided-word {
  0%,
  100% {
    box-shadow: none;
  }

  45% {
    box-shadow: inset 0 0 0 2px rgba(244, 180, 0, 0.32);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-app.is-guiding .tc-ring,
  .tc-app.is-guiding .tc-pointer-button.is-locking,
  .tc-button.is-guided-click,
  .tc-pointer-button.is-locking::before,
  .tc-pointer-button.is-locking::after,
  .tc-word.is-guiding-word {
    animation: none;
  }
}

@media (max-width: 620px) {
  .chakra-help-window {
    left: 14px;
    max-width: none;
    right: 14px;
    top: 50px;
    width: auto;
  }

  .telugu-chakra-panel {
    padding: 16px 14px 18px;
  }

  .tc-wheel-wrap {
    --wheel-size: min(100%, 580px);
    border-width: 5px;
    padding: 14px;
  }

  .tc-focus {
    height: 132px;
    width: 132px;
  }

  .tc-focus strong {
    font-size: 3.4rem;
  }

  .tc-label {
    font-size: 20px;
  }

  .tc-label.is-muted {
    font-size: 16px;
  }

  .tc-builder {
    border-radius: 18px;
    width: min(94%, 360px);
  }

  .tc-word {
    font-size: 1.35rem;
    min-height: 40px;
    padding: 4px 12px;
  }

  .tc-button {
    height: 36px;
    width: 36px;
  }

  .tc-button::before {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .telugu-chakra-panel {
    padding: 14px 10px 16px;
  }

  .telugu-chakra-panel h3 {
    font-size: 1.05rem;
  }

  .tc-app {
    gap: 10px;
    width: 100%;
  }

  .tc-wheel-wrap {
    --wheel-size: min(100%, 350px);
    border-width: 4px;
    padding: 8px;
  }

  .tc-pointer {
    height: 30px;
    top: -2px;
    width: 24px;
  }

  .tc-pointer::before {
    height: 18px;
    top: 5px;
    width: 6px;
  }

  .tc-pointer::after {
    height: 10px;
    top: 18px;
    width: 10px;
  }

  .tc-focus {
    border-width: 3px;
    height: 92px;
    width: 92px;
  }

  .tc-focus strong {
    font-size: 2.35rem;
  }

  .tc-label {
    font-size: 18px;
  }

  .tc-label.is-muted {
    font-size: 15px;
  }

  .tc-builder {
    gap: 6px;
    padding: 5px;
    width: min(96%, 330px);
  }

  .tc-word {
    font-size: 1.2rem;
    min-height: 38px;
    padding: 4px 10px;
  }

  .tc-button {
    height: 34px;
    width: 34px;
  }
}
.chakra-help-marker {
  background: #f4b400;
  border-radius: 999px;
  display: inline-block;
  height: 18px;
  margin: 0 4px -4px;
  position: relative;
  width: 6px;
}

.chakra-help-marker::after {
  background: #f4b400;
  border-radius: 999px;
  bottom: -4px;
  content: "";
  height: 10px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 10px;
}

.chakra-help-remove,
.chakra-help-next {
  align-items: center;
  background: #f7faf8;
  border: 1px solid #b9c6c2;
  border-radius: 999px;
  color: #123d3d;
  display: inline-flex;
  font-family: Arial, "Segoe UI Symbol", sans-serif;
  font-size: 16px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  line-height: 1;
  margin: 0 4px -6px 0;
  width: 22px;
}

.chakra-help-next {
  font-size: 20px;
}

.chakra-help-window.is-open {
  display: block;
}
