.ltst-shell {
  --ltst-accent: #f2c100;
  --ltst-bg: #f1f2f5;
  --ltst-text: #171923;
  --ltst-muted: #656d7b;
  --ltst-line: #d8dbe2;
  --ltst-soft: #f7f8fb;
  --ltst-danger: #dc2626;
  --ltst-success: #0f766e;
  box-sizing: border-box;
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1120px;
  margin: 28px auto;
  padding: 26px;
  border: 1px solid #e4e7ef;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8f9fc, #eef1f6);
  color: var(--ltst-text);
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.1);
  animation: ltst-fade-up 0.4s ease;
}

.ltst-shell *,
.ltst-shell *::before,
.ltst-shell *::after {
  box-sizing: border-box;
}

.ltst-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.ltst-title {
  margin: 0;
  font-size: clamp(2.3rem, 5.1vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.ltst-tagline {
  margin: 0;
  color: #232633;
  font-size: 1.05rem;
  font-weight: 600;
}

.ltst-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.ltst-duration-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ltst-duration,
.ltst-button {
  appearance: none;
  border: 1px solid #d9dee8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ltst-text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
  transition: 0.2s ease;
}

.ltst-duration:hover,
.ltst-button:hover {
  border-color: var(--ltst-accent);
  transform: translateY(-1px);
}

.ltst-duration.is-active,
.ltst-button:not(.ltst-button-secondary) {
  background: #ffd84b;
  border-color: #f0c21a;
  color: #1a2030;
  box-shadow: 0 8px 18px rgba(240, 194, 26, 0.35);
}

.ltst-button-secondary {
  background: #ffffff;
}

.ltst-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ltst-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #dbe2ec;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ltst-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(2, 132, 199, 0.12);
}

.ltst-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #101626;
}

.ltst-stat-label {
  color: #2b3345;
  font-size: 1rem;
  font-weight: 600;
}

.ltst-line-card {
  display: grid;
  gap: 14px;
  padding: 40px 24px 24px;
  border: 1px solid #d8dce6;
  border-radius: 18px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  cursor: text;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 152px;
}

.ltst-line-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(242, 193, 0, 0.08) 45%, transparent 70%);
  transform: translateX(-110%);
  pointer-events: none;
}

.ltst-line-card::before {
  content: "Click to start";
  position: absolute;
  top: 11px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  background: #f8fafc;
  color: #3c465a;
  font-weight: 700;
  font-size: 0.71rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid #d7deea;
  border-radius: 999px;
  padding: 6px 12px 5px;
  white-space: nowrap;
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 4;
}

.ltst-line-card:focus,
.ltst-line-card:focus-visible,
.ltst-line-card:focus-within {
  outline: none;
  border-color: var(--ltst-accent);
  box-shadow: 0 0 0 4px rgba(242, 193, 0, 0.2);
}

.ltst-line-card:focus-within::after {
  animation: ltst-surface-glow 1s ease;
}

.ltst-line-card:focus-within::before {
  opacity: 0;
  transform: translateY(-4px);
}

.ltst-line-label {
  color: #6c7280;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ltst-line-display {
  min-height: 72px;
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.42;
  white-space: nowrap;
  overflow: hidden;
  word-break: normal;
  color: #111827;
  font-weight: 500;
  font-family: "Georgia", "Times New Roman", serif;
  position: relative;
  isolation: isolate;
}

.ltst-line-display::before,
.ltst-line-display::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52px;
  pointer-events: none;
  z-index: 3;
}

.ltst-line-display::before {
  left: 0;
  background: linear-gradient(90deg, #ffffff 26%, rgba(255, 255, 255, 0));
}

.ltst-line-display::after {
  right: 0;
  background: linear-gradient(270deg, #ffffff 26%, rgba(255, 255, 255, 0));
}

.ltst-line-track {
  display: inline-flex;
  align-items: baseline;
  gap: 0.42em;
  white-space: nowrap;
  transform: translate3d(0, 0, 0);
  transition: none;
  will-change: transform;
  position: relative;
  z-index: 1;
}

.ltst-track-spacer {
  flex: 0 0 var(--ltst-anchor-space, 220px);
  height: 1px;
}

.ltst-word {
  display: inline-block;
  opacity: 0.96;
  color: #1f2937;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ltst-word.is-current {
  opacity: 1;
  color: #111827;
}

.ltst-word.is-upcoming {
  opacity: 0.92;
}

.ltst-word.is-typed {
  opacity: 0.45;
  color: #8c95a3;
}

.ltst-char {
  border-radius: 3px;
  transition: 0.12s ease;
}

.ltst-char.is-correct {
  color: #0f172a;
  background: rgba(34, 197, 94, 0.18);
}

.ltst-char.is-wrong {
  color: var(--ltst-danger);
  background: rgba(220, 38, 38, 0.16);
}

.ltst-char.is-extra {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(220, 38, 38, 0.55);
  text-underline-offset: 0.15em;
}

.ltst-caret-anchor {
  display: inline-block;
  width: 2px;
  height: 1.12em;
  margin: 0 -1px;
  border-radius: 2px;
  background: #2563eb;
  vertical-align: -0.16em;
  animation: ltst-caret-blink 1s step-end infinite;
}

.ltst-word.is-current .ltst-caret-anchor {
  background: #1d4ed8;
}

.ltst-stealth-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ltst-result {
  padding: 16px 18px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 16px;
  background: rgba(22, 163, 74, 0.06);
}

.ltst-result p {
  margin: 8px 0 0;
}

.ltst-share-modal-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(37, 99, 235, 0.24), transparent 55%),
    rgba(10, 14, 26, 0.66);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.ltst-share-modal-overlay.is-open {
  display: flex;
}

.ltst-share-modal-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  border-radius: 24px;
  border: 1px solid #d4dced;
  box-shadow: 0 30px 60px rgba(7, 12, 23, 0.36);
  padding: 24px 22px 20px;
  position: relative;
  overflow: hidden;
}

.ltst-share-modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 52%, #16a34a 100%);
}

.ltst-share-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid #d6def0;
  border-radius: 12px;
  background: #f1f5ff;
  color: #1e293b;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.ltst-share-badge {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f3a7a;
  background: #e6efff;
  border: 1px solid #cfe0ff;
}

.ltst-share-title {
  margin: 10px 40px 8px 0;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #0f172a;
}

.ltst-share-text {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.5;
  color: #1f2937;
}

.ltst-share-pill {
  display: inline-block;
  background: #ffe181;
  border-radius: 9px;
  padding: 2px 7px;
  font-weight: 800;
  color: #111827;
}

.ltst-share-metrics {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ltst-share-metric {
  border-radius: 14px;
  border: 1px solid #dce4f4;
  background: #ffffff;
  padding: 10px 10px;
  text-align: center;
}

.ltst-share-metric span {
  display: block;
  color: #5b6476;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.ltst-share-metric strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 1.25rem;
  line-height: 1.1;
}

.ltst-share-heading {
  margin-top: 16px;
  margin-bottom: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
}

.ltst-share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ltst-share-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(30, 64, 175, 0.2);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.ltst-share-btn:hover,
.ltst-share-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.24);
}

.ltst-share-btn:active {
  transform: translateY(0);
}

.ltst-share-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.17);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
}

.ltst-share-icon svg {
  width: 18px;
  height: 18px;
}

.ltst-share-label {
  display: inline-block;
  white-space: nowrap;
}

.ltst-share-btn.is-facebook {
  background: linear-gradient(180deg, #2774ea, #1c5dc3);
}

.ltst-share-btn.is-whatsapp {
  background: linear-gradient(180deg, #22c55e, #159447);
}

.ltst-share-btn.is-telegram {
  background: linear-gradient(180deg, #3aa9e9, #187bb7);
}

.ltst-share-btn.is-linkedin {
  background: linear-gradient(180deg, #0e88d0, #0a67a2);
}

.ltst-share-btn.is-twitter {
  background: linear-gradient(180deg, #111827, #0b0f17);
}

.ltst-share-btn.is-email {
  background: linear-gradient(180deg, #8b5cf6, #6d34ea);
}

.ltst-share-btn.is-copy {
  background: linear-gradient(180deg, #0f172a, #1e293b);
}

.ltst-share-btn.is-native {
  background: linear-gradient(180deg, #334155, #1f2937);
}

.ltst-share-note {
  margin: 10px 0 0;
  min-height: 1.2em;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 820px) {
  .ltst-shell {
    margin: 16px auto;
    padding: 16px;
    border-radius: 16px;
  }

  .ltst-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ltst-duration,
  .ltst-button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.92rem;
  }

  .ltst-line-card {
    min-height: 142px;
    padding: 38px 16px 16px;
  }

  .ltst-line-display {
    min-height: 64px;
    font-size: clamp(1.15rem, 4.9vw, 1.75rem);
    line-height: 1.46;
  }

  .ltst-line-display::before,
  .ltst-line-display::after {
    width: 32px;
  }

  .ltst-shell .ltst-stealth-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  .ltst-shell .ltst-stealth-input.ltst-mobile-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: auto;
    z-index: 2;
    border: 0 !important;
    background: transparent;
    cursor: text;
  }

  .ltst-stat {
    border-radius: 12px;
    padding: 10px;
  }

  .ltst-stat-value {
    font-size: 1.45rem;
  }

  .ltst-stat-label {
    font-size: 0.85rem;
  }
}

@media (max-width: 520px) {
  .ltst-line-card {
    min-height: 132px;
    padding: 38px 12px 12px;
  }

  .ltst-line-card::before {
    top: 8px;
    right: 8px;
    min-height: 22px;
    font-size: 0.64rem;
    padding: 4px 9px 3px;
  }

  .ltst-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ltst-duration-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ltst-duration {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.96rem;
  }

  .ltst-restart-button {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.96rem;
  }

  .ltst-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ltst-stat {
    border-radius: 12px;
    padding: 10px;
  }

  .ltst-stat:last-child {
    grid-column: 1 / -1;
  }

  .ltst-stat-value {
    font-size: 1.2rem;
  }

  .ltst-stat-label {
    font-size: 0.78rem;
  }

  .ltst-title {
    font-size: 2.1rem;
  }

  .ltst-line-label {
    font-size: 0.72rem;
  }

  .ltst-line-display {
    min-height: 54px;
    font-size: 1.08rem;
    line-height: 1.5;
  }

  .ltst-line-display::before,
  .ltst-line-display::after {
    width: 16px;
  }

  .ltst-share-title {
    font-size: 1.45rem;
    margin: 8px 34px 6px 0;
  }

  .ltst-share-text {
    font-size: 0.92rem;
    line-height: 1.42;
  }

  .ltst-share-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .ltst-share-metric {
    padding: 7px 6px;
    border-radius: 10px;
  }

  .ltst-share-metric span {
    font-size: 0.63rem;
  }

  .ltst-share-metric strong {
    font-size: 1.06rem;
  }

  .ltst-share-btn {
    min-height: 40px;
    font-size: 0.82rem;
    padding: 8px 10px;
    gap: 8px;
  }

  .ltst-share-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 6px;
  }

  .ltst-share-icon svg {
    width: 14px;
    height: 14px;
  }

  .ltst-share-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ltst-share-modal-overlay {
    align-items: flex-start;
    padding: 10px;
    overflow: auto;
  }

  .ltst-share-modal-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    overflow: auto;
    border-radius: 16px;
    padding: 16px 14px 14px;
  }

  .ltst-share-close {
    right: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 360px) {
  .ltst-share-actions {
    grid-template-columns: 1fr;
  }
}

@keyframes ltst-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ltst-surface-glow {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(110%);
  }
}

@keyframes ltst-line-done {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes ltst-caret-blink {
  0%,
  46% {
    opacity: 1;
  }
  47%,
  100% {
    opacity: 0;
  }
}

