/* ── Activity Screen (matches activity-screen-mock.html) ──────────── */

#screenActivity.active {
  flex: 1;
  width: 100%;
}

.act-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────── */

/* ── Game result banner ─────────────────────────────────────────── */

.act-result-banner {
  text-align: center;
  padding: 12px 24px 16px;
  animation: actResultIn 0.5s ease-out;
}

.act-result-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.act-result-banner.win .act-result-title {
  color: #e8899a;
  text-shadow: 0 0 24px rgba(232, 137, 154, 0.3);
  animation: actResultBounce 0.6s ease-out;
}

.act-result-banner.lose .act-result-title {
  color: var(--muted);
}

.act-result-banner.draw .act-result-title {
  color: var(--text);
  opacity: 0.85;
}

.act-result-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.act-result-banner .act-done-btn {
  animation: actResultIn 0.5s ease-out 0.2s both;
}

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

@keyframes actResultBounce {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Body (game area + sidebar) ──────────────────────────────────── */

.act-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Game Area ───────────────────────────────────────────────────── */

.act-game-area {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
  background:
    radial-gradient(ellipse 600px 600px at 50% 50%, rgba(194, 105, 122, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 30% 60%, rgba(194, 105, 122, 0.03) 0%, transparent 60%),
    radial-gradient(ellipse 250px 250px at 70% 35%, rgba(240, 232, 224, 0.02) 0%, transparent 60%);
}
.act-game-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 232, 224, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 232, 224, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */

.act-sidebar {
  width: 320px;
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(18, 16, 21, 0.97) 100%);
  border-left: 1px solid rgba(240, 232, 224, 0.06);
  overflow: hidden;
}

/* ── Sidebar header (companion + game info unified) ──────────────── */

.act-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid rgba(240, 232, 224, 0.06);
}

/* Top row: avatar | name+job | help button */
.act-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.act-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.act-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 20%, #e8899a 40%, transparent 50%, #c2697a 70%, transparent 80%);
  animation: avatarRing 6s linear infinite;
}

.act-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 20%, #e8899a 40%, transparent 50%, #c2697a 70%, transparent 80%);
  animation: avatarRing 6s linear infinite;
  filter: blur(6px);
  opacity: 0.35;
}

@keyframes avatarRing {
  to { transform: rotate(360deg); }
}

.act-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.act-header-info {
  flex: 1;
  min-width: 0;
}

.act-companion-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.act-companion-job {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.act-coach-btn,
.act-mute-btn,
.act-help-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 232, 224, 0.04);
  border: 1px solid rgba(240, 232, 224, 0.08);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
  position: relative;
}

.act-coach-btn svg,
.act-mute-btn svg,
.act-help-btn svg { width: 15px; height: 15px; }

.act-coach-btn:hover,
.act-mute-btn:hover,
.act-help-btn:hover {
  color: var(--text);
  border-color: rgba(194, 105, 122, 0.25);
  background: rgba(194, 105, 122, 0.06);
}

.act-coach-mascot { display: flex; align-items: center; justify-content: center; }

.act-coach-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  background: var(--rose);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.act-mute-btn.muted {
  color: var(--muted2, #7a6d72);
  opacity: 0.6;
}

/* Game strip: label | pieces | timer — all one row */
.act-game-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(194, 105, 122, 0.03);
  border: 1px solid rgba(240, 232, 224, 0.04);
  border-radius: 10px;
}

.act-game-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.act-game-strip-mid {
  display: flex;
  align-items: center;
  gap: 6px;
}

.act-timer-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.act-timer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e8899a;
  animation: timerPulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(232, 137, 154, 0.4);
}

@keyframes timerPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.act-game-timer {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.act-gp {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(240, 232, 224, 0.025);
  border: 1px solid rgba(240, 232, 224, 0.06);
}

.act-gp svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.you-gp { color: #e8899a; }
.comp-gp { color: var(--text); opacity: 0.7; }

.act-gp span {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: var(--text);
}

.act-gp-vs {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Voice channel (sidebar) ─────────────────────────────────────── */

.act-voice-section {
  padding: 8px 16px;
  border-bottom: 1px solid rgba(240, 232, 224, 0.06);
}

/* removed: .act-voice-disabled — button is always clickable, shows toast */

.act-voice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--surface-2, #121015);
  border: 1px solid rgba(240, 232, 224, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--muted);
}

.act-voice-btn:hover {
  border-color: rgba(240, 232, 224, 0.18);
  color: var(--text);
}

.act-voice-btn.active {
  border-color: rgba(194, 105, 122, 0.35);
  background: rgba(194, 105, 122, 0.06);
  color: var(--rose);
}

.act-voice-btn.dimmed {
  opacity: 0.55;
  cursor: pointer;  /* still clickable — shows toast on tap */
}

.act-voice-mic { flex-shrink: 0; }

.act-voice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted2);
  flex-shrink: 0;
}

.act-voice-dot.active {
  background: #4ade80;
  animation: voicePulse 1.5s infinite;
}

.act-voice-dot.warming {
  background: #facc15;
  animation: voicePulse 0.8s infinite;
}

.act-voice-btn.warming {
  border-color: rgba(250, 204, 21, 0.25);
  color: #facc15;
}

@keyframes voicePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.act-voice-text {
  font-size: 13px;
  flex: 1;
  text-align: left;
}

.act-voice-preview {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  padding: 4px 0 0;
  max-height: 28px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}

.act-voice-preview.visible { opacity: 1; }

/* ── Game chat (sidebar middle) ──────────────────────────────────── */

.act-chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.act-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 6px;
}

.act-chat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.act-chat-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.act-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: livePulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

@keyframes livePulse {
  0%, 100% { opacity: 0.5; box-shadow: 0 0 4px rgba(74, 222, 128, 0.3); }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }
}

.act-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 6px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--muted2) transparent;
}

.act-chat-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  animation: actMsgIn 0.25s ease-out;
}
@keyframes actMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.act-chat-msg.user {
  align-self: flex-end;
  background: rgba(194, 105, 122, 0.12);
  color: var(--text);
  border-bottom-right-radius: 4px;
}
.act-chat-msg.comp {
  align-self: flex-start;
  background: var(--surface-2, #121015);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.act-chat-msg.system {
  align-self: center;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
  padding: 4px 0;
}
.act-chat-msg .act-name-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--rose-dim, #8a4a57);
  margin-bottom: 2px;
}

.act-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(240, 232, 224, 0.06);
}

.act-chat-input {
  flex: 1;
  background: var(--surface-2, #121015);
  border: 1px solid rgba(240, 232, 224, 0.06);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.act-chat-input:focus {
  border-color: rgba(194, 105, 122, 0.2);
}
.act-chat-input::placeholder { color: var(--muted2); }

.act-chat-send {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rose, #c2697a);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.act-chat-send:hover { background: #e8899a; }
.act-chat-send svg { width: 16px; height: 16px; }

.act-chat-input-row.locked .act-chat-send {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Continue in main chat ────────────────────────────────────────── */

.act-chat-continue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(240, 232, 224, 0.06);
}
.act-continue-text {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.act-continue-btn {
  background: var(--rose, #c2697a);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 6px 18px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.act-continue-btn:hover { background: #e8899a; }

/* ── Typing indicator ────────────────────────────────────────────── */

.act-typing-dots {
  display: flex; gap: 4px; padding: 2px 0;
}
.act-typing-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
  animation: actTypingPulse 1.2s infinite;
}
.act-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.act-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes actTypingPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.2); }
}

/* ── End button (sidebar bottom) ─────────────────────────────────── */

.act-end-section {
  padding: 12px 16px;
  border-top: 1px solid rgba(240, 232, 224, 0.04);
}

.act-end-btn {
  width: 100%;
  padding: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(240, 232, 224, 0.03);
  border: 1px solid rgba(240, 232, 224, 0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}
.act-end-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
}

/* ── Footer (turn / score bar) ───────────────────────────────────── */

.act-footer {
  display: none; /* Footer info moved to header turn pill */
}

/* ── TTT Board ───────────────────────────────────────────────────── */

.act-ttt-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ── Turn indicator ──────────────────────────────────────────────── */

.ttt-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: tttHeaderIn 0.4s ease-out;
}

@keyframes tttHeaderIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ttt-turn-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ttt-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 24px;
  background: rgba(240, 232, 224, 0.02);
  border: 1px solid rgba(240, 232, 224, 0.06);
  transition: all 0.4s ease;
  opacity: 0.35;
}

.ttt-player.active {
  opacity: 1;
  border-color: rgba(194, 105, 122, 0.3);
  background: rgba(194, 105, 122, 0.06);
  box-shadow: 0 0 24px rgba(194, 105, 122, 0.08);
}

.ttt-player-piece {
  width: 18px;
  height: 18px;
}

.ttt-player-piece svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.ttt-player-piece.x-piece { color: #e8899a; }
.ttt-player-piece.o-piece { color: var(--text); opacity: 0.7; }

.ttt-player span {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.ttt-vs {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ── Status text ─────────────────────────────────────────────────── */

.act-ttt-status {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  min-height: 1.3em;
}

.ttt-thinking { color: var(--muted); }
.dot-pulse {
  display: inline-block;
  animation: dotPulse 1.2s infinite;
}

@keyframes dotPulse {
  0%, 20% { opacity: 0.3; }
  50% { opacity: 1; }
  80%, 100% { opacity: 0.3; }
}

/* ── Companion quip (below board) ────────────────────────────────── */

.act-quip {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  padding: 8px 20px;
  background: rgba(240, 232, 224, 0.025);
  border-radius: 16px;
  border: 1px solid rgba(240, 232, 224, 0.04);
  max-width: 340px;
  text-align: center;
  animation: quipSlideIn 0.3s ease-out;
}

@keyframes quipSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Board container ─────────────────────────────────────────────── */

.act-ttt-board-container {
  position: relative;
  width: 340px;
}

.act-ttt-board-container::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 440px; height: 440px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 105, 122, 0.05) 0%, transparent 70%);
  animation: boardAmbient 5s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes boardAmbient {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

/* ── Board grid ──────────────────────────────────────────────────── */

.act-ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 340px;
}

/* ── Cells ────────────────────────────────────────────────────────── */

.act-ttt-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  aspect-ratio: 1;
  background: rgba(240, 232, 224, 0.025);
  border: 1px solid rgba(240, 232, 224, 0.07);
  border-radius: 14px;
  cursor: default;
  transition: all 0.2s;
  user-select: none;
}

.act-ttt-cell.clickable {
  cursor: pointer;
}

.act-ttt-cell.clickable:hover {
  background: rgba(194, 105, 122, 0.06);
  border-color: rgba(194, 105, 122, 0.22);
  box-shadow: 0 0 24px rgba(194, 105, 122, 0.08),
              inset 0 0 24px rgba(194, 105, 122, 0.03);
}

.act-ttt-cell.clickable:hover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='12' y1='12' x2='28' y2='28' stroke='%23e8899a' stroke-width='3' stroke-linecap='round' opacity='0.3'/%3E%3Cline x1='28' y1='12' x2='12' y2='28' stroke='%23e8899a' stroke-width='3' stroke-linecap='round' opacity='0.3'/%3E%3C/svg%3E") no-repeat center;
  background-size: 44px 44px;
  pointer-events: none;
}

/* ── SVG pieces ──────────────────────────────────────────────────── */

.ttt-piece {
  width: 46px;
  height: 46px;
  fill: none;
  stroke-linecap: round;
  stroke-width: 3.5;
}

.ttt-x {
  stroke: #e8899a;
  filter: drop-shadow(0 0 8px rgba(232, 137, 154, 0.4));
}

.ttt-o {
  stroke: rgba(240, 232, 224, 0.7);
  filter: drop-shadow(0 0 6px rgba(240, 232, 224, 0.15));
}

/* Draw-in animation only for freshly placed pieces */
.act-ttt-cell.fresh .ttt-x line {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawStroke 0.3s ease-out forwards;
}

.act-ttt-cell.fresh .ttt-x line:nth-child(2) {
  animation-delay: 0.08s;
}

.act-ttt-cell.fresh .ttt-o circle {
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  animation: drawStroke 0.4s ease-out forwards;
}

.act-ttt-cell.fresh {
  animation: cellPlace 0.25s ease-out;
}

@keyframes drawStroke {
  to { stroke-dashoffset: 0; }
}

@keyframes cellPlace {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ── Win line ───────────────────────────────────────────────────── */

.ttt-win-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.ttt-win-line line {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: tttLineDrawn 0.5s ease-out 0.15s forwards;
  filter: drop-shadow(0 0 10px currentColor);
}

@keyframes tttLineDrawn {
  to { stroke-dashoffset: 0; }
}

/* ── Win cells ──────────────────────────────────────────────────── */

.act-ttt-cell.win-cell {
  animation: tttWinPulse 1.5s ease-in-out infinite;
}

.act-ttt-cell.win-cell.x {
  box-shadow: 0 0 24px rgba(232, 137, 154, 0.35);
  border-color: rgba(232, 137, 154, 0.4);
  background: rgba(232, 137, 154, 0.06);
}

.act-ttt-cell.win-cell.o {
  box-shadow: 0 0 24px rgba(240, 232, 224, 0.2);
  border-color: rgba(240, 232, 224, 0.25);
  background: rgba(240, 232, 224, 0.04);
}

@keyframes tttWinPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ── Sparkles ───────────────────────────────────────────────────── */

.ttt-sparkles {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}

.ttt-spark {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: #e8899a;
  animation: tttSparkBurst 0.8s ease-out var(--delay, 0s) forwards;
  opacity: 0;
}

.ttt-spark:nth-child(odd) { background: #f0e8e0; }
.ttt-spark:nth-child(3n) { background: #facc15; }

@keyframes tttSparkBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
}

/* ── Celebration ─────────────────────────────────────────────────── */

.act-ttt-wrap.ttt-celebrate {
  animation: tttCelebrateBg 2s ease-out;
}

@keyframes tttCelebrateBg {
  0% { background: rgba(232, 137, 154, 0.1); }
  100% { background: transparent; }
}

/* ── Done button ─────────────────────────────────────────────────── */

.act-done-btn {
  padding: 10px 32px;
  background: var(--rose, #c2697a);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.act-done-btn:hover {
  background: #e8899a;
  box-shadow: 0 0 20px rgba(232, 137, 154, 0.2);
}

/* ── Help modal ──────────────────────────────────────────────────── */

.act-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.act-help-overlay.visible { opacity: 1; }

.act-help-panel {
  width: 380px;
  max-height: 80vh;
  background: var(--bg2, #1a171f);
  border: 1px solid rgba(240, 232, 224, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.2s ease;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.act-help-overlay.visible .act-help-panel {
  transform: scale(1) translateY(0);
}

.act-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(240, 232, 224, 0.06);
}

.act-help-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.act-help-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(240, 232, 224, 0.08);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.act-help-close svg { width: 14px; height: 14px; }
.act-help-close:hover { color: var(--text); border-color: rgba(240, 232, 224, 0.2); }

.act-help-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
}

.act-help-section {
  margin-bottom: 18px;
}

.act-help-section:last-child { margin-bottom: 0; }

.act-help-section-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.act-help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.act-help-list li {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  padding-left: 20px;
  position: relative;
}

ol.act-help-list { counter-reset: help-step; }

ol.act-help-list li::before {
  counter-increment: help-step;
  content: counter(help-step);
  position: absolute;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(194, 105, 122, 0.12);
  color: #e8899a;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 1px;
}

ul.act-help-list.tips li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(194, 105, 122, 0.35);
}

.act-help-rewards {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  padding: 10px 14px;
  background: rgba(194, 105, 122, 0.04);
  border-radius: 10px;
  border: 1px solid rgba(194, 105, 122, 0.08);
}

/* ── Game chat typing indicator ──────────────────────────────────── */

.act-typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 2px 0;
}
.act-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted, #9a8088);
  opacity: 0.4;
  animation: act-typing-bounce 1.2s infinite;
}
.act-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.act-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes act-typing-bounce {
  0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ── Connect Four ────────────────────────────────────────────────── */

.c4-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
.c4-wrap.c4-celebrate .c4-board { animation: ttt-board-celebrate 0.6s ease; }

.c4-board-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ghost piece shown above the hovered column */
.c4-ghost-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 354px;
  padding: 0 8px;
  margin-bottom: 6px;
  box-sizing: border-box;
  height: 42px;
}
.c4-ghost-cell {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.12s;
}
.c4-ghost-cell.visible {
  opacity: 1;
}

.c4-board {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 354px;
  background: var(--card-bg, #1e1e2e);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
}

.c4-cell {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg, #0f0f1a);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.c4-cell svg {
  width: 34px;
  height: 34px;
}
/* Drop animation: piece enters from above the board and falls to its row.
   The board has overflow:hidden so the piece appears to enter from the top edge.
   All pieces start 300px above their position (above the board) and fall into place. */
.c4-cell.c4-dropping svg {
  animation: c4-drop 0.45s cubic-bezier(0.33, 0, 0.67, 1.1);
}
@keyframes c4-drop {
  0%   { transform: translateY(-300px); opacity: 0.4; }
  60%  { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

.c4-cell.win-cell {
  box-shadow: 0 0 12px rgba(232, 137, 154, 0.6);
  animation: c4-win-pulse 1s ease-in-out infinite alternate;
}

@keyframes c4-win-pulse {
  from { box-shadow: 0 0 8px rgba(232, 137, 154, 0.4); }
  to { box-shadow: 0 0 16px rgba(232, 137, 154, 0.8); }
}

/* ── Would You Rather ────────────────────────────────────────────── */

/* Strip counters in the sidebar header (replaces X vs You for WYR).
   Compact mode hides the redundant activity label so the pills + timer
   have breathing room. */
.act-game-strip.wyr-compact .act-game-label { display: none; }
.act-game-strip.wyr-compact .act-game-strip-mid {
  gap: 8px;
  justify-content: flex-start;
}

.act-wyr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(240, 232, 224, 0.04);
  border: 1px solid rgba(240, 232, 224, 0.08);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted, #9a8088);
  white-space: nowrap;
  line-height: 1;
}

.act-wyr-pill-val {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.act-wyr-pill-dim {
  color: var(--muted2, #7a6d72);
}

.act-wyr-pill-val.pulse {
  animation: actWyrPulse 0.5s ease-out;
}

@keyframes actWyrPulse {
  0%   { transform: scale(1); color: var(--text); }
  50%  { transform: scale(1.4); color: #e8899a; }
  100% { transform: scale(1); color: var(--text); }
}

/* Game area layout */
.act-wyr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 32px;
  height: 100%;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  animation: actResultIn 0.35s ease-out;
}

.act-wyr-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted, #9a8088);
  font-size: 14px;
  font-style: italic;
}

.act-wyr-round-header {
  display: flex;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.3px;
}
.act-wyr-round-tag {
  background: rgba(232, 137, 154, 0.12);
  color: #e8899a;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
}
.act-wyr-theme-tag {
  background: rgba(240, 232, 224, 0.05);
  color: var(--muted, #9a8088);
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}

.act-wyr-question {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  line-height: 1.3;
  max-width: 720px;
}

.act-wyr-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
  max-width: 720px;
}

.act-wyr-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 180px;
  padding: 28px 24px;
  background: var(--surface, rgba(255, 255, 255, 0.025));
  border: 2px solid rgba(240, 232, 224, 0.10);
  border-radius: 16px;
  text-align: center;
  font-family: var(--font-body);
  color: var(--text);
  transition:
    transform 0.18s ease-out,
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}
/* Button variant (active round) — strip UA defaults that fight our styling. */
button.act-wyr-card {
  cursor: pointer;
  font: inherit;
  outline: none;
}
button.act-wyr-card:focus-visible {
  border-color: rgba(232, 137, 154, 0.7);
  box-shadow: 0 0 0 3px rgba(232, 137, 154, 0.25);
}

.act-wyr-card:not(.revealed):not(.waiting):not(.user-picked):hover {
  transform: translateY(-3px);
  border-color: rgba(232, 137, 154, 0.45);
  background: rgba(232, 137, 154, 0.06);
  box-shadow: 0 6px 18px rgba(232, 137, 154, 0.15);
}

.act-wyr-card-letter {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #e8899a;
  opacity: 0.7;
  line-height: 1;
}

.act-wyr-card-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}

.act-wyr-card.user-picked {
  border-color: rgba(232, 137, 154, 0.7);
  background: rgba(232, 137, 154, 0.08);
}

.act-wyr-card.waiting {
  opacity: 0.5;
  cursor: default;
}

.act-wyr-card.comp-picked {
  border-color: rgba(240, 232, 224, 0.45);
  background: rgba(240, 232, 224, 0.04);
}

.act-wyr-card.matched-card {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.10);
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.25);
  animation: actWyrMatchGlow 1.2s ease-out;
}

.act-wyr-card.not-picked {
  opacity: 0.45;
}

.act-wyr-card.revealed {
  cursor: default;
  animation: actWyrFlip 0.45s ease-out;
}

@keyframes actWyrFlip {
  0%   { transform: rotateY(180deg); opacity: 0; }
  60%  { transform: rotateY(-8deg); opacity: 1; }
  100% { transform: rotateY(0); opacity: 1; }
}

@keyframes actWyrMatchGlow {
  0%   { box-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  40%  { box-shadow: 0 0 32px rgba(74, 222, 128, 0.5); }
  100% { box-shadow: 0 0 24px rgba(74, 222, 128, 0.25); }
}

.act-wyr-card-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.act-wyr-card-tag.user-tag {
  background: rgba(232, 137, 154, 0.2);
  color: #e8899a;
}
.act-wyr-card-tag.comp-tag {
  background: rgba(240, 232, 224, 0.1);
  color: var(--text);
}
.act-wyr-card-tag.both-tag {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.act-wyr-hint {
  font-size: 12px;
  color: var(--muted, #9a8088);
  text-align: center;
}

.act-wyr-reveal-row {
  margin-top: 4px;
}
.act-wyr-reveal-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}
.act-wyr-reveal-text.matched { color: #4ade80; }
.act-wyr-reveal-text.mismatched { color: var(--muted, #9a8088); }

.act-wyr-next-btn {
  margin-top: 4px;
  padding: 12px 28px;
  background: var(--rose, #c2697a);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.18s;
  animation: actWyrNextPulse 1.6s ease-in-out infinite;
}
.act-wyr-next-btn:hover {
  background: #e8899a;
  animation: none;
  transform: translateY(-1px);
}
.act-wyr-next-btn:active {
  animation: none;
  transform: translateY(0);
}

@keyframes actWyrNextPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(194, 105, 122, 0); }
  50%      { transform: scale(1.06); box-shadow: 0 0 16px 4px rgba(194, 105, 122, 0.25); }
}

/* Confetti burst on match */
.act-wyr-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.act-wyr-confetti-particle {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: actWyrConfetti 1s ease-out forwards;
}

@keyframes actWyrConfetti {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--drift, 0px), -180px) rotate(540deg) scale(0.4);
    opacity: 0;
  }
}

/* ── WYR summary ──────────────────────────────────────────────────── */

.act-wyr-summary {
  max-width: 440px;
  margin: 12px auto 18px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.act-wyr-summary-text {
  color: var(--text-secondary, #aaa);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  animation: actWyrSummaryFade 0.5s ease-in;
}

.act-wyr-summary-loading {
  display: flex;
  gap: 6px;
  align-items: center;
}

.act-wyr-summary-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary, #aaa);
  opacity: 0.4;
  animation: actWyrDotPulse 1.2s ease-in-out infinite;
}

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

@keyframes actWyrDotPulse {
  0%, 80%, 100% { opacity: 0.4; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.3); }
}

@keyframes actWyrSummaryFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── This or That ────────────────────────────────────── */

.act-tot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    padding: 32px 20px;
}

.act-tot-prompt {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.act-tot-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    margin: 20px 0;
}

.act-tot-btn {
    flex: 1;
    max-width: 240px;
    min-width: 160px;
    padding: 32px 24px;
    border-radius: var(--radius-lg, 12px);
    background: var(--card-bg);
    border: 2px solid var(--border);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: var(--font-body);
    color: var(--text);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.act-tot-btn:hover:not(.disabled) {
    border-color: var(--rose);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.act-tot-btn:active:not(.disabled) {
    transform: translateY(-1px);
}

.act-tot-btn.disabled {
    cursor: default;
}

.act-tot-btn.reveal-btn {
    opacity: 1;
}

.act-tot-btn.user-picked {
    border-color: var(--blue);
    background: rgba(var(--blue-rgb), 0.12);
    box-shadow: 0 0 16px rgba(var(--blue-rgb), 0.15);
}

.act-tot-btn.comp-picked {
    border-color: var(--rose);
    background: rgba(var(--rose-rgb), 0.12);
    box-shadow: 0 0 16px rgba(var(--rose-rgb), 0.15);
}

.act-tot-btn.matched-btn {
    border-color: var(--green);
    background: rgba(var(--green-rgb), 0.12);
    box-shadow: 0 0 20px rgba(var(--green-rgb), 0.2);
}

.act-tot-btn-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.act-tot-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.act-tot-tag.you-tag {
    background: rgba(var(--blue-rgb), 0.2);
    color: var(--blue);
}

.act-tot-tag.comp-tag {
    background: rgba(var(--rose-rgb), 0.2);
    color: var(--rose);
}

.act-tot-tag.both-tag {
    background: rgba(var(--green-rgb), 0.2);
    color: var(--green);
}

.act-tot-vs {
    font-size: 0.8rem;
    color: var(--muted);
    align-self: center;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.act-tot-category {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 4px;
}

.act-tot-progress {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.act-tot-round-num {
    font-size: 0.75rem;
    color: var(--muted);
}

.act-tot-match-count {
    font-size: 0.75rem;
    color: var(--green);
    font-weight: 600;
}

.act-tot-verdict {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 4px;
}

.act-tot-verdict.match {
    color: var(--green);
}

.act-tot-verdict.mismatch {
    color: var(--muted);
}

.act-tot-reaction {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-style: italic;
}

.act-tot-thinking-indicator {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 12px;
}

.act-tot-next-btn {
    margin-top: 16px;
    padding: 10px 28px;
    border-radius: var(--radius-md);
    background: rgba(var(--rose-rgb), 0.15);
    border: 1px solid rgba(var(--rose-rgb), 0.3);
    color: var(--rose);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-body);
}

.act-tot-next-btn:hover {
    background: rgba(var(--rose-rgb), 0.25);
    transform: translateY(-1px);
}

/* ── Adventures Browse ──────────────────────────────────────────── */

.adv-browse {
    padding: 20px 24px 24px; flex: 1; overflow-y: auto;
}
.adv-create-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; background: var(--rose-bg, rgba(194,105,122,0.12));
    color: var(--rose, var(--accent)); border: 1px solid rgba(194,105,122,0.2);
    border-radius: 8px; font-weight: 600; font-size: 12px; cursor: pointer;
    font-family: inherit; transition: all 0.2s ease;
    white-space: nowrap; flex-shrink: 0;
}
.adv-create-btn:hover { background: rgba(194,105,122,0.2); }
.adv-create-btn svg { flex-shrink: 0; width: 12px; height: 12px; }

.adv-tabs {
    display: flex; gap: 2px; margin-bottom: 1.25rem; background: var(--bg3, var(--bg2));
    border-radius: 10px; padding: 3px; border: 1px solid var(--border);
}
.adv-tab {
    flex: 1; padding: 8px 12px; border: none; background: transparent;
    color: var(--muted, var(--text2)); font-size: 0.78rem; font-weight: 600;
    cursor: pointer; border-radius: 8px; transition: all 0.2s ease;
    font-family: var(--font-body, inherit); white-space: nowrap;
}
.adv-tab.active {
    background: var(--surface, var(--bg2)); color: var(--cream, var(--text1));
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.adv-tab:hover:not(.active) { color: var(--cream, var(--text1)); background: rgba(255,255,255,0.03); }

.adv-filters { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.adv-filter-select {
    padding: 8px 12px; background: var(--bg3, var(--bg2)); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text1); font-size: 0.8rem;
    font-family: var(--font-body, inherit); cursor: pointer;
}

.adv-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px; min-height: 300px;
}
@keyframes advFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Cards ─────────────────────────────────────────────────────── */

.adv-card, .adv-session-card {
    background: var(--surface, var(--bg2)); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; cursor: pointer;
    transition: all 0.2s ease; display: flex; flex-direction: column;
}
.adv-card:hover, .adv-session-card:hover {
    border-color: var(--accent); transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.adv-card-cover { aspect-ratio: 3/2; background: var(--bg3, var(--bg2)); }
.adv-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adv-card-cover-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--bg3, #1a1a2e) 0%, var(--surface, #16213e) 100%);
}
.adv-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }

.adv-card-top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px; gap: 6px;
}
.adv-card-genre {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--accent); line-height: 1;
}
.adv-card-tone {
    font-size: 0.65rem; color: var(--muted, var(--text3));
    text-transform: capitalize; line-height: 1;
}
.adv-card-title {
    font-size: 0.9rem; font-weight: 700; color: var(--cream, var(--text1));
    margin-bottom: 6px; line-height: 1.3;
}
.adv-card-desc {
    font-size: 0.75rem; color: var(--muted, var(--text2)); line-height: 1.45;
    margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.adv-card-author {
    display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.adv-card-author-avatar {
    width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.adv-card-author-avatar--fallback {
    background: var(--bg3, #2a2a2a); border: 1px solid var(--border);
}
.adv-card-author-name {
    font-size: 0.68rem; color: var(--muted, var(--text2)); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.adv-card-bottom {
    display: flex; align-items: center; gap: 10px; font-size: 0.68rem;
    color: var(--muted2, var(--text3)); border-top: 1px solid var(--border);
    padding-top: 8px; margin-top: auto;
}
.adv-card-bottom span { display: inline-flex; align-items: center; gap: 3px; }
.adv-card-bottom svg { opacity: 0.6; }
.adv-card-rating { color: var(--accent); }
.adv-card-reactions { color: var(--accent); margin-left: auto; }

.adv-session-chapter {
    font-size: 0.72rem; color: var(--muted, var(--text2)); margin-bottom: 8px;
}
.adv-session-status {
    font-size: 0.65rem; font-weight: 600; text-transform: capitalize;
    padding: 2px 8px; border-radius: 4px; line-height: 1;
}
.adv-status-active { color: var(--success); background: rgba(72, 199, 142, 0.1); }
.adv-status-paused { color: var(--warning); background: rgba(255, 183, 77, 0.1); }

.adv-session-actions { display: flex; gap: 6px; margin-top: auto; }
.adv-resume-btn {
    flex: 1; padding: 8px; border: none; border-radius: 8px;
    background: var(--accent); color: #fff; font-weight: 600; font-size: 0.8rem;
    cursor: pointer; transition: all 0.2s ease; font-family: var(--font-body, inherit);
}
.adv-resume-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.adv-end-btn {
    padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
    background: transparent; color: var(--muted, var(--text3)); cursor: pointer;
    transition: all 0.2s ease; display: flex; align-items: center; justify-content: center;
}
.adv-end-btn:hover { border-color: var(--red, #ef4444); color: var(--red, #ef4444); }

/* ── Empty + Loading states ─────────────────────────────────────── */

.adv-empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 4rem 2rem; grid-column: 1 / -1;
}
.adv-empty-icon { color: var(--muted, var(--text3)); opacity: 0.25; margin-bottom: 16px; }
.adv-empty-title {
    font-size: 0.9rem; color: var(--muted, var(--text2)); margin: 0;
    max-width: 280px; line-height: 1.4;
}
.adv-empty-hint {
    font-size: 0.78rem; color: var(--muted2, var(--text3)); margin: 6px 0 0;
    max-width: 260px; line-height: 1.4;
}
.adv-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; padding: 4rem 1rem; color: var(--muted, var(--text3));
    font-size: 0.82rem; grid-column: 1 / -1;
}
.adv-loading-spinner {
    width: 24px; height: 24px; border: 2px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%;
    animation: advSpin 0.6s linear infinite;
}
@keyframes advSpin { to { transform: rotate(360deg); } }

/* ── Detail view ────────────────────────────────────────────────── */

.adv-detail {
    max-width: 640px; width: 100%; margin: 0 auto; animation: advFadeIn 0.25s ease;
    grid-column: 1 / -1;
    display: flex; flex-direction: column;
}

.adv-detail-cover {
    width: 100%; max-height: 280px; object-fit: cover;
    border-radius: 12px; margin-bottom: 12px; display: block;
}

.adv-detail-hero {
    background: var(--surface, var(--bg2)); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px; margin-bottom: 12px;
}
.adv-detail-title {
    font-family: var(--ff-display, 'Cormorant Garamond', serif);
    font-size: 1.4rem; font-weight: 600; color: var(--cream, var(--text1));
    margin: 10px 0; line-height: 1.2;
}
.adv-detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.adv-badge {
    padding: 3px 10px; border-radius: 6px;
    font-size: 0.68rem; text-transform: capitalize;
    font-weight: 600; letter-spacing: 0.02em;
    background: rgba(var(--adv-primary-rgb, 233, 69, 96), 0.1);
    color: var(--adv-primary, var(--muted, var(--text2)));
    border: 1px solid rgba(var(--adv-primary-rgb, 233, 69, 96), 0.15);
}
.adv-detail-author {
    display: flex; align-items: center; gap: 8px; margin: 4px 0 10px;
    padding: 4px 0; transition: opacity 0.15s;
}
.adv-detail-author[data-user-id]:hover { opacity: 0.7; }
.adv-detail-author-avatar {
    width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.adv-detail-author-avatar--fallback {
    background: var(--bg3, #2a2a2a); border: 1px solid var(--border);
}
.adv-detail-author-name {
    font-size: 0.8rem; color: var(--muted, var(--text2)); font-weight: 500;
}
.adv-detail-desc {
    font-size: 0.85rem; color: var(--muted, var(--text2)); line-height: 1.55;
    margin: 0;
}
.adv-detail-stats {
    display: flex; gap: 14px; font-size: 0.75rem; color: var(--muted, var(--text3));
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.adv-detail-stats span { display: inline-flex; align-items: center; gap: 4px; }
.adv-detail-stats svg { opacity: 0.5; }

.adv-detail-body { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.adv-detail-section {
    padding: 14px 18px; background: var(--surface, var(--bg2));
    border: 1px solid var(--border); transition: border-color 0.15s;
}
.adv-detail-section:first-child { border-radius: 12px 12px 0 0; }
.adv-detail-section:last-child { border-radius: 0 0 12px 12px; }
.adv-detail-section:only-child { border-radius: 12px; }
.adv-detail-section h4 {
    font-size: 0.7rem; font-weight: 700; color: var(--adv-primary, var(--accent));
    text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 4px;
}
.adv-detail-section p { font-size: 0.82rem; color: var(--cream, var(--text1)); line-height: 1.5; margin: 0; }

.adv-detail-tags {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
    padding: 10px 14px; background: var(--surface, var(--bg2));
    border: 1px solid var(--border); border-radius: 10px;
}
.adv-tag {
    padding: 4px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 600;
    background: rgba(var(--adv-primary-rgb, 233, 69, 96), 0.1);
    color: var(--adv-primary, var(--muted, var(--text2)));
    border: 1px solid rgba(var(--adv-primary-rgb, 233, 69, 96), 0.2);
    letter-spacing: 0.01em;
}

.adv-detail-actions { display: flex; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.adv-detail-actions .adv-start-btn { flex: 1; }
.adv-start-btn {
    width: 100%; padding: 12px; border: none; border-radius: 10px;
    background: var(--adv-primary, var(--accent)); color: #fff; font-weight: 700; font-size: 0.88rem;
    cursor: pointer; transition: all 0.2s ease; font-family: var(--font-body, inherit);
    box-shadow: 0 4px 16px rgba(var(--adv-primary-rgb, 233, 69, 96), 0.25);
}
.adv-start-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.adv-start-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Owner status badge */
.adv-detail-status {
    display: inline-block; font-size: 10px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 6px; margin-bottom: 10px;
}
.adv-status-private { background: var(--muted2, #4a4048); color: var(--cream, #f0e8e0); }
.adv-status-pending_review { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.adv-status-published { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.adv-status-hidden_by_reports { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

/* Owner action buttons */
.adv-detail-owner-actions {
    display: flex; gap: 8px; margin-bottom: 12px;
}
.adv-owner-btn {
    flex: 1; padding: 10px; border-radius: 8px; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all 0.15s;
    background: var(--bg3, #121015); border: 1px solid var(--border2);
    color: var(--cream, #f0e8e0);
}
.adv-owner-btn:hover { border-color: var(--muted); }
.adv-owner-publish { background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.2); color: #4ade80; }
.adv-owner-publish:hover { background: rgba(74, 222, 128, 0.18); }
.adv-owner-delete { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.15); color: #f87171; }
.adv-owner-delete:hover { background: rgba(239, 68, 68, 0.15); }

.adv-detail-back {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    background: none; border: none; color: var(--muted, var(--text3));
    font-size: 0.78rem; cursor: pointer; padding: 8px 0;
    font-family: inherit; transition: color 0.15s; width: 100%;
}
.adv-detail-back:hover { color: var(--cream, var(--text1)); }
.adv-detail-back svg { flex-shrink: 0; }

/* Locked tile */
.adv-locked { text-align: center; padding: 4rem 2rem; }
.adv-locked-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.5; }
.adv-locked h3 {
    font-family: var(--ff-display, 'Cormorant Garamond', serif);
    font-size: 1.3rem; color: var(--cream, var(--text1)); margin: 0 0 0.5rem;
    font-weight: 600;
}
.adv-locked p { font-size: 0.85rem; color: var(--muted, var(--text2)); line-height: 1.5; max-width: 340px; margin: 0 auto 0.5rem; }
.adv-locked-hint { color: var(--muted2, var(--text3)); font-size: 0.78rem; }

/* ── Adventure Companion Picker ────────────────────────────────── */
.adv-picker-list { max-height: 280px; overflow-y: auto; margin: 16px 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.adv-picker-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    border: 1px solid var(--border2); cursor: pointer;
    transition: all 0.15s;
}
.adv-picker-item:hover:not(.disabled) { border-color: var(--rose); background: rgba(194,105,122,0.06); }
.adv-picker-item.disabled { opacity: 0.55; cursor: not-allowed; border-color: transparent; }
.adv-picker-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--bg3); }
.adv-picker-avatar img { width: 100%; height: 100%; object-fit: cover; }
.adv-picker-info { flex: 1; min-width: 0; }
.adv-picker-name { font-size: 13px; color: var(--cream); font-weight: 500; }
.adv-picker-stage { font-size: 11px; color: var(--muted); margin-top: 2px; }
.adv-picker-hint { font-size: 11px; color: var(--rose); opacity: 0.85; margin-top: 2px; }

/* ── Adventure Creation Wizard ──────────────────────────────────── */

.adv-wiz {
    padding: 2.5rem 3rem; width: 100%;
    height: 100%; display: flex; flex-direction: column;
    background: var(--bg2);
}
.adv-wiz-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 1.5rem; }
.adv-wiz-topbar .adv-wiz-progress { flex: 1; margin-bottom: 0; }
.adv-wiz-close {
    background: none; border: none; color: var(--muted, var(--text3));
    font-size: 1.4rem; cursor: pointer; padding: 2px 6px; border-radius: 6px;
    line-height: 1; transition: color 0.15s, background 0.15s; flex-shrink: 0;
}
.adv-wiz-close:hover { color: var(--cream, var(--text1)); background: var(--bg3); }
.adv-wiz-progress { height: 4px; background: var(--bg3, #1e1e24); border-radius: 2px; margin-bottom: 1.5rem; }
.adv-wiz-bar { height: 100%; background: var(--rose, var(--accent)); border-radius: 2px; transition: width 0.3s ease; }
.adv-wiz-header { margin-bottom: 1.5rem; }
.adv-wiz-step-num { font-size: 0.7rem; color: var(--muted, var(--text3)); text-transform: uppercase; letter-spacing: 0.05em; }
.adv-wiz-subtitle {
    font-family: var(--ff-display, 'Cormorant Garamond', serif);
    font-size: 1.3rem; font-weight: 600; color: var(--cream, var(--text1)); margin: 0.35rem 0 0;
}
.adv-wiz-body { flex: 1; overflow-y: auto; }

.adv-wiz-input {
    width: 100%; padding: 10px 14px; background: var(--bg3, var(--bg)); border: 1px solid var(--border);
    border-radius: 10px; color: var(--cream, var(--text1)); font-size: 0.9rem; font-family: inherit;
    box-sizing: border-box; outline: none;
}
.adv-wiz-input:focus { border-color: var(--rose); }
.adv-wiz-textarea {
    width: 100%; min-height: 100px; padding: 10px 14px; background: var(--bg3, var(--bg));
    border: 1px solid var(--border); border-radius: 10px; color: var(--cream, var(--text1));
    font-size: 0.9rem; font-family: inherit; resize: vertical; box-sizing: border-box; outline: none;
}
.adv-wiz-textarea:focus { border-color: var(--rose); }
.adv-wiz-charcount { text-align: right; font-size: 0.7rem; color: var(--text3); margin-top: 4px; }
.adv-wiz-hint { font-size: 0.8rem; color: var(--text3); margin-top: 0.5rem; }

.adv-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.adv-pick-opt {
    padding: 10px 14px; background: var(--surface, var(--bg2)); border: 1px solid var(--border);
    border-radius: 10px; color: var(--cream, var(--text1)); font-size: 0.85rem; cursor: pointer;
    text-transform: capitalize; transition: all 0.2s ease; font-family: inherit;
    text-align: center;
}
.adv-pick-opt.selected { border-color: var(--rose, #c2697a); background: var(--rose-bg, rgba(194,105,122,0.12)); color: var(--rose, #c2697a); }
.adv-pick-opt:hover:not(.selected) { border-color: var(--muted, var(--text3)); background: rgba(255,255,255,0.02); }

.adv-len-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adv-len-opt {
    padding: 12px; background: var(--surface, var(--bg2)); border: 1px solid var(--border);
    border-radius: 10px; color: var(--cream, var(--text1)); font-size: 0.85rem; cursor: pointer;
    transition: all 0.2s ease; font-family: inherit; text-align: center;
}
.adv-len-opt.selected { border-color: var(--rose, #c2697a); background: var(--rose-bg, rgba(194,105,122,0.12)); }

.adv-hook-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.5rem; }
.adv-hook-chip {
    padding: 7px 14px; background: var(--surface, var(--bg2)); border: 1px solid var(--border);
    border-radius: 20px; color: var(--muted, var(--text2)); font-size: 0.78rem; cursor: pointer;
    transition: all 0.2s ease; font-family: inherit;
}
.adv-hook-chip.selected { border-color: var(--rose, #c2697a); background: var(--rose-bg, rgba(194,105,122,0.12)); color: var(--rose, #c2697a); }

.adv-wiz-nav { display: flex; justify-content: space-between; gap: 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); margin-top: auto; }
.adv-wiz-btn {
    padding: 0.6rem 1.5rem; border: none; border-radius: 8px; font-weight: 600;
    font-size: 0.85rem; cursor: pointer; font-family: var(--font-body); transition: opacity 0.15s;
}
.adv-wiz-back { background: var(--bg3, var(--bg2)); color: var(--cream, var(--text1)); }
.adv-wiz-next { background: var(--rose, var(--accent)); color: #fff; }
.adv-wiz-save { background: var(--bg3, var(--bg2)); color: var(--cream, var(--text1)); }
.adv-wiz-publish { background: var(--rose, var(--accent)); color: #fff; }
.adv-wiz-btn:hover { opacity: 0.85; }

.adv-review {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 600px; margin: 0 auto; width: 100%;
}
.adv-rev-card {
  background: var(--bg3, #121015); border: 1px solid var(--border2);
  border-radius: 12px; padding: 16px 20px;
}
.adv-rev-card-title {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted, #8a7d82); margin-bottom: 12px; font-weight: 600;
}
.adv-rev-row {
  display: flex; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--border2);
}
.adv-rev-row:last-child { border-bottom: none; }
.adv-rev-label {
  width: 110px; flex-shrink: 0;
  font-size: 12px; font-weight: 600; color: var(--muted, #8a7d82);
  text-transform: capitalize;
}
.adv-rev-value {
  flex: 1; font-size: 13px; color: var(--cream, #f0e8e0);
  line-height: 1.5; word-break: break-word;
}
.adv-rev-empty { color: var(--muted2, #4a4048); font-style: italic; }
.adv-rev-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.adv-rev-pill {
  padding: 3px 10px; border-radius: 99px; font-size: 11px;
  background: var(--rose-bg, rgba(194,105,122,0.08));
  border: 1px solid var(--border);
  color: var(--rose, #c2697a);
}
.adv-rev-color-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; vertical-align: middle; margin-right: 6px;
}

.adv-wiz-gate { text-align: center; padding: 4rem 2rem; }
.adv-wiz-gate h3 { color: var(--text1); margin-bottom: 0.5rem; }
.adv-wiz-gate p { color: var(--text2); font-size: 0.9rem; }

/* ── Adventure Gameplay UI ──────────────────────────────────────── */

.adv-gameplay { padding: 1rem; }
.adv-gameplay-header { margin-bottom: 1rem; }
.adv-gameplay-title-row { display: flex; align-items: center; justify-content: space-between; }
.adv-gameplay-title { font-size: 1.1rem; font-weight: 700; color: var(--text1); margin: 0; }
.adv-gameplay-badges { display: flex; gap: 0.35rem; margin-top: 0.35rem; }
.adv-settings-cog {
    background: none; border: none; color: var(--text3); cursor: pointer; padding: 4px;
    border-radius: 4px; transition: color 0.15s;
}
.adv-settings-cog:hover { color: var(--text1); }

.adv-story-panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.6rem 0.8rem; margin-bottom: 0.5rem;
}
.adv-story-section { display: flex; flex-direction: column; gap: 2px; }
.adv-story-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text3); }
.adv-story-value { font-size: 0.8rem; color: var(--text1); line-height: 1.3; }
.adv-threads-list { margin: 0; padding-left: 1rem; font-size: 0.78rem; color: var(--text2); line-height: 1.4; }

/* Chapter break card */
.adv-chapter-card {
    margin: 0.75rem 0; animation: advChapterIn 0.5s ease;
}
.adv-chapter-card-inner {
    background: linear-gradient(135deg, var(--bg2) 0%, var(--surface) 100%);
    border: 1px solid var(--border); border-radius: 10px; padding: 1rem;
    text-align: center;
}
.adv-chapter-num { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.adv-chapter-title { font-size: 1rem; font-weight: 700; color: var(--text1); margin: 0.25rem 0; }
.adv-chapter-recap { font-size: 0.8rem; color: var(--text2); margin: 0; line-height: 1.4; }
.adv-chapter-card-fade { opacity: 0.5; transition: opacity 1s ease; }
@keyframes advChapterIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Post-adventure summary card */
.adv-summary-card { margin: 0.75rem 0; }
.adv-summary-inner {
    background: linear-gradient(135deg, var(--bg2) 0%, var(--surface) 100%);
    border: 1px solid var(--accent); border-radius: 10px; padding: 1.25rem;
    text-align: center;
}
.adv-summary-inner h3 { font-size: 1.1rem; color: var(--text1); margin: 0 0 0.75rem; }
.adv-summary-stats { display: flex; justify-content: center; gap: 2rem; margin-bottom: 0.75rem; }
.adv-summary-stat { display: flex; flex-direction: column; align-items: center; }
.adv-summary-val { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.adv-summary-label { font-size: 0.7rem; color: var(--text3); text-transform: uppercase; }
.adv-summary-outro { border-top: 1px solid var(--border); padding-top: 0.6rem; margin-top: 0.5rem; }
.adv-summary-outro p { font-size: 0.85rem; color: var(--text2); font-style: italic; margin: 0; }

/* Settings modal content */
.adv-toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; cursor: pointer; }
.adv-toggle-row span { font-size: 0.88rem; color: var(--text1); }
.adv-toggle-hint { font-size: 0.75rem; color: var(--text3); margin: 0 0 0.75rem; }

/* Adventure result card in chat */
.adv-result-card { border-color: var(--accent); }

/* Reactions on template cards */
.adv-detail-reactions { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 16px; }
.adv-reaction-chip {
    padding: 4px 10px; background: var(--bg3, var(--bg2)); border-radius: 20px;
    font-size: 0.72rem; color: var(--muted, var(--text2));
}
.adv-react-btn {
    padding: 0 14px; background: var(--surface, var(--bg2)); border: 1px solid var(--border);
    border-radius: 10px; font-size: 1.1rem; cursor: pointer; transition: all 0.2s ease;
}
.adv-react-btn.reacted {
    background: rgba(var(--adv-primary-rgb, 233, 69, 96), 0.15);
    border-color: var(--adv-primary, var(--accent));
}
.adv-react-btn:hover { transform: scale(1.08); }

/* ── Adventure Color Theming & Music Indicator ───────────────────── */

.adv-detail-music-indicator {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.72rem; color: var(--adv-primary, var(--text3));
    padding: 6px 0; margin-bottom: 8px; opacity: 0.7;
}
.adv-detail-music-indicator svg {
    animation: advMusicPulse 2s ease-in-out infinite;
}
@keyframes advMusicPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Color swatch picker (wizard) */
.adv-color-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px;
}
.adv-color-swatch {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 8px; background: var(--surface, var(--bg2));
    border: 2px solid var(--border); border-radius: 12px;
    cursor: pointer; transition: all 0.2s ease; font-family: inherit;
}
.adv-color-swatch.selected {
    border-color: var(--swatch); background: rgba(var(--adv-primary-rgb, 255,255,255), 0.06);
    box-shadow: 0 0 12px rgba(var(--adv-primary-rgb, 255,255,255), 0.15);
}
.adv-color-swatch:hover:not(.selected) { border-color: var(--text3); }
.adv-color-swatch-fill {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--swatch); transition: transform 0.15s;
}
.adv-color-swatch.selected .adv-color-swatch-fill { transform: scale(1.15); }
.adv-color-swatch-label {
    font-size: 0.72rem; color: var(--muted, var(--text2)); font-weight: 500;
}
.adv-color-swatch.selected .adv-color-swatch-label { color: var(--swatch); font-weight: 600; }

/* Music track picker (wizard) */
.adv-music-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px;
}
.adv-music-opt {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: var(--surface, var(--bg2));
    border: 1px solid var(--border); border-radius: 10px;
    color: var(--cream, var(--text1)); font-size: 0.82rem; cursor: pointer;
    transition: all 0.2s ease; font-family: inherit;
}
.adv-music-opt.selected {
    border-color: var(--rose, #c2697a);
    background: var(--rose-bg, rgba(194,105,122,0.12));
    color: var(--rose, #c2697a);
}
.adv-music-opt:hover:not(.selected) { border-color: var(--text3); }
.adv-music-label { flex: 1; text-align: left; }
.adv-music-play {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.08); border: none;
    color: var(--text2); cursor: pointer; flex-shrink: 0;
    transition: all 0.2s ease;
}
.adv-music-play:hover { background: rgba(255,255,255,0.15); color: var(--text1); }
.adv-music-play.playing { background: var(--rose, #c2697a); color: #fff; }
.adv-music-opt.selected .adv-music-play { color: var(--rose, #c2697a); }
.adv-music-opt.selected .adv-music-play.playing { color: #fff; }
