/* VoxelVille — UI styles. Everything namespaced under #ui-root / .vv-*.
   Chunky, rounded, bright, kid-friendly. */

:root {
  --vv-font: 'Comic Sans MS', 'Chalkboard SE', 'Segoe UI', system-ui, sans-serif;
  --vv-ink: #33322e;
  --vv-panel: #fffdf7;
  --vv-panel-2: #fff4d9;
  --vv-border: #33322e;
  --vv-red: #ff6b6b;
  --vv-blue: #4d96ff;
  --vv-yellow: #ffd93d;
  --vv-purple: #9b5de5;
  --vv-green: #06d6a0;
  --vv-grass: #7ec850;
  --vv-orange: #ff9f1c;
  --vv-shadow: 0 6px 0 rgba(0,0,0,0.18), 0 10px 24px rgba(0,0,0,0.18);
}

html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body { font-family: var(--vv-font); }

/* ---------- custom icon art (emoji fallback) ---------- */
.vv-ic { display: inline-flex; align-items: center; justify-content: center;
  width: 1.15em; height: 1.15em; vertical-align: -0.22em; flex: none; }
.vv-ic-img { width: 100%; height: 100%; object-fit: contain;
  image-rendering: auto; display: block; }
.vv-ic-emo { display: none; font-style: normal; line-height: 1; }
.vv-ic.noimg { width: auto; height: auto; }
.vv-ic.noimg .vv-ic-img { display: none; }
.vv-ic.noimg .vv-ic-emo { display: inline; }

#game-container { position: fixed; inset: 0; z-index: 0; }

#ui-root {
  position: fixed; inset: 0; z-index: 10;
  pointer-events: none;
  font-family: var(--vv-font);
  color: var(--vv-ink);
  -webkit-user-select: none; user-select: none;
  overflow: hidden;
}
#ui-root * { box-sizing: border-box; }

/* ---------- generic buttons ---------- */
.vv-btn {
  pointer-events: auto;
  font-family: var(--vv-font);
  font-size: 17px; font-weight: 700;
  color: var(--vv-ink);
  background: #fff;
  border: 3px solid var(--vv-border);
  border-radius: 16px;
  padding: 10px 18px;
  min-height: 44px; min-width: 44px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,0.22);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.vv-btn:hover { transform: translateY(-2px); }
.vv-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.22); }
.vv-btn-primary { background: var(--vv-green); color: #08321f; }
.vv-btn-secondary { background: var(--vv-yellow); }
.vv-btn-danger { background: var(--vv-red); color: #fff; }
.vv-btn-big { font-size: 22px; padding: 14px 28px; border-radius: 20px; }
.vv-btn-sm { font-size: 15px; padding: 8px 14px; }
.vv-disabled, .vv-btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.vv-btn:disabled:hover { transform: none; }
.vv-center-btn { display: block; margin: 18px auto 4px; }

/* ================= TITLE ================= */
.vv-screen { position: absolute; inset: 0; pointer-events: none; }
.vv-title-bg { position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(180deg, #aee7ff 0%, #cef3ff 60%, #d7f6c8 100%);
}
.vv-cloud, .vv-float { position: absolute; opacity: .9; }
.vv-cloud { font-size: 64px; animation: vv-drift 26s linear infinite; }
.vv-cloud-1 { top: 12%; left: -10%; animation-duration: 30s; }
.vv-cloud-2 { top: 26%; left: -20%; font-size: 90px; animation-duration: 42s; }
.vv-cloud-3 { top: 8%; left: -30%; font-size: 50px; animation-duration: 36s; }
@keyframes vv-drift { from { transform: translateX(-10vw); } to { transform: translateX(120vw); } }
.vv-float { font-size: 40px; animation: vv-bob 4s ease-in-out infinite; }
.vv-float-1 { bottom: 12%; left: 12%; animation-delay: 0s; }
.vv-float-2 { bottom: 20%; right: 14%; animation-delay: .6s; }
.vv-float-3 { bottom: 34%; left: 22%; animation-delay: 1.1s; font-size: 30px; }
.vv-float-4 { bottom: 16%; right: 28%; animation-delay: 1.6s; font-size: 34px; }
@keyframes vv-bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-18px) rotate(4deg); } }

.vv-title-card {
  pointer-events: auto;
  position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%);
  text-align: center; padding: 20px;
}
.vv-logo { display: inline-flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.vv-logo-letter {
  font-size: clamp(48px, 9vw, 104px); font-weight: 900; line-height: 1;
  color: #fff;
  text-shadow:
    3px 0 var(--vv-border), -3px 0 var(--vv-border), 0 3px var(--vv-border), 0 -3px var(--vv-border),
    6px 6px 0 rgba(0,0,0,0.28);
  animation: vv-pop .5s cubic-bezier(.2,1.4,.4,1) both, vv-letterbob 3s ease-in-out infinite;
}
.vv-logo-letter:nth-child(odd) { color: var(--vv-yellow); }
.vv-logo-letter:nth-child(3n) { color: var(--vv-green); }
.vv-logo-letter:nth-child(3n+1) { color: var(--vv-red); }
.vv-logo-letter:nth-child(5n) { color: var(--vv-blue); }
@keyframes vv-pop { from { transform: scale(.2) translateY(30px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes vv-letterbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.vv-tagline {
  margin-top: 14px; font-size: clamp(18px, 3vw, 28px); font-weight: 800; color: var(--vv-ink);
  background: #fff; display: inline-block; padding: 8px 20px; border: 3px solid var(--vv-border);
  border-radius: 999px; box-shadow: var(--vv-shadow);
}
.vv-title-buttons { margin-top: 30px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ================= CREATOR ================= */
.vv-creator-panel {
  pointer-events: auto;
  position: absolute; left: 0; top: 0; bottom: 0;
  width: min(42vw, 500px); min-width: 340px;
  background: var(--vv-panel);
  border-right: 4px solid var(--vv-border);
  box-shadow: 8px 0 24px rgba(0,0,0,0.22);
  display: flex; flex-direction: column;
  padding: 14px 14px 12px;
}
.vv-creator-header { margin-bottom: 8px; }
.vv-creator-title { font-size: 24px; font-weight: 900; }
.vv-creator-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vv-tab {
  pointer-events: auto; cursor: pointer;
  border: 3px solid var(--vv-border); border-radius: 14px;
  background: #fff; padding: 6px 9px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-family: var(--vv-font); font-weight: 700; font-size: 13px; color: var(--vv-ink);
  box-shadow: 0 3px 0 rgba(0,0,0,0.18);
  transition: transform .08s ease, background .15s ease;
}
.vv-tab .vv-tab-emoji { font-size: 20px; line-height: 1; }
.vv-tab:hover { transform: translateY(-2px); }
.vv-tab-active { background: var(--vv-yellow); transform: translateY(-2px); }
.vv-creator-body { flex: 1 1 auto; overflow-y: auto; padding-right: 4px; }
.vv-cat-group { margin-bottom: 16px; }
.vv-cat-title { font-size: 16px; font-weight: 800; margin: 4px 0 8px; opacity: .85; }
.vv-opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.vv-opt {
  pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  border: 3px solid var(--vv-border); border-radius: 14px; background: #fff;
  padding: 8px 10px; min-height: 44px;
  font-family: var(--vv-font); font-weight: 700; font-size: 15px; color: var(--vv-ink);
  box-shadow: 0 3px 0 rgba(0,0,0,0.15); text-align: left;
  transition: transform .08s ease, background .12s ease;
}
.vv-opt:hover { transform: translateY(-2px); }
.vv-opt-emoji { font-size: 20px; }
.vv-opt-dot { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--vv-border); flex: 0 0 auto; }
.vv-opt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-opt.vv-sel { background: var(--vv-green); color: #08321f; transform: translateY(-2px); box-shadow: 0 3px 0 rgba(0,0,0,0.25), 0 0 0 3px #fff, 0 0 0 6px var(--vv-green); }
.vv-swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vv-swatch {
  pointer-events: auto; cursor: pointer;
  width: 40px; height: 40px; border-radius: 12px; border: 3px solid var(--vv-border);
  box-shadow: 0 3px 0 rgba(0,0,0,0.18); transition: transform .08s ease;
}
.vv-swatch:hover { transform: translateY(-2px) scale(1.05); }
.vv-swatch.vv-sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--vv-blue), 0 3px 0 rgba(0,0,0,0.18); transform: scale(1.1); }
.vv-creator-footer { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 3px dashed rgba(0,0,0,0.15); margin-top: 6px; flex-wrap: wrap; }
.vv-name-wrap { flex: 1 1 140px; display: flex; align-items: center; gap: 6px; background: #fff; border: 3px solid var(--vv-border); border-radius: 14px; padding: 4px 10px; }
.vv-name-icon { font-size: 18px; }
.vv-name-input { pointer-events: auto; flex: 1; border: none; outline: none; background: transparent; font-family: var(--vv-font); font-size: 17px; font-weight: 700; color: var(--vv-ink); min-width: 60px; }
.vv-random-btn { flex: 0 0 auto; }
.vv-done-btn { flex: 0 0 auto; }

/* ================= HUD ================= */
.vv-hud { position: absolute; inset: 0; pointer-events: none; }
.vv-hud-top { position: absolute; top: 12px; left: 12px; display: flex; gap: 10px; flex-wrap: wrap; max-width: calc(100% - 220px); }
.vv-chip {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--vv-panel); border: 3px solid var(--vv-border); border-radius: 999px;
  padding: 7px 14px; min-height: 44px; font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.16);
}
.vv-chip-emoji { font-size: 20px; }
.vv-chip-money { background: #fff6c4; }
.vv-chip-dcp .vv-chip-val { letter-spacing: 2px; color: var(--vv-orange); }
.vv-pulse { animation: vv-chippop .4s ease; }
@keyframes vv-chippop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

.vv-hud-buttons { position: absolute; top: 12px; right: 12px; display: flex; gap: 10px; }
.vv-hud-btn {
  pointer-events: auto; cursor: pointer; position: relative;
  width: 54px; height: 54px; font-size: 26px;
  background: var(--vv-panel); border: 3px solid var(--vv-border); border-radius: 16px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.16);
  transition: transform .08s ease;
}
.vv-hud-btn:hover { transform: translateY(-2px); }
.vv-hud-btn:active { transform: translateY(2px); }
.vv-buzz-dot { display: none; position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; background: var(--vv-red); border: 2px solid #fff; border-radius: 50%; }
.vv-phone-btn.vv-buzzing .vv-buzz-dot { display: block; }
.vv-phone-btn.vv-buzzing { animation: vv-buzz .5s ease-in-out infinite; }
@keyframes vv-buzz { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }

.vv-needs { position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 7px;
  background: rgba(255,253,247,0.86); border: 3px solid var(--vv-border); border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.16); pointer-events: auto; }
.vv-need-row { display: flex; align-items: center; gap: 8px; }
.vv-need-emoji { font-size: 20px; width: 24px; text-align: center; }
.vv-bar { width: 150px; height: 16px; background: #e7e2d4; border: 2px solid var(--vv-border); border-radius: 999px; overflow: hidden; }
.vv-bar-fill { height: 100%; width: 100%; border-radius: 999px; transition: width .35s ease, background .3s ease; }
.vv-bar-fill.vv-green { background: linear-gradient(90deg, #06d6a0, #4ee6b6); }
.vv-bar-fill.vv-yellow { background: linear-gradient(90deg, #ffd93d, #ffe873); }
.vv-bar-fill.vv-red { background: linear-gradient(90deg, #ff6b6b, #ff9a8b); }

.vv-prompt {
  pointer-events: none;
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--vv-blue); color: #fff; border: 3px solid var(--vv-border);
  border-radius: 999px; padding: 10px 22px; font-size: 18px; font-weight: 800;
  box-shadow: var(--vv-shadow); animation: vv-promptin .2s ease, vv-promptbob 1.6s ease-in-out infinite;
}
@keyframes vv-promptin { from { transform: translateX(-50%) translateY(10px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
@keyframes vv-promptbob { 0%,100% { margin-bottom: 0; } 50% { margin-bottom: 6px; } }

/* ================= MODALS ================= */
.vv-modals { position: absolute; inset: 0; pointer-events: none; }
.vv-modal-overlay {
  pointer-events: auto;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(30,26,40,0.32); padding: 20px;
  animation: vv-fadein .18s ease;
}
@keyframes vv-fadein { from { opacity: 0; } to { opacity: 1; } }
.vv-modal {
  position: relative;
  background: var(--vv-panel); border: 4px solid var(--vv-border); border-radius: 24px;
  box-shadow: var(--vv-shadow);
  width: min(760px, 94vw); max-height: 88vh;
  display: flex; flex-direction: column;
  animation: vv-modalin .24s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes vv-modalin { from { transform: scale(.85) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.vv-modal-inner { padding: 20px; overflow-y: auto; }
.vv-close-btn {
  pointer-events: auto; cursor: pointer;
  position: absolute; top: -16px; right: -14px; z-index: 2;
  width: 46px; height: 46px; font-size: 22px; font-weight: 900; color: #fff;
  background: var(--vv-red); border: 3px solid var(--vv-border); border-radius: 50%;
  box-shadow: 0 4px 0 rgba(0,0,0,0.22); transition: transform .08s ease;
}
.vv-close-btn:hover { transform: scale(1.08) rotate(90deg); }
.vv-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vv-modal-emoji { font-size: 40px; }
.vv-modal-title { font-size: 24px; font-weight: 900; }
.vv-modal-sub { font-size: 15px; opacity: .75; font-weight: 700; }
.vv-wallet { margin-left: auto; background: #fff6c4; border: 3px solid var(--vv-border); border-radius: 999px; padding: 6px 14px; font-size: 18px; }

/* shop / inventory grids */
.vv-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.vv-shop-item {
  pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  border: 3px solid var(--vv-border); border-radius: 16px; background: #fff; padding: 12px 8px;
  font-family: var(--vv-font); color: var(--vv-ink); box-shadow: 0 4px 0 rgba(0,0,0,0.14);
  transition: transform .08s ease;
}
.vv-shop-item:hover:not(:disabled) { transform: translateY(-3px); }
.vv-shop-emoji { font-size: 40px; }
.vv-shop-name { font-weight: 800; font-size: 16px; }
.vv-shop-desc { font-size: 12px; opacity: .7; font-weight: 600; }
.vv-shop-tags { font-size: 13px; font-weight: 700; color: #2a7a5a; }
.vv-shop-price { margin-top: 4px; font-weight: 900; font-size: 17px; background: var(--vv-yellow); border: 2px solid var(--vv-border); border-radius: 999px; padding: 3px 12px; }
.vv-shop-item.vv-cant { opacity: .5; filter: grayscale(.5); cursor: not-allowed; }
.vv-shop-item.vv-cant .vv-shop-price { background: #eee; color: #999; }
.vv-shop-item.vv-owned { background: #e8ffe8; }
.vv-shop-item.vv-owned .vv-shop-price { background: var(--vv-green); color: #fff; }
.vv-empty { text-align: center; padding: 30px 10px; font-size: 18px; font-weight: 700; opacity: .7; }

/* job board */
.vv-job-list, .vv-home-list { display: flex; flex-direction: column; gap: 12px; }
.vv-job-card, .vv-home-card {
  display: flex; align-items: center; gap: 12px;
  border: 3px solid var(--vv-border); border-radius: 18px; background: #fff; padding: 12px 14px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.12);
}
.vv-job-current, .vv-home-current { background: #eafff4; box-shadow: 0 0 0 3px var(--vv-green), 0 4px 0 rgba(0,0,0,0.12); }
.vv-job-emoji, .vv-home-emoji { font-size: 38px; flex: 0 0 auto; }
.vv-job-mid, .vv-home-mid { flex: 1 1 auto; min-width: 0; }
.vv-job-name, .vv-home-name { font-size: 19px; font-weight: 900; }
.vv-job-desc, .vv-home-desc { font-size: 14px; opacity: .78; font-weight: 600; }
.vv-job-facts, .vv-home-facts { font-size: 14px; font-weight: 700; margin-top: 4px; }
.vv-job-rank { font-size: 14px; font-weight: 800; color: var(--vv-purple); margin-top: 3px; }
.vv-job-actions, .vv-home-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: 0 0 auto; }
.vv-job-badge { font-size: 13px; font-weight: 800; color: #2a7a5a; }

/* home subtabs */
.vv-subtabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.vv-subtab {
  pointer-events: auto; cursor: pointer;
  border: 3px solid var(--vv-border); border-radius: 14px; background: #fff; padding: 8px 14px; min-height: 44px;
  font-family: var(--vv-font); font-weight: 800; font-size: 16px; color: var(--vv-ink);
  box-shadow: 0 3px 0 rgba(0,0,0,0.14); transition: transform .08s ease;
}
.vv-subtab:hover { transform: translateY(-2px); }
.vv-subtab-active { background: var(--vv-blue); color: #fff; }
.vv-home-pane { min-height: 120px; }
.vv-big-action-note { font-size: 17px; font-weight: 700; text-align: center; margin: 8px 0; }
.vv-hint { text-align: center; font-weight: 800; color: #2a7a5a; margin-bottom: 6px; }

/* ================= PHONE ================= */
.vv-modal-phone { width: min(400px, 94vw); background: transparent; border: none; box-shadow: none; }
.vv-phone {
  background: #2b2b3a; border: 5px solid var(--vv-border); border-radius: 40px;
  padding: 16px 12px 20px; box-shadow: var(--vv-shadow); position: relative;
}
.vv-phone-notch { width: 120px; height: 20px; background: var(--vv-border); border-radius: 0 0 14px 14px; margin: 0 auto 12px; }
.vv-phone-screen { background: var(--vv-panel); border-radius: 24px; padding: 12px; max-height: 66vh; display: flex; flex-direction: column; }
.vv-phone-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.vv-phone-tab {
  pointer-events: auto; cursor: pointer; flex: 1;
  border: 3px solid var(--vv-border); border-radius: 14px; background: #fff; padding: 6px 4px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; font-family: var(--vv-font); font-weight: 700; color: var(--vv-ink);
}
.vv-phone-tab span { font-size: 20px; }
.vv-phone-tab small { font-size: 12px; }
.vv-phone-tab-active { background: var(--vv-yellow); }
.vv-phone-pane { overflow-y: auto; }
.vv-phone-heading { font-size: 18px; font-weight: 900; margin: 4px 0 10px; }
.vv-msg, .vv-friend {
  pointer-events: auto; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 10px; text-align: left;
  border: 3px solid var(--vv-border); border-radius: 16px; background: #fff; padding: 10px 12px; margin-bottom: 8px;
  font-family: var(--vv-font); color: var(--vv-ink); box-shadow: 0 3px 0 rgba(0,0,0,0.12); transition: transform .08s ease;
}
.vv-msg:hover, .vv-friend:hover { transform: translateY(-2px); }
.vv-msg-emoji { font-size: 26px; }
.vv-msg-body { flex: 1; min-width: 0; }
.vv-msg-title { font-weight: 800; font-size: 16px; }
.vv-msg-preview { font-size: 13px; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-msg-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--vv-red); flex: 0 0 auto; }
.vv-friend-face { font-size: 30px; }
.vv-friend-body { flex: 1; min-width: 0; }
.vv-friend-name { font-weight: 800; font-size: 16px; }
.vv-friend-pers { font-size: 12px; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-friend-lvl { text-align: right; flex: 0 0 auto; }
.vv-hearts { font-size: 15px; letter-spacing: 1px; }
.vv-friend-label { font-size: 12px; font-weight: 800; opacity: .8; }

/* ================= SCENARIO ================= */
.vv-modal-scenario { width: min(560px, 94vw); }
.vv-scn-tag { display: inline-block; background: var(--vv-purple); color: #fff; border: 2px solid var(--vv-border); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 800; margin-bottom: 10px; text-transform: capitalize; }
.vv-scn-title { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.vv-scn-text { font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 16px; }
.vv-scn-choices { display: flex; flex-direction: column; gap: 10px; }
.vv-scn-choice {
  pointer-events: auto; cursor: pointer; text-align: left;
  border: 3px solid var(--vv-border); border-radius: 16px; background: #fff; padding: 14px 16px; min-height: 44px;
  font-family: var(--vv-font); font-weight: 700; font-size: 17px; color: var(--vv-ink);
  box-shadow: 0 4px 0 rgba(0,0,0,0.14); transition: transform .08s ease, background .12s ease;
}
.vv-scn-choice:hover { transform: translateY(-2px); background: var(--vv-panel-2); }
.vv-feedback { text-align: center; border: 4px solid var(--vv-border); border-radius: 20px; padding: 20px; }
.vv-feedback.vv-great { background: #eafff4; border-color: var(--vv-green); }
.vv-feedback.vv-okay { background: #fffbe6; border-color: var(--vv-yellow); }
.vv-feedback.vv-oops { background: #fff0e6; border-color: var(--vv-orange); }
.vv-feedback-emoji { font-size: 56px; animation: vv-pop .4s cubic-bezier(.2,1.4,.4,1) both; }
.vv-feedback-word { font-size: 24px; font-weight: 900; margin: 4px 0; }
.vv-feedback-text { font-size: 17px; font-weight: 600; line-height: 1.4; }
.vv-feedback-dcp { margin-top: 10px; font-size: 18px; font-weight: 900; color: var(--vv-orange); }

/* ================= CHAT ================= */
.vv-modal-chat { width: min(560px, 94vw); }
.vv-chat-intro { font-size: 16px; font-style: italic; font-weight: 600; opacity: .85; margin-bottom: 10px; }
.vv-friend-prog { margin-bottom: 12px; }
.vv-friend-prog-label { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.vv-friend-prog-bar { height: 18px; background: #e7e2d4; border: 3px solid var(--vv-border); border-radius: 999px; overflow: hidden; }
.vv-friend-prog-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ff6b6b, #ff9ec7); border-radius: 999px; transition: width .7s cubic-bezier(.3,1,.4,1); }
.vv-chat-bubble { background: var(--vv-blue); color: #fff; border: 3px solid var(--vv-border); border-radius: 18px 18px 18px 4px; padding: 12px 16px; font-size: 17px; font-weight: 700; margin-bottom: 14px; animation: vv-pop .3s ease both; }
.vv-topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.vv-topic {
  pointer-events: auto; cursor: pointer; position: relative;
  display: flex; align-items: center; gap: 8px;
  border: 3px solid var(--vv-border); border-radius: 16px; background: #fff; padding: 12px; min-height: 44px;
  font-family: var(--vv-font); font-weight: 800; font-size: 16px; color: var(--vv-ink);
  box-shadow: 0 3px 0 rgba(0,0,0,0.14); transition: transform .08s ease;
}
.vv-topic:hover { transform: translateY(-2px); }
.vv-topic-emoji { font-size: 22px; }
.vv-topic-liked { background: #fff0f6; }
.vv-topic-star { position: absolute; top: -8px; right: -6px; font-size: 16px; }

/* ================= BADGES ================= */
.vv-modal-badges { width: min(680px, 94vw); }
.vv-dcp-banner { text-align: center; font-size: 18px; font-weight: 900; color: var(--vv-orange); margin-bottom: 10px; }
.vv-dcp-stepper { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.vv-dcp-step { flex: 1 1 0; min-width: 90px; text-align: center; border: 3px solid var(--vv-border); border-radius: 14px; background: #fff; padding: 8px 4px; opacity: .5; }
.vv-dcp-step.vv-dcp-on { opacity: 1; background: #fff6c4; }
.vv-dcp-star { display: block; font-size: 24px; color: var(--vv-orange); }
.vv-dcp-title { font-size: 12px; font-weight: 800; }
.vv-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.vv-badge { text-align: center; border: 3px solid var(--vv-border); border-radius: 18px; padding: 14px 8px; box-shadow: 0 4px 0 rgba(0,0,0,0.12); }
.vv-badge-on { background: #fffbe6; }
.vv-badge-off { background: #ececec; opacity: .65; }
.vv-badge-emoji { font-size: 44px; }
.vv-badge-off .vv-badge-emoji { filter: grayscale(1); }
.vv-badge-name { font-weight: 900; font-size: 16px; margin-top: 4px; }
.vv-badge-desc { font-size: 12px; opacity: .75; font-weight: 600; }

/* ================= HELP ================= */
.vv-help-list { display: flex; flex-direction: column; gap: 12px; }
.vv-help-row { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 3px solid var(--vv-border); border-radius: 16px; padding: 12px; box-shadow: 0 3px 0 rgba(0,0,0,0.1); }
.vv-help-emoji { font-size: 32px; flex: 0 0 auto; }
.vv-help-title { font-size: 18px; font-weight: 900; }
.vv-help-text { font-size: 15px; font-weight: 600; opacity: .8; line-height: 1.35; }
.vv-help-move { margin-top: 14px; text-align: center; font-size: 16px; font-weight: 800; background: var(--vv-panel-2); border: 3px solid var(--vv-border); border-radius: 14px; padding: 10px; }

/* ================= TOASTS ================= */
.vv-toasts { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; pointer-events: none; z-index: 50; width: 100%; }
.vv-toast {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--vv-panel); border: 3px solid var(--vv-border); border-radius: 999px;
  padding: 10px 20px; font-size: 17px; font-weight: 800; color: var(--vv-ink);
  box-shadow: var(--vv-shadow); max-width: 80vw;
  opacity: 0; transform: translateY(16px) scale(.9); transition: opacity .3s ease, transform .3s cubic-bezier(.2,1.4,.4,1);
}
.vv-toast-emoji { font-size: 22px; }
.vv-toast-in { opacity: 1; transform: translateY(0) scale(1); }
.vv-toast-out { opacity: 0; transform: translateY(-10px) scale(.95); }

/* ================= CELEBRATION ================= */
.vv-celebrate { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: auto; background: rgba(30,26,40,0.28); z-index: 60; animation: vv-fadein .2s ease; }
.vv-celebrate-out { opacity: 0; transition: opacity .5s ease; }
.vv-celebrate-card { position: relative; text-align: center; background: var(--vv-panel); border: 5px solid var(--vv-border); border-radius: 28px; padding: 28px 40px; box-shadow: var(--vv-shadow); animation: vv-modalin .4s cubic-bezier(.2,1.4,.4,1) both; z-index: 2; }
.vv-celebrate-emoji { font-size: 80px; animation: vv-badgespin 1s ease; }
@keyframes vv-badgespin { 0% { transform: scale(0) rotate(-180deg); } 60% { transform: scale(1.25) rotate(10deg); } 100% { transform: scale(1) rotate(0); } }
.vv-celebrate-title { font-size: 20px; font-weight: 800; color: var(--vv-orange); }
.vv-celebrate-name { font-size: 28px; font-weight: 900; }
.vv-celebrate-desc { font-size: 15px; font-weight: 600; opacity: .8; margin-top: 6px; }
.vv-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.vv-confetti-piece { position: absolute; top: -20px; width: 12px; height: 16px; border-radius: 3px; animation: vv-fall linear forwards; }
@keyframes vv-fall { 0% { transform: translateY(-20px) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(720deg); opacity: .9; } }

/* ================= TOUCH CONTROLS ================= */
.vv-touch-layer { position: absolute; inset: 0; pointer-events: none; display: none; z-index: 40; }
#ui-root.vv-touch .vv-touch-layer { display: block; }
#ui-root.vv-touch .vv-needs { bottom: 150px; }
.vv-joy-base {
  pointer-events: auto; touch-action: none;
  position: absolute; left: 26px; bottom: 26px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,253,247,0.5); border: 4px solid var(--vv-border);
  box-shadow: 0 4px 0 rgba(0,0,0,0.16);
}
.vv-joy-knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: var(--vv-blue); border: 4px solid var(--vv-border); box-shadow: 0 3px 0 rgba(0,0,0,0.25); }
.vv-interact-btn {
  pointer-events: auto; touch-action: none; cursor: pointer;
  position: absolute; right: 30px; bottom: 40px;
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--vv-yellow); border: 4px solid var(--vv-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 900; color: var(--vv-border);
  box-shadow: 0 5px 0 rgba(0,0,0,0.24);
}
.vv-interact-btn.vv-pressed { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,0.24); background: var(--vv-orange); }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px), (max-height: 720px) {
  .vv-chip { font-size: 15px; padding: 6px 11px; }
  .vv-chip-emoji { font-size: 17px; }
  .vv-bar { width: 120px; }
  .vv-creator-panel { width: min(52vw, 460px); }
  .vv-hud-btn { width: 48px; height: 48px; font-size: 22px; }
}
@media (max-height: 700px) {
  .vv-needs { padding: 6px 10px; gap: 5px; }
  .vv-bar { height: 13px; }
}

/* ---------- goals & needs-guide (guidance layer) ---------- */
.vv-need-row { cursor: pointer; border-radius: 10px; padding: 1px 3px; transition: background .15s ease; }
.vv-need-row:hover { background: rgba(255, 217, 61, 0.35); }
.vv-needs-hint { font-size: 11px; color: #8a8574; text-align: center; margin-top: 2px; }

.vv-goals-btn { position: relative; }
.vv-goals-count {
  position: absolute; bottom: -6px; right: -8px;
  background: #4d96ff; color: #fff; border: 2px solid var(--vv-border);
  border-radius: 999px; font-size: 11px; font-weight: bold;
  padding: 1px 6px; line-height: 1.3; pointer-events: none;
}

.vv-goals-list { display: flex; flex-direction: column; gap: 10px; }
.vv-goal-row {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 3px solid var(--vv-border); border-radius: 16px;
  padding: 10px 12px; box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}
.vv-goal-check { font-size: 20px; margin-top: 1px; }
.vv-goal-done { opacity: 0.55; }
.vv-goal-done .vv-help-title { text-decoration: line-through; }
.vv-goal-next {
  border-color: #4d96ff;
  background: #eef5ff;
  box-shadow: 0 3px 0 rgba(77, 150, 255, 0.45);
  animation: vv-goal-glow 1.6s ease-in-out infinite;
}
@keyframes vv-goal-glow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}
.vv-goals-alldone {
  margin-top: 12px; text-align: center; font-weight: bold; font-size: 17px;
  background: #fff7d6; border: 3px solid #ffd93d; border-radius: 16px; padding: 12px;
}

.vv-help-section { font-weight: bold; font-size: 17px; margin: 16px 0 8px; }
.vv-row-focus { border-color: #4d96ff; background: #eef5ff; box-shadow: 0 3px 0 rgba(77, 150, 255, 0.45); }

/* ================= QUEST PATHS (SPEC2) ================= */
.vv-modal-quests { width: min(820px, 96vw); }

/* Tech Citizen level chip + progress bar */
.vv-tc-chip {
  background: linear-gradient(180deg, #fff6c4, #ffe9a8);
  border: 3px solid var(--vv-border); border-radius: 16px;
  padding: 10px 14px; margin-bottom: 14px; box-shadow: 0 3px 0 rgba(0,0,0,0.12);
}
.vv-tc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.vv-tc-level { font-size: 18px; font-weight: 900; }
.vv-tc-count { font-size: 16px; font-weight: 900; color: var(--vv-orange); }
.vv-tc-bar { height: 16px; background: #e7e2d4; border: 2px solid var(--vv-border); border-radius: 999px; overflow: hidden; }
.vv-tc-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--vv-orange), var(--vv-yellow)); transition: width .5s ease; }

.vv-quest-paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .vv-quest-paths { grid-template-columns: 1fr; } }

.vv-path-card {
  --vv-path: var(--vv-blue);
  display: flex; flex-direction: column;
  border: 3px solid var(--vv-border); border-top: 8px solid var(--vv-path);
  border-radius: 16px; background: #fff; overflow: hidden;
  box-shadow: 0 4px 0 rgba(0,0,0,0.12);
}
.vv-path-head {
  pointer-events: auto; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 10px;
  border: none; background: transparent; padding: 12px;
  font-family: var(--vv-font); color: var(--vv-ink); width: 100%;
}
.vv-path-head:hover { background: rgba(0,0,0,0.03); }
.vv-path-emoji { font-size: 30px; flex: 0 0 auto; }
.vv-path-htext { flex: 1 1 auto; min-width: 0; }
.vv-path-name { font-size: 17px; font-weight: 900; }
.vv-path-dots { display: flex; gap: 5px; margin-top: 6px; }
.vv-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--vv-border); background: #ece3d0; }
.vv-dot-on { background: var(--vv-path); }
.vv-path-chev { font-size: 14px; font-weight: 900; opacity: .6; flex: 0 0 auto; }

.vv-path-rec {
  margin: 0 10px 12px; padding: 10px 12px;
  background: color-mix(in srgb, var(--vv-path) 12%, #fff);
  border: 3px dashed var(--vv-path); border-radius: 14px;
}
.vv-path-rec-top { font-size: 12px; font-weight: 900; letter-spacing: .5px; opacity: .8; text-transform: uppercase; }
.vv-path-rec-mission { font-size: 16px; font-weight: 900; margin: 3px 0; }
.vv-path-rec-hint { font-size: 13px; font-weight: 600; opacity: .8; line-height: 1.35; }
.vv-path-rec-go { margin-top: 8px; font-size: 14px; font-weight: 900; color: var(--vv-path); }
.vv-path-complete {
  margin: 0 10px 12px; padding: 12px; text-align: center; font-size: 16px; font-weight: 900;
  background: #eafff4; border: 3px solid var(--vv-green); border-radius: 14px; color: #08321f;
}

.vv-path-missions { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 7px; }
.vv-qmission { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 3px solid var(--vv-border); border-radius: 12px; background: #fff; }
.vv-qmission-check { font-size: 18px; line-height: 1.2; flex: 0 0 auto; width: 20px; text-align: center; }
.vv-qmission-body { flex: 1 1 auto; min-width: 0; }
.vv-qmission-label { font-size: 15px; font-weight: 800; }
.vv-qmission-hint { font-size: 12px; font-weight: 600; opacity: .8; margin-top: 2px; line-height: 1.3; }
.vv-qmission-done { opacity: .6; background: #f1f6f2; }
.vv-qmission-done .vv-qmission-label { text-decoration: line-through; }
.vv-qmission-done .vv-qmission-check { color: var(--vv-green); }
.vv-qmission-current { border-color: var(--vv-path); background: color-mix(in srgb, var(--vv-path) 10%, #fff); box-shadow: 0 3px 0 rgba(0,0,0,0.1); }
.vv-qmission-later { opacity: .55; }

.vv-quest-note {
  margin-top: 14px; text-align: center; font-size: 15px; font-weight: 800;
  background: var(--vv-panel-2); border: 3px solid var(--vv-border); border-radius: 14px; padding: 10px;
}

/* ================= PHONE — Missions / Requests / Gallery ================= */
.vv-phone-tabs { flex-wrap: wrap; }
.vv-phone-tab { position: relative; padding: 6px 2px; }
.vv-phone-tab small { font-size: 11px; }
.vv-phone-tab-dot { position: absolute; top: 3px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--vv-red); border: 2px solid #fff; }
.vv-phone-gallery {
  pointer-events: auto; cursor: pointer; margin-top: 10px; width: 100%;
  border: 3px solid var(--vv-border); border-radius: 14px; background: var(--vv-purple); color: #fff;
  padding: 10px; min-height: 44px; font-family: var(--vv-font); font-weight: 900; font-size: 16px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.2); transition: transform .08s ease;
}
.vv-phone-gallery span { font-size: 20px; }
.vv-phone-gallery:hover { transform: translateY(-2px); }

.vv-mission-card {
  border: 3px solid var(--vv-border); border-radius: 16px; background: #fff;
  padding: 10px 12px; margin-bottom: 10px; box-shadow: 0 3px 0 rgba(0,0,0,0.12);
}
.vv-mission-card.vv-mission-consequence { border-color: var(--vv-orange); background: #fff7ee; }
.vv-mission-card-head { display: flex; align-items: flex-start; gap: 8px; }
.vv-mission-card-emoji { font-size: 24px; flex: 0 0 auto; }
.vv-mission-card-titles { flex: 1 1 auto; min-width: 0; }
.vv-mission-card-label { font-size: 15px; font-weight: 900; }
.vv-mission-card-hint { font-size: 12px; font-weight: 600; opacity: .8; line-height: 1.3; margin-top: 2px; }
.vv-mission-flag { flex: 0 0 auto; font-size: 11px; font-weight: 900; color: #fff; background: var(--vv-orange); border: 2px solid var(--vv-border); border-radius: 999px; padding: 2px 8px; }
.vv-mission-step { margin-top: 10px; padding: 8px 10px; background: #eef5ff; border: 3px solid var(--vv-blue); border-radius: 12px; }
.vv-mission-step-label { font-size: 14px; font-weight: 900; }
.vv-mission-step-lesson { font-size: 12px; font-weight: 700; color: #2a5aa0; margin: 3px 0 8px; line-height: 1.35; }
.vv-mission-btn { display: block; width: 100%; margin-top: 4px; }
.vv-mission-note { margin-top: 8px; font-size: 13px; font-weight: 700; background: var(--vv-panel-2); border: 2px dashed var(--vv-border); border-radius: 12px; padding: 8px 10px; }

.vv-commission {
  border: 3px solid var(--vv-border); border-radius: 16px; background: #fff;
  padding: 10px 12px; margin-bottom: 10px; box-shadow: 0 3px 0 rgba(0,0,0,0.12);
}
.vv-commission.vv-commission-done { background: #eafff4; }
.vv-commission-head { display: flex; align-items: flex-start; gap: 8px; }
.vv-commission-emoji { font-size: 24px; flex: 0 0 auto; }
.vv-commission-titles { flex: 1 1 auto; min-width: 0; }
.vv-commission-from { font-size: 13px; font-weight: 900; color: var(--vv-purple); }
.vv-commission-brief { font-size: 14px; font-weight: 700; line-height: 1.35; margin-top: 2px; }
.vv-commission-checklist { margin: 8px 0 0; padding: 8px 10px; background: var(--vv-panel-2); border: 2px solid var(--vv-border); border-radius: 12px; }
.vv-commission-check { font-size: 12px; font-weight: 700; line-height: 1.5; }
.vv-commission-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.vv-commission-reward { font-size: 13px; font-weight: 900; color: #2a7a5a; }
.vv-commission-badge { font-size: 13px; font-weight: 900; color: #2a7a5a; }

/* ================= SCENARIO — fact-check sources + mastery/consequence ================= */
.vv-source-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 480px) { .vv-source-compare { grid-template-columns: 1fr; } }
.vv-source-card {
  border: 3px solid var(--vv-border); border-radius: 14px; background: #fff; overflow: hidden;
  box-shadow: 0 3px 0 rgba(0,0,0,0.12);
}
.vv-source-bar { display: flex; align-items: center; gap: 5px; background: #e9edf5; border-bottom: 3px solid var(--vv-border); padding: 6px 10px; }
.vv-source-dot { width: 9px; height: 9px; border-radius: 50%; background: #b9c2d6; flex: 0 0 auto; }
.vv-source-dot:nth-child(1) { background: var(--vv-red); }
.vv-source-dot:nth-child(2) { background: var(--vv-yellow); }
.vv-source-dot:nth-child(3) { background: var(--vv-green); }
.vv-source-url { margin-left: 6px; font-size: 12px; font-weight: 800; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-source-claim { padding: 10px 12px 6px; font-size: 15px; font-weight: 800; font-style: italic; line-height: 1.35; }
.vv-source-clues { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.vv-source-clue { font-size: 12px; font-weight: 700; opacity: .85; line-height: 1.3; }

.vv-mastery-line {
  margin-top: 12px; font-size: 16px; font-weight: 900; color: #2a5aa0;
  background: #eef5ff; border: 3px solid var(--vv-blue); border-radius: 14px; padding: 8px 12px;
}
.vv-consequence-line {
  margin-top: 10px; font-size: 15px; font-weight: 900; color: #a85400;
  background: #fff2e0; border: 3px solid var(--vv-orange); border-radius: 14px; padding: 8px 12px;
}
