.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.player-hero,
.task-card,
.finish-card {
  position: relative;
  overflow: hidden;
  border-color: #cdddF3;
}

.player-hero::after,
.task-card::after,
.finish-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 111, 217, 0.16) 0%, rgba(30, 111, 217, 0) 70%);
  right: -60px;
  top: -60px;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #17406d;
  background: #e5f1ff;
  margin: 0 0 10px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin: 20px 0;
}

.form {
  display: grid;
  gap: var(--space-2);
}

.helper-line {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #f3f8ff;
  border: 1px solid #d7e6fb;
  color: #21466f;
}

.helper-text {
  margin: 0;
  color: #3a5f84;
  font-size: 0.92rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

.start-screen {
  max-width: 520px;
  margin: 0 auto;
}

.finish-screen {
  padding-top: 4px;
}

.finish-celebration-badge {
  margin: 2px auto 10px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e7f4ff;
  border: 1px solid #c3dcf7;
  color: #1f4f82;
  font-weight: 700;
}

.start-screen--auth-landing {
  min-height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.start-brand {
  margin: 4px 0 14px;
  text-align: center;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #78b6ff;
  text-shadow: 0 1px 0 #ffffff, 0 0 16px rgba(120, 182, 255, 0.25);
}

.start-stats-card {
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #6e9fe3, #59a6df);
  color: #f4f8ff;
  margin-bottom: 16px;
  box-shadow: 0 12px 24px rgba(50, 110, 172, 0.2);
}

.start-stats-card__user {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.start-stats-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.start-stats-card__grid strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1.05;
}

.start-stats-card__grid span {
  font-size: 0.98rem;
}

.finish-stats-card {
  margin-bottom: 14px;
}

.finish-stats-card .start-stats-card__user {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.start-code-card {
  border-radius: 22px;
  background: #f0f2f5;
  border-color: #d9e0ea;
}

.start-code-card h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 0.95;
}

.start-code-card__submit {
  width: 100%;
  border-radius: 999px;
  min-height: 52px;
  font-size: 1.2rem;
}

.finish-card h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 0.95;
}

.finish-hero-emoji {
  margin: 0 0 8px;
  text-align: center;
  font-size: clamp(2rem, 9vw, 3rem);
}

.finish-actions {
  display: grid;
  gap: 8px;
}

.finish-summary {
  margin: 10px 0 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #d8e4f5;
  background: #f7fbff;
  display: grid;
  gap: 8px;
}

.finish-summary__item {
  margin: 0;
  color: #1f3958;
}

.finish-summary__item .status-chip {
  margin-left: 6px;
  vertical-align: middle;
}

.finish-share-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cddff4;
  color: #1d4f88;
  font-weight: 700;
}

.finish-share-btn:hover {
  background: #f7fbff;
}

.finish-share-status {
  margin-top: 8px;
}

.finish-share-status--success {
  color: #166534;
}

.finish-share-status--error {
  color: #9f1239;
}

.start-support {
  margin: 16px 0 0;
  text-align: center;
  color: #2c394a;
}

.start-auth-landing {
  margin-top: 8px;
  text-align: center;
  color: #24486f;
}

.start-auth-landing h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  line-height: 1.05;
}

.start-auth-landing p {
  margin: 0;
  color: #3f5f82;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-2);
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #24486f;
}

input,
textarea,
select,
.btn {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 16px;
}

input,
textarea,
select {
  background: #fff;
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #afc9ea;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: #8fb6e5;
  box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.16);
}

.btn {
  border: 0;
  background: #ecf2fb;
  cursor: pointer;
  text-decoration: none;
  color: #17314f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(15, 95, 197, 0.24);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.table-wrap {
  overflow-x: auto;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: var(--surface-soft);
  color: #2a4f77;
  font-weight: 700;
}

.table tbody tr {
  transition: background-color 120ms ease;
}

.table tbody tr:hover {
  background: #f8fbff;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.alert--error {
  background: #fee2e2;
  color: #7f1d1d;
}

.alert--info {
  background: #dbeafe;
  color: #1e3a8a;
}

.alert--success {
  background: #dcfce7;
  color: #166534;
}

.alert--hint {
  background: #fff7d6;
  color: #7b4b00;
  border: 1px solid #f1d58a;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: "Consolas", "Courier New", monospace;
  letter-spacing: 0.01em;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.choice-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  cursor: pointer;
}

.choice-card:hover {
  border-color: #9ec4f5;
  box-shadow: 0 4px 10px rgba(29, 86, 152, 0.1);
}

.choice-card:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.2);
}

.choice-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.choice-card span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.35;
}

.choice-card input[type="radio"] + span::before,
.choice-card input[type="checkbox"] + span::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid #9dbbe3;
  background: #fff;
  transition: all 140ms ease;
  flex: 0 0 22px;
  box-sizing: border-box;
}

.choice-card input[type="radio"] + span::before {
  border-radius: 50%;
}

.choice-card input[type="checkbox"] + span::before {
  border-radius: 7px;
}

.choice-card:hover input[type="radio"] + span::before,
.choice-card:hover input[type="checkbox"] + span::before {
  border-color: #76a8e6;
}

.choice-card input[type="radio"]:checked + span::before {
  border-width: 6px;
  border-color: #2f79da;
}

.choice-card input[type="checkbox"]:checked + span::before {
  background: #2f79da;
  border-color: #2f79da;
  box-shadow: inset 0 0 0 2px #fff;
}

.choice-card input[type="radio"]:focus-visible + span::before,
.choice-card input[type="checkbox"]:focus-visible + span::before {
  box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.25);
}

.hidden {
  display: none;
}

.empty-state,
.loading-state {
  border: 1px dashed #cfe0f5;
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #f8fbff;
}

.empty-state p,
.loading-state p {
  margin: 0;
}

.media {
  width: 100%;
  border-radius: var(--radius-sm);
  margin: 10px 0;
}

.stats {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  margin-bottom: 16px;
}

.tips-list {
  margin: 12px 0 14px;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.progress-pill {
  display: inline-flex;
  margin: 0 0 8px;
  background: #eff6ff;
  border: 1px solid #cde0ff;
  color: #18457a;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.task-stage {
  margin: 0 auto;
  max-width: 560px;
  position: relative;
  border-radius: 20px;
  padding: 14px 14px 16px;
  background: linear-gradient(180deg, #6b42e3 0%, #7c20d7 100%);
  color: #f6f2ff;
  min-height: calc(100svh - 120px);
  display: flex;
  flex-direction: column;
}

.hint-fab {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 2;
}

.audio-fab {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 2;
}

.task-stage__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.task-stage__user,
.task-stage__meta {
  margin: 0;
}

.task-stage__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 700;
}

.task-stage .quest-progress__bar {
  background: rgba(255, 255, 255, 0.22);
}

.task-stage .quest-progress__segment {
  background: rgba(255, 255, 255, 0.22);
}

.task-stage .quest-progress__segment.is-current {
  background: #fff;
}

.task-stage__card {
  margin-top: 12px;
}

.task-stage__hero-image {
  border-radius: 28px;
  margin: 0 0 12px;
}

.task-stage__image-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 0 12px;
}

.task-stage__image-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.task-stage__hero-image--real {
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 220px;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.task-stage__hero-image--mock {
  min-height: 260px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, #5f9fe1, #6d58df);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.task-stage__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.task-stage__heading h1 {
  margin: 0;
  text-transform: uppercase;
}

.task-stage__reward {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.task-stage__step {
  margin: 0 0 8px;
  color: rgba(246, 242, 255, 0.86);
}

.task-stage .step-story p {
  margin: 0 0 10px;
}

.task-stage .step-timer {
  color: #f3f6ff;
}

.task-stage .helper-text {
  color: rgba(246, 242, 255, 0.86);
}

.step-story {
  margin-bottom: 12px;
}

.step-story h3,
.media-block h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: #1e466f;
}

.media-block {
  margin-bottom: 10px;
}

.media-block audio {
  width: 100%;
}

.step-timer {
  margin: 0 0 12px;
  color: #1f4d82;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hint-card {
  margin-top: 8px;
  background: #fffdf5;
  border: 1px solid #f1df9a;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.hint-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1140;
  background: rgba(12, 28, 46, 0.45);
}

.hint-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 420px);
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  color: #2a3647;
  z-index: 1141;
  box-shadow: 0 18px 36px rgba(31, 83, 139, 0.32);
}

.hint-modal h3 {
  margin: 0 0 8px;
}

.hint-modal p {
  margin: 0 0 12px;
}

.hint-modal__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.audio-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1140;
  background: rgba(12, 28, 46, 0.45);
}

.audio-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 460px);
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  color: #2a3647;
  z-index: 1141;
  box-shadow: 0 18px 36px rgba(31, 83, 139, 0.32);
}

.audio-modal h3 {
  margin: 0 0 8px;
}

.audio-modal audio {
  width: 100%;
  margin-bottom: 12px;
}

.audio-transcript {
  border: 1px solid #d8e4f5;
  background: #f7fbff;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.audio-transcript h4 {
  margin: 0 0 6px;
}

.audio-transcript p {
  margin: 0;
}

.audio-modal__actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.quest-progress {
  margin: 0 0 12px;
}

.quest-progress__bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #dbe8f8;
  overflow: hidden;
}

.quest-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #37b46f, #78c945);
  transition: width 220ms ease;
}

.quest-progress__segments {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
  gap: 6px;
}

.quest-progress__segment {
  height: 8px;
  border-radius: 999px;
  background: #d6e4f5;
}

.quest-progress__segment.is-done {
  background: #74c65c;
}

.quest-progress__segment.is-current {
  background: #1e6fd9;
}

.inline-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 18px;
}

.js-step-row.is-dragging {
  opacity: 0.65;
}

.player-menu-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #b4cdf0;
  background: #ffffff;
  color: #1d4f88;
  font-size: 24px;
  line-height: 1;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: width 160ms ease, height 160ms ease, font-size 160ms ease, box-shadow 160ms ease;
}

.player-menu-toggle:hover {
  box-shadow: 0 8px 20px rgba(31, 83, 139, 0.18);
}

.topbar--sticky.is-compact .player-menu-toggle {
  width: 40px;
  height: 40px;
  font-size: 21px;
}

.player-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 28, 46, 0.35);
  z-index: 1090;
}

.auth-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 28, 46, 0.3);
  z-index: 1120;
}

.auth-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1121;
  background: #f4f6f8;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid #d7e0ea;
  padding: 18px 16px 20px;
  box-shadow: 0 -10px 24px rgba(31, 83, 139, 0.2);
}

.auth-sheet h2 {
  margin: 0 0 6px;
}

.auth-sheet .helper-text {
  margin: 0 0 12px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}

.auth-mode-switch__btn {
  min-height: 40px;
  border: 1px solid #c7d8ec;
  border-radius: 999px;
  background: #fff;
  color: #2a4f77;
  font-weight: 700;
  cursor: pointer;
}

.auth-mode-switch__btn.is-active {
  background: #2f79da;
  border-color: #2f79da;
  color: #fff;
}

.player-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(360px, 92vw);
  background: #f1f2f4;
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(31, 83, 139, 0.2);
  z-index: 1101;
  padding: 16px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 200ms ease;
}

.player-menu-panel.is-open {
  transform: translateX(0);
}

.player-menu-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.player-menu-panel__head h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 0.95;
}

.cabinet-hero-card {
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #6e9fe3, #59a6df);
  color: #f4f8ff;
  margin-bottom: 16px;
}

.cabinet-hero-card__user {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.cabinet-hero-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cabinet-hero-card__stats strong {
  display: block;
  font-size: 2rem;
  line-height: 1.05;
}

.cabinet-hero-card__stats span {
  font-size: 0.98rem;
}

.cabinet-section {
  margin-bottom: 16px;
}

.cabinet-section h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  color: #242d3a;
}

.cabinet-exit-button {
  width: 100%;
  margin: 4px 0 10px;
  background: #fff;
  border: 1px solid #d5ddeb;
}

.admin-nav-logout {
  display: inline-flex;
  margin-left: 8px;
}

.admin-nav-logout .btn {
  min-height: 36px;
  padding: 6px 10px;
}

.control-stats-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.control-stat-card {
  padding: 12px;
}

.control-stat-card strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1.1;
}

.control-live-logs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  font-weight: 600;
  color: #24486f;
}

.control-alerts-list {
  display: grid;
  gap: 10px;
}

.control-alert {
  border: 1px solid #d2e1f5;
  border-radius: var(--radius-sm);
  background: #f7fbff;
  padding: 10px 12px;
}

.control-alert h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.control-alert p {
  margin: 0;
}

.control-alert--ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.control-alert--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.control-alert--critical {
  border-color: #fecaca;
  background: #fef2f2;
}

.progress-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.progress-workspace__nav,
.progress-workspace__detail {
  border: 1px solid #d7e3f2;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 12px;
}

.progress-workspace__nav h2,
.progress-workspace__detail h2 {
  margin-top: 0;
}

.progress-session-list {
  display: grid;
  gap: 8px;
}

.progress-session-list__item {
  width: 100%;
  text-align: left;
  border: 1px solid #d7e3f2;
  border-radius: 10px;
  background: #f9fbff;
  padding: 10px;
  cursor: pointer;
}

.progress-session-list__item p {
  margin: 0 0 4px;
}

.progress-session-list__item.is-active {
  border-color: #8eb8e6;
  background: #ecf4ff;
}

.progress-answer-log {
  display: grid;
  gap: 10px;
}

.progress-answer-log__item {
  border: 1px solid #d7e3f2;
  border-radius: 10px;
  background: #f9fbff;
  padding: 10px;
}

.progress-answer-log__item p {
  margin: 0 0 6px;
}

.progress-answer-log__step-title {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.progress-answer-log__step-title::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 5;
  width: min(520px, 72vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #bed4ef;
  background: #f9fcff;
  box-shadow: 0 10px 24px rgba(31, 83, 139, 0.16);
  color: #1f3958;
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: pre-line;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.progress-answer-log__step-title:hover::after,
.progress-answer-log__step-title:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cabinet-info-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.cabinet-info-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dae1eb;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.cabinet-info-list li span {
  color: #607085;
}

.cabinet-timeline-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.cabinet-timeline-list li {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
}

.cabinet-timeline-list__time {
  margin: 0;
  color: #56a1e8;
  font-size: 1.05rem;
  font-weight: 800;
}

.cabinet-timeline-list__content strong {
  color: #55a1e7;
}

.cabinet-timeline-list__content p {
  margin: 4px 0 0;
  color: #334155;
}

.player-menu-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.player-menu-list div {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.player-menu-list dt {
  margin: 0 0 4px;
  font-weight: 700;
  color: #2b4e75;
}

.player-menu-list dd {
  margin: 0;
}

.player-menu-history {
  margin-top: 14px;
}

.player-menu-history h3 {
  margin: 0 0 8px;
}

.player-menu-history-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.player-menu-history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.topbar-status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d3e4fb;
  background: #f7fbff;
  color: #254769;
  font-size: 0.92rem;
  line-height: 1.2;
}

.topbar-status__label {
  font-weight: 700;
}

.topbar-status__sep {
  opacity: 0.45;
}

.status-tag,
.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #edf4ff;
  border: 1px solid #d4e4fa;
  color: #1d4f88;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: none;
}

.status-chip--active,
.status-chip--in-progress,
.status-chip--in_progress {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0c4a6e;
}

.status-chip--completed {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.status-chip--draft {
  background: #fff7d6;
  border-color: #f6df96;
  color: #7b4b00;
}

.status-chip--archived {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.js-progress-row {
  cursor: pointer;
}

.js-progress-row:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -2px;
}

.js-progress-row.is-active {
  background: #eef5ff;
}

details.card {
  padding: 12px;
  background: #fcfeff;
}

details.card > summary {
  cursor: pointer;
  font-weight: 700;
  color: #26496d;
  margin: 2px 0;
}

.media-preview {
  border: 1px dashed #cfe0f5;
  border-radius: var(--radius-sm);
  padding: 10px;
  background: #f8fbff;
}

.media-preview img {
  display: block;
  width: min(100%, 360px);
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

.media-preview audio {
  width: min(100%, 360px);
}

.quest-editor-page {
  display: grid;
  gap: 14px;
}

.quest-main-form {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.3fr 1fr;
  align-items: end;
}

.quest-main-form label[for="description"],
.quest-main-form #description,
.quest-main-form .muted,
.quest-main-form button {
  grid-column: 1 / -1;
}

.quest-publish-panel {
  display: grid;
  gap: 8px;
}

.quest-step-details {
  padding: 10px 12px;
}

.quest-step-details > summary {
  padding: 4px 0;
}

.quest-step-form {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.quest-step-form__full {
  grid-column: 1 / -1;
}

.quest-step-form button[type="submit"] {
  justify-self: start;
}

.player-menu-history-list li .muted {
  margin: 2px 0 0;
  font-size: 0.84rem;
}

.delta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.delta-badge--positive {
  background: #dcfce7;
  color: #166534;
}

.delta-badge--negative {
  background: #fee2e2;
  color: #9f1239;
}

.delta-badge--neutral {
  background: #e2e8f0;
  color: #334155;
}

summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .player-hero,
  .task-card,
  .finish-card {
    animation: fade-in-up 300ms ease;
  }
}

.task-answer-sheet {
  margin-top: auto;
  padding-top: 14px;
}

.task-answer-sheet__row {
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 10px;
  align-items: center;
}

.task-answer-sheet__row input {
  min-height: 54px;
  border-radius: 999px;
}

.task-answer-sheet__submit {
  min-height: 54px;
  border-radius: 999px;
  font-size: 1.5rem;
  padding: 0;
}

.task-answer-sheet__sending {
  min-height: 54px;
  border-radius: 999px;
  border: 1px solid #b6d0ef;
  background: #f3f8ff;
  color: #214a77;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-answer-sheet__sending.hidden {
  display: none;
}

.player-toast-stack {
  position: fixed;
  top: 76px;
  right: 12px;
  z-index: 1200;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.player-toast {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #cfe0f5;
  background: #f8fbff;
  color: #1f3958;
  box-shadow: 0 8px 20px rgba(31, 83, 139, 0.2);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: auto;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
}

.player-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.player-toast__message {
  line-height: 1.35;
}

.player-toast__close {
  min-height: 28px;
  width: 28px;
  border-radius: 999px;
  border: 1px solid rgba(31, 57, 88, 0.2);
  background: rgba(255, 255, 255, 0.7);
  color: currentcolor;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.player-toast__close:hover {
  background: rgba(255, 255, 255, 0.95);
}

.player-toast__close:focus-visible {
  outline: 3px solid rgba(30, 111, 217, 0.28);
  outline-offset: 1px;
}

.player-toast--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.player-toast--info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.player-toast--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
}

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