/* Typing Speed */
.ty-bar { height: 6px; background: color-mix(in srgb, var(--fg) 10%, transparent); border-radius: 99px; overflow: hidden; margin: 0 0 14px; }
.ty-bar i { display: block; height: 100%; width: 100%; background: var(--a2); transition: width .1s linear; }
.ty-text {
  height: calc(4 * 1.6em + 34px); overflow: hidden; padding: 14px 16px; margin-bottom: 14px; cursor: text;
  background: var(--c-bg); border: var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 22px; line-height: 1.6; color: var(--dim); word-spacing: 4px;
}
.ty-text .w.ok { color: var(--fg); }
.ty-text .w.bad { color: var(--bad); text-decoration: underline wavy; }
.ty-text .w.cur { color: var(--fg); background: color-mix(in srgb, var(--a2) 14%, transparent); border-radius: 4px; }
.ty-text .w.cur b { font-weight: inherit; }
.ty-text .w.cur b.ok { color: var(--a4); }
.ty-text .w.cur b.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, transparent); }
.ty-input { width: 100%; padding: 12px 16px; font: inherit; font-size: 20px; color: var(--fg); background: var(--panel-2); border: var(--border); border-radius: var(--radius-sm); }
.ty-input:focus { outline: 3px solid color-mix(in srgb, var(--a2) 50%, transparent); outline-offset: 1px; }
.ty-result { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ty-result[hidden] { display: none; }
.ty-result .big { font-family: var(--font-display); font-size: 48px; font-weight: 700; color: var(--a2); }
.ty-result .big small { font-size: .4em; color: var(--dim); }
.ty-result p { margin: 0; color: var(--dim); }
.ty-result .newbest { font-family: var(--font-display); color: var(--a3); }

[data-theme="retro"] .ty-bar { border-radius: 0; height: 8px; }
[data-theme="retro"] .ty-bar i { background: var(--a4); box-shadow: 0 0 8px var(--a4); }
[data-theme="retro"] .ty-text { border-radius: 0; border: 3px solid #000; font-size: 26px; background: #000; }
[data-theme="retro"] .ty-text .w.cur { border-radius: 0; background: #1a1636; }
[data-theme="retro"] .ty-input { border-radius: 0; border: 3px solid #000; font-size: 26px; color: var(--a4); background: #000; }
[data-theme="retro"] .ty-result .big { font-weight: 400; font-size: 30px; text-shadow: 0 0 10px currentColor; }

[data-theme="doodle"] .ty-bar { border: 2px solid var(--line); height: 12px; border-radius: var(--wob); }
[data-theme="doodle"] .ty-bar i { background: repeating-linear-gradient(-45deg, var(--a3) 0 5px, #ffe98a 5px 9px); }
[data-theme="doodle"] .ty-text { border: 2.5px solid var(--line); border-radius: var(--wob-2); font-size: 24px;
  background: linear-gradient(transparent 0 calc(100% - 1.5px), rgba(59, 130, 246, .18) 0) 0 14px / 100% 1.6em, var(--c-bg); }
[data-theme="doodle"] .ty-text .w.cur { background: linear-gradient(100deg, transparent 2%, var(--a3) 6% 94%, transparent 98%) 0 70% / 100% 55% no-repeat; }
[data-theme="doodle"] .ty-input { border: 2.5px solid var(--line); border-radius: var(--wob); font-size: 22px; box-shadow: var(--shadow-sm); }
[data-theme="doodle"] .ty-result .big { font-weight: 400; color: var(--a1); transform: rotate(-2deg); }
