/* === OVER OVERLAY === */
.over-overlay {
  position: fixed;
  top: 48px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9;
  background: #c45474;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.3s;
}
.over-overlay.hidden {
  display: none !important;
}
.over-content {
  max-width: 540px;
  margin: 0 auto;
  padding: 2rem 3rem 3rem;
  background: none;
  font-size: 1.05rem;
  line-height: 1.7;
  position: relative;
}
.over-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  text-transform: lowercase;
  letter-spacing: 0.01em;
}
.over-content h2.over-heading {
  font-size: 1.15rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.over-content p {
  margin: 0 0 1.2rem 0;
}
.scrubber-btn {
  z-index: 30;
  pointer-events: auto;
}
/* === YES/NO INTERACTION OVERLAY === */
.interaction-yesno .moment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 0;
}
.yesno-question {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  margin-top: 0;
  line-height: 1.2;
  word-break: break-word;
}
.yesno-buttons {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin-bottom: 0;
}
.yesno-btn {
  font-family: 'Simplistic Sans', Arial, sans-serif;
  font-weight: 700;
  border-radius: 0;
  padding: 0 32px;
  min-width: 96px;
  height: 56px;
  font-size: 1.3rem;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-sizing: border-box;
  outline: none;
}
.yes-btn {
  /* color and background set in JS */
}
.no-btn {
  /* color and border set in JS */
}
.yesno-results {
  width: 100%;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.interaction-yesno {
  left: 0;
  right: 0;
  margin: 0 auto;
  padding: 0 40px;
  max-width: 100vw;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
}

.interaction-multichoice .moment-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0;
}

.interaction-multichoice {
  left: 0;
  right: 0;
  margin: 0 auto;
  padding: 0 40px;
  max-width: 100vw;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
}

.multichoice-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.multichoice-btn {
  width: 100%;
  min-height: 56px;
  height: auto;
  padding: 12px 18px;
  text-align: left;
  line-height: 1.5;
  white-space: normal;
  font-size: 0.95rem;
}

.multichoice-results {
  margin-top: 24px;
}

.multichoice-result-group {
  margin-bottom: 24px;
}

.multichoice-result-group:last-child {
  margin-bottom: 0;
}

.multichoice-result-bar {
  min-height: 36px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: #f09142;
  white-space: nowrap;
  transition: width 0.7s cubic-bezier(.4,1.4,.6,1);
  width: 0;
  overflow: hidden;
}

.multichoice-result-label {
  margin-top: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #fff;
}

.interaction-ai-followup {
  margin-top: 12px;
  padding-top: 8px;
  color: var(--player-nav-color, #003e4c);
}

.interaction-ai-followup.hidden {
  display: none !important;
}

.interaction-ai-followup-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.interaction-ai-followup-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.interaction-ai-followup-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.interaction-ai-followup-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.9rem;
}

.interaction-ai-followup-btn {
  padding: 0.75rem 1rem;
  border-radius: 0;
  background: var(--player-nav-color, #003e4c);
  color: #fff;
  font-family: 'Simplistic Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.interaction-openquestion {
  left: 0;
  right: 0;
  margin: 0 auto;
  padding: 0 40px;
  max-width: 100vw;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
}

.interaction-openquestion .moment-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0;
}

.openquestion-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.interaction-openquestion .feedback-mode-btn {
  color: var(--openquestion-color, #003e4c);
  background: rgba(255,255,255,0.92);
  border: 2px solid var(--openquestion-color, #003e4c);
  opacity: 0.7;
}

.interaction-openquestion .feedback-mode-btn.active {
  color: #fff;
  background: var(--openquestion-color, #003e4c);
  border-color: var(--openquestion-color, #003e4c);
  opacity: 1;
}

.openquestion-textarea {
  min-height: 132px;
  color: var(--openquestion-color, #003e4c);
  background: rgba(255,255,255,0.92);
  border-color: var(--openquestion-color, #003e4c);
}

.openquestion-textarea::placeholder {
  color: var(--openquestion-color, #003e4c);
  opacity: 0.65;
}

.interaction-openquestion .feedback-send-btn {
  background: var(--openquestion-color, #003e4c);
  color: #fff;
}

.openquestion-thanks {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--openquestion-color, #003e4c);
  text-align: center;
  font-family: 'Simplistic Sans', sans-serif;
  max-width: 320px;
  margin: 0 auto;
}

.interaction-openquestion,
.interaction-openquestion .feedback-icons,
.interaction-openquestion .openquestion-form,
.interaction-openquestion .openquestion-textarea {
  color: var(--openquestion-color, #003e4c);
}
/* === FONTS === */
@font-face {
  font-family: 'Simplistic Sans';
  src: url('fonts/SimplisticSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Simplistic Sans';
  src: url('fonts/SimplisticSans-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Simplistic Sans';
  src: url('fonts/SimplisticSans-Normal.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Simplistic Sans', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #333333;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.retrees-icon-mask {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-image: url('img/icon-re-trees.svg');
  mask-image: url('img/icon-re-trees.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.tiptrees-icon-mask {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-image: url('img/icon-tip-trees.svg');
  mask-image: url('img/icon-tip-trees.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* === VIEWS === */
.view {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.view.active {
  opacity: 1;
  pointer-events: auto;
}

/* === TREES GRADIENT (3 radial layers on dark pink base) === */
.trees-gradient,
#view-loading,
#view-start {
  background: #CC3366;
  background-image:
    radial-gradient(ellipse at top left, #FFDD00 0%, transparent 55%),
    radial-gradient(ellipse at top right, #009999 0%, transparent 55%),
    radial-gradient(ellipse at center bottom, #CC3366 0%, transparent 85%);
}

/* === LOADING VIEW === */
#view-loading {
  justify-content: center;
  align-items: center;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  width: 200px;
  height: auto;
  margin-bottom: 2rem;
}

.loader {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.loader-dot {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: loader-bounce 1.2s ease-in-out infinite;
}

.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loader-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* === NAV BAR === */
.nav-bar {
  display: flex;
  align-items: center;
  padding: 0;
  height: 48px;
  position: relative;
  z-index: 10;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.nav-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex: 1;
  text-shadow: none;
}

.nav-logo {
  height: 1.2rem;
  width: auto;
  flex: 1;
}

.nav-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Hamburger menu */
.menu-btn {
  flex-direction: column;
  gap: 4px;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #003e4c;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-btn.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-btn.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Start screen: dark turquoise nav color */
#view-start .nav-bar {
  color: #003e4c;
}
#view-start .nav-title {
  color: #003e4c;
}

/* Overview screen: investigation color */
#view-overview .nav-bar {
  color: var(--investigation-color, #003e4c);
}
#view-overview .nav-title {
  color: var(--investigation-color, #003e4c);
}
#view-overview .back-btn svg {
  color: var(--investigation-color, #003e4c);
  fill: var(--investigation-color, #003e4c);
}

.back-btn svg {
  color: #003e4c;
  fill: #003e4c;
}
.player-nav .back-btn svg {
  color: var(--player-nav-color, #003e4c);
  fill: var(--player-nav-color, #003e4c);
}

/* === INVESTIGATION LIST === */
.investigation-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.investigation-tile {
  position: relative;
  padding: 2rem 1.5rem;
  cursor: pointer;
  overflow: hidden;
  min-height: 140px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.investigation-tile .tile-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.investigation-tile .tile-meta {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 0.3rem;
  position: relative;
  z-index: 1;
}

.investigation-tile .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

/* === OVERVIEW VIEW (NODE MAP) === */
#view-overview {
  background: #333333;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.node-map {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.investigation-intro {
  position: absolute;
  top: 20px;
  left: 20px;
  max-width: 340px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  z-index: 5;
}

.node-map-inner {
  position: relative;
  min-width: 100%;
  min-height: 100%;
}

.node-lines {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: visible;
}

.node-lines line {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3;
}

.node-container {
  position: relative;
}

.node-item {
  position: absolute;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease;
  overflow: visible;
}

.node-item:active {
  transform: scale(0.95);
}

.node-square {
  width: 70px;
  height: 70px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  outline: 3px solid #fff;
  outline-offset: -1px;
}

.node-square .node-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.node-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: lowercase;
  color: #fff;
  position: relative;
  z-index: 1;
}

.node-label {
  font-size: 1.22rem;
  font-weight: 500;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 180px;
}

.node-duration {
  font-size: 0.69rem;
  color: #fff;
  margin-top: 1px;
  background: transparent;
}

.node-track-label {
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: lowercase;
  padding: 2px 0;
  border-radius: 2px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  background: transparent;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 135px;
  height: 4.5em;
  margin-bottom: 4px;
  text-align: center;
  justify-content: center;
  line-height: 1.15;
  word-wrap: break-word;
  overflow: hidden;
}

/* === PLAYER VIEW === */
#view-player {
  background: #333333;
  flex-direction: column;
}

.player-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  color: var(--player-nav-color, #003e4c);
}

.player-nav .nav-title {
  color: var(--player-nav-color, #003e4c);
}

.player-nav .nav-btn {
  color: var(--player-nav-color, #003e4c);
}
.player-nav .nav-btn svg {
  fill: var(--player-nav-color, #003e4c);
}

.player-nav .info-btn svg {
  color: var(--player-nav-color, #003e4c);
  fill: var(--player-nav-color, #003e4c);
}

/* Canvas: the main visual area above the transport bar */
.player-canvas {
  position: relative;
  flex: 1;
  overflow: visible;
  cursor: pointer;
}

.player-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
  transition: width 0.2s linear;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.1);
}

.interaction-markers {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.interaction-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.7);
}

/* Interaction moment overlay (shared by image, question, input moments) */
.interaction-moment {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  cursor: pointer;
  overflow: hidden;
}

.interaction-moment.hidden {
  display: none;
}

/* Opening animation: overlay expands from line */
.interaction-moment.moment-opening {
  animation: moment-expand 0.4s ease-out forwards;
}

/* Closing animation: overlay collapses to line */
.interaction-moment.moment-closing {
  animation: moment-collapse 0.35s ease-in forwards;
}

@keyframes moment-expand {
  0% {
    width: 3px;
    padding: 0;
  }
  100% {
    left: 0;
    right: 0;
    width: 100%;
    padding: 2rem;
  }
}

@keyframes moment-collapse {
  0% {
    left: 0;
    right: 0;
    width: 100%;
    padding: 2rem;
  }
  100% {
    width: 3px;
    padding: 0;
  }
}

/* Content pop-in animation */
.interaction-moment .moment-content {
  opacity: 0;
  transform: translateY(20px);
}

.interaction-moment.moment-opening .moment-content {
  animation: content-pop-in 0.3s ease-out 0.3s forwards;
}

.interaction-moment.moment-closing .moment-content {
  animation: content-pop-out 0.15s ease-in forwards;
}

@keyframes content-pop-in {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes content-pop-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(0) scale(0);
  }
}

.interaction-image .moment-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.info-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 18;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  cursor: default;
}

.info-content {
  max-width: 520px;
  margin: 0 auto;
  padding: 60px 40px 3rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--player-nav-color, #003e4c);
}

.info-content .article-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin: 0 0 0.25rem;
}

.info-content .article-date {
  font-size: 0.8rem;
  opacity: 0.5;
  margin: 0 0 1.25rem;
}

.info-content .article-intro {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.info-content p {
  margin: 0 0 1rem;
}

.info-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-content .article-cards {
  margin: 2rem 0 1.5rem;
  border-top: 1px solid currentColor;
  padding-top: 1rem;
  opacity: 0.8;
}

.info-content .article-cards h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.info-content .article-card {
  display: block;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
}

.info-content .card-title {
  font-size: 0.85rem;
  line-height: 1.4;
}

.info-content .article-transcription {
  margin-top: 2rem;
  border-top: 1px solid currentColor;
  padding-top: 1rem;
  opacity: 0.7;
}

.info-content .article-transcription h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.info-content .article-transcription p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.info-btn.info-open svg {
  display: none;
}

.info-btn.info-open::after {
  content: '✕';
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--player-nav-color, #003e4c);
  text-shadow: 0 1px 0 #fff, 0 0 2px #fff;
  font-family: inherit;
}

/* Feedback / Input overlay */
.feedback-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: var(--player-nav-color, #003e4c);
  display: flex;
  flex-direction: column;
}

.feedback-nav {
  background: transparent;
  box-shadow: none;
  color: #fff;
}

.feedback-nav .nav-btn svg {
  fill: #fff;
  color: #fff;
}

.feedback-nav .nav-title {
  color: #fff;
  text-shadow: none;
}

.feedback-close-btn {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
}

.feedback-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 2rem;
}

.feedback-input-area {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.feedback-icons {
  display: flex;
  gap: 1.5rem;
}

.feedback-mode-btn {
  width: 56px;
  height: 56px;
  border-radius: 0;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.6;
  transition: opacity 0.2s, background 0.2s;
}

.feedback-mode-btn.active {
  opacity: 1;
  background: rgba(255,255,255,0.3);
}

.feedback-textarea {
  width: 100%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: #fff;
  font-family: 'Simplistic Sans', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem;
  resize: none;
}

.feedback-textarea::placeholder {
  color: rgba(255,255,255,0.5);
}

.feedback-send-btn {
  padding: 0.6rem 2rem;
  background: #fff;
  color: var(--player-nav-color, #003e4c);
  border-radius: 0;
  font-family: 'Simplistic Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.feedback-explainer {
  max-width: 280px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.5;
}

.recap-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 17;
  background: var(--player-nav-color, #003e4c);
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.recap-countdown-btn {
  min-width: 78px;
  padding: 0;
  color: inherit;
  font-family: 'Simplistic Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  text-align: left;
}

.recap-countdown-btn:not(.is-paused) {
  animation: recap-pulse 1.4s ease-in-out infinite;
}

.recap-countdown-btn.is-paused {
  opacity: 0.7;
  animation: none;
}

.recap-content {
  flex: 0 0 auto;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 60px 40px 40px;
}

.recap-panel-head {
  height: 0;
}

.recap-close-btn {
  color: inherit;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  position: fixed;
  top: 58px;
  right: 16px;
  z-index: 21;
  background: var(--player-nav-color, #003e4c);
}

.recap-intro {
  max-width: 32rem;
  margin-bottom: 48px;
}

.recap-hero-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 40px;
}

.recap-hero-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex-shrink: 0;
}

.recap-hero-icon {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.recap-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.recap-intro h2 {
  margin: 0 0 0.75rem;
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 700;
}

.recap-intro p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.recap-section {
  max-width: 32rem;
  margin-bottom: 48px;
}

.recap-section h3 {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.recap-chip-list,
.recap-topic-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recap-chip,
.recap-topic-btn {
  background: transparent;
  color: inherit;
  font-family: 'Simplistic Sans', sans-serif;
}

.recap-chip {
  padding: 0;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.recap-chip svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: currentColor;
}

.recap-topic-btn {
  padding: 0;
  min-height: 56px;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recap-chip-label,
.recap-topic-label {
  flex: 1;
}

.recap-chip-action,
.recap-topic-action {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--player-nav-color, #003e4c);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 400;
}

.recap-textarea {
  width: 100%;
  max-width: 32rem;
  border: 2px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: 'Simplistic Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 0.75rem;
  resize: vertical;
}

.recap-textarea::placeholder {
  color: inherit;
  opacity: 0.65;
}

.recap-ask-btn {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0;
  background: #fff;
  color: var(--player-nav-color, #003e4c);
  font-family: 'Simplistic Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.recap-dialog {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.recap-turn {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.recap-turn-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recap-turn-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recap-bubble {
  width: 80%;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.recap-turn-user {
  align-items: flex-end;
}

.recap-turn-user .recap-bubble {
  background: rgba(255, 255, 255, 0.1);
}

.recap-turn-ai {
  align-items: flex-start;
}

.recap-turn-ai .recap-bubble {
  background: transparent;
  padding-left: 0;
}

.recap-thinking {
  opacity: 0.9;
  animation: recap-pulse 1.4s ease-in-out infinite;
}

.recap-bubble.is-revealing p {
  opacity: 0;
  transform: translateY(10px);
  animation: recap-line-in 0.42s ease-out forwards;
}

.recap-sources {
  position: relative;
}

.recap-sources-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 0.45rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.recap-sources-toggle::-webkit-details-marker {
  display: none;
}

.recap-sources-list {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  width: max-content;
  max-width: 280px;
}

.recap-source-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
}

.recap-source-item:last-child {
  margin-bottom: 0;
}

.recap-source-item a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.recap-source-item span {
  opacity: 0.75;
}

@keyframes recap-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@keyframes recap-line-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrubber handle: play/pause button + timestamp, moves horizontally */

/* Scrubber handle: play/pause button + timestamp, moves horizontally */
.scrubber-handle {
  position: absolute;
  bottom: -12px;
  left: 0;
  z-index: 19;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: grab;
  touch-action: none;
}

.scrubber-btn {
  width: 56px;
  height: 56px;
  border: 3px solid #fff;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: none;
}
.scrubber-btn svg {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  fill: #fff;
}

.time-display {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 1.125rem;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  white-space: nowrap;
  margin-bottom: 4px;
  margin-left: 12px;
}

.scrubber-handle.overlay-open .time-display {
  display: none;
}


/* Remove old scrubber-btn styles (button is now fixed) */

/* Bottom transport bar */
.player-transport-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  padding: 0 0.75rem;
}

.transport-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.transport-btn#skip-back,
.transport-btn#skip-forward {
  width: 60px;
  height: 60px;
}

.transport-btn#skip-back svg,
.transport-btn#skip-forward svg {
  width: 36px;
  height: 36px;
}

.transport-btn:hover {
  opacity: 1;
}

#player-mark-btn {
  position: relative;
}

#player-feedback-btn,
#player-recap-btn {
  width: 44px;
  height: 44px;
}

.transport-tiptrees-icon,
.transport-retrees-icon {
  width: 26px;
  height: 26px;
}

#player-mark-btn.is-marked {
  opacity: 1;
}

.transport-count {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff;
  color: var(--player-nav-color, #003e4c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

/* === UTILITY === */
.hidden {
  display: none !important;
}

/* === RESPONSIVE === */

@media (min-width: 900px) {
  .node-square {
    width: 80px;
    height: 80px;
  }

  .node-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .recap-content {
    padding: 60px 40px 40px;
  }

  .recap-hero-row {
    gap: 0.85rem;
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}
