/* SEC 520 gamification layer styles */

:root {
  --gam-navy: #003366;
  --gam-navy-dk: #002244;
  --gam-gold: #e3a82b;
  --gam-gold-dk: #b8860b;
  --gam-cream: #f6dcbb;
  --gam-white: #fff;
  --gam-track: rgba(255,255,255,.18);
  --gam-success: #4a8c5c;
  --gam-error: #c94b2b;
}

/* ---------- HUD ---------- */
.gam-hud {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: linear-gradient(90deg, var(--gam-navy-dk), var(--gam-navy));
  color: var(--gam-cream);
  border-bottom: 1px solid rgba(255,255,255,.15);
  font-family: Helvetica, Arial, sans-serif;
  font-size: .82rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  transition: box-shadow .25s;
}
.gam-hud-pulse {
  animation: gam-hud-pulse 1.1s ease;
}
.gam-hud-bar.gam-hud-flash {
  animation: gam-hud-bar-flash .48s ease-out;
}
@keyframes gam-hud-bar-flash {
  0%   { box-shadow: 0 0 0 0 rgba(227,168,43,0); }
  35%  { box-shadow: 0 0 0 4px rgba(227,168,43,.65), 0 0 12px rgba(255,245,208,.5); }
  100% { box-shadow: 0 0 0 0 rgba(227,168,43,0); }
}
@keyframes gam-hud-pulse {
  0% { box-shadow: 0 2px 10px rgba(0,0,0,.18); }
  40% { box-shadow: 0 0 0 3px var(--gam-gold), 0 4px 28px rgba(227,168,43,.45); }
  100% { box-shadow: 0 2px 10px rgba(0,0,0,.18); }
}
.gam-hud-level {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 110px;
}
.gam-hud-num {
  color: var(--gam-cream);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .8;
}
.gam-hud-name {
  color: var(--gam-gold);
  font-weight: 700;
  font-size: .94rem;
  letter-spacing: .02em;
}
.gam-hud-bar {
  position: relative;
  flex: 1;
  height: 14px;
  background: var(--gam-track);
  border-radius: 100px;
  overflow: hidden;
  min-width: 120px;
}
.gam-hud-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gam-gold-dk), var(--gam-gold));
  border-radius: 100px;
  transition: width .45s ease;
}
.gam-hud-xp {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--gam-white);
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  letter-spacing: .03em;
}
.gam-hud-badges, .gam-hud-sync {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--gam-cream);
  padding: 6px 10px;
  border-radius: 100px;
  font-family: inherit;
  font-size: .8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, border-color .15s;
}
.gam-hud-badges:hover, .gam-hud-sync:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--gam-gold);
}
.gam-hud-badge-count {
  font-weight: 700;
  color: var(--gam-gold);
}
.gam-hud-sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #888;
}
.gam-hud-sync[data-status="cloud"] .gam-hud-sync-dot { background: #5fbf6d; box-shadow: 0 0 6px #5fbf6d; }
.gam-hud-sync[data-status="sync"] .gam-hud-sync-dot { background: #e3a82b; animation: gam-blink 1s infinite; }
.gam-hud-sync[data-status="local"] .gam-hud-sync-dot { background: #888; }
@keyframes gam-blink { 50% { opacity: .35; } }

@media (max-width: 620px) {
  .gam-hud { flex-wrap: wrap; row-gap: 8px; padding: 8px 12px; }
  .gam-hud-level { min-width: auto; flex-direction: row; gap: 6px; align-items: baseline; }
  .gam-hud-bar { order: 3; flex-basis: 100%; }
  .gam-hud-badges, .gam-hud-sync { font-size: .72rem; padding: 5px 9px; }
}

/* ---------- BADGE PANEL ---------- */
.gam-badge-panel {
  position: fixed;
  top: 50px;
  right: 18px;
  width: min(420px, calc(100% - 36px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--gam-white);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  z-index: 60;
  font-family: Helvetica, Arial, sans-serif;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}
.gam-badge-panel.gam-open { opacity: 1; transform: translateY(0); }
.gam-badge-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-size: .9rem;
}
.gam-badge-head strong { color: var(--gam-navy); font-size: 1rem; }
.gam-badge-head span { margin-left: auto; color: #666; font-size: .78rem; }
.gam-badge-close {
  background: none;
  border: none;
  color: #666;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
}
.gam-badge-close:hover { color: var(--gam-navy); }
.gam-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
}
.gam-badge {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px;
  background: #fafaf6;
  font-size: .8rem;
  text-align: left;
  position: relative;
}
.gam-badge.locked { opacity: .55; filter: grayscale(.7); }
.gam-badge.earned { border-color: var(--gam-gold); background: #fff8ea; }
.gam-badge-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 6px;
}
.gam-badge-name {
  font-weight: 700;
  color: var(--gam-navy);
  font-size: .88rem;
  margin-bottom: 4px;
}
.gam-badge-hint {
  color: #4a5568;
  font-size: .76rem;
  line-height: 1.4;
}
.gam-badge-when {
  margin-top: 6px;
  font-size: .7rem;
  color: var(--gam-gold-dk);
  letter-spacing: .04em;
  text-transform: uppercase;
}
@media (max-width: 480px) {
  .gam-badge-grid { grid-template-columns: 1fr; }
}

/* ---------- TOASTS ---------- */
.gam-toast {
  position: fixed;
  font-family: Helvetica, Arial, sans-serif;
  z-index: 80;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.gam-toast-in { opacity: 1; transform: translateY(0); }
.gam-toast-out { opacity: 0; transform: translateY(20px); }

.gam-toast-xp {
  bottom: 22px;
  right: 22px;
  width: 280px;
  background: rgba(0,34,68,.95);
  color: var(--gam-cream);
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 3px solid var(--gam-gold);
  font-size: .82rem;
}
.gam-toast-xp .gam-toast-xp {
  position: static;
  width: auto;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 4px;
  color: var(--gam-gold);
  font-weight: 700;
  font-size: .94rem;
  border-radius: 0;
  box-shadow: none;
}
.gam-toast-xp .gam-toast-detail { color: var(--gam-cream); font-size: .78rem; }

.gam-toast-badge {
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: linear-gradient(135deg, var(--gam-gold-dk), var(--gam-gold));
  color: var(--gam-navy-dk);
  padding: 14px 18px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 280px;
  max-width: calc(100% - 40px);
}
.gam-toast-badge.gam-toast-in { transform: translate(-50%, 0); }
.gam-toast-badge.gam-toast-out { transform: translate(-50%, 20px); }
.gam-toast-badge .gam-toast-icon { font-size: 2rem; line-height: 1; }
.gam-toast-badge .gam-toast-eyebrow {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: .8;
}
.gam-toast-badge .gam-toast-title {
  font-size: 1rem;
  font-weight: 700;
}
.gam-toast-badge .gam-toast-detail {
  font-size: .78rem;
  opacity: .85;
  line-height: 1.35;
}

.gam-toast-level {
  top: 60px;
  left: 50%;
  transform: translate(-50%, -10px);
  background: linear-gradient(90deg, var(--gam-gold-dk), var(--gam-gold));
  color: var(--gam-navy-dk);
  padding: 14px 24px;
  border-radius: 100px;
  font-weight: 700;
  text-align: center;
  min-width: 320px;
  max-width: calc(100% - 40px);
}
.gam-toast-level.gam-toast-in { transform: translate(-50%, 0); }
.gam-toast-level.gam-toast-out { transform: translate(-50%, -10px); }
.gam-toast-level .gam-toast-eyebrow {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.gam-toast-level .gam-toast-title {
  font-size: 1.05rem;
  margin-bottom: 2px;
}
.gam-toast-level .gam-toast-detail {
  font-size: .78rem;
  font-weight: 500;
  opacity: .85;
}

.gam-toast-max {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.92);
  background: linear-gradient(120deg, #b8860b 0%, #f3c54b 35%, #fff5d0 50%, #f3c54b 65%, #b8860b 100%);
  background-size: 200% 100%;
  animation-name: gam-max-shimmer;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  color: var(--gam-navy-dk);
  padding: 22px 32px;
  border-radius: 14px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-align: center;
  min-width: 360px;
  max-width: calc(100% - 40px);
  box-shadow:
    0 0 0 3px var(--gam-navy-dk),
    0 0 0 5px var(--gam-gold),
    0 18px 48px rgba(0,0,0,.45);
}
.gam-toast-max.gam-toast-in { transform: translate(-50%, -50%) scale(1); }
.gam-toast-max.gam-toast-out { transform: translate(-50%, -50%) scale(.92); }
.gam-toast-max .gam-toast-eyebrow {
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--gam-navy-dk);
}
.gam-toast-max .gam-toast-title {
  font-size: 1.5rem;
  margin-bottom: 6px;
  color: var(--gam-navy-dk);
  letter-spacing: .03em;
}
.gam-toast-max .gam-toast-detail {
  font-size: .92rem;
  font-weight: 500;
  color: var(--gam-navy-dk);
  opacity: .92;
  line-height: 1.45;
}
@keyframes gam-max-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.gam-confetti-mega {
  width: 12px;
  height: 18px;
  animation-duration: 1.9s;
}

.gam-hud-max .gam-hud-fill {
  background: linear-gradient(90deg, #b8860b, #fff5d0, #e3a82b, #fff5d0, #b8860b);
  background-size: 200% 100%;
  animation: gam-max-shimmer 4s linear infinite;
}

@media (max-width: 480px) {
  .gam-toast-xp { left: 12px; right: 12px; width: auto; }
  .gam-toast-badge, .gam-toast-level, .gam-toast-max { min-width: 0; width: calc(100% - 24px); }
}

/* ---------- SYNC MENU ---------- */
.gam-sync-menu {
  position: fixed;
  background: var(--gam-white);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  padding: 6px;
  z-index: 70;
  min-width: 220px;
  font-family: Helvetica, Arial, sans-serif;
}
.gam-sync-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 12px;
  font-family: inherit;
  font-size: .84rem;
  color: var(--gam-navy);
  border-radius: 6px;
  cursor: pointer;
}
.gam-sync-menu button:hover { background: #fdf8ee; color: var(--gam-gold-dk); }

/* ---------- PASSPHRASE MODAL ---------- */
.gam-modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 18px;
  font-family: Helvetica, Arial, sans-serif;
}
.gam-modal {
  background: var(--gam-white);
  border-radius: 12px;
  padding: 22px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(0,0,0,.4);
}
.gam-modal h3 {
  font-family: Helvetica, Arial, sans-serif;
  color: var(--gam-navy);
  margin: 0 0 8px;
  font-size: 1.15rem;
}
.gam-modal p {
  color: #4a5568;
  font-size: .86rem;
  line-height: 1.5;
  margin: 0 0 14px;
}
.gam-pp-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 7px;
  font-family: inherit;
  font-size: .92rem;
  outline: none;
  transition: border-color .15s;
}
.gam-pp-input:focus { border-color: var(--gam-navy); }
.gam-pp-input.gam-pp-bad { border-color: var(--gam-error); }
.gam-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.gam-btn-primary, .gam-btn-ghost {
  padding: 8px 16px;
  border-radius: 7px;
  font-family: inherit;
  font-size: .86rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.gam-btn-primary {
  background: var(--gam-navy);
  color: var(--gam-gold);
  border-color: var(--gam-navy);
}
.gam-btn-primary:hover { background: var(--gam-navy-dk); }
.gam-btn-ghost {
  background: var(--gam-white);
  color: #4a5568;
  border-color: #ccc;
}
.gam-btn-ghost:hover { background: #f4f4f0; }

/* ---------- POP GRAPHICS ---------- */
.gam-pop {
  position: fixed;
  pointer-events: none;
  z-index: 90;
  width: 56px;
  height: 56px;
  margin-left: -28px;
  margin-top: -28px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.35));
  animation: gam-coin-rise 1.4s cubic-bezier(.2,.7,.3,1) forwards;
  transform-style: preserve-3d;
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
}
.gam-pop svg {
  display: block;
  width: 100%;
  height: 100%;
}
@keyframes gam-coin-rise {
  0%   { transform: translateY(8px) scale(.4) rotateY(0deg);    opacity: 0; }
  18%  { transform: translateY(-12px) scale(1.18) rotateY(180deg); opacity: 1; }
  40%  { transform: translateY(-32px) scale(1) rotateY(360deg);  opacity: 1; }
  100% { transform: translateY(-110px) scale(.92) rotateY(720deg); opacity: 0; }
}

.gam-confetti {
  position: fixed;
  width: 9px;
  height: 14px;
  z-index: 89;
  pointer-events: none;
  border-radius: 1px;
  animation: gam-confetti-fly 1.3s cubic-bezier(.2,.6,.4,1) forwards;
  transform-origin: center;
  will-change: transform, opacity;
}
@keyframes gam-confetti-fly {
  0%   { transform: translate(-50%, -50%) rotate(0deg) scale(.6); opacity: 0; }
  10%  { transform: translate(calc(-50% + var(--dx) * .25), calc(-50% + var(--dy) * .25 - 10px)) rotate(120deg) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 80px)) rotate(720deg) scale(.85); opacity: 0; }
}

/* ---------- NEXT WIDGET ---------- */
.gam-next {
  position: sticky;
  top: 50px;
  z-index: 49;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  background: linear-gradient(90deg, var(--gam-cream), #fff8ea);
  color: var(--gam-navy-dk);
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-family: Helvetica, Arial, sans-serif;
  font-size: .82rem;
}
.gam-next-eyebrow {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gam-gold-dk);
  font-weight: 700;
}
.gam-next-label {
  flex: 1;
  font-weight: 600;
  color: var(--gam-navy);
}
.gam-next-xp {
  font-size: .76rem;
  color: var(--gam-gold-dk);
  font-weight: 600;
  white-space: nowrap;
}
.gam-next-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--gam-navy);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}
.gam-next-close:hover { background: rgba(0,51,102,.1); }
@media (max-width: 540px) {
  .gam-next { font-size: .76rem; gap: 6px; padding: 6px 10px; }
  .gam-next-eyebrow { display: none; }
}

/* ---------- COIN SHOWER ---------- */
.gam-pop-shower {
  animation-name: gam-coin-shower;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}
@keyframes gam-coin-shower {
  0%   { transform: translateY(0) rotateY(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(calc(100vh + 80px)) rotateY(720deg); opacity: 0.4; }
}

/* ---------- TROPHY PANEL ---------- */
.gam-trophy-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 17, 34, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
  padding: 18px;
  opacity: 0;
  transition: opacity .25s ease;
  font-family: Helvetica, Arial, sans-serif;
}
.gam-trophy-wrap.gam-open { opacity: 1; }
.gam-trophy {
  background: var(--gam-white);
  border-radius: 14px;
  padding: 26px 28px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 0 0 4px var(--gam-gold), 0 24px 60px rgba(0,0,0,.5);
  transform: translateY(16px) scale(.96);
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.gam-trophy-wrap.gam-open .gam-trophy { transform: translateY(0) scale(1); }
.gam-trophy-eyebrow {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gam-gold-dk);
  font-weight: 700;
  margin-bottom: 4px;
}
.gam-trophy-title {
  font-size: 1.6rem;
  color: var(--gam-navy);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: .01em;
}
.gam-trophy-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.gam-tstat {
  background: #fff8ea;
  border: 1px solid rgba(227,168,43,.4);
  border-radius: 8px;
  padding: 10px 12px;
}
.gam-tstat strong {
  display: block;
  color: var(--gam-navy);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
}
.gam-tstat span {
  display: block;
  font-size: .72rem;
  color: #4a5568;
  margin-top: 2px;
  letter-spacing: .02em;
}
.gam-trophy-close {
  display: block;
  width: 100%;
  font-size: .92rem;
  padding: 10px 18px;
}
@media (max-width: 540px) {
  .gam-trophy-stats { grid-template-columns: 1fr; }
  .gam-trophy-title { font-size: 1.3rem; }
}

/* ---------- PROGRESS JOURNAL ---------- */
.gam-journal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0,17,34,.6);
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  transition: opacity .2s ease;
  font-family: Helvetica, Arial, sans-serif;
}
.gam-journal-wrap.gam-open { opacity: 1; }
.gam-journal {
  background: var(--gam-white);
  border-radius: 12px;
  padding: 0;
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 22px 56px rgba(0,0,0,.45);
}
.gam-journal-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--gam-navy);
  color: var(--gam-cream);
  border-radius: 12px 12px 0 0;
}
.gam-journal-head strong { color: var(--gam-gold); font-size: 1rem; }
.gam-journal-head span { margin-left: auto; font-size: .76rem; opacity: .85; }
.gam-journal-close {
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: var(--gam-cream);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: .8rem;
}
.gam-journal-close:hover { background: rgba(255,255,255,.1); }
.gam-journal-section { padding: 14px 18px; border-bottom: 1px solid #eee; }
.gam-journal-section:last-child { border-bottom: none; }
.gam-journal-section h4 {
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gam-gold-dk);
  font-weight: 700;
  margin: 0 0 8px;
}
.gam-journal-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gam-journal-section li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dotted rgba(0,0,0,.06);
  font-size: .84rem;
  color: var(--gam-navy);
}
.gam-journal-section li:last-child { border-bottom: none; }
.gam-journal-section .gam-j-id { font-weight: 600; flex-shrink: 0; }
.gam-journal-section .gam-j-meta { flex: 1; color: #4a5568; font-size: .76rem; }
.gam-journal-section .gam-j-xp { color: var(--gam-gold-dk); font-weight: 700; font-size: .8rem; }
.gam-journal-section p { font-size: .86rem; color: #4a5568; margin: 0; }

/* ---------- EXTRA CREDIT MODAL ---------- */
.gam-extra-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 17, 34, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 115;
  padding: 18px;
  opacity: 0;
  transition: opacity .3s ease;
  font-family: Helvetica, Arial, sans-serif;
}
.gam-extra-wrap.gam-open { opacity: 1; }
.gam-extra {
  background: linear-gradient(180deg, #fff8ea 0%, #ffffff 100%);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 0 4px var(--gam-gold),
    0 0 0 7px var(--gam-navy-dk),
    0 24px 60px rgba(0,0,0,.5);
  transform: translateY(20px) scale(.94);
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.gam-extra-wrap.gam-open .gam-extra { transform: translateY(0) scale(1); }
.gam-extra-eyebrow {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gam-gold-dk);
  font-weight: 800;
  margin-bottom: 6px;
}
.gam-extra h3 {
  font-family: Helvetica, Arial, sans-serif;
  color: var(--gam-navy);
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 12px;
}
.gam-extra p {
  font-size: .95rem;
  color: var(--gam-navy-dk);
  line-height: 1.5;
  margin: 0 0 10px;
}
.gam-extra p strong {
  color: var(--gam-gold-dk);
}
.gam-extra-code {
  display: inline-block;
  background: var(--gam-navy);
  color: var(--gam-gold);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 12px 22px;
  border-radius: 8px;
  margin: 14px 0 18px;
  user-select: all;
  border: 2px solid var(--gam-gold);
  box-shadow: inset 0 1px 0 rgba(255,245,208,.2);
}
.gam-extra-meta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px !important;
}
.gam-extra-meta .gam-btn-primary,
.gam-extra-meta .gam-btn-ghost {
  text-decoration: none;
  display: inline-block;
}
.gam-extra-close {
  margin-top: 4px;
}
.gam-extra-foot {
  font-size: .76rem !important;
  color: #4a5568 !important;
  margin: 14px 0 0 !important;
  font-style: italic;
}

.gam-journal-bonus {
  background: linear-gradient(180deg, #fff8ea 0%, #ffffff 100%);
}
.gam-journal-bonus .gam-extra-code {
  display: block;
  margin: 10px auto 4px;
  text-align: center;
  font-size: 1.1rem;
}

/* ---------- VIDEO WATCH BUTTON ---------- */
.gam-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -8px 0 18px;
  padding: 7px 14px;
  background: var(--gam-navy);
  color: var(--gam-gold);
  border: 1px solid var(--gam-navy);
  border-radius: 100px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .15s, transform .12s;
}
.gam-video-btn:hover {
  background: var(--gam-navy-dk);
  transform: translateY(-1px);
}
.gam-video-btn.gam-watched {
  background: var(--gam-success);
  border-color: var(--gam-success);
  color: #fff;
  cursor: default;
}
.gam-video-btn.gam-watched:hover { transform: none; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .gam-hud-fill { transition: none; }
  .gam-hud-pulse { animation: none; }
  .gam-toast { transition: opacity .15s ease; transform: none !important; }
  .gam-toast-in, .gam-toast-out { transform: none !important; }
  .gam-badge-panel { transition: opacity .12s ease; transform: none !important; }
  .gam-hud-sync[data-status="sync"] .gam-hud-sync-dot { animation: none; }
  .gam-pop { animation: gam-pop-fade 1s ease-out forwards; }
  .gam-confetti { display: none; }
  .gam-toast-max { animation: none; }
  .gam-hud-max .gam-hud-fill { animation: none; }
  .gam-pop-shower { animation: gam-pop-fade 1.5s ease-out forwards; }
  .gam-hud-bar.gam-hud-flash { animation: none; }
  .gam-trophy { transition: none; transform: none !important; }
  .gam-journal-wrap, .gam-trophy-wrap, .gam-extra-wrap { transition: opacity .12s ease; }
  .gam-extra { transition: none; transform: none !important; }
}
@keyframes gam-pop-fade {
  0%   { opacity: 0; transform: none; }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: none; }
}
