:root {
  --ink: #172136;
  --muted: #687086;
  --paper: #fffdf8;
  --cream: #f5efe3;
  --purple: #6657d9;
  --purple-dark: #493cae;
  --yellow: #ffd84d;
  --green: #34b885;
  --red: #ef6b66;
  --blue: #4d9de0;
  --line: #ded9cf;
  --shadow: 0 18px 50px rgb(38 37 61 / 14%);
  font-family: "Trebuchet MS", "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 8% 12%, rgb(255 216 77 / 34%) 0 6%, transparent 6.2%),
    radial-gradient(circle at 94% 88%, rgb(102 87 217 / 16%) 0 10%, transparent 10.2%),
    var(--cream);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  isolation: isolate;
}

.screen {
  width: 100%;
  height: 100%;
}

.home-screen,
.result-screen {
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(18px, 4vw, 48px);
}

.home-screen::before,
.result-screen::before {
  position: fixed;
  inset: 18px;
  z-index: -1;
  border: 1px solid rgb(23 33 54 / 10%);
  border-radius: 28px;
  content: "";
  pointer-events: none;
}

.home-screen::after {
  position: fixed;
  right: 5vw;
  bottom: 8vh;
  z-index: -1;
  width: 88px;
  height: 88px;
  border: 15px solid var(--yellow);
  border-radius: 50%;
  content: "";
  transform: rotate(-12deg);
}

.home-card {
  width: min(760px, 100%);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--purple-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  color: #e2a900;
}

h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(4.8rem, 14vw, 9.2rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.72;
  text-transform: uppercase;
}

h1 > span {
  display: inline-block;
  color: var(--purple);
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  font-size: clamp(2rem, 5.5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1;
  text-transform: none;
  transform: rotate(-1.2deg);
}

.home-instructions {
  max-width: 610px;
  margin: 28px auto 22px;
  color: #4f586c;
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  line-height: 1.55;
}

.home-instructions strong {
  color: var(--ink);
}

.message-preview {
  position: relative;
  width: min(570px, 94%);
  height: 178px;
  margin: 0 auto 20px;
}

.preview-popup {
  position: absolute;
  display: flex;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 6px 0 rgb(23 33 54 / 16%);
  font-size: 0.8rem;
}

.preview-sale {
  top: 19px;
  left: 3%;
  width: 150px;
  height: 93px;
  justify-content: center;
  flex-direction: column;
  color: var(--ink);
  background: var(--yellow);
  transform: rotate(-7deg);
}

.preview-sale span {
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.preview-sale strong {
  font-size: 2.25rem;
  line-height: 1;
}

.preview-message {
  z-index: 2;
  top: 42px;
  left: 50%;
  width: min(330px, 66%);
  min-height: 92px;
  padding: 16px;
  gap: 12px;
  text-align: left;
  background: var(--paper);
  transform: translateX(-50%) rotate(1.5deg);
}

.preview-avatar {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--purple);
  font-weight: 900;
}

.preview-message strong,
.preview-message small {
  display: block;
}

.preview-message small {
  margin-top: 5px;
  color: #555f74;
}

.preview-video {
  right: 1%;
  bottom: 6px;
  width: 168px;
  min-height: 76px;
  padding: 12px;
  gap: 10px;
  color: white;
  background: #ea6a71;
  transform: rotate(6deg);
}

.preview-video span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 22%);
}

.primary-button {
  display: inline-flex;
  min-width: min(280px, 100%);
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 10px 12px 10px 26px;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 0 var(--purple-dark), 0 16px 30px rgb(73 60 174 / 22%);
  color: white;
  background: var(--purple);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button:hover {
  background: #7162e6;
  transform: translateY(-2px);
  box-shadow: 0 10px 0 var(--purple-dark), 0 19px 34px rgb(73 60 174 / 26%);
}

.primary-button:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 var(--purple-dark), 0 7px 15px rgb(73 60 174 / 20%);
}

.primary-button:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 5px;
}

.button-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--purple-dark);
  background: white;
  font-size: 1.35rem;
}

.home-tip {
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.workshop-tabs {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid rgb(23 33 54 / 14%);
  border-radius: 999px;
  background: rgb(255 253 248 / 75%);
}

.workshop-tab {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 8px;
  border: 0;
  border-radius: 999px;
  color: #5d6576;
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.workshop-tab > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--purple-dark);
  background: #ebe7ff;
  font-size: 0.65rem;
}

.workshop-tab:hover {
  color: var(--ink);
  background: white;
}

.workshop-tab.is-active {
  color: white;
  background: var(--ink);
}

.workshop-tab.is-active > span {
  color: var(--ink);
  background: var(--yellow);
}

.workshop-tab:focus-visible,
.text-button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.text-button {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px auto 0;
  padding: 7px 11px;
  border: 0;
  color: var(--purple-dark);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 900;
}

.text-button span {
  font-size: 1.05rem;
  transition: transform 160ms ease;
}

.text-button:hover span {
  transform: translateX(3px);
}

.inline-focus {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.78em;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.feed-home-screen {
  background:
    radial-gradient(circle at 12% 82%, rgb(77 157 224 / 17%) 0 9%, transparent 9.2%),
    radial-gradient(circle at 90% 14%, rgb(255 216 77 / 30%) 0 7%, transparent 7.2%);
}

.feed-home-screen::after {
  position: fixed;
  right: 7vw;
  bottom: 9vh;
  z-index: -1;
  width: 78px;
  height: 78px;
  border: 14px solid #73c9b2;
  border-radius: 18px;
  content: "";
  transform: rotate(12deg);
}

.feed-title {
  font-size: clamp(4.1rem, 12vw, 8rem);
}

.feed-title > span {
  color: #2d8f78;
}

.feed-preview {
  position: relative;
  width: min(540px, 96%);
  height: 190px;
  margin: 2px auto 14px;
  perspective: 900px;
}

.preview-feed-card {
  position: absolute;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 270px;
  min-height: 82px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 15px;
  box-shadow: 5px 6px 0 rgb(23 33 54 / 15%);
  text-align: left;
  background: var(--paper);
}

.preview-feed-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--purple);
  font-size: 0.78rem;
  font-weight: 900;
}

.preview-feed-card strong,
.preview-feed-card small {
  display: block;
}

.preview-feed-card strong {
  font-size: 0.76rem;
}

.preview-feed-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.64rem;
}

.preview-feed-card i,
.preview-feed-card b {
  grid-column: 1 / -1;
  justify-self: end;
  color: #72798a;
  font-size: 0.61rem;
  font-style: normal;
}

.preview-feed-one {
  top: 7px;
  left: 1%;
  transform: rotate(-5deg);
}

.preview-feed-target {
  z-index: 2;
  top: 50%;
  left: 50%;
  border-color: var(--ink);
  background: #fffcdf;
  transform: translate(-50%, -50%) rotate(1deg);
}

.preview-feed-target .preview-feed-avatar {
  background: #2d8f78;
}

.preview-feed-target b {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  letter-spacing: 0.06em;
}

.preview-feed-three {
  right: 0;
  bottom: 3px;
  transform: rotate(5deg);
}

.feed-primary-button {
  background: #2d8f78;
  box-shadow: 0 8px 0 #176551, 0 16px 30px rgb(23 101 81 / 22%);
}

.sound-toggle {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -3px auto 14px;
  padding: 7px 13px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 4px 0 rgb(23 33 54 / 13%);
  color: var(--ink);
  background: #c7f2e5;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.sound-toggle:hover {
  background: #aee8d7;
  transform: translateY(-1px);
}

.sound-toggle:active {
  box-shadow: 1px 2px 0 rgb(23 33 54 / 13%);
  transform: translateY(2px);
}

.sound-toggle:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

.sound-toggle.is-muted {
  color: #555f74;
  background: #ebe8e1;
}

.sound-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sound-toggle-icon {
  font-size: 0.96rem;
  line-height: 1;
}

.feed-primary-button:hover {
  background: #38a088;
  box-shadow: 0 10px 0 #176551, 0 19px 34px rgb(23 101 81 / 26%);
}

.feed-primary-button:active {
  box-shadow: 0 3px 0 #176551, 0 7px 15px rgb(23 101 81 / 20%);
}

.feed-primary-button .button-arrow {
  color: #176551;
}

.playful-disclaimer {
  margin: 9px 0 0;
  color: #858b99;
  font-size: 0.66rem;
}

.video-feed-preview {
  position: relative;
  display: grid;
  width: min(520px, 96%);
  height: 208px;
  place-items: center;
  margin: 0 auto 15px;
}

.preview-phone {
  position: relative;
  width: 142px;
  height: 204px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 7px 8px 0 rgb(23 33 54 / 15%);
  color: white;
  background: #293e51;
  transform: rotate(2deg);
}

.preview-short-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 25%, rgb(255 255 255 / 30%) 0 6%, transparent 6.5%),
    radial-gradient(circle at 80% 70%, rgb(255 216 77 / 40%) 0 13%, transparent 13.5%),
    linear-gradient(145deg, #e96a78, #6e5fd4);
}

.preview-short-art::before {
  position: absolute;
  z-index: 1;
  width: 170px;
  height: 55px;
  border: 2px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}

.preview-short-art video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-short-icon {
  z-index: 2;
  font-size: 3.3rem;
  filter: drop-shadow(0 5px 0 rgb(23 33 54 / 18%));
  animation: preview-video-float 1.5s ease-in-out infinite alternate;
}

.preview-play-badge {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  background: rgb(23 33 54 / 35%);
  font-size: 0.85rem;
}

.preview-short-copy {
  position: absolute;
  right: 34px;
  bottom: 16px;
  left: 9px;
  z-index: 3;
  text-align: left;
  text-shadow: 0 2px 7px rgb(0 0 0 / 45%);
}

.preview-short-copy strong,
.preview-short-copy small {
  display: block;
}

.preview-short-copy strong {
  font-size: 0.56rem;
}

.preview-short-copy small {
  margin-top: 3px;
  font-size: 0.46rem;
  line-height: 1.25;
}

.preview-short-actions {
  position: absolute;
  right: 7px;
  bottom: 25px;
  z-index: 3;
  display: grid;
  gap: 9px;
  text-align: center;
}

.preview-short-actions span,
.preview-short-actions small {
  display: block;
}

.preview-short-actions span {
  font-size: 0.9rem;
}

.preview-short-actions small {
  margin-top: 1px;
  font-size: 0.42rem;
}

.preview-progress {
  position: absolute;
  right: 8px;
  bottom: 6px;
  left: 8px;
  z-index: 4;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 35%);
}

.preview-progress span {
  display: block;
  width: 58%;
  height: 100%;
  background: var(--yellow);
}

.preview-swipe-hint {
  position: absolute;
  top: 50%;
  left: calc(50% + 90px);
  display: grid;
  margin: 0;
  color: #2d8f78;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-50%) rotate(4deg);
}

.preview-swipe-hint span {
  font-size: 2rem;
  line-height: 1;
  animation: swipe-hint 900ms ease-in-out infinite alternate;
}

.game-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 10px;
  background: #ddd8cf;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.game-header {
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(100px, 155px)) 1fr;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 8px 12px;
}

.brand-mini {
  justify-self: start;
  color: var(--purple);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
  transform: rotate(-3deg);
}

.game-stat {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid rgb(23 33 54 / 12%);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgb(23 33 54 / 6%);
  background: rgb(255 253 248 / 92%);
}

.game-stat > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.game-stat strong {
  font-size: 1.45rem;
  line-height: 1;
}

.game-stat small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  font-size: 1.12rem;
  font-weight: 900;
}

.timer-stat .stat-icon {
  color: #6a4a00;
  background: #ffe482;
}

.correct-stat .stat-icon {
  color: #075b3d;
  background: #acf0d6;
}

.wrong-stat .stat-icon {
  color: #8c2724;
  background: #ffd0ce;
}

.timer-stat.is-urgent {
  animation: timer-pulse 600ms ease-in-out infinite alternate;
  border-color: var(--red);
}

.game-board {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgb(23 33 54 / 35%);
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 70%), 0 18px 45px rgb(23 33 54 / 12%);
  background:
    radial-gradient(circle at 80% 14%, rgb(255 216 77 / 28%), transparent 23%),
    linear-gradient(145deg, #f9f7f1, #ede8de);
  cursor: default;
  touch-action: manipulation;
}

.board-grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgb(23 33 54 / 8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 33 54 / 8%) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.board-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  margin: 0;
  color: rgb(23 33 54 / 27%);
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.feed-game-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 10px;
  overflow: hidden;
  background: #d8dedb;
  user-select: none;
  -webkit-user-select: none;
}

.feed-game-header {
  grid-template-columns: 1fr repeat(4, minmax(92px, 145px)) 1fr;
}

.feed-game-sound-toggle {
  justify-self: end;
  min-width: 112px;
  margin: 0;
  box-shadow: 0 4px 12px rgb(23 33 54 / 8%);
  background: rgb(199 242 229 / 94%);
}

.feed-brand-mini {
  color: #2d8f78;
  font-size: 1.55rem;
}

.feed-timer-stat .stat-icon {
  color: #6a4a00;
  background: #ffe482;
}

.current-watch-stat .stat-icon {
  color: #493cae;
  background: #ddd6ff;
}

.focus-stat .stat-icon {
  color: #176551;
  background: #bfeee0;
}

.feed-timer-stat.is-urgent {
  animation: timer-pulse 600ms ease-in-out infinite alternate;
  border-color: var(--red);
}

.feed-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(300px, 650px);
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgb(23 33 54 / 35%);
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 70%), 0 18px 45px rgb(23 33 54 / 12%);
  background:
    radial-gradient(circle at 10% 16%, rgb(255 216 77 / 25%), transparent 20%),
    linear-gradient(145deg, #f6f5ef, #e8ece8);
}

.feed-mission {
  align-self: center;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow: 7px 8px 0 rgb(23 33 54 / 12%);
  background: var(--paper);
  transform: rotate(-1.5deg);
}

.mission-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.feed-mission p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.feed-mission strong {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.feed-mission small {
  display: block;
  margin-top: 17px;
  color: #6c7485;
  font-size: 0.72rem;
  line-height: 1.45;
}

.feed-scroll {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-inline: 1px solid rgb(23 33 54 / 15%);
  background: #e8e5df;
  scrollbar-color: #2d8f78 transparent;
  scrollbar-width: thin;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.feed-scroll:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: -4px;
}

.feed-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid rgb(23 33 54 / 16%);
  color: var(--ink);
  background: rgb(255 253 248 / 93%);
  backdrop-filter: blur(8px);
}

.feed-topbar strong {
  font-size: 0.73rem;
  letter-spacing: 0.11em;
}

.feed-topbar span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #176551;
  background: #d8f2e9;
  font-size: 0.62rem;
  font-weight: 900;
}

.feed-list {
  display: grid;
  gap: 14px;
  padding: 18px clamp(12px, 3vw, 26px);
}

.feed-post {
  --post-accent: #6657d9;
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(23 33 54 / 27%);
  border-radius: 18px;
  box-shadow: 4px 5px 0 rgb(23 33 54 / 12%);
  background: var(--paper);
  cursor: pointer;
  animation: feed-card-arrive 280ms ease-out both;
  -webkit-tap-highlight-color: transparent;
}

.feed-post::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 3;
  width: 5px;
  background: var(--post-accent);
  content: "";
}

.feed-post:hover {
  transform: translateY(-1px);
}

.feed-post-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px 10px 17px;
}

.feed-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--post-accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.feed-author {
  min-width: 0;
}

.feed-author strong,
.feed-author small {
  display: block;
}

.feed-author strong {
  overflow: hidden;
  font-size: 0.79rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-author small {
  margin-top: 3px;
  color: #838999;
  font-size: 0.61rem;
}

.feed-kebab {
  color: #818795;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.feed-post-copy {
  margin: 0;
  padding: 0 16px 12px 18px;
  color: #485165;
  font-size: 0.77rem;
  line-height: 1.4;
}

.feed-art {
  position: relative;
  display: grid;
  height: clamp(115px, 18vh, 165px);
  place-items: center;
  overflow: hidden;
  margin: 0 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--post-accent) 75%, white), var(--post-accent));
}

.feed-art::before,
.feed-art::after {
  position: absolute;
  border: 2px solid rgb(255 255 255 / 72%);
  content: "";
}

.feed-art::before {
  top: -34px;
  right: -20px;
  width: 115px;
  height: 115px;
  border-radius: 50%;
  background: rgb(255 255 255 / 18%);
}

.feed-art::after {
  bottom: -45px;
  left: -25px;
  width: 145px;
  height: 90px;
  border-radius: 50%;
  background: rgb(255 216 77 / 30%);
  transform: rotate(14deg);
}

.feed-art-icon {
  z-index: 2;
  font-size: clamp(2.7rem, 7vw, 4.5rem);
  filter: drop-shadow(0 5px 0 rgb(23 33 54 / 12%));
  transform: rotate(-4deg);
}

.feed-art[data-art="pattern"] {
  background:
    radial-gradient(circle, rgb(255 255 255 / 65%) 0 7px, transparent 8px) 0 0 / 34px 34px,
    var(--post-accent);
}

.feed-art[data-art="split"] {
  background: linear-gradient(115deg, var(--post-accent) 0 49%, #ffd84d 49.5% 100%);
}

.feed-art[data-art="night"] {
  background:
    radial-gradient(circle at 76% 25%, #fff8bf 0 8%, transparent 8.5%),
    linear-gradient(145deg, #263354, var(--post-accent));
}

.feed-art[data-art="paper"] {
  background:
    linear-gradient(rgb(23 33 54 / 8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 33 54 / 8%) 1px, transparent 1px),
    #f8f1df;
  background-size: 22px 22px;
}

.feed-post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 16px 13px 18px;
  color: #72798a;
  font-size: 0.66rem;
  font-weight: 800;
}

.feed-post-footer span:last-child {
  margin-left: auto;
}

.feed-tag {
  padding: 4px 8px;
  border: 1px solid rgb(23 33 54 / 12%);
  border-radius: 999px;
  color: #667084;
  background: #f2efe8;
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.focus-signal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgb(23 33 54 / 13%);
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.feed-post.is-found {
  animation: feed-found 520ms ease-out both;
  border-color: #238461;
}

.feed-post.is-found .focus-signal {
  color: white;
  background: #238461;
}

.feed-post.is-missed {
  opacity: 0.6;
  filter: grayscale(0.35);
}

.feed-post.is-missed::after {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  padding: 5px 8px;
  border-radius: 999px;
  color: #8c2724;
  background: #ffd0ce;
  content: "MANQUÉ";
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.feed-post.is-wrong {
  animation: feed-wrong 300ms ease-out;
}

.feed-loader {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.feed-loader span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #879088;
  animation: loader-dot 850ms ease-in-out infinite alternate;
}

.feed-loader span:nth-child(2) {
  animation-delay: 130ms;
}

.feed-loader span:nth-child(3) {
  animation-delay: 260ms;
}

.feed-feedback {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 100;
  pointer-events: none;
  transform: translateX(-50%);
}

.feed-toast {
  padding: 10px 15px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 5px 0 rgb(23 33 54 / 14%);
  color: var(--ink);
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 900;
  animation: feed-toast 900ms ease both;
  white-space: nowrap;
}

.feed-toast.good {
  background: #bfeee0;
}

.feed-toast.bad {
  background: #ffd0ce;
}

.video-feed-scroll {
  --feed-video-height: 520px;
  scroll-padding-top: 48px;
  scroll-snap-type: y mandatory;
  background: #172136;
}

.video-feed-list {
  display: block;
  padding: 10px 12px 18px;
}

.feed-video {
  --video-accent: #6657d9;
  position: relative;
  height: var(--feed-video-height);
  min-height: 300px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 2px solid rgb(255 255 255 / 38%);
  border-radius: 20px;
  box-shadow: 0 9px 24px rgb(0 0 0 / 24%);
  color: white;
  background: #172136;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.feed-video-canvas {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--video-accent) 82%, white), var(--video-accent));
}

.feed-video-canvas::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgb(0 0 0 / 8%), transparent 38%, rgb(0 0 0 / 67%));
  content: "";
  pointer-events: none;
}

.feed-video-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #172136;
}

.feed-video-hook {
  position: absolute;
  top: 53px;
  left: 50%;
  z-index: 4;
  width: max-content;
  max-width: calc(100% - 44px);
  padding: 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 4px 0 rgb(23 33 54 / 17%);
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%) rotate(-1deg);
}

.feed-video-canvas[data-art="pattern"] {
  background:
    radial-gradient(circle, rgb(255 255 255 / 30%) 0 7px, transparent 8px) 0 0 / 38px 38px,
    var(--video-accent);
}

.feed-video-canvas[data-art="split"] {
  background: linear-gradient(125deg, var(--video-accent) 0 52%, #ffd84d 52.5%);
}

.feed-video-canvas[data-art="sky"] {
  background:
    radial-gradient(circle at 78% 22%, #fff2a9 0 8%, transparent 8.5%),
    linear-gradient(#4d9de0, #d8f1fb 62%, #54a878 62.5%);
}

.feed-video-canvas[data-art="night"] {
  background:
    radial-gradient(circle at 75% 20%, #fff4b8 0 7%, transparent 7.5%),
    radial-gradient(circle at 25% 32%, white 0 2px, transparent 2.5px),
    radial-gradient(circle at 62% 45%, white 0 2px, transparent 2.5px),
    linear-gradient(145deg, #182542, var(--video-accent));
}

.feed-video-canvas[data-art="paper"] {
  background:
    linear-gradient(rgb(23 33 54 / 9%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 33 54 / 9%) 1px, transparent 1px),
    #f3e9d5;
  background-size: 28px 28px;
}

.feed-video-canvas[data-art="bubbles"] {
  background:
    radial-gradient(circle at 18% 72%, rgb(255 255 255 / 28%) 0 8%, transparent 8.5%),
    radial-gradient(circle at 80% 28%, rgb(255 216 77 / 52%) 0 12%, transparent 12.5%),
    radial-gradient(circle at 74% 78%, rgb(255 255 255 / 25%) 0 5%, transparent 5.5%),
    var(--video-accent);
}

.video-shape {
  position: absolute;
  border: 3px solid rgb(255 255 255 / 45%);
  content: "";
}

.video-shape-one {
  top: 12%;
  left: -8%;
  width: 55%;
  height: 22%;
  border-radius: 50%;
  transform: rotate(-22deg);
}

.video-shape-two {
  right: -7%;
  bottom: 22%;
  width: 48%;
  height: 26%;
  border-radius: 28px;
  background: rgb(255 255 255 / 10%);
  transform: rotate(14deg);
}

.feed-video-icon {
  z-index: 2;
  font-size: clamp(5rem, 16vw, 8rem);
  filter: drop-shadow(0 11px 0 rgb(23 33 54 / 16%));
  transform: rotate(-4deg);
}

.feed-video.is-active .feed-video-icon {
  animation: active-video-icon 1.25s ease-in-out infinite alternate;
}

.feed-video.is-active .video-shape-one {
  animation: active-video-shape 2.4s ease-in-out infinite alternate;
}

.feed-video-top {
  position: absolute;
  top: 13px;
  right: 13px;
  left: 13px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  text-shadow: 0 2px 8px rgb(0 0 0 / 35%);
}

.feed-video-top span {
  max-width: 68%;
  padding: 5px 8px;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 999px;
  background: rgb(23 33 54 / 28%);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.feed-video-info {
  position: absolute;
  right: 72px;
  bottom: 30px;
  left: 17px;
  z-index: 4;
  padding: 11px 12px 10px;
  border-left: 4px solid var(--yellow);
  border-radius: 3px 13px 13px 3px;
  background: rgb(12 20 35 / 72%);
  backdrop-filter: blur(5px);
  text-shadow: 0 2px 9px rgb(0 0 0 / 55%);
}

.feed-video-info strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
}

.feed-video-info p {
  margin: 7px 0 8px;
  font-size: 0.7rem;
  line-height: 1.4;
}

.feed-video-info small {
  color: #ffe982;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.feed-video-actions {
  position: absolute;
  right: 15px;
  bottom: 37px;
  z-index: 4;
  display: grid;
  gap: 13px;
  text-align: center;
  text-shadow: 0 2px 7px rgb(0 0 0 / 48%);
}

.feed-video-actions > span {
  font-size: 1.2rem;
  font-weight: 900;
}

.feed-video-actions small {
  display: block;
  max-width: 48px;
  margin-top: 2px;
  font-size: 0.42rem;
  line-height: 1.1;
}

.feed-video-play-state {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  background: rgb(23 33 54 / 38%);
  font-size: 1.25rem;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.feed-video.is-active .feed-video-play-state {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
}

.feed-video.is-active.is-play-blocked .feed-video-play-state {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.feed-video-progress {
  position: absolute;
  right: 14px;
  bottom: 10px;
  left: 14px;
  z-index: 6;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 35%);
}

.feed-video-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
}

.feed-video.is-completed::after,
.feed-video.has-finished-playing::after {
  position: absolute;
  top: 48px;
  right: 13px;
  z-index: 7;
  padding: 5px 9px;
  border-radius: 999px;
  color: #075b3d;
  background: #bfeee0;
  content: "VU EN ENTIER ✓";
  font-size: 0.55rem;
  font-weight: 900;
}

.popup {
  --rotation: 0deg;
  --popup-accent: var(--purple);
  position: absolute;
  z-index: 10;
  display: flex;
  overflow: hidden;
  min-width: 150px;
  flex-direction: column;
  border: 1px solid rgb(23 33 54 / 30%);
  border-radius: 12px;
  box-shadow: 4px 6px 0 rgb(23 33 54 / 15%), 0 14px 30px rgb(23 33 54 / 15%);
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  animation: popup-arrive 260ms cubic-bezier(0.2, 1.35, 0.45, 1) both;
  transform: rotate(var(--rotation));
  transform-origin: center;
  -webkit-tap-highlight-color: transparent;
}

.popup:hover {
  filter: brightness(1.015);
}

.popup::before {
  height: 5px;
  background: var(--popup-accent);
  content: "";
}

.popup-header {
  display: flex;
  min-height: 29px;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 4px 10px;
  border-bottom: 1px solid rgb(23 33 54 / 10%);
  color: #4e5668;
  background: rgb(23 33 54 / 4%);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.popup-source {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-time {
  margin-left: auto;
  color: #788095;
  font-weight: 700;
}

.popup-close {
  display: grid;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  color: #5c6372;
  background: rgb(23 33 54 / 8%);
  font-size: 0.7rem;
}

.popup-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
}

.popup-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--popup-accent) 16%, white);
  font-size: 1.35rem;
}

.popup-copy {
  min-width: 0;
}

.popup-title {
  display: block;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-text {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  color: #586176;
  font-size: 0.68rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.popup-action {
  align-self: flex-start;
  margin: 0 10px 10px;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  color: white;
  background: var(--popup-accent);
  font-size: 0.61rem;
  font-weight: 900;
  pointer-events: none;
}

.popup[data-variant="banner"] .popup-body {
  grid-template-columns: minmax(0, 1fr) auto;
}

.popup[data-variant="banner"] .popup-icon {
  grid-column: 2;
  grid-row: 1;
  border-radius: 50%;
}

.popup[data-variant="bold"] {
  border-width: 2px;
  border-color: var(--ink);
}

.popup[data-variant="bold"] .popup-header {
  color: white;
  background: var(--popup-accent);
}

.popup[data-variant="bold"]::before {
  display: none;
}

.popup[data-variant="soft"] {
  border: 0;
  border-radius: 20px;
}

.popup[data-variant="soft"] .popup-header {
  border: 0;
  background: transparent;
}

.target-popup {
  --popup-accent: #4b8bca;
  border-color: rgb(35 62 95 / 42%);
  background: #fbfdff;
}

.target-popup::before {
  height: 4px;
  background: linear-gradient(90deg, var(--popup-accent), #8f7add);
}

.target-popup .popup-header {
  color: #536176;
  background: #edf4fb;
}

.target-popup .popup-icon {
  border-radius: 50%;
  color: white;
  background: var(--popup-accent);
  font-size: 0.86rem;
  font-weight: 900;
}

.target-popup .popup-title {
  font-size: 0.86rem;
}

.target-popup .popup-text {
  color: #334156;
  font-size: 0.72rem;
}

.target-popup[data-target-theme="violet"] {
  --popup-accent: #7a67c7;
}

.target-popup[data-target-theme="green"] {
  --popup-accent: #368c70;
}

.target-popup[data-target-theme="coral"] {
  --popup-accent: #c66768;
}

.popup.is-leaving {
  pointer-events: none;
  animation: popup-leave 230ms ease-in forwards;
}

.popup.is-correct {
  animation: popup-correct 420ms ease-out forwards;
  pointer-events: none;
}

.popup.is-wrong {
  animation: popup-wrong 270ms ease-out;
}

.feedback-layer {
  position: absolute;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
  pointer-events: none;
}

.click-feedback {
  position: absolute;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: 1.7rem;
  font-weight: 900;
  animation: feedback-pop 650ms ease-out forwards;
  transform: translate(-50%, -50%);
}

.click-feedback.correct {
  color: #087952;
  background: #c9f7e5;
}

.click-feedback.wrong {
  width: 44px;
  height: 44px;
  color: #a43936;
  background: #ffd9d7;
  font-size: 1.25rem;
}

.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background: rgb(245 239 227 / 88%);
  backdrop-filter: blur(7px);
}

.countdown-ring {
  display: grid;
  width: min(220px, 54vw);
  aspect-ratio: 1;
  place-items: center;
  border: 8px solid var(--ink);
  border-radius: 50%;
  box-shadow: 13px 15px 0 var(--yellow);
  color: white;
  background: var(--purple);
  animation: countdown-bounce 720ms cubic-bezier(0.2, 1.25, 0.4, 1) both;
}

.countdown-ring span {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(5rem, 22vw, 9rem);
  line-height: 1;
}

.countdown-ring.is-go span {
  font-size: clamp(3rem, 13vw, 5rem);
  letter-spacing: 0.03em;
}

.result-screen {
  background:
    linear-gradient(135deg, rgb(255 255 255 / 36%), transparent 55%),
    var(--cream);
}

.result-card {
  position: relative;
  width: min(720px, 100%);
  padding: clamp(28px, 6vw, 54px);
  border: 2px solid var(--ink);
  border-radius: 26px;
  box-shadow: 12px 13px 0 rgb(23 33 54 / 13%), var(--shadow);
  text-align: center;
  background: var(--paper);
}

.result-card.has-debrief {
  width: min(1000px, 100%);
}

.result-stamp {
  position: absolute;
  top: -24px;
  right: clamp(12px, 5vw, 46px);
  padding: 9px 16px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 rgb(23 33 54 / 15%);
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: rotate(5deg);
}

.result-card h2 {
  margin: 0;
  color: var(--purple);
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.result-card h2:focus {
  outline: none;
}

.result-message {
  max-width: 520px;
  margin: 14px auto 24px;
  color: var(--muted);
  line-height: 1.5;
}

.score-panel {
  display: inline-grid;
  min-width: 175px;
  margin-bottom: 24px;
  padding: 13px 24px 10px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 6px 0 rgb(23 33 54 / 14%);
  background: var(--yellow);
}

.score-panel span,
.score-panel small {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-panel strong {
  margin: 2px 0;
  font-size: 2.8rem;
  line-height: 1;
}

.focus-score-panel {
  min-width: min(330px, 100%);
  background: #bfeee0;
}

.focus-score-panel > span:first-child {
  letter-spacing: 0.055em;
}

.focus-score-panel strong {
  color: #176551;
}

.result-disclaimer {
  margin: -13px 0 18px;
  color: #858b99;
  font-size: 0.65rem;
}

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

.result-stats > div {
  display: flex;
  min-height: 92px;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f5ee;
}

.result-stats dt {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.result-stats dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 900;
}

.debrief-sheet,
.memory-quiz {
  margin: 10px 0 28px;
  padding: clamp(18px, 3vw, 28px);
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow: 7px 8px 0 rgb(23 33 54 / 11%);
  text-align: left;
}

.debrief-sheet {
  background:
    radial-gradient(circle at 96% 8%, rgb(255 216 77 / 35%) 0 6%, transparent 6.3%),
    #f5f1e8;
}

.scrolling-debrief {
  background:
    radial-gradient(circle at 96% 8%, rgb(52 184 133 / 25%) 0 6%, transparent 6.3%),
    #edf6f1;
}

.debrief-header {
  margin-bottom: 18px;
}

.debrief-label {
  display: inline-block;
  margin-bottom: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: var(--purple);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scrolling-debrief .debrief-label,
.memory-quiz .debrief-label {
  color: var(--ink);
  background: var(--yellow);
}

.debrief-header h3,
.memory-quiz-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 3.4vw, 2.25rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.debrief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.debrief-block {
  padding: 16px;
  border: 1px solid rgb(23 33 54 / 13%);
  border-radius: 15px;
  background: rgb(255 253 248 / 82%);
}

.debrief-objective {
  background: #fff5bf;
}

.reflection-block {
  background: #eeeaff;
}

.scrolling-debrief .reflection-block {
  background: #dff4ed;
}

.debrief-block h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  color: var(--purple-dark);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scrolling-debrief .debrief-block h4 {
  color: #176551;
}

.debrief-block p,
.debrief-block li {
  color: #485267;
  font-size: 0.8rem;
  line-height: 1.5;
}

.debrief-block p {
  margin: 0;
}

.debrief-block p + p {
  margin-top: 8px;
}

.debrief-block ul {
  margin: 0;
  padding-left: 18px;
}

.debrief-block li + li {
  margin-top: 6px;
}

.debrief-block strong {
  color: var(--ink);
}

.debrief-takeaway {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 5px solid var(--yellow);
  border-radius: 4px 12px 12px 4px;
  color: #424c61;
  background: white;
  font-size: 0.82rem;
  line-height: 1.5;
}

.scrolling-debrief .debrief-takeaway {
  border-left-color: var(--green);
}

.memory-quiz {
  color: white;
  background:
    radial-gradient(circle at 92% 13%, rgb(255 216 77 / 18%) 0 8%, transparent 8.3%),
    var(--ink);
}

.memory-quiz-header {
  margin-bottom: 17px;
}

.memory-quiz-header h3 {
  color: white;
}

.memory-quiz-header p {
  margin: 7px 0 0;
  color: #cbd2df;
  font-size: 0.78rem;
}

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

.quiz-question {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 15px;
  flex-direction: column;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 15px;
  background: rgb(255 255 255 / 7%);
}

.quiz-question > small {
  order: -1;
  margin-bottom: 7px;
  color: #ffe982;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.quiz-question legend {
  min-height: 48px;
  padding: 0;
  color: white;
  font-size: 0.83rem;
  font-weight: 900;
  line-height: 1.35;
}

.quiz-choices {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.quiz-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 9px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 10px;
  color: #e6eaf1;
  background: rgb(255 255 255 / 5%);
  cursor: pointer;
  font-size: 0.68rem;
  line-height: 1.35;
}

.quiz-choice:hover {
  border-color: rgb(255 216 77 / 65%);
  background: rgb(255 255 255 / 9%);
}

.quiz-choice input {
  margin: 2px 0 0;
  accent-color: var(--yellow);
}

.quiz-choice:has(input:checked) {
  border-color: var(--yellow);
  color: white;
  background: rgb(255 216 77 / 13%);
}

.quiz-choice.is-correct {
  border-color: #79dfbb;
  color: #d7fff1;
  background: rgb(52 184 133 / 23%);
}

.quiz-choice.is-wrong {
  border-color: #ff9691;
  color: #ffe1df;
  background: rgb(239 107 102 / 22%);
}

.quiz-submit-button {
  display: block;
  min-height: 42px;
  margin: 17px auto 0;
  padding: 9px 18px;
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 3px 4px 0 rgb(255 216 77 / 55%);
  color: var(--ink);
  background: var(--yellow);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
}

.quiz-submit-button:focus-visible {
  outline: 3px solid #79dfbb;
  outline-offset: 4px;
}

.quiz-submit-button:disabled {
  opacity: 0.62;
  cursor: default;
}

.quiz-result {
  min-height: 20px;
  margin: 13px 0 0;
  color: #ffe982;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.quiz-result.needs-answer {
  color: #ffb0ab;
}

.quiz-result.is-checked {
  color: #9af0d2;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

@keyframes popup-arrive {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.82) rotate(var(--rotation));
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(var(--rotation));
  }
}

@keyframes popup-leave {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.92) rotate(var(--rotation));
  }
}

@keyframes popup-correct {
  35% {
    box-shadow: 0 0 0 8px rgb(52 184 133 / 25%), 4px 6px 0 rgb(23 33 54 / 12%);
    transform: scale(1.06) rotate(var(--rotation));
  }
  to {
    opacity: 0;
    transform: translateY(-18px) scale(0.9) rotate(var(--rotation));
  }
}

@keyframes popup-wrong {
  35% {
    transform: translateX(-5px) rotate(var(--rotation));
  }
  70% {
    transform: translateX(5px) rotate(var(--rotation));
  }
}

@keyframes feedback-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -90%) scale(0.92);
  }
}

@keyframes countdown-bounce {
  from {
    opacity: 0;
    transform: scale(0.55) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes timer-pulse {
  to {
    color: #9a2521;
    background: #fff0ef;
    transform: scale(1.045);
  }
}

@keyframes feed-card-arrive {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes feed-found {
  35% {
    box-shadow: 0 0 0 8px rgb(52 184 133 / 22%), 4px 5px 0 rgb(23 33 54 / 10%);
    transform: scale(1.015);
  }
  to {
    box-shadow: 4px 5px 0 rgb(23 33 54 / 12%);
    transform: scale(1);
  }
}

@keyframes feed-wrong {
  33% {
    transform: translateX(-5px);
  }
  66% {
    transform: translateX(5px);
  }
}

@keyframes feed-toast {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.8);
  }
  20%,
  72% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
  }
}

@keyframes loader-dot {
  to {
    opacity: 0.35;
    transform: translateY(-5px);
  }
}

@keyframes preview-video-float {
  to {
    transform: translateY(-8px) rotate(7deg);
  }
}

@keyframes swipe-hint {
  to {
    transform: translateY(-7px);
  }
}

@keyframes active-video-icon {
  to {
    transform: translateY(-13px) rotate(7deg) scale(1.06);
  }
}

@keyframes active-video-shape {
  to {
    transform: translate(20px, 12px) rotate(-10deg);
  }
}

@media (max-width: 720px) {
  .home-screen,
  .result-screen {
    padding: 22px 16px;
  }

  .home-screen::before,
  .result-screen::before {
    inset: 8px;
    border-radius: 20px;
  }

  .message-preview {
    height: 145px;
  }

  .preview-sale {
    width: 125px;
    height: 78px;
  }

  .preview-video {
    width: 140px;
    min-height: 65px;
    font-size: 0.67rem;
  }

  .preview-message {
    top: 35px;
    min-height: 80px;
    padding: 12px;
  }

  .game-screen {
    padding: 6px;
  }

  .game-header {
    grid-template-columns: repeat(3, 1fr);
    min-height: 68px;
    padding: 5px 0;
    gap: 5px;
  }

  .workshop-tabs {
    margin-bottom: 13px;
  }

  .workshop-tab {
    padding-right: 10px;
    font-size: 0.68rem;
  }

  .feed-preview {
    height: 150px;
  }

  .video-feed-preview {
    height: 168px;
  }

  .preview-phone {
    width: 116px;
    height: 164px;
    border-radius: 18px;
  }

  .preview-short-icon {
    font-size: 2.7rem;
  }

  .preview-swipe-hint {
    left: calc(50% + 72px);
  }

  .preview-feed-card {
    width: 225px;
    min-height: 70px;
    padding: 9px;
  }

  .preview-feed-avatar {
    width: 32px;
    height: 32px;
  }

  .feed-game-screen {
    padding: 6px;
  }

  .feed-game-header {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 42px;
    min-height: 68px;
  }

  .feed-game-sound-toggle {
    min-width: 38px;
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .feed-game-sound-toggle .sound-toggle-label {
    display: none;
  }

  .feed-game-header .game-stat {
    min-width: 0;
  }

  .feed-game-header .game-stat small {
    font-size: 0.5rem;
  }

  .feed-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    border-radius: 16px;
  }

  .feed-mission {
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 9px;
    align-self: auto;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid rgb(23 33 54 / 18%);
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .mission-number {
    width: 28px;
    height: 28px;
    margin: 0;
  }

  .feed-mission p {
    margin: 0;
    font-size: 0.58rem;
  }

  .feed-mission strong {
    margin-left: auto;
    padding: 5px 9px;
    font-size: 0.7rem;
  }

  .feed-mission small {
    display: none;
  }

  .feed-scroll {
    border: 0;
  }

  .video-feed-list {
    padding: 7px 7px 14px;
  }

  .feed-video {
    margin-bottom: 8px;
    border-radius: 15px;
  }

  .brand-mini {
    display: none;
  }

  .game-stat {
    gap: 6px;
    padding: 7px;
    border-radius: 11px;
  }

  .stat-icon {
    flex-basis: 29px;
    width: 29px;
    height: 29px;
  }

  .game-stat strong {
    font-size: 1.2rem;
  }

  .game-stat small {
    font-size: 0.56rem;
  }

  .game-board {
    border-radius: 16px;
  }

  .popup {
    min-width: 135px;
  }

  .popup-body {
    gap: 7px;
    padding: 8px;
  }

  .popup-icon {
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
  }

  .popup-action {
    margin: 0 8px 8px;
  }

  .result-card {
    padding: 32px 16px 24px;
  }

  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .debrief-grid,
  .quiz-questions {
    grid-template-columns: 1fr;
  }

  .quiz-question legend {
    min-height: 0;
  }
}

@media (max-width: 450px), (max-height: 690px) {
  h1 {
    font-size: clamp(4rem, 23vw, 6rem);
  }

  h1 > span {
    font-size: clamp(1.65rem, 9.2vw, 2.4rem);
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  .home-instructions {
    margin: 20px auto 12px;
    font-size: 0.93rem;
  }

  .message-preview {
    height: 112px;
    margin-bottom: 12px;
  }

  .preview-sale {
    top: 12px;
    width: 105px;
    height: 66px;
  }

  .preview-sale strong {
    font-size: 1.7rem;
  }

  .preview-message {
    top: 26px;
    width: 72%;
    min-height: 69px;
    padding: 9px;
  }

  .preview-avatar {
    flex-basis: 33px;
    width: 33px;
    height: 33px;
  }

  .preview-message small {
    font-size: 0.62rem;
  }

  .preview-video {
    width: 110px;
    min-height: 55px;
    padding: 7px;
  }

  .preview-video span {
    display: none;
  }

  .primary-button {
    min-height: 54px;
  }

  .button-arrow {
    width: 36px;
    height: 36px;
  }

  .home-tip {
    margin-top: 17px;
  }

  .workshop-tabs {
    margin-bottom: 8px;
  }

  .workshop-tab {
    min-height: 34px;
    padding: 4px 8px 4px 5px;
    font-size: 0.62rem;
  }

  .workshop-tab > span {
    width: 24px;
    height: 24px;
  }

  .feed-title {
    font-size: clamp(3.5rem, 20vw, 5.4rem);
  }

  .feed-preview {
    height: 108px;
  }

  .video-feed-preview {
    height: 112px;
    margin-bottom: 9px;
  }

  .feed-home-card > .sound-toggle {
    min-height: 32px;
    margin-bottom: 10px;
    padding: 5px 10px;
    font-size: 0.62rem;
  }

  .preview-phone {
    width: 80px;
    height: 110px;
    border-width: 2px;
    border-radius: 13px;
    box-shadow: 4px 5px 0 rgb(23 33 54 / 14%);
  }

  .preview-short-icon {
    font-size: 2rem;
  }

  .preview-short-copy {
    right: 7px;
    bottom: 11px;
    left: 6px;
  }

  .preview-short-copy small,
  .preview-short-actions,
  .preview-play-badge {
    display: none;
  }

  .preview-short-copy strong {
    font-size: 0.42rem;
  }

  .preview-swipe-hint {
    left: calc(50% + 50px);
    font-size: 0.5rem;
  }

  .preview-swipe-hint span {
    font-size: 1.4rem;
  }

  .preview-feed-card {
    width: 185px;
    min-height: 58px;
    gap: 6px;
    padding: 7px;
  }

  .preview-feed-avatar {
    width: 27px;
    height: 27px;
  }

  .preview-feed-card small,
  .preview-feed-card i {
    display: none;
  }

  .preview-feed-card strong {
    font-size: 0.64rem;
  }

  .preview-feed-target b {
    padding: 3px 6px;
    font-size: 0.51rem;
  }

  .playful-disclaimer {
    display: none;
  }

  .feed-post-header {
    padding: 9px 11px 8px 14px;
  }

  .feed-art {
    height: 103px;
  }

  .feed-post-copy {
    padding-bottom: 9px;
  }

  .feed-post-footer {
    padding-top: 9px;
    padding-bottom: 10px;
  }

  .feed-video-info {
    right: 62px;
    bottom: 27px;
    left: 13px;
  }

  .feed-video-info p {
    font-size: 0.7rem;
  }

  .feed-video-actions {
    right: 12px;
    bottom: 34px;
  }

  .result-message {
    margin: 9px auto 13px;
  }

  .score-panel {
    margin-bottom: 13px;
    padding: 9px 20px 7px;
  }

  .score-panel strong {
    font-size: 2.1rem;
  }

  .result-stats {
    margin-bottom: 17px;
  }

  .result-stats > div {
    min-height: 70px;
    padding: 8px;
  }

  .debrief-sheet,
  .memory-quiz {
    padding: 15px;
    border-radius: 17px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .home-screen {
    padding: 12px;
  }

  .home-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-rows: auto auto auto;
    column-gap: 28px;
    align-items: center;
    text-align: left;
  }

  .home-card .eyebrow,
  .home-card h1,
  .home-instructions {
    grid-column: 1;
  }

  .home-card .eyebrow {
    justify-self: start;
  }

  .home-instructions {
    margin: 14px 0 0;
  }

  .message-preview {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 100%;
    height: 150px;
    margin: 0;
  }

  .home-card .primary-button {
    grid-column: 2;
    grid-row: 3;
    justify-self: center;
  }

  .home-tip {
    grid-column: 1;
    grid-row: 3;
    margin: 12px 0 0;
  }

  .result-card {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    column-gap: 22px;
    align-items: center;
    padding: 22px 28px;
  }

  .result-card.has-debrief {
    display: block;
    width: min(1000px, 100%);
  }

  .result-card .eyebrow,
  .result-card h2,
  .result-message,
  .score-panel {
    grid-column: 1;
  }

  .result-stats,
  .result-card .primary-button {
    grid-column: 2;
  }

  .result-card .eyebrow {
    margin-bottom: 6px;
  }

  .score-panel {
    margin-bottom: 0;
  }

  .result-stats {
    grid-row: 1 / span 3;
    margin: 0;
  }

  .result-card .primary-button {
    grid-row: 4;
    justify-self: center;
  }

  .feed-home-card .feed-preview {
    height: 144px;
  }

  .feed-home-card > .sound-toggle {
    display: none;
  }

  .feed-stage {
    grid-template-columns: minmax(155px, 200px) minmax(300px, 560px);
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
  }

  .feed-mission {
    display: block;
    align-self: center;
    padding: 15px;
    border: 2px solid var(--ink);
    border-radius: 15px;
    box-shadow: 5px 6px 0 rgb(23 33 54 / 10%);
    transform: rotate(-1deg);
  }

  .feed-mission .mission-number {
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
  }

  .feed-mission p {
    margin-bottom: 6px;
  }

  .feed-mission strong {
    margin: 0;
  }

  .feed-mission small {
    display: block;
    margin-top: 9px;
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
