/* ======== ADVENTURE MAKER ======== */
.adv-screen .cw-top { flex-wrap: wrap; }
.adv-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 1.25rem; }
.adv-chip { border: 2px solid #3b82f6; background: #eff6ff; color: #1d4ed8; border-radius: 999px; padding: 2px 12px; font-weight: 800;
  font-size: 1.05rem; cursor: pointer; }
.adv-save { flex: 0 0 auto; margin-left: auto; }
.adv-board-wrap { display: flex; justify-content: center; padding: 6px 0; }
.adv-sizer { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.adv-board { position: absolute; left: 0; top: 0; width: 512px; height: 384px; transform-origin: 0 0; touch-action: none;
  user-select: none; -webkit-user-select: none; cursor: crosshair; }
.adv-ground { position: absolute; inset: 0; width: 512px; height: 384px; image-rendering: pixelated; }
.adv-prop, .adv-chest { position: absolute; transform: translate(-50%, -100%); width: 40px; height: auto !important; max-height: 48px;
  image-rendering: pixelated; pointer-events: none; }
.adv-chest { width: 36px; }
.adv-stone { position: absolute; transform: translate(-50%, -100%); width: 34px; height: 34px; pointer-events: none; }
.adv-stone img { width: 100%; height: 100% !important; object-fit: contain; image-rendering: pixelated; }
.adv-stone span { position: absolute; right: -6px; top: -8px; font-size: 15px; background: #fff; border-radius: 50%; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.adv-stone.open img { opacity: 0.35; filter: grayscale(1); }
.adv-flag { position: absolute; transform: translate(-30%, -100%); font-size: 26px; pointer-events: none; z-index: 5; }
.adv-problems { margin: 4px 0; color: #b45309; font-weight: 600; }
.adv-problems ul { margin: 4px 0 0; padding-left: 20px; }
.adv-tools { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.adv-tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.adv-tool-row > b { width: 100%; font-size: 0.85rem; color: var(--color-text-muted); }
.adv-tool { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; border: 2px solid transparent;
  background: var(--color-surface-2, #f3f4f6); color: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.adv-tool img { width: 22px; height: 22px !important; object-fit: contain; image-rendering: pixelated; }
.adv-tool.on { border-color: #3b82f6; background: #dbeafe; }
.adv-swatch { width: 16px; height: 16px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,0.15); }
.adv-count { font-weight: 800; }
.adv-q-prompt { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.adv-q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adv-q-opt { padding: 12px 10px; font-size: 1rem; }
.adv-q-explain { color: var(--color-text-muted); margin: 6px 0 0; }
.adv-h { margin: 14px 0 6px; font-size: 0.95rem; }
.adv-row { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--color-border, #e5e7eb); }
.adv-row-title { flex: 1; font-weight: 700; display: flex; flex-direction: column; }
.adv-row-sub { font-weight: 500; font-size: 0.8rem; color: var(--color-text-muted); }
.adv-row-by { font-weight: 800; color: #7c3aed; }
.adv-row-btn { flex: 0 0 auto; padding: 8px 10px; font-size: 0.9rem; }
.adv-row-btn.alt { background: #e5e7eb; color: #1f2937; }
.adv-empty { color: var(--color-text-muted); margin: 10px 0 0; }
.adv-screen .cw-card { max-height: 70vh; overflow: auto; }

/* ======== FRIENDS ======== */
.fr-parent h3 { margin: 0 0 6px; }
.fr-parent h4 { margin: 14px 0 4px; }
.fr-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.fr-code { font-size: 1.05rem; }
.fr-code b { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; letter-spacing: 3px; color: #1d4ed8; }
.fr-report { color: #b45309; }
.fr-way { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--color-surface-2, #f3f4f6); line-height: 1.45; }
.fr-waiting { margin-top: 8px; }
.fr-wait-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fr-wait-row .fr-code b { font-size: 1.15rem; }
.fr-new-code { margin: 6px 0; font-size: 1.05rem; }
.fr-pad-box { margin-top: 8px; }
.fr-pad-box .fr-keys { max-width: 360px; }
.fr-by { color: #0e7490; }
.fr-got { font-size: 1.1rem; margin: 4px 0; }
.fr-slots { display: flex; gap: 6px; justify-content: center; margin: 12px 0; }
.fr-slot { width: 38px; height: 46px; border-radius: 10px; border: 2px solid #93c5fd; background: #eff6ff; display: flex; align-items: center;
  justify-content: center; font: 800 1.5rem ui-monospace, Menlo, monospace; color: #1d4ed8; }
.fr-keys { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.fr-key { padding: 9px 0; border: 0; border-radius: 9px; background: var(--color-surface-2, #f3f4f6); color: inherit;
  font: 800 1.05rem ui-monospace, Menlo, monospace; cursor: pointer; }
.fr-key-wide { grid-column: span 2; }
.cw-btn:disabled { opacity: 0.45; cursor: default; }
.cw-btn.alt { background: #e5e7eb; color: #1f2937; }
.fr-cheer { margin-top: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fr-sticker { font-size: 1.6rem; border: 0; background: #fef3c7; border-radius: 12px; padding: 4px 8px; cursor: pointer; }
.fr-report-btn { margin-top: 10px; border: 0; background: none; color: #b45309; font-weight: 700; cursor: pointer; padding: 0; }
.cw-friendvis .cw-visitor-name { background: #0e7490; }

/* Math stones: the shared scratch pad under the options. */
.adv-q-scratch { margin-top: 10px; text-align: center; }
.adv-q-scratch .pb-scratch-canvas { height: 180px; }
