﻿.result-panel {
  text-align: center;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.result-breakdown-box {
  margin: 0 auto 26px;
  width: min(100%, 760px);
  padding: 20px;
  border-radius: 26px;
  text-align: left;
  border: 1px solid rgba(96, 74, 59, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 245, 239, 0.96));
  box-shadow: 0 14px 28px rgba(61, 44, 33, 0.06);
}

.result-breakdown-title {
  margin: 0 0 14px;
  font-weight: 800;
  color: var(--text);
}

.result-mistake-list {
  display: grid;
  gap: 12px;
}

.result-mistake-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(96, 74, 59, 0.1);
  box-shadow: 0 10px 20px rgba(61, 44, 33, 0.05);
}

.result-mistake-header {
  margin-bottom: 12px;
}

.result-mistake-question {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
}

.result-mistake-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.result-mistake-answer {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
}

.result-mistake-answer + .result-mistake-answer {
  margin-top: 8px;
}

.result-mistake-answer-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.result-mistake-answer-value {
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.result-mistake-answer-wrong {
  background: rgba(243, 88, 88, 0.08);
}

.result-mistake-answer-wrong .result-mistake-answer-label,
.result-mistake-answer-wrong .result-mistake-answer-value {
  color: #b74141;
}

.result-mistake-answer-correct {
  background: rgba(60, 170, 105, 0.1);
}

.result-mistake-answer-correct .result-mistake-answer-label,
.result-mistake-answer-correct .result-mistake-answer-value {
  color: #2f8b55;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
}

.story-sidebar,
.story-detail,
.cinema-panel {
  background:
    radial-gradient(circle at top right, rgba(247, 216, 183, 0.5), transparent 26%),
    radial-gradient(circle at bottom left, rgba(239, 199, 214, 0.2), transparent 22%),
    var(--panel-warm);
}

.cinema-panel {
  position: relative;
  z-index: 3;
  overflow: visible;
}

.cinema-controls {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.cinema-search-field {
  grid-column: 1 / -1;
  width: 100%;
}

.cinema-genre-field,
.cinema-grid-field {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-width: 0;
  align-items: center;
  flex-wrap: nowrap;
}

.cinema-grid-label {
  padding-top: 0;
}

.cinema-genre-dropdown {
  flex: 1 1 auto;
}

.cinema-genre-field {
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.cinema-grid-field {
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-weight: 700;
  align-items: center;
}

.cinema-grid-label {
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1;
}

.cinema-grid-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 0 0 auto;
  width: max-content;
  margin-left: auto;
}

.cinema-grid-button {
  width: 42px;
  min-width: 42px;
  height: 32px;
  justify-content: center;
  padding: 0;
  font-weight: 800;
  font-size: 0.8rem;
  flex: 0 0 42px;
}

.discover-panel {
  background:
    radial-gradient(circle at top right, rgba(240, 179, 107, 0.42), transparent 24%),
    radial-gradient(circle at bottom left, rgba(247, 216, 183, 0.28), transparent 22%),
    var(--panel-warm);
}

.discover-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.discover-card {
  min-height: 210px;
  justify-content: flex-start;
}

.discover-card .choice-badge {
  width: 58px;
  height: 58px;
  font-size: 1.5rem;
}

.culture-panel {
  background:
    radial-gradient(circle at top right, rgba(239, 199, 214, 0.34), transparent 24%),
    radial-gradient(circle at bottom left, rgba(240, 179, 107, 0.28), transparent 22%),
    var(--panel-warm);
}

.culture-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.culture-mode-card {
  min-height: 200px;
}

.culture-section {
  margin-top: 26px;
  position: relative;
  z-index: 1;
}

.culture-section-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.culture-stage {
  width: min(840px, 100%);
}

.culture-question-card {
  width: 100%;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.culture-question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.culture-meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(240, 179, 107, 0.14);
  color: #7d5133;
  font-size: 0.88rem;
  font-weight: 700;
}

.culture-question-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-family: "Manrope", sans-serif;
  text-transform: none;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.culture-question-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.culture-feedback-card {
  margin-top: 18px;
  padding: 18px 18px 14px;
  border-radius: 24px;
  background: rgba(246, 241, 235, 0.9);
  border: 1px solid rgba(96, 74, 59, 0.1);
}

.culture-explanation,
.culture-anecdote,
.culture-result-summary {
  color: var(--muted);
  line-height: 1.7;
}

.culture-anecdote {
  margin: 10px 0 0;
  font-weight: 700;
}

.story-actor-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.story-actor-button {
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.story-actor-button:hover,
.info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--lift-shadow);
}

.story-actor-button.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf3;
  border-color: transparent;
}

.story-controls {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.story-search-field {
  width: 100%;
  max-width: 720px;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field-label {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

.search-field-row {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(61, 44, 33, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.search-field-row:focus-within {
  border-color: rgba(234, 153, 97, 0.65);
  box-shadow: 0 14px 28px rgba(61, 44, 33, 0.1), 0 0 0 3px rgba(240, 179, 107, 0.14);
}

.search-field-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 15px 18px;
  outline: none;
}

.search-field-input::placeholder {
  color: rgba(118, 102, 93, 0.78);
}

.search-field-action {
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-deep));
  color: #fff;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.search-field-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cinema-controls {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.cinema-view-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cinema-view-row .count-pill {
  flex: 1 1 170px;
}

.cinema-genre-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-weight: 700;
  flex-wrap: wrap;
}

.cinema-genre-label {
  white-space: nowrap;
  padding-top: 11px;
}

.cinema-genre-dropdown {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
  z-index: 5;
}

.cinema-genre-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(61, 44, 33, 0.06);
}

.cinema-genre-toggle::-webkit-details-marker {
  display: none;
}

.cinema-genre-toggle-icon {
  transition: transform 180ms ease;
}

.cinema-genre-dropdown[open] .cinema-genre-toggle-icon {
  transform: rotate(180deg);
}

.cinema-genre-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 48px rgba(61, 44, 33, 0.14);
  max-height: min(320px, 52vh);
  overflow: auto;
}

.cinema-genre-option {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cinema-genre-option:hover,
.cinema-genre-option:focus-visible {
  background: rgba(241, 147, 76, 0.12);
  outline: none;
}

.cinema-genre-option.is-selected {
  background: linear-gradient(135deg, rgba(241, 147, 76, 0.98), rgba(234, 153, 97, 0.92));
  color: #fffaf3;
}

.story-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.story-filter-row .count-pill {
  flex: 1 1 140px;
}

.story-filter-row .count-pill.is-selected {
  background: linear-gradient(135deg, rgba(241, 147, 76, 0.98), rgba(234, 153, 97, 0.92));
  color: #fffaf3;
  border-color: transparent;
}

.story-hero {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.story-image-frame {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, rgba(240, 179, 107, 0.22), rgba(255, 255, 255, 0.8));
}

.story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-text {
  margin: 24px 0 0;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  line-height: 1.85;
  color: var(--text);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

.profile-stepper-card {
  margin-top: 18px;
}

.profile-identity-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr);
  gap: 16px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

.profile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-header-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin: -4px 0 12px;
  flex-wrap: wrap;
}

.profile-header-row .eyebrow {
  margin: 0;
}

.profile-header-row .profile-auth-button {
  margin-left: auto;
}

.profile-identity-card,
.profile-avatar-picker {
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px rgba(61, 44, 33, 0.08);
}

.profile-identity-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.profile-avatar-large-frame {
  width: 136px;
  height: 136px;
  padding: 6px;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(240, 179, 107, 0.9), rgba(234, 153, 97, 0.78));
  box-shadow: 0 18px 30px rgba(234, 153, 97, 0.2);
}

.profile-avatar-large {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  object-fit: cover;
  display: block;
}

.profile-name-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-identity-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-left: 0;
  justify-content: center;
  text-align: center;
}

.profile-auth-button {
  align-self: center;
  min-width: 188px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #77b5ff, #4d90ff);
  color: #fff;
  border: 1px solid rgba(77, 144, 255, 0.32);
  justify-content: center;
}

.profile-auth-button:hover,
.profile-auth-button:focus-visible {
  background: linear-gradient(135deg, #65a7ff, #3f82f7);
  color: #fff;
  box-shadow: 0 18px 32px rgba(77, 144, 255, 0.26);
}

.profile-header-row .profile-auth-button {
  min-width: 188px;
  padding: 12px 18px;
  font-size: 0.95rem;
}

.profile-field-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.profile-level-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 22px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 247, 237, 0.98), rgba(255, 235, 214, 0.92));
  border: 3px solid rgba(96, 74, 59, 0.38);
  text-align: center;
}

.profile-level-card-action {
  width: 100%;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.profile-level-card-action:hover,
.profile-level-card-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(61, 44, 33, 0.1);
  outline: none;
}

.profile-level-card-action .profile-stage-badge {
  margin-inline: auto;
}

.profile-level-card-action .profile-stage-badge {
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid rgba(217, 122, 52, 0.18);
  box-shadow: 0 10px 20px rgba(61, 44, 33, 0.05);
}

.profile-display-name {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
}

.profile-name-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.profile-name-input:focus {
  outline: none;
  border-color: rgba(234, 153, 97, 0.6);
  box-shadow: 0 0 0 4px rgba(240, 179, 107, 0.18);
}

.profile-save-button {
  align-self: center;
}

.profile-avatar-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.profile-avatar-option {
  position: relative;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(61, 44, 33, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.profile-avatar-option img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border-radius: 16px;
  object-fit: cover;
}

.profile-avatar-option-lock {
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  gap: 6px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(28, 19, 13, 0.44), rgba(94, 63, 39, 0.36));
  color: #fffaf3;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.profile-avatar-option-lock-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1.2rem;
}

.profile-avatar-option-lock-copy {
  max-width: 100%;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.profile-avatar-option.is-locked img {
  filter: grayscale(1) saturate(0.35) brightness(0.78);
  opacity: 0.42;
}

.profile-avatar-option.is-locked .profile-avatar-option-lock {
  opacity: 1;
}

.profile-avatar-option:disabled {
  opacity: 1;
}

.profile-avatar-option.is-selected {
  border-color: transparent;
  background: linear-gradient(145deg, rgba(240, 179, 107, 0.95), rgba(234, 153, 97, 0.9));
  box-shadow: 0 18px 30px rgba(234, 153, 97, 0.22);
}

.profile-avatar-option.is-locked.is-selected {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 22px rgba(61, 44, 33, 0.08);
}

.profile-level-card,
.profile-progress-card,
.profile-knowledge-panel {
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 38px rgba(61, 44, 33, 0.08);
}

.profile-level-card,
.profile-progress-card {
  padding: 26px;
  background: rgba(255, 255, 255, 0.92);
}

.profile-level-card {
  background: linear-gradient(145deg, rgba(255, 247, 237, 0.98), rgba(255, 235, 214, 0.92));
}

.profile-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-level-card strong,
.profile-progress-head strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 0.98;
}

.profile-stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(234, 153, 97, 0.14);
  color: var(--accent-deep);
  font-weight: 800;
}

.profile-support-copy {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.profile-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.profile-progress-head strong {
  margin-top: 0;
  font-size: 1.32rem;
  text-align: right;
  letter-spacing: -0.02em;
}

.profile-progress-track {
  width: 100%;
  height: 18px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(96, 74, 59, 0.1);
  overflow: hidden;
}

.profile-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.2),
    0 6px 16px rgba(234, 153, 97, 0.18);
  transition: width 3600ms linear;
  position: relative;
  transform-origin: left center;
}

.profile-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 237, 180, 0.78) 45%, transparent 70%);
  transform: translateX(-120%);
  opacity: 0;
}

.profile-progress-card.is-level-up,
.profile-level-card.is-level-up {
  animation: screenRise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-progress-card.is-level-up .profile-progress-fill::after {
  opacity: 1;
  animation: progressSweep 3600ms linear;
}

.profile-progress-card.is-level-up .profile-progress-fill {
  animation: progressPulse 3600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-progress-card.is-progress-up .profile-progress-fill {
  animation: progressPulse 3600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-progress-card.is-progress-up .profile-progress-fill::after {
  opacity: 1;
  animation: progressSweep 3600ms linear;
}

.profile-stat-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(61, 44, 33, 0.08);
}

.profile-stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.6rem;
}

.profile-stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.profile-stat-card-highlight {
  background: linear-gradient(145deg, rgba(255, 247, 237, 0.98), rgba(255, 238, 221, 0.92));
}

.profile-knowledge-panel {
  margin-top: 28px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.92);
}

.profile-collection-panel {
  display: grid;
  gap: 18px;
}

.profile-collection-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.profile-collection-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(234, 153, 97, 0.14);
  color: var(--accent-deep);
  font-weight: 800;
  line-height: 1;
}

.profile-collection-pill-soft {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border: 1px solid rgba(96, 74, 59, 0.08);
}

.profile-collection-count {
  margin-left: auto;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
}

.profile-collection-grid .profile-collection-card {
  cursor: pointer;
}

.profile-collection-card .library-card-image-frame {
  position: relative;
}

.profile-collection-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(96, 74, 59, 0.08);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(61, 44, 33, 0.08);
}

.profile-collection-card-badge-known {
  background: rgba(88, 192, 138, 0.16);
  color: #2d7b50;
}

.profile-collection-card-badge-learning {
  background: rgba(148, 124, 255, 0.16);
  color: #6757ce;
}

.profile-collection-card-badge-unknown {
  background: rgba(255, 200, 126, 0.2);
  color: #bb7432;
}

.profile-collection-card .info-card-action {
  margin-top: auto;
  align-self: flex-start;
}

.profile-detail-panel {
  margin-top: 28px;
  padding: 26px;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px rgba(61, 44, 33, 0.08);
  display: grid;
  gap: 12px;
}

.profile-panel-head {
  display: grid;
  gap: 4px;
}

.profile-knowledge-panel .profile-panel-head {
  margin-bottom: 16px;
}

.profile-panel-head h3 {
  margin: 0;
}

.profile-detail-panel .profile-support-copy {
  margin: 0;
  max-width: 58ch;
}

.profile-knowledge-modes {
  display: grid;
  gap: 18px;
}

.profile-mode-panel {
  display: grid;
  gap: 14px;
}

.profile-mode-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  align-items: center;
}

.profile-mode-head .profile-support-copy {
  margin: 0;
}

.profile-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(234, 153, 97, 0.12);
  color: var(--accent-deep);
  font-weight: 800;
  white-space: nowrap;
  line-height: 1;
}

.profile-grid-knowledge {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
  gap: 12px;
}

.profile-grid-knowledge .profile-stat-card {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.profile-grid-knowledge .profile-stat-card strong {
  margin-top: 6px;
  min-height: 1.1em;
  line-height: 1;
}

.profile-stat-card-link {
  cursor: pointer;
}

.profile-stat-card-link:hover,
.profile-stat-card-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(61, 44, 33, 0.1);
  outline: none;
}

.profile-grid-knowledge .profile-stat-label {
  font-size: 0.84rem;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.profile-levels-panel {
  display: grid;
  gap: 18px;
}

.knowledge-journey-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
}

.knowledge-journey-summary-copy,
.knowledge-journey-current-tier {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(61, 44, 33, 0.06);
}

.knowledge-journey-summary-copy strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.knowledge-journey-current-tier {
  display: grid;
  gap: 12px;
}

.knowledge-journey-current-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(234, 153, 97, 0.14);
  color: var(--accent-deep);
  font-weight: 800;
}

.knowledge-journey-current-range {
  color: var(--muted);
}

.knowledge-journey-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(240, 179, 107, 0.16);
  border: 1px solid rgba(240, 179, 107, 0.22);
}

.knowledge-journey-track-fill {
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4b35b 0%, #f19b43 55%, #e67b2f 100%);
}

.knowledge-journey-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.knowledge-tier-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(61, 44, 33, 0.06);
  display: grid;
  gap: 8px;
}

.knowledge-tier-card strong {
  font-size: 1.08rem;
}

.knowledge-tier-range,
.knowledge-tier-status {
  color: var(--muted);
}

.knowledge-tier-copy {
  color: var(--muted);
  line-height: 1.65;
}

.knowledge-tier-card.is-complete {
  border-color: rgba(80, 143, 98, 0.18);
  background: var(--success-panel);
}

.knowledge-tier-card.is-current {
  border-color: rgba(234, 153, 97, 0.28);
  background: rgba(255, 247, 237, 0.98);
}

.knowledge-tier-card.is-upcoming {
  opacity: 0.9;
}

.knowledge-tier-card.is-current .knowledge-tier-status {
  color: var(--accent-deep);
  font-weight: 800;
}

.stats-table-panel {
  margin-top: 28px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 38px rgba(61, 44, 33, 0.08);
}

.stats-table-wrap {
  overflow-x: auto;
  border-radius: 20px;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.stats-table th,
.stats-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(96, 74, 59, 0.08);
  text-align: left;
}

.stats-table thead tr:first-child th {
  font-size: 0.92rem;
  color: var(--muted);
}

.stats-table thead tr:last-child th {
  font-weight: 800;
}

.stats-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.stats-table th.sortable:hover {
  color: var(--accent-deep);
}

.stats-table th.sortable::after {
  content: "^";
  margin-left: 6px;
  font-size: 0.7rem;
  opacity: 0.7;
}

.stats-table th.sortable.is-ascending::after {
  content: "^";
  font-size: 0.6rem;
  opacity: 1;
  transform: translateY(-1px);
}

.stats-table th.sortable.is-descending::after {
  content: "v";
  font-size: 0.6rem;
  opacity: 1;
  transform: translateY(1px);
}

.stats-table td {
  color: var(--text);
  transition: background 180ms ease;
}

.stats-cell-actor {
  font-weight: 700;
  white-space: nowrap;
}

.stats-cell-group-end {
  border-right: 2px solid rgba(234, 153, 97, 0.18);
}

.stats-table tbody tr {
  transition: background 180ms ease;
}

.stats-table tbody tr:hover td {
  background: rgba(240, 179, 107, 0.08);
}

.stats-table tbody tr:last-child td {
  border-bottom: none;
}

.stats-table tbody tr:nth-child(odd) td {
  background: rgba(255, 255, 255, 0.5);
}

.stats-table tbody tr:nth-child(even) td {
  background: rgba(255, 250, 245, 0.65);
}

.detail-panel {
  padding: 32px;
  background:
    radial-gradient(circle at top right, rgba(247, 216, 183, 0.48), transparent 24%),
    radial-gradient(circle at bottom left, rgba(239, 199, 214, 0.18), transparent 20%),
    var(--panel-warm);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.detail-actions {
  margin-top: 22px;
}

.detail-sections {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.detail-block {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.detail-block h3 {
  margin-bottom: 12px;
}

.detail-text {
  margin: 0;
  line-height: 1.8;
  color: var(--text);
}

.next-button {
  min-width: 220px;
}

.cinema-toggle {
  margin-top: 28px;
}

.choice-card.is-active-toggle {
  border-color: transparent;
  background: linear-gradient(145deg, rgba(240, 179, 107, 0.95), rgba(234, 153, 97, 0.9));
  color: #fffaf3;
}

.choice-card.is-active-toggle .choice-title,
.choice-card.is-active-toggle .choice-copy {
  color: #fffaf3;
}

.choice-card.is-active-toggle .choice-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #fffaf3;
}

.profile-stat-card-success {
  background: linear-gradient(145deg, rgba(232, 249, 237, 0.98), rgba(214, 242, 224, 0.92));
}

.profile-stat-card-learning {
  background: linear-gradient(145deg, rgba(242, 237, 255, 0.98), rgba(225, 217, 247, 0.92));
}

.profile-stat-card-warning {
  background: linear-gradient(145deg, rgba(255, 246, 230, 0.98), rgba(255, 235, 206, 0.92));
}

.progression-panel {
  gap: 22px;
}

.progression-header {
  text-align: center;
}

.progression-header .eyebrow {
  margin-inline: auto;
  font-size: 1rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}

.progression-header h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.progression-card {
  display: grid;
  gap: 18px;
}

.progression-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.progression-current-card,
.progression-track-card {
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px rgba(61, 44, 33, 0.08);
}

.progression-current-card {
  display: grid;
  align-content: start;
  background:
    radial-gradient(circle at top right, rgba(240, 179, 107, 0.24), transparent 28%),
    radial-gradient(circle at bottom left, rgba(239, 199, 214, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.99), rgba(255, 246, 236, 0.95));
  position: relative;
  overflow: hidden;
}

.progression-current-card::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 26px;
  bottom: 15px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(234, 153, 97, 0.88), rgba(240, 179, 107, 0.18));
  opacity: 0.72;
}

.progression-track-card {
  display: grid;
  gap: 40px;
}

.profile-stepper-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px rgba(61, 44, 33, 0.08);
}

.profile-stepper-card::before,
.profile-stepper-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.profile-stepper-card::before {
  background: radial-gradient(circle at top center, rgba(240, 179, 107, 0.18), transparent 42%);
  transform: scale(0.96);
}

.profile-stepper-card::after {
  background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.34) 50%, transparent 82%);
  transform: translateX(-58%) skewX(-12deg);
}

.profile-stepper-card.is-progress-up::before {
  animation: progressionBloom 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-stepper-card.is-progress-up::after {
  animation: progressionSweep 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.progression-stepper-shell {
  display: grid;
  gap: 18px;
}

.progression-stepper {
  --progression-step-columns: 6;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--progression-step-columns), minmax(0, 1fr));
  gap: 0;
  padding: 10px 12px 4px;
}

.progression-stepper::before,
.progression-stepper-fill {
  content: "";
  position: absolute;
  left: 36px;
  right: 36px;
  top: 46px;
  height: 6px;
  border-radius: 999px;
  background: rgba(96, 74, 59, 0.12);
  z-index: 0;
}

.progression-stepper-fill {
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 0 1px rgba(234, 153, 97, 0.14);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.progression-stepper-nodes {
  position: relative;
  grid-column: 1 / -1;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--progression-step-columns), minmax(0, 1fr));
  gap: 4px;
  padding-inline: 4px;
}

.progression-node {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-height: 124px;
  text-align: center;
  min-width: 0;
  padding-inline: 0;
  animation: progressionNodeRise 640ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--progression-node-delay, 0ms);
}

.progression-node-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid rgba(234, 153, 97, 0.95);
  background: #fffaf4;
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: 0 14px 26px rgba(61, 44, 33, 0.08);
}

.progression-node--completed .progression-node-badge {
  background: #fff7ef;
  color: var(--muted);
  border-color: rgba(208, 201, 194, 0.9);
}

.progression-node--current .progression-node-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf3;
  border-color: transparent;
  box-shadow: 0 16px 28px rgba(234, 153, 97, 0.28);
  animation: progressionNodePulse 2.2s ease-in-out infinite;
}

.progression-node--locked .progression-node-badge {
  border-color: rgba(208, 201, 194, 0.9);
  background: #fff;
  color: #8f8a85;
  box-shadow: none;
}

.progression-node-copy {
  display: grid;
  gap: 2px;
  text-align: center;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.progression-node-copy strong {
  font-size: 0.9rem;
  font-weight: 800;
}

.progression-node-copy span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.progression-node--current .progression-node-copy strong,
.progression-node--current .progression-node-copy span {
  color: var(--accent-strong);
}

.progression-node--current .progression-node-copy strong {
  animation: progressionCurrentLabelGlow 2.2s ease-in-out infinite;
}

.progression-node--locked .progression-node-copy strong,
.progression-node--locked .progression-node-copy span {
  color: var(--muted);
}

.progression-node--completed .progression-node-copy strong,
.progression-node--completed .progression-node-copy span {
  color: var(--muted);
}

.progression-stepper-labels {
  display: none;
}

.progression-stepper-label--current strong {
  color: var(--accent-strong);
}

.progression-stepper-label--locked strong {
  color: var(--muted);
}

.progression-stepper-label--completed strong {
  color: var(--muted);
}

.progression-current-tier {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 0.64em;
  line-height: 1;
  position: relative;
  top: 0.08em;
}

.progression-current-copy {
  display: grid;
  gap: 10px;
  width: 100%;
}

.progression-current-copy strong {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.progression-current-level {
  color: var(--accent-strong);
  display: block;
  font-size: clamp(1.24rem, 2vw, 1.58rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progression-current-title {
  display: block;
  color: var(--text);
  max-width: none;
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.progression-current-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: none;
  width: 100%;
}

.progression-xp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
}

.progression-xp-head-main {
  display: grid;
  gap: 6px;
}

.progression-xp-head-main .profile-kicker {
  margin: 0;
}

.progression-xp-head-main strong {
  font-size: 1.2rem;
  line-height: 1.1;
}

.progression-xp-percent {
  flex: 0 0 auto;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.progression-xp-block {
  display: grid;
  gap: 22px;
}

.progression-xp-bar {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: rgba(96, 74, 59, 0.1);
  overflow: hidden;
}

.progression-xp-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 0 1px rgba(234, 153, 97, 0.12);
  transition: width 3600ms linear;
  position: relative;
}

.progression-xp-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.34) 45%, transparent 70%);
  transform: translateX(-120%);
  opacity: 0;
}

.profile-progress-card.is-progress-up {
  animation: progressionCardLift 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-progress-card.is-progress-up .progression-xp-fill {
  animation: progressPulse 3600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-progress-card.is-progress-up .progression-xp-fill::after {
  opacity: 1;
  animation: progressSweep 3600ms linear;
}

@keyframes progressPulse {
  0% {
    transform: scaleX(0.02);
    filter: saturate(0.95) brightness(0.98);
  }
  55% {
    transform: scaleX(1.03);
    filter: saturate(1.08) brightness(1.03);
  }
  72% {
    transform: scaleX(0.988);
    filter: saturate(1.12) brightness(1.05);
  }
  86% {
    transform: scaleX(1.008);
    filter: saturate(1.1) brightness(1.04);
  }
  100% {
    transform: scaleX(1);
    filter: saturate(1) brightness(1);
  }
}

@keyframes progressSweep {
  0% {
    opacity: 0;
    transform: translateX(-120%) skewX(-12deg);
  }
  8% {
    opacity: 0.15;
  }
  22% {
    opacity: 0.9;
  }
  58% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translateX(120%) skewX(-12deg);
  }
}

@keyframes progressionNodeRise {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    filter: blur(1px);
  }
  60% {
    opacity: 1;
    transform: translateY(-1px) scale(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes progressionNodePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 16px 28px rgba(234, 153, 97, 0.28);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 20px 34px rgba(234, 153, 97, 0.36);
  }
}

@keyframes progressionCurrentLabelGlow {
  0%, 100% {
    color: var(--accent-strong);
  }
  50% {
    color: var(--accent-deep);
  }
}

@keyframes progressionBloom {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  45% {
    opacity: 1;
    transform: scale(1.01);
  }
  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

@keyframes progressionCardLift {
  0% {
    transform: translateY(8px);
    box-shadow: 0 14px 28px rgba(61, 44, 33, 0.08);
  }
  45% {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(234, 153, 97, 0.16);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 18px 38px rgba(61, 44, 33, 0.08);
  }
}

.quiz-score-card-correct {
  background: var(--success-panel);
  color: var(--success-text);
}

.quiz-score-card-wrong {
  background: var(--danger-panel);
  color: var(--danger-text);
}

.culture-score-card {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 14px 28px rgba(61, 44, 33, 0.08);
}

.culture-score-card span,
.culture-score-card strong {
  color: var(--text);
}

#screen-culture-play .quiz-live-stats {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#screen-online-challenge-play .quiz-live-stats {
  width: min(100%, 720px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

#screen-culture-play .quiz-live-pill {
  min-width: 0;
}

#screen-culture-play .culture-timer-bar {
  margin-top: -2px;
}

.stats-group-header {
  text-align: center;
  font-weight: 800;
  color: var(--accent-strong);
}

.stats-group-split {
  border-right: 2px solid rgba(234, 153, 97, 0.28) !important;
}

.stats-subhead-spacer {
  background: rgba(244, 241, 236, 0.85);
}
