.tr-wrap {
  --tr-accent: var(--accent, #98546b);
  --tr-tint: var(--soft, #f4e9ed);
  --tr-ink: var(--text, #29262b);
  --tr-surface: var(--surface, #fff);
  --tr-line: color-mix(in srgb, currentColor 14%, transparent);
  color: var(--tr-ink);
  display: grid;
  gap: 18px;
  min-width: 0;
}
.tr-wrap h1,
.tr-wrap h2,
.tr-wrap h3,
.tr-wrap p {
  margin-top: 0;
}
.tr-wrap h2 {
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.17;
  letter-spacing: -0.045em;
  margin-bottom: 14px;
}
.tr-wrap button {
  cursor: pointer;
}
.tr-wrap .primary,
.tr-wrap .secondary,
.tr-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
}
.tr-card,
.tr-week,
.tr-resume {
  padding: clamp(18px, 3.4vw, 28px);
}
.tr-heading,
.tr-history,
.tr-player-top,
.tr-player-bottom,
.tr-player-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tr-heading h2 {
  margin: 0;
}
.tr-heading > span,
.tr-history > span {
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}
.tr-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 18px;
}
.tr-days button {
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: inherit;
  display: grid;
  justify-items: center;
  padding: 7px 0;
  gap: 5px;
}
.tr-days button small {
  font-size: 0.69rem;
  text-transform: uppercase;
}
.tr-days button strong {
  font-size: 1rem;
}
.tr-days button i {
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: transparent;
}
.tr-days button i.scheduled {
  background: #bc7e93;
}
.tr-days button i.done {
  background: #60816c;
}
.tr-days button[aria-pressed="true"] {
  background: var(--tr-accent);
  color: #fff;
}
.tr-days button[aria-pressed="true"] i.scheduled,
.tr-days button[aria-pressed="true"] i.done {
  background: #fff;
}
.tr-feature {
  display: flex;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--tr-tint);
  padding: clamp(22px, 4vw, 38px);
}
.tr-feature > div:first-child {
  position: relative;
  z-index: 1;
  max-width: 660px;
}
.tr-feature h2,
.tr-preview h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 600;
}
.tr-feature p:not(.eyebrow),
.tr-preview > p {
  line-height: 1.55;
}
.tr-feature-art {
  flex: none;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: grid;
  place-items: center;
  color: var(--tr-accent);
  opacity: 0.7;
}
.tr-meta,
.tr-meta span,
.tr-buttons,
.tr-note,
.tr-resume > div {
  display: flex;
  align-items: center;
}
.tr-meta,
.tr-buttons {
  gap: 14px;
  flex-wrap: wrap;
}
.tr-meta {
  margin-bottom: 12px;
}
.tr-meta span {
  gap: 5px;
  font-size: 0.85rem;
}
.tr-link {
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--tr-accent);
  font: inherit;
  font-size: 0.91rem;
  font-weight: 650;
  text-align: left;
  width: fit-content;
  max-width: 100%;
}
.tr-tiles,
.tr-play-buttons,
.tr-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tr-tile {
  position: relative;
  display: grid;
  justify-items: start;
  padding: 20px;
  gap: 5px;
  text-align: left;
  color: inherit;
  min-width: 0;
}
.tr-tile strong {
  font-size: 1.08rem;
}
.tr-tile small,
.tr-history small,
.tr-phase small,
.tr-stats small,
.tr-next {
  opacity: 0.77;
}
.tr-tile > svg {
  position: absolute;
  right: 16px;
  top: 22px;
}
.tr-tile-icon {
  display: grid;
  place-items: center;
  background: var(--tr-tint);
  color: var(--tr-accent);
  width: 40px;
  height: 40px;
  border-radius: 13px;
  margin-bottom: 7px;
}
.tr-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.tr-form > label {
  display: grid;
  flex: 1 1 145px;
  gap: 7px;
  min-width: 0;
  font-size: 0.89rem;
  font-weight: 600;
}
.tr-form select,
.tr-form input {
  font: inherit;
  font-size: 16px;
  max-width: 100%;
  width: 100%;
  min-height: 44px;
  color: inherit;
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: 11px;
  padding: 8px 10px;
}
.tr-form > button {
  flex: 0 1 auto;
}
.tr-fold {
  border-bottom: 1px solid var(--tr-line);
}
.tr-fold summary {
  min-height: 48px;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.tr-fold summary::-webkit-details-marker {
  display: none;
}
.tr-fold summary small {
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.75;
}
.tr-fold[open] summary {
  color: var(--tr-accent);
}
.tr-fold[open] summary > svg {
  transform: rotate(90deg);
}
.tr-phase {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 2px;
  font-size: 0.81rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tr-accent);
}
.tr-phase small {
  font-weight: 500;
}
.tr-detail {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) 1.2fr;
  gap: 16px;
  align-items: start;
  margin: 10px 0 20px;
}
.tr-board,
.tr-player-board {
  background: #f1ebe5;
  color: #715c5c;
  border-radius: 16px;
  overflow: hidden;
}
.tr-demo {
  display: block;
  width: 100%;
  height: auto;
}
.tr-instructions p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.46;
}
.tr-instructions b {
  display: block;
  font-size: 0.79rem;
  margin-bottom: 2px;
}
.tr-note {
  align-items: flex-start;
  gap: 9px;
  line-height: 1.5;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--tr-tint);
  color: var(--tr-ink);
}
.tr-note svg {
  flex: none;
  margin-top: 2px;
}
.tr-source {
  color: var(--tr-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.8rem;
}
.tr-footnote {
  font-size: 0.82rem;
  line-height: 1.5;
}
.tr-history {
  padding: 14px 0;
  border-bottom: 1px solid var(--tr-line);
}
.tr-history:last-child {
  border: 0;
}
.tr-history small,
.tr-history b {
  display: block;
}
.tr-history small {
  margin-top: 4px;
  font-size: 0.77rem;
}
.tr-resume > div {
  gap: 8px;
}
.tr-resume p {
  margin: 9px 0 12px;
}
.tr-playing .tr-wrap {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: auto;
  overscroll-behavior: contain;
  display: block;
  background: var(--bg, #faf8f6);
  padding: max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}
.tr-player,
.tr-feedback {
  max-width: 640px;
  width: 100%;
  margin: auto;
}
.tr-player h1 {
  font-size: clamp(25px, 5.4vw, 43px);
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0.3em 0 0.5em;
}
.tr-player > .eyebrow {
  margin: 14px 0 4px;
}
.tr-player-board {
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(110px, 24dvh, 225px);
  margin: 12px 0;
}
.tr-player-board svg.tr-demo {
  width: auto;
  height: 100%;
  max-width: 100%;
}
.tr-player-count > strong {
  font-size: clamp(36px, 8vw, 60px);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
}
.tr-player-count > span {
  font-size: 0.94rem;
  color: var(--tr-accent);
  font-weight: 650;
}
.tr-player progress {
  display: block;
  height: 6px;
  width: 100%;
  border: 0;
  appearance: none;
  border-radius: 20px;
  overflow: hidden;
  margin: 7px 0 14px;
  background: var(--tr-tint);
  accent-color: var(--tr-accent);
}
.tr-player progress::-webkit-progress-bar {
  background: var(--tr-tint);
}
.tr-player progress::-webkit-progress-value {
  background: var(--tr-accent);
  border-radius: 20px;
}
.tr-player progress::-moz-progress-bar {
  background: var(--tr-accent);
}
.tr-next {
  font-size: 0.85rem;
}
.tr-cue {
  font-size: 0.95rem;
  line-height: 1.45;
}
.tr-play-buttons {
  margin: 16px 0 8px;
}
.tr-player-bottom {
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.tr-feedback .tr-form {
  display: grid;
  margin-top: 20px;
}
.tr-feedback .tr-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tr-line);
}
.tr-complete {
  width: min(100%, 660px);
  margin: 12px auto;
  text-align: center;
  padding: clamp(24px, 5vw, 46px);
}
.tr-medal {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #476e56;
  background: #e4efe6;
  animation: tr-arrive 0.45s ease-out both;
}
.tr-stats {
  margin: 20px 0;
}
.tr-stats b,
.tr-stats small {
  display: block;
}
.tr-stats b {
  font-size: 2rem;
  letter-spacing: -0.06em;
}
.tr-stats small {
  font-size: 0.82rem;
}
@keyframes tr-arrive {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 580px) {
  .tr-wrap {
    gap: 13px;
  }
  .tr-detail {
    grid-template-columns: 1fr;
  }
  .tr-demo {
    max-height: 145px;
  }
  .tr-feature-art {
    display: none;
  }
  .tr-form {
    display: grid;
  }
  .tr-tiles {
    gap: 9px;
  }
  .tr-tile {
    padding: 15px;
  }
  .tr-tile small {
    font-size: 0.74rem;
  }
  .tr-tile > svg {
    right: 9px;
    top: 16px;
  }
  .tr-days {
    gap: 1px;
  }
  .tr-player-board svg.tr-demo {
    max-height: none;
  }
  .tr-week {
    padding: 16px;
  }
  .tr-player-bottom .tr-link {
    font-size: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tr-medal {
    animation: none;
  }
}
[data-theme="dark"] .tr-wrap {
  --tr-tint: #44343d;
  --tr-ink: #f1eaee;
  --tr-surface: #28252a;
  --tr-accent: #dda8ba;
}
[data-theme="dark"] .tr-board,
[data-theme="dark"] .tr-player-board {
  background: #dcd1c8;
}
body.tr-playing {
  overflow: hidden;
}
.tr-playing .app-top,
.tr-playing .bottom-nav {
  display: none;
}
.tr-playing .screen {
  animation: none;
}
.tr-playing .toast {
  z-index: 11000;
}
.tr-days button[aria-pressed="true"] {
  background: #87465c;
}
.tr-card > .tr-note,
.tr-preview > .tr-note,
.tr-feature p:not(.eyebrow),
.tr-complete > .tr-note {
  margin-bottom: 14px;
}
